From 8ac9d8c5ad401b109fbaf546348c49855ff9ee94 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 10 May 2023 13:32:28 -1000 Subject: [PATCH 001/826] method to get most recent blahblah --- src/libs/ReportActionsUtils.js | 34 ++++++++++++++++++++++++++++++++++ src/libs/actions/App.js | 9 ++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 86034d8a14ef..2534ebb92df9 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -285,6 +285,39 @@ function getLinkedTransactionID(reportID, reportActionID) { return reportAction.originalMessage.IOUTransactionID; } +/** + * @returns {object} + */ +function getMostRecentStoredReportAction() { + let mostRecentReportAction; + let mostRecentReportActionCreated = new Date(0).toISOString(); + + // Flatten all the actions + // Loop over them all to find the one that is the most recent + const flatReportActions = _.flatten(_.map(allReportActions, actions => _.values(actions))); + _.each(flatReportActions, (action) => { + // Pending actions should not be counted here as a user could create a comment or some other action while offline and the server might know about + // messages they have not seen yet. + if (!_.isEmpty(action.pendingAction)) { + return; + } + + // All actions should have this, but if not they are not useful to us. + if (!action.created) { + return; + } + + if (action.created < mostRecentReportActionCreated) { + return; + } + + mostRecentReportActionCreated = action.created; + mostRecentReportAction = action; + }); + + return mostRecentReportAction; +} + export { getSortedReportActions, getLastVisibleAction, @@ -298,4 +331,5 @@ export { getLastClosedReportAction, getLatestReportActionFromOnyxData, getLinkedTransactionID, + getMostRecentStoredReportAction, }; diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index e2d49f11c69e..14eb8a03078a 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -15,6 +15,7 @@ import ROUTES from '../../ROUTES'; import * as SessionUtils from '../SessionUtils'; import getCurrentUrl from '../Navigation/currentUrl'; import * as Session from './Session'; +import * as ReportActionsUtils from '../ReportActionsUtils'; let currentUserAccountID; let currentUserEmail = ''; @@ -184,9 +185,15 @@ function openApp() { * Refreshes data when the app reconnects */ function reconnectApp() { + // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID + // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. + // + // 1. Look through the local report actions to find the most recent reportActionID out of all of them + // 2. Send this to the server so that it can compute which chats are critical for the user to see and then follow up with a more complete sync later + const mostRecentReportAction = ReportActionsUtils.getMostRecentStoredReportAction(); API.write( CONST.NETWORK.COMMAND.RECONNECT_APP, - {policyIDList: getNonOptimisticPolicyIDs(allPolicies)}, + {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionID: mostRecentReportAction.reportActionID}, { optimisticData: [ { From 72dcafca73e635bcca1c94947ecbc978f724c443 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 11 May 2023 12:20:33 -1000 Subject: [PATCH 002/826] add getMostRecentReportActionLastModified() --- src/libs/ReportActionsUtils.js | 20 ++++++++++---------- src/libs/actions/App.js | 7 +++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 2534ebb92df9..22f8db27f4e4 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -286,11 +286,11 @@ function getLinkedTransactionID(reportID, reportActionID) { } /** - * @returns {object} + * @returns {string} */ -function getMostRecentStoredReportAction() { - let mostRecentReportAction; - let mostRecentReportActionCreated = new Date(0).toISOString(); +function getMostRecentReportActionLastModified() { + let mostRecentlyModifiedReportAction; + let mostRecentReportActionLastModified = new Date(0).toISOString(); // Flatten all the actions // Loop over them all to find the one that is the most recent @@ -303,19 +303,19 @@ function getMostRecentStoredReportAction() { } // All actions should have this, but if not they are not useful to us. - if (!action.created) { + if (!action.lastModified) { return; } - if (action.created < mostRecentReportActionCreated) { + if (action.lastModified < mostRecentReportActionLastModified) { return; } - mostRecentReportActionCreated = action.created; - mostRecentReportAction = action; + mostRecentReportActionLastModified = action.lastModified; + mostRecentlyModifiedReportAction = action; }); - return mostRecentReportAction; + return mostRecentlyModifiedReportAction; } export { @@ -331,5 +331,5 @@ export { getLastClosedReportAction, getLatestReportActionFromOnyxData, getLinkedTransactionID, - getMostRecentStoredReportAction, + getMostRecentReportActionLastModified, }; diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 14eb8a03078a..aa83a8a11d51 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -188,12 +188,11 @@ function reconnectApp() { // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. // - // 1. Look through the local report actions to find the most recent reportActionID out of all of them - // 2. Send this to the server so that it can compute which chats are critical for the user to see and then follow up with a more complete sync later - const mostRecentReportAction = ReportActionsUtils.getMostRecentStoredReportAction(); + // - Look through the local report actions to find the most recently modified report action + // - We Send this to the server so that it can compute which chats are critical for the user to see so we can update them in the LHN API.write( CONST.NETWORK.COMMAND.RECONNECT_APP, - {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionID: mostRecentReportAction.reportActionID}, + {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, { optimisticData: [ { From 3b680b0efafabf4edfe3c391d2be3aaabc4ecddc Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 11 May 2023 12:36:17 -1000 Subject: [PATCH 003/826] Actually send the timestamp --- src/libs/ReportActionsUtils.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 510f48d3a555..427376a7f95f 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -289,7 +289,7 @@ function getLinkedTransactionID(reportID, reportActionID) { * @returns {string} */ function getMostRecentReportActionLastModified() { - let mostRecentlyModifiedReportAction; + // Start with the oldest date possible let mostRecentReportActionLastModified = new Date(0).toISOString(); // Flatten all the actions @@ -312,10 +312,9 @@ function getMostRecentReportActionLastModified() { } mostRecentReportActionLastModified = action.lastModified; - mostRecentlyModifiedReportAction = action; }); - return mostRecentlyModifiedReportAction; + return mostRecentReportActionLastModified; } function isCreatedTaskReportAction(reportAction) { From e17680640320c7e313dee45b2d0505de96e10d46 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 11 May 2023 14:29:00 -1000 Subject: [PATCH 004/826] Subscribe to correct key --- src/libs/ReportActionsUtils.js | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 427376a7f95f..7734e4ea69d8 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -11,6 +11,19 @@ import ONYXKEYS from '../ONYXKEYS'; import Log from './Log'; import isReportMessageAttachment from './isReportMessageAttachment'; +const allReports = {}; +Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT, + callback: (report, key) => { + if (!key || !report) { + return; + } + + const reportID = CollectionUtils.extractCollectionItemID(key); + allReports[reportID] = report; + }, +}); + const allReportActions = {}; Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, @@ -302,16 +315,27 @@ function getMostRecentReportActionLastModified() { return; } - // All actions should have this, but if not they are not useful to us. - if (!action.lastModified) { + let lastModified = action.lastModified; + if (!lastModified) { + lastModified = action.created; + } + + if (lastModified < mostRecentReportActionLastModified) { return; } - if (action.lastModified < mostRecentReportActionLastModified) { + mostRecentReportActionLastModified = lastModified; + }); + + // We might not have actions so we also look at the report objects to see if any have a lastVisibleActionLastModified that is more recent. We don't need to get + // any reports that have been updated before either a recently updated report or reportAction as we should be up to date on these + _.each(allReports, (report) => { + const reportLastVisibleActionLastModified = report.lastVisibleActionLastModified || report.lastVisibleActionCreated; + if (reportLastVisibleActionLastModified < mostRecentReportActionLastModified) { return; } - mostRecentReportActionLastModified = action.lastModified; + mostRecentReportActionLastModified = reportLastVisibleActionLastModified; }); return mostRecentReportActionLastModified; From c19b8ed5b924abbcaeb64b4191eb397e57b71459 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Thu, 18 May 2023 19:42:53 +0100 Subject: [PATCH 005/826] if no visible actions, hide from LHN --- src/libs/ReportUtils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index d17d83c185bf..e610307960c8 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1940,6 +1940,11 @@ function shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, curr return false; } + // Hide thread reports that haven't been commented on + if (isThread(report) && ReportActionsUtils.getParentReportAction(report) && !ReportActionsUtils.getParentReportAction(report).lastVisibleActionCreated) { + return false; + } + return true; } From 32e19d002a17748f6ad7279137cd0517b62cf7e0 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Fri, 19 May 2023 12:09:29 -1000 Subject: [PATCH 006/826] Run prettier --- src/libs/ReportActionsUtils.js | 74 +++++++++++++++++----------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 541f5197f6d0..ea8cca24011a 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -383,43 +383,43 @@ function getLinkedTransactionID(reportID, reportActionID) { * @returns {string} */ function getMostRecentReportActionLastModified() { - // Start with the oldest date possible - let mostRecentReportActionLastModified = new Date(0).toISOString(); - - // Flatten all the actions - // Loop over them all to find the one that is the most recent - const flatReportActions = _.flatten(_.map(allReportActions, actions => _.values(actions))); - _.each(flatReportActions, (action) => { - // Pending actions should not be counted here as a user could create a comment or some other action while offline and the server might know about - // messages they have not seen yet. - if (!_.isEmpty(action.pendingAction)) { - return; - } - - let lastModified = action.lastModified; - if (!lastModified) { - lastModified = action.created; - } - - if (lastModified < mostRecentReportActionLastModified) { - return; - } - - mostRecentReportActionLastModified = lastModified; - }); - - // We might not have actions so we also look at the report objects to see if any have a lastVisibleActionLastModified that is more recent. We don't need to get - // any reports that have been updated before either a recently updated report or reportAction as we should be up to date on these - _.each(allReports, (report) => { - const reportLastVisibleActionLastModified = report.lastVisibleActionLastModified || report.lastVisibleActionCreated; - if (reportLastVisibleActionLastModified < mostRecentReportActionLastModified) { - return; - } - - mostRecentReportActionLastModified = reportLastVisibleActionLastModified; - }); - - return mostRecentReportActionLastModified; + // Start with the oldest date possible + let mostRecentReportActionLastModified = new Date(0).toISOString(); + + // Flatten all the actions + // Loop over them all to find the one that is the most recent + const flatReportActions = _.flatten(_.map(allReportActions, (actions) => _.values(actions))); + _.each(flatReportActions, (action) => { + // Pending actions should not be counted here as a user could create a comment or some other action while offline and the server might know about + // messages they have not seen yet. + if (!_.isEmpty(action.pendingAction)) { + return; + } + + let lastModified = action.lastModified; + if (!lastModified) { + lastModified = action.created; + } + + if (lastModified < mostRecentReportActionLastModified) { + return; + } + + mostRecentReportActionLastModified = lastModified; + }); + + // We might not have actions so we also look at the report objects to see if any have a lastVisibleActionLastModified that is more recent. We don't need to get + // any reports that have been updated before either a recently updated report or reportAction as we should be up to date on these + _.each(allReports, (report) => { + const reportLastVisibleActionLastModified = report.lastVisibleActionLastModified || report.lastVisibleActionCreated; + if (reportLastVisibleActionLastModified < mostRecentReportActionLastModified) { + return; + } + + mostRecentReportActionLastModified = reportLastVisibleActionLastModified; + }); + + return mostRecentReportActionLastModified; } /** From 014d239f3b6ae46921cfe64d846f89f31c2e792a Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 19 May 2023 16:25:53 -0600 Subject: [PATCH 007/826] refactor to functional component --- .../settings/Security/CloseAccountPage.js | 126 ++++++++---------- 1 file changed, 55 insertions(+), 71 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 6d0988401137..0702338ad277 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -1,4 +1,6 @@ -import React, {Component} from 'react'; +import React, { + useCallback, useState, +} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; @@ -37,105 +39,87 @@ const defaultProps = { }, }; -class CloseAccountPage extends Component { - constructor(props) { - super(props); +function CloseAccountPage (props) { + const [isConfirmModalVisible, setConfirmModalVisibility] = useState(false); + const [reasonForLeaving, setReasonForLeaving] = useState(''); - this.onConfirm = this.onConfirm.bind(this); - this.validate = this.validate.bind(this); - this.hideConfirmModal = this.hideConfirmModal.bind(this); - this.showConfirmModal = this.showConfirmModal.bind(this); - CloseAccount.clearError(); - this.state = { - isConfirmModalVisible: false, - reasonForLeaving: '', - }; - } + const hideConfirmModal = useCallback(() => { + setConfirmModalVisibility(false); + }); - componentWillUnmount() { - CloseAccount.clearError(); - } + const onConfirm = useCallback(() => { + User.closeAccount(reasonForLeaving); + hideConfirmModal(); + }); - onConfirm() { - User.closeAccount(this.state.reasonForLeaving); - this.hideConfirmModal(); - } + const showConfirmModal = useCallback((values) => { + setConfirmModalVisibility(true); + setReasonForLeaving(values.reasonForLeaving); + }); - showConfirmModal(values) { - this.setState({ - isConfirmModalVisible: true, - reasonForLeaving: values.reasonForLeaving, - }); - } - - hideConfirmModal() { - this.setState({isConfirmModalVisible: false}); - } - - validate(values) { - const userEmailOrPhone = this.props.formatPhoneNumber(this.props.session.email); + const validate = useCallback((values) => { + const userEmailOrPhone = props.formatPhoneNumber(props.session.email); const errors = {}; if (_.isEmpty(values.phoneOrEmail) || userEmailOrPhone.toLowerCase() !== values.phoneOrEmail.toLowerCase()) { - errors.phoneOrEmail = this.props.translate('closeAccountPage.enterYourDefaultContactMethod'); + errors.phoneOrEmail = props.translate('closeAccountPage.enterYourDefaultContactMethod'); } return errors; - } + }); + + const userEmailOrPhone = props.formatPhoneNumber(props.session.email); - render() { - const userEmailOrPhone = this.props.formatPhoneNumber(this.props.session.email); - return ( - - Navigation.navigate(ROUTES.SETTINGS_SECURITY)} - onCloseButtonPress={() => Navigation.dismissModal(true)} - /> -
- - {this.props.translate('closeAccountPage.reasonForLeavingPrompt')} + return ( + + Navigation.navigate(ROUTES.SETTINGS_SECURITY)} + onCloseButtonPress={() => Navigation.dismissModal(true)} + /> + + + {props.translate('closeAccountPage.reasonForLeavingPrompt')} - {this.props.translate('closeAccountPage.enterDefaultContactToConfirm')} {userEmailOrPhone}. + {props.translate('closeAccountPage.enterDefaultContactToConfirm')} {userEmailOrPhone}. - - - - ); - } +
+ +
+ ); } CloseAccountPage.propTypes = propTypes; From bd80ad9d531d48a0aa29720cc3280cac8fe839b3 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 22 May 2023 15:13:35 -0600 Subject: [PATCH 008/826] remove unused method --- src/libs/actions/CloseAccount.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/libs/actions/CloseAccount.js b/src/libs/actions/CloseAccount.js index 8a8f395277e1..b43120e7da30 100644 --- a/src/libs/actions/CloseAccount.js +++ b/src/libs/actions/CloseAccount.js @@ -2,13 +2,6 @@ import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; import CONST from '../../CONST'; -/** - * Clear CloseAccount error message to hide modal - */ -function clearError() { - Onyx.merge(ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM, {errors: null}); -} - /** * Set default Onyx data */ @@ -17,7 +10,5 @@ function setDefaultData() { } export { - // eslint-disable-next-line import/prefer-default-export - clearError, setDefaultData, }; From 86c0b3f59cb1ef4a8f7720443f3d3ac81d43ef0a Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 22 May 2023 15:14:01 -0600 Subject: [PATCH 009/826] dont use useCallback here as its most likely not needed --- src/pages/settings/Security/CloseAccountPage.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 0702338ad277..838607d01628 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -43,21 +43,21 @@ function CloseAccountPage (props) { const [isConfirmModalVisible, setConfirmModalVisibility] = useState(false); const [reasonForLeaving, setReasonForLeaving] = useState(''); - const hideConfirmModal = useCallback(() => { + const hideConfirmModal = () => { setConfirmModalVisibility(false); - }); + }; - const onConfirm = useCallback(() => { + const onConfirm = () => { User.closeAccount(reasonForLeaving); hideConfirmModal(); - }); + }; - const showConfirmModal = useCallback((values) => { + const showConfirmModal = (values) => { setConfirmModalVisibility(true); setReasonForLeaving(values.reasonForLeaving); - }); + }; - const validate = useCallback((values) => { + const validate = (values) => { const userEmailOrPhone = props.formatPhoneNumber(props.session.email); const errors = {}; @@ -65,7 +65,7 @@ function CloseAccountPage (props) { errors.phoneOrEmail = props.translate('closeAccountPage.enterYourDefaultContactMethod'); } return errors; - }); + }; const userEmailOrPhone = props.formatPhoneNumber(props.session.email); From df15ca036740d1efcb5243d43558d1ec1724609e Mon Sep 17 00:00:00 2001 From: David Bondy Date: Mon, 22 May 2023 15:51:42 -0600 Subject: [PATCH 010/826] clean up imports --- src/pages/settings/Security/CloseAccountPage.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 838607d01628..cd79e1ac54b2 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -1,5 +1,5 @@ import React, { - useCallback, useState, + useState, } from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -16,7 +16,6 @@ import TextInput from '../../../components/TextInput'; import Text from '../../../components/Text'; import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; -import * as CloseAccount from '../../../libs/actions/CloseAccount'; import ONYXKEYS from '../../../ONYXKEYS'; import Form from '../../../components/Form'; import CONST from '../../../CONST'; From 18693582b912463a60d37e5f91f2540a571de73a Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Wed, 24 May 2023 20:40:52 +0100 Subject: [PATCH 011/826] use .childLastVisibleActionCreated --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 6aa500b5a920..8d7bed5b0497 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1974,7 +1974,7 @@ function shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, curr } // Hide thread reports that haven't been commented on - if (isThread(report) && ReportActionsUtils.getParentReportAction(report) && !ReportActionsUtils.getParentReportAction(report).lastVisibleActionCreated) { + if (isThread(report) && ReportActionsUtils.getParentReportAction(report) && !ReportActionsUtils.getParentReportAction(report).childLastVisibleActionCreated) { return false; } From 0a72a27fb677b1d35a185405a7d003c1efa8f3a9 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 25 May 2023 16:46:58 +0100 Subject: [PATCH 012/826] temporarily enable debugging for local notifications --- android/app/build.gradle | 1 + android/app/src/release/assets/airshipconfig.properties | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 2c114b067d69..3f0089c08097 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -139,6 +139,7 @@ android { signingConfig signingConfigs.debug } release { + debuggable true signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" diff --git a/android/app/src/release/assets/airshipconfig.properties b/android/app/src/release/assets/airshipconfig.properties index 194c4577de8b..490f74552f11 100644 --- a/android/app/src/release/assets/airshipconfig.properties +++ b/android/app/src/release/assets/airshipconfig.properties @@ -1,6 +1,7 @@ -appKey = 55vypj0ARc6cN09MX7ogtQ -appSecret = EsSaqbdLSvmyC6kSBFJCtQ -inProduction = true +appKey = uulSSfTDQJ2r0PMpjRrhmQ +appSecret = D4Bhf0HrQEehrPua74Tyiw +inProduction = false +developmentLogLevel = VERBOSE # Notification Customization notificationIcon = ic_notification From 000240db52f351ea84c2ed3da31172d77b91ac18 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 25 May 2023 16:54:52 +0100 Subject: [PATCH 013/826] improve handling of missing onyxData notification payload --- .../CustomNotificationProvider.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index eff3420ee96d..ae6d23c6101e 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -28,6 +28,7 @@ import androidx.core.graphics.drawable.IconCompat; import com.urbanairship.AirshipConfigOptions; +import com.urbanairship.json.JsonList; import com.urbanairship.json.JsonMap; import com.urbanairship.json.JsonValue; import com.urbanairship.push.PushMessage; @@ -43,6 +44,7 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -68,6 +70,8 @@ public class CustomNotificationProvider extends ReactNotificationProvider { // Conversation JSON keys private static final String PAYLOAD_KEY = "payload"; + private static final String ONYX_DATA_KEY = "onyxData"; + private final ExecutorService executorService = Executors.newCachedThreadPool(); public final HashMap cache = new HashMap<>(); @@ -99,9 +103,10 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @ try { JsonMap payload = JsonValue.parseString(message.getExtra(PAYLOAD_KEY)).optMap(); - // Apply message style using onyxData from the notification payload - if (payload.get("onyxData").getList().size() > 0) { - applyMessageStyle(context, builder, payload, arguments.getNotificationId()); + if (payload.containsKey(ONYX_DATA_KEY)) { + Objects.requireNonNull(payload.get(ONYX_DATA_KEY)).isNull(); + + applyMessageStyle(context, builder, payload, arguments.getNotificationId()); } } catch (Exception e) { Log.e(TAG, "Failed to parse conversation, falling back to default notification style. SendID=" + message.getSendId(), e); From 270b71ce0b21fd6f38f635b98caac1a354023014 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Thu, 25 May 2023 11:26:09 -0600 Subject: [PATCH 014/826] export default and clean up usage --- src/libs/actions/CloseAccount.js | 2 +- src/pages/signin/LoginForm.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/actions/CloseAccount.js b/src/libs/actions/CloseAccount.js index b43120e7da30..a23c91bb6bf3 100644 --- a/src/libs/actions/CloseAccount.js +++ b/src/libs/actions/CloseAccount.js @@ -9,6 +9,6 @@ function setDefaultData() { Onyx.merge(ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM, {...CONST.DEFAULT_CLOSE_ACCOUNT_DATA}); } -export { +export default { setDefaultData, }; diff --git a/src/pages/signin/LoginForm.js b/src/pages/signin/LoginForm.js index 437612908081..caccdc3aec9b 100755 --- a/src/pages/signin/LoginForm.js +++ b/src/pages/signin/LoginForm.js @@ -22,7 +22,7 @@ import {withNetwork} from '../../components/OnyxProvider'; import networkPropTypes from '../../components/networkPropTypes'; import * as ErrorUtils from '../../libs/ErrorUtils'; import DotIndicatorMessage from '../../components/DotIndicatorMessage'; -import * as CloseAccount from '../../libs/actions/CloseAccount'; +import setDefaultData from '../../libs/actions/CloseAccount'; import CONST from '../../CONST'; const propTypes = { @@ -114,7 +114,7 @@ class LoginForm extends React.Component { // Clear the "Account successfully closed" message when the user starts typing if (this.props.closeAccount.success) { - CloseAccount.setDefaultData(); + setDefaultData(); } } @@ -135,7 +135,7 @@ class LoginForm extends React.Component { // If account was closed and have success message in Onyx, we clear it here if (!_.isEmpty(this.props.closeAccount.success)) { - CloseAccount.setDefaultData(); + setDefaultData(); } const login = this.state.login.trim(); From 5d050a0ff73b8546c5abc78818dcfbd2b5b2c12d Mon Sep 17 00:00:00 2001 From: David Bondy Date: Thu, 25 May 2023 11:38:20 -0600 Subject: [PATCH 015/826] fix default error key as defined by Onyx::handleException in web-e --- src/CONST.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CONST.js b/src/CONST.js index 3cb4b110be74..3a6129b7d3d1 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -727,7 +727,7 @@ const CONST = { }, DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'}, DEFAULT_ACCOUNT_DATA: {errors: null, success: '', isLoading: false}, - DEFAULT_CLOSE_ACCOUNT_DATA: {error: '', success: '', isLoading: false}, + DEFAULT_CLOSE_ACCOUNT_DATA: {errors: '', success: '', isLoading: false}, FORMS: { LOGIN_FORM: 'LoginForm', VALIDATE_CODE_FORM: 'ValidateCodeForm', From ecbef943d9bf41e5ff460b3120a3cb4495af8dc1 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 26 May 2023 16:25:17 -0600 Subject: [PATCH 016/826] Revert "remove unused method" This reverts commit bd80ad9d531d48a0aa29720cc3280cac8fe839b3. --- src/libs/actions/CloseAccount.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/CloseAccount.js b/src/libs/actions/CloseAccount.js index a23c91bb6bf3..8a8f395277e1 100644 --- a/src/libs/actions/CloseAccount.js +++ b/src/libs/actions/CloseAccount.js @@ -2,6 +2,13 @@ import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; import CONST from '../../CONST'; +/** + * Clear CloseAccount error message to hide modal + */ +function clearError() { + Onyx.merge(ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM, {errors: null}); +} + /** * Set default Onyx data */ @@ -9,6 +16,8 @@ function setDefaultData() { Onyx.merge(ONYXKEYS.FORMS.CLOSE_ACCOUNT_FORM, {...CONST.DEFAULT_CLOSE_ACCOUNT_DATA}); } -export default { +export { + // eslint-disable-next-line import/prefer-default-export + clearError, setDefaultData, }; From 4779d8e27dc18cbce2f7a16eca24fc0a9ab0d82c Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 26 May 2023 16:27:55 -0600 Subject: [PATCH 017/826] Revert "export default and clean up usage" This reverts commit 270b71ce0b21fd6f38f635b98caac1a354023014. --- src/pages/signin/LoginForm.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/signin/LoginForm.js b/src/pages/signin/LoginForm.js index caccdc3aec9b..437612908081 100755 --- a/src/pages/signin/LoginForm.js +++ b/src/pages/signin/LoginForm.js @@ -22,7 +22,7 @@ import {withNetwork} from '../../components/OnyxProvider'; import networkPropTypes from '../../components/networkPropTypes'; import * as ErrorUtils from '../../libs/ErrorUtils'; import DotIndicatorMessage from '../../components/DotIndicatorMessage'; -import setDefaultData from '../../libs/actions/CloseAccount'; +import * as CloseAccount from '../../libs/actions/CloseAccount'; import CONST from '../../CONST'; const propTypes = { @@ -114,7 +114,7 @@ class LoginForm extends React.Component { // Clear the "Account successfully closed" message when the user starts typing if (this.props.closeAccount.success) { - setDefaultData(); + CloseAccount.setDefaultData(); } } @@ -135,7 +135,7 @@ class LoginForm extends React.Component { // If account was closed and have success message in Onyx, we clear it here if (!_.isEmpty(this.props.closeAccount.success)) { - setDefaultData(); + CloseAccount.setDefaultData(); } const login = this.state.login.trim(); From cce3f22aaad019d85bbbf858a234d1326f73837e Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 26 May 2023 16:30:02 -0600 Subject: [PATCH 018/826] Revert "clean up imports" This reverts commit df15ca036740d1efcb5243d43558d1ec1724609e. --- src/pages/settings/Security/CloseAccountPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index cd79e1ac54b2..838607d01628 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -1,5 +1,5 @@ import React, { - useState, + useCallback, useState, } from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -16,6 +16,7 @@ import TextInput from '../../../components/TextInput'; import Text from '../../../components/Text'; import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; +import * as CloseAccount from '../../../libs/actions/CloseAccount'; import ONYXKEYS from '../../../ONYXKEYS'; import Form from '../../../components/Form'; import CONST from '../../../CONST'; From e25a3b16f6ff6a25bfd28773cd7fe782b4ce639a Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 26 May 2023 17:02:20 -0600 Subject: [PATCH 019/826] copy functionality based on lifecycle methods to not change behavior too much --- src/pages/settings/Security/CloseAccountPage.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 838607d01628..a5cfcf8c9922 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -1,5 +1,6 @@ import React, { - useCallback, useState, + useState, + useEffect, } from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -43,6 +44,13 @@ function CloseAccountPage (props) { const [isConfirmModalVisible, setConfirmModalVisibility] = useState(false); const [reasonForLeaving, setReasonForLeaving] = useState(''); + useEffect(() => { + CloseAccount.setDefaultData(); + return () => { + CloseAccount.clearError(); + }; + }); + const hideConfirmModal = () => { setConfirmModalVisibility(false); }; From 453f0eb64521d95aa06445dde5ed3654310dd535 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Wed, 31 May 2023 23:17:43 +0300 Subject: [PATCH 020/826] Hook refactor for ValidateLoginPage/index.js --- src/pages/ValidateLoginPage/index.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 97461b42ab92..942c6d744783 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; @@ -39,26 +39,24 @@ const defaultProps = { preferredLocale: CONST.LOCALES.DEFAULT, }; -class ValidateLoginPage extends Component { - componentDidMount() { - const accountID = lodashGet(this.props.route.params, 'accountID', ''); - const validateCode = lodashGet(this.props.route.params, 'validateCode', ''); - if (Permissions.canUsePasswordlessLogins(this.props.betas)) { - if (lodashGet(this.props, 'session.authToken')) { +function ValidateLoginPage(props) { + useEffect(() => { + const accountID = lodashGet(props.route.params, 'accountID', ''); + const validateCode = lodashGet(props.route.params, 'validateCode', ''); + if (Permissions.canUsePasswordlessLogins(props.betas)) { + if (lodashGet(props, 'session.authToken')) { // If already signed in, do not show the validate code if not on web, // because we don't want to block the user with the interstitial page. Navigation.goBack(false); } else { - Session.signInWithValidateCodeAndNavigate(accountID, validateCode, this.props.preferredLocale); + Session.signInWithValidateCodeAndNavigate(accountID, validateCode, props.preferredLocale); } } else { User.validateLogin(accountID, validateCode); } - } + }, []); - render() { - return ; - } + return ; } ValidateLoginPage.propTypes = propTypes; From 4852fd6d34b06296f5068c93ea24c26d849ca197 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 1 Jun 2023 15:27:31 +0100 Subject: [PATCH 021/826] temporarily flip iOS Airship keys --- ios/AirshipConfig.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/AirshipConfig.plist b/ios/AirshipConfig.plist index 3502dc33584f..8bd4702fac10 100644 --- a/ios/AirshipConfig.plist +++ b/ios/AirshipConfig.plist @@ -9,8 +9,8 @@ developmentAppSecret D4Bhf0HrQEehrPua74Tyiw productionAppKey - 55vypj0ARc6cN09MX7ogtQ + uulSSfTDQJ2r0PMpjRrhmQ productionAppSecret - EsSaqbdLSvmyC6kSBFJCtQ + D4Bhf0HrQEehrPua74Tyiw From 5da45fada7e86fa3536dbf8ecbc74ef1b2bf2cb2 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 2 Jun 2023 09:40:51 -0600 Subject: [PATCH 022/826] fix default type to stop console error --- src/CONST.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CONST.js b/src/CONST.js index 9c96f4706821..bb0c5fec2cbd 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -727,7 +727,7 @@ const CONST = { }, DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'}, DEFAULT_ACCOUNT_DATA: {errors: null, success: '', isLoading: false}, - DEFAULT_CLOSE_ACCOUNT_DATA: {errors: '', success: '', isLoading: false}, + DEFAULT_CLOSE_ACCOUNT_DATA: {errors: {}, success: '', isLoading: false}, FORMS: { LOGIN_FORM: 'LoginForm', VALIDATE_CODE_FORM: 'ValidateCodeForm', From 477631eecb0141fd91b7108955a9ecbab90c4d8f Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 2 Jun 2023 10:04:03 -0600 Subject: [PATCH 023/826] remove setting default data on component mount, its not 100% necessary --- src/pages/settings/Security/CloseAccountPage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index a5cfcf8c9922..80aa532c6861 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -45,7 +45,6 @@ function CloseAccountPage (props) { const [reasonForLeaving, setReasonForLeaving] = useState(''); useEffect(() => { - CloseAccount.setDefaultData(); return () => { CloseAccount.clearError(); }; From 3830a3ed00437e48d8b90aced4d9261200e55e10 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 2 Jun 2023 10:14:15 -0600 Subject: [PATCH 024/826] fix linter --- src/pages/settings/Security/CloseAccountPage.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 80aa532c6861..036fc5fe799b 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -44,11 +44,7 @@ function CloseAccountPage (props) { const [isConfirmModalVisible, setConfirmModalVisibility] = useState(false); const [reasonForLeaving, setReasonForLeaving] = useState(''); - useEffect(() => { - return () => { - CloseAccount.clearError(); - }; - }); + useEffect(() => () => CloseAccount.clearError()); const hideConfirmModal = () => { setConfirmModalVisibility(false); From b9069f7bc27eeefa0fc0cb8bb7173b78a5397ddc Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 2 Jun 2023 10:27:44 -0600 Subject: [PATCH 025/826] fix styles with prettier --- .../settings/Security/CloseAccountPage.js | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 036fc5fe799b..7a64aa7eaccb 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -1,7 +1,4 @@ -import React, { - useState, - useEffect, -} from 'react'; +import React, {useState, useEffect} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; @@ -40,7 +37,7 @@ const defaultProps = { }, }; -function CloseAccountPage (props) { +function CloseAccountPage(props) { const [isConfirmModalVisible, setConfirmModalVisibility] = useState(false); const [reasonForLeaving, setReasonForLeaving] = useState(''); @@ -90,35 +87,35 @@ function CloseAccountPage (props) { > {props.translate('closeAccountPage.reasonForLeavingPrompt')} - - - {props.translate('closeAccountPage.enterDefaultContactToConfirm')} {userEmailOrPhone}. - - - + + + {props.translate('closeAccountPage.enterDefaultContactToConfirm')} {userEmailOrPhone}. + + + From d5d59c2d50a4fad0408f0423ed19fe8b2c6a018c Mon Sep 17 00:00:00 2001 From: David Bondy Date: Fri, 2 Jun 2023 17:24:05 -0600 Subject: [PATCH 026/826] prevent execution of hook on every re-render by passing empty depedency array --- src/pages/settings/Security/CloseAccountPage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 7a64aa7eaccb..7d9fbe045566 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -41,7 +41,11 @@ function CloseAccountPage(props) { const [isConfirmModalVisible, setConfirmModalVisibility] = useState(false); const [reasonForLeaving, setReasonForLeaving] = useState(''); - useEffect(() => () => CloseAccount.clearError()); + // If you are new to hooks this might look weird but basically it is something that only runs when the component unmounts + // nothing runs on mount and we pass empty dependencies to prevent this from running on every re-render. + // TODO: We should refactor this so that the data in instead passed directly as a prop instead of "side loading" the data + // here, we left this as is during refactor to limit the breaking changes. + useEffect(() => () => CloseAccount.clearError(), []); const hideConfirmModal = () => { setConfirmModalVisibility(false); From c7b9245f49b38fae0dd03962efb84c0ca9c6bfe1 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Mon, 5 Jun 2023 19:28:38 +0530 Subject: [PATCH 027/826] Migrate NewChatPage to functional component --- src/pages/NewChatPage.js | 266 +++++++++++++++++---------------------- 1 file changed, 117 insertions(+), 149 deletions(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 1765c700221e..d241c46415f4 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {Component} from 'react'; +import React, {useState, useEffect, useMemo} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; @@ -44,80 +44,57 @@ const defaultProps = { reports: {}, }; -class NewChatPage extends Component { - constructor(props) { - super(props); - - this.toggleOption = this.toggleOption.bind(this); - this.createChat = this.createChat.bind(this); - this.createGroup = this.createGroup.bind(this); - this.updateOptionsWithSearchTerm = this.updateOptionsWithSearchTerm.bind(this); - this.excludedGroupEmails = _.without(CONST.EXPENSIFY_EMAILS, CONST.EMAIL.CONCIERGE); - - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - props.reports, - props.personalDetails, - props.betas, - '', - [], - this.props.isGroupChat ? this.excludedGroupEmails : [], - ); - this.state = { - searchTerm: '', - recentReports, - personalDetails, - selectedOptions: [], - userToInvite, - }; - } - - componentDidUpdate(prevProps) { - if (_.isEqual(prevProps.reports, this.props.reports) && _.isEqual(prevProps.personalDetails, this.props.personalDetails)) { - return; - } - this.updateOptionsWithSearchTerm(this.state.searchTerm); - } - - /** - * Returns the sections needed for the OptionsSelector - * - * @param {Boolean} maxParticipantsReached - * @returns {Array} - */ - getSections(maxParticipantsReached) { - const sections = []; +const NewChatPage = (props) => { + const [searchTerm, setSearchTerm] = useState(''); + const [filteredRecentReports, setFilteredRecentReports] = useState([]); + const [filteredPersonalDetails, setFilteredPersonalDetails] = useState([]); + const [filteredUserToInvite, setFilteredUserToInvite] = useState(); + const [selectedOptions, setSelectedOptions] = useState([]); + + const excludedGroupEmails = _.without(CONST.EXPENSIFY_EMAILS, CONST.EMAIL.CONCIERGE); + const maxParticipantsReached = selectedOptions.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; + const headerMessage = OptionsListUtils.getHeaderMessage( + filteredPersonalDetails.length + filteredRecentReports.length !== 0, + Boolean(filteredUserToInvite), + searchTerm, + maxParticipantsReached, + ); + const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); + + const sections = useMemo(() => { + const sectionsList = []; let indexOffset = 0; - if (this.props.isGroupChat) { - sections.push({ + if (props.isGroupChat) { + sectionsList.push({ title: undefined, - data: this.state.selectedOptions, - shouldShow: !_.isEmpty(this.state.selectedOptions), + data: selectedOptions, + shouldShow: !_.isEmpty(selectedOptions), indexOffset, }); - indexOffset += this.state.selectedOptions.length; + indexOffset += selectedOptions.length; if (maxParticipantsReached) { - return sections; + return sectionsList; } } // Filtering out selected users from the search results - const filterText = _.reduce(this.state.selectedOptions, (str, {login}) => `${str} ${login}`, ''); - const recentReportsWithoutSelected = _.filter(this.state.recentReports, ({login}) => !filterText.includes(login)); - const personalDetailsWithoutSelected = _.filter(this.state.personalDetails, ({login}) => !filterText.includes(login)); - const hasUnselectedUserToInvite = this.state.userToInvite && !filterText.includes(this.state.userToInvite.login); + const filterText = _.reduce(selectedOptions, (str, {login}) => `${str} ${login}`, ''); + const recentReportsWithoutSelected = _.filter(filteredRecentReports, ({login}) => !filterText.includes(login)); + const personalDetailsWithoutSelected = _.filter(filteredPersonalDetails, ({login}) => !filterText.includes(login)); + const hasUnselectedUserToInvite = filteredUserToInvite && !filterText.includes(filteredUserToInvite.login); - sections.push({ - title: this.props.translate('common.recents'), + sectionsList.push({ + title: props.translate('common.recents'), data: recentReportsWithoutSelected, shouldShow: !_.isEmpty(recentReportsWithoutSelected), indexOffset, }); indexOffset += recentReportsWithoutSelected.length; - sections.push({ - title: this.props.translate('common.contacts'), + sectionsList.push({ + title: props.translate('common.contacts'), data: personalDetailsWithoutSelected, shouldShow: !_.isEmpty(personalDetailsWithoutSelected), indexOffset, @@ -125,67 +102,61 @@ class NewChatPage extends Component { indexOffset += personalDetailsWithoutSelected.length; if (hasUnselectedUserToInvite) { - sections.push({ + sectionsList.push({ title: undefined, - data: [this.state.userToInvite], + data: [filteredUserToInvite], shouldShow: true, indexOffset, }); } - return sections; - } + return sectionsList; + // eslint-disable-next-line react-hooks/exhaustive-deps -- to avoid destructuring props and adding all 'props' as a dependency + }, [props.isGroupChat, props.translate, selectedOptions, filteredRecentReports, filteredPersonalDetails, filteredUserToInvite, maxParticipantsReached]); - updateOptionsWithSearchTerm(searchTerm = '') { + const updateOptionsWithSearchTerm = (newSearchTerm = '') => { const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - this.props.reports, - this.props.personalDetails, - this.props.betas, - searchTerm, + props.reports, + props.personalDetails, + props.betas, + newSearchTerm, [], - this.props.isGroupChat ? this.excludedGroupEmails : [], + props.isGroupChat ? excludedGroupEmails : [], ); - this.setState({ - searchTerm, - userToInvite, - recentReports, - personalDetails, - }); - } + setSearchTerm(newSearchTerm); + setFilteredRecentReports(recentReports); + setFilteredPersonalDetails(personalDetails); + setFilteredUserToInvite(userToInvite); + }; /** * Removes a selected option from list if already selected. If not already selected add this option to the list. * @param {Object} option */ - toggleOption(option) { - this.setState((prevState) => { - const isOptionInList = _.some(prevState.selectedOptions, (selectedOption) => selectedOption.login === option.login); + const toggleOption = (option) => { + const isOptionInList = _.some(selectedOptions, (selectedOption) => selectedOption.login === option.login); - let newSelectedOptions; + let newSelectedOptions; - if (isOptionInList) { - newSelectedOptions = _.reject(prevState.selectedOptions, (selectedOption) => selectedOption.login === option.login); - } else { - newSelectedOptions = [...prevState.selectedOptions, option]; - } + if (isOptionInList) { + newSelectedOptions = _.reject(selectedOptions, (selectedOption) => selectedOption.login === option.login); + } else { + newSelectedOptions = [...selectedOptions, option]; + } - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - this.props.reports, - this.props.personalDetails, - this.props.betas, - prevState.searchTerm, - [], - this.excludedGroupEmails, - ); + const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( + props.reports, + props.personalDetails, + props.betas, + searchTerm, + [], + excludedGroupEmails, + ); - return { - selectedOptions: newSelectedOptions, - recentReports, - personalDetails, - userToInvite, - searchTerm: prevState.searchTerm, - }; - }); + setSelectedOptions(newSelectedOptions); + setFilteredRecentReports(recentReports); + setFilteredPersonalDetails(personalDetails); + setFilteredUserToInvite(userToInvite); } /** @@ -194,7 +165,7 @@ class NewChatPage extends Component { * * @param {Object} option */ - createChat(option) { + const createChat = (option) => { Report.navigateToAndOpenReport([option.login]); } @@ -202,68 +173,65 @@ class NewChatPage extends Component { * Creates a new group chat with all the selected options and the current user, * or navigates to the existing chat if one with those participants already exists. */ - createGroup() { - if (!this.props.isGroupChat) { + const createGroup = () => { + if (!props.isGroupChat) { return; } - const userLogins = _.pluck(this.state.selectedOptions, 'login'); + const userLogins = _.pluck(selectedOptions, 'login'); if (userLogins.length < 1) { return; } Report.navigateToAndOpenReport(userLogins); } - render() { - const maxParticipantsReached = this.state.selectedOptions.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; - const sections = this.getSections(maxParticipantsReached); - const headerMessage = OptionsListUtils.getHeaderMessage( - this.state.personalDetails.length + this.state.recentReports.length !== 0, - Boolean(this.state.userToInvite), - this.state.searchTerm, - maxParticipantsReached, - ); - const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(this.props.personalDetails); - - return ( - - {({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => ( - <> - Navigation.dismissModal(true)} + useEffect(() => { + updateOptionsWithSearchTerm(searchTerm); + // all dependencies are not added below - + // 1. searchTerm - when searchTerm changes updateOptionsWithSearchTerm is called by OptionsSelector's onChangeText prop + // 2. updateOptionsWithSearchTerm - it will change its reference upon each rerender unnecessarily + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [props.reports, props.personalDetails]); + + return ( + + {({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => ( + <> + Navigation.dismissModal(true)} + /> + 0 ? safeAreaPaddingBottomStyle : {}]}> + (props.isGroupChat ? toggleOption(option) : createChat(option))} + onChangeText={updateOptionsWithSearchTerm} + headerMessage={headerMessage} + boldStyle + shouldFocusOnSelectRow={props.isGroupChat} + shouldShowConfirmButton={props.isGroupChat} + shouldShowOptions={didScreenTransitionEnd && isOptionsDataReady} + confirmButtonText={props.translate('newChatPage.createGroup')} + onConfirmSelection={createGroup} + textInputLabel={props.translate('optionsSelector.nameEmailOrPhoneNumber')} + safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} /> - 0 ? safeAreaPaddingBottomStyle : {}]}> - (this.props.isGroupChat ? this.toggleOption(option) : this.createChat(option))} - onChangeText={this.updateOptionsWithSearchTerm} - headerMessage={headerMessage} - boldStyle - shouldFocusOnSelectRow={this.props.isGroupChat} - shouldShowConfirmButton={this.props.isGroupChat} - shouldShowOptions={didScreenTransitionEnd && isOptionsDataReady} - confirmButtonText={this.props.translate('newChatPage.createGroup')} - onConfirmSelection={this.createGroup} - textInputLabel={this.props.translate('optionsSelector.nameEmailOrPhoneNumber')} - safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} - /> - - - )} - - ); - } -} + + + )} + + ); +}; NewChatPage.propTypes = propTypes; NewChatPage.defaultProps = defaultProps; +NewChatPage.displayName = 'NewChatPage'; export default compose( withLocalize, From a357a85e5f415cd9cf6b4af5982c77659fe121e9 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Mon, 5 Jun 2023 19:49:45 +0530 Subject: [PATCH 028/826] fix linting issues --- src/pages/NewChatPage.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index d241c46415f4..e43d0a81d586 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -144,20 +144,13 @@ const NewChatPage = (props) => { newSelectedOptions = [...selectedOptions, option]; } - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - props.reports, - props.personalDetails, - props.betas, - searchTerm, - [], - excludedGroupEmails, - ); + const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions(props.reports, props.personalDetails, props.betas, searchTerm, [], excludedGroupEmails); setSelectedOptions(newSelectedOptions); setFilteredRecentReports(recentReports); setFilteredPersonalDetails(personalDetails); setFilteredUserToInvite(userToInvite); - } + }; /** * Creates a new 1:1 chat with the option and the current user, @@ -167,7 +160,7 @@ const NewChatPage = (props) => { */ const createChat = (option) => { Report.navigateToAndOpenReport([option.login]); - } + }; /** * Creates a new group chat with all the selected options and the current user, @@ -183,7 +176,7 @@ const NewChatPage = (props) => { return; } Report.navigateToAndOpenReport(userLogins); - } + }; useEffect(() => { updateOptionsWithSearchTerm(searchTerm); From 7804df230f1d5f3deeca9d7fb113c3a3a17782ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 5 Jun 2023 18:57:49 +0200 Subject: [PATCH 029/826] initial rewrite of BaseTextInput to FC --- src/components/TextInput/BaseTextInput.js | 658 +++++++++--------- .../TextInput/baseTextInputPropTypes.js | 12 +- 2 files changed, 344 insertions(+), 326 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 91ab2162674f..12cbd9a1fcd6 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {Component} from 'react'; +import React, {useState, useRef, useEffect, useCallback} from 'react'; import {Animated, View, AppState, Keyboard, StyleSheet} from 'react-native'; import Str from 'expensify-common/lib/str'; import RNTextInput from '../RNTextInput'; @@ -21,64 +21,72 @@ import isInputAutoFilled from '../../libs/isInputAutoFilled'; import * as Pressables from '../Pressable'; const PressableWithoutFeedback = Pressables.PressableWithoutFeedback; -class BaseTextInput extends Component { - constructor(props) { - super(props); - - const value = props.value || props.defaultValue || ''; - const activeLabel = props.forceActiveLabel || value.length > 0 || Boolean(props.prefixCharacter); - - this.state = { - isFocused: false, - labelTranslateY: new Animated.Value(activeLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y), - labelScale: new Animated.Value(activeLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE), - passwordHidden: props.secureTextEntry, - textInputWidth: 0, - prefixWidth: 0, - selection: props.selection, - height: variables.componentSizeLarge, - - // Value should be kept in state for the autoGrow feature to work - https://github.com/Expensify/App/pull/8232#issuecomment-1077282006 - value, - }; - this.input = null; - this.isLabelActive = activeLabel; - this.onPress = this.onPress.bind(this); - this.onFocus = this.onFocus.bind(this); - this.onBlur = this.onBlur.bind(this); - this.setValue = this.setValue.bind(this); - this.togglePasswordVisibility = this.togglePasswordVisibility.bind(this); - this.dismissKeyboardWhenBackgrounded = this.dismissKeyboardWhenBackgrounded.bind(this); - this.storePrefixLayoutDimensions = this.storePrefixLayoutDimensions.bind(this); +function dismissKeyboardWhenBackgrounded(nextAppState) { + if (!nextAppState.match(/inactive|background/)) { + return; } - componentDidMount() { - if (this.props.disableKeyboard) { - this.appStateSubscription = AppState.addEventListener('change', this.dismissKeyboardWhenBackgrounded); + Keyboard.dismiss(); +} + +function BaseTextInput(props) { + const initialActiveLabel = props.forceActiveLabel || props.value.length > 0 || Boolean(props.prefixCharacter); + + const [isFocused, setIsFocused] = useState(false); + const [labelTranslateY] = useState(() => new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y)); + const [labelScale] = useState(() => new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE)); + const [passwordHidden, setPasswordHidden] = useState(props.secureTextEntry); + const [textInputWidth, setTextInputWidth] = useState(0); + const [textInputHeight, setTextInputHeight] = useState(); + const [prefixWidth, setPrefixWidth] = useState(0); + const [height, setHeight] = useState(variables.componentSizeLarge); + const [width, setWidth] = useState(); + + const input = useRef(null); + const isLabelActive = useRef(initialActiveLabel); + + useEffect(() => { + let appStateSubscription; + if (props.disableKeyboard) { + appStateSubscription = AppState.addEventListener('change', dismissKeyboardWhenBackgrounded); } // We are manually managing focus to prevent this issue: https://github.com/Expensify/App/issues/4514 - if (!this.props.autoFocus || !this.input) { + if (!props.autoFocus || !input.current) { return; } - if (this.props.shouldDelayFocus) { - this.focusTimeout = setTimeout(() => this.input.focus(), CONST.ANIMATED_TRANSITION); + let focusTimeout; + if (props.shouldDelayFocus) { + focusTimeout = setTimeout(() => input.current.focus(), CONST.ANIMATED_TRANSITION); return; } - this.input.focus(); - } + input.current.focus(); + + return () => { + if (focusTimeout) { + clearTimeout(focusTimeout); + } + + if (!props.disableKeyboard || !appStateSubscription) { + return; + } + + appStateSubscription.remove(); + }; + }, [props.autoFocus, props.disableKeyboard, props.shouldDelayFocus]); - componentDidUpdate(prevProps) { + /* + componentDidUpdate(prevProps) { // Activate or deactivate the label when value is changed programmatically from outside - const inputValue = _.isUndefined(this.props.value) ? this.input.value : this.props.value; - if ((_.isUndefined(inputValue) || this.state.value === inputValue) && _.isEqual(prevProps.selection, this.props.selection)) { + const inputValue = _.isUndefined(props.value) ? this.input.value : props.value; + if ((_.isUndefined(inputValue) || props.value === inputValue) && _.isEqual(prevProps.selection, props.selection)) { return; } // eslint-disable-next-line react/no-did-update-set-state - this.setState({value: inputValue, selection: this.props.selection}); + this.setState({value: inputValue, selection: props.selection}); // In some cases, When the value prop is empty, it is not properly updated on the TextInput due to its uncontrolled nature, thus manually clearing the TextInput. if (inputValue === '') { @@ -87,315 +95,317 @@ class BaseTextInput extends Component { if (inputValue) { this.activateLabel(); - } else if (!this.state.isFocused) { + } else if (!props.isFocused) { this.deactivateLabel(); } } - - componentWillUnmount() { - if (this.focusTimeout) { - clearTimeout(this.focusTimeout); - } - - if (!this.props.disableKeyboard || !this.appStateSubscription) { + */ + + const propIsDisabled = props.disabled; + const propOnPress = props.onPress; + const onPress = useCallback( + (event) => { + if (propIsDisabled) { + return; + } + + if (propOnPress) { + propOnPress(event); + } + + if (!event.isDefaultPrevented()) { + input.current.focus(); + } + }, + [propIsDisabled, propOnPress], + ); + + const animateLabel = useCallback( + (translateY, scale) => { + Animated.parallel([ + Animated.spring(props.labelTranslateY, { + toValue: translateY, + duration: styleConst.LABEL_ANIMATION_DURATION, + useNativeDriver: true, + }), + Animated.spring(props.labelScale, { + toValue: scale, + duration: styleConst.LABEL_ANIMATION_DURATION, + useNativeDriver: true, + }), + ]).start(); + }, + [props.labelScale, props.labelTranslateY], + ); + + const activateLabel = useCallback(() => { + if (props.value.length < 0 || isLabelActive) { return; } - this.appStateSubscription.remove(); - } + animateLabel(styleConst.ACTIVE_LABEL_TRANSLATE_Y, styleConst.ACTIVE_LABEL_SCALE); + isLabelActive.current = true; + }, [animateLabel, props.value.length]); - onPress(event) { - if (this.props.disabled) { + const deactivateLabel = useCallback(() => { + if (props.forceActiveLabel || props.value.length !== 0 || props.prefixCharacter) { return; } - if (this.props.onPress) { - this.props.onPress(event); - } - - if (!event.isDefaultPrevented()) { - this.input.focus(); - } - } - - onFocus(event) { - if (this.props.onFocus) { - this.props.onFocus(event); - } - this.setState({isFocused: true}); - this.activateLabel(); - } - - onBlur(event) { - if (this.props.onBlur) { - this.props.onBlur(event); - } - this.setState({isFocused: false}); - - // If the text has been supplied by Chrome autofill, the value state is not synced with the value - // as Chrome doesn't trigger a change event. When there is autofill text, don't deactivate label. - if (!isInputAutoFilled(this.input)) { - this.deactivateLabel(); - } - } - + animateLabel(styleConst.INACTIVE_LABEL_TRANSLATE_Y, styleConst.INACTIVE_LABEL_SCALE); + isLabelActive.current = false; + }, [animateLabel, props.forceActiveLabel, props.prefixCharacter, props.value.length]); + + const propOnFocus = props.onFocus; + const onFocus = useCallback( + (event) => { + if (propOnFocus) { + propOnFocus(event); + } + setIsFocused(true); + activateLabel(); + }, + [activateLabel, propOnFocus], + ); + + const propOnBlur = props.onBlur; + const onBlur = useCallback( + (event) => { + if (propOnBlur) { + propOnBlur(event); + } + setIsFocused(false); + + // If the text has been supplied by Chrome autofill, the value state is not synced with the value + // as Chrome doesn't trigger a change event. When there is autofill text, don't deactivate label. + if (!isInputAutoFilled(input.current)) { + deactivateLabel(); + } + }, + [deactivateLabel, propOnBlur], + ); + + const onLayout = useCallback( + (event) => { + if (!props.autoGrowHeight && props.multiline) { + return; + } + + const layout = event.nativeEvent.layout; + + setWidth((prevWidth) => (props.autoGrowHeight ? layout.width : prevWidth)); + setHeight((prevHeight) => (!props.multiline ? layout.height : prevHeight)); + }, + [props.autoGrowHeight, props.multiline], + ); + + // I feel like this is the region where imperative functions are starting: + + const propOnInputChange = props.onInputChange; /** * Set Value & activateLabel * * @param {String} value * @memberof BaseTextInput */ - setValue(value) { - if (this.props.onInputChange) { - this.props.onInputChange(value); - } - this.setState({value}); - Str.result(this.props.onChangeText, value); - this.activateLabel(); - } - - activateLabel() { - if (this.state.value.length < 0 || this.isLabelActive) { - return; - } - - this.animateLabel(styleConst.ACTIVE_LABEL_TRANSLATE_Y, styleConst.ACTIVE_LABEL_SCALE); - this.isLabelActive = true; - } - - deactivateLabel() { - if (this.props.forceActiveLabel || this.state.value.length !== 0 || this.props.prefixCharacter) { - return; - } - - this.animateLabel(styleConst.INACTIVE_LABEL_TRANSLATE_Y, styleConst.INACTIVE_LABEL_SCALE); - this.isLabelActive = false; - } - - dismissKeyboardWhenBackgrounded(nextAppState) { - if (!nextAppState.match(/inactive|background/)) { - return; - } - - Keyboard.dismiss(); - } - - animateLabel(translateY, scale) { - Animated.parallel([ - Animated.spring(this.state.labelTranslateY, { - toValue: translateY, - duration: styleConst.LABEL_ANIMATION_DURATION, - useNativeDriver: true, - }), - Animated.spring(this.state.labelScale, { - toValue: scale, - duration: styleConst.LABEL_ANIMATION_DURATION, - useNativeDriver: true, - }), - ]).start(); - } - - togglePasswordVisibility() { - this.setState((prevState) => ({passwordHidden: !prevState.passwordHidden})); - } - - storePrefixLayoutDimensions(event) { - this.setState({prefixWidth: Math.abs(event.nativeEvent.layout.width)}); - } - - render() { - // eslint-disable-next-line react/forbid-foreign-prop-types - const inputProps = _.omit(this.props, _.keys(baseTextInputPropTypes.propTypes)); - const hasLabel = Boolean(this.props.label.length); - const isEditable = _.isUndefined(this.props.editable) ? !this.props.disabled : this.props.editable; - const inputHelpText = this.props.errorText || this.props.hint; - const placeholder = this.props.prefixCharacter || this.state.isFocused || !hasLabel || (hasLabel && this.props.forceActiveLabel) ? this.props.placeholder : null; - const maxHeight = StyleSheet.flatten(this.props.containerStyles).maxHeight; - const textInputContainerStyles = _.reduce( - [ - styles.textInputContainer, - ...this.props.textInputContainerStyles, - this.props.autoGrow && StyleUtils.getWidthStyle(this.state.textInputWidth), - !this.props.hideFocusedState && this.state.isFocused && styles.borderColorFocus, - (this.props.hasError || this.props.errorText) && styles.borderColorDanger, - this.props.autoGrowHeight && {scrollPaddingTop: 2 * maxHeight}, - ], - (finalStyles, s) => ({...finalStyles, ...s}), - {}, - ); - const isMultiline = this.props.multiline || this.props.autoGrowHeight; - - return ( - <> - - { + if (propOnInputChange) { + propOnInputChange(value); + } + + // TODO: what is the next line used for? + Str.result(props.onChangeText, value); + activateLabel(); + }, + [activateLabel, propOnInputChange, props.onChangeText], + ); + + const togglePasswordVisibility = useCallback(() => { + setPasswordHidden((prevState) => !prevState.passwordHidden); + }, []); + + const storePrefixLayoutDimensions = useCallback((event) => { + setPrefixWidth(Math.abs(event.nativeEvent.layout.width)); + }, []); + + // TODO: don't do that all here? + // eslint-disable-next-line react/forbid-foreign-prop-types + const inputProps = _.omit(props, _.keys(baseTextInputPropTypes.propTypes)); + const hasLabel = Boolean(props.label.length); + const isEditable = _.isUndefined(props.editable) ? !props.disabled : props.editable; + const inputHelpText = props.errorText || props.hint; + const placeholder = props.prefixCharacter || isFocused || !hasLabel || (hasLabel && props.forceActiveLabel) ? props.placeholder : null; + const maxHeight = StyleSheet.flatten(props.containerStyles).maxHeight; + const textInputContainerStyles = _.reduce( + [ + styles.textInputContainer, + ...props.textInputContainerStyles, + props.autoGrow && StyleUtils.getWidthStyle(textInputWidth), + !props.hideFocusedState && isFocused && styles.borderColorFocus, + (props.hasError || props.errorText) && styles.borderColorDanger, + props.autoGrowHeight && {scrollPaddingTop: 2 * maxHeight}, + ], + (finalStyles, s) => ({...finalStyles, ...s}), + {}, + ); + const isMultiline = props.multiline || props.autoGrowHeight; + + return ( + <> + + + - { - if (!this.props.autoGrowHeight && this.props.multiline) { - return; - } - - const layout = event.nativeEvent.layout; - - this.setState((prevState) => ({ - width: this.props.autoGrowHeight ? layout.width : prevState.width, - height: !isMultiline ? layout.height : prevState.height, - })); - }} - style={[ - textInputContainerStyles, - - // When autoGrow is on and minWidth is not supplied, add a minWidth to allow the input to be focusable. - this.props.autoGrow && !textInputContainerStyles.minWidth && styles.mnw2, - ]} - > - {hasLabel ? ( - <> - {/* Adding this background to the label only for multiline text input, - to prevent text overlapping with label when scrolling */} - {isMultiline && ( - - )} - + {/* Adding this background to the label only for multiline text input, + to prevent text overlapping with label when scrolling */} + {isMultiline && ( + - - ) : null} - - {Boolean(this.props.prefixCharacter) && ( - - - {this.props.prefixCharacter} - - )} - { - if (typeof this.props.innerRef === 'function') { - this.props.innerRef(ref); - } else if (this.props.innerRef && _.has(this.props.innerRef, 'current')) { - this.props.innerRef.current = ref; - } - this.input = ref; - }} - // eslint-disable-next-line - {...inputProps} - autoCorrect={this.props.secureTextEntry ? false : this.props.autoCorrect} - placeholder={placeholder} - placeholderTextColor={themeColors.placeholderText} - underlineColorAndroid="transparent" - style={[ - styles.flex1, - styles.w100, - this.props.inputStyle, - (!hasLabel || isMultiline) && styles.pv0, - this.props.prefixCharacter && StyleUtils.getPaddingLeft(this.state.prefixWidth + styles.pl1.paddingLeft), - this.props.secureTextEntry && styles.secureInput, - - // Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear - // once it exceeds the input space (See https://github.com/Expensify/App/issues/13802) - !isMultiline && {height: this.state.height, lineHeight: undefined}, - - // Stop scrollbar flashing when breaking lines with autoGrowHeight enabled. - this.props.autoGrowHeight && StyleUtils.getAutoGrowHeightInputStyle(this.state.textInputHeight, maxHeight), - ]} - multiline={isMultiline} - maxLength={this.props.maxLength} - onFocus={this.onFocus} - onBlur={this.onBlur} - onChangeText={this.setValue} - secureTextEntry={this.state.passwordHidden} - onPressOut={this.props.onPress} - showSoftInputOnFocus={!this.props.disableKeyboard} - keyboardType={getSecureEntryKeyboardType(this.props.keyboardType, this.props.secureTextEntry, this.state.passwordHidden)} - value={this.state.value} - selection={this.state.selection} - editable={isEditable} - // FormSubmit Enter key handler does not have access to direct props. - // `dataset.submitOnEnter` is used to indicate that pressing Enter on this input should call the submit callback. - dataSet={{submitOnEnter: isMultiline && this.props.submitOnEnter}} + - {Boolean(this.props.secureTextEntry) && ( - e.preventDefault()} + + ) : null} + + {Boolean(props.prefixCharacter) && ( + + - - - )} - {!this.props.secureTextEntry && Boolean(this.props.icon) && ( - - - - )} - + {props.prefixCharacter} + + + )} + { + if (typeof props.innerRef === 'function') { + props.innerRef(ref); + } else if (props.innerRef && _.has(props.innerRef, 'current')) { + // eslint-disable-next-line no-param-reassign + props.innerRef.current = ref; + } + input.current = ref; + }} + // eslint-disable-next-line + {...inputProps} + autoCorrect={props.secureTextEntry ? false : props.autoCorrect} + placeholder={placeholder} + placeholderTextColor={themeColors.placeholderText} + underlineColorAndroid="transparent" + style={[ + styles.flex1, + styles.w100, + props.inputStyle, + (!hasLabel || isMultiline) && styles.pv0, + props.prefixCharacter && StyleUtils.getPaddingLeft(prefixWidth + styles.pl1.paddingLeft), + props.secureTextEntry && styles.secureInput, + + // Explicitly remove `lineHeight` from single line inputs so that long text doesn't disappear + // once it exceeds the input space (See https://github.com/Expensify/App/issues/13802) + !isMultiline && {height, lineHeight: undefined}, + + // Stop scrollbar flashing when breaking lines with autoGrowHeight enabled. + props.autoGrowHeight && StyleUtils.getAutoGrowHeightInputStyle(textInputHeight, maxHeight), + ]} + multiline={isMultiline} + maxLength={props.maxLength} + onFocus={onFocus} + onBlur={onBlur} + onChangeText={setValue} + secureTextEntry={passwordHidden} + onPressOut={props.onPress} + showSoftInputOnFocus={!props.disableKeyboard} + keyboardType={getSecureEntryKeyboardType(props.keyboardType, props.secureTextEntry, passwordHidden)} + value={props.value} + selection={props.selection} + editable={isEditable} + // FormSubmit Enter key handler does not have access to direct props. + // `dataset.submitOnEnter` is used to indicate that pressing Enter on this input should call the submit callback. + dataSet={{submitOnEnter: isMultiline && props.submitOnEnter}} + /> + {Boolean(props.secureTextEntry) && ( + e.preventDefault()} + > + + + )} + {!props.secureTextEntry && Boolean(props.icon) && ( + + + + )} - - {!_.isEmpty(inputHelpText) && ( - - )} - - {/* - Text input component doesn't support auto grow by default. - We're using a hidden text input to achieve that. - This text view is used to calculate width or height of the input value given textStyle in this component. - This Text component is intentionally positioned out of the screen. - */} - {(this.props.autoGrow || this.props.autoGrowHeight) && ( - // Add +2 to width so that the first digit of amount do not cut off on mWeb - https://github.com/Expensify/App/issues/8158. - this.setState({textInputWidth: e.nativeEvent.layout.width + 2, textInputHeight: e.nativeEvent.layout.height})} - > - {this.state.value || this.props.placeholder} - + + + {!_.isEmpty(inputHelpText) && ( + )} - - ); - } + + {/* + Text input component doesn't support auto grow by default. + We're using a hidden text input to achieve that. + This text view is used to calculate width or height of the input value given textStyle in this component. + This Text component is intentionally positioned out of the screen. + */} + {(props.autoGrow || props.autoGrowHeight) && ( + // Add +2 to width so that the first digit of amount do not cut off on mWeb - https://github.com/Expensify/App/issues/8158. + { + setTextInputWidth(e.nativeEvent.layout.width + 2); + setTextInputHeight(e.nativeEvent.layout.height); + }} + > + {props.value || props.placeholder} + + )} + + ); } +BaseTextInput.displayName = 'BaseTextInput'; BaseTextInput.propTypes = baseTextInputPropTypes.propTypes; BaseTextInput.defaultProps = baseTextInputPropTypes.defaultProps; diff --git a/src/components/TextInput/baseTextInputPropTypes.js b/src/components/TextInput/baseTextInputPropTypes.js index 45720ceb8c47..899bbe532d3c 100644 --- a/src/components/TextInput/baseTextInputPropTypes.js +++ b/src/components/TextInput/baseTextInputPropTypes.js @@ -40,10 +40,18 @@ const propTypes = { /** Disable the virtual keyboard */ disableKeyboard: PropTypes.bool, - /** Autogrow input container length based on the entered text */ + /** + * Autogrow input container length based on the entered text. + * Note: If you use this prop, the text input has to be controlled + * by a value prop. + */ autoGrow: PropTypes.bool, - /** Autogrow input container height based on the entered text */ + /** + * Autogrow input container height based on the entered text + * Note: If you use this prop, the text input has to be controlled + * by a value prop. + */ autoGrowHeight: PropTypes.bool, /** Hide the focus styles on TextInput */ From 880c4c008d5defa3a95f197f2f81fd2702f99be0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 5 Jun 2023 19:12:29 +0200 Subject: [PATCH 030/826] fix focus/label not working --- src/components/TextInput/BaseTextInput.js | 47 +++++++++-------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 12cbd9a1fcd6..8431073052ac 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -77,30 +77,6 @@ function BaseTextInput(props) { }; }, [props.autoFocus, props.disableKeyboard, props.shouldDelayFocus]); - /* - componentDidUpdate(prevProps) { - // Activate or deactivate the label when value is changed programmatically from outside - const inputValue = _.isUndefined(props.value) ? this.input.value : props.value; - if ((_.isUndefined(inputValue) || props.value === inputValue) && _.isEqual(prevProps.selection, props.selection)) { - return; - } - - // eslint-disable-next-line react/no-did-update-set-state - this.setState({value: inputValue, selection: props.selection}); - - // In some cases, When the value prop is empty, it is not properly updated on the TextInput due to its uncontrolled nature, thus manually clearing the TextInput. - if (inputValue === '') { - this.input.clear(); - } - - if (inputValue) { - this.activateLabel(); - } else if (!props.isFocused) { - this.deactivateLabel(); - } - } - */ - const propIsDisabled = props.disabled; const propOnPress = props.onPress; const onPress = useCallback( @@ -123,23 +99,23 @@ function BaseTextInput(props) { const animateLabel = useCallback( (translateY, scale) => { Animated.parallel([ - Animated.spring(props.labelTranslateY, { + Animated.spring(labelTranslateY, { toValue: translateY, duration: styleConst.LABEL_ANIMATION_DURATION, useNativeDriver: true, }), - Animated.spring(props.labelScale, { + Animated.spring(labelScale, { toValue: scale, duration: styleConst.LABEL_ANIMATION_DURATION, useNativeDriver: true, }), ]).start(); }, - [props.labelScale, props.labelTranslateY], + [labelScale, labelTranslateY], ); const activateLabel = useCallback(() => { - if (props.value.length < 0 || isLabelActive) { + if (props.value.length < 0 || isLabelActive.current) { return; } @@ -199,6 +175,21 @@ function BaseTextInput(props) { [props.autoGrowHeight, props.multiline], ); + useEffect(() => { + // Activate or deactivate the label when value is changed programmatically from outside + + // In some cases, When the value prop is empty, it is not properly updated on the TextInput due to its uncontrolled nature, thus manually clearing the TextInput. + if (props.value === '') { + input.current.clear(); + } + + if (props.value) { + activateLabel(); + } else if (!isFocused) { + deactivateLabel(); + } + }, [activateLabel, deactivateLabel, isFocused, props.value]); + // I feel like this is the region where imperative functions are starting: const propOnInputChange = props.onInputChange; From 4b962a59045001a58beeb7bffdec141e3585b13b Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 5 Jun 2023 14:11:44 -0400 Subject: [PATCH 031/826] Refactor the EmojiPicker to a functional component --- src/components/EmojiPicker/EmojiPicker.js | 219 ++++++++++------------ 1 file changed, 98 insertions(+), 121 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 1e15e9e20bf3..281fd2293623 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useState, useEffect, useRef} from 'react'; import {Dimensions, Keyboard} from 'react-native'; import _ from 'underscore'; import EmojiPickerMenu from './EmojiPickerMenu'; @@ -10,166 +10,143 @@ const DEFAULT_ANCHOR_ORIGIN = { vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, }; -class EmojiPicker extends React.Component { - constructor(props) { - super(props); - - this.hideEmojiPicker = this.hideEmojiPicker.bind(this); - this.showEmojiPicker = this.showEmojiPicker.bind(this); - this.selectEmoji = this.selectEmoji.bind(this); - this.measureEmojiPopoverAnchorPosition = this.measureEmojiPopoverAnchorPosition.bind(this); - this.measureEmojiPopoverAnchorPositionAndUpdateState = this.measureEmojiPopoverAnchorPositionAndUpdateState.bind(this); - this.focusEmojiSearchInput = this.focusEmojiSearchInput.bind(this); - this.onModalHide = () => {}; - this.onEmojiSelected = () => {}; - - this.state = { - isEmojiPickerVisible: false, - - // The horizontal and vertical position (relative to the window) where the emoji popover will display. - emojiPopoverAnchorPosition: { - horizontal: 0, - vertical: 0, - }, - - emojiPopoverAnchorOrigin: DEFAULT_ANCHOR_ORIGIN, - }; +function EmojiPicker () { + const [isEmojiPickerVisible, setIsEmojiPickerVisible] = useState(false); + const [emojiPopoverAnchorPosition, setEmojiPopoverAnchorPosition] = useState({ + horizontal: 0, + vertical: 0, + }); + const [emojiPopoverAnchorOrigin, setEmojiPopoverAnchorOrigin] = useState(DEFAULT_ANCHOR_ORIGIN); + const [onModalHide, setOnModalHide] = useState(() => {}); + const [onEmojiSelected, setOnEmojiSelected] = useState(() => {}); + const [emojiPopoverAnchor, setEmojiPopoverAnchor] = useState(null); + const emojiSearchInput = useRef(); + + function measureEmojiPopoverAnchorPosition() { + return new Promise((resolve) => { + if (!emojiPopoverAnchor) { + return resolve({horizontal: 0, vertical: 0}); + } + emojiPopoverAnchor.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + }); } - componentDidMount() { - this.emojiPopoverDimensionListener = Dimensions.addEventListener('change', this.measureEmojiPopoverAnchorPositionAndUpdateState); + function measureEmojiPopoverAnchorPositionAndUpdateState() { + measureEmojiPopoverAnchorPosition().then((value) => { + setEmojiPopoverAnchorPosition(value); + }); } - componentDidUpdate(prevProps, prevState) { - if (prevState.isEmojiPickerVisible === this.state.isEmojiPickerVisible || !this.state.isEmojiPickerVisible) { - return; + useEffect(() => { + if (isEmojiPickerVisible) { + Keyboard.dismiss(); } - // Dismiss the keyboard to provide a focus for the emoji picker to avoid selection issues. - Keyboard.dismiss(); - } - - componentWillUnmount() { - if (!this.emojiPopoverDimensionListener) { - return; + const emojiPopoverDimensionListener = Dimensions.addEventListener('change', measureEmojiPopoverAnchorPositionAndUpdateState); + return () => { + emojiPopoverDimensionListener.remove(); } - this.emojiPopoverDimensionListener.remove(); - } + }, [isEmojiPickerVisible]); /** - * Callback for the emoji picker to add whatever emoji is chosen into the main input + * Hide the emoji picker menu. * - * @param {String} emoji - * @param {Object} emojiObject + * @param {Boolean} isNavigating */ - selectEmoji(emoji, emojiObject) { - // Prevent fast click / multiple emoji selection; - // The first click will hide the emoji picker by calling the hideEmojiPicker() function - // and in that function the emojiPopoverAnchor prop to will be set to null (synchronously) - // thus we rely on that prop to prevent fast click / multiple emoji selection - if (!this.emojiPopoverAnchor) { - return; - } - - this.hideEmojiPicker(); - if (_.isFunction(this.onEmojiSelected)) { - this.onEmojiSelected(emoji, emojiObject); + const hideEmojiPicker = (isNavigating) => { + if (isNavigating) { + setOnModalHide( () => {}); } + setEmojiPopoverAnchor(null); + setIsEmojiPickerVisible(false); } /** - * Hide the emoji picker menu. - * - * @param {Boolean} isNavigating + * Focus the search input in the emoji picker. */ - hideEmojiPicker(isNavigating) { - if (isNavigating) { - this.onModalHide = () => {}; + const focusEmojiSearchInput = () => { + if (!emojiSearchInput) { + return; } - this.emojiPopoverAnchor = null; - this.setState({isEmojiPickerVisible: false}); + emojiSearchInput.focus(); } /** * Show the emoji picker menu. * - * @param {Function} [onModalHide=() => {}] - Run a callback when Modal hides. - * @param {Function} [onEmojiSelected=() => {}] - Run a callback when Emoji selected. - * @param {Element} emojiPopoverAnchor - Element to which Popover is anchored + * @param {Function} [onModalHideValue=() => {}] - Run a callback when Modal hides. + * @param {Function} [onEmojiSelectedValue=() => {}] - Run a callback when Emoji selected. + * @param {Element} emojiPopoverAnchorValue - Element to which Popover is anchored * @param {Object} [anchorOrigin=DEFAULT_ANCHOR_ORIGIN] - Anchor origin for Popover * @param {Function} [onWillShow=() => {}] - Run a callback when Popover will show */ - showEmojiPicker(onModalHide, onEmojiSelected, emojiPopoverAnchor, anchorOrigin, onWillShow = () => {}) { - this.onModalHide = onModalHide; - this.onEmojiSelected = onEmojiSelected; - this.emojiPopoverAnchor = emojiPopoverAnchor; + function showEmojiPicker(onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) { + setOnModalHide(onModalHideValue); + setOnEmojiSelected(onEmojiSelectedValue); + setEmojiPopoverAnchor(emojiPopoverAnchorValue); - if (this.emojiPopoverAnchor) { + if (emojiPopoverAnchor) { // Drop focus to avoid blue focus ring. emojiPopoverAnchor.blur(); } - this.measureEmojiPopoverAnchorPosition().then((emojiPopoverAnchorPosition) => { + measureEmojiPopoverAnchorPosition().then((value) => { onWillShow(); - this.setState({isEmojiPickerVisible: true, emojiPopoverAnchorPosition, emojiPopoverAnchorOrigin: anchorOrigin || DEFAULT_ANCHOR_ORIGIN}); - }); - } - - measureEmojiPopoverAnchorPosition() { - return new Promise((resolve) => { - if (!this.emojiPopoverAnchor) { - return resolve({horizontal: 0, vertical: 0}); - } - this.emojiPopoverAnchor.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); - }); - } - - measureEmojiPopoverAnchorPositionAndUpdateState() { - this.measureEmojiPopoverAnchorPosition().then((emojiPopoverAnchorPosition) => { - this.setState({emojiPopoverAnchorPosition}); + setIsEmojiPickerVisible(true); + setEmojiPopoverAnchorPosition(value); + setEmojiPopoverAnchorOrigin(anchorOrigin || DEFAULT_ANCHOR_ORIGIN); }); } /** - * Focus the search input in the emoji picker. + * Callback for the emoji picker to add whatever emoji is chosen into the main input + * + * @param {String} emoji + * @param {Object} emojiObject */ - focusEmojiSearchInput() { - if (!this.emojiSearchInput) { + const selectEmoji = (emoji, emojiObject) => { + // Prevent fast click / multiple emoji selection; + // The first click will hide the emoji picker by calling the hideEmojiPicker() function + // and in that function the emojiPopoverAnchor prop to will be set to null (synchronously) + // thus we rely on that prop to prevent fast click / multiple emoji selection + if (!emojiPopoverAnchor) { return; } - this.emojiSearchInput.focus(); - } - render() { - // There is no way to disable animations and they are really laggy, because there are so many - // emojis. The best alternative is to set it to 1ms so it just "pops" in and out - return ( - - (this.emojiSearchInput = el)} - /> - - ); + hideEmojiPicker(); + if (_.isFunction(onEmojiSelected)) { + onEmojiSelected(emoji, emojiObject); + } } + + // There is no way to disable animations and they are really laggy, because there are so many + // emojis. The best alternative is to set it to 1ms so it just "pops" in and out + return ( + + + + ); } export default EmojiPicker; From 13d2e602f3c8383503b61bb51ea5fdc14a8e7845 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Tue, 6 Jun 2023 00:13:14 +0530 Subject: [PATCH 032/826] use function instead of const --- src/pages/NewChatPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index e43d0a81d586..6ee132c4abd6 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -44,7 +44,7 @@ const defaultProps = { reports: {}, }; -const NewChatPage = (props) => { +function NewChatPage(props) { const [searchTerm, setSearchTerm] = useState(''); const [filteredRecentReports, setFilteredRecentReports] = useState([]); const [filteredPersonalDetails, setFilteredPersonalDetails] = useState([]); From 735afc4a2e3b10df1e7ed70e5b2481f01734aac8 Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Mon, 5 Jun 2023 14:45:58 -0400 Subject: [PATCH 033/826] Refactor `TransferBalancePage` into a functional component --- .../settings/Payments/TransferBalancePage.js | 289 +++++++++--------- 1 file changed, 144 insertions(+), 145 deletions(-) diff --git a/src/pages/settings/Payments/TransferBalancePage.js b/src/pages/settings/Payments/TransferBalancePage.js index eafa2de82b31..6096293f7c7d 100644 --- a/src/pages/settings/Payments/TransferBalancePage.js +++ b/src/pages/settings/Payments/TransferBalancePage.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React from 'react'; +import React, {useEffect, useCallback} from 'react'; import {View, ScrollView} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; @@ -65,65 +65,65 @@ const defaultProps = { walletTransfer: {}, }; -class TransferBalancePage extends React.Component { - constructor(props) { - super(props); +const TransferBalancePage = (props) => { - this.paymentTypes = [ - { - key: CONST.WALLET.TRANSFER_METHOD_TYPE.INSTANT, - title: this.props.translate('transferAmountPage.instant'), - description: this.props.translate('transferAmountPage.instantSummary', { - rate: this.props.numberFormat(CONST.WALLET.TRANSFER_METHOD_TYPE_FEE.INSTANT.RATE), - minAmount: CurrencyUtils.convertToDisplayString(CONST.WALLET.TRANSFER_METHOD_TYPE_FEE.INSTANT.MINIMUM_FEE), - }), - icon: Expensicons.Bolt, - type: CONST.PAYMENT_METHODS.DEBIT_CARD, - }, - { - key: CONST.WALLET.TRANSFER_METHOD_TYPE.ACH, - title: this.props.translate('transferAmountPage.ach'), - description: this.props.translate('transferAmountPage.achSummary'), - icon: Expensicons.Bank, - type: CONST.PAYMENT_METHODS.BANK_ACCOUNT, - }, - ]; - - PaymentMethods.resetWalletTransferData(); - const selectedAccount = this.getSelectedPaymentMethodAccount(); - - // Select the default payment account when page is opened, - // so that user can see that preselected on choose transfer account page - if (!selectedAccount || !selectedAccount.isDefault) { - return; - } - - PaymentMethods.saveWalletTransferAccountTypeAndID(selectedAccount.accountType, selectedAccount.methodID); - } + const paymentTypes = [ + { + key: CONST.WALLET.TRANSFER_METHOD_TYPE.INSTANT, + title: props.translate('transferAmountPage.instant'), + description: props.translate('transferAmountPage.instantSummary', { + rate: props.numberFormat(CONST.WALLET.TRANSFER_METHOD_TYPE_FEE.INSTANT.RATE), + minAmount: CurrencyUtils.convertToDisplayString(CONST.WALLET.TRANSFER_METHOD_TYPE_FEE.INSTANT.MINIMUM_FEE), + }), + icon: Expensicons.Bolt, + type: CONST.PAYMENT_METHODS.DEBIT_CARD, + }, + { + key: CONST.WALLET.TRANSFER_METHOD_TYPE.ACH, + title: props.translate('transferAmountPage.ach'), + description: props.translate('transferAmountPage.achSummary'), + icon: Expensicons.Bank, + type: CONST.PAYMENT_METHODS.BANK_ACCOUNT, + }, + ]; /** * Get the selected/default payment method account for wallet transfer * @returns {Object|undefined} */ - getSelectedPaymentMethodAccount() { - const paymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, this.props.cardList); + const getSelectedPaymentMethodAccount = useCallback(() => { + const paymentMethods = PaymentUtils.formatPaymentMethods(props.bankAccountList, props.cardList); const defaultAccount = _.find(paymentMethods, (method) => method.isDefault); const selectedAccount = _.find( paymentMethods, - (method) => method.accountType === this.props.walletTransfer.selectedAccountType && method.methodID === this.props.walletTransfer.selectedAccountID, + (method) => method.accountType === props.walletTransfer.selectedAccountType && method.methodID === props.walletTransfer.selectedAccountID, ); return selectedAccount || defaultAccount; - } + }, [props.bankAccountList, props.cardList, props.walletTransfer.selectedAccountType, props.walletTransfer.selectedAccountID]); + + useEffect(() => { + // Reset to the default account when the page is opened + PaymentMethods.resetWalletTransferData(); + }, []); + + useEffect(() => { + const selectedAccount = getSelectedPaymentMethodAccount(); + if (!selectedAccount || !selectedAccount.isDefault) { + return; + } + + PaymentMethods.saveWalletTransferAccountTypeAndID(selectedAccount.accountType, selectedAccount.methodID); + }, [getSelectedPaymentMethodAccount]); /** * @param {String} filterPaymentMethodType */ - navigateToChooseTransferAccount(filterPaymentMethodType) { + const navigateToChooseTransferAccount = (filterPaymentMethodType) => { PaymentMethods.saveWalletTransferMethodType(filterPaymentMethodType); // If we only have a single option for the given paymentMethodType do not force the user to make a selection - const combinedPaymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, this.props.cardList); + const combinedPaymentMethods = PaymentUtils.formatPaymentMethods(props.bankAccountList, props.cardList); const filteredMethods = _.filter(combinedPaymentMethods, (paymentMethod) => paymentMethod.accountType === filterPaymentMethodType); if (filteredMethods.length === 1) { @@ -133,120 +133,119 @@ class TransferBalancePage extends React.Component { } Navigation.navigate(ROUTES.SETTINGS_PAYMENTS_CHOOSE_TRANSFER_ACCOUNT); + }; + + if (props.walletTransfer.shouldShowSuccess && !props.walletTransfer.loading) { + return ( + + + + + ); } - render() { - if (this.props.walletTransfer.shouldShowSuccess && !this.props.walletTransfer.loading) { - return ( - - - - - ); - } - const selectedAccount = this.getSelectedPaymentMethodAccount(); - const selectedPaymentType = - selectedAccount && selectedAccount.accountType === CONST.PAYMENT_METHODS.BANK_ACCOUNT ? CONST.WALLET.TRANSFER_METHOD_TYPE.ACH : CONST.WALLET.TRANSFER_METHOD_TYPE.INSTANT; + const selectedAccount = getSelectedPaymentMethodAccount(); + const selectedPaymentType = + selectedAccount && selectedAccount.accountType === CONST.PAYMENT_METHODS.BANK_ACCOUNT ? CONST.WALLET.TRANSFER_METHOD_TYPE.ACH : CONST.WALLET.TRANSFER_METHOD_TYPE.INSTANT; - const calculatedFee = PaymentUtils.calculateWalletTransferBalanceFee(this.props.userWallet.currentBalance, selectedPaymentType); - const transferAmount = this.props.userWallet.currentBalance - calculatedFee; - const isTransferable = transferAmount > 0; - const isButtonDisabled = !isTransferable || !selectedAccount; - const errorMessage = !_.isEmpty(this.props.walletTransfer.errors) ? _.chain(this.props.walletTransfer.errors).values().first().value() : ''; + const calculatedFee = PaymentUtils.calculateWalletTransferBalanceFee(props.userWallet.currentBalance, selectedPaymentType); + const transferAmount = props.userWallet.currentBalance - calculatedFee; + const isTransferable = transferAmount > 0; + const isButtonDisabled = !isTransferable || !selectedAccount; + const errorMessage = !_.isEmpty(props.walletTransfer.errors) ? _.chain(props.walletTransfer.errors).values().first().value() : ''; - const shouldShowTransferView = - PaymentUtils.hasExpensifyPaymentMethod(this.props.cardList, this.props.bankAccountList) && this.props.userWallet.tierName === CONST.WALLET.TIER_NAME.GOLD; + const shouldShowTransferView = + PaymentUtils.hasExpensifyPaymentMethod(props.cardList, props.bankAccountList) && props.userWallet.tierName === CONST.WALLET.TIER_NAME.GOLD; - return ( - - Navigation.navigate(ROUTES.SETTINGS_PAYMENTS)} + return ( + + Navigation.navigate(ROUTES.SETTINGS_PAYMENTS)} + > + Navigation.goBack()} + onCloseButtonPress={() => Navigation.dismissModal(true)} + /> + + + + - Navigation.goBack()} - onCloseButtonPress={() => Navigation.dismissModal(true)} - /> - - - - - - {_.map(this.paymentTypes, (paymentType) => ( - this.navigateToChooseTransferAccount(paymentType.type)} - /> - ))} - - {this.props.translate('transferAmountPage.whichAccount')} - {Boolean(selectedAccount) && ( + + {_.map(paymentTypes, (paymentType) => ( this.navigateToChooseTransferAccount(selectedAccount.accountType)} + key={paymentType.key} + title={paymentType.title} + description={paymentType.description} + iconWidth={variables.iconSizeXLarge} + iconHeight={variables.iconSizeXLarge} + icon={paymentType.icon} + success={selectedPaymentType === paymentType.key} + wrapperStyle={{ + ...styles.mt3, + ...styles.pv4, + ...styles.transferBalancePayment, + ...(selectedPaymentType === paymentType.key && styles.transferBalanceSelectedPayment), + }} + onPress={() => navigateToChooseTransferAccount(paymentType.type)} /> - )} - - {this.props.translate('transferAmountPage.fee')} - {CurrencyUtils.convertToDisplayString(calculatedFee)} - - - - PaymentMethods.transferWalletBalance(selectedAccount)} - isDisabled={isButtonDisabled || this.props.network.isOffline} - message={errorMessage} - isAlertVisible={!_.isEmpty(errorMessage)} + ))} + + {props.translate('transferAmountPage.whichAccount')} + {Boolean(selectedAccount) && ( + navigateToChooseTransferAccount(selectedAccount.accountType)} /> + )} + + {props.translate('transferAmountPage.fee')} + {CurrencyUtils.convertToDisplayString(calculatedFee)} - - - ); - } -} + + + PaymentMethods.transferWalletBalance(selectedAccount)} + isDisabled={isButtonDisabled || props.network.isOffline} + message={errorMessage} + isAlertVisible={!_.isEmpty(errorMessage)} + /> + + + + ); +}; TransferBalancePage.propTypes = propTypes; TransferBalancePage.defaultProps = defaultProps; From a4326ce6708073319d5fe6b0ff726fa3bb0b9ee8 Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Mon, 5 Jun 2023 14:58:47 -0400 Subject: [PATCH 034/826] Add missing `displayName` property --- src/pages/settings/Payments/TransferBalancePage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/settings/Payments/TransferBalancePage.js b/src/pages/settings/Payments/TransferBalancePage.js index 6096293f7c7d..eb55dc963bea 100644 --- a/src/pages/settings/Payments/TransferBalancePage.js +++ b/src/pages/settings/Payments/TransferBalancePage.js @@ -249,6 +249,7 @@ const TransferBalancePage = (props) => { TransferBalancePage.propTypes = propTypes; TransferBalancePage.defaultProps = defaultProps; +TransferBalancePage.displayName = 'TransferBalancePage'; export default compose( withLocalize, From 77ae604938921452f9c1df02ef92bb3b1e5b3c4c Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Mon, 5 Jun 2023 15:08:58 -0400 Subject: [PATCH 035/826] Run prettier --- src/pages/settings/Payments/TransferBalancePage.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/settings/Payments/TransferBalancePage.js b/src/pages/settings/Payments/TransferBalancePage.js index eb55dc963bea..40fac733d6d3 100644 --- a/src/pages/settings/Payments/TransferBalancePage.js +++ b/src/pages/settings/Payments/TransferBalancePage.js @@ -66,7 +66,6 @@ const defaultProps = { }; const TransferBalancePage = (props) => { - const paymentTypes = [ { key: CONST.WALLET.TRANSFER_METHOD_TYPE.INSTANT, @@ -135,7 +134,7 @@ const TransferBalancePage = (props) => { Navigation.navigate(ROUTES.SETTINGS_PAYMENTS_CHOOSE_TRANSFER_ACCOUNT); }; - if (props.walletTransfer.shouldShowSuccess && !props.walletTransfer.loading) { + if (props.walletTransfer.shouldShowSuccess && !props.walletTransfer.loading) { return ( { const isButtonDisabled = !isTransferable || !selectedAccount; const errorMessage = !_.isEmpty(props.walletTransfer.errors) ? _.chain(props.walletTransfer.errors).values().first().value() : ''; - const shouldShowTransferView = - PaymentUtils.hasExpensifyPaymentMethod(props.cardList, props.bankAccountList) && props.userWallet.tierName === CONST.WALLET.TIER_NAME.GOLD; + const shouldShowTransferView = PaymentUtils.hasExpensifyPaymentMethod(props.cardList, props.bankAccountList) && props.userWallet.tierName === CONST.WALLET.TIER_NAME.GOLD; return ( From 5b62ce3d467315d67c28b3b78f38eecf045bfa0b Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Mon, 5 Jun 2023 16:05:51 -0400 Subject: [PATCH 036/826] Declare component with the `function` keyword instead of using an arrow function --- src/pages/settings/Payments/TransferBalancePage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Payments/TransferBalancePage.js b/src/pages/settings/Payments/TransferBalancePage.js index 40fac733d6d3..b294b1c20805 100644 --- a/src/pages/settings/Payments/TransferBalancePage.js +++ b/src/pages/settings/Payments/TransferBalancePage.js @@ -65,7 +65,7 @@ const defaultProps = { walletTransfer: {}, }; -const TransferBalancePage = (props) => { +function TransferBalancePage(props) { const paymentTypes = [ { key: CONST.WALLET.TRANSFER_METHOD_TYPE.INSTANT, @@ -243,7 +243,7 @@ const TransferBalancePage = (props) => { ); -}; +} TransferBalancePage.propTypes = propTypes; TransferBalancePage.defaultProps = defaultProps; From 22775244f66aea769ad91b18e4020e6c34b16dc2 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 5 Jun 2023 16:50:24 -0400 Subject: [PATCH 037/826] Fix some weirdness with state --- src/components/EmojiPicker/EmojiPicker.js | 78 ++++++++++++----------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 281fd2293623..ba75a9053fd5 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -1,4 +1,4 @@ -import React, {useState, useEffect, useRef} from 'react'; +import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle} from 'react'; import {Dimensions, Keyboard} from 'react-native'; import _ from 'underscore'; import EmojiPickerMenu from './EmojiPickerMenu'; @@ -10,7 +10,7 @@ const DEFAULT_ANCHOR_ORIGIN = { vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, }; -function EmojiPicker () { +const EmojiPicker = forwardRef((props, ref) => { const [isEmojiPickerVisible, setIsEmojiPickerVisible] = useState(false); const [emojiPopoverAnchorPosition, setEmojiPopoverAnchorPosition] = useState({ horizontal: 0, @@ -22,17 +22,44 @@ function EmojiPicker () { const [emojiPopoverAnchor, setEmojiPopoverAnchor] = useState(null); const emojiSearchInput = useRef(); - function measureEmojiPopoverAnchorPosition() { + function measureEmojiPopoverAnchorPosition(anchorComponent) { return new Promise((resolve) => { - if (!emojiPopoverAnchor) { + if (!anchorComponent) { return resolve({horizontal: 0, vertical: 0}); } - emojiPopoverAnchor.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + }); + } + + /** + * Show the emoji picker menu. + * + * @param {Function} [onModalHideValue=() => {}] - Run a callback when Modal hides. + * @param {Function} [onEmojiSelectedValue=() => {}] - Run a callback when Emoji selected. + * @param {Element} emojiPopoverAnchorValue - Element to which Popover is anchored + * @param {Object} [anchorOrigin=DEFAULT_ANCHOR_ORIGIN] - Anchor origin for Popover + * @param {Function} [onWillShow=() => {}] - Run a callback when Popover will show + */ + function showEmojiPicker(onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) { + setOnModalHide(() => onModalHideValue); + setOnEmojiSelected(() => onEmojiSelectedValue); + setEmojiPopoverAnchor(emojiPopoverAnchorValue); + + if (emojiPopoverAnchorValue) { + // Drop focus to avoid blue focus ring. + emojiPopoverAnchorValue.blur(); + } + + measureEmojiPopoverAnchorPosition(emojiPopoverAnchorValue).then((value) => { + onWillShow(); + setIsEmojiPickerVisible(true); + setEmojiPopoverAnchorPosition(value); + setEmojiPopoverAnchorOrigin(anchorOrigin || DEFAULT_ANCHOR_ORIGIN); }); } function measureEmojiPopoverAnchorPositionAndUpdateState() { - measureEmojiPopoverAnchorPosition().then((value) => { + measureEmojiPopoverAnchorPosition(emojiPopoverAnchor).then((value) => { setEmojiPopoverAnchorPosition(value); }); } @@ -46,7 +73,7 @@ function EmojiPicker () { return () => { emojiPopoverDimensionListener.remove(); } - }, [isEmojiPickerVisible]); + }, [isEmojiPickerVisible, emojiPopoverAnchor]); /** * Hide the emoji picker menu. @@ -65,37 +92,10 @@ function EmojiPicker () { * Focus the search input in the emoji picker. */ const focusEmojiSearchInput = () => { - if (!emojiSearchInput) { + if (!emojiSearchInput.current) { return; } - emojiSearchInput.focus(); - } - - /** - * Show the emoji picker menu. - * - * @param {Function} [onModalHideValue=() => {}] - Run a callback when Modal hides. - * @param {Function} [onEmojiSelectedValue=() => {}] - Run a callback when Emoji selected. - * @param {Element} emojiPopoverAnchorValue - Element to which Popover is anchored - * @param {Object} [anchorOrigin=DEFAULT_ANCHOR_ORIGIN] - Anchor origin for Popover - * @param {Function} [onWillShow=() => {}] - Run a callback when Popover will show - */ - function showEmojiPicker(onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) { - setOnModalHide(onModalHideValue); - setOnEmojiSelected(onEmojiSelectedValue); - setEmojiPopoverAnchor(emojiPopoverAnchorValue); - - if (emojiPopoverAnchor) { - // Drop focus to avoid blue focus ring. - emojiPopoverAnchor.blur(); - } - - measureEmojiPopoverAnchorPosition().then((value) => { - onWillShow(); - setIsEmojiPickerVisible(true); - setEmojiPopoverAnchorPosition(value); - setEmojiPopoverAnchorOrigin(anchorOrigin || DEFAULT_ANCHOR_ORIGIN); - }); + emojiSearchInput.current.focus(); } /** @@ -119,6 +119,8 @@ function EmojiPicker () { } } + useImperativeHandle(ref, () => ({showEmojiPicker})); + // There is no way to disable animations and they are really laggy, because there are so many // emojis. The best alternative is to set it to 1ms so it just "pops" in and out return ( @@ -143,10 +145,10 @@ function EmojiPicker () { > emojiSearchInput.current = el} /> ); -} +}); export default EmojiPicker; From b5198545372ad32236aeea3252fbe21afc675564 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 5 Jun 2023 17:07:32 -0400 Subject: [PATCH 038/826] prettier --- src/components/EmojiPicker/EmojiPicker.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index ba75a9053fd5..def7f0ec834e 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -72,8 +72,8 @@ const EmojiPicker = forwardRef((props, ref) => { const emojiPopoverDimensionListener = Dimensions.addEventListener('change', measureEmojiPopoverAnchorPositionAndUpdateState); return () => { emojiPopoverDimensionListener.remove(); - } - }, [isEmojiPickerVisible, emojiPopoverAnchor]); + }; + }, [isEmojiPickerVisible, emojiPopoverAnchor, measureEmojiPopoverAnchorPositionAndUpdateState]); /** * Hide the emoji picker menu. @@ -82,11 +82,11 @@ const EmojiPicker = forwardRef((props, ref) => { */ const hideEmojiPicker = (isNavigating) => { if (isNavigating) { - setOnModalHide( () => {}); + setOnModalHide(() => {}); } setEmojiPopoverAnchor(null); setIsEmojiPickerVisible(false); - } + }; /** * Focus the search input in the emoji picker. @@ -96,7 +96,7 @@ const EmojiPicker = forwardRef((props, ref) => { return; } emojiSearchInput.current.focus(); - } + }; /** * Callback for the emoji picker to add whatever emoji is chosen into the main input @@ -117,7 +117,7 @@ const EmojiPicker = forwardRef((props, ref) => { if (_.isFunction(onEmojiSelected)) { onEmojiSelected(emoji, emojiObject); } - } + }; useImperativeHandle(ref, () => ({showEmojiPicker})); @@ -145,7 +145,7 @@ const EmojiPicker = forwardRef((props, ref) => { > emojiSearchInput.current = el} + ref={(el) => (emojiSearchInput.current = el)} /> ); From 3a060108aa68338e6625336d8616a50a5525f111 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 5 Jun 2023 17:17:32 -0400 Subject: [PATCH 039/826] more JSX linting --- src/components/EmojiPicker/EmojiPicker.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index def7f0ec834e..6fea7300463a 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -58,22 +58,20 @@ const EmojiPicker = forwardRef((props, ref) => { }); } - function measureEmojiPopoverAnchorPositionAndUpdateState() { - measureEmojiPopoverAnchorPosition(emojiPopoverAnchor).then((value) => { - setEmojiPopoverAnchorPosition(value); - }); - } - useEffect(() => { if (isEmojiPickerVisible) { Keyboard.dismiss(); } - const emojiPopoverDimensionListener = Dimensions.addEventListener('change', measureEmojiPopoverAnchorPositionAndUpdateState); + const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => { + measureEmojiPopoverAnchorPosition(emojiPopoverAnchor).then((value) => { + setEmojiPopoverAnchorPosition(value); + }); + }); return () => { emojiPopoverDimensionListener.remove(); }; - }, [isEmojiPickerVisible, emojiPopoverAnchor, measureEmojiPopoverAnchorPositionAndUpdateState]); + }, [isEmojiPickerVisible, emojiPopoverAnchor]); /** * Hide the emoji picker menu. From 5d36268694c0ab5f5cffa747e801c66a16d3a252 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 6 Jun 2023 14:17:14 +0800 Subject: [PATCH 040/826] show tooltip below as soon as another element overlap the top edge --- src/styles/getTooltipStyles.js | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/styles/getTooltipStyles.js b/src/styles/getTooltipStyles.js index 8a4e11bad194..e3cc53d361d4 100644 --- a/src/styles/getTooltipStyles.js +++ b/src/styles/getTooltipStyles.js @@ -50,14 +50,14 @@ function computeHorizontalShift(windowWidth, xOffset, componentWidth, tooltipWid } /** - * Determines if there is an overlapping element at the top of both given coordinates. + * Determines if there is an overlapping element at the top of a given coordinate. * (targetCenterX, y) * | * v * _ _ _ _ _ * | | * | | - * (x, targetCenterY) -> | | + * | | * | | * |_ _ _ _ _| * @@ -67,37 +67,31 @@ function computeHorizontalShift(windowWidth, xOffset, componentWidth, tooltipWid * and the top edge of the wrapped component. * @param {Element} [tooltip] - The reference to the tooltip's root element * @param {Number} tooltipTargetWidth - The width of the tooltip's target - * @param {Number} tooltipTargetHeight - The height of the tooltip's target * @returns {Boolean} */ -function isOverlappingAtTop(xOffset, yOffset, tooltip, tooltipTargetWidth, tooltipTargetHeight) { +function isOverlappingAtTop(xOffset, yOffset, tooltip, tooltipTargetWidth) { if (typeof document.elementFromPoint !== 'function') { return false; } - // Use the x and y center position of the target to prevent wrong element - // returned by elementFromPoint in case the target has a border radius or is a multiline text. + // Use the x center position of the target to prevent wrong element returned by elementFromPoint + // in case the target has a border radius or is a multiline text. const targetCenterX = xOffset + tooltipTargetWidth / 2; - const targetCenterY = yOffset + tooltipTargetHeight / 2; const elementAtTargetCenterX = document.elementFromPoint(targetCenterX, yOffset); - const elementAtTargetCenterY = document.elementFromPoint(xOffset, targetCenterY); const tooltipRef = (tooltip && tooltip.current) || tooltip; // Ensure it's not the already rendered element of this very tooltip, so the tooltip doesn't try to "avoid" itself - if (!elementAtTargetCenterX || !elementAtTargetCenterY || (tooltipRef && (tooltipRef.contains(elementAtTargetCenterX) || tooltipRef.contains(elementAtTargetCenterY)))) { + if (!elementAtTargetCenterX || (tooltipRef && tooltipRef.contains(elementAtTargetCenterX))) { return false; } const rectAtTargetCenterX = elementAtTargetCenterX.getBoundingClientRect(); - const rectAtTargetCenterY = elementAtTargetCenterY.getBoundingClientRect(); // Ensure it's not overlapping with another element by checking if the yOffset is greater than the top of the element // and less than the bottom of the element const isOverlappingAtTargetCenterX = yOffset > rectAtTargetCenterX.top && yOffset < rectAtTargetCenterX.bottom; - const isOverlappingAtTargetCenterY = yOffset > rectAtTargetCenterY.top && yOffset < rectAtTargetCenterY.bottom; - // Return true only if both elementAtTargetCenterX and elementAtTargetCenterY overlap with another element - return isOverlappingAtTargetCenterX && isOverlappingAtTargetCenterY; + return isOverlappingAtTargetCenterX; } /** @@ -162,7 +156,7 @@ export default function getTooltipStyles( // If either a tooltip will try to render within GUTTER_WIDTH logical pixels of the top of the screen, // Or the wrapped component is overlapping at top-left with another element // we'll display it beneath its wrapped component rather than above it as usual. - shouldShowBelow = yOffset - tooltipHeight < GUTTER_WIDTH || isOverlappingAtTop(xOffset, yOffset, tooltip, tooltipTargetWidth, tooltipTargetHeight); + shouldShowBelow = yOffset - tooltipHeight < GUTTER_WIDTH || isOverlappingAtTop(xOffset, yOffset, tooltip, tooltipTargetWidth); // When the tooltip size is ready, we can start animating the scale. scale = currentSize; From 336f951515f0ebac8dc7285408a145d7cce15d75 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 6 Jun 2023 14:24:57 +0800 Subject: [PATCH 041/826] update comment --- src/styles/getTooltipStyles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/getTooltipStyles.js b/src/styles/getTooltipStyles.js index e3cc53d361d4..b8c741d67934 100644 --- a/src/styles/getTooltipStyles.js +++ b/src/styles/getTooltipStyles.js @@ -154,7 +154,7 @@ export default function getTooltipStyles( if (isTooltipSizeReady) { // Determine if the tooltip should display below the wrapped component. // If either a tooltip will try to render within GUTTER_WIDTH logical pixels of the top of the screen, - // Or the wrapped component is overlapping at top-left with another element + // Or the wrapped component is overlapping at top-center with another element // we'll display it beneath its wrapped component rather than above it as usual. shouldShowBelow = yOffset - tooltipHeight < GUTTER_WIDTH || isOverlappingAtTop(xOffset, yOffset, tooltip, tooltipTargetWidth); From 36eb6eb40529e2d221144bd0ee488cfd81fbc04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Tue, 6 Jun 2023 09:36:35 +0200 Subject: [PATCH 042/826] remove comment --- src/components/TextInput/BaseTextInput.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 8431073052ac..0705e607bd4f 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -190,8 +190,6 @@ function BaseTextInput(props) { } }, [activateLabel, deactivateLabel, isFocused, props.value]); - // I feel like this is the region where imperative functions are starting: - const propOnInputChange = props.onInputChange; /** * Set Value & activateLabel From bd6cef713ef2f356215bcbe45b08d467bef60b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Tue, 6 Jun 2023 11:04:58 +0200 Subject: [PATCH 043/826] fix text input focus --- src/components/TextInput/BaseTextInput.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 0705e607bd4f..bfddf9bab9c1 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -135,13 +135,13 @@ function BaseTextInput(props) { const propOnFocus = props.onFocus; const onFocus = useCallback( (event) => { + console.log('onFocus'); if (propOnFocus) { propOnFocus(event); } setIsFocused(true); - activateLabel(); }, - [activateLabel, propOnFocus], + [propOnFocus], ); const propOnBlur = props.onBlur; @@ -183,7 +183,7 @@ function BaseTextInput(props) { input.current.clear(); } - if (props.value) { + if (props.value || isFocused) { activateLabel(); } else if (!isFocused) { deactivateLabel(); From 519b1923830f2bd16a1ae10580b7d4247204cdcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Tue, 6 Jun 2023 13:35:09 +0200 Subject: [PATCH 044/826] fix focus --- src/components/TextInput/BaseTextInput.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index bfddf9bab9c1..80f8ca128421 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -31,7 +31,8 @@ function dismissKeyboardWhenBackgrounded(nextAppState) { } function BaseTextInput(props) { - const initialActiveLabel = props.forceActiveLabel || props.value.length > 0 || Boolean(props.prefixCharacter); + const inputValue = props.value || ''; + const initialActiveLabel = props.forceActiveLabel || inputValue.length > 0 || Boolean(props.prefixCharacter); const [isFocused, setIsFocused] = useState(false); const [labelTranslateY] = useState(() => new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y)); @@ -115,27 +116,26 @@ function BaseTextInput(props) { ); const activateLabel = useCallback(() => { - if (props.value.length < 0 || isLabelActive.current) { + if (inputValue.length < 0 || isLabelActive.current) { return; } animateLabel(styleConst.ACTIVE_LABEL_TRANSLATE_Y, styleConst.ACTIVE_LABEL_SCALE); isLabelActive.current = true; - }, [animateLabel, props.value.length]); + }, [animateLabel, inputValue]); const deactivateLabel = useCallback(() => { - if (props.forceActiveLabel || props.value.length !== 0 || props.prefixCharacter) { + if (props.forceActiveLabel || inputValue.length !== 0 || props.prefixCharacter) { return; } animateLabel(styleConst.INACTIVE_LABEL_TRANSLATE_Y, styleConst.INACTIVE_LABEL_SCALE); isLabelActive.current = false; - }, [animateLabel, props.forceActiveLabel, props.prefixCharacter, props.value.length]); + }, [animateLabel, props.forceActiveLabel, props.prefixCharacter, inputValue]); const propOnFocus = props.onFocus; const onFocus = useCallback( (event) => { - console.log('onFocus'); if (propOnFocus) { propOnFocus(event); } @@ -179,16 +179,16 @@ function BaseTextInput(props) { // Activate or deactivate the label when value is changed programmatically from outside // In some cases, When the value prop is empty, it is not properly updated on the TextInput due to its uncontrolled nature, thus manually clearing the TextInput. - if (props.value === '') { + if (inputValue === '') { input.current.clear(); } - if (props.value || isFocused) { + if (inputValue || isFocused) { activateLabel(); } else if (!isFocused) { deactivateLabel(); } - }, [activateLabel, deactivateLabel, isFocused, props.value]); + }, [activateLabel, deactivateLabel, inputValue, isFocused]); const propOnInputChange = props.onInputChange; /** From ac6b7d75f71c4de2b4c851d40e5066288b654f39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Tue, 6 Jun 2023 13:41:25 +0200 Subject: [PATCH 045/826] migrated Checkbox to PressableWithFeedback --- src/components/Checkbox.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index 9e4f5da57dcf..f0464fbbad34 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -1,11 +1,12 @@ import React from 'react'; -import {View, Pressable} from 'react-native'; +import {View} from 'react-native'; import PropTypes from 'prop-types'; import styles from '../styles/styles'; import themeColors from '../styles/themes/default'; import stylePropTypes from '../styles/stylePropTypes'; import Icon from './Icon'; import * as Expensicons from './Icon/Expensicons'; +import PressableWithFeedback from './Pressable/PressableWithFeedback'; const propTypes = { /** Whether checkbox is checked */ @@ -34,6 +35,9 @@ const propTypes = { /** A ref to forward to the Pressable */ forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]), + + /** A ref to forward to the Pressable */ + accessibilityLabel: PropTypes.string, }; const defaultProps = { @@ -45,6 +49,7 @@ const defaultProps = { forwardedRef: undefined, children: null, onMouseDown: undefined, + accessibilityLabel: 'checkbox', }; class Checkbox extends React.Component { @@ -95,7 +100,7 @@ class Checkbox extends React.Component { render() { return ( - {this.props.children ? ( this.props.children @@ -133,7 +141,7 @@ class Checkbox extends React.Component { )} )} - + ); } } From f8661e7ebb9cb5afc56440af2bc87ccd5d3fb7dd Mon Sep 17 00:00:00 2001 From: oleh Date: Tue, 6 Jun 2023 16:20:40 +0300 Subject: [PATCH 046/826] Migrate MoneyRequestParticipantsSplitSelector.js to function component --- .../MoneyRequestParticipantsSplitSelector.js | 218 ++++++++---------- 1 file changed, 100 insertions(+), 118 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 28bdc2365622..134f35ff2682 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React, {useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; @@ -59,37 +59,32 @@ const defaultProps = { safeAreaPaddingBottomStyle: {}, }; -class MoneyRequestParticipantsSplitSelector extends Component { - constructor(props) { - super(props); - - this.toggleOption = this.toggleOption.bind(this); - this.finalizeParticipants = this.finalizeParticipants.bind(this); - this.updateOptionsWithSearchTerm = this.updateOptionsWithSearchTerm.bind(this); +function MoneyRequestParticipantsSplitSelector(props) { + const [searchTerm, setSearchTerm] = useState(''); + const [newChatOptions, setNewChatOptions] = useState({ + recentReports: [], + personalDetails: [], + userToInvite: null, + }); + function updateOptionsWithSearchTerm (newSearchTerm = '') { const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( props.reports, props.personalDetails, props.betas, - '', + newSearchTerm, props.participants, CONST.EXPENSIFY_EMAILS, ); - - this.state = { - searchTerm: '', + setSearchTerm(newSearchTerm); + setNewChatOptions({ recentReports, personalDetails, - userToInvite, - }; + userToInvite + }); } - componentDidUpdate(prevProps) { - if (_.isEqual(prevProps.reports, this.props.reports) && _.isEqual(prevProps.personalDetails, this.props.personalDetails)) { - return; - } - this.updateOptionsWithSearchTerm(this.state.searchTerm); - } + const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; /** * Returns the sections needed for the OptionsSelector @@ -97,145 +92,132 @@ class MoneyRequestParticipantsSplitSelector extends Component { * @param {Boolean} maxParticipantsReached * @returns {Array} */ - getSections(maxParticipantsReached) { - const sections = []; + const sections = useMemo(() => { + const newSections = []; let indexOffset = 0; - sections.push({ + newSections.push({ title: undefined, - data: this.props.participants, + data: props.participants, shouldShow: true, indexOffset, }); - indexOffset += this.props.participants.length; + indexOffset += props.participants.length; if (maxParticipantsReached) { - return sections; + return newSections; } - sections.push({ - title: this.props.translate('common.recents'), - data: this.state.recentReports, - shouldShow: !_.isEmpty(this.state.recentReports), + const { + recentReports, + personalDetails, + userToInvite + } = newChatOptions; + + newSections.push({ + title: props.translate('common.recents'), + data: recentReports, + shouldShow: !_.isEmpty(recentReports), indexOffset, }); - indexOffset += this.state.recentReports.length; + indexOffset += recentReports.length; - sections.push({ - title: this.props.translate('common.contacts'), - data: this.state.personalDetails, - shouldShow: !_.isEmpty(this.state.personalDetails), + newSections.push({ + title: props.translate('common.contacts'), + data: personalDetails, + shouldShow: !_.isEmpty(personalDetails), indexOffset, }); - indexOffset += this.state.personalDetails.length; + indexOffset += personalDetails.length; - if (this.state.userToInvite && !OptionsListUtils.isCurrentUser(this.state.userToInvite)) { - sections.push({ + if (userToInvite && !OptionsListUtils.isCurrentUser(userToInvite)) { + newSections.push({ undefined, - data: [this.state.userToInvite], + data: [userToInvite], shouldShow: true, indexOffset, }); } - return sections; - } - - updateOptionsWithSearchTerm(searchTerm = '') { - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - this.props.reports, - this.props.personalDetails, - this.props.betas, - searchTerm, - this.props.participants, - CONST.EXPENSIFY_EMAILS, - ); - this.setState({ - searchTerm, - userToInvite, - recentReports, - personalDetails, - }); - } - - /** - * Once a single or more users are selected, navigates to next step - */ - finalizeParticipants() { - this.props.onStepComplete(); - } + return newSections; + }, [props.translate, props.participants, newChatOptions, maxParticipantsReached]) /** * Removes a selected option from list if already selected. If not already selected add this option to the list. * @param {Object} option */ - toggleOption(option) { - const isOptionInList = _.some(this.props.participants, (selectedOption) => selectedOption.login === option.login); + function toggleOption(option) { + const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.login === option.login); let newSelectedOptions; if (isOptionInList) { - newSelectedOptions = _.reject(this.props.participants, (selectedOption) => selectedOption.login === option.login); + newSelectedOptions = _.reject(props.participants, (selectedOption) => selectedOption.login === option.login); } else { - newSelectedOptions = [...this.props.participants, option]; + newSelectedOptions = [...props.participants, option]; } - this.props.onAddParticipants(newSelectedOptions); - - this.setState((prevState) => { - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - this.props.reports, - this.props.personalDetails, - this.props.betas, - isOptionInList ? prevState.searchTerm : '', - newSelectedOptions, - CONST.EXPENSIFY_EMAILS, - ); - return { - recentReports, - personalDetails, - userToInvite, - searchTerm: isOptionInList ? prevState.searchTerm : '', - }; + const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( + props.reports, + props.personalDetails, + props.betas, + isOptionInList ? searchTerm : '', + newSelectedOptions, + CONST.EXPENSIFY_EMAILS, + ); + + setNewChatOptions({ + recentReports, + personalDetails, + userToInvite }); + props.onAddParticipants(newSelectedOptions) } - render() { - const maxParticipantsReached = this.props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; - const sections = this.getSections(maxParticipantsReached); - const headerMessage = OptionsListUtils.getHeaderMessage( - this.state.personalDetails.length + this.state.recentReports.length !== 0, - Boolean(this.state.userToInvite), - this.state.searchTerm, - maxParticipantsReached, - ); - const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(this.props.personalDetails); - - return ( - 0 ? this.props.safeAreaPaddingBottomStyle : {}]}> - - - ); + /** + * Once a single or more users are selected, navigates to next step + */ + function finalizeParticipants() { + props.onStepComplete(); } -} + + const headerMessage = OptionsListUtils.getHeaderMessage( + newChatOptions.personalDetails.length + newChatOptions.recentReports.length !== 0, + Boolean(newChatOptions.userToInvite), + searchTerm, + maxParticipantsReached, + ); + const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); + + useEffect(() => { + updateOptionsWithSearchTerm(searchTerm); + }, [props.reports, props.personalDetails, searchTerm]) + + return ( + 0 ? props.safeAreaPaddingBottomStyle : {}]}> + + + ); +}; MoneyRequestParticipantsSplitSelector.propTypes = propTypes; MoneyRequestParticipantsSplitSelector.defaultProps = defaultProps; +MoneyRequestParticipantsSplitSelector.displayName = 'MoneyRequestParticipantsSplitSelector'; export default compose( withLocalize, From 5cfcd993cc591f53c65017220fa506e5746b25a9 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 6 Jun 2023 16:35:23 -0400 Subject: [PATCH 047/826] PR comments --- src/components/EmojiPicker/EmojiPicker.js | 100 +++++++++++----------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 6fea7300463a..fe9ccaee7e07 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -1,4 +1,4 @@ -import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle} from 'react'; +import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle, useCallback} from 'react'; import {Dimensions, Keyboard} from 'react-native'; import _ from 'underscore'; import EmojiPickerMenu from './EmojiPickerMenu'; @@ -10,26 +10,41 @@ const DEFAULT_ANCHOR_ORIGIN = { vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, }; +function measureEmojiPopoverAnchorPosition(anchorComponent) { + return new Promise((resolve) => { + if (!anchorComponent) { + return resolve({horizontal: 0, vertical: 0}); + } + anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + }); +} + const EmojiPicker = forwardRef((props, ref) => { const [isEmojiPickerVisible, setIsEmojiPickerVisible] = useState(false); const [emojiPopoverAnchorPosition, setEmojiPopoverAnchorPosition] = useState({ horizontal: 0, vertical: 0, }); - const [emojiPopoverAnchorOrigin, setEmojiPopoverAnchorOrigin] = useState(DEFAULT_ANCHOR_ORIGIN); - const [onModalHide, setOnModalHide] = useState(() => {}); - const [onEmojiSelected, setOnEmojiSelected] = useState(() => {}); - const [emojiPopoverAnchor, setEmojiPopoverAnchor] = useState(null); + const emojiPopoverAnchorOrigin = useRef(DEFAULT_ANCHOR_ORIGIN); + const emojiPopoverAnchor = useRef(null); + const onModalHide = useRef(() => {}); + const onEmojiSelected = useRef(() => {}); const emojiSearchInput = useRef(); - function measureEmojiPopoverAnchorPosition(anchorComponent) { - return new Promise((resolve) => { - if (!anchorComponent) { - return resolve({horizontal: 0, vertical: 0}); - } - anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + useEffect(() => { + if (isEmojiPickerVisible) { + Keyboard.dismiss(); + } + + const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => { + measureEmojiPopoverAnchorPosition(emojiPopoverAnchor.current).then((value) => { + setEmojiPopoverAnchorPosition(value); + }); }); - } + return () => { + emojiPopoverDimensionListener.remove(); + }; + }, [isEmojiPickerVisible]); /** * Show the emoji picker menu. @@ -40,61 +55,46 @@ const EmojiPicker = forwardRef((props, ref) => { * @param {Object} [anchorOrigin=DEFAULT_ANCHOR_ORIGIN] - Anchor origin for Popover * @param {Function} [onWillShow=() => {}] - Run a callback when Popover will show */ - function showEmojiPicker(onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) { - setOnModalHide(() => onModalHideValue); - setOnEmojiSelected(() => onEmojiSelectedValue); - setEmojiPopoverAnchor(emojiPopoverAnchorValue); + const showEmojiPicker = useCallback((onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) => { + onModalHide.current = onModalHideValue; + onEmojiSelected.current = onEmojiSelectedValue; + emojiPopoverAnchor.current = emojiPopoverAnchorValue; - if (emojiPopoverAnchorValue) { + if (emojiPopoverAnchor.current) { // Drop focus to avoid blue focus ring. - emojiPopoverAnchorValue.blur(); + emojiPopoverAnchor.current.blur(); } - measureEmojiPopoverAnchorPosition(emojiPopoverAnchorValue).then((value) => { + measureEmojiPopoverAnchorPosition(emojiPopoverAnchor.current).then((value) => { onWillShow(); setIsEmojiPickerVisible(true); setEmojiPopoverAnchorPosition(value); - setEmojiPopoverAnchorOrigin(anchorOrigin || DEFAULT_ANCHOR_ORIGIN); + emojiPopoverAnchorOrigin.current = anchorOrigin || DEFAULT_ANCHOR_ORIGIN; }); - } - - useEffect(() => { - if (isEmojiPickerVisible) { - Keyboard.dismiss(); - } - - const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => { - measureEmojiPopoverAnchorPosition(emojiPopoverAnchor).then((value) => { - setEmojiPopoverAnchorPosition(value); - }); - }); - return () => { - emojiPopoverDimensionListener.remove(); - }; - }, [isEmojiPickerVisible, emojiPopoverAnchor]); + }); /** * Hide the emoji picker menu. * * @param {Boolean} isNavigating */ - const hideEmojiPicker = (isNavigating) => { + const hideEmojiPicker = useCallback((isNavigating) => { if (isNavigating) { - setOnModalHide(() => {}); + onModalHide.current = () => {}; } - setEmojiPopoverAnchor(null); + emojiPopoverAnchor.current = null; setIsEmojiPickerVisible(false); - }; + }); /** * Focus the search input in the emoji picker. */ - const focusEmojiSearchInput = () => { + const focusEmojiSearchInput = useCallback(() => { if (!emojiSearchInput.current) { return; } emojiSearchInput.current.focus(); - }; + }); /** * Callback for the emoji picker to add whatever emoji is chosen into the main input @@ -102,20 +102,20 @@ const EmojiPicker = forwardRef((props, ref) => { * @param {String} emoji * @param {Object} emojiObject */ - const selectEmoji = (emoji, emojiObject) => { + const selectEmoji = useCallback((emoji, emojiObject) => { // Prevent fast click / multiple emoji selection; // The first click will hide the emoji picker by calling the hideEmojiPicker() function - // and in that function the emojiPopoverAnchor prop to will be set to null (synchronously) + // and in that function the emojiPopoverAnchor ref to will be set to null (synchronously) // thus we rely on that prop to prevent fast click / multiple emoji selection - if (!emojiPopoverAnchor) { + if (!emojiPopoverAnchor.current) { return; } hideEmojiPicker(); - if (_.isFunction(onEmojiSelected)) { - onEmojiSelected(emoji, emojiObject); + if (_.isFunction(onEmojiSelected.current)) { + onEmojiSelected.current(emoji, emojiObject); } - }; + }); useImperativeHandle(ref, () => ({showEmojiPicker})); @@ -126,7 +126,7 @@ const EmojiPicker = forwardRef((props, ref) => { isVisible={isEmojiPickerVisible} onClose={hideEmojiPicker} onModalShow={focusEmojiSearchInput} - onModalHide={onModalHide} + onModalHide={onModalHide.current} hideModalContentWhileAnimating shouldSetModalVisibility={false} animationInTiming={1} @@ -139,7 +139,7 @@ const EmojiPicker = forwardRef((props, ref) => { width: CONST.EMOJI_PICKER_SIZE.WIDTH, height: CONST.EMOJI_PICKER_SIZE.HEIGHT, }} - anchorAlignment={emojiPopoverAnchorOrigin} + anchorAlignment={emojiPopoverAnchorOrigin.current} > Date: Wed, 7 Jun 2023 00:01:13 +0300 Subject: [PATCH 048/826] Fixed lint issues --- ios/Podfile.lock | 6 +-- .../MoneyRequestParticipantsSplitSelector.js | 48 +++++++++---------- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6cb4235c58c8..c6c8ee0b4dce 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1019,7 +1019,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1062,7 +1062,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1135,4 +1135,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.12.0 +COCOAPODS: 1.11.3 diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 134f35ff2682..ad4925e5893d 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -1,4 +1,4 @@ -import React, {useEffect, useMemo, useState} from 'react'; +import React, {useEffect, useState} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; @@ -67,32 +67,13 @@ function MoneyRequestParticipantsSplitSelector(props) { userToInvite: null, }); - function updateOptionsWithSearchTerm (newSearchTerm = '') { - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - props.reports, - props.personalDetails, - props.betas, - newSearchTerm, - props.participants, - CONST.EXPENSIFY_EMAILS, - ); - setSearchTerm(newSearchTerm); - setNewChatOptions({ - recentReports, - personalDetails, - userToInvite - }); - } - - const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; - /** * Returns the sections needed for the OptionsSelector * * @param {Boolean} maxParticipantsReached * @returns {Array} */ - const sections = useMemo(() => { + const getSections = (maxParticipantsReached) => { const newSections = []; let indexOffset = 0; @@ -140,13 +121,13 @@ function MoneyRequestParticipantsSplitSelector(props) { } return newSections; - }, [props.translate, props.participants, newChatOptions, maxParticipantsReached]) + } /** * Removes a selected option from list if already selected. If not already selected add this option to the list. * @param {Object} option */ - function toggleOption(option) { + const toggleOption = (option) => { const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.login === option.login); let newSelectedOptions; @@ -177,10 +158,11 @@ function MoneyRequestParticipantsSplitSelector(props) { /** * Once a single or more users are selected, navigates to next step */ - function finalizeParticipants() { + const finalizeParticipants = () => { props.onStepComplete(); } + const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; const headerMessage = OptionsListUtils.getHeaderMessage( newChatOptions.personalDetails.length + newChatOptions.recentReports.length !== 0, Boolean(newChatOptions.userToInvite), @@ -189,9 +171,23 @@ function MoneyRequestParticipantsSplitSelector(props) { ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); + const sections = getSections(maxParticipantsReached); + useEffect(() => { - updateOptionsWithSearchTerm(searchTerm); - }, [props.reports, props.personalDetails, searchTerm]) + const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( + props.reports, + props.personalDetails, + props.betas, + searchTerm, + props.participants, + CONST.EXPENSIFY_EMAILS, + ); + setNewChatOptions({ + recentReports, + personalDetails, + userToInvite + }); + }, [props.betas, props.reports, props.participants, props.personalDetails, searchTerm]) return ( 0 ? props.safeAreaPaddingBottomStyle : {}]}> From 5c551088f19e51831d781e615a8bc8350caa3659 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 6 Jun 2023 17:01:17 -0400 Subject: [PATCH 049/826] Remove useCallbacks because we're using refs --- src/components/EmojiPicker/EmojiPicker.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index fe9ccaee7e07..160f6f2cd1fe 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -1,4 +1,4 @@ -import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle, useCallback} from 'react'; +import React, {useState, useEffect, useRef, forwardRef, useImperativeHandle} from 'react'; import {Dimensions, Keyboard} from 'react-native'; import _ from 'underscore'; import EmojiPickerMenu from './EmojiPickerMenu'; @@ -55,7 +55,7 @@ const EmojiPicker = forwardRef((props, ref) => { * @param {Object} [anchorOrigin=DEFAULT_ANCHOR_ORIGIN] - Anchor origin for Popover * @param {Function} [onWillShow=() => {}] - Run a callback when Popover will show */ - const showEmojiPicker = useCallback((onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) => { + const showEmojiPicker = (onModalHideValue, onEmojiSelectedValue, emojiPopoverAnchorValue, anchorOrigin, onWillShow = () => {}) => { onModalHide.current = onModalHideValue; onEmojiSelected.current = onEmojiSelectedValue; emojiPopoverAnchor.current = emojiPopoverAnchorValue; @@ -71,30 +71,30 @@ const EmojiPicker = forwardRef((props, ref) => { setEmojiPopoverAnchorPosition(value); emojiPopoverAnchorOrigin.current = anchorOrigin || DEFAULT_ANCHOR_ORIGIN; }); - }); + }; /** * Hide the emoji picker menu. * * @param {Boolean} isNavigating */ - const hideEmojiPicker = useCallback((isNavigating) => { + const hideEmojiPicker = (isNavigating) => { if (isNavigating) { onModalHide.current = () => {}; } emojiPopoverAnchor.current = null; setIsEmojiPickerVisible(false); - }); + }; /** * Focus the search input in the emoji picker. */ - const focusEmojiSearchInput = useCallback(() => { + const focusEmojiSearchInput = () => { if (!emojiSearchInput.current) { return; } emojiSearchInput.current.focus(); - }); + }; /** * Callback for the emoji picker to add whatever emoji is chosen into the main input @@ -102,7 +102,7 @@ const EmojiPicker = forwardRef((props, ref) => { * @param {String} emoji * @param {Object} emojiObject */ - const selectEmoji = useCallback((emoji, emojiObject) => { + const selectEmoji = (emoji, emojiObject) => { // Prevent fast click / multiple emoji selection; // The first click will hide the emoji picker by calling the hideEmojiPicker() function // and in that function the emojiPopoverAnchor ref to will be set to null (synchronously) @@ -115,7 +115,7 @@ const EmojiPicker = forwardRef((props, ref) => { if (_.isFunction(onEmojiSelected.current)) { onEmojiSelected.current(emoji, emojiObject); } - }); + }; useImperativeHandle(ref, () => ({showEmojiPicker})); From 0b66de41bff8c8b06acd1c00e769e2726cbb18a0 Mon Sep 17 00:00:00 2001 From: oleh Date: Wed, 7 Jun 2023 00:12:00 +0300 Subject: [PATCH 050/826] Revert podfile.lock --- ios/Podfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c6c8ee0b4dce..0ba0e5d249ee 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1019,7 +1019,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1062,7 +1062,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 + RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1135,4 +1135,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 \ No newline at end of file From e10cd886530beb97a88b2ee7780d83ca417bdfca Mon Sep 17 00:00:00 2001 From: oleh Date: Wed, 7 Jun 2023 00:14:07 +0300 Subject: [PATCH 051/826] Fix --- ios/Podfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 0ba0e5d249ee..6cb4235c58c8 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1135,4 +1135,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.12.0 \ No newline at end of file +COCOAPODS: 1.12.0 From c26fdb9334e6acb5c5cd4f6e8a6a72393ef495ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Wed, 7 Jun 2023 10:00:28 +0200 Subject: [PATCH 052/826] fix usage of useCallback --- src/components/TextInput/BaseTextInput.js | 95 ++++++++++------------- 1 file changed, 39 insertions(+), 56 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 80f8ca128421..2208abb38890 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -78,25 +78,6 @@ function BaseTextInput(props) { }; }, [props.autoFocus, props.disableKeyboard, props.shouldDelayFocus]); - const propIsDisabled = props.disabled; - const propOnPress = props.onPress; - const onPress = useCallback( - (event) => { - if (propIsDisabled) { - return; - } - - if (propOnPress) { - propOnPress(event); - } - - if (!event.isDefaultPrevented()) { - input.current.focus(); - } - }, - [propIsDisabled, propOnPress], - ); - const animateLabel = useCallback( (translateY, scale) => { Animated.parallel([ @@ -133,33 +114,39 @@ function BaseTextInput(props) { isLabelActive.current = false; }, [animateLabel, props.forceActiveLabel, props.prefixCharacter, inputValue]); - const propOnFocus = props.onFocus; - const onFocus = useCallback( - (event) => { - if (propOnFocus) { - propOnFocus(event); - } - setIsFocused(true); - }, - [propOnFocus], - ); + const onFocus = (event) => { + if (props.onFocus) { + props.onFocus(event); + } + setIsFocused(true); + }; - const propOnBlur = props.onBlur; - const onBlur = useCallback( - (event) => { - if (propOnBlur) { - propOnBlur(event); - } - setIsFocused(false); + const onBlur = (event) => { + if (props.onBlur) { + props.onBlur(event); + } + setIsFocused(false); - // If the text has been supplied by Chrome autofill, the value state is not synced with the value - // as Chrome doesn't trigger a change event. When there is autofill text, don't deactivate label. - if (!isInputAutoFilled(input.current)) { - deactivateLabel(); - } - }, - [deactivateLabel, propOnBlur], - ); + // If the text has been supplied by Chrome autofill, the value state is not synced with the value + // as Chrome doesn't trigger a change event. When there is autofill text, don't deactivate label. + if (!isInputAutoFilled(input.current)) { + deactivateLabel(); + } + }; + + const onPress = (event) => { + if (props.disabled) { + return; + } + + if (props.onPress) { + props.onPress(event); + } + + if (!event.isDefaultPrevented()) { + input.current.focus(); + } + }; const onLayout = useCallback( (event) => { @@ -190,25 +177,21 @@ function BaseTextInput(props) { } }, [activateLabel, deactivateLabel, inputValue, isFocused]); - const propOnInputChange = props.onInputChange; /** * Set Value & activateLabel * * @param {String} value * @memberof BaseTextInput */ - const setValue = useCallback( - (value) => { - if (propOnInputChange) { - propOnInputChange(value); - } + const setValue = (value) => { + if (props.onInputChange) { + props.onInputChange(value); + } - // TODO: what is the next line used for? - Str.result(props.onChangeText, value); - activateLabel(); - }, - [activateLabel, propOnInputChange, props.onChangeText], - ); + // TODO: what is the next line used for? + Str.result(props.onChangeText, value); + activateLabel(); + }; const togglePasswordVisibility = useCallback(() => { setPasswordHidden((prevState) => !prevState.passwordHidden); From 0c50bdaf1ebc36290873ea364b8f7381cd85a37e Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Wed, 7 Jun 2023 10:14:25 -0400 Subject: [PATCH 053/826] Move calculateAnchorPosition to component utils --- src/components/EmojiPicker/EmojiPicker.js | 14 +++----------- src/libs/ComponentUtils/index.js | 17 ++++++++++++++++- src/libs/ComponentUtils/index.native.js | 17 ++++++++++++++++- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 160f6f2cd1fe..0bcd214bc287 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -4,21 +4,13 @@ import _ from 'underscore'; import EmojiPickerMenu from './EmojiPickerMenu'; import CONST from '../../CONST'; import PopoverWithMeasuredContent from '../PopoverWithMeasuredContent'; +import * as ComponentUtils from '../../libs/ComponentUtils'; const DEFAULT_ANCHOR_ORIGIN = { horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, }; -function measureEmojiPopoverAnchorPosition(anchorComponent) { - return new Promise((resolve) => { - if (!anchorComponent) { - return resolve({horizontal: 0, vertical: 0}); - } - anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); - }); -} - const EmojiPicker = forwardRef((props, ref) => { const [isEmojiPickerVisible, setIsEmojiPickerVisible] = useState(false); const [emojiPopoverAnchorPosition, setEmojiPopoverAnchorPosition] = useState({ @@ -37,7 +29,7 @@ const EmojiPicker = forwardRef((props, ref) => { } const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => { - measureEmojiPopoverAnchorPosition(emojiPopoverAnchor.current).then((value) => { + ComponentUtils.calculateAnchorPosition(emojiPopoverAnchor.current).then((value) => { setEmojiPopoverAnchorPosition(value); }); }); @@ -65,7 +57,7 @@ const EmojiPicker = forwardRef((props, ref) => { emojiPopoverAnchor.current.blur(); } - measureEmojiPopoverAnchorPosition(emojiPopoverAnchor.current).then((value) => { + ComponentUtils.calculateAnchorPosition(emojiPopoverAnchor.current).then((value) => { onWillShow(); setIsEmojiPickerVisible(true); setEmojiPopoverAnchorPosition(value); diff --git a/src/libs/ComponentUtils/index.js b/src/libs/ComponentUtils/index.js index 319926911c67..892756490a96 100644 --- a/src/libs/ComponentUtils/index.js +++ b/src/libs/ComponentUtils/index.js @@ -5,4 +5,19 @@ const PASSWORD_AUTOCOMPLETE_TYPE = 'current-password'; const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'new-password'; const ACCESSIBILITY_ROLE_FORM = 'form'; -export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; +/** + * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. + * + * @param anchorComponent + * @return {Promise} + */ +function calculateAnchorPosition(anchorComponent) { + return new Promise((resolve) => { + if (!anchorComponent) { + return resolve({horizontal: 0, vertical: 0}); + } + anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + }); +} + +export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE, calculateAnchorPosition}; diff --git a/src/libs/ComponentUtils/index.native.js b/src/libs/ComponentUtils/index.native.js index ed38345cbe2b..d5d48c96a94a 100644 --- a/src/libs/ComponentUtils/index.native.js +++ b/src/libs/ComponentUtils/index.native.js @@ -2,4 +2,19 @@ const PASSWORD_AUTOCOMPLETE_TYPE = 'password'; const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'password-new'; const ACCESSIBILITY_ROLE_FORM = 'none'; -export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; +/** + * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. + * + * @param anchorComponent + * @return {Promise} + */ +function calculateAnchorPosition(anchorComponent) { + return new Promise((resolve) => { + if (!anchorComponent) { + return resolve({horizontal: 0, vertical: 0}); + } + anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + }); +} + +export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE, calculateAnchorPosition}; From fc364667e787fff07679baec68731f8d1ce472be Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Wed, 7 Jun 2023 11:03:35 -0400 Subject: [PATCH 054/826] JS Doc --- src/libs/ComponentUtils/index.js | 2 +- src/libs/ComponentUtils/index.native.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ComponentUtils/index.js b/src/libs/ComponentUtils/index.js index 892756490a96..8fc484f1768e 100644 --- a/src/libs/ComponentUtils/index.js +++ b/src/libs/ComponentUtils/index.js @@ -8,7 +8,7 @@ const ACCESSIBILITY_ROLE_FORM = 'form'; /** * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. * - * @param anchorComponent + * @param {Element} anchorComponent * @return {Promise} */ function calculateAnchorPosition(anchorComponent) { diff --git a/src/libs/ComponentUtils/index.native.js b/src/libs/ComponentUtils/index.native.js index d5d48c96a94a..20a511bf2f51 100644 --- a/src/libs/ComponentUtils/index.native.js +++ b/src/libs/ComponentUtils/index.native.js @@ -5,7 +5,7 @@ const ACCESSIBILITY_ROLE_FORM = 'none'; /** * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. * - * @param anchorComponent + * @param {Element} anchorComponent * @return {Promise} */ function calculateAnchorPosition(anchorComponent) { From a75802f4c84f55cf13f9a215e8b2a8fe4cf1b24a Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Wed, 7 Jun 2023 20:34:31 +0530 Subject: [PATCH 055/826] fix linting issues --- src/pages/NewChatPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index ce5b11c703ad..80e39422821b 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -216,7 +216,7 @@ function NewChatPage(props) { )} ); -}; +} NewChatPage.propTypes = propTypes; NewChatPage.defaultProps = defaultProps; From 34ac7e3147a1e24c438d4d0243834af36ef783c3 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Wed, 7 Jun 2023 16:10:23 +0100 Subject: [PATCH 056/826] fix report route --- src/pages/home/sidebar/SidebarLinks.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index a072402a4ca3..e25ce1ce4c30 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -71,9 +71,6 @@ const propTypes = { login: PropTypes.string, }), - /** Current reportID from the route in react navigation state object */ - reportIDFromRoute: PropTypes.string, - /** Whether we are viewing below the responsive breakpoint */ isSmallScreenWidth: PropTypes.bool.isRequired, @@ -91,7 +88,6 @@ const defaultProps = { currentUserPersonalDetails: { avatar: '', }, - reportIDFromRoute: '', priorityMode: CONST.PRIORITY_MODE.DEFAULT, }; @@ -148,7 +144,7 @@ class SidebarLinks extends React.Component { render() { const isLoading = _.isEmpty(this.props.personalDetails) || _.isEmpty(this.props.chatReports); - const optionListItems = SidebarUtils.getOrderedReportIDs(this.props.reportIDFromRoute); + const optionListItems = SidebarUtils.getOrderedReportIDs(this.props.currentReportID); const skeletonPlaceholder = ; @@ -213,7 +209,7 @@ class SidebarLinks extends React.Component { option.toString() === this.props.currentReportId)} + focusedIndex={_.findIndex(optionListItems, (option) => option.toString() === this.props.currentReportID)} onSelectRow={this.showReportPage} shouldDisableFocusOptions={this.props.isSmallScreenWidth} optionMode={this.props.priorityMode === CONST.PRIORITY_MODE.GSD ? CONST.OPTION_MODE.COMPACT : CONST.OPTION_MODE.DEFAULT} @@ -302,7 +298,7 @@ export default compose( withCurrentUserPersonalDetails, withNavigationFocus, withWindowDimensions, - withCurrentReportId, + withCurrentReportID, withNavigation, withOnyx({ // Note: It is very important that the keys subscribed to here are the same From 7a4d38c13884c548b28d1472d54a3b9502e512b7 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Wed, 7 Jun 2023 16:13:03 +0100 Subject: [PATCH 057/826] Use proper naming convention for ID --- src/App.js | 4 +-- src/components/withCurrentReportId.js | 36 +++++++++++++------------- src/libs/Navigation/NavigationRoot.js | 6 ++--- src/pages/home/sidebar/SidebarLinks.js | 2 +- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/App.js b/src/App.js index 2b47d8ddcd28..0829eb53f94c 100644 --- a/src/App.js +++ b/src/App.js @@ -17,7 +17,7 @@ import SafeArea from './components/SafeArea'; import * as Environment from './libs/Environment/Environment'; import {WindowDimensionsProvider} from './components/withWindowDimensions'; import {KeyboardStateProvider} from './components/withKeyboardState'; -import {CurrentReportIdContextProvider} from './components/withCurrentReportId'; +import {CurrentReportIDContextProvider} from './components/withCurrentReportID'; // For easier debugging and development, when we are in web we expose Onyx to the window, so you can more easily set data into Onyx if (window && Environment.isDevelopment()) { @@ -45,7 +45,7 @@ const App = () => ( HTMLEngineProvider, WindowDimensionsProvider, KeyboardStateProvider, - CurrentReportIdContextProvider, + CurrentReportIDContextProvider, PickerStateProvider, ]} > diff --git a/src/components/withCurrentReportId.js b/src/components/withCurrentReportId.js index d05ac2f1bce8..10c0423e410e 100644 --- a/src/components/withCurrentReportId.js +++ b/src/components/withCurrentReportId.js @@ -4,30 +4,30 @@ import PropTypes from 'prop-types'; import getComponentDisplayName from '../libs/getComponentDisplayName'; import Navigation from '../libs/Navigation/Navigation'; -const CurrentReportIdContext = createContext(null); +const CurrentReportIDContext = createContext(null); -const withCurrentReportIdPropTypes = { +const withCurrentReportIDPropTypes = { /** Actual content wrapped by this component */ children: PropTypes.node.isRequired, }; -class CurrentReportIdContextProvider extends React.Component { +class CurrentReportIDContextProvider extends React.Component { constructor(props) { super(props); this.state = { - currentReportId: '', + currentReportID: '', }; } /** * The context this component exposes to child components - * @returns {Object} currentReportId to share between central pane and LHN + * @returns {Object} currentReportID to share between central pane and LHN */ getContextValue() { return { - updateCurrentReportId: this.updateCurrentReportId.bind(this), - currentReportId: this.state.currentReportId, + updateCurrentReportID: this.updateCurrentReportID.bind(this), + currentReportID: this.state.currentReportID, }; } @@ -35,20 +35,20 @@ class CurrentReportIdContextProvider extends React.Component { * @param {Object} state * @returns {String} */ - updateCurrentReportId(state) { - return this.setState({currentReportId: Navigation.getTopmostReportId(state)}); + updateCurrentReportID(state) { + return this.setState({currentReportID: Navigation.getTopmostReportId(state)}); } render() { - return {this.props.children}; + return {this.props.children}; } } -CurrentReportIdContextProvider.propTypes = withCurrentReportIdPropTypes; +CurrentReportIDContextProvider.propTypes = withCurrentReportIDPropTypes; -export default function withCurrentReportId(WrappedComponent) { - const WithCurrentReportId = forwardRef((props, ref) => ( - +export default function withCurrentReportID(WrappedComponent) { + const WithCurrentReportID = forwardRef((props, ref) => ( + {(translateUtils) => ( )} - + )); - WithCurrentReportId.displayName = `withCurrentReportId(${getComponentDisplayName(WrappedComponent)})`; + WithCurrentReportID.displayName = `withCurrentReportID(${getComponentDisplayName(WrappedComponent)})`; - return WithCurrentReportId; + return WithCurrentReportID; } -export {withCurrentReportIdPropTypes, CurrentReportIdContextProvider}; +export {withCurrentReportIDPropTypes, CurrentReportIDContextProvider}; diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 5d60d1e4d2fb..d2c17cb177c5 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -8,7 +8,7 @@ import AppNavigator from './AppNavigator'; import themeColors from '../../styles/themes/default'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; import Log from '../Log'; -import withCurrentReportId from '../../components/withCurrentReportId'; +import withCurrentReportID from '../../components/withCurrentReportID'; import compose from '../compose'; // https://reactnavigation.org/docs/themes @@ -57,7 +57,7 @@ const NavigationRoot = (props) => { const updateSavedNavigationStateAndLogRoute = (state) => { navigationStateRef.current = state; - props.updateCurrentReportId(state); + props.updateCurrentReportID(state); parseAndLogRoute(state); }; @@ -81,4 +81,4 @@ const NavigationRoot = (props) => { NavigationRoot.displayName = 'NavigationRoot'; NavigationRoot.propTypes = propTypes; -export default compose(withWindowDimensions, withCurrentReportId)(NavigationRoot); +export default compose(withWindowDimensions, withCurrentReportID)(NavigationRoot); diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index e25ce1ce4c30..7c9e05023a3c 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -28,7 +28,7 @@ import SidebarUtils from '../../../libs/SidebarUtils'; import reportPropTypes from '../../reportPropTypes'; import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; import withNavigationFocus from '../../../components/withNavigationFocus'; -import withCurrentReportId from '../../../components/withCurrentReportId'; +import withCurrentReportID from '../../../components/withCurrentReportID'; import withNavigation, {withNavigationPropTypes} from '../../../components/withNavigation'; import Header from '../../../components/Header'; import defaultTheme from '../../../styles/themes/default'; From e158f67f89d0ffa9018227530968a7776ba74ffb Mon Sep 17 00:00:00 2001 From: Georgia Monahan <38015950+grgia@users.noreply.github.com> Date: Wed, 7 Jun 2023 16:17:40 +0100 Subject: [PATCH 058/826] Rename withCurrentReportId.js to withCurrentReportID.js git command line has a bug with case renames. --- src/components/{withCurrentReportId.js => withCurrentReportID.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/components/{withCurrentReportId.js => withCurrentReportID.js} (100%) diff --git a/src/components/withCurrentReportId.js b/src/components/withCurrentReportID.js similarity index 100% rename from src/components/withCurrentReportId.js rename to src/components/withCurrentReportID.js From 657ec67928cbe473f8d9ddeefa00c5914790b33d Mon Sep 17 00:00:00 2001 From: Francois Laithier Date: Wed, 7 Jun 2023 14:22:28 -0400 Subject: [PATCH 059/826] PR comments - Consolidate into a single `useEffect` with empty array dependency, to only run once on initial render - Change `useCallback` function into a regular function --- .../settings/Payments/TransferBalancePage.js | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/src/pages/settings/Payments/TransferBalancePage.js b/src/pages/settings/Payments/TransferBalancePage.js index a7b4bcf44aa3..15b9346756d9 100644 --- a/src/pages/settings/Payments/TransferBalancePage.js +++ b/src/pages/settings/Payments/TransferBalancePage.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useCallback, useEffect} from 'react'; +import React, {useEffect} from 'react'; import {View, ScrollView} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; @@ -90,7 +90,7 @@ function TransferBalancePage(props) { * Get the selected/default payment method account for wallet transfer * @returns {Object|undefined} */ - const getSelectedPaymentMethodAccount = useCallback(() => { + function getSelectedPaymentMethodAccount() { const paymentMethods = PaymentUtils.formatPaymentMethods(props.bankAccountList, props.cardList); const defaultAccount = _.find(paymentMethods, (method) => method.isDefault); @@ -99,26 +99,12 @@ function TransferBalancePage(props) { (method) => method.accountType === props.walletTransfer.selectedAccountType && method.methodID === props.walletTransfer.selectedAccountID, ); return selectedAccount || defaultAccount; - }, [props.bankAccountList, props.cardList, props.walletTransfer.selectedAccountType, props.walletTransfer.selectedAccountID]); - - useEffect(() => { - // Reset to the default account when the page is opened - PaymentMethods.resetWalletTransferData(); - }, []); - - useEffect(() => { - const selectedAccount = getSelectedPaymentMethodAccount(); - if (!selectedAccount || !selectedAccount.isDefault) { - return; - } - - PaymentMethods.saveWalletTransferAccountTypeAndID(selectedAccount.accountType, selectedAccount.methodID); - }, [getSelectedPaymentMethodAccount]); + } /** * @param {String} filterPaymentMethodType */ - const navigateToChooseTransferAccount = (filterPaymentMethodType) => { + function navigateToChooseTransferAccount(filterPaymentMethodType) { PaymentMethods.saveWalletTransferMethodType(filterPaymentMethodType); // If we only have a single option for the given paymentMethodType do not force the user to make a selection @@ -132,7 +118,20 @@ function TransferBalancePage(props) { } Navigation.navigate(ROUTES.SETTINGS_PAYMENTS_CHOOSE_TRANSFER_ACCOUNT); - }; + } + + useEffect(() => { + // Reset to the default account when the page is opened + PaymentMethods.resetWalletTransferData(); + + const selectedAccount = getSelectedPaymentMethodAccount(); + if (!selectedAccount) { + return; + } + + PaymentMethods.saveWalletTransferAccountTypeAndID(selectedAccount.accountType, selectedAccount.methodID); + // eslint-disable-next-line react-hooks/exhaustive-deps -- we only want this effect to run on initial render + }, []); if (props.walletTransfer.shouldShowSuccess && !props.walletTransfer.loading) { return ( From 7b00c12f563da5c5e7bc350589e8b3506f5191a3 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Mon, 5 Jun 2023 14:57:04 +0300 Subject: [PATCH 060/826] Add `REPORT_ATTACHMENT` route --- src/ROUTES.js | 2 + .../HTMLRenderers/ImageRenderer.js | 41 ++++++++----------- .../Navigation/AppNavigator/AuthScreens.js | 10 +++++ src/libs/Navigation/linkingConfig.js | 2 + 4 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/ROUTES.js b/src/ROUTES.js index bd0ad304c2f5..ad8608593614 100644 --- a/src/ROUTES.js +++ b/src/ROUTES.js @@ -68,6 +68,8 @@ export default { getReportRoute: (reportID) => `r/${reportID}`, REPORT_WITH_ID_DETAILS_SHARE_CODE: 'r/:reportID/details/shareCode', getReportShareCodeRoute: (reportID) => `r/${reportID}/details/shareCode`, + REPORT_ATTACHMENT: 'r/:reportID/attachment', + getReportAttachmentRoute: (reportID, source) => `r/${reportID}/attachment?source=${encodeURI(source)}`, SELECT_YEAR: 'select-year', getYearSelectionRoute: (minYear, maxYear, currYear, backTo) => `select-year?min=${minYear}&max=${maxYear}&year=${currYear}&backTo=${backTo}`, diff --git a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js index 4342b86ec6f2..15ca2bee58f8 100644 --- a/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js +++ b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js @@ -1,6 +1,6 @@ import React from 'react'; +import Navigation from '../../../libs/Navigation/Navigation'; import htmlRendererPropTypes from './htmlRendererPropTypes'; -import AttachmentModal from '../../AttachmentModal'; import styles from '../../../styles/styles'; import ThumbnailImage from '../../ThumbnailImage'; import PressableWithoutFocus from '../../PressableWithoutFocus'; @@ -8,6 +8,7 @@ import CONST from '../../../CONST'; import {ShowContextMenuContext, showContextMenuForReport} from '../../ShowContextMenuContext'; import tryResolveUrlFromApiRoot from '../../../libs/tryResolveUrlFromApiRoot'; import * as ReportUtils from '../../../libs/ReportUtils'; +import ROUTES from '../../../ROUTES'; const ImageRenderer = (props) => { const htmlAttribs = props.tnode.attributes; @@ -30,7 +31,6 @@ const ImageRenderer = (props) => { // control and thus require no authToken to verify access. // const isAttachment = Boolean(htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE]); - const originalFileName = htmlAttribs['data-name']; // Files created/uploaded/hosted by App should resolve from API ROOT. Other URLs aren't modified const previewSource = tryResolveUrlFromApiRoot(htmlAttribs.src); @@ -51,29 +51,22 @@ const ImageRenderer = (props) => { ) : ( {({anchor, report, action, checkIfContextMenuActive}) => ( - { + const route = ROUTES.getReportAttachmentRoute(report.reportID, source); + Navigation.navigate(route); + }} + onLongPress={(event) => showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))} > - {({show}) => ( - showContextMenuForReport(event, anchor, report.reportID, action, checkIfContextMenuActive, ReportUtils.isArchivedRoom(report))} - > - - - )} - + + )} ); diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index 8539f384504c..385290943299 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -261,6 +261,16 @@ class AuthScreens extends React.Component { component={RightModalNavigator} listeners={modalScreenListeners} /> + + { + const ReportAttachments = require('../../../pages/home/report/ReportAttachments').default; + return ReportAttachments; + }} + listeners={modalScreenListeners} + /> ); } diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 666506ca1ab8..a8c1e8abdeff 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -23,6 +23,7 @@ export default { [NAVIGATORS.CENTRAL_PANE_NAVIGATOR]: { screens: { [SCREENS.REPORT]: ROUTES.REPORT_WITH_ID, + Report_Attachments: ROUTES.REPORT_ATTACHMENT, }, }, [NAVIGATORS.FULL_SCREEN_NAVIGATOR]: { @@ -340,6 +341,7 @@ export default { }, }, }, + [SCREENS.NOT_FOUND]: '*', }, }, }; From 1aec799a831efdd4ffca27d2900d52f6c90f8095 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Mon, 5 Jun 2023 15:44:32 +0300 Subject: [PATCH 061/826] Update parent modal attachment state The Carousel already updates the parent component this way, when attachments change Updating it here allows the parent component to not need `isAuthenticated` and `originalFileName` for the initial image source provided, since they are obtained here as well --- src/components/AttachmentCarousel/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index 778044586172..ed80bce87697 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -177,6 +177,9 @@ class AttachmentCarousel extends React.Component { throw new Error('Attachment not found'); } + // Update the parent modal's state with the source and name from the mapped attachments + this.props.onNavigate(attachments[page]); + return { page, attachments, From eb3e0924db1b8bb7d5a0a1f9959fee548d54b6e8 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Mon, 5 Jun 2023 16:12:39 +0300 Subject: [PATCH 062/826] AttachmentModal: add `defaultOpen` prop --- src/components/AttachmentModal.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index b29c910e83e4..e56fa19590e6 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -36,6 +36,9 @@ const propTypes = { /** Optional callback to fire when we want to preview an image and approve it for use. */ onConfirm: PropTypes.func, + /** Whether the modal should be open by default */ + defaultOpen: PropTypes.bool, + /** Optional callback to fire when we want to do something after modal show. */ onModalShow: PropTypes.func, @@ -68,6 +71,7 @@ const propTypes = { const defaultProps = { source: '', onConfirm: null, + defaultOpen: false, originalFileName: '', isAuthTokenRequired: false, allowDownload: false, @@ -82,7 +86,7 @@ class AttachmentModal extends PureComponent { super(props); this.state = { - isModalOpen: false, + isModalOpen: this.props.defaultOpen, shouldLoadAttachment: false, isAttachmentInvalid: false, isAuthTokenRequired: props.isAuthTokenRequired, From 2c758a4b7511f095760f6b49ffc387b6a8187b2d Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Mon, 5 Jun 2023 16:16:34 +0300 Subject: [PATCH 063/826] AttachmentModal: make passing `children` optional --- src/components/AttachmentModal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index e56fa19590e6..71e479b71dc5 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -49,7 +49,7 @@ const propTypes = { originalFileName: PropTypes.string, /** A function as a child to pass modal launching methods to */ - children: PropTypes.func.isRequired, + children: PropTypes.func, /** Whether source url requires authentication */ isAuthTokenRequired: PropTypes.bool, @@ -73,6 +73,7 @@ const defaultProps = { onConfirm: null, defaultOpen: false, originalFileName: '', + children: null, isAuthTokenRequired: false, allowDownload: false, headerTitle: null, @@ -341,7 +342,7 @@ class AttachmentModal extends PureComponent { shouldShowCancelButton={false} /> - {this.props.children({ + {this.props.children && this.props.children({ displayFileInModal: this.validateAndDisplayFileToUpload, show: () => { this.setState({isModalOpen: true}); From 236df33afb4d3ef60ad8a503f26bcecab133c3b8 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Mon, 5 Jun 2023 16:18:46 +0300 Subject: [PATCH 064/826] Add `src/pages/home/report/ReportAttachments.js` modal screen --- src/pages/home/report/ReportAttachments.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/pages/home/report/ReportAttachments.js diff --git a/src/pages/home/report/ReportAttachments.js b/src/pages/home/report/ReportAttachments.js new file mode 100644 index 000000000000..217028841c83 --- /dev/null +++ b/src/pages/home/report/ReportAttachments.js @@ -0,0 +1,37 @@ +import React from 'react'; +import _ from 'underscore'; +import PropTypes from 'prop-types'; +import AttachmentModal from '../../../components/AttachmentModal'; +import Navigation from '../../../libs/Navigation/Navigation'; + +const propTypes = { + /** Navigation route context info provided by react navigation */ + route: PropTypes.shape({ + /** Route specific parameters used on this screen */ + params: PropTypes.shape({ + /** The report ID which the attachment is associated with */ + reportID: PropTypes.string.isRequired, + /** The uri encoded source of the attachment */ + source: PropTypes.string.isRequired, + }).isRequired, + }).isRequired, +}; + +function ReportAttachments(props) { + const reportID = _.get(props, ['route', 'params', 'reportID']); + const source = decodeURI(_.get(props, ['route', 'params', 'source'])); + + return ( + + ); +} + +ReportAttachments.propTypes = propTypes; +ReportAttachments.displayName = 'ReportAttachments'; + +export default ReportAttachments; From 2b164e98521d41c83e38e40d4f124d96e63530e1 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Tue, 6 Jun 2023 22:05:47 +0300 Subject: [PATCH 065/826] Apply prettier on the changes --- src/components/AttachmentModal.js | 13 +++++++------ src/pages/home/report/ReportAttachments.js | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index 71e479b71dc5..a6022f4a8fce 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -342,12 +342,13 @@ class AttachmentModal extends PureComponent { shouldShowCancelButton={false} /> - {this.props.children && this.props.children({ - displayFileInModal: this.validateAndDisplayFileToUpload, - show: () => { - this.setState({isModalOpen: true}); - }, - })} + {this.props.children && + this.props.children({ + displayFileInModal: this.validateAndDisplayFileToUpload, + show: () => { + this.setState({isModalOpen: true}); + }, + })} ); } diff --git a/src/pages/home/report/ReportAttachments.js b/src/pages/home/report/ReportAttachments.js index 217028841c83..b591a8740a4e 100644 --- a/src/pages/home/report/ReportAttachments.js +++ b/src/pages/home/report/ReportAttachments.js @@ -27,7 +27,8 @@ function ReportAttachments(props) { defaultOpen reportID={reportID} source={source} - onModalHide={Navigation.dismissModal} /> + onModalHide={Navigation.dismissModal} + /> ); } From d2c07a2ad45bc76302b4017c5f49056200ec2196 Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 8 Jun 2023 16:28:01 +0700 Subject: [PATCH 066/826] Display displayName instead of primaryLogin in report preview --- src/components/ReportActionItem/ReportPreview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index e7ba7fde70d5..22aa7b6e509a 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -117,12 +117,12 @@ const ReportPreview = (props) => { {props.iouReport.hasOutstandingIOU ? ( - {lodashGet(message, 'html', props.translate('iou.payerOwesAmount', {payer: managerName, amount: reportAmount}))} + {props.translate('iou.payerOwesAmount', {payer: managerName, amount: reportAmount})} ) : ( - {lodashGet(message, 'html', props.translate('iou.payerSettled', {amount: reportAmount}))} + {props.translate('iou.payerSettled', {amount: reportAmount})} {!props.iouReport.hasOutstandingIOU && ( From 5e1b4c79ba5ace0852e087fdc55e42a944127c49 Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 8 Jun 2023 17:49:07 +0700 Subject: [PATCH 067/826] Show report preview action in LHN --- src/libs/ReportActionsUtils.js | 9 +++++++++ src/libs/ReportUtils.js | 6 ++++-- src/libs/SidebarUtils.js | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index c255760f5d87..7d44f89cc9aa 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -56,6 +56,14 @@ function isMoneyRequestAction(reportAction) { return lodashGet(reportAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.IOU; } +/** + * @param {Object} reportAction + * @returns {Boolean} + */ +function isReportReviewAction(reportAction) { + return lodashGet(reportAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; +} + /** * @param {Object} reportAction * @returns {Boolean} @@ -423,4 +431,5 @@ export { isTransactionThread, getFormattedAmount, isSentMoneyReportAction, + isReportReviewAction, }; diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 790f827ae989..e3abd7b36dff 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -970,11 +970,12 @@ function getPolicyExpenseChatName(report) { * Get the title for a IOU or expense chat which will be showing the payer and the amount * * @param {Object} report + * @param {Boolean} [shouldUseDisplayNameShortForm] * @returns {String} */ -function getMoneyRequestReportName(report) { +function getMoneyRequestReportName(report, shouldUseDisplayNameShortForm = false) { const formattedAmount = CurrencyUtils.convertToDisplayString(getMoneyRequestTotal(report), report.currency); - const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail); + const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail, shouldUseDisplayNameShortForm); return Localize.translateLocal(report.hasOutstandingIOU ? 'iou.payerOwesAmount' : 'iou.payerPaidAmount', {payer: payerName, amount: formattedAmount}); } @@ -2241,4 +2242,5 @@ export { getMoneyRequestAction, getBankAccountRoute, getParentReport, + getMoneyRequestReportName, }; diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 87e8b97d0bd0..fa8333d86941 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -269,6 +269,9 @@ function getOptionData(reportID) { let lastMessageTextFromReport = ''; if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; + } else if (ReportActionsUtils.isReportReviewAction(lastReportActions[report.reportID])) { + const iouReport = ReportUtils.getReport(report.iouReportID); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportName(iouReport, true); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; } From 4338186b6503ea64700aaee32dccfa560d3af45e Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 8 Jun 2023 17:49:35 +0700 Subject: [PATCH 068/826] Refactor code using existing util to display money request message --- .../ReportActionItem/ReportPreview.js | 33 ++++++++----------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 22aa7b6e509a..2c39261deabf 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -95,11 +95,10 @@ const defaultProps = { }; const ReportPreview = (props) => { - const reportAmount = CurrencyUtils.convertToDisplayString(ReportUtils.getMoneyRequestTotal(props.iouReport), props.iouReport.currency); const managerEmail = props.iouReport.managerEmail || ''; - const managerName = ReportUtils.isPolicyExpenseChat(props.chatReport) ? ReportUtils.getPolicyName(props.chatReport) : ReportUtils.getDisplayNameForParticipant(managerEmail, true); const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); + const displayingMessage = ReportUtils.getMoneyRequestReportName(props.iouReport, true) return ( {_.map(props.action.message, (message, index) => ( @@ -115,26 +114,20 @@ const ReportPreview = (props) => { focusable > - {props.iouReport.hasOutstandingIOU ? ( + - {props.translate('iou.payerOwesAmount', {payer: managerName, amount: reportAmount})} + {displayingMessage} - ) : ( - - - {props.translate('iou.payerSettled', {amount: reportAmount})} - - {!props.iouReport.hasOutstandingIOU && ( - - - - )} - - )} + {!props.iouReport.hasOutstandingIOU && ( + + + + )} + Date: Thu, 8 Jun 2023 18:02:12 +0700 Subject: [PATCH 069/826] Fix linter --- src/components/ReportActionItem/ReportPreview.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 2c39261deabf..ba99e89a3526 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -16,7 +16,6 @@ import ControlSelection from '../../libs/ControlSelection'; import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; import {showContextMenuForReport} from '../ShowContextMenuContext'; import * as StyleUtils from '../../styles/StyleUtils'; -import * as CurrencyUtils from '../../libs/CurrencyUtils'; import * as ReportUtils from '../../libs/ReportUtils'; import Navigation from '../../libs/Navigation/Navigation'; import ROUTES from '../../ROUTES'; From 3b8bb486e571d2ae49668577d4a3d06e90340c4f Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 8 Jun 2023 18:11:37 +0700 Subject: [PATCH 070/826] Fix linter --- src/components/ReportActionItem/ReportPreview.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index ba99e89a3526..267fce89d16c 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -97,7 +97,7 @@ const ReportPreview = (props) => { const managerEmail = props.iouReport.managerEmail || ''; const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); - const displayingMessage = ReportUtils.getMoneyRequestReportName(props.iouReport, true) + const displayingMessage = ReportUtils.getMoneyRequestReportName(props.iouReport, true); return ( {_.map(props.action.message, (message, index) => ( @@ -114,9 +114,7 @@ const ReportPreview = (props) => { > - - {displayingMessage} - + {displayingMessage} {!props.iouReport.hasOutstandingIOU && ( Date: Thu, 8 Jun 2023 23:55:39 +0300 Subject: [PATCH 071/826] disable the rule for lint. --- src/pages/ValidateLoginPage/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 832b1eec3c8c..9b0b833bead4 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -65,6 +65,7 @@ function ValidateLoginPage(props) { } else { User.validateLogin(accountID, validateCode); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); return ; From 20618fbad6ff73c80a13126ea8a648ac2f377fbd Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 9 Jun 2023 15:06:21 +0100 Subject: [PATCH 072/826] only use Android conversation notification style for rooms --- .../customairshipextender/CustomNotificationProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index ae6d23c6101e..307201e73ba6 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -183,7 +183,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil String message = messageData.get("message").getList().get(0).getMap().get("text").getString(); String roomName = payload.get("roomName") == null ? "" : payload.get("roomName").getString(""); - String conversationTitle = roomName.isEmpty() ? "Chat with " + name : roomName; +// String conversationTitle = roomName.isEmpty() ? "Chat with " + name : roomName; // Retrieve or create the Person object who sent the latest report comment Person person = notificationCache.people.get(accountID); @@ -205,8 +205,8 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil // Create the messaging style notification builder for this notification, associating the // notification with the person who sent the report comment. NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) - .setGroupConversation(notificationCache.people.size() > 2 || !roomName.isEmpty()) - .setConversationTitle(conversationTitle); + .setGroupConversation(!roomName.isEmpty()) + .setConversationTitle(roomName); // Add all conversation messages to the notification, including the last one we just received. for (NotificationCache.Message cachedMessage : notificationCache.messages) { From c0757787de17b196b6d1f895988e9b81d79aeabe Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 9 Jun 2023 15:28:14 +0100 Subject: [PATCH 073/826] always enable conversation notifications, but disable the title for non-rooms --- .../chat/customairshipextender/CustomNotificationProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index 307201e73ba6..bc4e555a43ba 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -205,7 +205,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil // Create the messaging style notification builder for this notification, associating the // notification with the person who sent the report comment. NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) - .setGroupConversation(!roomName.isEmpty()) + .setGroupConversation(true) .setConversationTitle(roomName); // Add all conversation messages to the notification, including the last one we just received. From 35b3f79d09f34518bee78388e7aad2121fdd0926 Mon Sep 17 00:00:00 2001 From: oleh Date: Fri, 9 Jun 2023 17:42:43 +0300 Subject: [PATCH 074/826] added translate per reviewer request --- .../MoneyRequestParticipantsSplitSelector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index ad4925e5893d..575b374fa75c 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -187,7 +187,7 @@ function MoneyRequestParticipantsSplitSelector(props) { personalDetails, userToInvite }); - }, [props.betas, props.reports, props.participants, props.personalDetails, searchTerm]) + }, [props.betas, props.reports, props.participants, props.personalDetails, props.translate, searchTerm]) return ( 0 ? props.safeAreaPaddingBottomStyle : {}]}> From f24386a6e3a72d35deaecaaddc6cc7015c39eed0 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 9 Jun 2023 16:23:30 +0100 Subject: [PATCH 075/826] add notification logging --- .../CustomNotificationProvider.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index bc4e555a43ba..4fb1bbb97008 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -87,6 +87,7 @@ public CustomNotificationProvider(@NonNull Context context, @NonNull AirshipConf protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @NonNull NotificationCompat.Builder builder, @NonNull NotificationArguments arguments) { super.onExtendBuilder(context, builder, arguments); PushMessage message = arguments.getMessage(); + Log.d(TAG, "buildNotification: " + message.toString()); // Improve notification delivery by categorising as a time-critical message builder.setCategory(CATEGORY_MESSAGE); @@ -102,10 +103,10 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @ if (message.containsKey(PAYLOAD_KEY)) { try { JsonMap payload = JsonValue.parseString(message.getExtra(PAYLOAD_KEY)).optMap(); - + Log.d(TAG, "message contains payload: " + payload); if (payload.containsKey(ONYX_DATA_KEY)) { Objects.requireNonNull(payload.get(ONYX_DATA_KEY)).isNull(); - + Log.d(TAG, "payload contains onxyData"); applyMessageStyle(context, builder, payload, arguments.getNotificationId()); } } catch (Exception e) { @@ -171,6 +172,11 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil } NotificationCache notificationCache = findOrCreateNotificationCache(reportID); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { + notificationCache.messages.forEach(message -> { + Log.d(TAG, "messageCache: " + message.toString()); + }); + } try { JsonMap reportMap = payload.get("onyxData").getList().get(1).getMap().get("value").getMap(); From 0c13f0254aa473611f6448dbba0371c0f2889bf4 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Fri, 9 Jun 2023 11:31:21 -0400 Subject: [PATCH 076/826] DRY up code --- src/components/EmojiPicker/EmojiPicker.js | 6 +++--- src/libs/ComponentUtils/index.js | 17 +---------------- src/libs/ComponentUtils/index.native.js | 17 +---------------- src/libs/calculateAnchorPosition.js | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 35 deletions(-) create mode 100644 src/libs/calculateAnchorPosition.js diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 0a39afb4c0d7..58d32ad6a3fb 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -5,11 +5,11 @@ import EmojiPickerMenu from './EmojiPickerMenu'; import CONST from '../../CONST'; import styles from '../../styles/styles'; import PopoverWithMeasuredContent from '../PopoverWithMeasuredContent'; -import * as ComponentUtils from '../../libs/ComponentUtils'; import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions'; import withViewportOffsetTop, {viewportOffsetTopPropTypes} from '../withViewportOffsetTop'; import compose from '../../libs/compose'; import * as StyleUtils from '../../styles/StyleUtils'; +import calculateAnchorPosition from '../../libs/calculateAnchorPosition'; const DEFAULT_ANCHOR_ORIGIN = { horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.RIGHT, @@ -39,7 +39,7 @@ const EmojiPicker = forwardRef((props, ref) => { } const emojiPopoverDimensionListener = Dimensions.addEventListener('change', () => { - ComponentUtils.calculateAnchorPosition(emojiPopoverAnchor.current).then((value) => { + calculateAnchorPosition(emojiPopoverAnchor.current).then((value) => { setEmojiPopoverAnchorPosition(value); }); }); @@ -67,7 +67,7 @@ const EmojiPicker = forwardRef((props, ref) => { emojiPopoverAnchor.current.blur(); } - ComponentUtils.calculateAnchorPosition(emojiPopoverAnchor.current).then((value) => { + calculateAnchorPosition(emojiPopoverAnchor.current).then((value) => { onWillShow(); setIsEmojiPickerVisible(true); setEmojiPopoverAnchorPosition(value); diff --git a/src/libs/ComponentUtils/index.js b/src/libs/ComponentUtils/index.js index 8fc484f1768e..319926911c67 100644 --- a/src/libs/ComponentUtils/index.js +++ b/src/libs/ComponentUtils/index.js @@ -5,19 +5,4 @@ const PASSWORD_AUTOCOMPLETE_TYPE = 'current-password'; const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'new-password'; const ACCESSIBILITY_ROLE_FORM = 'form'; -/** - * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. - * - * @param {Element} anchorComponent - * @return {Promise} - */ -function calculateAnchorPosition(anchorComponent) { - return new Promise((resolve) => { - if (!anchorComponent) { - return resolve({horizontal: 0, vertical: 0}); - } - anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); - }); -} - -export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE, calculateAnchorPosition}; +export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; diff --git a/src/libs/ComponentUtils/index.native.js b/src/libs/ComponentUtils/index.native.js index 20a511bf2f51..ed38345cbe2b 100644 --- a/src/libs/ComponentUtils/index.native.js +++ b/src/libs/ComponentUtils/index.native.js @@ -2,19 +2,4 @@ const PASSWORD_AUTOCOMPLETE_TYPE = 'password'; const NEW_PASSWORD_AUTOCOMPLETE_TYPE = 'password-new'; const ACCESSIBILITY_ROLE_FORM = 'none'; -/** - * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. - * - * @param {Element} anchorComponent - * @return {Promise} - */ -function calculateAnchorPosition(anchorComponent) { - return new Promise((resolve) => { - if (!anchorComponent) { - return resolve({horizontal: 0, vertical: 0}); - } - anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); - }); -} - -export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE, calculateAnchorPosition}; +export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; diff --git a/src/libs/calculateAnchorPosition.js b/src/libs/calculateAnchorPosition.js new file mode 100644 index 000000000000..512f77612f52 --- /dev/null +++ b/src/libs/calculateAnchorPosition.js @@ -0,0 +1,14 @@ +/** + * Gets the x,y position of the passed in component for the purpose of anchoring another component to it. + * + * @param {Element} anchorComponent + * @return {Promise} + */ +export default function calculateAnchorPosition(anchorComponent) { + return new Promise((resolve) => { + if (!anchorComponent) { + return resolve({horizontal: 0, vertical: 0}); + } + anchorComponent.measureInWindow((x, y, width) => resolve({horizontal: x + width, vertical: y})); + }); +} From b47023eb336832b5d8076fa3c74933a20a2c6d08 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Fri, 9 Jun 2023 21:02:44 +0300 Subject: [PATCH 077/826] usePermissions custom hook --- src/pages/ValidateLoginPage/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 9b0b833bead4..aced500b2e01 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -7,7 +7,7 @@ import * as User from '../../libs/actions/User'; import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator'; import ONYXKEYS from '../../ONYXKEYS'; import * as Session from '../../libs/actions/Session'; -import Permissions from '../../libs/Permissions'; +import usePermissions from '../../hooks/usePermissions'; import Navigation from '../../libs/Navigation/Navigation'; import withLocalize from '../../components/withLocalize'; import CONST from '../../CONST'; @@ -47,6 +47,8 @@ const defaultProps = { }; function ValidateLoginPage(props) { + const {canUsePasswordlessLogins} = usePermissions(); + useEffect(() => { const login = lodashGet(props, 'credentials.login', null); const accountID = lodashGet(props.route.params, 'accountID', ''); @@ -54,7 +56,7 @@ function ValidateLoginPage(props) { // A fresh session will not have credentials.login and user permission betas available. // In that case, we directly allow users to go through password less flow - if (!login || Permissions.canUsePasswordlessLogins(props.betas)) { + if (!login || canUsePasswordlessLogins) { if (lodashGet(props, 'session.authToken')) { // If already signed in, do not show the validate code if not on web, // because we don't want to block the user with the interstitial page. From 9c177e52f6c458ee387ddf04d62374b81bee8e97 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Fri, 9 Jun 2023 21:17:49 +0300 Subject: [PATCH 078/826] Remove withLocalize --- src/pages/ValidateLoginPage/index.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index aced500b2e01..157c97d7056b 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -9,7 +9,6 @@ import ONYXKEYS from '../../ONYXKEYS'; import * as Session from '../../libs/actions/Session'; import usePermissions from '../../hooks/usePermissions'; import Navigation from '../../libs/Navigation/Navigation'; -import withLocalize from '../../components/withLocalize'; import CONST from '../../CONST'; import compose from '../../libs/compose'; @@ -76,11 +75,8 @@ function ValidateLoginPage(props) { ValidateLoginPage.propTypes = propTypes; ValidateLoginPage.defaultProps = defaultProps; -export default compose( - withLocalize, - withOnyx({ - betas: {key: ONYXKEYS.BETAS}, - credentials: {key: ONYXKEYS.CREDENTIALS}, - session: {key: ONYXKEYS.SESSION}, - }), -)(ValidateLoginPage); +export default withOnyx({ + betas: {key: ONYXKEYS.BETAS}, + credentials: {key: ONYXKEYS.CREDENTIALS}, + session: {key: ONYXKEYS.SESSION}, +})(ValidateLoginPage); From 707161f8a5b33872afae4aeb9f5789817bade7a5 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Fri, 9 Jun 2023 22:08:33 +0300 Subject: [PATCH 079/826] Make Lint happy --- src/pages/ValidateLoginPage/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 157c97d7056b..5894a04b40f2 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -10,15 +10,11 @@ import * as Session from '../../libs/actions/Session'; import usePermissions from '../../hooks/usePermissions'; import Navigation from '../../libs/Navigation/Navigation'; import CONST from '../../CONST'; -import compose from '../../libs/compose'; const propTypes = { /** The accountID and validateCode are passed via the URL */ route: validateLinkPropTypes, - /** List of betas available to current user */ - betas: PropTypes.arrayOf(PropTypes.string), - /** Session of currently logged in user */ session: PropTypes.shape({ /** Currently logged in user authToken */ @@ -76,7 +72,6 @@ ValidateLoginPage.propTypes = propTypes; ValidateLoginPage.defaultProps = defaultProps; export default withOnyx({ - betas: {key: ONYXKEYS.BETAS}, credentials: {key: ONYXKEYS.CREDENTIALS}, session: {key: ONYXKEYS.SESSION}, })(ValidateLoginPage); From b3b7cf0033bdb125fc907410483cf445b52a68bf Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Fri, 9 Jun 2023 22:14:26 +0300 Subject: [PATCH 080/826] I hate you Lint --- src/pages/ValidateLoginPage/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 5894a04b40f2..21d14c2bffac 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -33,7 +33,6 @@ const propTypes = { const defaultProps = { route: validateLinkDefaultProps, - betas: [], session: { authToken: null, }, From c1c14acf5e8020ecfa995a6ca0f4b2543115cdda Mon Sep 17 00:00:00 2001 From: tienifr Date: Sat, 10 Jun 2023 15:05:07 +0700 Subject: [PATCH 081/826] fix: unmatched parent report id and report action id --- src/libs/Navigation/Navigation.js | 4 +--- src/libs/ReportUtils.js | 5 ++--- src/pages/home/report/ContextMenu/ContextMenuActions.js | 4 ++-- src/pages/home/report/ReportActionItem.js | 2 +- src/pages/home/report/ReportActionItemParentAction.js | 9 ++++++++- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index d61eb7143de0..237de4aed570 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -175,9 +175,7 @@ function getReportIDFromRoute() { return ''; } - const drawerState = lodashGet(navigationRef.current.getState(), ['routes', 0, 'state']); - const reportRoute = lodashGet(drawerState, ['routes', 0]); - return lodashGet(reportRoute, ['params', 'reportID'], ''); + return lodashGet(navigationRef.current.getCurrentRoute(), ['params', 'reportID'], ''); } /** diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0d26ff733f7d..247da8cf02f5 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -525,11 +525,10 @@ function isThreadParent(reportAction) { * Returns true if reportAction is the first chat preview of a Thread * * @param {Object} reportAction - * @param {String} reportID * @returns {Boolean} */ -function isThreadFirstChat(reportAction, reportID) { - return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === reportID; +function isThreadFirstChat(reportAction) { + return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === Navigation.getReportIDFromRoute(); } /** diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index b5c9d6412a02..1982a5a847d9 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -118,8 +118,8 @@ export default [ icon: Expensicons.ChatBubble, successTextTranslateKey: '', successIcon: null, - shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => - type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID), + shouldShow: (type, reportAction) => + type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction), onPress: (closePopover, {reportAction, reportID}) => { Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); if (closePopover) { diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index e7c704fd8c8e..b1d9e5a0a690 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -320,7 +320,7 @@ function ReportActionItem(props) { const numberOfThreadReplies = _.get(props, ['action', 'childVisibleActionCount'], 0); const hasReplies = numberOfThreadReplies > 0; - const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !ReportUtils.isThreadFirstChat(props.action, props.report.reportID); + const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !ReportUtils.isThreadFirstChat(props.action); const oldestFourEmails = lodashGet(props.action, 'childOldestFourEmails', '').split(','); const draftMessageRightAlign = props.draftMessage ? styles.chatItemReactionsDraftRight : {}; diff --git a/src/pages/home/report/ReportActionItemParentAction.js b/src/pages/home/report/ReportActionItemParentAction.js index 9ce119494b56..c513d530e8ad 100644 --- a/src/pages/home/report/ReportActionItemParentAction.js +++ b/src/pages/home/report/ReportActionItemParentAction.js @@ -32,6 +32,9 @@ const propTypes = { /** The report currently being looked at */ report: reportPropTypes, + /** The parent report */ + parentReport: reportPropTypes, + /** The actions from the parent report */ // TO DO: Replace with HOC https://github.com/Expensify/App/issues/18769. parentReportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)), @@ -40,6 +43,7 @@ const propTypes = { }; const defaultProps = { report: {}, + parentReport: {}, parentReportActions: {}, shouldHideThreadDividerLine: false, }; @@ -62,7 +66,7 @@ const ReportActionItemParentAction = (props) => { {parentReportAction && ( `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, }, + parentReport: { + key: ({parentReportID}) => `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`, + }, parentReportActions: { key: ({parentReportID}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, canEvict: false, From 7a3f3f3fff1320e0159cb1d5c34e2d8ae87ab3c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 11:17:27 +0200 Subject: [PATCH 082/826] remove todo --- src/components/TextInput/BaseTextInput.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 2208abb38890..12206f82d163 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -188,7 +188,6 @@ function BaseTextInput(props) { props.onInputChange(value); } - // TODO: what is the next line used for? Str.result(props.onChangeText, value); activateLabel(); }; From 3886aaf84de1d827b3aa07a70ab2e50c43d1e9e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 11:19:10 +0200 Subject: [PATCH 083/826] use named import directly --- src/components/TextInput/BaseTextInput.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 12206f82d163..e55b81f78925 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -20,8 +20,6 @@ import FormHelpMessage from '../FormHelpMessage'; import isInputAutoFilled from '../../libs/isInputAutoFilled'; import * as Pressables from '../Pressable'; -const PressableWithoutFeedback = Pressables.PressableWithoutFeedback; - function dismissKeyboardWhenBackgrounded(nextAppState) { if (!nextAppState.match(/inactive|background/)) { return; @@ -225,7 +223,7 @@ function BaseTextInput(props) { return ( <> - - + {!_.isEmpty(inputHelpText) && ( Date: Mon, 12 Jun 2023 11:20:02 +0200 Subject: [PATCH 084/826] use function directly --- src/components/TextInput/BaseTextInput.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index e55b81f78925..2fc5c395981d 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -20,14 +20,6 @@ import FormHelpMessage from '../FormHelpMessage'; import isInputAutoFilled from '../../libs/isInputAutoFilled'; import * as Pressables from '../Pressable'; -function dismissKeyboardWhenBackgrounded(nextAppState) { - if (!nextAppState.match(/inactive|background/)) { - return; - } - - Keyboard.dismiss(); -} - function BaseTextInput(props) { const inputValue = props.value || ''; const initialActiveLabel = props.forceActiveLabel || inputValue.length > 0 || Boolean(props.prefixCharacter); @@ -48,7 +40,13 @@ function BaseTextInput(props) { useEffect(() => { let appStateSubscription; if (props.disableKeyboard) { - appStateSubscription = AppState.addEventListener('change', dismissKeyboardWhenBackgrounded); + appStateSubscription = AppState.addEventListener('change', (nextAppState) => { + if (!nextAppState.match(/inactive|background/)) { + return; + } + + Keyboard.dismiss(); + }); } // We are manually managing focus to prevent this issue: https://github.com/Expensify/App/issues/4514 From 21ded8cef5e59393745387b13972c116db89c277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 11:22:09 +0200 Subject: [PATCH 085/826] only autoFocus on mount --- src/components/TextInput/BaseTextInput.js | 24 +++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 2fc5c395981d..b30da00048b5 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -49,6 +49,17 @@ function BaseTextInput(props) { }); } + return () => { + if (!props.disableKeyboard || !appStateSubscription) { + return; + } + + appStateSubscription.remove(); + }; + }, [props.disableKeyboard]); + + // AutoFocus which only works on mount: + useEffect(() => { // We are manually managing focus to prevent this issue: https://github.com/Expensify/App/issues/4514 if (!props.autoFocus || !input.current) { return; @@ -62,17 +73,14 @@ function BaseTextInput(props) { input.current.focus(); return () => { - if (focusTimeout) { - clearTimeout(focusTimeout); - } - - if (!props.disableKeyboard || !appStateSubscription) { + if (!focusTimeout) { return; } - - appStateSubscription.remove(); + clearTimeout(focusTimeout); }; - }, [props.autoFocus, props.disableKeyboard, props.shouldDelayFocus]); + // We only want this to run on mount + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); const animateLabel = useCallback( (translateY, scale) => { From eb64012c6c9b1d852c2c446cab2f75e3c6dd5da8 Mon Sep 17 00:00:00 2001 From: tienifr Date: Mon, 12 Jun 2023 16:25:47 +0700 Subject: [PATCH 086/826] fix mark unread and copy link --- .../home/report/ContextMenu/ContextMenuActions.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 1982a5a847d9..6c1b79c3052d 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -208,10 +208,11 @@ export default [ const isAttachmentTarget = lodashGet(menuTarget, 'tagName') === 'IMG' && isAttachment; return Permissions.canUseCommentLinking(betas) && type === CONTEXT_MENU_TYPES.REPORT_ACTION && !isAttachmentTarget; }, - onPress: (closePopover, {reportAction, reportID}) => { + onPress: (closePopover, {reportAction}) => { Environment.getEnvironmentURL().then((environmentURL) => { const reportActionID = parseInt(lodashGet(reportAction, 'reportActionID'), 10); - Clipboard.setString(`${environmentURL}/r/${reportID}/${reportActionID}`); + const activeReportID = Navigation.getReportIDFromRoute(); + Clipboard.setString(`${environmentURL}/r/${activeReportID}/${reportActionID}`); }); hideContextMenu(true, ReportActionComposeFocusManager.focus); }, @@ -223,8 +224,9 @@ export default [ icon: Expensicons.Mail, successIcon: Expensicons.Checkmark, shouldShow: (type) => type === CONTEXT_MENU_TYPES.REPORT_ACTION, - onPress: (closePopover, {reportAction, reportID}) => { - Report.markCommentAsUnread(reportID, reportAction.created); + onPress: (closePopover, {reportAction}) => { + const activeReportID = Navigation.getReportIDFromRoute(); + Report.markCommentAsUnread(activeReportID, reportAction.created); if (closePopover) { hideContextMenu(true, ReportActionComposeFocusManager.focus); } From 68ee867dd2fb9af1a8ea75f064c291b7b7437690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 11:27:55 +0200 Subject: [PATCH 087/826] use stylesheet flatten --- src/components/TextInput/BaseTextInput.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index b30da00048b5..7038a4e321f9 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -204,7 +204,6 @@ function BaseTextInput(props) { setPrefixWidth(Math.abs(event.nativeEvent.layout.width)); }, []); - // TODO: don't do that all here? // eslint-disable-next-line react/forbid-foreign-prop-types const inputProps = _.omit(props, _.keys(baseTextInputPropTypes.propTypes)); const hasLabel = Boolean(props.label.length); @@ -212,18 +211,14 @@ function BaseTextInput(props) { const inputHelpText = props.errorText || props.hint; const placeholder = props.prefixCharacter || isFocused || !hasLabel || (hasLabel && props.forceActiveLabel) ? props.placeholder : null; const maxHeight = StyleSheet.flatten(props.containerStyles).maxHeight; - const textInputContainerStyles = _.reduce( - [ - styles.textInputContainer, - ...props.textInputContainerStyles, - props.autoGrow && StyleUtils.getWidthStyle(textInputWidth), - !props.hideFocusedState && isFocused && styles.borderColorFocus, - (props.hasError || props.errorText) && styles.borderColorDanger, - props.autoGrowHeight && {scrollPaddingTop: 2 * maxHeight}, - ], - (finalStyles, s) => ({...finalStyles, ...s}), - {}, - ); + const textInputContainerStyles = StyleSheet.flatten([ + styles.textInputContainer, + ...props.textInputContainerStyles, + props.autoGrow && StyleUtils.getWidthStyle(textInputWidth), + !props.hideFocusedState && isFocused && styles.borderColorFocus, + (props.hasError || props.errorText) && styles.borderColorDanger, + props.autoGrowHeight && {scrollPaddingTop: 2 * maxHeight}, + ]); const isMultiline = props.multiline || props.autoGrowHeight; return ( From 06906824a9bb591de978691146f6ba94863953c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Mon, 12 Jun 2023 11:33:25 +0200 Subject: [PATCH 088/826] Review changes --- src/components/Checkbox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index 9c14aee58162..551c956a802c 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -49,7 +49,7 @@ const defaultProps = { forwardedRef: undefined, children: null, onMouseDown: undefined, - accessibilityLabel: 'checkbox', + accessibilityLabel: '', }; class Checkbox extends React.Component { @@ -86,7 +86,7 @@ class Checkbox extends React.Component { onMouseDown={this.props.onMouseDown} ref={this.props.forwardedRef} onPressOut={this.onBlur} - style={[this.props.style, styles.userSelectNone]} + style={this.props.style} onKeyDown={this.handleSpaceKey} accessibilityRole="checkbox" accessibilityState={{ From d49e550617ae70a9e3733e503fd62461a4aad875 Mon Sep 17 00:00:00 2001 From: tienifr Date: Mon, 12 Jun 2023 17:20:17 +0700 Subject: [PATCH 089/826] get active report id --- src/libs/ReportUtils.js | 2 +- src/pages/home/report/ContextMenu/ContextMenuActions.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 247da8cf02f5..fe45a438c652 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -528,7 +528,7 @@ function isThreadParent(reportAction) { * @returns {Boolean} */ function isThreadFirstChat(reportAction) { - return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === Navigation.getReportIDFromRoute(); + return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === Navigation.getTopmostReportId(); } /** diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 6c1b79c3052d..a9fb24bdb23f 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -211,7 +211,7 @@ export default [ onPress: (closePopover, {reportAction}) => { Environment.getEnvironmentURL().then((environmentURL) => { const reportActionID = parseInt(lodashGet(reportAction, 'reportActionID'), 10); - const activeReportID = Navigation.getReportIDFromRoute(); + const activeReportID = Navigation.getTopmostReportId(); Clipboard.setString(`${environmentURL}/r/${activeReportID}/${reportActionID}`); }); hideContextMenu(true, ReportActionComposeFocusManager.focus); @@ -225,7 +225,7 @@ export default [ successIcon: Expensicons.Checkmark, shouldShow: (type) => type === CONTEXT_MENU_TYPES.REPORT_ACTION, onPress: (closePopover, {reportAction}) => { - const activeReportID = Navigation.getReportIDFromRoute(); + const activeReportID = Navigation.getTopmostReportId(); Report.markCommentAsUnread(activeReportID, reportAction.created); if (closePopover) { hideContextMenu(true, ReportActionComposeFocusManager.focus); From cb9cdab170de98aa742024849e1cc71228454778 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 11:35:55 +0100 Subject: [PATCH 090/826] switch from class to functional component --- src/pages/iou/IOUCurrencySelection.js | 233 +++++++++++++------------- 1 file changed, 115 insertions(+), 118 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 92a737295da2..5f8447661fe1 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React from 'react'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; @@ -56,125 +56,122 @@ const defaultProps = { }, }; -class IOUCurrencySelection extends Component { - constructor(props) { - super(props); - - this.state = { - searchValue: '', - currencyData: this.getCurrencyOptions(this.props.currencyList), - }; - this.getCurrencyOptions = this.getCurrencyOptions.bind(this); - this.getSections = this.getSections.bind(this); - this.confirmCurrencySelection = this.confirmCurrencySelection.bind(this); - this.changeSearchValue = this.changeSearchValue.bind(this); - } - - /** - * Returns the sections needed for the OptionsSelector - * - * @returns {Array} - */ - getSections() { - if (this.state.searchValue.trim() && !this.state.currencyData.length) { - return []; - } - const sections = []; - sections.push({ - title: this.props.translate('iOUCurrencySelection.allCurrencies'), - data: this.state.currencyData, - shouldShow: true, - indexOffset: 0, - }); - - return sections; - } - - getSelectedCurrencyCode() { - return lodashGet(this.props.route, 'params.currency', this.props.iou.selectedCurrencyCode); - } - - /** - * @returns {Object} - */ - getCurrencyOptions() { - return _.map(this.props.currencyList, (currencyInfo, currencyCode) => { - const isSelectedCurrency = currencyCode === this.getSelectedCurrencyCode(); - return { - text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, - currencyCode, - keyForList: currencyCode, - customIcon: isSelectedCurrency ? greenCheckmark : undefined, - boldStyle: isSelectedCurrency, - }; - }); - } - - /** - * Sets new search value - * @param {String} searchValue - * @return {void} - */ - changeSearchValue(searchValue) { - const currencyOptions = this.getCurrencyOptions(this.props.currencyList); - const searchRegex = new RegExp(Str.escapeForRegExp(searchValue), 'i'); - const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text)); - - this.setState({ - searchValue, - currencyData: filteredCurrencies, - }); - } - - /** - * Confirms the selection of currency - * - * @param {Object} option - * @param {String} option.currencyCode - */ - confirmCurrencySelection(option) { - const backTo = lodashGet(this.props.route, 'params.backTo', ''); - // When we refresh the web, the money request route gets cleared from the navigation stack. - // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. - // To prevent any negative experience, we have made the decision to simply close the currency selection page. - if (_.isEmpty(backTo) || this.props.navigation.getState().routes.length === 1) { - Navigation.goBack(); - } else { - Navigation.navigate(`${this.props.route.params.backTo}?currency=${option.currencyCode}`); - } - } - - render() { - const headerMessage = this.state.searchValue.trim() && !this.state.currencyData.length ? this.props.translate('common.noResultsFound') : ''; - return ( - - {({safeAreaPaddingBottomStyle}) => ( - <> - Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} - /> - currency.currencyCode === this.getSelectedCurrencyCode()), - 'keyForList', - )} - shouldHaveOptionSeparator - /> - - )} - - ); - } +const IOUCurrencySelection = (props) => { + this.state = { + searchValue: '', + currencyData: this.getCurrencyOptions(this.props.currencyList), + }; + this.getCurrencyOptions = this.getCurrencyOptions.bind(this); + this.getSections = this.getSections.bind(this); + this.confirmCurrencySelection = this.confirmCurrencySelection.bind(this); + this.changeSearchValue = this.changeSearchValue.bind(this); + + const headerMessage = this.state.searchValue.trim() && !this.state.currencyData.length ? this.props.translate('common.noResultsFound') : ''; + + return ( + + {({safeAreaPaddingBottomStyle}) => ( + <> + Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} + /> + currency.currencyCode === this.getSelectedCurrencyCode()), + 'keyForList', + )} + shouldHaveOptionSeparator + /> + + )} + + ); } + // /** + // * Returns the sections needed for the OptionsSelector + // * + // * @returns {Array} + // */ + // getSections() { + // if (this.state.searchValue.trim() && !this.state.currencyData.length) { + // return []; + // } + // const sections = []; + // sections.push({ + // title: this.props.translate('iOUCurrencySelection.allCurrencies'), + // data: this.state.currencyData, + // shouldShow: true, + // indexOffset: 0, + // }); + + // return sections; + // } + + // getSelectedCurrencyCode() { + // return lodashGet(this.props.route, 'params.currency', this.props.iou.selectedCurrencyCode); + // } + + // /** + // * @returns {Object} + // */ + // getCurrencyOptions() { + // return _.map(this.props.currencyList, (currencyInfo, currencyCode) => { + // const isSelectedCurrency = currencyCode === this.getSelectedCurrencyCode(); + // return { + // text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, + // currencyCode, + // keyForList: currencyCode, + // customIcon: isSelectedCurrency ? greenCheckmark : undefined, + // boldStyle: isSelectedCurrency, + // }; + // }); + // } + + // /** + // * Sets new search value + // * @param {String} searchValue + // * @return {void} + // */ + // changeSearchValue(searchValue) { + // const currencyOptions = this.getCurrencyOptions(this.props.currencyList); + // const searchRegex = new RegExp(Str.escapeForRegExp(searchValue), 'i'); + // const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text)); + + // this.setState({ + // searchValue, + // currencyData: filteredCurrencies, + // }); + // } + + // /** + // * Confirms the selection of currency + // * + // * @param {Object} option + // * @param {String} option.currencyCode + // */ + // confirmCurrencySelection(option) { + // const backTo = lodashGet(this.props.route, 'params.backTo', ''); + // // When we refresh the web, the money request route gets cleared from the navigation stack. + // // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. + // // To prevent any negative experience, we have made the decision to simply close the currency selection page. + // if (_.isEmpty(backTo) || this.props.navigation.getState().routes.length === 1) { + // Navigation.goBack(); + // } else { + // Navigation.navigate(`${this.props.route.params.backTo}?currency=${option.currencyCode}`); + // } + // } +// } + +IOUCurrencySelection.displayName = 'IOUCurrencySelection'; IOUCurrencySelection.propTypes = propTypes; IOUCurrencySelection.defaultProps = defaultProps; From 6491d6eb1ee5aa38a9d3b09dd163107a1c3acfa8 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 11:45:35 +0100 Subject: [PATCH 091/826] refactor props uses --- src/pages/iou/IOUCurrencySelection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 5f8447661fe1..da8fe7264c9a 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -59,7 +59,7 @@ const defaultProps = { const IOUCurrencySelection = (props) => { this.state = { searchValue: '', - currencyData: this.getCurrencyOptions(this.props.currencyList), + currencyData: this.getCurrencyOptions(props.currencyList), }; this.getCurrencyOptions = this.getCurrencyOptions.bind(this); this.getSections = this.getSections.bind(this); @@ -73,7 +73,7 @@ const IOUCurrencySelection = (props) => { {({safeAreaPaddingBottomStyle}) => ( <> Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} /> { onSelectRow={this.confirmCurrencySelection} value={this.state.searchValue} onChangeText={this.changeSearchValue} - textInputLabel={this.props.translate('common.search')} + textInputLabel={props.translate('common.search')} headerMessage={headerMessage} safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} initiallyFocusedOptionKey={_.get( From daf3b25fca63d6331c376b705a58fd67f3c273ca Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 11:46:25 +0100 Subject: [PATCH 092/826] migrate searchValue state to useState hook --- src/pages/iou/IOUCurrencySelection.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index da8fe7264c9a..e9249f86e632 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -57,16 +57,32 @@ const defaultProps = { }; const IOUCurrencySelection = (props) => { + const [searchValue, setCurrentSearchValue] = useState(''); this.state = { - searchValue: '', currencyData: this.getCurrencyOptions(props.currencyList), }; this.getCurrencyOptions = this.getCurrencyOptions.bind(this); this.getSections = this.getSections.bind(this); this.confirmCurrencySelection = this.confirmCurrencySelection.bind(this); - this.changeSearchValue = this.changeSearchValue.bind(this); - const headerMessage = this.state.searchValue.trim() && !this.state.currencyData.length ? this.props.translate('common.noResultsFound') : ''; + const getSections = useCallback(() => { + if (searchValue.trim() && !currencyData.length) { + return []; + } + const sections = []; + sections.push({ + title: this.props.translate('iOUCurrencySelection.allCurrencies'), + data: this.state.currencyData, + shouldShow: true, + indexOffset: 0, + }); + + return sections; + }, + [searchValue, currencyData.length], + ); + + const headerMessage = this.state.searchValue.trim() && !this.state.currencyData.length ? props.translate('common.noResultsFound') : ''; return ( @@ -80,7 +96,7 @@ const IOUCurrencySelection = (props) => { sections={this.getSections()} onSelectRow={this.confirmCurrencySelection} value={this.state.searchValue} - onChangeText={this.changeSearchValue} + onChangeText={setCurrentSearchValue} textInputLabel={props.translate('common.search')} headerMessage={headerMessage} safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} From 14b0a3cd07e1edc7116388b1d75396d1a8950637 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 12:03:11 +0100 Subject: [PATCH 093/826] refactor IOUCurrencySelection to use hooks --- src/pages/iou/IOUCurrencySelection.js | 78 +++++++++------------------ 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index e9249f86e632..52358b2926db 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useState, useCallback} from 'react'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; @@ -58,12 +58,11 @@ const defaultProps = { const IOUCurrencySelection = (props) => { const [searchValue, setCurrentSearchValue] = useState(''); - this.state = { - currencyData: this.getCurrencyOptions(props.currencyList), - }; - this.getCurrencyOptions = this.getCurrencyOptions.bind(this); - this.getSections = this.getSections.bind(this); - this.confirmCurrencySelection = this.confirmCurrencySelection.bind(this); + const [currencyData, setCurrencyData] = useState(getCurrencyOptions); + + const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode);; + + // this.confirmCurrencySelection = this.confirmCurrencySelection.bind(this); const getSections = useCallback(() => { if (searchValue.trim() && !currencyData.length) { @@ -79,8 +78,21 @@ const IOUCurrencySelection = (props) => { return sections; }, - [searchValue, currencyData.length], - ); + [searchValue, currencyData.length]); + + const getCurrencyOptions = useCallback(() => { + return _.map(props.currencyList, (currencyCode) => { + const isSelectedCurrency = currencyCode === selectedCurrencyCode; + return { + text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, + currencyCode, + keyForList: currencyCode, + customIcon: isSelectedCurrency ? greenCheckmark : undefined, + boldStyle: isSelectedCurrency, + }; + }) + }, + [currencyCode]); const headerMessage = this.state.searchValue.trim() && !this.state.currencyData.length ? props.translate('common.noResultsFound') : ''; @@ -93,15 +105,15 @@ const IOUCurrencySelection = (props) => { onBackButtonPress={() => Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} /> currency.currencyCode === this.getSelectedCurrencyCode()), + _.find(currencyData, (currency) => currency.currencyCode === selectedCurrencyCode), 'keyForList', )} shouldHaveOptionSeparator @@ -112,46 +124,6 @@ const IOUCurrencySelection = (props) => { ); } - // /** - // * Returns the sections needed for the OptionsSelector - // * - // * @returns {Array} - // */ - // getSections() { - // if (this.state.searchValue.trim() && !this.state.currencyData.length) { - // return []; - // } - // const sections = []; - // sections.push({ - // title: this.props.translate('iOUCurrencySelection.allCurrencies'), - // data: this.state.currencyData, - // shouldShow: true, - // indexOffset: 0, - // }); - - // return sections; - // } - - // getSelectedCurrencyCode() { - // return lodashGet(this.props.route, 'params.currency', this.props.iou.selectedCurrencyCode); - // } - - // /** - // * @returns {Object} - // */ - // getCurrencyOptions() { - // return _.map(this.props.currencyList, (currencyInfo, currencyCode) => { - // const isSelectedCurrency = currencyCode === this.getSelectedCurrencyCode(); - // return { - // text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, - // currencyCode, - // keyForList: currencyCode, - // customIcon: isSelectedCurrency ? greenCheckmark : undefined, - // boldStyle: isSelectedCurrency, - // }; - // }); - // } - // /** // * Sets new search value // * @param {String} searchValue From 341632621aa49d7655e77c40957ec255aab5e090 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 12:17:44 +0100 Subject: [PATCH 094/826] refactor IOUCurrencySelection function to hook --- src/pages/iou/IOUCurrencySelection.js | 76 +++++++++++++-------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 52358b2926db..12f03415f92b 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -57,12 +57,34 @@ const defaultProps = { }; const IOUCurrencySelection = (props) => { - const [searchValue, setCurrentSearchValue] = useState(''); - const [currencyData, setCurrencyData] = useState(getCurrencyOptions); - const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode);; - // this.confirmCurrencySelection = this.confirmCurrencySelection.bind(this); + const getCurrencyOptions = useCallback(() => _.map(props.currencyList, (currencyCode) => { + const isSelectedCurrency = currencyCode === selectedCurrencyCode; + return { + text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, + currencyCode, + keyForList: currencyCode, + customIcon: isSelectedCurrency ? greenCheckmark : undefined, + boldStyle: isSelectedCurrency, + }; + }), + [selectedCurrencyCode, props.currencyList]); + + const confirmCurrencySelection = useCallback((option) => { + const backTo = lodashGet(props.route, 'params.backTo', ''); + // When we refresh the web, the money request route gets cleared from the navigation stack. + // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. + // To prevent any negative experience, we have made the decision to simply close the currency selection page. + if (_.isEmpty(backTo) || props.navigation.getState().routes.length === 1) { + Navigation.goBack(); + } else { + Navigation.navigate(`${props.route.params.backTo}?currency=${option.currencyCode}`); + } + }, [props.route, props.navigation]); + + const [searchValue, setCurrentSearchValue] = useState(''); + const [currencyData, setCurrencyData] = useState(getCurrencyOptions); // just use a const? it doesn't seem to change... const getSections = useCallback(() => { if (searchValue.trim() && !currencyData.length) { @@ -70,8 +92,8 @@ const IOUCurrencySelection = (props) => { } const sections = []; sections.push({ - title: this.props.translate('iOUCurrencySelection.allCurrencies'), - data: this.state.currencyData, + title: props.translate('iOUCurrencySelection.allCurrencies'), + data: currencyData, shouldShow: true, indexOffset: 0, }); @@ -80,21 +102,7 @@ const IOUCurrencySelection = (props) => { }, [searchValue, currencyData.length]); - const getCurrencyOptions = useCallback(() => { - return _.map(props.currencyList, (currencyCode) => { - const isSelectedCurrency = currencyCode === selectedCurrencyCode; - return { - text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, - currencyCode, - keyForList: currencyCode, - customIcon: isSelectedCurrency ? greenCheckmark : undefined, - boldStyle: isSelectedCurrency, - }; - }) - }, - [currencyCode]); - - const headerMessage = this.state.searchValue.trim() && !this.state.currencyData.length ? props.translate('common.noResultsFound') : ''; + const headerMessage = searchValue.trim() && !currencyData.length ? props.translate('common.noResultsFound') : ''; return ( @@ -140,24 +148,16 @@ const IOUCurrencySelection = (props) => { // }); // } - // /** - // * Confirms the selection of currency - // * - // * @param {Object} option - // * @param {String} option.currencyCode - // */ - // confirmCurrencySelection(option) { - // const backTo = lodashGet(this.props.route, 'params.backTo', ''); - // // When we refresh the web, the money request route gets cleared from the navigation stack. - // // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. - // // To prevent any negative experience, we have made the decision to simply close the currency selection page. - // if (_.isEmpty(backTo) || this.props.navigation.getState().routes.length === 1) { - // Navigation.goBack(); - // } else { - // Navigation.navigate(`${this.props.route.params.backTo}?currency=${option.currencyCode}`); - // } + // // If we're coming from the confirm step, it means we were editing something so go back to the confirm step. + // const confirmIndex = _.indexOf(steps, Steps.MoneyRequestConfirm); + // if (previousStepIndex === confirmIndex) { + // navigateToStep(confirmIndex); + // return; // } -// } + + // setPreviousStepIndex(currentStepIndex); + // setCurrentStepIndex(currentStepIndex + 1); +// }, [currentStepIndex, previousStepIndex, navigateToStep, steps]); IOUCurrencySelection.displayName = 'IOUCurrencySelection'; IOUCurrencySelection.propTypes = propTypes; From 02d052285174afc09c79fadf0f0ad69bdfab5e1c Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 14:53:05 +0100 Subject: [PATCH 095/826] finish refactoring and formatting IOUCurrency page --- src/pages/iou/IOUCurrencySelection.js | 101 ++++++++++++-------------- 1 file changed, 45 insertions(+), 56 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 12f03415f92b..0f1331541cc0 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -56,32 +56,38 @@ const defaultProps = { }, }; -const IOUCurrencySelection = (props) => { - const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode);; - - const getCurrencyOptions = useCallback(() => _.map(props.currencyList, (currencyCode) => { - const isSelectedCurrency = currencyCode === selectedCurrencyCode; - return { - text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, - currencyCode, - keyForList: currencyCode, - customIcon: isSelectedCurrency ? greenCheckmark : undefined, - boldStyle: isSelectedCurrency, - }; - }), - [selectedCurrencyCode, props.currencyList]); - - const confirmCurrencySelection = useCallback((option) => { - const backTo = lodashGet(props.route, 'params.backTo', ''); - // When we refresh the web, the money request route gets cleared from the navigation stack. - // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. - // To prevent any negative experience, we have made the decision to simply close the currency selection page. - if (_.isEmpty(backTo) || props.navigation.getState().routes.length === 1) { - Navigation.goBack(); - } else { - Navigation.navigate(`${props.route.params.backTo}?currency=${option.currencyCode}`); - } - }, [props.route, props.navigation]); +function IOUCurrencySelection(props) { + const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode, CONST.CURRENCY.USD); + + const getCurrencyOptions = useCallback( + () => + _.map(props.currencyList, (currencyCode) => { + const isSelectedCurrency = currencyCode === selectedCurrencyCode; + return { + text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, + currencyCode, + keyForList: currencyCode, + customIcon: isSelectedCurrency ? greenCheckmark : undefined, + boldStyle: isSelectedCurrency, + }; + }), + [selectedCurrencyCode, props.currencyList], + ); + + const confirmCurrencySelection = useCallback( + (option) => { + const backTo = lodashGet(props.route, 'params.backTo', ''); + // When we refresh the web, the money request route gets cleared from the navigation stack. + // Navigating to "backTo" will result in forward navigation instead, causing disruption to the currency selection. + // To prevent any negative experience, we have made the decision to simply close the currency selection page. + if (_.isEmpty(backTo) || props.navigation.getState().routes.length === 1) { + Navigation.goBack(); + } else { + Navigation.navigate(`${props.route.params.backTo}?currency=${option.currencyCode}`); + } + }, + [props.route, props.navigation], + ); const [searchValue, setCurrentSearchValue] = useState(''); const [currencyData, setCurrencyData] = useState(getCurrencyOptions); // just use a const? it doesn't seem to change... @@ -99,8 +105,18 @@ const IOUCurrencySelection = (props) => { }); return sections; - }, - [searchValue, currencyData.length]); + }, [searchValue, currencyData, props]); + + const changeSearchValue = useCallback( + (searchQuery) => { + const searchRegex = new RegExp(Str.escapeForRegExp(searchQuery), 'i'); + const filteredCurrencies = _.filter(currencyData, (currencyOption) => searchRegex.test(currencyOption.text)); + + setCurrentSearchValue(searchQuery); + setCurrencyData(filteredCurrencies); + }, + [currencyData], + ); const headerMessage = searchValue.trim() && !currencyData.length ? props.translate('common.noResultsFound') : ''; @@ -116,7 +132,7 @@ const IOUCurrencySelection = (props) => { sections={getSections} onSelectRow={confirmCurrencySelection} value={searchValue} - onChangeText={setCurrentSearchValue} + onChangeText={changeSearchValue} textInputLabel={props.translate('common.search')} headerMessage={headerMessage} safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} @@ -132,33 +148,6 @@ const IOUCurrencySelection = (props) => { ); } - // /** - // * Sets new search value - // * @param {String} searchValue - // * @return {void} - // */ - // changeSearchValue(searchValue) { - // const currencyOptions = this.getCurrencyOptions(this.props.currencyList); - // const searchRegex = new RegExp(Str.escapeForRegExp(searchValue), 'i'); - // const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text)); - - // this.setState({ - // searchValue, - // currencyData: filteredCurrencies, - // }); - // } - - // // If we're coming from the confirm step, it means we were editing something so go back to the confirm step. - // const confirmIndex = _.indexOf(steps, Steps.MoneyRequestConfirm); - // if (previousStepIndex === confirmIndex) { - // navigateToStep(confirmIndex); - // return; - // } - - // setPreviousStepIndex(currentStepIndex); - // setCurrentStepIndex(currentStepIndex + 1); -// }, [currentStepIndex, previousStepIndex, navigateToStep, steps]); - IOUCurrencySelection.displayName = 'IOUCurrencySelection'; IOUCurrencySelection.propTypes = propTypes; IOUCurrencySelection.defaultProps = defaultProps; From 4c375f918095f454fcec1a2486377eb4cb2ad1de Mon Sep 17 00:00:00 2001 From: oleh Date: Mon, 12 Jun 2023 17:57:28 +0300 Subject: [PATCH 096/826] fixed lint issues --- .../MoneyRequestParticipantsSplitSelector.js | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 575b374fa75c..9c77ef68b0e2 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -89,11 +89,7 @@ function MoneyRequestParticipantsSplitSelector(props) { return newSections; } - const { - recentReports, - personalDetails, - userToInvite - } = newChatOptions; + const {recentReports, personalDetails, userToInvite} = newChatOptions; newSections.push({ title: props.translate('common.recents'), @@ -121,7 +117,7 @@ function MoneyRequestParticipantsSplitSelector(props) { } return newSections; - } + }; /** * Removes a selected option from list if already selected. If not already selected add this option to the list. @@ -150,17 +146,17 @@ function MoneyRequestParticipantsSplitSelector(props) { setNewChatOptions({ recentReports, personalDetails, - userToInvite + userToInvite, }); - props.onAddParticipants(newSelectedOptions) - } + props.onAddParticipants(newSelectedOptions); + }; /** * Once a single or more users are selected, navigates to next step */ const finalizeParticipants = () => { props.onStepComplete(); - } + }; const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; const headerMessage = OptionsListUtils.getHeaderMessage( @@ -185,9 +181,9 @@ function MoneyRequestParticipantsSplitSelector(props) { setNewChatOptions({ recentReports, personalDetails, - userToInvite + userToInvite, }); - }, [props.betas, props.reports, props.participants, props.personalDetails, props.translate, searchTerm]) + }, [props.betas, props.reports, props.participants, props.personalDetails, props.translate, searchTerm]); return ( 0 ? props.safeAreaPaddingBottomStyle : {}]}> @@ -209,7 +205,7 @@ function MoneyRequestParticipantsSplitSelector(props) { /> ); -}; +} MoneyRequestParticipantsSplitSelector.propTypes = propTypes; MoneyRequestParticipantsSplitSelector.defaultProps = defaultProps; From 025bf9bc33fa60984f3f0ad6bebb1dfd306e979f Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 12 Jun 2023 16:21:17 +0100 Subject: [PATCH 097/826] make getCurrencyOptions use useMemo and other improvements --- src/pages/iou/IOUCurrencySelection.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 0f1331541cc0..d617f0bfa11a 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -1,4 +1,4 @@ -import React, {useState, useCallback} from 'react'; +import React, {useState, useMemo, useCallback} from 'react'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; @@ -58,10 +58,9 @@ const defaultProps = { function IOUCurrencySelection(props) { const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode, CONST.CURRENCY.USD); - - const getCurrencyOptions = useCallback( + const currencyOptions = useMemo( () => - _.map(props.currencyList, (currencyCode) => { + _.map(props.currencyList, (currencyInfo, currencyCode) => { const isSelectedCurrency = currencyCode === selectedCurrencyCode; return { text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, @@ -90,9 +89,9 @@ function IOUCurrencySelection(props) { ); const [searchValue, setCurrentSearchValue] = useState(''); - const [currencyData, setCurrencyData] = useState(getCurrencyOptions); // just use a const? it doesn't seem to change... + const [currencyData, setCurrencyData] = useState(currencyOptions); - const getSections = useCallback(() => { + const getSections = useMemo(() => { if (searchValue.trim() && !currencyData.length) { return []; } @@ -105,7 +104,7 @@ function IOUCurrencySelection(props) { }); return sections; - }, [searchValue, currencyData, props]); + }, [searchValue, currencyData, props.translate]); const changeSearchValue = useCallback( (searchQuery) => { From 87466568f3ad5a9f566c6e68ae9698373c9ee00b Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 12 Jun 2023 22:57:22 +0700 Subject: [PATCH 098/826] fix: move comment --- ios/Podfile.lock | 6 +++--- src/components/AttachmentCarousel/index.js | 6 +++++- src/components/AttachmentView.js | 4 ++++ src/components/PDFView/PDFPasswordForm.js | 16 ++++++++++++++++ src/components/PDFView/index.js | 1 + src/components/PDFView/index.native.js | 1 + src/components/PDFView/pdfViewPropTypes.js | 3 +++ src/libs/Permissions.js | 2 +- 8 files changed, 34 insertions(+), 5 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6cb4235c58c8..c6c8ee0b4dce 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1019,7 +1019,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1062,7 +1062,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1135,4 +1135,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.12.0 +COCOAPODS: 1.11.3 diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index 77ab66400ae2..6b63b1cc5731 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -1,5 +1,5 @@ import React from 'react'; -import {View, FlatList, PixelRatio} from 'react-native'; +import {View, FlatList, PixelRatio, Keyboard} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; @@ -212,6 +212,7 @@ class AttachmentCarousel extends React.Component { * @param {Array<{item: {source, file}, index: Number}>} viewableItems */ updatePage({viewableItems}) { + console.log("updatePage") // Since we can have only one item in view at a time, we can use the first item in the array // to get the index of the current page const entry = _.first(viewableItems); @@ -222,6 +223,7 @@ class AttachmentCarousel extends React.Component { const page = entry.index; this.props.onNavigate(entry.item); this.setState({page, isZoomed: false}); + Keyboard.dismiss() } /** @@ -252,6 +254,7 @@ class AttachmentCarousel extends React.Component { renderItem({item}) { return ( 0 && ( {}, onToggleKeyboard: () => {}, containerStyles: [], + isFocused: false }; const AttachmentView = (props) => { @@ -82,9 +84,11 @@ const AttachmentView = (props) => { // will appear with a source that is a blob if (Str.isPDF(props.source) || (props.file && Str.isPDF(props.file.name || props.translate('attachmentView.unknownFilename')))) { const sourceURL = props.isAuthTokenRequired ? addEncryptedAuthTokenToURL(props.source) : props.source; + console.log("AttachmentView: ", props.isFocused) const children = ( {this.props.translate('attachmentView.pdfPasswordForm.formLabel')} (this.textInputRef = el)} label={this.props.translate('common.password')} autoComplete="off" autoCorrect={false} diff --git a/src/components/PDFView/index.js b/src/components/PDFView/index.js index 85821b8d8ca3..aad57d0344e8 100644 --- a/src/components/PDFView/index.js +++ b/src/components/PDFView/index.js @@ -150,6 +150,7 @@ class PDFView extends Component { {this.state.shouldRequestPassword && ( this.setState({isPasswordInvalid: false})} isPasswordInvalid={this.state.isPasswordInvalid} diff --git a/src/components/PDFView/index.native.js b/src/components/PDFView/index.native.js index 7f9f33fca6f6..b668e9109470 100644 --- a/src/components/PDFView/index.native.js +++ b/src/components/PDFView/index.native.js @@ -158,6 +158,7 @@ class PDFView extends Component { {this.state.shouldRequestPassword && ( this.setState({isPasswordInvalid: false})} isPasswordInvalid={this.state.isPasswordInvalid} diff --git a/src/components/PDFView/pdfViewPropTypes.js b/src/components/PDFView/pdfViewPropTypes.js index f87cee3a11b6..0b1cb1ca7ad2 100644 --- a/src/components/PDFView/pdfViewPropTypes.js +++ b/src/components/PDFView/pdfViewPropTypes.js @@ -21,6 +21,8 @@ const propTypes = { /** Handles load complete event in PDF component */ onLoadComplete: PropTypes.func, + isFocused: PropTypes.bool, + ...windowDimensionsPropTypes, }; @@ -31,6 +33,7 @@ const defaultProps = { onToggleKeyboard: () => {}, onScaleChanged: () => {}, onLoadComplete: () => {}, + isFocused: false }; export {propTypes, defaultProps}; diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index d3e407260e20..cf4904cce6e5 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -99,7 +99,7 @@ function canUsePasswordlessLogins(betas) { * @returns {Boolean} */ function canUseTasks(betas) { - return _.contains(betas, CONST.BETAS.TASKS) || _.contains(betas, CONST.BETAS.ALL); + return true } export default { From 86dea8ce4d5d13ede77bf10c2ba4dfd38c192b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 17:59:11 +0200 Subject: [PATCH 099/826] Update src/components/TextInput/BaseTextInput.js Co-authored-by: Rajat Parashar --- src/components/TextInput/BaseTextInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 7038a4e321f9..5a59db07879f 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -18,7 +18,7 @@ import getSecureEntryKeyboardType from '../../libs/getSecureEntryKeyboardType'; import CONST from '../../CONST'; import FormHelpMessage from '../FormHelpMessage'; import isInputAutoFilled from '../../libs/isInputAutoFilled'; -import * as Pressables from '../Pressable'; +import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; function BaseTextInput(props) { const inputValue = props.value || ''; From 71fb82c0dad473ac551beeb742e4cf3ca0772fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 17:59:28 +0200 Subject: [PATCH 100/826] Update src/components/TextInput/BaseTextInput.js Co-authored-by: Rajat Parashar --- src/components/TextInput/BaseTextInput.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 5a59db07879f..9875dead95d1 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -39,7 +39,9 @@ function BaseTextInput(props) { useEffect(() => { let appStateSubscription; - if (props.disableKeyboard) { + if (!props.disableKeyboard) { + return; + } appStateSubscription = AppState.addEventListener('change', (nextAppState) => { if (!nextAppState.match(/inactive|background/)) { return; From 528d63eb33e74b724c75dbf09fce247f42f2b8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 18:00:18 +0200 Subject: [PATCH 101/826] Update src/components/TextInput/BaseTextInput.js Co-authored-by: Rajat Parashar --- src/components/TextInput/BaseTextInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 9875dead95d1..dded7a117d70 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -226,7 +226,7 @@ function BaseTextInput(props) { return ( <> - Date: Mon, 12 Jun 2023 18:04:34 +0200 Subject: [PATCH 102/826] fix useEffect --- src/components/TextInput/BaseTextInput.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index dded7a117d70..dca8d4b83f26 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -38,21 +38,20 @@ function BaseTextInput(props) { const isLabelActive = useRef(initialActiveLabel); useEffect(() => { - let appStateSubscription; - if (!props.disableKeyboard) { - return; + if (!props.disableKeyboard) { + return; } - appStateSubscription = AppState.addEventListener('change', (nextAppState) => { - if (!nextAppState.match(/inactive|background/)) { - return; - } - Keyboard.dismiss(); - }); - } + const appStateSubscription = AppState.addEventListener('change', (nextAppState) => { + if (!nextAppState.match(/inactive|background/)) { + return; + } + + Keyboard.dismiss(); + }); return () => { - if (!props.disableKeyboard || !appStateSubscription) { + if (!props.disableKeyboard) { return; } @@ -347,7 +346,7 @@ function BaseTextInput(props) { )} - + {!_.isEmpty(inputHelpText) && ( Date: Mon, 12 Jun 2023 18:06:06 +0200 Subject: [PATCH 103/826] useRef for stable values --- src/components/TextInput/BaseTextInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index dca8d4b83f26..f797df2063c6 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -25,8 +25,8 @@ function BaseTextInput(props) { const initialActiveLabel = props.forceActiveLabel || inputValue.length > 0 || Boolean(props.prefixCharacter); const [isFocused, setIsFocused] = useState(false); - const [labelTranslateY] = useState(() => new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y)); - const [labelScale] = useState(() => new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE)); + const labelTranslateY = useRef(new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y)).current; + const labelScale = useRef(new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE)).current; const [passwordHidden, setPasswordHidden] = useState(props.secureTextEntry); const [textInputWidth, setTextInputWidth] = useState(0); const [textInputHeight, setTextInputHeight] = useState(); From 0a756fc5534f35c6c2f321f0d316c1c5415107dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Mon, 12 Jun 2023 18:19:56 +0200 Subject: [PATCH 104/826] use defaultValue as well --- src/components/TextInput/BaseTextInput.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index f797df2063c6..ff03590844e3 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -21,7 +21,7 @@ import isInputAutoFilled from '../../libs/isInputAutoFilled'; import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback'; function BaseTextInput(props) { - const inputValue = props.value || ''; + const inputValue = props.value || props.defaultValue || ''; const initialActiveLabel = props.forceActiveLabel || inputValue.length > 0 || Boolean(props.prefixCharacter); const [isFocused, setIsFocused] = useState(false); @@ -102,22 +102,26 @@ function BaseTextInput(props) { ); const activateLabel = useCallback(() => { - if (inputValue.length < 0 || isLabelActive.current) { + const value = props.value || ''; + + if (value.length < 0 || isLabelActive.current) { return; } animateLabel(styleConst.ACTIVE_LABEL_TRANSLATE_Y, styleConst.ACTIVE_LABEL_SCALE); isLabelActive.current = true; - }, [animateLabel, inputValue]); + }, [animateLabel, props.value]); const deactivateLabel = useCallback(() => { - if (props.forceActiveLabel || inputValue.length !== 0 || props.prefixCharacter) { + const value = props.value || ''; + + if (props.forceActiveLabel || value.length !== 0 || props.prefixCharacter) { return; } animateLabel(styleConst.INACTIVE_LABEL_TRANSLATE_Y, styleConst.INACTIVE_LABEL_SCALE); isLabelActive.current = false; - }, [animateLabel, props.forceActiveLabel, props.prefixCharacter, inputValue]); + }, [animateLabel, props.forceActiveLabel, props.prefixCharacter, props.value]); const onFocus = (event) => { if (props.onFocus) { From 909d7c95f8e65460734b2f0f077a7a1b34f5ef65 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 12 Jun 2023 23:28:18 +0700 Subject: [PATCH 105/826] fix: update --- src/components/AttachmentCarousel/index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index 6b63b1cc5731..cc8b069caa54 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -187,6 +187,7 @@ class AttachmentCarousel extends React.Component { shouldShowArrow: this.canUseTouchScreen, containerWidth: 0, isZoomed: false, + activeSource: null }; } @@ -212,18 +213,20 @@ class AttachmentCarousel extends React.Component { * @param {Array<{item: {source, file}, index: Number}>} viewableItems */ updatePage({viewableItems}) { - console.log("updatePage") + Keyboard.dismiss(); + console.log("updatePage", viewableItems) // Since we can have only one item in view at a time, we can use the first item in the array // to get the index of the current page const entry = _.first(viewableItems); if (!entry) { + this.setState({ activeSource: null }); return; } + console.log('entry.item', entry.item); const page = entry.index; this.props.onNavigate(entry.item); - this.setState({page, isZoomed: false}); - Keyboard.dismiss() + this.setState({page, isZoomed: false, activeSource: entry.item.source}); } /** @@ -254,7 +257,7 @@ class AttachmentCarousel extends React.Component { renderItem({item}) { return ( Date: Mon, 12 Jun 2023 22:47:39 +0300 Subject: [PATCH 106/826] useLocalize hook to get preferredLocale value --- src/pages/ValidateLoginPage/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 21d14c2bffac..09eecb696f64 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -8,6 +8,7 @@ import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndica import ONYXKEYS from '../../ONYXKEYS'; import * as Session from '../../libs/actions/Session'; import usePermissions from '../../hooks/usePermissions'; +import useLocalize from '../../hooks/useLocalize'; import Navigation from '../../libs/Navigation/Navigation'; import CONST from '../../CONST'; @@ -26,9 +27,6 @@ const propTypes = { /** The email the user logged in with */ login: PropTypes.string, }), - - /** Indicates which locale the user currently has selected */ - preferredLocale: PropTypes.string, }; const defaultProps = { @@ -37,11 +35,11 @@ const defaultProps = { authToken: null, }, credentials: {}, - preferredLocale: CONST.LOCALES.DEFAULT, }; function ValidateLoginPage(props) { const {canUsePasswordlessLogins} = usePermissions(); + const {preferredLocale} = useLocalize(); useEffect(() => { const login = lodashGet(props, 'credentials.login', null); @@ -56,7 +54,7 @@ function ValidateLoginPage(props) { // because we don't want to block the user with the interstitial page. Navigation.goBack(false); } else { - Session.signInWithValidateCodeAndNavigate(accountID, validateCode, props.preferredLocale); + Session.signInWithValidateCodeAndNavigate(accountID, validateCode, preferredLocale); } } else { User.validateLogin(accountID, validateCode); From 524f83876def31348034e211b36d595acbf36e04 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Mon, 12 Jun 2023 23:03:59 +0300 Subject: [PATCH 107/826] Make Lint happy again --- src/pages/ValidateLoginPage/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 09eecb696f64..2309a7af5852 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -10,7 +10,6 @@ import * as Session from '../../libs/actions/Session'; import usePermissions from '../../hooks/usePermissions'; import useLocalize from '../../hooks/useLocalize'; import Navigation from '../../libs/Navigation/Navigation'; -import CONST from '../../CONST'; const propTypes = { /** The accountID and validateCode are passed via the URL */ From 27536ecafe855438e5a809b51dcf81a77cedf907 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 01:13:29 -0700 Subject: [PATCH 108/826] Extract constant for SETTINGS.ROOT screen --- src/SCREENS.js | 3 +++ src/libs/Navigation/AppNavigator/ModalStackNavigators.js | 3 ++- src/libs/Navigation/linkingConfig.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SCREENS.js b/src/SCREENS.js index 24ea27fe9689..f58d417f7214 100644 --- a/src/SCREENS.js +++ b/src/SCREENS.js @@ -8,4 +8,7 @@ export default { REPORT: 'Report', NOT_FOUND: 'not-found', TRANSITION_FROM_OLD_DOT: 'TransitionFromOldDot', + SETTINGS: { + ROOT: 'Settings_Root', + }, }; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index b983ffd14968..091191675ed9 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -2,6 +2,7 @@ import _ from 'underscore'; import React from 'react'; import {createStackNavigator, CardStyleInterpolators} from '@react-navigation/stack'; import styles from '../../../styles/styles'; +import SCREENS from '../../../SCREENS'; const defaultSubRouteOptions = { cardStyle: styles.navigationScreenCardStyle, @@ -321,7 +322,7 @@ const SettingsModalStackNavigator = createModalStackNavigator([ const SettingsInitialPage = require('../../../pages/settings/InitialSettingsPage').default; return SettingsInitialPage; }, - name: 'Settings_Root', + name: SCREENS.SETTINGS.ROOT, }, { getComponent: () => { diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 37506c0460ce..da91333e7ae2 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -34,7 +34,7 @@ export default { screens: { Settings: { screens: { - Settings_Root: { + [SCREENS.SETTINGS.ROOT]: { path: ROUTES.SETTINGS, }, Settings_Workspaces: { From be225ffd543d8081e05201a9802fd8b49b81c4ee Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 01:15:04 -0700 Subject: [PATCH 109/826] Add theme color for SETTINGS_ROOT background color --- src/styles/themes/default.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/styles/themes/default.js b/src/styles/themes/default.js index 54af4b52ce50..c6aea8253ec0 100644 --- a/src/styles/themes/default.js +++ b/src/styles/themes/default.js @@ -1,5 +1,6 @@ /* eslint-disable no-unused-vars */ import colors from '../colors'; +import SCREENS from '../../SCREENS'; const darkTheme = { // Figma keys @@ -75,6 +76,10 @@ const darkTheme = { mentionBG: colors.blue600, ourMentionText: colors.green100, ourMentionBG: colors.green600, + + PAGE_BACKGROUND_COLORS: { + [SCREENS.SETTINGS.ROOT]: colors.greenHighlightBackground, + }, }; const oldTheme = { From 1e5cb7803a09e06de06b96ce5fab1116b6cb4a2c Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 01:16:04 -0700 Subject: [PATCH 110/826] Add StatusBar animation for opening settings page --- .../Navigation/AppNavigator/AuthScreens.js | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index 8539f384504c..e4ac32ae3ff5 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -1,9 +1,11 @@ import React from 'react'; import Onyx, {withOnyx} from 'react-native-onyx'; +import {Animated, Easing} from 'react-native'; import PropTypes from 'prop-types'; import moment from 'moment'; import _ from 'underscore'; import lodashGet from 'lodash/get'; +import {getFocusedRouteNameFromRoute} from '@react-navigation/native'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; import CONST from '../../../CONST'; import compose from '../../compose'; @@ -31,6 +33,8 @@ import CentralPaneNavigator from './Navigators/CentralPaneNavigator'; import NAVIGATORS from '../../../NAVIGATORS'; import FullScreenNavigator from './Navigators/FullScreenNavigator'; import styles from '../../../styles/styles'; +import themeColors from '../../../styles/themes/default'; +import StatusBar from '../../StatusBar'; let currentUserEmail; Onyx.connect({ @@ -99,6 +103,12 @@ class AuthScreens extends React.Component { super(props); Timing.start(CONST.TIMING.HOMEPAGE_INITIAL_RENDER); + + this.prevStatusBarBackgroundColor = themeColors.appBG; + this.statusBarBackgroundColor = themeColors.appBG; + this.statusBarAnimation = new Animated.Value(0); + + this.animateStatusBarBackgroundColorChange = this.animateStatusBarBackgroundColorChange.bind(this); } componentDidMount() { @@ -152,6 +162,15 @@ class AuthScreens extends React.Component { groupShortcutConfig.modifiers, true, ); + + this.statusBarAnimation.addListener(() => { + const colorObj = this.statusBarAnimation.interpolate({ + inputRange: [0, 1], + outputRange: [this.prevStatusBarBackgroundColor, this.statusBarBackgroundColor], + }); + // eslint-disable-next-line no-underscore-dangle + StatusBar.setBackgroundColor(colorObj.__getValue()); + }); } shouldComponentUpdate(nextProps) { @@ -165,11 +184,36 @@ class AuthScreens extends React.Component { if (this.unsubscribeGroupShortcut) { this.unsubscribeGroupShortcut(); } + if (this.statusBarAnimation) { + this.statusBarAnimation.removeAllListeners(); + } Session.cleanupSession(); clearInterval(this.interval); this.interval = null; } + /** + * @param {Event} e – react-navigation state change event + */ + animateStatusBarBackgroundColorChange(e) { + const focusedScreenName = getFocusedRouteNameFromRoute(_.last(lodashGet(e, 'data.state.routes', [{}]))); + const focusedScreenBackgroundColor = themeColors.PAGE_BACKGROUND_COLORS[focusedScreenName] || themeColors.appBG; + + this.prevStatusBarBackgroundColor = this.statusBarBackgroundColor; + this.statusBarBackgroundColor = focusedScreenBackgroundColor; + + if (this.statusBarBackgroundColor !== this.prevStatusBarBackgroundColor) { + this.statusBarAnimation.setValue(0); + Animated.timing(this.statusBarAnimation, { + toValue: 1, + duration: 300, + delay: 300, + easing: Easing.in(Easing.ease), + useNativeDriver: false, + }).start(); + } + } + render() { const commonScreenOptions = { headerShown: false, @@ -196,6 +240,9 @@ class AuthScreens extends React.Component { // a header will briefly open and close the keyboard and crash Android. // eslint-disable-next-line react/jsx-props-no-multi-spaces keyboardHandlingEnabled={false} + screenListeners={{ + state: this.animateStatusBarBackgroundColorChange, + }} > Date: Tue, 13 Jun 2023 10:20:47 +0200 Subject: [PATCH 111/826] removed unnecessary condition --- src/components/TextInput/BaseTextInput.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index ff03590844e3..60f2ed739740 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -51,10 +51,6 @@ function BaseTextInput(props) { }); return () => { - if (!props.disableKeyboard) { - return; - } - appStateSubscription.remove(); }; }, [props.disableKeyboard]); From 553111e9845d363ae0c7a58ba32aa186c3fe2916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Tue, 13 Jun 2023 10:21:33 +0200 Subject: [PATCH 112/826] beautify code order --- src/components/TextInput/BaseTextInput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 60f2ed739740..724e39c0cdce 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -25,14 +25,14 @@ function BaseTextInput(props) { const initialActiveLabel = props.forceActiveLabel || inputValue.length > 0 || Boolean(props.prefixCharacter); const [isFocused, setIsFocused] = useState(false); - const labelTranslateY = useRef(new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y)).current; - const labelScale = useRef(new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE)).current; const [passwordHidden, setPasswordHidden] = useState(props.secureTextEntry); const [textInputWidth, setTextInputWidth] = useState(0); const [textInputHeight, setTextInputHeight] = useState(); const [prefixWidth, setPrefixWidth] = useState(0); const [height, setHeight] = useState(variables.componentSizeLarge); const [width, setWidth] = useState(); + const labelScale = useRef(new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_SCALE : styleConst.INACTIVE_LABEL_SCALE)).current; + const labelTranslateY = useRef(new Animated.Value(initialActiveLabel ? styleConst.ACTIVE_LABEL_TRANSLATE_Y : styleConst.INACTIVE_LABEL_TRANSLATE_Y)).current; const input = useRef(null); const isLabelActive = useRef(initialActiveLabel); From f855656dacc8bfa71163cf8e5c0773f0548fcfcd Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 01:38:22 -0700 Subject: [PATCH 113/826] Pass screenListeners down correctly --- .../createResponsiveStackNavigator/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.js b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.js index fa2c2d6b0558..5fd24f4e4d1d 100644 --- a/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.js +++ b/src/libs/Navigation/AppNavigator/createResponsiveStackNavigator/index.js @@ -6,23 +6,27 @@ import ThreePaneView from './ThreePaneView'; import CustomRouter from './CustomRouter'; const propTypes = { - /* Determines if the navigator should render the StackView (narrow) or ThreePaneView (wide) */ + /** Determines if the navigator should render the StackView (narrow) or ThreePaneView (wide) */ isSmallScreenWidth: PropTypes.bool.isRequired, - /* Children for the useNavigationBuilder hook */ + /** Children for the useNavigationBuilder hook */ children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired, - /* initialRouteName for this navigator */ + /** initialRouteName for this navigator */ initialRouteName: PropTypes.oneOf([PropTypes.string, PropTypes.undefined]), - /* Screen options defined for this navigator */ + /** Screen options defined for this navigator */ // eslint-disable-next-line react/forbid-prop-types screenOptions: PropTypes.object, + + /** Screen listeners for this navigator */ + screenListeners: PropTypes.objectOf(PropTypes.func), }; const defaultProps = { initialRouteName: undefined, screenOptions: undefined, + screenListeners: undefined, }; function ResponsiveStackNavigator(props) { @@ -31,6 +35,7 @@ function ResponsiveStackNavigator(props) { screenOptions: props.screenOptions, initialRouteName: props.initialRouteName, isSmallScreenWidth: props.isSmallScreenWidth, + screenListeners: props.screenListeners, }); return props.isSmallScreenWidth ? ( From d993726bf95ae2ad963f454d72c6b075fe0f61a2 Mon Sep 17 00:00:00 2001 From: tienifr Date: Tue, 13 Jun 2023 15:52:06 +0700 Subject: [PATCH 114/826] fix rerender --- src/libs/ReportUtils.js | 5 +++-- src/pages/home/report/ReportActionItem.js | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index fe45a438c652..63760fd46fa1 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -525,10 +525,11 @@ function isThreadParent(reportAction) { * Returns true if reportAction is the first chat preview of a Thread * * @param {Object} reportAction + * @param {String} [reportID] * @returns {Boolean} */ -function isThreadFirstChat(reportAction) { - return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === Navigation.getTopmostReportId(); +function isThreadFirstChat(reportAction, reportID = '') { + return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === (reportID || Navigation.getTopmostReportId()); } /** diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index b1d9e5a0a690..b34e8e1d17ab 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -54,6 +54,7 @@ import TaskPreview from '../../../components/ReportActionItem/TaskPreview'; import TaskAction from '../../../components/ReportActionItem/TaskAction'; import * as Session from '../../../libs/actions/Session'; import {hideContextMenu} from './ContextMenu/ReportActionContextMenu'; +import withCurrentReportId from '../../../components/withCurrentReportId'; const propTypes = { ...windowDimensionsPropTypes, @@ -320,7 +321,7 @@ function ReportActionItem(props) { const numberOfThreadReplies = _.get(props, ['action', 'childVisibleActionCount'], 0); const hasReplies = numberOfThreadReplies > 0; - const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !ReportUtils.isThreadFirstChat(props.action); + const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !ReportUtils.isThreadFirstChat(props.action, props.currentReportId); const oldestFourEmails = lodashGet(props.action, 'childOldestFourEmails', '').split(','); const draftMessageRightAlign = props.draftMessage ? styles.chatItemReactionsDraftRight : {}; @@ -502,6 +503,7 @@ export default compose( return lodashGet(drafts, draftKey, ''); }, }), + withCurrentReportId, withOnyx({ preferredSkinTone: { key: ONYXKEYS.PREFERRED_EMOJI_SKIN_TONE, @@ -519,6 +521,7 @@ export default compose( _.isEqual(prevProps.action, nextProps.action) && lodashGet(prevProps.report, 'statusNum') === lodashGet(nextProps.report, 'statusNum') && lodashGet(prevProps.report, 'stateNum') === lodashGet(nextProps.report, 'stateNum') && - prevProps.translate === nextProps.translate, + prevProps.translate === nextProps.translate && + prevProps.currentReportId === nextProps.currentReportId, ), ); From 273e7e1bdab2d7743fb716f1a4aa7f0a1d2888ce Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 02:49:52 -0700 Subject: [PATCH 115/826] Move animation from AuthScreens to NavigationRoot --- .../Navigation/AppNavigator/AuthScreens.js | 47 ------------------- .../Navigators/RightModalNavigator.js | 4 +- src/libs/Navigation/NavigationRoot.js | 42 ++++++++++++++++- 3 files changed, 43 insertions(+), 50 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index e4ac32ae3ff5..8539f384504c 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -1,11 +1,9 @@ import React from 'react'; import Onyx, {withOnyx} from 'react-native-onyx'; -import {Animated, Easing} from 'react-native'; import PropTypes from 'prop-types'; import moment from 'moment'; import _ from 'underscore'; import lodashGet from 'lodash/get'; -import {getFocusedRouteNameFromRoute} from '@react-navigation/native'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; import CONST from '../../../CONST'; import compose from '../../compose'; @@ -33,8 +31,6 @@ import CentralPaneNavigator from './Navigators/CentralPaneNavigator'; import NAVIGATORS from '../../../NAVIGATORS'; import FullScreenNavigator from './Navigators/FullScreenNavigator'; import styles from '../../../styles/styles'; -import themeColors from '../../../styles/themes/default'; -import StatusBar from '../../StatusBar'; let currentUserEmail; Onyx.connect({ @@ -103,12 +99,6 @@ class AuthScreens extends React.Component { super(props); Timing.start(CONST.TIMING.HOMEPAGE_INITIAL_RENDER); - - this.prevStatusBarBackgroundColor = themeColors.appBG; - this.statusBarBackgroundColor = themeColors.appBG; - this.statusBarAnimation = new Animated.Value(0); - - this.animateStatusBarBackgroundColorChange = this.animateStatusBarBackgroundColorChange.bind(this); } componentDidMount() { @@ -162,15 +152,6 @@ class AuthScreens extends React.Component { groupShortcutConfig.modifiers, true, ); - - this.statusBarAnimation.addListener(() => { - const colorObj = this.statusBarAnimation.interpolate({ - inputRange: [0, 1], - outputRange: [this.prevStatusBarBackgroundColor, this.statusBarBackgroundColor], - }); - // eslint-disable-next-line no-underscore-dangle - StatusBar.setBackgroundColor(colorObj.__getValue()); - }); } shouldComponentUpdate(nextProps) { @@ -184,36 +165,11 @@ class AuthScreens extends React.Component { if (this.unsubscribeGroupShortcut) { this.unsubscribeGroupShortcut(); } - if (this.statusBarAnimation) { - this.statusBarAnimation.removeAllListeners(); - } Session.cleanupSession(); clearInterval(this.interval); this.interval = null; } - /** - * @param {Event} e – react-navigation state change event - */ - animateStatusBarBackgroundColorChange(e) { - const focusedScreenName = getFocusedRouteNameFromRoute(_.last(lodashGet(e, 'data.state.routes', [{}]))); - const focusedScreenBackgroundColor = themeColors.PAGE_BACKGROUND_COLORS[focusedScreenName] || themeColors.appBG; - - this.prevStatusBarBackgroundColor = this.statusBarBackgroundColor; - this.statusBarBackgroundColor = focusedScreenBackgroundColor; - - if (this.statusBarBackgroundColor !== this.prevStatusBarBackgroundColor) { - this.statusBarAnimation.setValue(0); - Animated.timing(this.statusBarAnimation, { - toValue: 1, - duration: 300, - delay: 300, - easing: Easing.in(Easing.ease), - useNativeDriver: false, - }).start(); - } - } - render() { const commonScreenOptions = { headerShown: false, @@ -240,9 +196,6 @@ class AuthScreens extends React.Component { // a header will briefly open and close the keyboard and crash Android. // eslint-disable-next-line react/jsx-props-no-multi-spaces keyboardHandlingEnabled={false} - screenListeners={{ - state: this.animateStatusBarBackgroundColorChange, - }} > { useFlipper(navigationRef); const navigationStateRef = useRef(undefined); + const prevStatusBarBackgroundColor = useRef(themeColors.appBG); + const statusBarBackgroundColor = useRef(themeColors.appBG); + const statusBarAnimation = useRef(new Animated.Value(0)); + + useEffect(() => { + const animation = statusBarAnimation.current; + animation.addListener(() => { + const colorObj = animation.interpolate({ + inputRange: [0, 1], + outputRange: [prevStatusBarBackgroundColor.current, statusBarBackgroundColor.current], + }); + // eslint-disable-next-line no-underscore-dangle + StatusBar.setBackgroundColor(colorObj.__getValue()); + }); + return () => animation.removeAllListeners(); + }, []); + + const animateStatusBarBackgroundColor = () => { + const currentRoute = navigationRef.getCurrentRoute(); + const currentScreenBackgroundColor = themeColors.PAGE_BACKGROUND_COLORS[currentRoute.name] || themeColors.appBG; + + prevStatusBarBackgroundColor.current = statusBarBackgroundColor.current; + statusBarBackgroundColor.current = currentScreenBackgroundColor; + if (prevStatusBarBackgroundColor.current === statusBarBackgroundColor.current) { + return; + } + + statusBarAnimation.current.setValue(0); + Animated.timing(statusBarAnimation.current, { + toValue: 1, + duration: 300, + delay: 300, + easing: Easing.in(Easing.ease), + useNativeDriver: false, + }).start(); + }; + const updateSavedNavigationStateAndLogRoute = (state) => { navigationStateRef.current = state; props.updateCurrentReportId(state); parseAndLogRoute(state); + animateStatusBarBackgroundColor(); }; return ( From a71d414761587e8b0dd69ca4e288004548c4cf8d Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 02:52:15 -0700 Subject: [PATCH 116/826] Implement correct background color, for homepage instead of settings page --- src/styles/themes/default.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/styles/themes/default.js b/src/styles/themes/default.js index c6aea8253ec0..232d1b873863 100644 --- a/src/styles/themes/default.js +++ b/src/styles/themes/default.js @@ -76,10 +76,10 @@ const darkTheme = { mentionBG: colors.blue600, ourMentionText: colors.green100, ourMentionBG: colors.green600, +}; - PAGE_BACKGROUND_COLORS: { - [SCREENS.SETTINGS.ROOT]: colors.greenHighlightBackground, - }, +darkTheme.PAGE_BACKGROUND_COLORS = { + [SCREENS.HOME]: darkTheme.sidebar, }; const oldTheme = { From 5410e5a09ccc21c3365bc8cb1ef7ce2f8afd52e0 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 02:56:51 -0700 Subject: [PATCH 117/826] Remove all unrelated / unecessary changes --- src/SCREENS.js | 3 --- .../Navigation/AppNavigator/ModalStackNavigators.js | 3 +-- .../AppNavigator/Navigators/RightModalNavigator.js | 4 ++-- .../createResponsiveStackNavigator/index.js | 13 ++++--------- src/libs/Navigation/linkingConfig.js | 2 +- 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/SCREENS.js b/src/SCREENS.js index f58d417f7214..24ea27fe9689 100644 --- a/src/SCREENS.js +++ b/src/SCREENS.js @@ -8,7 +8,4 @@ export default { REPORT: 'Report', NOT_FOUND: 'not-found', TRANSITION_FROM_OLD_DOT: 'TransitionFromOldDot', - SETTINGS: { - ROOT: 'Settings_Root', - }, }; diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index 091191675ed9..b983ffd14968 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -2,7 +2,6 @@ import _ from 'underscore'; import React from 'react'; import {createStackNavigator, CardStyleInterpolators} from '@react-navigation/stack'; import styles from '../../../styles/styles'; -import SCREENS from '../../../SCREENS'; const defaultSubRouteOptions = { cardStyle: styles.navigationScreenCardStyle, @@ -322,7 +321,7 @@ const SettingsModalStackNavigator = createModalStackNavigator([ const SettingsInitialPage = require('../../../pages/settings/InitialSettingsPage').default; return SettingsInitialPage; }, - name: SCREENS.SETTINGS.ROOT, + name: 'Settings_Root', }, { getComponent: () => { diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js index 3a5c0e51233a..cb82795936c2 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js @@ -6,7 +6,7 @@ import defaultModalScreenOptions from '../defaultModalScreenOptions'; const Stack = createStackNavigator(); -function RightModalNavigator() { +function RigthModalNavigator() { return ( Date: Tue, 13 Jun 2023 02:57:18 -0700 Subject: [PATCH 118/826] Remove unused import --- src/libs/Navigation/NavigationRoot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 0c3eabc19542..5e0c8fe60a6b 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -1,4 +1,4 @@ -import React, {useRef, useEffect, useCallback} from 'react'; +import React, {useRef, useEffect} from 'react'; import PropTypes from 'prop-types'; import {NavigationContainer, DefaultTheme, getPathFromState} from '@react-navigation/native'; import {useFlipper} from '@react-navigation/devtools'; From e3d854c32173d7e89be14c775532aaf7e5853014 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 02:59:33 -0700 Subject: [PATCH 119/826] useWindowDimensions instead of withWindowDimensions --- src/libs/Navigation/NavigationRoot.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 5e0c8fe60a6b..0e7b319b24bc 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -7,11 +7,10 @@ import Navigation, {navigationRef} from './Navigation'; import linkingConfig from './linkingConfig'; import AppNavigator from './AppNavigator'; import themeColors from '../../styles/themes/default'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; import Log from '../Log'; import withCurrentReportId from '../../components/withCurrentReportId'; -import compose from '../compose'; import StatusBar from '../StatusBar'; +import useWindowDimensions from '../../hooks/useWindowDimensions'; // https://reactnavigation.org/docs/themes const navigationTheme = { @@ -23,8 +22,6 @@ const navigationTheme = { }; const propTypes = { - ...windowDimensionsPropTypes, - /** Whether the current user is logged in with an authToken */ authenticated: PropTypes.bool.isRequired, @@ -101,9 +98,11 @@ const NavigationRoot = (props) => { animateStatusBarBackgroundColor(); }; + const {isSmallScreenWidth} = useWindowDimensions(); + return ( { NavigationRoot.displayName = 'NavigationRoot'; NavigationRoot.propTypes = propTypes; -export default compose(withWindowDimensions, withCurrentReportId)(NavigationRoot); +export default withCurrentReportId(NavigationRoot); From b7b58ed138062e87020d4bba3b99d428cefef105 Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 03:07:40 -0700 Subject: [PATCH 120/826] Move useWindowDimensions declaration --- src/libs/Navigation/NavigationRoot.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 0e7b319b24bc..471e674668c3 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -51,6 +51,7 @@ function parseAndLogRoute(state) { } const NavigationRoot = (props) => { + const {isSmallScreenWidth} = useWindowDimensions(); useFlipper(navigationRef); const navigationStateRef = useRef(undefined); @@ -98,8 +99,6 @@ const NavigationRoot = (props) => { animateStatusBarBackgroundColor(); }; - const {isSmallScreenWidth} = useWindowDimensions(); - return ( Date: Tue, 13 Jun 2023 03:31:10 -0700 Subject: [PATCH 121/826] Fix lint --- src/components/withCurrentReportId.js | 5 +++++ src/libs/Navigation/NavigationRoot.js | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/withCurrentReportId.js b/src/components/withCurrentReportId.js index d05ac2f1bce8..71f05660d7be 100644 --- a/src/components/withCurrentReportId.js +++ b/src/components/withCurrentReportId.js @@ -9,6 +9,10 @@ const CurrentReportIdContext = createContext(null); const withCurrentReportIdPropTypes = { /** Actual content wrapped by this component */ children: PropTypes.node.isRequired, + + /** Function used to update the current reportId. Should probably only ever be used in one place in the whole app. */ + // eslint-disable-next-line react/no-unused-prop-types + updateCurrentReportId: PropTypes.func.isRequired, }; class CurrentReportIdContextProvider extends React.Component { @@ -61,6 +65,7 @@ export default function withCurrentReportId(WrappedComponent) { )); + WithCurrentReportId.propTypes = withCurrentReportIdPropTypes; WithCurrentReportId.displayName = `withCurrentReportId(${getComponentDisplayName(WrappedComponent)})`; return WithCurrentReportId; diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 471e674668c3..0d45ac156eb4 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -8,7 +8,7 @@ import linkingConfig from './linkingConfig'; import AppNavigator from './AppNavigator'; import themeColors from '../../styles/themes/default'; import Log from '../Log'; -import withCurrentReportId from '../../components/withCurrentReportId'; +import withCurrentReportId, {withCurrentReportIdPropTypes} from '../../components/withCurrentReportId'; import StatusBar from '../StatusBar'; import useWindowDimensions from '../../hooks/useWindowDimensions'; @@ -27,6 +27,8 @@ const propTypes = { /** Fired when react-navigation is ready */ onReady: PropTypes.func.isRequired, + + ...withCurrentReportIdPropTypes, }; /** From 5d9143ce4238250ad1da276bbeefc1f3cfdbd241 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Jun 2023 13:47:47 +0100 Subject: [PATCH 122/826] use prop destructuring --- src/pages/iou/IOUCurrencySelection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index d617f0bfa11a..cfc7fc326faf 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -90,6 +90,7 @@ function IOUCurrencySelection(props) { const [searchValue, setCurrentSearchValue] = useState(''); const [currencyData, setCurrencyData] = useState(currencyOptions); + const {translate} = props; const getSections = useMemo(() => { if (searchValue.trim() && !currencyData.length) { @@ -97,14 +98,14 @@ function IOUCurrencySelection(props) { } const sections = []; sections.push({ - title: props.translate('iOUCurrencySelection.allCurrencies'), + title: translate('iOUCurrencySelection.allCurrencies'), data: currencyData, shouldShow: true, indexOffset: 0, }); return sections; - }, [searchValue, currencyData, props.translate]); + }, [searchValue, currencyData, translate]); const changeSearchValue = useCallback( (searchQuery) => { From 5e2ea3b2510beff47a595df6467881191cb5847e Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Jun 2023 13:48:01 +0100 Subject: [PATCH 123/826] reorder hook statements --- src/pages/iou/IOUCurrencySelection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index cfc7fc326faf..afad15d06dbb 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -57,6 +57,7 @@ const defaultProps = { }; function IOUCurrencySelection(props) { + const [searchValue, setCurrentSearchValue] = useState(''); const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode, CONST.CURRENCY.USD); const currencyOptions = useMemo( () => @@ -73,6 +74,8 @@ function IOUCurrencySelection(props) { [selectedCurrencyCode, props.currencyList], ); + const [currencyData, setCurrencyData] = useState(currencyOptions); + const confirmCurrencySelection = useCallback( (option) => { const backTo = lodashGet(props.route, 'params.backTo', ''); @@ -88,8 +91,6 @@ function IOUCurrencySelection(props) { [props.route, props.navigation], ); - const [searchValue, setCurrentSearchValue] = useState(''); - const [currencyData, setCurrencyData] = useState(currencyOptions); const {translate} = props; const getSections = useMemo(() => { From 0f0ea5be219d9601ea51d35cf8a6a8c4ad6d1fc8 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Jun 2023 13:50:45 +0100 Subject: [PATCH 124/826] apply review suggestion and format code with prettier --- src/pages/iou/IOUCurrencySelection.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index afad15d06dbb..eaba6de07cd4 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -91,19 +91,18 @@ function IOUCurrencySelection(props) { [props.route, props.navigation], ); - const {translate} = props; + const { translate } = props; const getSections = useMemo(() => { if (searchValue.trim() && !currencyData.length) { return []; } - const sections = []; - sections.push({ + return [{ title: translate('iOUCurrencySelection.allCurrencies'), data: currencyData, shouldShow: true, indexOffset: 0, - }); + }]; return sections; }, [searchValue, currencyData, translate]); From 7248544b06b788ba74c4fca975a7c988d8d455d6 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Jun 2023 13:51:55 +0100 Subject: [PATCH 125/826] remove useless return statement --- src/pages/iou/IOUCurrencySelection.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index eaba6de07cd4..3a160c7eb4e4 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -103,8 +103,6 @@ function IOUCurrencySelection(props) { shouldShow: true, indexOffset: 0, }]; - - return sections; }, [searchValue, currencyData, translate]); const changeSearchValue = useCallback( From 0f41718d0d6b2aa94fbde4daf18f6a079f820e01 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Jun 2023 14:33:27 +0100 Subject: [PATCH 126/826] fix issue where filtered currencies were permanent --- src/pages/iou/IOUCurrencySelection.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 3a160c7eb4e4..b57c488daadc 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -91,29 +91,31 @@ function IOUCurrencySelection(props) { [props.route, props.navigation], ); - const { translate } = props; + const {translate} = props; const getSections = useMemo(() => { if (searchValue.trim() && !currencyData.length) { return []; } - return [{ - title: translate('iOUCurrencySelection.allCurrencies'), - data: currencyData, - shouldShow: true, - indexOffset: 0, - }]; + return [ + { + title: translate('iOUCurrencySelection.allCurrencies'), + data: currencyData, + shouldShow: true, + indexOffset: 0, + }, + ]; }, [searchValue, currencyData, translate]); const changeSearchValue = useCallback( (searchQuery) => { const searchRegex = new RegExp(Str.escapeForRegExp(searchQuery), 'i'); - const filteredCurrencies = _.filter(currencyData, (currencyOption) => searchRegex.test(currencyOption.text)); + const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text)); setCurrentSearchValue(searchQuery); setCurrencyData(filteredCurrencies); }, - [currencyData], + [currencyOptions], ); const headerMessage = searchValue.trim() && !currencyData.length ? props.translate('common.noResultsFound') : ''; From 9012baeb172844411ac1020c29ec062d43d0009b Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 13 Jun 2023 16:10:55 +0100 Subject: [PATCH 127/826] remove unnecessary uses of props.translate in IOUCurrencySelection --- src/pages/iou/IOUCurrencySelection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index b57c488daadc..26a95033300d 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -118,14 +118,14 @@ function IOUCurrencySelection(props) { [currencyOptions], ); - const headerMessage = searchValue.trim() && !currencyData.length ? props.translate('common.noResultsFound') : ''; + const headerMessage = searchValue.trim() && !currencyData.length ? translate('common.noResultsFound') : ''; return ( {({safeAreaPaddingBottomStyle}) => ( <> Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} /> Date: Wed, 14 Jun 2023 00:25:36 +0800 Subject: [PATCH 128/826] fix task preview text is overflown --- src/components/ReportActionItem/TaskPreview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ReportActionItem/TaskPreview.js b/src/components/ReportActionItem/TaskPreview.js index 3f66c211d476..f3a6470a504b 100644 --- a/src/components/ReportActionItem/TaskPreview.js +++ b/src/components/ReportActionItem/TaskPreview.js @@ -63,7 +63,7 @@ const TaskPreview = (props) => { return ( Navigation.navigate(ROUTES.getReportRoute(props.taskReportID))} - style={[styles.flexRow, styles.justifyContentBetween]} + style={[styles.flexRow, styles.justifyContentBetween, styles.chatItemMessage]} > Date: Tue, 13 Jun 2023 12:30:58 -0700 Subject: [PATCH 129/826] Create usePermissions hook --- src/components/OnyxProvider.js | 4 ++-- src/hooks/usePermissions.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 src/hooks/usePermissions.js diff --git a/src/components/OnyxProvider.js b/src/components/OnyxProvider.js index 6cee7e5b7a62..76cda71da2b2 100644 --- a/src/components/OnyxProvider.js +++ b/src/components/OnyxProvider.js @@ -11,7 +11,7 @@ const [withPersonalDetails, PersonalDetailsProvider] = createOnyxContext(ONYXKEY const [withCurrentDate, CurrentDateProvider] = createOnyxContext(ONYXKEYS.CURRENT_DATE); const [withReportActionsDrafts, ReportActionsDraftsProvider] = createOnyxContext(ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS); const [withBlockedFromConcierge, BlockedFromConciergeProvider] = createOnyxContext(ONYXKEYS.NVP_BLOCKED_FROM_CONCIERGE); -const [withBetas, BetasProvider] = createOnyxContext(ONYXKEYS.BETAS); +const [withBetas, BetasProvider, BetasContext] = createOnyxContext(ONYXKEYS.BETAS); const propTypes = { /** Rendered child component */ @@ -29,4 +29,4 @@ OnyxProvider.propTypes = propTypes; export default OnyxProvider; -export {withNetwork, withPersonalDetails, withReportActionsDrafts, withCurrentDate, withBlockedFromConcierge, withBetas, NetworkContext}; +export {withNetwork, withPersonalDetails, withReportActionsDrafts, withCurrentDate, withBlockedFromConcierge, withBetas, NetworkContext, BetasContext}; diff --git a/src/hooks/usePermissions.js b/src/hooks/usePermissions.js new file mode 100644 index 000000000000..1c31ffc8bb64 --- /dev/null +++ b/src/hooks/usePermissions.js @@ -0,0 +1,15 @@ +import _ from 'underscore'; +import {useContext, useMemo} from 'react'; +import Permissions from '../libs/Permissions'; +import {BetasContext} from '../components/OnyxProvider'; + +export default function usePermissions() { + const betas = useContext(BetasContext); + return useMemo(() => { + const permissions = {}; + _.each(Permissions, (checkerFunction, beta) => { + permissions[beta] = checkerFunction(betas); + }); + return permissions; + }, [betas]); +} From cc028f6f4a1c0556b62fcdd9c45273a126efd59b Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 12:32:21 -0700 Subject: [PATCH 130/826] Create useLocalize hook --- src/components/withLocalize.js | 2 +- src/hooks/useLocalize.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/hooks/useLocalize.js diff --git a/src/components/withLocalize.js b/src/components/withLocalize.js index 4cbdda876231..def7110c1b40 100755 --- a/src/components/withLocalize.js +++ b/src/components/withLocalize.js @@ -179,4 +179,4 @@ export default function withLocalize(WrappedComponent) { return WithLocalize; } -export {withLocalizePropTypes, Provider as LocaleContextProvider}; +export {withLocalizePropTypes, Provider as LocaleContextProvider, LocaleContext}; diff --git a/src/hooks/useLocalize.js b/src/hooks/useLocalize.js new file mode 100644 index 000000000000..9ad5048729bd --- /dev/null +++ b/src/hooks/useLocalize.js @@ -0,0 +1,6 @@ +import {useContext} from 'react'; +import {LocaleContext} from '../components/withLocalize'; + +export default function useLocalize() { + return useContext(LocaleContext); +} From 64811dc2c71089abfd1387197b410c47f6018ccb Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 12:41:11 -0700 Subject: [PATCH 131/826] Migrate SignInPage to functional component --- src/pages/signin/SignInPage.js | 257 ++++++++++++++++----------------- 1 file changed, 125 insertions(+), 132 deletions(-) diff --git a/src/pages/signin/SignInPage.js b/src/pages/signin/SignInPage.js index a875c25359b0..8c3d513f5303 100644 --- a/src/pages/signin/SignInPage.js +++ b/src/pages/signin/SignInPage.js @@ -1,30 +1,27 @@ -import React, {Component} from 'react'; +import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import {View} from 'react-native'; -import lodashGet from 'lodash/get'; import Str from 'expensify-common/lib/str'; -import {withSafeAreaInsets} from 'react-native-safe-area-context'; +import {useSafeAreaInsets} from 'react-native-safe-area-context'; import ONYXKEYS from '../../ONYXKEYS'; import styles from '../../styles/styles'; -import compose from '../../libs/compose'; import SignInPageLayout from './SignInPageLayout'; import LoginForm from './LoginForm'; import PasswordForm from './PasswordForm'; import ValidateCodeForm from './ValidateCodeForm'; import ResendValidationForm from './ResendValidationForm'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; import Performance from '../../libs/Performance'; import * as App from '../../libs/actions/App'; -import Permissions from '../../libs/Permissions'; import UnlinkLoginForm from './UnlinkLoginForm'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; import * as Localize from '../../libs/Localize'; import * as StyleUtils from '../../styles/StyleUtils'; +import useLocalize from '../../hooks/useLocalize'; +import usePermissions from '../../hooks/usePermissions'; +import useWindowDimensions from '../../hooks/useWindowDimensions'; +import Log from '../../libs/Log'; const propTypes = { - /* Onyx Props */ - /** The details about the account that the user is signing in with */ account: PropTypes.shape({ /** Error to display when there is an account error returned */ @@ -35,153 +32,149 @@ const propTypes = { /** The primaryLogin associated with the account */ primaryLogin: PropTypes.string, - }), - /** List of betas available to current user */ - betas: PropTypes.arrayOf(PropTypes.string), + /** Has the user pressed the forgot password button? */ + forgotPassword: PropTypes.bool, + + /** Does this account require 2FA? */ + requiresTwoFactorAuth: PropTypes.bool, + }), /** The credentials of the person signing in */ credentials: PropTypes.shape({ login: PropTypes.string, password: PropTypes.string, twoFactorAuthCode: PropTypes.string, + validateCode: PropTypes.string, }), - - ...withLocalizePropTypes, - - ...windowDimensionsPropTypes, }; const defaultProps = { account: {}, - betas: [], credentials: {}, }; -class SignInPage extends Component { - componentDidMount() { - Performance.measureTTI(); +/** + * @param {Boolean} hasLogin + * @param {Boolean} hasPassword + * @param {Boolean} hasValidateCode + * @param {Boolean} isPrimaryLogin + * @param {Boolean} isAccountValidated + * @param {Boolean} didForgetPassword + * @param {Boolean} canUsePasswordlessLogins + * @returns {Object} + */ +function getRenderOptions({hasLogin, hasPassword, hasValidateCode, isPrimaryLogin, isAccountValidated, didForgetPassword, canUsePasswordlessLogins}) { + const shouldShowLoginForm = !hasLogin && !hasValidateCode; + const isUnvalidatedSecondaryLogin = hasLogin && !isPrimaryLogin && !isAccountValidated; + const shouldShowPasswordForm = hasLogin && isAccountValidated && !hasPassword && !didForgetPassword && !isUnvalidatedSecondaryLogin && !canUsePasswordlessLogins; + const shouldShowValidateCodeForm = (hasLogin || hasValidateCode) && !isUnvalidatedSecondaryLogin && canUsePasswordlessLogins; + const shouldShowResendValidationForm = hasLogin && (!isAccountValidated || didForgetPassword) && !isUnvalidatedSecondaryLogin && !canUsePasswordlessLogins; + const shouldShowWelcomeHeader = shouldShowLoginForm || shouldShowPasswordForm || shouldShowValidateCodeForm || isUnvalidatedSecondaryLogin; + const shouldShowWelcomeText = shouldShowLoginForm || shouldShowPasswordForm || shouldShowValidateCodeForm; + return { + shouldShowLoginForm, + shouldShowUnlinkLoginForm: isUnvalidatedSecondaryLogin, + shouldShowPasswordForm, + shouldShowValidateCodeForm, + shouldShowResendValidationForm, + shouldShowWelcomeHeader, + shouldShowWelcomeText, + }; +} - App.setLocale(Localize.getDevicePreferredLocale()); - } +function SignInPage({credentials, account}) { + const {translate, formatPhoneNumber} = useLocalize(); + const {canUsePasswordlessLogins} = usePermissions(); + const {isSmallScreenWidth} = useWindowDimensions(); + const safeAreaInsets = useSafeAreaInsets(); - render() { - // Show the login form if - // - A login has not been entered yet - // - AND a validateCode has not been cached with sign in link - const showLoginForm = !this.props.credentials.login && !this.props.credentials.validateCode; - - // Show the unlink form if - // - A login has been entered - // - AND the login is not the primary login - // - AND the login is not validated - const showUnlinkLoginForm = - Boolean(this.props.credentials.login && this.props.account.primaryLogin) && this.props.account.primaryLogin !== this.props.credentials.login && !this.props.account.validated; - - // Show the old password form if - // - A login has been entered - // - AND an account exists and is validated for this login - // - AND a password hasn't been entered yet - // - AND haven't forgotten password - // - AND the login isn't an unvalidated secondary login - // - AND the user is NOT on the passwordless beta - const showPasswordForm = - Boolean(this.props.credentials.login) && - this.props.account.validated && - !this.props.credentials.password && - !this.props.account.forgotPassword && - !showUnlinkLoginForm && - !Permissions.canUsePasswordlessLogins(this.props.betas); - - // Show the new magic code / validate code form if - // - A login has been entered or a validateCode has been cached from sign in link - // - AND the login isn't an unvalidated secondary login - // - AND the user is on the 'passwordless' beta - const showValidateCodeForm = - Boolean(this.props.credentials.login || this.props.credentials.validateCode) && !showUnlinkLoginForm && Permissions.canUsePasswordlessLogins(this.props.betas); - - // Show the resend validation link form if - // - A login has been entered - // - AND is not validated or password is forgotten - // - AND the login isn't an unvalidated secondary login - // - AND user is not on 'passwordless' beta - const showResendValidationForm = - Boolean(this.props.credentials.login) && - (!this.props.account.validated || this.props.account.forgotPassword) && - !showUnlinkLoginForm && - !Permissions.canUsePasswordlessLogins(this.props.betas); - - let welcomeHeader = ''; - let welcomeText = ''; - if (showValidateCodeForm) { - if (this.props.account.requiresTwoFactorAuth) { - // We will only know this after a user signs in successfully, without their 2FA code - welcomeHeader = this.props.isSmallScreenWidth ? '' : this.props.translate('welcomeText.welcomeBack'); - welcomeText = this.props.translate('validateCodeForm.enterAuthenticatorCode'); + useEffect(() => Performance.measureTTI(), []); + useEffect(() => { + App.setLocale(Localize.getDevicePreferredLocale()); + }, []); + + const { + shouldShowLoginForm, + shouldShowUnlinkLoginForm, + shouldShowPasswordForm, + shouldShowValidateCodeForm, + shouldShowResendValidationForm, + shouldShowWelcomeHeader, + shouldShowWelcomeText, + } = getRenderOptions({ + hasLogin: Boolean(credentials.login), + hasPassword: Boolean(credentials.password), + hasValidateCode: Boolean(credentials.validateCode), + isPrimaryLogin: !account.primaryLogin || account.primaryLogin === credentials.login, + isAccountValidated: Boolean(account.validated), + didForgetPassword: Boolean(account.forgotPassword), + canUsePasswordlessLogins, + }); + + let welcomeHeader; + let welcomeText; + if (shouldShowValidateCodeForm) { + if (account.requiresTwoFactorAuth) { + // We will only know this after a user signs in successfully, without their 2FA code + welcomeHeader = isSmallScreenWidth ? '' : translate('welcomeText.welcomeBack'); + welcomeText = translate('validateCodeForm.enterAuthenticatorCode'); + } else { + const userLogin = Str.removeSMSDomain(credentials.login || ''); + + // replacing spaces with "hard spaces" to prevent breaking the number + const userLoginToDisplay = Str.isSMSLogin(userLogin) ? formatPhoneNumber(userLogin).replace(/ /g, '\u00A0') : userLogin; + if (account.validated) { + welcomeHeader = isSmallScreenWidth ? '' : translate('welcomeText.welcomeBack'); + welcomeText = isSmallScreenWidth + ? `${translate('welcomeText.welcomeBack')} ${translate('welcomeText.welcomeEnterMagicCode', {login: userLoginToDisplay})}` + : translate('welcomeText.welcomeEnterMagicCode', {login: userLoginToDisplay}); } else { - const userLogin = Str.removeSMSDomain(lodashGet(this.props, 'credentials.login', '')); - - // replacing spaces with "hard spaces" to prevent breaking the number - const userLoginToDisplay = Str.isSMSLogin(userLogin) ? this.props.formatPhoneNumber(userLogin).replace(/ /g, '\u00A0') : userLogin; - if (this.props.account.validated) { - welcomeHeader = this.props.isSmallScreenWidth ? '' : this.props.translate('welcomeText.welcomeBack'); - welcomeText = this.props.isSmallScreenWidth - ? `${this.props.translate('welcomeText.welcomeBack')} ${this.props.translate('welcomeText.welcomeEnterMagicCode', {login: userLoginToDisplay})}` - : this.props.translate('welcomeText.welcomeEnterMagicCode', {login: userLoginToDisplay}); - } else { - welcomeHeader = this.props.isSmallScreenWidth ? '' : this.props.translate('welcomeText.welcome'); - welcomeText = this.props.isSmallScreenWidth - ? `${this.props.translate('welcomeText.welcome')} ${this.props.translate('welcomeText.newFaceEnterMagicCode', {login: userLoginToDisplay})}` - : this.props.translate('welcomeText.newFaceEnterMagicCode', {login: userLoginToDisplay}); - } + welcomeHeader = isSmallScreenWidth ? '' : translate('welcomeText.welcome'); + welcomeText = isSmallScreenWidth + ? `${translate('welcomeText.welcome')} ${translate('welcomeText.newFaceEnterMagicCode', {login: userLoginToDisplay})}` + : translate('welcomeText.newFaceEnterMagicCode', {login: userLoginToDisplay}); } - } else if (showPasswordForm) { - welcomeHeader = this.props.isSmallScreenWidth ? '' : this.props.translate('welcomeText.welcomeBack'); - welcomeText = this.props.isSmallScreenWidth - ? `${this.props.translate('welcomeText.welcomeBack')} ${this.props.translate('welcomeText.enterPassword')}` - : this.props.translate('welcomeText.enterPassword'); - } else if (showUnlinkLoginForm) { - welcomeHeader = this.props.isSmallScreenWidth ? this.props.translate('login.hero.header') : this.props.translate('welcomeText.welcomeBack'); - } else if (!showResendValidationForm) { - welcomeHeader = this.props.isSmallScreenWidth ? this.props.translate('login.hero.header') : this.props.translate('welcomeText.getStarted'); - welcomeText = this.props.isSmallScreenWidth ? this.props.translate('welcomeText.getStarted') : ''; } + } else if (shouldShowPasswordForm) { + welcomeHeader = isSmallScreenWidth ? '' : translate('welcomeText.welcomeBack'); + welcomeText = isSmallScreenWidth ? `${translate('welcomeText.welcomeBack')} ${translate('welcomeText.enterPassword')}` : translate('welcomeText.enterPassword'); + } else if (shouldShowUnlinkLoginForm) { + welcomeHeader = isSmallScreenWidth ? translate('login.hero.header') : translate('welcomeText.welcomeBack'); + } else if (!shouldShowResendValidationForm) { + welcomeHeader = isSmallScreenWidth ? translate('login.hero.header') : translate('welcomeText.getStarted'); + welcomeText = isSmallScreenWidth ? translate('welcomeText.getStarted') : ''; + } else { + Log.warn('SignInPage in unexpected state!'); + } - return ( - // There is an issue SafeAreaView on Android where wrong insets flicker on app start. - // Can be removed once https://github.com/th3rdwave/react-native-safe-area-context/issues/364 is resolved. - - - {/* LoginForm and PasswordForm must use the isVisible prop. This keeps them mounted, but visually hidden + return ( + + + {/* LoginForm and PasswordForm must use the isVisible prop. This keeps them mounted, but visually hidden so that password managers can access the values. Conditionally rendering these components will break this feature. */} - - {showValidateCodeForm ? : } - {showResendValidationForm && } - {showUnlinkLoginForm && } - - - ); - } + + {shouldShowValidateCodeForm ? : } + {shouldShowResendValidationForm && } + {shouldShowUnlinkLoginForm && } + + + ); } SignInPage.propTypes = propTypes; SignInPage.defaultProps = defaultProps; +SignInPage.displayName = 'SignInPage'; -export default compose( - withSafeAreaInsets, - withLocalize, - withWindowDimensions, - withOnyx({ - account: {key: ONYXKEYS.ACCOUNT}, - betas: {key: ONYXKEYS.BETAS}, - credentials: {key: ONYXKEYS.CREDENTIALS}, - }), -)(SignInPage); +export default withOnyx({ + account: {key: ONYXKEYS.ACCOUNT}, + credentials: {key: ONYXKEYS.CREDENTIALS}, +})(SignInPage); From 5cbd46ebd4a8193125d1afbd210b603c67edde64 Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Tue, 13 Jun 2023 22:40:21 +0200 Subject: [PATCH 132/826] 1. Updated componentDidMount stage of ReportActionCompose component. 2. Updated OptionRowLHN with validation for draft message in localstorage --- src/components/LHNOptionsList/OptionRowLHN.js | 21 ++++++++++++++++++- src/pages/home/report/ReportActionCompose.js | 4 ++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index d5759c3f3b1c..437fd6d2cf28 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -2,6 +2,7 @@ import _ from 'underscore'; import React from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import * as optionRowStyles from '../../styles/optionRowStyles'; import styles from '../../styles/styles'; import * as StyleUtils from '../../styles/StyleUtils'; @@ -23,12 +24,18 @@ import PressableWithSecondaryInteraction from '../PressableWithSecondaryInteract import * as ReportActionContextMenu from '../../pages/home/report/ContextMenu/ReportActionContextMenu'; import * as ContextMenuActions from '../../pages/home/report/ContextMenu/ContextMenuActions'; import * as OptionsListUtils from '../../libs/OptionsListUtils'; +import compose from '../../libs/compose'; +import ONYXKEYS from '../../ONYXKEYS'; +import * as Report from '../../libs/actions/Report'; const propTypes = { /** Style for hovered state */ // eslint-disable-next-line react/forbid-prop-types hoverStyle: PropTypes.object, + /** The comment left by the user */ + comment: PropTypes.string, + /** The ID of the report that the option is for */ reportID: PropTypes.string.isRequired, @@ -52,6 +59,7 @@ const defaultProps = { onSelectRow: () => {}, isFocused: false, style: null, + comment: '', }; const OptionRowLHN = (props) => { @@ -85,6 +93,10 @@ const OptionRowLHN = (props) => { const hasBrickError = optionItem.brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR; const shouldShowGreenDotIndicator = !hasBrickError && (optionItem.isUnreadWithMention || (optionItem.hasOutstandingIOU && !optionItem.isIOUReportOwner)); + if (!optionItem.hasDraftComment && props.comment.length > 0 && !props.isFocused) { + Report.setReportWithDraft(props.reportID, true); + } + /** * Show the ReportActionContextMenu modal popover. * @@ -250,4 +262,11 @@ OptionRowLHN.propTypes = propTypes; OptionRowLHN.defaultProps = defaultProps; OptionRowLHN.displayName = 'OptionRowLHN'; -export default withLocalize(OptionRowLHN); +export default compose( + withLocalize, + withOnyx({ + comment: { + key: ({reportID}) => `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${reportID}`, + }, + }), +)(OptionRowLHN); diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index f1f5dab5bf82..9bd4efb75a4d 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -245,6 +245,10 @@ class ReportActionCompose extends React.Component { showPopoverMenu: this.showPopoverMenu, }); } + + if (this.props.comment.length !== 0) { + Report.setReportWithDraft(this.props.reportID, true); + } } componentDidUpdate(prevProps) { From 5a0c26a258a343c7b7e89b94264e479c74e3a19a Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 13 Jun 2023 14:54:34 -0700 Subject: [PATCH 133/826] Implement with Reanimated instead --- src/libs/Navigation/NavigationRoot.js | 43 ++++++++++++--------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 0d45ac156eb4..83801f2cc46c 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -1,8 +1,8 @@ -import React, {useRef, useEffect} from 'react'; +import React, {useRef} from 'react'; import PropTypes from 'prop-types'; import {NavigationContainer, DefaultTheme, getPathFromState} from '@react-navigation/native'; import {useFlipper} from '@react-navigation/devtools'; -import {Animated, Easing} from 'react-native'; +import {useSharedValue, useAnimatedReaction, interpolateColor, withTiming, withDelay, Easing, runOnJS} from 'react-native-reanimated'; import Navigation, {navigationRef} from './Navigation'; import linkingConfig from './linkingConfig'; import AppNavigator from './AppNavigator'; @@ -59,20 +59,15 @@ const NavigationRoot = (props) => { const prevStatusBarBackgroundColor = useRef(themeColors.appBG); const statusBarBackgroundColor = useRef(themeColors.appBG); - const statusBarAnimation = useRef(new Animated.Value(0)); - - useEffect(() => { - const animation = statusBarAnimation.current; - animation.addListener(() => { - const colorObj = animation.interpolate({ - inputRange: [0, 1], - outputRange: [prevStatusBarBackgroundColor.current, statusBarBackgroundColor.current], - }); - // eslint-disable-next-line no-underscore-dangle - StatusBar.setBackgroundColor(colorObj.__getValue()); - }); - return () => animation.removeAllListeners(); - }, []); + const statusBarAnimation = useSharedValue(0); + + useAnimatedReaction( + () => statusBarAnimation.value, + () => { + const color = interpolateColor(statusBarAnimation.value, [0, 1], [prevStatusBarBackgroundColor.current, statusBarBackgroundColor.current]); + runOnJS(StatusBar.setBackgroundColor)(color); + }, + ); const animateStatusBarBackgroundColor = () => { const currentRoute = navigationRef.getCurrentRoute(); @@ -84,14 +79,14 @@ const NavigationRoot = (props) => { return; } - statusBarAnimation.current.setValue(0); - Animated.timing(statusBarAnimation.current, { - toValue: 1, - duration: 300, - delay: 300, - easing: Easing.in(Easing.ease), - useNativeDriver: false, - }).start(); + statusBarAnimation.value = 0; + statusBarAnimation.value = withDelay( + 300, + withTiming(1, { + duration: 300, + easing: Easing.in, + }), + ); }; const updateSavedNavigationStateAndLogRoute = (state) => { From bb88c621a6d5c4b64b4ab735181b4f35e1182388 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Jun 2023 13:47:28 -1000 Subject: [PATCH 134/826] check reports and policies --- src/libs/actions/App.js | 50 +++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index aa83a8a11d51..56cfb5109983 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -138,17 +138,50 @@ AppState.addEventListener('change', (nextAppState) => { appState = nextAppState; }); -/** - * Fetches data needed for app initialization - */ -function openApp() { - isReadyToOpenApp.then(() => { - // We need a fresh connection/callback here to make sure that the list of policyIDs that is sent to OpenApp is the most updated list from Onyx +function getPolicies() { + return new Promise((resolve) => { const connectionID = Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY, waitForCollectionCallback: true, callback: (policies) => { Onyx.disconnect(connectionID); + resolve(policies); + }, + }); + }); +} +function getCollection(key) { + return new Promise((resolve) => { + const connectionID = Onyx.connect({ + key, + waitForCollectionCallback: true, + callback: (reports) => { + Onyx.disconnect(connectionID); + resolve(reports); + }, + }); + }); +} + +function getReports() { +} + +/** + * Fetches data needed for app initialization + */ +function openApp() { + let hasExistingReportData = false; + isReadyToOpenApp.then(() => + // If we are opening the app after a first sign in then we will have no data whatsoever. This is easily checked by looking to see if + // the user has any report data at all. All users should have at least one report with Concierge so this is a reliable way to check if + // we are signing in the first time or if the app is being opened after it was killed or the page refreshed. + getCollection(ONYXKEYS.COLLECTION.REPORT) + .then((reports) => { + console.log({reports}); + hasExistingReportData = !_.isEmpty(reports); + return getCollection(ONYXKEYS.COLLECTION.POLICY); + }) + .then((policies) => { API.read( 'OpenApp', {policyIDList: getNonOptimisticPolicyIDs(policies)}, @@ -176,9 +209,8 @@ function openApp() { ], }, ); - }, - }); - }); + }) + ); } /** From ec5a7962c0f68fe415738206c10e93622c37a450 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Jun 2023 15:15:46 -1000 Subject: [PATCH 135/826] no app changes --- src/libs/actions/App.js | 58 +++++++---------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 556c7696eea7..eccf2623f7f5 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -15,7 +15,6 @@ import ROUTES from '../../ROUTES'; import * as SessionUtils from '../SessionUtils'; import getCurrentUrl from '../Navigation/currentUrl'; import * as Session from './Session'; -import * as ReportActionsUtils from '../ReportActionsUtils'; let currentUserAccountID; let currentUserEmail; @@ -138,50 +137,17 @@ AppState.addEventListener('change', (nextAppState) => { appState = nextAppState; }); -function getPolicies() { - return new Promise((resolve) => { +/** + * Fetches data needed for app initialization + */ +function openApp() { + isReadyToOpenApp.then(() => { + // We need a fresh connection/callback here to make sure that the list of policyIDs that is sent to OpenApp is the most updated list from Onyx const connectionID = Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY, waitForCollectionCallback: true, callback: (policies) => { Onyx.disconnect(connectionID); - resolve(policies); - }, - }); - }); -} -function getCollection(key) { - return new Promise((resolve) => { - const connectionID = Onyx.connect({ - key, - waitForCollectionCallback: true, - callback: (reports) => { - Onyx.disconnect(connectionID); - resolve(reports); - }, - }); - }); -} - -function getReports() { -} - -/** - * Fetches data needed for app initialization - */ -function openApp() { - let hasExistingReportData = false; - isReadyToOpenApp.then(() => - // If we are opening the app after a first sign in then we will have no data whatsoever. This is easily checked by looking to see if - // the user has any report data at all. All users should have at least one report with Concierge so this is a reliable way to check if - // we are signing in the first time or if the app is being opened after it was killed or the page refreshed. - getCollection(ONYXKEYS.COLLECTION.REPORT) - .then((reports) => { - console.log({reports}); - hasExistingReportData = !_.isEmpty(reports); - return getCollection(ONYXKEYS.COLLECTION.POLICY); - }) - .then((policies) => { API.read( 'OpenApp', {policyIDList: getNonOptimisticPolicyIDs(policies)}, @@ -209,22 +175,18 @@ function openApp() { ], }, ); - }) - ); + }, + }); + }); } /** * Refreshes data when the app reconnects */ function reconnectApp() { - // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID - // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. - // - // - Look through the local report actions to find the most recently modified report action - // - We Send this to the server so that it can compute which chats are critical for the user to see so we can update them in the LHN API.write( CONST.NETWORK.COMMAND.RECONNECT_APP, - {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, + {policyIDList: getNonOptimisticPolicyIDs(allPolicies)}, { optimisticData: [ { From 79feeef15079076e609314cc1d0a8c1a002b1cb5 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Jun 2023 15:16:50 -1000 Subject: [PATCH 136/826] Revert "no app changes" This reverts commit ec5a7962c0f68fe415738206c10e93622c37a450. --- src/libs/actions/App.js | 58 ++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index eccf2623f7f5..556c7696eea7 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -15,6 +15,7 @@ import ROUTES from '../../ROUTES'; import * as SessionUtils from '../SessionUtils'; import getCurrentUrl from '../Navigation/currentUrl'; import * as Session from './Session'; +import * as ReportActionsUtils from '../ReportActionsUtils'; let currentUserAccountID; let currentUserEmail; @@ -137,17 +138,50 @@ AppState.addEventListener('change', (nextAppState) => { appState = nextAppState; }); -/** - * Fetches data needed for app initialization - */ -function openApp() { - isReadyToOpenApp.then(() => { - // We need a fresh connection/callback here to make sure that the list of policyIDs that is sent to OpenApp is the most updated list from Onyx +function getPolicies() { + return new Promise((resolve) => { const connectionID = Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY, waitForCollectionCallback: true, callback: (policies) => { Onyx.disconnect(connectionID); + resolve(policies); + }, + }); + }); +} +function getCollection(key) { + return new Promise((resolve) => { + const connectionID = Onyx.connect({ + key, + waitForCollectionCallback: true, + callback: (reports) => { + Onyx.disconnect(connectionID); + resolve(reports); + }, + }); + }); +} + +function getReports() { +} + +/** + * Fetches data needed for app initialization + */ +function openApp() { + let hasExistingReportData = false; + isReadyToOpenApp.then(() => + // If we are opening the app after a first sign in then we will have no data whatsoever. This is easily checked by looking to see if + // the user has any report data at all. All users should have at least one report with Concierge so this is a reliable way to check if + // we are signing in the first time or if the app is being opened after it was killed or the page refreshed. + getCollection(ONYXKEYS.COLLECTION.REPORT) + .then((reports) => { + console.log({reports}); + hasExistingReportData = !_.isEmpty(reports); + return getCollection(ONYXKEYS.COLLECTION.POLICY); + }) + .then((policies) => { API.read( 'OpenApp', {policyIDList: getNonOptimisticPolicyIDs(policies)}, @@ -175,18 +209,22 @@ function openApp() { ], }, ); - }, - }); - }); + }) + ); } /** * Refreshes data when the app reconnects */ function reconnectApp() { + // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID + // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. + // + // - Look through the local report actions to find the most recently modified report action + // - We Send this to the server so that it can compute which chats are critical for the user to see so we can update them in the LHN API.write( CONST.NETWORK.COMMAND.RECONNECT_APP, - {policyIDList: getNonOptimisticPolicyIDs(allPolicies)}, + {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, { optimisticData: [ { From e1ddfc22cb6da1dbe99415d68b5a0b07b8536cdf Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Jun 2023 15:19:25 -1000 Subject: [PATCH 137/826] revert stuff --- src/libs/actions/App.js | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 556c7696eea7..a07087379ab3 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -150,38 +150,17 @@ function getPolicies() { }); }); } -function getCollection(key) { - return new Promise((resolve) => { - const connectionID = Onyx.connect({ - key, - waitForCollectionCallback: true, - callback: (reports) => { - Onyx.disconnect(connectionID); - resolve(reports); - }, - }); - }); -} - -function getReports() { -} /** * Fetches data needed for app initialization */ function openApp() { - let hasExistingReportData = false; - isReadyToOpenApp.then(() => - // If we are opening the app after a first sign in then we will have no data whatsoever. This is easily checked by looking to see if - // the user has any report data at all. All users should have at least one report with Concierge so this is a reliable way to check if - // we are signing in the first time or if the app is being opened after it was killed or the page refreshed. - getCollection(ONYXKEYS.COLLECTION.REPORT) - .then((reports) => { - console.log({reports}); - hasExistingReportData = !_.isEmpty(reports); - return getCollection(ONYXKEYS.COLLECTION.POLICY); - }) - .then((policies) => { + isReadyToOpenApp.then(() => { + const connectionID = Onyx.connect({ + key: ONYXKEYS.POLICY, + waitForCollectionCallback: true, + callback: (policies) => { + Onyx.disconnect(connectionID); API.read( 'OpenApp', {policyIDList: getNonOptimisticPolicyIDs(policies)}, @@ -209,8 +188,9 @@ function openApp() { ], }, ); - }) - ); + }, + }); + }); } /** From 2ac3528f15c86b1a6531a1e902f09e0a5c29b715 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Jun 2023 15:19:44 -1000 Subject: [PATCH 138/826] revert more stuff --- src/libs/actions/App.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index a07087379ab3..e20188cabbe5 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -138,19 +138,6 @@ AppState.addEventListener('change', (nextAppState) => { appState = nextAppState; }); -function getPolicies() { - return new Promise((resolve) => { - const connectionID = Onyx.connect({ - key: ONYXKEYS.COLLECTION.POLICY, - waitForCollectionCallback: true, - callback: (policies) => { - Onyx.disconnect(connectionID); - resolve(policies); - }, - }); - }); -} - /** * Fetches data needed for app initialization */ From 6adf6de408d27e415ae924f638c52c962333ed2a Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 13 Jun 2023 15:20:07 -1000 Subject: [PATCH 139/826] More --- src/libs/actions/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index e20188cabbe5..308c01e3da6a 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -143,8 +143,9 @@ AppState.addEventListener('change', (nextAppState) => { */ function openApp() { isReadyToOpenApp.then(() => { + // We need a fresh connection/callback here to make sure that the list of policyIDs that is sent to OpenApp is the most updated list from Onyx const connectionID = Onyx.connect({ - key: ONYXKEYS.POLICY, + key: ONYXKEYS.COLLECTION.POLICY, waitForCollectionCallback: true, callback: (policies) => { Onyx.disconnect(connectionID); From ee20216ce864e974f55f4685f29033803527b762 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 14 Jun 2023 10:29:49 +0700 Subject: [PATCH 140/826] fix: remain focus when selecting option --- src/components/OptionRow.js | 1 + src/components/OptionsList/BaseOptionsList.js | 1 + src/components/OptionsSelector/BaseOptionsSelector.js | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/src/components/OptionRow.js b/src/components/OptionRow.js index 28ee50ccf8a1..4dfbc7462041 100644 --- a/src/components/OptionRow.js +++ b/src/components/OptionRow.js @@ -183,6 +183,7 @@ class OptionRow extends Component { hoverDimmingValue={1} hoverStyle={this.props.hoverStyle} focusStyle={this.props.hoverStyle} + onMouseDown={this.props.onRowMouseDown} > diff --git a/src/components/OptionsList/BaseOptionsList.js b/src/components/OptionsList/BaseOptionsList.js index df14af5234bd..4b3df3c900ed 100644 --- a/src/components/OptionsList/BaseOptionsList.js +++ b/src/components/OptionsList/BaseOptionsList.js @@ -174,6 +174,7 @@ class BaseOptionsList extends Component { isDisabled={isDisabled} shouldHaveOptionSeparator={index > 0 && this.props.shouldHaveOptionSeparator} shouldDisableRowInnerPadding={this.props.shouldDisableRowInnerPadding} + onRowMouseDown={this.props.onRowMouseDown} /> ); } diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index f64c5975b986..c079a78eb779 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -261,6 +261,7 @@ class BaseOptionsSelector extends Component { * @returns {Promise} */ selectRow(option, ref) { + console.log("selectRow") return new Promise((resolve) => { if (this.props.shouldShowTextInput && this.props.shouldFocusOnSelectRow) { if (this.relatedTarget && ref === this.relatedTarget) { @@ -337,6 +338,14 @@ class BaseOptionsSelector extends Component { contentContainerStyles={[safeAreaPaddingBottomStyle, ...this.props.contentContainerStyles]} listContainerStyles={this.props.listContainerStyles} isLoading={!this.props.shouldShowOptions} + onRowMouseDown={(e) => { + if (!e || !this.textInput.isFocused()) { + return; + } + console.log("onRowMouseDown") + + e.preventDefault(); + }} /> ); return ( From ab6dd45d1bb3d44c6b035e3e9dabe7892862c80e Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 14 Jun 2023 11:43:59 +0700 Subject: [PATCH 141/826] fix: lint --- src/components/OptionsSelector/BaseOptionsSelector.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index c079a78eb779..8815cb1a0a2d 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -261,7 +261,7 @@ class BaseOptionsSelector extends Component { * @returns {Promise} */ selectRow(option, ref) { - console.log("selectRow") + console.log('selectRow'); return new Promise((resolve) => { if (this.props.shouldShowTextInput && this.props.shouldFocusOnSelectRow) { if (this.relatedTarget && ref === this.relatedTarget) { @@ -342,8 +342,8 @@ class BaseOptionsSelector extends Component { if (!e || !this.textInput.isFocused()) { return; } - console.log("onRowMouseDown") - + console.log('onRowMouseDown'); + e.preventDefault(); }} /> From 0debd1ca3206ad1f8c4a481e8294d3e799019e9b Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 14 Jun 2023 11:44:38 +0700 Subject: [PATCH 142/826] fix: lint --- src/components/OptionsSelector/BaseOptionsSelector.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index 8815cb1a0a2d..f65e82def619 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -342,8 +342,6 @@ class BaseOptionsSelector extends Component { if (!e || !this.textInput.isFocused()) { return; } - console.log('onRowMouseDown'); - e.preventDefault(); }} /> From 59a6ffcba892e7243761cf8251a3c4cf37384d23 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 14 Jun 2023 11:45:20 +0700 Subject: [PATCH 143/826] fix: lint --- src/components/OptionsSelector/BaseOptionsSelector.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/OptionsSelector/BaseOptionsSelector.js b/src/components/OptionsSelector/BaseOptionsSelector.js index f65e82def619..887d2f4923ba 100755 --- a/src/components/OptionsSelector/BaseOptionsSelector.js +++ b/src/components/OptionsSelector/BaseOptionsSelector.js @@ -261,7 +261,6 @@ class BaseOptionsSelector extends Component { * @returns {Promise} */ selectRow(option, ref) { - console.log('selectRow'); return new Promise((resolve) => { if (this.props.shouldShowTextInput && this.props.shouldFocusOnSelectRow) { if (this.relatedTarget && ref === this.relatedTarget) { From d4de81485a63997743c871a9d94f58d27173f54d Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 13 Jun 2023 21:52:35 -0700 Subject: [PATCH 144/826] Use function keyword --- src/components/EmojiPicker/EmojiPicker.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 58d32ad6a3fb..fc99cd8205f4 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -21,7 +21,7 @@ const propTypes = { ...viewportOffsetTopPropTypes, }; -const EmojiPicker = forwardRef((props, ref) => { +function EmojiPicker(props, ref) { const [isEmojiPickerVisible, setIsEmojiPickerVisible] = useState(false); const [emojiPopoverAnchorPosition, setEmojiPopoverAnchorPosition] = useState({ horizontal: 0, @@ -152,7 +152,8 @@ const EmojiPicker = forwardRef((props, ref) => { /> ); -}); +} EmojiPicker.propTypes = propTypes; -export default compose(withViewportOffsetTop, withWindowDimensions)(EmojiPicker); +EmojiPicker.displayName = 'EmojiPicker'; +export default compose(withViewportOffsetTop, withWindowDimensions)(forwardRef(EmojiPicker)); From 258c53b50a920c87c4a83aa847a54edc89928147 Mon Sep 17 00:00:00 2001 From: tienifr Date: Wed, 14 Jun 2023 12:19:36 +0700 Subject: [PATCH 145/826] revert getReportIdFromRoute --- src/libs/Navigation/Navigation.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index 237de4aed570..d61eb7143de0 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -175,7 +175,9 @@ function getReportIDFromRoute() { return ''; } - return lodashGet(navigationRef.current.getCurrentRoute(), ['params', 'reportID'], ''); + const drawerState = lodashGet(navigationRef.current.getState(), ['routes', 0, 'state']); + const reportRoute = lodashGet(drawerState, ['routes', 0]); + return lodashGet(reportRoute, ['params', 'reportID'], ''); } /** From ca27f0d073b6815b540f8917df942f326ac49f41 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 14 Jun 2023 13:55:27 +0300 Subject: [PATCH 146/826] Refactor after rebasing - move `Report_Attachments` to `CentralPaneNavigator` --- src/libs/Navigation/AppNavigator/AuthScreens.js | 10 ---------- .../AppNavigator/Navigators/CentralPaneNavigator.js | 10 ++++++++++ src/libs/Navigation/linkingConfig.js | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index 385290943299..8539f384504c 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -261,16 +261,6 @@ class AuthScreens extends React.Component { component={RightModalNavigator} listeners={modalScreenListeners} /> - - { - const ReportAttachments = require('../../../pages/home/report/ReportAttachments').default; - return ReportAttachments; - }} - listeners={modalScreenListeners} - /> ); } diff --git a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js index 471be5c7209c..188f152bc089 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/CentralPaneNavigator.js @@ -28,6 +28,16 @@ function CentralPaneNavigator() { }} component={ReportScreenWrapper} /> + { + const ReportAttachments = require('../../../../pages/home/report/ReportAttachments').default; + return ReportAttachments; + }} + /> ); diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index a8c1e8abdeff..3f63deedde7c 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -341,7 +341,6 @@ export default { }, }, }, - [SCREENS.NOT_FOUND]: '*', }, }, }; From 917196246bfc300a749723aaae7963065c7d94fa Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 14 Jun 2023 18:35:18 +0700 Subject: [PATCH 147/826] Add a new utils to get money request message --- .../ReportActionItem/ReportPreview.js | 2 +- src/libs/ReportUtils.js | 22 ++++++++++++++++--- src/libs/SidebarUtils.js | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 267fce89d16c..fab462ed02cd 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -97,7 +97,7 @@ const ReportPreview = (props) => { const managerEmail = props.iouReport.managerEmail || ''; const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); - const displayingMessage = ReportUtils.getMoneyRequestReportName(props.iouReport, true); + const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport); return ( {_.map(props.action.message, (message, index) => ( diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 12e461e3aaf8..93694eb4041e 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -939,12 +939,11 @@ function getPolicyExpenseChatName(report) { * Get the title for a IOU or expense chat which will be showing the payer and the amount * * @param {Object} report - * @param {Boolean} [shouldUseDisplayNameShortForm] * @returns {String} */ -function getMoneyRequestReportName(report, shouldUseDisplayNameShortForm = false) { +function getMoneyRequestReportName(report) { const formattedAmount = CurrencyUtils.convertToDisplayString(getMoneyRequestTotal(report), report.currency); - const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail, shouldUseDisplayNameShortForm); + const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail); return Localize.translateLocal(report.hasOutstandingIOU ? 'iou.payerOwesAmount' : 'iou.payerPaidAmount', {payer: payerName, amount: formattedAmount}); } @@ -962,6 +961,22 @@ function getTransactionReportName(reportAction) { }); } +/** + * Get money request message for a IOU report + * + * @param {Object} iouReport + * @returns {String} + */ +function getMoneyRequestReportActionMessage(iouReport) { + const formattedAmount = CurrencyUtils.convertToDisplayString(getMoneyRequestTotal(iouReport), iouReport.currency); + const payerName = isExpenseReport(iouReport) ? getPolicyName(iouReport) : getDisplayNameForParticipant(iouReport.managerEmail, true); + + if (iouReport.hasOutstandingIOU) { + return Localize.translateLocal('iou.payerOwesAmount', {payer: payerName, amount: formattedAmount}); + } + return Localize.translateLocal('iou.payerSettled', {amount: formattedAmount}); +} + /** * Get the title for a report. * @@ -2268,4 +2283,5 @@ export { getBankAccountRoute, getParentReport, getMoneyRequestReportName, + getMoneyRequestReportActionMessage, }; diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index fa8333d86941..3aaa070db338 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -271,7 +271,7 @@ function getOptionData(reportID) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; } else if (ReportActionsUtils.isReportReviewAction(lastReportActions[report.reportID])) { const iouReport = ReportUtils.getReport(report.iouReportID); - lastMessageTextFromReport = ReportUtils.getMoneyRequestReportName(iouReport, true); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; } From 0da6a76e8ef2831183ae33e1f1729a4b1fd7357a Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 14 Jun 2023 18:36:43 +0700 Subject: [PATCH 148/826] remove redundant export --- src/libs/ReportUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 93694eb4041e..43d1506c5ef3 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2282,6 +2282,5 @@ export { getMoneyRequestAction, getBankAccountRoute, getParentReport, - getMoneyRequestReportName, getMoneyRequestReportActionMessage, }; From d5c6e4ccabcaaa1497c7e1330458d509620af2eb Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 14 Jun 2023 15:40:48 +0300 Subject: [PATCH 149/826] Refactor after rebasing - move `Report_Attachments` to root navigation Otherwise, when closing the modal there's a blank screen displayed briefly It seems the previous screen does not stay underneath the modal unless it's on the root --- .../Navigation/AppNavigator/AuthScreens.js | 12 ++++++++ .../Navigators/CentralPaneNavigator.js | 10 ------- src/libs/Navigation/Navigation.js | 29 +++++++++++-------- src/libs/Navigation/linkingConfig.js | 2 +- src/pages/home/report/ReportAttachments.js | 2 +- 5 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index 8539f384504c..735f531bcaef 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -250,6 +250,18 @@ class AuthScreens extends React.Component { return ConciergePage; }} /> + { + const ReportAttachments = require('../../../pages/home/report/ReportAttachments').default; + return ReportAttachments; + }} + listeners={modalScreenListeners} + /> - { - const ReportAttachments = require('../../../../pages/home/report/ReportAttachments').default; - return ReportAttachments; - }} - /> ); diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index d61eb7143de0..cf9b7b979daf 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -132,19 +132,24 @@ function dismissModal(targetReportID) { } const rootState = navigationRef.getRootState(); const lastRoute = _.last(rootState.routes); - if (lastRoute.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR || lastRoute.name === NAVIGATORS.FULL_SCREEN_NAVIGATOR) { - // if we are not in the target report, we need to navigate to it after dismissing the modal - if (targetReportID && targetReportID !== getTopmostReportId(rootState)) { - const state = getStateFromPath(ROUTES.getReportRoute(targetReportID)); - - const action = getActionFromState(state, linkingConfig.config); - action.type = 'REPLACE'; - navigationRef.current.dispatch(action); - } else { - navigationRef.current.dispatch(StackActions.pop()); + switch (lastRoute.name) { + case NAVIGATORS.RIGHT_MODAL_NAVIGATOR: + case NAVIGATORS.FULL_SCREEN_NAVIGATOR: + case 'Report_Attachments': + // if we are not in the target report, we need to navigate to it after dismissing the modal + if (targetReportID && targetReportID !== getTopmostReportId(rootState)) { + const state = getStateFromPath(ROUTES.getReportRoute(targetReportID)); + + const action = getActionFromState(state, linkingConfig.config); + action.type = 'REPLACE'; + navigationRef.current.dispatch(action); + } else { + navigationRef.current.dispatch(StackActions.pop()); + } + break; + default: { + Log.hmmm('[Navigation] dismissModal failed because there is no modal stack to dismiss'); } - } else { - Log.hmmm('[Navigation] dismissModal failed because there is no modal stack to dismiss'); } } diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 3f63deedde7c..a4a142658236 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -14,6 +14,7 @@ export default { UnlinkLogin: ROUTES.UNLINK_LOGIN, [SCREENS.TRANSITION_FROM_OLD_DOT]: ROUTES.TRANSITION_FROM_OLD_DOT, Concierge: ROUTES.CONCIERGE, + Report_Attachments: ROUTES.REPORT_ATTACHMENT, // Sidebar [SCREENS.HOME]: { @@ -23,7 +24,6 @@ export default { [NAVIGATORS.CENTRAL_PANE_NAVIGATOR]: { screens: { [SCREENS.REPORT]: ROUTES.REPORT_WITH_ID, - Report_Attachments: ROUTES.REPORT_ATTACHMENT, }, }, [NAVIGATORS.FULL_SCREEN_NAVIGATOR]: { diff --git a/src/pages/home/report/ReportAttachments.js b/src/pages/home/report/ReportAttachments.js index b591a8740a4e..203ba3d8c93e 100644 --- a/src/pages/home/report/ReportAttachments.js +++ b/src/pages/home/report/ReportAttachments.js @@ -27,7 +27,7 @@ function ReportAttachments(props) { defaultOpen reportID={reportID} source={source} - onModalHide={Navigation.dismissModal} + onModalHide={() => Navigation.dismissModal(reportID)} /> ); } From 3d5bc852356f98109d91b64bcb4b42c0548859de Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Wed, 14 Jun 2023 15:53:47 +0300 Subject: [PATCH 150/826] Refactor: extract "Report_Attachments" string to SCREENS --- src/ROUTES.js | 2 +- src/SCREENS.js | 1 + src/libs/Navigation/AppNavigator/AuthScreens.js | 2 +- src/libs/Navigation/Navigation.js | 3 ++- src/libs/Navigation/linkingConfig.js | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ROUTES.js b/src/ROUTES.js index ad8608593614..4c3f24b08bd4 100644 --- a/src/ROUTES.js +++ b/src/ROUTES.js @@ -68,7 +68,7 @@ export default { getReportRoute: (reportID) => `r/${reportID}`, REPORT_WITH_ID_DETAILS_SHARE_CODE: 'r/:reportID/details/shareCode', getReportShareCodeRoute: (reportID) => `r/${reportID}/details/shareCode`, - REPORT_ATTACHMENT: 'r/:reportID/attachment', + REPORT_ATTACHMENTS: 'r/:reportID/attachment', getReportAttachmentRoute: (reportID, source) => `r/${reportID}/attachment?source=${encodeURI(source)}`, SELECT_YEAR: 'select-year', getYearSelectionRoute: (minYear, maxYear, currYear, backTo) => `select-year?min=${minYear}&max=${maxYear}&year=${currYear}&backTo=${backTo}`, diff --git a/src/SCREENS.js b/src/SCREENS.js index 24ea27fe9689..aec13a490376 100644 --- a/src/SCREENS.js +++ b/src/SCREENS.js @@ -6,6 +6,7 @@ export default { HOME: 'Home', LOADING: 'Loading', REPORT: 'Report', + REPORT_ATTACHMENTS: 'ReportAttachments', NOT_FOUND: 'not-found', TRANSITION_FROM_OLD_DOT: 'TransitionFromOldDot', }; diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index 735f531bcaef..edac1d1638bf 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -251,7 +251,7 @@ class AuthScreens extends React.Component { }} /> { @@ -135,7 +136,7 @@ function dismissModal(targetReportID) { switch (lastRoute.name) { case NAVIGATORS.RIGHT_MODAL_NAVIGATOR: case NAVIGATORS.FULL_SCREEN_NAVIGATOR: - case 'Report_Attachments': + case SCREENS.REPORT_ATTACHMENTS: // if we are not in the target report, we need to navigate to it after dismissing the modal if (targetReportID && targetReportID !== getTopmostReportId(rootState)) { const state = getStateFromPath(ROUTES.getReportRoute(targetReportID)); diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index a4a142658236..33a35fc25e69 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -14,7 +14,7 @@ export default { UnlinkLogin: ROUTES.UNLINK_LOGIN, [SCREENS.TRANSITION_FROM_OLD_DOT]: ROUTES.TRANSITION_FROM_OLD_DOT, Concierge: ROUTES.CONCIERGE, - Report_Attachments: ROUTES.REPORT_ATTACHMENT, + [SCREENS.REPORT_ATTACHMENTS]: ROUTES.REPORT_ATTACHMENTS, // Sidebar [SCREENS.HOME]: { From 644d71f890ffc63d203121a0886b7df43e43b08a Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 14 Jun 2023 21:14:01 +0700 Subject: [PATCH 151/826] Fix settled message is 0 amount in LHN --- src/libs/ReportActionsUtils.js | 11 +++++++++++ src/libs/SidebarUtils.js | 3 ++- src/pages/home/report/ReportActionItem.js | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 91073e248400..c5c540d124ad 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -425,6 +425,16 @@ function getReportPreviewAction(chatReportID, iouReportID) { ); } +/** + * Get the iouReportID for a given report action. + * + * @param {*} reportAction + * @returns {String} + */ +function getIouReportID(reportAction) { + return lodashGet(reportAction, 'originalMessage.linkedReportID', ''); +} + function isCreatedTaskReportAction(reportAction) { return reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && _.has(reportAction.originalMessage, 'taskReportID'); } @@ -452,4 +462,5 @@ export { getFormattedAmount, isSentMoneyReportAction, isReportReviewAction, + getIouReportID, }; diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 3aaa070db338..2585688131b0 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -270,7 +270,8 @@ function getOptionData(reportID) { if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; } else if (ReportActionsUtils.isReportReviewAction(lastReportActions[report.reportID])) { - const iouReport = ReportUtils.getReport(report.iouReportID); + const iouReportID = ReportActionsUtils.getIouReportID(lastReportActions[report.reportID]); + const iouReport = ReportUtils.getReport(iouReportID); lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index c0c335ca5efe..51dd30a36940 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -227,7 +227,7 @@ function ReportActionItem(props) { } else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) { children = ( Date: Wed, 14 Jun 2023 21:58:22 +0700 Subject: [PATCH 152/826] Fix amount is 0 after sign in --- .../ReportActionItem/ReportPreview.js | 2 +- src/libs/ReportUtils.js | 27 ++++++++++++++----- src/libs/SidebarUtils.js | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 33fd81dbe987..81b18caf99fb 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -97,7 +97,7 @@ function ReportPreview(props) { const managerEmail = props.iouReport.managerEmail || ''; const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); - const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport); + const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport, props.action) return ( {_.map(props.action.message, (message, index) => ( diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 43d1506c5ef3..ce87c625826e 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -964,14 +964,29 @@ function getTransactionReportName(reportAction) { /** * Get money request message for a IOU report * - * @param {Object} iouReport + * @param {Object} report + * @param {Object} reportAction * @returns {String} */ -function getMoneyRequestReportActionMessage(iouReport) { - const formattedAmount = CurrencyUtils.convertToDisplayString(getMoneyRequestTotal(iouReport), iouReport.currency); - const payerName = isExpenseReport(iouReport) ? getPolicyName(iouReport) : getDisplayNameForParticipant(iouReport.managerEmail, true); - - if (iouReport.hasOutstandingIOU) { +function getMoneyRequestReportActionMessage(report, reportAction) { + let formattedAmount = null; + let isHavingOustandingIOU = null; + const totalAmount = getMoneyRequestTotal(report); + const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail, true); + + if (totalAmount > 0) { + formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency); + isHavingOustandingIOU = report.hasOutstandingIOU; + } else { + const reportActionMessage = lodashGet(reportAction, 'message[0].html', ''); + + // The totalAmount is 0 after sign in/sign up because OpenApp API won't return iouReports if it's paid, so we need to retrieve it from the reportActionMessage + // reportActionMessage is in the format of either "payer@mail.com paid $1.00" or "paid $1.00" + formattedAmount = _.last(reportActionMessage.split(' ')); + isHavingOustandingIOU = Boolean(reportActionMessage.match(/ paid /)); + } + + if (isHavingOustandingIOU) { return Localize.translateLocal('iou.payerOwesAmount', {payer: payerName, amount: formattedAmount}); } return Localize.translateLocal('iou.payerSettled', {amount: formattedAmount}); diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 2585688131b0..bf1405e34f83 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -272,7 +272,7 @@ function getOptionData(reportID) { } else if (ReportActionsUtils.isReportReviewAction(lastReportActions[report.reportID])) { const iouReportID = ReportActionsUtils.getIouReportID(lastReportActions[report.reportID]); const iouReport = ReportUtils.getReport(iouReportID); - lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportActions[report.reportID]); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; } From e3291733f7e85099ed85f13030992f8e983918be Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 14 Jun 2023 22:11:04 +0700 Subject: [PATCH 153/826] Fix linter --- src/components/ReportActionItem/ReportPreview.js | 2 +- src/libs/ReportActionsUtils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 81b18caf99fb..666ec99287c6 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -97,7 +97,7 @@ function ReportPreview(props) { const managerEmail = props.iouReport.managerEmail || ''; const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); - const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport, props.action) + const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport, props.action); return ( {_.map(props.action.message, (message, index) => ( diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index c5c540d124ad..357147371345 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -427,7 +427,7 @@ function getReportPreviewAction(chatReportID, iouReportID) { /** * Get the iouReportID for a given report action. - * + * * @param {*} reportAction * @returns {String} */ From caa45ea3d8078ef22f96f9411f0862685b442e6f Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 15 Jun 2023 10:44:44 +0700 Subject: [PATCH 154/826] Fix checking isHavingOustandingIOU --- src/libs/ReportUtils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index ce87c625826e..c8c80b96d842 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -980,10 +980,10 @@ function getMoneyRequestReportActionMessage(report, reportAction) { } else { const reportActionMessage = lodashGet(reportAction, 'message[0].html', ''); - // The totalAmount is 0 after sign in/sign up because OpenApp API won't return iouReports if it's paid, so we need to retrieve it from the reportActionMessage - // reportActionMessage is in the format of either "payer@mail.com paid $1.00" or "paid $1.00" + // The totalAmount is 0 after Sign in because OpenApp API won't return iouReports if it's paid, so we need to retrieve it from the reportActionMessage + // reportActionMessage is in the format of either "payer@mail.com owes $1.00" or "paid $1.00" formattedAmount = _.last(reportActionMessage.split(' ')); - isHavingOustandingIOU = Boolean(reportActionMessage.match(/ paid /)); + isHavingOustandingIOU = Boolean(reportActionMessage.match(/ owes /)); } if (isHavingOustandingIOU) { From b57b89795ff87bc354fda16c1a5af1b46787dfbb Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 15 Jun 2023 10:47:49 +0700 Subject: [PATCH 155/826] Correct the method name --- src/libs/ReportActionsUtils.js | 8 ++++---- src/libs/SidebarUtils.js | 4 ++-- src/pages/home/report/ReportActionItem.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 357147371345..164d6ea7d32e 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -60,7 +60,7 @@ function isMoneyRequestAction(reportAction) { * @param {Object} reportAction * @returns {Boolean} */ -function isReportReviewAction(reportAction) { +function isReportPreviewAction(reportAction) { return lodashGet(reportAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; } @@ -431,7 +431,7 @@ function getReportPreviewAction(chatReportID, iouReportID) { * @param {*} reportAction * @returns {String} */ -function getIouReportID(reportAction) { +function getIOUReportID(reportAction) { return lodashGet(reportAction, 'originalMessage.linkedReportID', ''); } @@ -461,6 +461,6 @@ export { isTransactionThread, getFormattedAmount, isSentMoneyReportAction, - isReportReviewAction, - getIouReportID, + isReportPreviewAction, + getIOUReportID, }; diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index bf1405e34f83..d8acdfbdb597 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -269,8 +269,8 @@ function getOptionData(reportID) { let lastMessageTextFromReport = ''; if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; - } else if (ReportActionsUtils.isReportReviewAction(lastReportActions[report.reportID])) { - const iouReportID = ReportActionsUtils.getIouReportID(lastReportActions[report.reportID]); + } else if (ReportActionsUtils.isReportPreviewAction(lastReportActions[report.reportID])) { + const iouReportID = ReportActionsUtils.getIOUReportID(lastReportActions[report.reportID]); const iouReport = ReportUtils.getReport(iouReportID); lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportActions[report.reportID]); } else { diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 1d2a4851fa0c..74d5d72f5f19 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -231,7 +231,7 @@ function ReportActionItem(props) { } else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) { children = ( Date: Thu, 15 Jun 2023 10:55:31 +0700 Subject: [PATCH 156/826] Refactor as feedbacks --- src/libs/SidebarUtils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index d8acdfbdb597..37d4c0016602 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -262,6 +262,7 @@ function getOptionData(reportID) { const login = Str.removeSMSDomain(lodashGet(personalDetail, 'login', '')); const formattedLogin = Str.isSMSLogin(login) ? LocalePhoneNumber.formatPhoneNumber(login) : login; + const lastReportAction = lastReportActions[report.reportID]; // We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade. const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips((participantPersonalDetailList || []).slice(0, 10), hasMultipleParticipants); @@ -269,10 +270,9 @@ function getOptionData(reportID) { let lastMessageTextFromReport = ''; if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; - } else if (ReportActionsUtils.isReportPreviewAction(lastReportActions[report.reportID])) { - const iouReportID = ReportActionsUtils.getIOUReportID(lastReportActions[report.reportID]); - const iouReport = ReportUtils.getReport(iouReportID); - lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportActions[report.reportID]); + } else if (ReportActionsUtils.isReportPreviewAction(lastReportAction)) { + const iouReport = ReportUtils.getReport(ReportActionsUtils.getIOUReportID(lastReportAction)); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportAction); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; } From 64369fb8f1d66ecca0dc716f653a6b9896c7c22e Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 14 Jun 2023 23:15:18 -0700 Subject: [PATCH 157/826] Update protected branches without pull request --- .../updateProtectedBranch/action.yml | 98 +++++-------------- 1 file changed, 23 insertions(+), 75 deletions(-) diff --git a/.github/actions/composite/updateProtectedBranch/action.yml b/.github/actions/composite/updateProtectedBranch/action.yml index d636a8deb8f0..a02bdc29eaa6 100644 --- a/.github/actions/composite/updateProtectedBranch/action.yml +++ b/.github/actions/composite/updateProtectedBranch/action.yml @@ -47,11 +47,10 @@ runs: echo "SOURCE_BRANCH=${{ inputs.SOURCE_BRANCH }}" >> "$GITHUB_ENV" fi - # Version: 3.0.2 - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 with: ref: ${{ env.SOURCE_BRANCH }} - fetch-depth: 0 + token: ${{ inputs.OS_BOTIFY_TOKEN }} - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: @@ -60,8 +59,7 @@ runs: - name: Update target and source branches shell: bash run: | - git checkout ${{ inputs.TARGET_BRANCH }} - git merge origin/${{ inputs.TARGET_BRANCH }} + git fetch ${{ inputs.TARGET_BRANCH }} ${{ env.SOURCE_BRANCH }} git checkout ${{ env.SOURCE_BRANCH }} git merge origin/${{ env.SOURCE_BRANCH }} @@ -69,77 +67,27 @@ runs: shell: bash run: echo "NEW_VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV" - - name: Create temporary branch to resolve conflicts - if: ${{ contains(fromJSON('["staging", "production"]'), inputs.TARGET_BRANCH) }} + - name: Update target branch shell: bash run: | - git checkout ${{ inputs.TARGET_BRANCH }} - BRANCH_NAME=update-${{ inputs.TARGET_BRANCH }}-from-${{ env.SOURCE_BRANCH }} - git checkout -b "$BRANCH_NAME" - git merge -Xtheirs ${{ env.SOURCE_BRANCH }} || { - git diff --name-only --diff-filter=U | xargs git rm; - git -c core.editor=true merge --continue; - } - git push --set-upstream origin "$BRANCH_NAME" - - - name: Create Pull Request - id: createPullRequest - shell: bash - run: | - gh pr create \ - --title "Update version to ${{ env.NEW_VERSION }} on ${{ inputs.TARGET_BRANCH }}" \ - --body "Update version to ${{ env.NEW_VERSION }}" \ - --label "automerge" \ - --base ${{ inputs.TARGET_BRANCH }} - sleep 5 - echo "PR_NUMBER=$(gh pr view --json 'number' --jq '.number')" >> "$GITHUB_OUTPUT" - env: - GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }} - - - name: Check changed files - if: ${{ inputs.TARGET_BRANCH == 'main' }} - id: changedFiles - # TODO: Remove and switch back to upstream when https://github.com/umani/changed-files/pull/27 is merged - uses: roryabraham/changed-files@c14fad74000cf77ff62b7f78cfd34c2124665c35 - with: - repo-token: ${{ github.token }} - pr-number: ${{ steps.createPullRequest.outputs.PR_NUMBER }} - - - name: Validate changed files - if: ${{ inputs.TARGET_BRANCH == 'main' && (steps.changedFiles.outputs.files_updated != 'android/app/build.gradle ios/NewExpensify/Info.plist ios/NewExpensifyTests/Info.plist package-lock.json package.json' || steps.changedFiles.outputs.files_created != '' || steps.changedFiles.outputs.files_deleted != '') }} - shell: bash - run: exit 1 - - - name: Auto-approve the PR - shell: bash - run: gh pr review --approve - env: - GITHUB_TOKEN: ${{ github.token }} - - - name: Check if pull request is mergeable - id: isPullRequestMergeable - uses: Expensify/App/.github/actions/javascript/isPullRequestMergeable@main - with: - GITHUB_TOKEN: ${{ github.token }} - PULL_REQUEST_NUMBER: ${{ steps.createPullRequest.outputs.PR_NUMBER }} - - - name: Leave comment if PR is not mergeable - if: ${{ !fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }} - shell: bash - run: | - gh pr comment --body \ - ":bell: @Expensify/mobile-deployers :bell: - The Update Protected Branch workflow has failed because this PR was not mergable. - If you are the deployer this week, please resolve the error and merge this PR to continue the deploy process." - env: - GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }} - - - name: Fail workflow if PR is not mergeable - if: ${{ steps.isPullRequestMergeable.outputs.IS_MERGEABLE == 'false' }} - shell: bash - run: exit 1 + echo "Updating ${{ inputs.TARGET_BRANCH }} from ${{ env.SOURCE_BRANCH }}" + if [[ ${{ inputs.TARGET_BRANCH }} == 'staging' || ${{ inputs.TARGET_BRANCH } == 'production' ]]; then + git branch -D ${{ inputs.TARGET_BRANCH }} + git checkout -b ${{ inputs.TARGET_BRANCH }} + else + # Validate Changed files + if [[ "$(git diff main --name-only --diff-filter=M | tr '\n' ' ')" != 'android/app/build.gradle ios/NewExpensify/Info.plist ios/NewExpensifyTests/Info.plist package-lock.json package.json ' ]]; then + echo "Detected unexpected file changes updating main" + exit 1 + elif [[ "$(git diff main --name-only --diff-filter=AD)" != '' ]]; then + echo "Detected unexpected file changes updating main" + exit 1 + fi + + git checkout ${{ inputs.TARGET_BRANCH }} + git merge ${{ env.SOURCE_BRANCH }} + fi - - name: Auto-merge the PR + - name: Force-push change to protected branch shell: bash - run: gh pr merge ${{ steps.createPullRequest.outputs.PR_NUMBER }} --merge --delete-branch - env: - GITHUB_TOKEN: ${{ inputs.OS_BOTIFY_TOKEN }} + run: git push --force origin ${{ inputs.TARGET_BRANCH }} From 3aa072381e902d36d12aa249d750a591b10454ce Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 14 Jun 2023 23:49:10 -0700 Subject: [PATCH 158/826] Fix checkout in createNewVersion --- .github/workflows/createNewVersion.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/createNewVersion.yml b/.github/workflows/createNewVersion.yml index b8bcd71d0f08..ab177d809377 100644 --- a/.github/workflows/createNewVersion.yml +++ b/.github/workflows/createNewVersion.yml @@ -46,10 +46,10 @@ jobs: NEW_VERSION: ${{ steps.bumpVersion.outputs.NEW_VERSION }} steps: - # Version: 3.0.2 - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 with: - fetch-depth: 0 + ref: main + token: ${{ secrets.OS_BOTIFY_TOKEN }} - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: From 4cb20581220005f99b181f2ef62bd5ad75857522 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:03:14 -0700 Subject: [PATCH 159/826] Dont use updateProtectedBranch from createNewVersion --- .github/workflows/createNewVersion.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/createNewVersion.yml b/.github/workflows/createNewVersion.yml index ab177d809377..5d82a9677a2a 100644 --- a/.github/workflows/createNewVersion.yml +++ b/.github/workflows/createNewVersion.yml @@ -61,13 +61,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Create new branch - run: | - git pull - BRANCH_NAME="version-${{ inputs.SEMVER_LEVEL }}-$(uuidgen)" - git checkout -b "$BRANCH_NAME" - git push --set-upstream origin "$BRANCH_NAME" - echo "VERSION_BRANCH=$BRANCH_NAME" >> "$GITHUB_ENV" + - run: git pull - name: Generate version id: bumpVersion @@ -85,15 +79,9 @@ jobs: ./ios/NewExpensify/Info.plist \ ./ios/NewExpensifyTests/Info.plist git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}" - git push origin ${{ env.VERSION_BRANCH }} - name: Update main branch - uses: Expensify/App/.github/actions/composite/updateProtectedBranch@main - with: - TARGET_BRANCH: main - SOURCE_BRANCH: ${{ env.VERSION_BRANCH }} - OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + run: git push origin main - if: ${{ failure() }} uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main From 50f61b0bdbde9bb63d95e10f1aa91f0e6de067c0 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:21:30 -0700 Subject: [PATCH 160/826] Dont use updateProtectedBranch from finishReleaseCycle --- .github/workflows/finishReleaseCycle.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index 88187d7a4355..014ff20edf53 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -56,12 +56,22 @@ jobs: needs: validate if: ${{ fromJSON(needs.validate.outputs.isValid) }} steps: - - name: Update production branch - uses: Expensify/App/.github/actions/composite/updateProtectedBranch@main + - uses: actions/checkout@v3 with: - TARGET_BRANCH: production - OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + ref: staging + token: ${{ inputs.OS_BOTIFY_TOKEN }} + + - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main + with: + GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }} + + - name: Update production branch + run: | + git switch production + git switch staging + git branch -D production + git switch -c production + git push --force origin production # Create a new patch version to prep for next release cycle createNewPatchVersion: From e7d773035d0904e671de36417bd673ce4c11f0ae Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:26:09 -0700 Subject: [PATCH 161/826] Fix GPG password --- .github/workflows/finishReleaseCycle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index 014ff20edf53..e9f3a9f86902 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -63,7 +63,7 @@ jobs: - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: - GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }} + GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} - name: Update production branch run: | From b0e98282b323865881ee0b897d50f6f40f0035f2 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:32:46 -0700 Subject: [PATCH 162/826] Remove updateProtectedBranch from preDeploy --- .github/workflows/preDeploy.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 0e77dbe4704f..8814c593afbf 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -88,14 +88,23 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} - - name: Update staging branch from main - if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} - uses: Expensify/App/.github/actions/composite/updateProtectedBranch@main + - uses: actions/checkout@v3 + with: + ref: main + token: ${{ secrets.OS_BOTIFY_TOKEN }} + + - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: - TARGET_BRANCH: staging - OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + - name: Update staging branch from main + run: | + git switch staging + git switch main + git branch -D staging + git switch -c staging + git push --force origin staging + - name: Cherry-pick PR to staging if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} uses: Expensify/App/.github/actions/javascript/triggerWorkflowAndWait@main @@ -104,12 +113,6 @@ jobs: WORKFLOW: cherryPick.yml INPUTS: '{ "PULL_REQUEST_NUMBER": "${{ needs.chooseDeployActions.outputs.MERGED_PR }}", "NEW_VERSION": "${{ needs.createNewVersion.outputs.NEW_VERSION }}" }' - # Version: 3.0.2 - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - ref: staging - fetch-depth: 0 - # Create a local git tag on staging so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a # list of pull requests that were merged between this version tag and another. # NOTE: This tag is only used locally and shouldn't be pushed to the remote. From 7d1e4e672a9120baccf8c1cd6df4c4cd194d691a Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:41:03 -0700 Subject: [PATCH 163/826] Remove updateProtectedBranch from finishReleaseCycle --- .github/workflows/finishReleaseCycle.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index e9f3a9f86902..d98cefa848a8 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -87,13 +87,23 @@ jobs: runs-on: ubuntu-latest needs: createNewPatchVersion steps: - - name: Update staging branch to trigger staging deploy - uses: Expensify/App/.github/actions/composite/updateProtectedBranch@main + - uses: actions/checkout@v3 + with: + ref: main + token: ${{ secrets.OS_BOTIFY_TOKEN }} + + - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: - TARGET_BRANCH: staging - OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} + - name: Update staging branch to trigger staging deploy + run: | + git switch staging + git switch main + git branch -D staging + git switch -c staging + git push --force origin staging + # Create a local git tag so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a # list of pull requests that were merged between this version tag and another. # NOTE: This tag is only used locally and shouldn't be pushed to the remote. From 2ff4c951febe0b4801adf9c41d03b891ea0873f6 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:41:50 -0700 Subject: [PATCH 164/826] Remove unused updateProtectedBranch action --- .../updateProtectedBranch/action.yml | 93 ------------------- 1 file changed, 93 deletions(-) delete mode 100644 .github/actions/composite/updateProtectedBranch/action.yml diff --git a/.github/actions/composite/updateProtectedBranch/action.yml b/.github/actions/composite/updateProtectedBranch/action.yml deleted file mode 100644 index a02bdc29eaa6..000000000000 --- a/.github/actions/composite/updateProtectedBranch/action.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: Update Protected Branch -description: Create, approve, and merge a pull request against a protected branch - -inputs: - TARGET_BRANCH: - description: The target branch to update. This becomes the base branch of the pull request. - required: true - SOURCE_BRANCH: - description: If updating main, you must also provide a head branch to update main with. - required: false - default: '' - OS_BOTIFY_TOKEN: - description: GitHub token for OSBotify - required: true - GPG_PASSPHRASE: - description: Passphrase used to decrypt GPG key for OSBotify - required: true - -runs: - using: composite - steps: - - name: Validate target branch - if: ${{ !contains(fromJSON('["main", "staging", "production"]'), inputs.TARGET_BRANCH) }} - shell: bash - run: | - echo "Target branch must be one of ['main', 'staging', 'production]" - exit 1 - - # If updating main, SOURCE_BRANCH must not be empty - - name: Validate source branch - if: inputs.TARGET_BRANCH == 'main' && inputs.SOURCE_BRANCH == '' - shell: bash - run: | - echo "Cannot update main branch without specifying a source branch" - exit 1 - - # If updating staging, the source branch will always be main - # If updating production, the source branch will always be staging - - name: Set source branch - shell: bash - run: | - if [[ ${{ inputs.TARGET_BRANCH }} == 'staging' ]]; then - echo "SOURCE_BRANCH=main" >> "$GITHUB_ENV" - elif [[ ${{ inputs.TARGET_BRANCH }} == 'production' ]]; then - echo "SOURCE_BRANCH=staging" >> "$GITHUB_ENV" - else - echo "SOURCE_BRANCH=${{ inputs.SOURCE_BRANCH }}" >> "$GITHUB_ENV" - fi - - - uses: actions/checkout@v3 - with: - ref: ${{ env.SOURCE_BRANCH }} - token: ${{ inputs.OS_BOTIFY_TOKEN }} - - - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main - with: - GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }} - - - name: Update target and source branches - shell: bash - run: | - git fetch ${{ inputs.TARGET_BRANCH }} ${{ env.SOURCE_BRANCH }} - git checkout ${{ env.SOURCE_BRANCH }} - git merge origin/${{ env.SOURCE_BRANCH }} - - - name: Set New Version - shell: bash - run: echo "NEW_VERSION=$(npm run print-version --silent)" >> "$GITHUB_ENV" - - - name: Update target branch - shell: bash - run: | - echo "Updating ${{ inputs.TARGET_BRANCH }} from ${{ env.SOURCE_BRANCH }}" - if [[ ${{ inputs.TARGET_BRANCH }} == 'staging' || ${{ inputs.TARGET_BRANCH } == 'production' ]]; then - git branch -D ${{ inputs.TARGET_BRANCH }} - git checkout -b ${{ inputs.TARGET_BRANCH }} - else - # Validate Changed files - if [[ "$(git diff main --name-only --diff-filter=M | tr '\n' ' ')" != 'android/app/build.gradle ios/NewExpensify/Info.plist ios/NewExpensifyTests/Info.plist package-lock.json package.json ' ]]; then - echo "Detected unexpected file changes updating main" - exit 1 - elif [[ "$(git diff main --name-only --diff-filter=AD)" != '' ]]; then - echo "Detected unexpected file changes updating main" - exit 1 - fi - - git checkout ${{ inputs.TARGET_BRANCH }} - git merge ${{ env.SOURCE_BRANCH }} - fi - - - name: Force-push change to protected branch - shell: bash - run: git push --force origin ${{ inputs.TARGET_BRANCH }} From 8fa0fceb3da4a861ac2dec036d7a9a376360d537 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 00:46:29 -0700 Subject: [PATCH 165/826] Update documentation --- .github/workflows/README.md | 4 +++- README.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index c6695f5cbf30..d62867de27f3 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -124,7 +124,9 @@ In order to bundle actions with their dependencies into a single Node.js executa ## Imperative Workflows -We have a unique way of defining certain workflows which can be manually triggered by the `workflow_dispatch` event. See `createNewVersion.yml` and `updateProtectedBranch.yml` for examples. Used in combination with the custom [`triggerWorkflowAndWait` action](https://github.com/Expensify/App/blob/d07dcf4e3e0b3f11bec73726856e6d5f8624704c/.github/actions/triggerWorkflowAndWait/triggerWorkflowAndWait.js), workflows can be synchronously executed like a function from another workflow, like this: +**Edit:** These workflows are still present, but should be considered deprecated. GitHub has since introduced callable workflows, so we should use those going forward. + +We have a unique way of defining certain workflows which can be manually triggered by the `workflow_dispatch` event. See `createNewVersion.yml` for examples. Used in combination with the custom [`triggerWorkflowAndWait` action](https://github.com/Expensify/App/blob/d07dcf4e3e0b3f11bec73726856e6d5f8624704c/.github/actions/triggerWorkflowAndWait/triggerWorkflowAndWait.js), workflows can be synchronously executed like a function from another workflow, like this: ```yaml - name: Create new BUILD version diff --git a/README.md b/README.md index abbb76879645..88a3d7d4db60 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,7 @@ The [preDeploy workflow](https://github.com/Expensify/App/blob/main/.github/work - If the `StagingDeployCash` is locked, comment on the merged PR that it will be deployed later. - Otherwise: - Create a new version by triggering the [`createNewVersion` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/createNewVersion.yml) - - Use the [`updateProtectedBranch` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/updateProtectedBranch.yml) to update the `staging` branch. + - Update the `staging` branch from main. - Also, if the pull request has the `CP Staging` label, it will execute the [`cherryPick` workflow](https://github.com/Expensify/App/blob/main/.github/workflows/cherryPick.yml) to deploy the pull request directly to staging, even if the `StagingDeployCash` is locked. ### deploy From 46c4130a779895d763058377b59c43673bfdec93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Thu, 15 Jun 2023 12:10:55 +0200 Subject: [PATCH 166/826] removed hoverDimmingValue as it is set to 1 by default --- src/components/Checkbox.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index 551c956a802c..ca906293fe49 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -93,7 +93,6 @@ class Checkbox extends React.Component { checked: this.props.isChecked, }} accessibilityLabel={this.props.accessibilityLabel} - hoverDimmingValue={1} pressDimmingValue={1} > {this.props.children ? ( From 81158575786f1375fe94f695f7fbda3dd53a8daf Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Thu, 15 Jun 2023 15:53:03 +0530 Subject: [PATCH 167/826] Change const to function --- src/pages/NewChatPage.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 80e39422821b..0eb28f5a8c75 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useState, useEffect, useMemo} from 'react'; +import React, {useState, useEffect} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; @@ -60,7 +60,7 @@ function NewChatPage(props) { ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); - const sections = useMemo(() => { + function getSections() { const sectionsList = []; let indexOffset = 0; @@ -110,8 +110,7 @@ function NewChatPage(props) { } return sectionsList; - // eslint-disable-next-line react-hooks/exhaustive-deps -- to avoid destructuring props and adding all 'props' as a dependency - }, [props.isGroupChat, props.translate, selectedOptions, filteredRecentReports, filteredPersonalDetails, filteredUserToInvite, maxParticipantsReached]); + } const updateOptionsWithSearchTerm = (newSearchTerm = '') => { const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( @@ -132,7 +131,7 @@ function NewChatPage(props) { * Removes a selected option from list if already selected. If not already selected add this option to the list. * @param {Object} option */ - const toggleOption = (option) => { + function toggleOption(option) { const isOptionInList = _.some(selectedOptions, (selectedOption) => selectedOption.login === option.login); let newSelectedOptions; @@ -149,7 +148,7 @@ function NewChatPage(props) { setFilteredRecentReports(recentReports); setFilteredPersonalDetails(personalDetails); setFilteredUserToInvite(userToInvite); - }; + } /** * Creates a new 1:1 chat with the option and the current user, @@ -157,9 +156,9 @@ function NewChatPage(props) { * * @param {Object} option */ - const createChat = (option) => { + function createChat(option) { Report.navigateToAndOpenReport([option.login]); - }; + } /** * Creates a new group chat with all the selected options and the current user, @@ -185,6 +184,8 @@ function NewChatPage(props) { // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.reports, props.personalDetails]); + const sections = getSections(); + return ( Date: Thu, 15 Jun 2023 17:37:22 +0700 Subject: [PATCH 168/826] isParentReport approach --- src/components/ShowContextMenuContext.js | 4 +++- src/libs/ReportUtils.js | 7 ++++--- .../ContextMenu/BaseReportActionContextMenu.js | 2 ++ .../report/ContextMenu/ContextMenuActions.js | 12 ++++++------ .../PopoverReportActionContextMenu.js | 6 ++++++ .../ContextMenu/ReportActionContextMenu.js | 18 +++++++++++++++++- .../genericReportActionContextMenuPropTypes.js | 4 ++++ src/pages/home/report/ReportActionItem.js | 15 ++++++++++----- .../report/ReportActionItemParentAction.js | 1 + 9 files changed, 53 insertions(+), 16 deletions(-) diff --git a/src/components/ShowContextMenuContext.js b/src/components/ShowContextMenuContext.js index df522dec8f10..f7c38f74a3f2 100644 --- a/src/components/ShowContextMenuContext.js +++ b/src/components/ShowContextMenuContext.js @@ -21,8 +21,9 @@ ShowContextMenuContext.displayName = 'ShowContextMenuContext'; * @param {Object} action - ReportAction for ContextMenu * @param {Function} checkIfContextMenuActive Callback to update context menu active state * @param {Boolean} [isArchivedRoom=false] - Is the report an archived room + * @param {Boolean} [isParentReport=false] - Is the report action from parent report */ -function showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive, isArchivedRoom = false) { +function showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive, isArchivedRoom = false, isParentReport = false) { if (!DeviceCapabilities.canUseTouchScreen()) { return; } @@ -37,6 +38,7 @@ function showContextMenuForReport(event, anchor, reportID, action, checkIfContex checkIfContextMenuActive, checkIfContextMenuActive, isArchivedRoom, + isParentReport, ); } diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 74c9a501db6d..e02f5882ed17 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -524,12 +524,13 @@ function isThreadParent(reportAction) { /** * Returns true if reportAction is the first chat preview of a Thread * + * @deprecated * @param {Object} reportAction - * @param {String} [reportID] + * @param {String} reportID * @returns {Boolean} */ -function isThreadFirstChat(reportAction, reportID = '') { - return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === (reportID || Navigation.getTopmostReportId()); +function isThreadFirstChat(reportAction, reportID) { + return !_.isUndefined(reportAction.childReportID) && reportAction.childReportID.toString() === reportID; } /** diff --git a/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js index 2d85a960f66d..4f2565b948b5 100755 --- a/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js @@ -62,6 +62,7 @@ class BaseReportActionContextMenu extends React.Component { this.props.isChronosReport, this.props.reportID, this.props.isPinnedChat, + this.props.isParentReport, ); /** @@ -93,6 +94,7 @@ class BaseReportActionContextMenu extends React.Component { const payload = { reportAction: this.props.reportAction, reportID: this.props.reportID, + isParentReport: this.props.isParentReport, draftMessage: this.props.draftMessage, selection: this.props.selection, close: () => this.setState({shouldKeepOpen: false}), diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index a9fb24bdb23f..7d22351b196d 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -118,8 +118,8 @@ export default [ icon: Expensicons.ChatBubble, successTextTranslateKey: '', successIcon: null, - shouldShow: (type, reportAction) => - type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction), + shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isParentReport) => + type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !isParentReport, onPress: (closePopover, {reportAction, reportID}) => { Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); if (closePopover) { @@ -208,10 +208,10 @@ export default [ const isAttachmentTarget = lodashGet(menuTarget, 'tagName') === 'IMG' && isAttachment; return Permissions.canUseCommentLinking(betas) && type === CONTEXT_MENU_TYPES.REPORT_ACTION && !isAttachmentTarget; }, - onPress: (closePopover, {reportAction}) => { + onPress: (closePopover, {reportID, reportAction, isParentReport}) => { Environment.getEnvironmentURL().then((environmentURL) => { const reportActionID = parseInt(lodashGet(reportAction, 'reportActionID'), 10); - const activeReportID = Navigation.getTopmostReportId(); + const activeReportID = isParentReport ? reportAction.childReportID : reportID; Clipboard.setString(`${environmentURL}/r/${activeReportID}/${reportActionID}`); }); hideContextMenu(true, ReportActionComposeFocusManager.focus); @@ -224,8 +224,8 @@ export default [ icon: Expensicons.Mail, successIcon: Expensicons.Checkmark, shouldShow: (type) => type === CONTEXT_MENU_TYPES.REPORT_ACTION, - onPress: (closePopover, {reportAction}) => { - const activeReportID = Navigation.getTopmostReportId(); + onPress: (closePopover, {reportID, reportAction, isParentReport}) => { + const activeReportID = isParentReport ? reportAction.childReportID : reportID; Report.markCommentAsUnread(activeReportID, reportAction.created); if (closePopover) { hideContextMenu(true, ReportActionComposeFocusManager.focus); diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js index 6fcaed0ca291..317afef9ced0 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js @@ -40,6 +40,7 @@ class PopoverReportActionContextMenu extends React.Component { isArchivedRoom: false, isChronosReport: false, isPinnedChat: false, + isParentReport: false, }; this.onPopoverShow = () => {}; this.onPopoverHide = () => {}; @@ -128,6 +129,7 @@ class PopoverReportActionContextMenu extends React.Component { * @param {Boolean} isArchivedRoom - Whether the provided report is an archived room * @param {Boolean} isChronosReport - Flag to check if the chat participant is Chronos * @param {Boolean} isPinnedChat - Flag to check if the chat is pinned in the LHN. Used for the Pin/Unpin action + * @param {Boolean} [isParentReport] - Is the report action from parent report */ showContextMenu( type, @@ -142,6 +144,7 @@ class PopoverReportActionContextMenu extends React.Component { isArchivedRoom = false, isChronosReport = false, isPinnedChat = false, + isParentReport = false, ) { const nativeEvent = event.nativeEvent || {}; this.contextMenuAnchor = contextMenuAnchor; @@ -173,6 +176,7 @@ class PopoverReportActionContextMenu extends React.Component { isArchivedRoom, isChronosReport, isPinnedChat, + isParentReport, }); }); } @@ -261,6 +265,7 @@ class PopoverReportActionContextMenu extends React.Component { isArchivedRoom: false, isChronosReport: false, isPinnedChat: false, + isParentReport: false, }); } @@ -308,6 +313,7 @@ class PopoverReportActionContextMenu extends React.Component { isArchivedRoom={this.state.isArchivedRoom} isChronosReport={this.state.isChronosReport} isPinnedChat={this.state.isPinnedChat} + isParentReport={this.state.isParentReport} anchor={this.contextMenuTargetNode} contentRef={this.contentRef} /> diff --git a/src/pages/home/report/ContextMenu/ReportActionContextMenu.js b/src/pages/home/report/ContextMenu/ReportActionContextMenu.js index ea68cae8c710..e1792eacd97b 100644 --- a/src/pages/home/report/ContextMenu/ReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/ReportActionContextMenu.js @@ -17,6 +17,7 @@ const contextMenuRef = React.createRef(); * @param {Boolean} isArchivedRoom - Whether the provided report is an archived room * @param {Boolean} isChronosReport - Flag to check if the chat participant is Chronos * @param {Boolean} isPinnedChat - Flag to check if the chat is pinned in the LHN. Used for the Pin/Unpin action + * @param {Boolean} [isParentReport] - Is the report action from parent report */ function showContextMenu( type, @@ -31,11 +32,26 @@ function showContextMenu( isArchivedRoom = false, isChronosReport = false, isPinnedChat = false, + isParentReport = false, ) { if (!contextMenuRef.current) { return; } - contextMenuRef.current.showContextMenu(type, event, selection, contextMenuAnchor, reportID, reportAction, draftMessage, onShow, onHide, isArchivedRoom, isChronosReport, isPinnedChat); + contextMenuRef.current.showContextMenu( + type, + event, + selection, + contextMenuAnchor, + reportID, + reportAction, + draftMessage, + onShow, + onHide, + isArchivedRoom, + isChronosReport, + isPinnedChat, + isParentReport, + ); } /** diff --git a/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js b/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js index f62873031c54..596d5bd907f2 100644 --- a/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js +++ b/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js @@ -8,6 +8,9 @@ const propTypes = { /** The report action this context menu is attached to. */ reportAction: PropTypes.shape(reportActionPropTypes).isRequired, + /** Is the report action from parent report */ + isParentReport: PropTypes.bool, + /** If true, this component will be a small, row-oriented menu that displays icons but not text. If false, this component will be a larger, column-oriented menu that displays icons alongside text in each row. */ isMini: PropTypes.bool, @@ -23,6 +26,7 @@ const propTypes = { }; const defaultProps = { + isParentReport: false, isMini: false, isVisible: false, selection: '', diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index cba855262f6a..1d6fd4143fa4 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -55,7 +55,6 @@ import TaskPreview from '../../../components/ReportActionItem/TaskPreview'; import TaskAction from '../../../components/ReportActionItem/TaskAction'; import * as Session from '../../../libs/actions/Session'; import {hideContextMenu} from './ContextMenu/ReportActionContextMenu'; -import withCurrentReportId from '../../../components/withCurrentReportId'; const propTypes = { ...windowDimensionsPropTypes, @@ -72,6 +71,9 @@ const propTypes = { /** Is this the most recent IOU Action? */ isMostRecentIOUReportAction: PropTypes.bool.isRequired, + /** Is this the action from parent report */ + isParentReport: PropTypes.bool, + /** Should we display the new marker on top of the comment? */ shouldDisplayNewMarker: PropTypes.bool.isRequired, @@ -101,6 +103,7 @@ const defaultProps = { personalDetails: {}, shouldShowSubscriptAvatar: false, hasOutstandingIOU: false, + isParentReport: false, }; function ReportActionItem(props) { @@ -180,9 +183,11 @@ function ReportActionItem(props) { toggleContextMenuFromActiveReportAction, ReportUtils.isArchivedRoom(props.report), ReportUtils.chatIncludesChronos(props.report), + null, + props.isParentReport, ); }, - [props.draftMessage, props.action, props.report, toggleContextMenuFromActiveReportAction], + [props.draftMessage, props.action, props.report, props.isParentReport, toggleContextMenuFromActiveReportAction], ); const toggleReaction = useCallback( @@ -333,7 +338,7 @@ function ReportActionItem(props) { const numberOfThreadReplies = _.get(props, ['action', 'childVisibleActionCount'], 0); const hasReplies = numberOfThreadReplies > 0; - const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !ReportUtils.isThreadFirstChat(props.action, props.currentReportId); + const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !props.isParentReport; const oldestFourEmails = lodashGet(props.action, 'childOldestFourEmails', '').split(','); const draftMessageRightAlign = props.draftMessage ? styles.chatItemReactionsDraftRight : {}; @@ -454,6 +459,7 @@ function ReportActionItem(props) { isVisible={hovered && !props.draftMessage && !hasErrors} draftMessage={props.draftMessage} isChronosReport={ReportUtils.chatIncludesChronos(props.report)} + isParentReport={props.isParentReport} /> {parentReportAction && ( Date: Thu, 15 Jun 2023 12:03:55 +0100 Subject: [PATCH 169/826] add back reportIDFromRoute prop to SidebarLinks for jest --- src/pages/home/sidebar/SidebarLinks.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 09ec77694ae5..279b206f7718 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -52,6 +52,9 @@ const propTypes = { // eslint-disable-next-line react/no-unused-prop-types chatReports: PropTypes.objectOf(reportPropTypes), + /** Current reportID from the route in react navigation state object */ + reportIDFromRoute: PropTypes.string, + /** All report actions for all reports */ // eslint-disable-next-line react/no-unused-prop-types reportActions: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.shape(reportActionPropTypes))), @@ -85,6 +88,7 @@ const defaultProps = { chatReports: {}, reportActions: {}, personalDetails: {}, + reportIDFromRoute: '', currentUserPersonalDetails: { avatar: '', }, @@ -149,8 +153,7 @@ class SidebarLinks extends React.Component { render() { const isLoading = _.isEmpty(this.props.personalDetails) || _.isEmpty(this.props.chatReports); - const optionListItems = SidebarUtils.getOrderedReportIDs(this.props.currentReportID); - + const optionListItems = SidebarUtils.getOrderedReportIDs(this.props.reportIDFromRoute); const skeletonPlaceholder = ; return ( From 9febc2ffcf27d76bb064c2670aca8aae5a70ebc9 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 15 Jun 2023 14:02:57 +0100 Subject: [PATCH 170/826] merge individual state changes to a single useMemo --- src/pages/iou/IOUCurrencySelection.js | 88 ++++++++++++--------------- 1 file changed, 38 insertions(+), 50 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 26a95033300d..8e654dc19d06 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -57,24 +57,8 @@ const defaultProps = { }; function IOUCurrencySelection(props) { - const [searchValue, setCurrentSearchValue] = useState(''); + const [searchValue, setSearchValue] = useState(''); const selectedCurrencyCode = lodashGet(props.route, 'params.currency', props.iou.selectedCurrencyCode, CONST.CURRENCY.USD); - const currencyOptions = useMemo( - () => - _.map(props.currencyList, (currencyInfo, currencyCode) => { - const isSelectedCurrency = currencyCode === selectedCurrencyCode; - return { - text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, - currencyCode, - keyForList: currencyCode, - customIcon: isSelectedCurrency ? greenCheckmark : undefined, - boldStyle: isSelectedCurrency, - }; - }), - [selectedCurrencyCode, props.currencyList], - ); - - const [currencyData, setCurrencyData] = useState(currencyOptions); const confirmCurrencySelection = useCallback( (option) => { @@ -92,33 +76,40 @@ function IOUCurrencySelection(props) { ); const {translate} = props; - - const getSections = useMemo(() => { - if (searchValue.trim() && !currencyData.length) { - return []; - } - return [ - { - title: translate('iOUCurrencySelection.allCurrencies'), - data: currencyData, - shouldShow: true, - indexOffset: 0, - }, - ]; - }, [searchValue, currencyData, translate]); - - const changeSearchValue = useCallback( - (searchQuery) => { - const searchRegex = new RegExp(Str.escapeForRegExp(searchQuery), 'i'); - const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text)); - - setCurrentSearchValue(searchQuery); - setCurrencyData(filteredCurrencies); - }, - [currencyOptions], - ); - - const headerMessage = searchValue.trim() && !currencyData.length ? translate('common.noResultsFound') : ''; + const {sections, headerMessage, initiallyFocusedOptionKey} = useMemo(() => { + const currencyOptions = _.map(props.currencyList, (currencyInfo, currencyCode) => { + const isSelectedCurrency = currencyCode === selectedCurrencyCode; + return { + text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, + currencyCode, + keyForList: currencyCode, + customIcon: isSelectedCurrency ? greenCheckmark : undefined, + boldStyle: isSelectedCurrency, + }; + }); + + const searchRegex = new RegExp(Str.escapeForRegExp(searchValue), 'i'); + const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text)); + const isEmpty = searchValue.trim() && !filteredCurrencies.length; + + return { + initiallyFocusedOptionKey: _.get( + _.find(filteredCurrencies, (currency) => currency.currencyCode === selectedCurrencyCode), + 'keyForList', + ), + sections: isEmpty + ? [] + : [ + { + title: translate('iOUCurrencySelection.allCurrencies'), + data: filteredCurrencies, + shouldShow: true, + indexOffset: 0, + }, + ], + headerMessage: isEmpty ? translate('common.noResultsFound') : '', + }; + }, [props.currencyList, searchValue, selectedCurrencyCode, translate]); return ( @@ -129,17 +120,14 @@ function IOUCurrencySelection(props) { onBackButtonPress={() => Navigation.goBack(ROUTES.getIouRequestRoute(Navigation.getTopmostReportId()))} /> currency.currencyCode === selectedCurrencyCode), - 'keyForList', - )} + initiallyFocusedOptionKey={initiallyFocusedOptionKey} shouldHaveOptionSeparator /> From ba01429ecd9c99c161dc687a26d2283f3f04c30f Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 15 Jun 2023 14:47:50 +0100 Subject: [PATCH 171/826] pull currencyList from props in IOUCurrencySelection --- src/pages/iou/IOUCurrencySelection.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/iou/IOUCurrencySelection.js b/src/pages/iou/IOUCurrencySelection.js index 8e654dc19d06..752273a6377b 100644 --- a/src/pages/iou/IOUCurrencySelection.js +++ b/src/pages/iou/IOUCurrencySelection.js @@ -75,9 +75,9 @@ function IOUCurrencySelection(props) { [props.route, props.navigation], ); - const {translate} = props; + const {translate, currencyList} = props; const {sections, headerMessage, initiallyFocusedOptionKey} = useMemo(() => { - const currencyOptions = _.map(props.currencyList, (currencyInfo, currencyCode) => { + const currencyOptions = _.map(currencyList, (currencyInfo, currencyCode) => { const isSelectedCurrency = currencyCode === selectedCurrencyCode; return { text: `${currencyCode} - ${CurrencyUtils.getLocalizedCurrencySymbol(currencyCode)}`, @@ -109,7 +109,7 @@ function IOUCurrencySelection(props) { ], headerMessage: isEmpty ? translate('common.noResultsFound') : '', }; - }, [props.currencyList, searchValue, selectedCurrencyCode, translate]); + }, [currencyList, searchValue, selectedCurrencyCode, translate]); return ( From 242a7e18d69aefb25d246e9de6604f8c870d6c13 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 15 Jun 2023 16:12:21 +0100 Subject: [PATCH 172/826] remove unused notification line and reuse const for key --- .../chat/customairshipextender/CustomNotificationProvider.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index 4fb1bbb97008..6235da0c91a5 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -179,7 +179,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil } try { - JsonMap reportMap = payload.get("onyxData").getList().get(1).getMap().get("value").getMap(); + JsonMap reportMap = payload.get(ONYX_DATA_KEY).getList().get(1).getMap().get("value").getMap(); String reportId = reportMap.keySet().iterator().next(); JsonMap messageData = reportMap.get(reportId).getMap(); @@ -189,7 +189,6 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil String message = messageData.get("message").getList().get(0).getMap().get("text").getString(); String roomName = payload.get("roomName") == null ? "" : payload.get("roomName").getString(""); -// String conversationTitle = roomName.isEmpty() ? "Chat with " + name : roomName; // Retrieve or create the Person object who sent the latest report comment Person person = notificationCache.people.get(accountID); From de33bbc74c4e0b6b6a7032361b246bcc3ac7ae74 Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Thu, 15 Jun 2023 17:49:42 +0200 Subject: [PATCH 173/826] 1. Updated OptionRowLHN component with validation for stored draft comment 2. Added ReportCommentDraftsProvider to OnyxProvider 3. Reverted previous changes in ReportActionCompose --- ios/Podfile.lock | 6 ++-- src/components/LHNOptionsList/OptionRowLHN.js | 29 +++++++++++-------- src/components/OnyxProvider.js | 7 +++-- src/pages/home/report/ReportActionCompose.js | 4 --- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6cb4235c58c8..ae913bda8338 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1019,7 +1019,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1062,7 +1062,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1135,4 +1135,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.12.0 +COCOAPODS: 1.12.1 diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 437fd6d2cf28..dab05ca06c24 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,8 +1,8 @@ import _ from 'underscore'; -import React from 'react'; +import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; -import {withOnyx} from 'react-native-onyx'; +import lodashGet from 'lodash/get'; import * as optionRowStyles from '../../styles/optionRowStyles'; import styles from '../../styles/styles'; import * as StyleUtils from '../../styles/StyleUtils'; @@ -13,6 +13,7 @@ import Hoverable from '../Hoverable'; import DisplayNames from '../DisplayNames'; import colors from '../../styles/colors'; import withLocalize, {withLocalizePropTypes} from '../withLocalize'; +import {withReportCommentDrafts} from '../OnyxProvider'; import Text from '../Text'; import SubscriptAvatar from '../SubscriptAvatar'; import CONST from '../../CONST'; @@ -62,12 +63,18 @@ const defaultProps = { comment: '', }; +// function OptionRowLHN(props) { const OptionRowLHN = (props) => { const optionItem = SidebarUtils.getOptionData(props.reportID); - if (!optionItem) { - return null; - } + useEffect(() => { + if (!optionItem) { + return null; + } + if (!optionItem.hasDraftComment && props.comment.length > 0) { + Report.setReportWithDraft(props.reportID, true); + } + }, []); let popoverAnchor = null; const textStyle = props.isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText; @@ -93,10 +100,6 @@ const OptionRowLHN = (props) => { const hasBrickError = optionItem.brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR; const shouldShowGreenDotIndicator = !hasBrickError && (optionItem.isUnreadWithMention || (optionItem.hasOutstandingIOU && !optionItem.isIOUReportOwner)); - if (!optionItem.hasDraftComment && props.comment.length > 0 && !props.isFocused) { - Report.setReportWithDraft(props.reportID, true); - } - /** * Show the ReportActionContextMenu modal popover. * @@ -264,9 +267,11 @@ OptionRowLHN.displayName = 'OptionRowLHN'; export default compose( withLocalize, - withOnyx({ - comment: { - key: ({reportID}) => `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${reportID}`, + withReportCommentDrafts({ + propName: 'comment', + transformValue: (drafts, props) => { + const draftKey = `${ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT}${props.reportID}`; + return lodashGet(drafts, draftKey, ''); }, }), )(OptionRowLHN); diff --git a/src/components/OnyxProvider.js b/src/components/OnyxProvider.js index 6cee7e5b7a62..b452ed7f3007 100644 --- a/src/components/OnyxProvider.js +++ b/src/components/OnyxProvider.js @@ -12,6 +12,7 @@ const [withCurrentDate, CurrentDateProvider] = createOnyxContext(ONYXKEYS.CURREN const [withReportActionsDrafts, ReportActionsDraftsProvider] = createOnyxContext(ONYXKEYS.COLLECTION.REPORT_ACTIONS_DRAFTS); const [withBlockedFromConcierge, BlockedFromConciergeProvider] = createOnyxContext(ONYXKEYS.NVP_BLOCKED_FROM_CONCIERGE); const [withBetas, BetasProvider] = createOnyxContext(ONYXKEYS.BETAS); +const [withReportCommentDrafts, ReportCommentDraftsProvider] = createOnyxContext(ONYXKEYS.COLLECTION.REPORT_DRAFT_COMMENT); const propTypes = { /** Rendered child component */ @@ -19,7 +20,9 @@ const propTypes = { }; const OnyxProvider = (props) => ( - + {props.children} ); @@ -29,4 +32,4 @@ OnyxProvider.propTypes = propTypes; export default OnyxProvider; -export {withNetwork, withPersonalDetails, withReportActionsDrafts, withCurrentDate, withBlockedFromConcierge, withBetas, NetworkContext}; +export {withNetwork, withPersonalDetails, withReportActionsDrafts, withCurrentDate, withBlockedFromConcierge, withBetas, NetworkContext, withReportCommentDrafts}; diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 17d2964025fe..ec031fe02e32 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -245,10 +245,6 @@ class ReportActionCompose extends React.Component { showPopoverMenu: this.showPopoverMenu, }); } - - if (this.props.comment.length !== 0) { - Report.setReportWithDraft(this.props.reportID, true); - } } componentDidUpdate(prevProps) { From 49658ef9231139319afed15e606982103b260640 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 09:24:36 -0700 Subject: [PATCH 174/826] Simplify createNewVersion by lifting turnstyle up --- .github/workflows/createNewVersion.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/createNewVersion.yml b/.github/workflows/createNewVersion.yml index 5d82a9677a2a..6535c3ea04a4 100644 --- a/.github/workflows/createNewVersion.yml +++ b/.github/workflows/createNewVersion.yml @@ -46,6 +46,12 @@ jobs: NEW_VERSION: ${{ steps.bumpVersion.outputs.NEW_VERSION }} steps: + - uses: softprops/turnstyle@ca99add00ff0c9cbc697d22631d2992f377e5bd5 + with: + poll-interval-seconds: 10 + env: + GITHUB_TOKEN: ${{ github.token }} + - uses: actions/checkout@v3 with: ref: main @@ -55,14 +61,6 @@ jobs: with: GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} - - uses: softprops/turnstyle@ca99add00ff0c9cbc697d22631d2992f377e5bd5 - with: - poll-interval-seconds: 10 - env: - GITHUB_TOKEN: ${{ github.token }} - - - run: git pull - - name: Generate version id: bumpVersion uses: Expensify/App/.github/actions/javascript/bumpVersion@main From f4e1390963e174204b7531aa89251933296a83df Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 15 Jun 2023 23:52:56 +0700 Subject: [PATCH 175/826] Update variable name --- src/libs/ReportActionsUtils.js | 2 +- src/libs/ReportUtils.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 164d6ea7d32e..b3faa0185795 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -428,7 +428,7 @@ function getReportPreviewAction(chatReportID, iouReportID) { /** * Get the iouReportID for a given report action. * - * @param {*} reportAction + * @param {Object} reportAction * @returns {String} */ function getIOUReportID(reportAction) { diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index c8c80b96d842..0540b41dbe19 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -970,23 +970,23 @@ function getTransactionReportName(reportAction) { */ function getMoneyRequestReportActionMessage(report, reportAction) { let formattedAmount = null; - let isHavingOustandingIOU = null; + let reportHasOutstandingIOU = null; const totalAmount = getMoneyRequestTotal(report); const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail, true); if (totalAmount > 0) { formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency); - isHavingOustandingIOU = report.hasOutstandingIOU; + reportHasOutstandingIOU = report.hasOutstandingIOU; } else { const reportActionMessage = lodashGet(reportAction, 'message[0].html', ''); // The totalAmount is 0 after Sign in because OpenApp API won't return iouReports if it's paid, so we need to retrieve it from the reportActionMessage // reportActionMessage is in the format of either "payer@mail.com owes $1.00" or "paid $1.00" formattedAmount = _.last(reportActionMessage.split(' ')); - isHavingOustandingIOU = Boolean(reportActionMessage.match(/ owes /)); + reportHasOutstandingIOU = Boolean(reportActionMessage.match(/ owes /)); } - if (isHavingOustandingIOU) { + if (reportHasOutstandingIOU) { return Localize.translateLocal('iou.payerOwesAmount', {payer: payerName, amount: formattedAmount}); } return Localize.translateLocal('iou.payerSettled', {amount: formattedAmount}); From 4df46787b6c44d16929c626fe1a6011b4a05ee2e Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Thu, 15 Jun 2023 07:03:14 -1000 Subject: [PATCH 176/826] account for possible undefined report value --- src/libs/ReportActionsUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 992c751889c7..9de23c6bd61c 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -451,7 +451,7 @@ function getMostRecentReportActionLastModified() { // any reports that have been updated before either a recently updated report or reportAction as we should be up to date on these _.each(allReports, (report) => { const reportLastVisibleActionLastModified = report.lastVisibleActionLastModified || report.lastVisibleActionCreated; - if (reportLastVisibleActionLastModified < mostRecentReportActionLastModified) { + if (!reportLastVisibleActionLastModified || reportLastVisibleActionLastModified < mostRecentReportActionLastModified) { return; } From 041d78227ec5164f8aeeb8423358857c1b1ff04d Mon Sep 17 00:00:00 2001 From: oleh Date: Thu, 15 Jun 2023 20:04:01 +0300 Subject: [PATCH 177/826] fixed conflicts from main branch --- .../MoneyRequestParticipantsSplitSelector.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 9c77ef68b0e2..6f01444b1f04 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -29,6 +29,7 @@ const propTypes = { participants: PropTypes.arrayOf( PropTypes.shape({ login: PropTypes.string.isRequired, + accountID: PropTypes.number.isRequired, alternateText: PropTypes.string, hasDraftComment: PropTypes.bool, icons: PropTypes.arrayOf(avatarPropTypes), @@ -124,12 +125,12 @@ function MoneyRequestParticipantsSplitSelector(props) { * @param {Object} option */ const toggleOption = (option) => { - const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.login === option.login); + const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); let newSelectedOptions; if (isOptionInList) { - newSelectedOptions = _.reject(props.participants, (selectedOption) => selectedOption.login === option.login); + newSelectedOptions = _.reject(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); } else { newSelectedOptions = [...props.participants, option]; } @@ -215,7 +216,7 @@ export default compose( withLocalize, withOnyx({ personalDetails: { - key: ONYXKEYS.PERSONAL_DETAILS, + key: ONYXKEYS.PERSONAL_DETAILS_LIST, }, reports: { key: ONYXKEYS.COLLECTION.REPORT, From ba582554e791c39380a903b2dd2030e22bcc444e Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Thu, 15 Jun 2023 19:35:30 +0200 Subject: [PATCH 178/826] Fixed linter warnings --- src/components/LHNOptionsList/OptionRowLHN.js | 17 ++++++++++------- src/pages/home/report/ReportActionCompose.js | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index dab05ca06c24..9cfe87ddf420 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useEffect} from 'react'; +import React, {useEffect, useCallback} from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; import lodashGet from 'lodash/get'; @@ -63,18 +63,21 @@ const defaultProps = { comment: '', }; -// function OptionRowLHN(props) { -const OptionRowLHN = (props) => { +function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); - useEffect(() => { + const runUseEffectOnlyOnce = useCallback(() => { if (!optionItem) { return null; } - if (!optionItem.hasDraftComment && props.comment.length > 0) { + if (!optionItem.hasDraftComment && props.comment && props.comment.length > 0 && !props.isFocused) { Report.setReportWithDraft(props.reportID, true); } - }, []); + }, [optionItem, props.comment, props.isFocused, props.reportID]); + + useEffect(() => { + runUseEffectOnlyOnce(); + }, [runUseEffectOnlyOnce]); let popoverAnchor = null; const textStyle = props.isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText; @@ -259,7 +262,7 @@ const OptionRowLHN = (props) => { ); -}; +} OptionRowLHN.propTypes = propTypes; OptionRowLHN.defaultProps = defaultProps; diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 344b14289c0d..17d2964025fe 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -29,7 +29,7 @@ import ReportActionComposeFocusManager from '../../../libs/ReportActionComposeFo import participantPropTypes from '../../../components/participantPropTypes'; import ParticipantLocalTime from './ParticipantLocalTime'; import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../../components/withCurrentUserPersonalDetails'; -import {withNetwork} from '../../../components/OnyxProvider'; +import {withNetwork, withPersonalDetails} from '../../../components/OnyxProvider'; import * as User from '../../../libs/actions/User'; import Tooltip from '../../../components/Tooltip'; import EmojiPickerButton from '../../../components/EmojiPicker/EmojiPickerButton'; @@ -245,6 +245,10 @@ class ReportActionCompose extends React.Component { showPopoverMenu: this.showPopoverMenu, }); } + + if (this.props.comment.length !== 0) { + Report.setReportWithDraft(this.props.reportID, true); + } } componentDidUpdate(prevProps) { @@ -415,7 +419,7 @@ class ReportActionCompose extends React.Component { // We only prevent the task option from showing if it's a DM and the other user is an Expensify default email if ( !Permissions.canUseTasks(this.props.betas) || - (lodashGet(this.props.report, 'participantAccountIDs', []).length === 1 && _.some(reportParticipants, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID))) + (lodashGet(this.props.report, 'participants', []).length === 1 && _.some(reportParticipants, (email) => _.contains(CONST.EXPENSIFY_EMAILS, email))) ) { return []; } @@ -893,11 +897,11 @@ class ReportActionCompose extends React.Component { } render() { - const reportParticipants = _.without(lodashGet(this.props.report, 'participantAccountIDs', []), this.props.currentUserPersonalDetails.accountID); - const participantsWithoutExpensifyAccountIDs = _.difference(reportParticipants, CONST.EXPENSIFY_ACCOUNT_IDS); - const reportRecipient = this.props.personalDetails[participantsWithoutExpensifyAccountIDs[0]]; + const reportParticipants = _.without(lodashGet(this.props.report, 'participants', []), this.props.currentUserPersonalDetails.login); + const participantsWithoutExpensifyEmails = _.difference(reportParticipants, CONST.EXPENSIFY_EMAILS); + const reportRecipient = this.props.personalDetails[participantsWithoutExpensifyEmails[0]]; const shouldShowReportRecipientLocalTime = - ReportUtils.canShowReportRecipientLocalTime(this.props.personalDetails, this.props.report, this.props.currentUserPersonalDetails.accountID) && !this.props.isComposerFullSize; + ReportUtils.canShowReportRecipientLocalTime(this.props.personalDetails, this.props.report, this.props.currentUserPersonalDetails.login) && !this.props.isComposerFullSize; // Prevents focusing and showing the keyboard while the drawer is covering the chat. const isBlockedFromConcierge = ReportUtils.chatIncludesConcierge(this.props.report) && User.isBlockedFromConcierge(this.props.blockedFromConcierge); @@ -1220,6 +1224,7 @@ export default compose( withNavigationFocus, withLocalize, withNetwork(), + withPersonalDetails(), withCurrentUserPersonalDetails, withKeyboardState, withOnyx({ @@ -1243,7 +1248,7 @@ export default compose( selector: EmojiUtils.getPreferredSkinToneIndex, }, personalDetails: { - key: ONYXKEYS.PERSONAL_DETAILS_LIST, + key: ONYXKEYS.PERSONAL_DETAILS, }, shouldShowComposeInput: { key: ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT, From a5907531c5993af348a05e4ab3b08f432cb29dc8 Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Thu, 15 Jun 2023 19:49:09 +0200 Subject: [PATCH 179/826] Recovered updates in ReportActionCompose --- src/pages/home/report/ReportActionCompose.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 17d2964025fe..2f6f91a9a247 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -29,7 +29,7 @@ import ReportActionComposeFocusManager from '../../../libs/ReportActionComposeFo import participantPropTypes from '../../../components/participantPropTypes'; import ParticipantLocalTime from './ParticipantLocalTime'; import withCurrentUserPersonalDetails, {withCurrentUserPersonalDetailsPropTypes, withCurrentUserPersonalDetailsDefaultProps} from '../../../components/withCurrentUserPersonalDetails'; -import {withNetwork, withPersonalDetails} from '../../../components/OnyxProvider'; +import {withNetwork} from '../../../components/OnyxProvider'; import * as User from '../../../libs/actions/User'; import Tooltip from '../../../components/Tooltip'; import EmojiPickerButton from '../../../components/EmojiPicker/EmojiPickerButton'; @@ -419,7 +419,7 @@ class ReportActionCompose extends React.Component { // We only prevent the task option from showing if it's a DM and the other user is an Expensify default email if ( !Permissions.canUseTasks(this.props.betas) || - (lodashGet(this.props.report, 'participants', []).length === 1 && _.some(reportParticipants, (email) => _.contains(CONST.EXPENSIFY_EMAILS, email))) + (lodashGet(this.props.report, 'participantAccountIDs', []).length === 1 && _.some(reportParticipants, (accountID) => _.contains(CONST.EXPENSIFY_ACCOUNT_IDS, accountID))) ) { return []; } @@ -897,11 +897,11 @@ class ReportActionCompose extends React.Component { } render() { - const reportParticipants = _.without(lodashGet(this.props.report, 'participants', []), this.props.currentUserPersonalDetails.login); - const participantsWithoutExpensifyEmails = _.difference(reportParticipants, CONST.EXPENSIFY_EMAILS); - const reportRecipient = this.props.personalDetails[participantsWithoutExpensifyEmails[0]]; + const reportParticipants = _.without(lodashGet(this.props.report, 'participantAccountIDs', []), this.props.currentUserPersonalDetails.accountID); + const participantsWithoutExpensifyAccountIDs = _.difference(reportParticipants, CONST.EXPENSIFY_ACCOUNT_IDS); + const reportRecipient = this.props.personalDetails[participantsWithoutExpensifyAccountIDs[0]]; const shouldShowReportRecipientLocalTime = - ReportUtils.canShowReportRecipientLocalTime(this.props.personalDetails, this.props.report, this.props.currentUserPersonalDetails.login) && !this.props.isComposerFullSize; + ReportUtils.canShowReportRecipientLocalTime(this.props.personalDetails, this.props.report, this.props.currentUserPersonalDetails.accountID) && !this.props.isComposerFullSize; // Prevents focusing and showing the keyboard while the drawer is covering the chat. const isBlockedFromConcierge = ReportUtils.chatIncludesConcierge(this.props.report) && User.isBlockedFromConcierge(this.props.blockedFromConcierge); @@ -1224,7 +1224,6 @@ export default compose( withNavigationFocus, withLocalize, withNetwork(), - withPersonalDetails(), withCurrentUserPersonalDetails, withKeyboardState, withOnyx({ @@ -1248,7 +1247,7 @@ export default compose( selector: EmojiUtils.getPreferredSkinToneIndex, }, personalDetails: { - key: ONYXKEYS.PERSONAL_DETAILS, + key: ONYXKEYS.PERSONAL_DETAILS_LIST, }, shouldShowComposeInput: { key: ONYXKEYS.SHOULD_SHOW_COMPOSE_INPUT, From 7d2a1f7ba3af73442ad0cf3b2de0fa0fcf2540ce Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Thu, 15 Jun 2023 19:51:30 +0200 Subject: [PATCH 180/826] Fixed linter issue in OnyxProvider --- src/components/OnyxProvider.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/OnyxProvider.js b/src/components/OnyxProvider.js index 71a6da9b095c..dfe96684ae3c 100644 --- a/src/components/OnyxProvider.js +++ b/src/components/OnyxProvider.js @@ -19,13 +19,23 @@ const propTypes = { children: PropTypes.node.isRequired, }; -const OnyxProvider = (props) => ( - - {props.children} - -); +function OnyxProvider(props) { + return ( + + {props.children} + + ); +} OnyxProvider.displayName = 'OnyxProvider'; OnyxProvider.propTypes = propTypes; From efc10d645bd2936ab4b2bc23fd02c0b4ed3c4969 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 12:05:39 -0700 Subject: [PATCH 181/826] Update tests to accurate represent new logic --- .github/workflows/test.yml | 6 +- ...MergedBetweenTest.sh => CIGitLogicTest.sh} | 236 +++++++----------- 2 files changed, 99 insertions(+), 143 deletions(-) rename tests/unit/{getPullRequestsMergedBetweenTest.sh => CIGitLogicTest.sh} (50%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7cc2547f34c3..46718b234e92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: - name: Jest tests run: npx jest --silent --shard=${{ fromJSON(matrix.chunk) }}/${{ strategy.job-total }} --max-workers ${{ steps.cpu-cores.outputs.count }} - + storybookTests: if: ${{ github.actor != 'OSBotify' || github.event_name == 'workflow_call' }} runs-on: ubuntu-latest @@ -55,5 +55,5 @@ jobs: - uses: Expensify/App/.github/actions/composite/setupNode@main - - name: getPullRequestsMergedBetween - run: tests/unit/getPullRequestsMergedBetweenTest.sh + - name: Test CI git logic + run: tests/unit/CIGitLogicTest.sh diff --git a/tests/unit/getPullRequestsMergedBetweenTest.sh b/tests/unit/CIGitLogicTest.sh similarity index 50% rename from tests/unit/getPullRequestsMergedBetweenTest.sh rename to tests/unit/CIGitLogicTest.sh index e9b1b75a079f..948e2babf8d5 100755 --- a/tests/unit/getPullRequestsMergedBetweenTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -10,8 +10,10 @@ getPullRequestsMergedBetween="$TEST_DIR/utils/getPullRequestsMergedBetween.mjs" source "$SCRIPTS_DIR/shellUtils.sh" +PR_COUNT=0 + function print_version { - < package.json jq -r .version + < package.json jq -r .version } ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) @@ -64,20 +66,19 @@ git commit -m "Initial commit" info "Bumping version to 1.0.1" npm --no-git-tag-version version 1.0.1 -m "Update version to 1.0.1" -git add package.json +git add package.json package-lock.json git commit -m "Update version to 1.0.1" info "Creating branches..." -git checkout -b staging -git checkout -b production -git checkout main +git branch staging +git branch production success "Initialized Git repo!" info "Creating initial tag..." -git checkout staging +git switch staging git tag "$(print_version)" -git checkout main +git switch main success "Created initial tag $(print_version)" success "Setup complete!" @@ -85,130 +86,112 @@ success "Setup complete!" title "Scenario #1: Merge a pull request while the checklist is unlocked" -# Create "PR 1", and merge that PR to main. -info "Creating PR #1" -git checkout main -git checkout -b pr-1 -echo "Changes from PR #1" >> PR1.txt -git add PR1.txt -git commit -m "Changes from PR #1" -success "Created PR #1 in branch pr-1" - -info "Merging PR #1 to main" -git checkout main -git merge pr-1 --no-ff -m "Merge pull request #1 from Expensify/pr-1" -git branch -d pr-1 -success "Merged PR #1 to main" +((PR_COUNT++)) +info "Creating PR #$PR_COUNT and merging it into main..." +git switch -c "pr-$PR_COUNT" +echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" +git add "PR$PR_COUNT.txt" +git commit -m "Changes from PR #$PR_COUNT" +success "Created PR #$PR_COUNT in branch pr-$PR_COUNT" + +info "Merging PR #$PR_COUNT to main" +git switch main +git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" +git branch -d "pr-$PR_COUNT" +success "Merged PR #$PR_COUNT to main" # Bump the version to 1.0.2 info "Bumping version to 1.0.2" -git checkout main -git checkout -b version-bump npm --no-git-tag-version version 1.0.2 -m "Update version to 1.0.2" git add package.json package-lock.json git commit -m "Update version to $(print_version)" -git checkout main -git merge version-bump --no-ff -m "Merge pull request #2 from Expensify/version-bump" -info "Merged PR #2 to main" -git branch -d version-bump success "Version bumped to $(print_version) on main" -# Merge main into staging -info "Merging main into staging..." -git checkout staging -git checkout -b update-staging-from-main -git merge --no-edit -Xtheirs main || { git diff --name-only --diff-filter=U | xargs git rm; git -c core.editor=true merge --continue; } -git checkout staging -git merge update-staging-from-main --no-ff -m "Merge pull request #3 from Expensify/update-staging-from-main" -info "Merged PR #3 to staging" -git branch -d update-staging-from-main -success "Merged main into staging!" +# Recreate staging from main +info "Recreating staging from main..." +git branch -D staging +git switch -c staging +success "Recreated staging from main!" # Tag staging info "Tagging new version..." -git checkout staging git tag "$(print_version)" -git checkout main +git switch main success "Created new tag $(print_version)" # Verify output for checklist and deploy comment info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.2') -assert_equal "$output" "[ '1' ]" +assert_equal "$output" "[ '$PR_COUNT' ]" success "Scenario #1 completed successfully!" title "Scenario #2: Merge a pull request with the checklist locked, but don't CP it" -info "Creating PR #4 and merging it into main..." -git checkout main -git checkout -b pr-4 -echo "Changes from PR #4" >> PR4.txt -git add PR4.txt -git commit -m "Changes from PR #4" -git checkout main -git merge pr-4 --no-ff -m "Merge pull request #4 from Expensify/pr-4" -info "Merged PR #4 into main" -git branch -d pr-4 -success "Created PR #4 and merged it to main!" +((PR_COUNT++)) +info "Creating PR #$PR_COUNT and merging it into main..." +git switch -c "pr-$PR_COUNT" +# TODO change filename to PR_$PR_COUNT.txt +echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" +git add "PR$PR_COUNT.txt" +git commit -m "Changes from PR #$PR_COUNT" +git switch main +git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" +info "Merged PR #$PR_COUNT into main" +git branch -d "pr-$PR_COUNT" +success "Created PR #$PR_COUNT and merged it to main!" success "Scenario #2 completed successfully!" title "Scenario #3: Merge a pull request with the checklist locked and CP it to staging" -info "Creating PR #5 and merging it into main..." -git checkout main -git checkout -b pr-5 -echo "Changes from PR #5" >> PR5.txt -git add PR5.txt -git commit -m "Changes from PR #5" -git checkout main -git merge pr-5 --no-ff -m "Merge pull request #5 from Expensify/pr-5" -PR_5_MERGE_COMMIT="$(git log -1 --format='%H')" -info "Merged PR #5 into main" -git branch -d pr-5 -success "Created PR #5 and merged it to main!" +((PR_COUNT++)) +info "Creating PR #$PR_COUNT and merging it into main..." +git switch -c "pr-$PR_COUNT" +echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" +git add "PR$PR_COUNT.txt" +git commit -m "Changes from PR #$PR_COUNT" +git switch main +git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" +PR_MERGE_COMMIT="$(git log -1 --format='%H')" +info "Merged PR #$PR_COUNT into main" +git branch -d "pr-$PR_COUNT" +success "Created PR #$PR_COUNT and merged it to main!" info "Bumping version to 1.0.3 on main..." -git checkout main -git checkout -b version-bump npm --no-git-tag-version version 1.0.3 -m "Update version to 1.0.3" git add package.json package-lock.json git commit -m "Update version to $(print_version)" -git checkout main -git merge version-bump --no-ff -m "Merge pull request #6 from Expensify/version-bump" -VERSION_BUMP_MERGE_COMMIT="$(git log -1 --format='%H')" -info "Merged PR #6 into main" -git branch -d version-bump +VERSION_BUMP_COMMIT="$(git log -1 --format='%H')" success "Bumped version to 1.0.3 on main!" -info "Cherry picking PR #5 and the version bump to staging..." -git checkout staging -git checkout -b cherry-pick-staging-5 -git cherry-pick -x --mainline 1 --strategy=recursive -Xtheirs "$PR_5_MERGE_COMMIT" -git cherry-pick -x --mainline 1 "$VERSION_BUMP_MERGE_COMMIT" -git checkout staging -git merge cherry-pick-staging-5 --no-ff -m "Merge pull request #7 from Expensify/cherry-pick-staging-5" -git branch -d cherry-pick-staging-5 -info "Merged PR #7 into staging" -success "Successfully cherry-picked PR #5 to staging!" +info "Cherry picking PR #$PR_COUNT and the version bump to staging..." +git switch staging +git switch -c cherry-pick-staging +git cherry-pick -x --mainline 1 --strategy=recursive -Xtheirs "$PR_MERGE_COMMIT" +git cherry-pick -x --mainline 1 "$VERSION_BUMP_COMMIT" +git switch staging +((PR_COUNT++)) +git merge cherry-pick-staging --no-ff -m "Merge pull request #$PR_COUNT from Expensify/cherry-pick-staging" +git branch -d cherry-pick-staging +info "Merged PR #$PR_COUNT into staging" +success "Successfully cherry-picked PR #$((PR_COUNT - 1)) to staging!" info "Tagging the new version on staging..." -git checkout staging git tag "$(print_version)" success "Created tag $(print_version)" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.3" output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.3') -assert_equal "$output" "[ '7', '5', '1' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.0.2 1.0.3" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.0.3') -assert_equal "$output" "[ '7', '5' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT -1))' ]" success "Scenario #3 completed successfully!" @@ -216,110 +199,83 @@ success "Scenario #3 completed successfully!" title "Scenario #4: Close the checklist" title "Scenario #4A: Run the production deploy" -info "Updating production from staging..." -git checkout production -git checkout -b update-production-from-staging -git merge --no-edit -Xtheirs staging || { git diff --name-only --diff-filter=U | xargs git rm; git -c core.editor=true merge --continue; } -git checkout production -git merge update-production-from-staging --no-ff -m "Merge pull request #8 from Expensify/update-production-from-staging" -info "Merged PR #8 into production" -git branch -d update-production-from-staging -success "Updated production from staging!" +info "Recreating production from staging..." +git branch -D production +git switch -c production +success "Recreated production from staging!" # Verify output for release body and production deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.3" output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.3') -assert_equal "$output" "[ '7', '5', '1' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" success "Scenario #4A completed successfully!" title "Scenario #4B: Run the staging deploy and create a new checklist" info "Bumping version to 1.1.0 on main..." -git checkout main -git checkout -b version-bump +git switch main npm --no-git-tag-version version 1.1.0 -m "Update version to 1.1.0" git add package.json package-lock.json git commit -m "Update version to $(print_version)" -git checkout main -git merge version-bump --no-ff -m "Merge pull request #9 from Expensify/version-bump" -info "Merged PR #9 into main" -git branch -d version-bump success "Successfully updated version to 1.1.0 on main!" -info "Updating staging from main..." -git checkout staging -git checkout -b update-staging-from-main -git merge --no-edit -Xtheirs main || { git diff --name-only --diff-filter=U | xargs git rm; git -c core.editor=true merge --continue; } -git checkout staging -git merge update-staging-from-main --no-ff -m "Merge pull request #10 from Expensify/update-staging-from-main" -info "Merged PR #10 into staging" -git branch -d update-staging-from-main -success "Successfully updated staging from main!" +info "Re-creating staging from main..." +git branch -D staging +git switch -c staging +success "Recreated staging from main!" info "Tagging new version on staging..." -git checkout staging git tag "$(print_version)" success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.3 1.1.0" output=$(node "$getPullRequestsMergedBetween" '1.0.3' '1.1.0') -assert_equal "$output" "[ '4' ]" +assert_equal "$output" "[ '$((PR_COUNT - 2))' ]" success "Scenario #4B completed successfully!" title "Scenario #5: Merging another pull request when the checklist is unlocked" -info "Creating PR #11 and merging it to main..." -git checkout main -git checkout -b pr-11 -echo "Changes from PR #11" >> PR11.txt -git add PR11.txt -git commit -m "Changes from PR #11" -git checkout main -git merge pr-11 --no-ff -m "Merge pull request #11 from Expensify/pr-11" -info "Merged PR #11 into main" -git branch -d pr-11 -success "Created PR #11 and merged it into main!" +((PR_COUNT++)) +info "Creating PR #$PR_COUNT and merging it to main..." +git switch main +git switch -c "pr-$PR_COUNT" +echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" +git add "PR$PR_COUNT.txt" +git commit -m "Changes from PR #$PR_COUNT" +git switch main +git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" +info "Merged PR #$PR_COUNT into main" +git branch -d "pr-$PR_COUNT" +success "Created PR #$PR_COUNT and merged it into main!" info "Bumping version to 1.1.1 on main..." -git checkout main -git checkout -b version-bump npm --no-git-tag-version version 1.1.1 -m "Update version to 1.1.1" git add package.json package-lock.json -git commit -m "Update version to $(jq -r .version < package.json)" -git checkout main -git merge version-bump --no-ff -m "Merge pull request #12 from Expensify/version-bump" -info "Merged PR #12 into main" -git branch -d version-bump +git commit -m "Update version to $(print_version)" success "Bumped version to 1.1.1 on main!" -info "Merging main into staging..." -git checkout staging -git checkout -b update-staging-from-main -git merge --no-edit -Xtheirs main || { git diff --name-only --diff-filter=U | xargs git rm; git -c core.editor=true merge --continue; } -git checkout staging -git merge update-staging-from-main --no-ff -m "Merge pull request #13 from Expensify/update-staging-from-main" -info "Merged PR #13 into staging" -git branch -d update-staging-from-main -success "Merged main into staging!" +info "Recreating staging from main..." +git branch -D staging +git switch -c staging +success "Recreated staging from main!" info "Tagging staging..." -git checkout staging git tag "$(print_version)" success "Successfully tagged version $(print_version) on staging" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.3 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.0.3' '1.1.1') -assert_equal "$output" "[ '11', '4' ]" +assert_equal "$output" "[ '$PR_COUNT' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.1.0' '1.1.1') -assert_equal "$output" "[ '11' ]" +assert_equal "$output" "[ '$PR_COUNT' ]" success "Scenario #6 completed successfully!" From 983153d6c4c8eb1bb5c61deca7c5049c2c515815 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 16:20:12 -0700 Subject: [PATCH 182/826] Cleanup tests a bit --- tests/unit/CIGitLogicTest.sh | 61 +++++++++++++++--------------------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 948e2babf8d5..ccdec11870dd 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -18,14 +18,12 @@ function print_version { ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) -if ! command -v jq &> /dev/null -then +if ! command -v jq &> /dev/null; then error "command jq could not be found, install it with \`brew install jq\` (macOS) or \`apt-get install jq\` (Linux) and re-run this script" exit 1 fi -if ! command -v npm &> /dev/null -then +if ! command -v npm &> /dev/null; then error "command npm could not be found, install it and re-run this script" exit 1 fi @@ -40,8 +38,7 @@ cd "$DUMMY_DIR" || exit 1 success "Successfully created dummy repo at $(pwd)" info "Initializing npm project in $DUMMY_DIR" -if [[ $(npm init -y) ]] -then +if [[ $(npm init -y) ]]; then success "Successfully initialized npm project" else error "Failed initializing npm project" @@ -49,8 +46,7 @@ else fi info "Installing node dependencies..." -if [[ $(npm install underscore && npm install) ]] -then +if [[ $(npm install underscore) ]]; then success "Successfully installed node dependencies" else error "Failed installing node dependencies" @@ -64,11 +60,6 @@ git config user.name "test" git add package.json package-lock.json git commit -m "Initial commit" -info "Bumping version to 1.0.1" -npm --no-git-tag-version version 1.0.1 -m "Update version to 1.0.1" -git add package.json package-lock.json -git commit -m "Update version to 1.0.1" - info "Creating branches..." git branch staging git branch production @@ -100,9 +91,9 @@ git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensif git branch -d "pr-$PR_COUNT" success "Merged PR #$PR_COUNT to main" -# Bump the version to 1.0.2 -info "Bumping version to 1.0.2" -npm --no-git-tag-version version 1.0.2 -m "Update version to 1.0.2" +# Bump the version to 1.0.1 +info "Bumping version to 1.0.1" +npm --no-git-tag-version version 1.0.1 git add package.json package-lock.json git commit -m "Update version to $(print_version)" success "Version bumped to $(print_version) on main" @@ -116,12 +107,12 @@ success "Recreated staging from main!" # Tag staging info "Tagging new version..." git tag "$(print_version)" -git switch main success "Created new tag $(print_version)" +git switch main # Verify output for checklist and deploy comment -info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.2" -output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.2') +info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.1" +output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.1') assert_equal "$output" "[ '$PR_COUNT' ]" success "Scenario #1 completed successfully!" @@ -132,7 +123,6 @@ title "Scenario #2: Merge a pull request with the checklist locked, but don't CP ((PR_COUNT++)) info "Creating PR #$PR_COUNT and merging it into main..." git switch -c "pr-$PR_COUNT" -# TODO change filename to PR_$PR_COUNT.txt echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" git add "PR$PR_COUNT.txt" git commit -m "Changes from PR #$PR_COUNT" @@ -144,7 +134,6 @@ success "Created PR #$PR_COUNT and merged it to main!" success "Scenario #2 completed successfully!" - title "Scenario #3: Merge a pull request with the checklist locked and CP it to staging" ((PR_COUNT++)) @@ -160,12 +149,12 @@ info "Merged PR #$PR_COUNT into main" git branch -d "pr-$PR_COUNT" success "Created PR #$PR_COUNT and merged it to main!" -info "Bumping version to 1.0.3 on main..." -npm --no-git-tag-version version 1.0.3 -m "Update version to 1.0.3" +info "Bumping version to 1.0.2 on main..." +npm --no-git-tag-version version 1.0.2 -m "Update version to 1.0.2" git add package.json package-lock.json git commit -m "Update version to $(print_version)" VERSION_BUMP_COMMIT="$(git log -1 --format='%H')" -success "Bumped version to 1.0.3 on main!" +success "Bumped version to 1.0.2 on main!" info "Cherry picking PR #$PR_COUNT and the version bump to staging..." git switch staging @@ -183,14 +172,16 @@ info "Tagging the new version on staging..." git tag "$(print_version)" success "Created tag $(print_version)" +exit 0 + # Verify output for checklist -info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.3" -output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.3') +info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" +output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment -info "Checking output of getPullRequestsMergedBetween 1.0.2 1.0.3" -output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.0.3') +info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.2" +output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.2') assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT -1))' ]" success "Scenario #3 completed successfully!" @@ -205,8 +196,8 @@ git switch -c production success "Recreated production from staging!" # Verify output for release body and production deploy comments -info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.3" -output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.3') +info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" +output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" success "Scenario #4A completed successfully!" @@ -215,7 +206,7 @@ title "Scenario #4B: Run the staging deploy and create a new checklist" info "Bumping version to 1.1.0 on main..." git switch main -npm --no-git-tag-version version 1.1.0 -m "Update version to 1.1.0" +npm --no-git-tag-version version 1.1.0 git add package.json package-lock.json git commit -m "Update version to $(print_version)" success "Successfully updated version to 1.1.0 on main!" @@ -230,8 +221,8 @@ git tag "$(print_version)" success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments -info "Checking output of getPullRequestsMergedBetween 1.0.3 1.1.0" -output=$(node "$getPullRequestsMergedBetween" '1.0.3' '1.1.0') +info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" +output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.0') assert_equal "$output" "[ '$((PR_COUNT - 2))' ]" success "Scenario #4B completed successfully!" @@ -268,8 +259,8 @@ git tag "$(print_version)" success "Successfully tagged version $(print_version) on staging" # Verify output for checklist -info "Checking output of getPullRequestsMergedBetween 1.0.3 1.1.1" -output=$(node "$getPullRequestsMergedBetween" '1.0.3' '1.1.1') +info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" +output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.1') assert_equal "$output" "[ '$PR_COUNT' ]" # Verify output for deploy comment From 9174a3451976ff0bb19bc0018754f5c42aee7058 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 16:40:28 -0700 Subject: [PATCH 183/826] Update tests to passing state --- tests/unit/CIGitLogicTest.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index ccdec11870dd..4717611efad5 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -172,8 +172,6 @@ info "Tagging the new version on staging..." git tag "$(print_version)" success "Created tag $(print_version)" -exit 0 - # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') @@ -223,7 +221,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.0') -assert_equal "$output" "[ '$((PR_COUNT - 2))' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))' ]" success "Scenario #4B completed successfully!" @@ -261,7 +259,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.1') -assert_equal "$output" "[ '$PR_COUNT' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))', '$((PR_COUNT - 2))', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" From 2dcfaadf54e440f0ca2cddb45d6dc164e5e0cd06 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 16:56:18 -0700 Subject: [PATCH 184/826] Simplify getPullRequestsMergedBetween implementation --- .github/libs/GitUtils.js | 41 +++++++++--------------------------- tests/unit/CIGitLogicTest.sh | 4 ++-- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 1d3266b9ff60..cfef48d0e578 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -9,7 +9,7 @@ const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); * @param {String} toRef * @returns {Promise>} */ -function getMergeLogsAsJSON(fromRef, toRef) { +function getCommitHistoryAsJSON(fromRef, toRef) { const command = `git log --format='{"commit": "%H", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); console.log('Running command: ', command); @@ -59,8 +59,8 @@ function getValidMergedPRs(commitMessages) { return mergedPRs; } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/); - if (!_.isNull(match) && match[1]) { + const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + if (!_.isNull(match) && match[1] && !_.contains(mergedPRs, match[1])) { mergedPRs.push(match[1]); } @@ -78,35 +78,14 @@ function getValidMergedPRs(commitMessages) { * @returns {Promise>} – Pull request numbers */ function getPullRequestsMergedBetween(fromRef, toRef) { - let targetMergeList; - return getMergeLogsAsJSON(fromRef, toRef) - .then((mergeList) => { - console.log(`Commits made between ${fromRef} and ${toRef}:`, mergeList); - targetMergeList = mergeList; + return getCommitHistoryAsJSON(fromRef, toRef).then((commitList) => { + console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); - // Get the full history on this branch, inclusive of the oldest commit from our target comparison - const oldestCommit = _.last(mergeList).commit; - return getMergeLogsAsJSON(oldestCommit, 'HEAD'); - }) - .then((fullMergeList) => { - // Remove from the final merge list any commits whose message appears in the full merge list more than once. - // This indicates that the PR should not be included in our list because it is a duplicate, and thus has already been processed by our CI - // See https://github.com/Expensify/App/issues/4977 for details - const duplicateMergeList = _.chain(fullMergeList) - .groupBy('subject') - .values() - .filter((i) => i.length > 1) - .flatten() - .pluck('commit') - .value(); - const finalMergeList = _.filter(targetMergeList, (i) => !_.contains(duplicateMergeList, i.commit)); - console.log('Filtered out the following commits which were duplicated in the full git log:', _.difference(targetMergeList, finalMergeList)); - - // Find which commit messages correspond to merged PR's - const pullRequestNumbers = getValidMergedPRs(_.pluck(finalMergeList, 'subject')); - console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); - return pullRequestNumbers; - }); + // Find which commit messages correspond to merged PR's + const pullRequestNumbers = getValidMergedPRs(_.pluck(commitList, 'subject')); + console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); + return pullRequestNumbers; + }); } module.exports = { diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 4717611efad5..1223e5f67308 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -221,7 +221,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.0') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))' ]" success "Scenario #4B completed successfully!" @@ -259,7 +259,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.1') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))', '$((PR_COUNT - 2))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" From 4294e5a6b7eccbc1bdd57438c5f1e2509aefa54d Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 16:58:13 -0700 Subject: [PATCH 185/826] Use checkout v3 --- .github/workflows/cherryPick.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 2f8d05e15f8b..f9876f714f86 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -35,9 +35,8 @@ jobs: if: ${{ always() && fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }} runs-on: ubuntu-latest steps: - # Version: 2.3.4 - name: Checkout staging branch - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@v3 with: ref: staging token: ${{ secrets.OS_BOTIFY_TOKEN }} From c20a006489355c8e726e0e135ddea92d1a181dae Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Thu, 15 Jun 2023 17:20:00 -0700 Subject: [PATCH 186/826] Add lounge access page for users who qualify for lounge membership --- src/ROUTES.js | 1 + src/languages/en.js | 9 +++ src/languages/es.js | 8 ++ .../AppNavigator/ModalStackNavigators.js | 7 ++ src/libs/Navigation/linkingConfig.js | 3 + src/pages/settings/LoungeAccessPage.js | 81 +++++++++++++++++++ src/pages/settings/Profile/ProfilePage.js | 15 ++++ 7 files changed, 124 insertions(+) create mode 100644 src/pages/settings/LoungeAccessPage.js diff --git a/src/ROUTES.js b/src/ROUTES.js index 966c3d0c5a1a..4429f5de3e68 100644 --- a/src/ROUTES.js +++ b/src/ROUTES.js @@ -30,6 +30,7 @@ export default { SETTINGS_TIMEZONE: 'settings/profile/timezone', SETTINGS_TIMEZONE_SELECT: 'settings/profile/timezone/select', SETTINGS_PRONOUNS: 'settings/profile/pronouns', + SETTINGS_LOUNGE_ACCESS: 'settings/profile/lounge-access', SETTINGS_PREFERENCES: 'settings/preferences', SETTINGS_PRIORITY_MODE: 'settings/preferences/priority-mode', SETTINGS_LANGUAGE: 'settings/preferences/language', diff --git a/src/languages/en.js b/src/languages/en.js index f2f0adad2eff..f9e9d8fd6aa9 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -405,6 +405,15 @@ export default { online: 'Online', offline: 'Offline', syncing: 'Syncing', + loungeAccess: 'Lounge access', + }, + loungeAccessPage: { + loungeAccess: 'Lounge access', + headline: 'You qualify for access to our exclusive lounges.', + description: 'Talk to trees, look at the birds. Whatever it takes. Life is too short to be alone, too precious. Share it with a friend.', + coffeePromo: 'Great coffee and cocktails', + networkingPromo: 'Network with other members', + viewsPromo: 'Incredible views of San Francisco', }, pronounsPage: { pronouns: 'Pronouns', diff --git a/src/languages/es.js b/src/languages/es.js index 6b6d003ad398..d669224a29ca 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -405,6 +405,14 @@ export default { offline: 'Desconectado', syncing: 'Sincronizando', }, + loungeAccessPage: { + loungeAccess: 'Acceso al lounge', + headline: 'You qualify for access to our exclusive lounges.', + description: 'Talk to trees, look at the birds. Whatever it takes. Life is too short to be alone, too precious. Share it with a friend.', + coffeePromo: 'Great coffee and cocktails', + networkingPromo: 'Network with other members', + viewsPromo: 'Incredible views of San Francisco', + }, pronounsPage: { pronouns: 'Pronombres', isShownOnProfile: 'Tus pronombres se muestran en tu perfil.', diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index b983ffd14968..42ba27f41a3b 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -477,6 +477,13 @@ const SettingsModalStackNavigator = createModalStackNavigator([ }, name: 'Settings_App_Download_Links', }, + { + getComponent: () => { + const SettingsLoungeAccessPage = require('../../../pages/settings/LoungeAccessPage').default; + return SettingsLoungeAccessPage; + }, + name: 'Settings_Lounge_Access', + }, { getComponent: () => { const SettingsPaymentsPage = require('../../../pages/settings/Payments/PaymentsPage').default; diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 37506c0460ce..a7f7123df9bc 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -128,6 +128,9 @@ export default { Settings_ContactMethodDetails: { path: ROUTES.SETTINGS_CONTACT_METHOD_DETAILS, }, + Settings_Lounge_Access: { + path: ROUTES.SETTINGS_LOUNGE_ACCESS, + }, Settings_NewContactMethod: { path: ROUTES.SETTINGS_NEW_CONTACT_METHOD, exact: true, diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js new file mode 100644 index 000000000000..d0f927821e37 --- /dev/null +++ b/src/pages/settings/LoungeAccessPage.js @@ -0,0 +1,81 @@ +import _ from 'underscore'; +import React from 'react'; +import {View, ScrollView} from 'react-native'; +import HeaderWithBackButton from '../../components/HeaderWithBackButton'; +import Navigation from '../../libs/Navigation/Navigation'; +import ROUTES from '../../ROUTES'; +import styles from '../../styles/styles'; +import Text from '../../components/Text'; +import * as Expensicons from '../../components/Icon/Expensicons'; +import ScreenWrapper from '../../components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; +import MenuItem from '../../components/MenuItem'; +import Logo from '../../../assets/images/new-expensify.svg'; +import compose from '../../libs/compose'; + +const propTypes = { + ...withLocalizePropTypes, + ...windowDimensionsPropTypes, +}; + +function LoungeAccessPage(props) { + const menuItems = [ + { + translationKey: 'loungeAccessPage.coffeePromo', + icon: Expensicons.Link, + }, + { + translationKey: 'loungeAccessPage.networkingPromo', + icon: Expensicons.Link, + }, + { + translationKey: 'loungeAccessPage.viewsPromo', + icon: Expensicons.Link, + }, + ]; + + return ( + + {({safeAreaPaddingBottomStyle}) => ( + <> + Navigation.goBack(ROUTES.SETTINGS)} + /> + + + + + + + {props.translate('loungeAccessPage.headline')} + + {props.translate('loungeAccessPage.description')} + + + {_.map(menuItems, (item) => ( + + ))} + + + + )} + + ); +} + +LoungeAccessPage.propTypes = propTypes; +LoungeAccessPage.displayName = 'LoungeAccessPage'; + +export default compose(withLocalize, withWindowDimensions)(LoungeAccessPage); diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index e59b98785ec8..9d5cad544fde 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -22,6 +22,7 @@ import styles from '../../../styles/styles'; import * as Expensicons from '../../../components/Icon/Expensicons'; import ONYXKEYS from '../../../ONYXKEYS'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; +import userPropTypes from '../userPropTypes'; const propTypes = { /* Onyx Props */ @@ -35,6 +36,8 @@ const propTypes = { errorFields: PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)), }), + user: userPropTypes, + ...withLocalizePropTypes, ...windowDimensionsPropTypes, ...withCurrentUserPersonalDetailsPropTypes, @@ -42,6 +45,7 @@ const propTypes = { const defaultProps = { loginList: {}, + user: {}, ...withCurrentUserPersonalDetailsDefaultProps, }; @@ -118,6 +122,14 @@ function ProfilePage(props) { onPress={() => Navigation.navigate(ROUTES.SETTINGS_PERSONAL_DETAILS)} shouldShowRightIcon /> + {props.user.hasLoungeAccess && ( + Navigation.navigate(ROUTES.SETTINGS_LOUNGE_ACCESS)} + shouldShowRightIcon + /> + )} ); @@ -135,5 +147,8 @@ export default compose( loginList: { key: ONYXKEYS.LOGIN_LIST, }, + user: { + key: ONYXKEYS.USER, + }, }), )(ProfilePage); From a16e4b98b8e54ca038d2614fa959837f83f85969 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 17:42:24 -0700 Subject: [PATCH 187/826] Filter out any commits by OSBotify from the checklist --- .github/libs/GitUtils.js | 26 ++++++++++++++++---------- tests/unit/CIGitLogicTest.sh | 30 +++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index cfef48d0e578..cc7d635751e3 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -7,16 +7,16 @@ const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); * * @param {String} fromRef * @param {String} toRef - * @returns {Promise>} + * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { - const command = `git log --format='{"commit": "%H", "subject": "%s"},' ${fromRef}...${toRef}`; + const command = `git log --format='{"commit": "%H", "authorName": "%an", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); console.log('Running command: ', command); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "subject": "%s"},', `${fromRef}...${toRef}`]); + const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]); spawnedProcess.on('message', console.log); spawnedProcess.stdout.on('data', (chunk) => { console.log(chunk.toString()); @@ -48,18 +48,24 @@ function getCommitHistoryAsJSON(fromRef, toRef) { /** * Parse merged PRs, excluding those from irrelevant branches. * - * @param {Array} commitMessages + * @param {Array>} commits * @returns {Array} */ -function getValidMergedPRs(commitMessages) { +function getValidMergedPRs(commits) { return _.reduce( - commitMessages, - (mergedPRs, commitMessage) => { - if (!_.isString(commitMessage)) { + commits, + (mergedPRs, commit) => { + const author = commit.authorName; + if (author === 'OSBotify') { return mergedPRs; } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + const message = commit.subject; + if (!_.isString(message)) { + return mergedPRs; + } + + const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); if (!_.isNull(match) && match[1] && !_.contains(mergedPRs, match[1])) { mergedPRs.push(match[1]); } @@ -82,7 +88,7 @@ function getPullRequestsMergedBetween(fromRef, toRef) { console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); // Find which commit messages correspond to merged PR's - const pullRequestNumbers = getValidMergedPRs(_.pluck(commitList, 'subject')); + const pullRequestNumbers = getValidMergedPRs(commitList); console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); return pullRequestNumbers; }); diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 1223e5f67308..717a60cdc063 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -16,6 +16,18 @@ function print_version { < package.json jq -r .version } +function setup_git_as_human { + info "Switching to human git user" + git config user.name test + git config user.email test@test.com +} + +function setup_git_as_osbotify { + info "Switching to OSBotify git user" + git config user.name OSBotify + git config user.email infra+osbotify@expensify.com +} + ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) if ! command -v jq &> /dev/null; then @@ -55,8 +67,7 @@ fi info "Initializing Git repo..." git init -b main -git config user.email "test@test.com" -git config user.name "test" +setup_git_as_human git add package.json package-lock.json git commit -m "Initial commit" @@ -93,6 +104,7 @@ success "Merged PR #$PR_COUNT to main" # Bump the version to 1.0.1 info "Bumping version to 1.0.1" +setup_git_as_osbotify npm --no-git-tag-version version 1.0.1 git add package.json package-lock.json git commit -m "Update version to $(print_version)" @@ -122,6 +134,7 @@ title "Scenario #2: Merge a pull request with the checklist locked, but don't CP ((PR_COUNT++)) info "Creating PR #$PR_COUNT and merging it into main..." +setup_git_as_human git switch -c "pr-$PR_COUNT" echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" git add "PR$PR_COUNT.txt" @@ -150,6 +163,7 @@ git branch -d "pr-$PR_COUNT" success "Created PR #$PR_COUNT and merged it to main!" info "Bumping version to 1.0.2 on main..." +setup_git_as_osbotify npm --no-git-tag-version version 1.0.2 -m "Update version to 1.0.2" git add package.json package-lock.json git commit -m "Update version to $(print_version)" @@ -175,12 +189,12 @@ success "Created tag $(print_version)" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.2') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT -1))' ]" +assert_equal "$output" "[ '$((PR_COUNT -1))' ]" success "Scenario #3 completed successfully!" @@ -196,7 +210,7 @@ success "Recreated production from staging!" # Verify output for release body and production deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" success "Scenario #4A completed successfully!" @@ -221,7 +235,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.0') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))' ]" +assert_equal "$output" "[ '$((PR_COUNT - 1))', '$((PR_COUNT - 2))' ]" success "Scenario #4B completed successfully!" @@ -230,6 +244,7 @@ title "Scenario #5: Merging another pull request when the checklist is unlocked" ((PR_COUNT++)) info "Creating PR #$PR_COUNT and merging it to main..." +setup_git_as_human git switch main git switch -c "pr-$PR_COUNT" echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" @@ -242,6 +257,7 @@ git branch -d "pr-$PR_COUNT" success "Created PR #$PR_COUNT and merged it into main!" info "Bumping version to 1.1.1 on main..." +setup_git_as_osbotify npm --no-git-tag-version version 1.1.1 -m "Update version to 1.1.1" git add package.json package-lock.json git commit -m "Update version to $(print_version)" @@ -259,7 +275,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.1') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 1))', '$((PR_COUNT - 2))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 2))', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" From 7e7a37a8c4fd1c38f64334272d936258b2fdad85 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 18:59:19 -0700 Subject: [PATCH 188/826] Eliminate CPd PRs from next checklist --- .github/libs/GitUtils.js | 45 +++++++++++++++++++++--------------- tests/unit/CIGitLogicTest.sh | 4 ++-- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index cc7d635751e3..235c8d45ad83 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -52,28 +52,35 @@ function getCommitHistoryAsJSON(fromRef, toRef) { * @returns {Array} */ function getValidMergedPRs(commits) { - return _.reduce( - commits, - (mergedPRs, commit) => { - const author = commit.authorName; - if (author === 'OSBotify') { - return mergedPRs; - } + const mergedPRs = new Set(); + _.each(commits, (commit) => { + const author = commit.authorName; + if (author === 'OSBotify') { + return; + } - const message = commit.subject; - if (!_.isString(message)) { - return mergedPRs; - } + const message = commit.subject; + if (!_.isString(message)) { + return; + } - const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); - if (!_.isNull(match) && match[1] && !_.contains(mergedPRs, match[1])) { - mergedPRs.push(match[1]); - } + const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + if (!_.isArray(match) || match.length < 2) { + return; + } + + const pr = match[1]; + if (mergedPRs.has(pr)) { + // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. + // That also means that we don't want to include it in the current checklist, so we remove it now. + mergedPRs.delete(pr); + return; + } + + mergedPRs.add(pr); + }); - return mergedPRs; - }, - [], - ); + return Array.from(mergedPRs); } /** diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 717a60cdc063..29a123687261 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -235,7 +235,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.0') -assert_equal "$output" "[ '$((PR_COUNT - 1))', '$((PR_COUNT - 2))' ]" +assert_equal "$output" "[ '$((PR_COUNT - 2))' ]" success "Scenario #4B completed successfully!" @@ -275,7 +275,7 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.1') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 2))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 3))' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" From 8c6ec4e249243acedaa553b10e0cde043a0ef2ef Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 15 Jun 2023 19:04:01 -0700 Subject: [PATCH 189/826] Rebuild GH Actions --- .../createOrUpdateStagingDeploy/index.js | 90 +++++++++---------- .../getDeployPullRequestList/index.js | 90 +++++++++---------- 2 files changed, 82 insertions(+), 98 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index bb3e210898db..1d04d7d21098 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -197,16 +197,16 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); * * @param {String} fromRef * @param {String} toRef - * @returns {Promise>} + * @returns {Promise>>} */ -function getMergeLogsAsJSON(fromRef, toRef) { - const command = `git log --format='{"commit": "%H", "subject": "%s"},' ${fromRef}...${toRef}`; +function getCommitHistoryAsJSON(fromRef, toRef) { + const command = `git log --format='{"commit": "%H", "authorName": "%an", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); console.log('Running command: ', command); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "subject": "%s"},', `${fromRef}...${toRef}`]); + const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]); spawnedProcess.on('message', console.log); spawnedProcess.stdout.on('data', (chunk) => { console.log(chunk.toString()); @@ -238,26 +238,39 @@ function getMergeLogsAsJSON(fromRef, toRef) { /** * Parse merged PRs, excluding those from irrelevant branches. * - * @param {Array} commitMessages + * @param {Array>} commits * @returns {Array} */ -function getValidMergedPRs(commitMessages) { - return _.reduce( - commitMessages, - (mergedPRs, commitMessage) => { - if (!_.isString(commitMessage)) { - return mergedPRs; - } +function getValidMergedPRs(commits) { + const mergedPRs = new Set(); + _.each(commits, (commit) => { + const author = commit.authorName; + if (author === 'OSBotify') { + return; + } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/); - if (!_.isNull(match) && match[1]) { - mergedPRs.push(match[1]); - } + const message = commit.subject; + if (!_.isString(message)) { + return; + } - return mergedPRs; - }, - [], - ); + const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + if (!_.isArray(match) || match.length < 2) { + return; + } + + const pr = match[1]; + if (mergedPRs.has(pr)) { + // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. + // That also means that we don't want to include it in the current checklist, so we remove it now. + mergedPRs.delete(pr); + return; + } + + mergedPRs.add(pr); + }); + + return Array.from(mergedPRs); } /** @@ -268,35 +281,14 @@ function getValidMergedPRs(commitMessages) { * @returns {Promise>} – Pull request numbers */ function getPullRequestsMergedBetween(fromRef, toRef) { - let targetMergeList; - return getMergeLogsAsJSON(fromRef, toRef) - .then((mergeList) => { - console.log(`Commits made between ${fromRef} and ${toRef}:`, mergeList); - targetMergeList = mergeList; - - // Get the full history on this branch, inclusive of the oldest commit from our target comparison - const oldestCommit = _.last(mergeList).commit; - return getMergeLogsAsJSON(oldestCommit, 'HEAD'); - }) - .then((fullMergeList) => { - // Remove from the final merge list any commits whose message appears in the full merge list more than once. - // This indicates that the PR should not be included in our list because it is a duplicate, and thus has already been processed by our CI - // See https://github.com/Expensify/App/issues/4977 for details - const duplicateMergeList = _.chain(fullMergeList) - .groupBy('subject') - .values() - .filter((i) => i.length > 1) - .flatten() - .pluck('commit') - .value(); - const finalMergeList = _.filter(targetMergeList, (i) => !_.contains(duplicateMergeList, i.commit)); - console.log('Filtered out the following commits which were duplicated in the full git log:', _.difference(targetMergeList, finalMergeList)); - - // Find which commit messages correspond to merged PR's - const pullRequestNumbers = getValidMergedPRs(_.pluck(finalMergeList, 'subject')); - console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); - return pullRequestNumbers; - }); + return getCommitHistoryAsJSON(fromRef, toRef).then((commitList) => { + console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); + + // Find which commit messages correspond to merged PR's + const pullRequestNumbers = getValidMergedPRs(commitList); + console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); + return pullRequestNumbers; + }); } module.exports = { diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 7b3ad4fd76d5..98f344f5ab49 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -132,16 +132,16 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); * * @param {String} fromRef * @param {String} toRef - * @returns {Promise>} + * @returns {Promise>>} */ -function getMergeLogsAsJSON(fromRef, toRef) { - const command = `git log --format='{"commit": "%H", "subject": "%s"},' ${fromRef}...${toRef}`; +function getCommitHistoryAsJSON(fromRef, toRef) { + const command = `git log --format='{"commit": "%H", "authorName": "%an", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); console.log('Running command: ', command); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "subject": "%s"},', `${fromRef}...${toRef}`]); + const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]); spawnedProcess.on('message', console.log); spawnedProcess.stdout.on('data', (chunk) => { console.log(chunk.toString()); @@ -173,26 +173,39 @@ function getMergeLogsAsJSON(fromRef, toRef) { /** * Parse merged PRs, excluding those from irrelevant branches. * - * @param {Array} commitMessages + * @param {Array>} commits * @returns {Array} */ -function getValidMergedPRs(commitMessages) { - return _.reduce( - commitMessages, - (mergedPRs, commitMessage) => { - if (!_.isString(commitMessage)) { - return mergedPRs; - } +function getValidMergedPRs(commits) { + const mergedPRs = new Set(); + _.each(commits, (commit) => { + const author = commit.authorName; + if (author === 'OSBotify') { + return; + } - const match = commitMessage.match(/Merge pull request #(\d+) from (?!Expensify\/(?:main|version-|update-staging-from-main|update-production-from-staging))/); - if (!_.isNull(match) && match[1]) { - mergedPRs.push(match[1]); - } + const message = commit.subject; + if (!_.isString(message)) { + return; + } - return mergedPRs; - }, - [], - ); + const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + if (!_.isArray(match) || match.length < 2) { + return; + } + + const pr = match[1]; + if (mergedPRs.has(pr)) { + // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. + // That also means that we don't want to include it in the current checklist, so we remove it now. + mergedPRs.delete(pr); + return; + } + + mergedPRs.add(pr); + }); + + return Array.from(mergedPRs); } /** @@ -203,35 +216,14 @@ function getValidMergedPRs(commitMessages) { * @returns {Promise>} – Pull request numbers */ function getPullRequestsMergedBetween(fromRef, toRef) { - let targetMergeList; - return getMergeLogsAsJSON(fromRef, toRef) - .then((mergeList) => { - console.log(`Commits made between ${fromRef} and ${toRef}:`, mergeList); - targetMergeList = mergeList; - - // Get the full history on this branch, inclusive of the oldest commit from our target comparison - const oldestCommit = _.last(mergeList).commit; - return getMergeLogsAsJSON(oldestCommit, 'HEAD'); - }) - .then((fullMergeList) => { - // Remove from the final merge list any commits whose message appears in the full merge list more than once. - // This indicates that the PR should not be included in our list because it is a duplicate, and thus has already been processed by our CI - // See https://github.com/Expensify/App/issues/4977 for details - const duplicateMergeList = _.chain(fullMergeList) - .groupBy('subject') - .values() - .filter((i) => i.length > 1) - .flatten() - .pluck('commit') - .value(); - const finalMergeList = _.filter(targetMergeList, (i) => !_.contains(duplicateMergeList, i.commit)); - console.log('Filtered out the following commits which were duplicated in the full git log:', _.difference(targetMergeList, finalMergeList)); - - // Find which commit messages correspond to merged PR's - const pullRequestNumbers = getValidMergedPRs(_.pluck(finalMergeList, 'subject')); - console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); - return pullRequestNumbers; - }); + return getCommitHistoryAsJSON(fromRef, toRef).then((commitList) => { + console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); + + // Find which commit messages correspond to merged PR's + const pullRequestNumbers = getValidMergedPRs(commitList); + console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); + return pullRequestNumbers; + }); } module.exports = { From 5bd7268f59c181f0d9fe4f7b8e688e7677e92d67 Mon Sep 17 00:00:00 2001 From: Vinh Hoang Date: Fri, 16 Jun 2023 17:00:05 +0700 Subject: [PATCH 190/826] Correct typo Co-authored-by: Carlos Martins --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0d00b0d4c3bf..e02a8437e46e 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -979,7 +979,7 @@ function getTransactionReportName(reportAction) { } /** - * Get money request message for a IOU report + * Get money request message for an IOU report * * @param {Object} report * @param {Object} reportAction From 56ddd51ced1843cbb42a6d3dc9c8c63f57bee5d7 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Fri, 16 Jun 2023 11:57:35 +0100 Subject: [PATCH 191/826] Small tweaks --- src/libs/ReportUtils.js | 2 +- src/pages/home/sidebar/SidebarLinks.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index c496afe71e97..7b2379d33bf0 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1901,7 +1901,7 @@ function shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, curr } // Hide thread reports that haven't been commented on - if (isThread(report) && ReportActionsUtils.getParentReportAction(report) && !ReportActionsUtils.getParentReportAction(report).childLastVisibleActionCreated) { + if (isThread(report) && !report.lastMessageText) { return false; } diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 279b206f7718..ea516cb45a2f 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -28,7 +28,7 @@ import SidebarUtils from '../../../libs/SidebarUtils'; import reportPropTypes from '../../reportPropTypes'; import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; import withNavigationFocus from '../../../components/withNavigationFocus'; -import withCurrentReportID from '../../../components/withCurrentReportID'; +import withCurrentReportID, {withCurrentReportIDPropTypes} from '../../../components/withCurrentReportID'; import withNavigation, {withNavigationPropTypes} from '../../../components/withNavigation'; import Header from '../../../components/Header'; import defaultTheme from '../../../styles/themes/default'; @@ -80,6 +80,7 @@ const propTypes = { /** The chat priority mode */ priorityMode: PropTypes.string, + ...withCurrentReportIDPropTypes, ...withLocalizePropTypes, ...withNavigationPropTypes, }; From cde416dee3960b68a035016d5a814c0b5888f2dc Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 16 Jun 2023 14:46:30 +0100 Subject: [PATCH 192/826] format the AndroidManifest file correctly --- android/app/src/main/AndroidManifest.xml | 197 +++++++++++++++-------- 1 file changed, 132 insertions(+), 65 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 05302f43ef8d..2e6667b9af69 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,81 +1,148 @@ + xmlns:tools="http://schemas.android.com/tools" + package="com.expensify.chat"> - + - - + + - - + android:resizeableActivity="false" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="false" + android:theme="@style/AppTheme" + tools:replace="android:supportsRtl"> + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - From 0756a367a540b5a964dd885abf444e94e9d65b73 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 16 Jun 2023 14:46:50 +0100 Subject: [PATCH 193/826] add notification xml metadata --- android/app/src/main/AndroidManifest.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2e6667b9af69..5fa73947a96f 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -142,7 +142,13 @@ android:name="com.urbanairship.reactnative.AIRSHIP_EXTENDER" android:value="com.expensify.chat.customairshipextender.CustomAirshipExtender" /> + + From 34325ccf5cddf7d423211a8fe4f8bdfa4cca4ffc Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 16 Jun 2023 14:48:35 +0100 Subject: [PATCH 194/826] update notification categories --- .../customairshipextender/CustomNotificationProvider.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index 6235da0c91a5..f9e0e799d56e 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -63,8 +63,8 @@ public class CustomNotificationProvider extends ReactNotificationProvider { // Define notification channel public static final String CHANNEL_MESSAGES_ID = "CHANNEL_MESSAGES"; - public static final String CHANNEL_MESSAGES_NAME = "Message Notifications"; - public static final String CHANNEL_GROUP_ID = "CHANNEL_GROUP_CHATS"; + public static final String CHANNEL_MESSAGES_NAME = "Messages"; + public static final String NOTIFICATION_GROUP_CHATS = "NOTIFICATION_GROUP_CHATS"; public static final String CHANNEL_GROUP_NAME = "Chats"; // Conversation JSON keys @@ -119,9 +119,8 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @ @RequiresApi(api = Build.VERSION_CODES.O) private void createAndRegisterNotificationChannel(@NonNull Context context) { - NotificationChannelGroup channelGroup = new NotificationChannelGroup(CHANNEL_GROUP_ID, CHANNEL_GROUP_NAME); + NotificationChannelGroup channelGroup = new NotificationChannelGroup(NOTIFICATION_GROUP_CHATS, CHANNEL_GROUP_NAME); NotificationChannel channel = new NotificationChannel(CHANNEL_MESSAGES_ID, CHANNEL_MESSAGES_NAME, NotificationManager.IMPORTANCE_HIGH); - channel.setGroup(CHANNEL_GROUP_ID); NotificationManager notificationManager = context.getSystemService(NotificationManager.class); notificationManager.createNotificationChannelGroup(channelGroup); From 0082ffbf8e07954bcf20e7c5723c1f36cedf66bc Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 16 Jun 2023 14:49:19 +0100 Subject: [PATCH 195/826] cache large profile avatar for notifications --- .../CustomNotificationProvider.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index f9e0e799d56e..f73c28e1a13b 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -9,11 +9,13 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; +import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; +import android.graphics.drawable.Icon; import android.os.Build; import android.util.DisplayMetrics; import android.util.Log; @@ -186,13 +188,18 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil String avatar = messageData.get("avatar").getString(); String accountID = Integer.toString(messageData.get("actorAccountID").getInt(-1)); String message = messageData.get("message").getList().get(0).getMap().get("text").getString(); - String roomName = payload.get("roomName") == null ? "" : payload.get("roomName").getString(""); // Retrieve or create the Person object who sent the latest report comment Person person = notificationCache.people.get(accountID); + Bitmap personIcon = notificationCache.bitmapIcons.get(accountID); + + if (personIcon == null) { + personIcon = fetchIcon(context, avatar); + } + if (person == null) { - IconCompat iconCompat = fetchIcon(context, avatar); + IconCompat iconCompat = IconCompat.createWithBitmap(personIcon); person = new Person.Builder() .setIcon(iconCompat) .setKey(accountID) @@ -200,6 +207,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil .build(); notificationCache.people.put(accountID, person); + notificationCache.bitmapIcons.put(accountID, personIcon); } // Store the latest report comment in the local conversation history @@ -290,7 +298,7 @@ public void onDismissNotification(PushMessage message) { } } - private IconCompat fetchIcon(@NonNull Context context, String urlString) { + private Bitmap fetchIcon(@NonNull Context context, String urlString) { URL parsedUrl = null; try { parsedUrl = urlString == null ? null : new URL(urlString); @@ -314,7 +322,7 @@ private IconCompat fetchIcon(@NonNull Context context, String urlString) { try { Bitmap bitmap = future.get(MAX_ICON_FETCH_WAIT_TIME_SECONDS, TimeUnit.SECONDS); - return IconCompat.createWithBitmap(getCroppedBitmap(bitmap)); + return getCroppedBitmap(bitmap); } catch (InterruptedException e) { Log.e(TAG,"Failed to fetch icon", e); Thread.currentThread().interrupt(); @@ -329,6 +337,8 @@ private IconCompat fetchIcon(@NonNull Context context, String urlString) { private static class NotificationCache { public Map people = new HashMap<>(); public ArrayList messages = new ArrayList<>(); + + public Map bitmapIcons = new HashMap<>(); public int prevNotificationID = -1; public static class Message { From 3b90cd790f3f3c0e3d3212059a2a5b958af7c834 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 16 Jun 2023 16:14:03 +0100 Subject: [PATCH 196/826] use large notification avatar icon --- .../customairshipextender/CustomNotificationProvider.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index f73c28e1a13b..a0ef940368fe 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -29,6 +29,7 @@ import androidx.core.app.Person; import androidx.core.graphics.drawable.IconCompat; +import com.expensify.chat.R; import com.urbanairship.AirshipConfigOptions; import com.urbanairship.json.JsonList; import com.urbanairship.json.JsonMap; @@ -234,6 +235,9 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil // Apply the messaging style to the notification builder builder.setStyle(messagingStyle); + // Set notification icon + builder.setLargeIcon(personIcon); + } catch (Exception e) { e.printStackTrace(); } From 4b614ba79fa31b613493d4f03bc3b760a4801e5c Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 09:56:22 -0700 Subject: [PATCH 197/826] Remove dummy command --- .github/libs/GitUtils.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 235c8d45ad83..05de192d7ecd 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -10,13 +10,13 @@ const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { - const command = `git log --format='{"commit": "%H", "authorName": "%an", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); - console.log('Running command: ', command); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]); + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]; + console.log(`Running command: git ${args.join(' ')}`); + const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); spawnedProcess.stdout.on('data', (chunk) => { console.log(chunk.toString()); @@ -70,12 +70,12 @@ function getValidMergedPRs(commits) { } const pr = match[1]; - if (mergedPRs.has(pr)) { - // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. - // That also means that we don't want to include it in the current checklist, so we remove it now. - mergedPRs.delete(pr); - return; - } + // if (mergedPRs.has(pr)) { + // // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. + // // That also means that we don't want to include it in the current checklist, so we remove it now. + // mergedPRs.delete(pr); + // return; + // } mergedPRs.add(pr); }); From a7eab3518955292de1545d5ed088204cbe9a9a04 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 09:59:09 -0700 Subject: [PATCH 198/826] Uncomment code --- .github/libs/GitUtils.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 05de192d7ecd..c5a343a97b3b 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -70,12 +70,12 @@ function getValidMergedPRs(commits) { } const pr = match[1]; - // if (mergedPRs.has(pr)) { - // // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. - // // That also means that we don't want to include it in the current checklist, so we remove it now. - // mergedPRs.delete(pr); - // return; - // } + if (mergedPRs.has(pr)) { + // If a PR shows up in the log twice, that means that the PR was deployed in the previous checklist. + // That also means that we don't want to include it in the current checklist, so we remove it now. + mergedPRs.delete(pr); + return; + } mergedPRs.add(pr); }); From 430bf2f2a8d2367822e8cce911ea6f994fc2d345 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 10:07:19 -0700 Subject: [PATCH 199/826] Fix GitUtilsTest --- tests/unit/GitUtilsTest.js | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/tests/unit/GitUtilsTest.js b/tests/unit/GitUtilsTest.js index adfac0d47419..e09af0e1cf40 100644 --- a/tests/unit/GitUtilsTest.js +++ b/tests/unit/GitUtilsTest.js @@ -6,35 +6,33 @@ const data = [ expectedOutput: [], }, { - input: ['Some random commit message'], + input: [{commit: '1', subject: 'Some random commit message', author: 'test@gmail.com'}], expectedOutput: [], }, { input: [ - 'Start adding StagingDeployCash logic', - 'Setting up bones', - 'Merge pull request #337 from Expensify/francoisUpdateQbdSyncManager', - 'Merge pull request #336 from Expensify/andrew-pr-cla', - 'Update QBD Sync Manager version', - 'Only run CLA on PR comments or events', - 'Merge pull request #331 from Expensify/marcaaron-killMoment', - 'Merge pull request #330 from Expensify/andrew-cla-update', - 'Merge pull request #333 from Expensify/Rory-AddOnOffSwitchTooltip', - 'Setup OnOffSwitch component with tooltips', - 'Merge pull request #332 from Expensify/alex-mechler-patch-1', - 'Return to old hash-based deploy instrcutions', - 'Remove DEFAULT_START_DATE & DEFAULT_END_DATE altogether', + {commit: '1', subject: 'Start adding StagingDeployCash logic', author: 'test@gmail.com'}, + {commit: '2', subject: 'Setting up bones', author: 'test@gmail.com'}, + {commit: '3', subject: 'Merge pull request #337 from Expensify/francoisUpdateQbdSyncManager', author: 'test@gmail.com'}, + {commit: '4', subject: 'Merge pull request #336 from Expensify/andrew-pr-cla', author: 'test@gmail.com'}, + {commit: '5', subject: 'Update QBD Sync Manager version', author: 'test@gmail.com'}, + {commit: '6', subject: 'Only run CLA on PR comments or events', author: 'test@gmail.com'}, + {commit: '7', subject: 'Merge pull request #331 from Expensify/marcaaron-killMoment', author: 'test@gmail.com'}, + {commit: '8', subject: 'Merge pull request #330 from Expensify/andrew-cla-update', author: 'test@gmail.com'}, + {commit: '9', subject: 'Merge pull request #333 from Expensify/Rory-AddOnOffSwitchTooltip', author: 'test@gmail.com'}, + {commit: '10', subject: 'Setup OnOffSwitch component with tooltips', author: 'test@gmail.com'}, + {commit: '11', subject: 'Merge pull request #332 from Expensify/alex-mechler-patch-1', author: 'test@gmail.com'}, + {commit: '12', subject: 'Return to old hash-based deploy instrcutions', author: 'test@gmail.com'}, + {commit: '12', subject: 'Remove DEFAULT_START_DATE & DEFAULT_END_DATE altogether', author: 'test@gmail.com'}, ], expectedOutput: ['337', '336', '331', '330', '333', '332'], }, { input: [ - 'Merge pull request #1521 from parasharrajat/parasharrajat/pdf-render', - 'Merge pull request #1563 from Expensify/version-bump-e6498075e301df3e9c8d7866ea391a23c19ed9b0', - 'Update version to 1.0.1-470', - '[IS-1500] Updated textalignInput utility', - 'Merge pull request #2 from Expensify/main', - 'fix: set pdf width on large screens', + {commit: '1', subject: 'Merge pull request #1521 from parasharrajat/parasharrajat/pdf-render', author: 'test@gmail.com'}, + {commit: '3', subject: 'Update version to 1.0.1-470', author: 'test@gmail.com'}, + {commit: '4', subject: '[IS-1500] Updated textalignInput utility', author: 'test@gmail.com'}, + {commit: '5', subject: 'fix: set pdf width on large screens', author: 'test@gmail.com'}, ], expectedOutput: ['1521'], }, From 21248dc6e40041e9899fd0ce7f4de998034f8be7 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 10:20:31 -0700 Subject: [PATCH 200/826] Rebuild GH Actions --- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 +++--- .../actions/javascript/getDeployPullRequestList/index.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 1d04d7d21098..21384504a841 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -200,13 +200,13 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { - const command = `git log --format='{"commit": "%H", "authorName": "%an", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); - console.log('Running command: ', command); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]); + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]; + console.log(`Running command: git ${args.join(' ')}`); + const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); spawnedProcess.stdout.on('data', (chunk) => { console.log(chunk.toString()); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 98f344f5ab49..17a7b2cff381 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -135,13 +135,13 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { - const command = `git log --format='{"commit": "%H", "authorName": "%an", "subject": "%s"},' ${fromRef}...${toRef}`; console.log('Getting pull requests merged between the following refs:', fromRef, toRef); - console.log('Running command: ', command); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const spawnedProcess = spawn('git', ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]); + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]; + console.log(`Running command: git ${args.join(' ')}`); + const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); spawnedProcess.stdout.on('data', (chunk) => { console.log(chunk.toString()); From 8b56f19758b096125fceed604e46c2b3b0ea1a1e Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 10:33:14 -0700 Subject: [PATCH 201/826] Remove PR_COUNT variable that seems to be messing up bashhh --- tests/unit/CIGitLogicTest.sh | 103 ++++++++++++++++------------------- 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 29a123687261..ed1e95834ceb 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -10,8 +10,6 @@ getPullRequestsMergedBetween="$TEST_DIR/utils/getPullRequestsMergedBetween.mjs" source "$SCRIPTS_DIR/shellUtils.sh" -PR_COUNT=0 - function print_version { < package.json jq -r .version } @@ -88,19 +86,18 @@ success "Setup complete!" title "Scenario #1: Merge a pull request while the checklist is unlocked" -((PR_COUNT++)) -info "Creating PR #$PR_COUNT and merging it into main..." -git switch -c "pr-$PR_COUNT" -echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" -git add "PR$PR_COUNT.txt" -git commit -m "Changes from PR #$PR_COUNT" -success "Created PR #$PR_COUNT in branch pr-$PR_COUNT" +info "Creating PR #1 and merging it into main..." +git switch -c "pr-1" +echo "Changes from PR #1" >> "PR1.txt" +git add "PR1.txt" +git commit -m "Changes from PR #1" +success "Created PR #1 in branch pr-1" -info "Merging PR #$PR_COUNT to main" +info "Merging PR #1 to main" git switch main -git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" -git branch -d "pr-$PR_COUNT" -success "Merged PR #$PR_COUNT to main" +git merge "pr-1" --no-ff -m "Merge pull request #1 from Expensify/pr-1" +git branch -d "pr-1" +success "Merged PR #1 to main" # Bump the version to 1.0.1 info "Bumping version to 1.0.1" @@ -125,42 +122,40 @@ git switch main # Verify output for checklist and deploy comment info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.1" output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.1') -assert_equal "$output" "[ '$PR_COUNT' ]" +assert_equal "$output" "[ '1' ]" success "Scenario #1 completed successfully!" title "Scenario #2: Merge a pull request with the checklist locked, but don't CP it" -((PR_COUNT++)) -info "Creating PR #$PR_COUNT and merging it into main..." +info "Creating PR #2 and merging it into main..." setup_git_as_human -git switch -c "pr-$PR_COUNT" -echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" -git add "PR$PR_COUNT.txt" -git commit -m "Changes from PR #$PR_COUNT" +git switch -c "pr-2" +echo "Changes from PR #2" >> "PR2.txt" +git add "PR2.txt" +git commit -m "Changes from PR #2" git switch main -git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" -info "Merged PR #$PR_COUNT into main" -git branch -d "pr-$PR_COUNT" -success "Created PR #$PR_COUNT and merged it to main!" +git merge "pr-2" --no-ff -m "Merge pull request #2 from Expensify/pr-2" +info "Merged PR #2 into main" +git branch -d "pr-2" +success "Created PR #2 and merged it to main!" success "Scenario #2 completed successfully!" title "Scenario #3: Merge a pull request with the checklist locked and CP it to staging" -((PR_COUNT++)) -info "Creating PR #$PR_COUNT and merging it into main..." -git switch -c "pr-$PR_COUNT" -echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" -git add "PR$PR_COUNT.txt" -git commit -m "Changes from PR #$PR_COUNT" +info "Creating PR #3 and merging it into main..." +git switch -c "pr-3" +echo "Changes from PR #3" >> "PR3.txt" +git add "PR3.txt" +git commit -m "Changes from PR #3" git switch main -git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" +git merge "pr-3" --no-ff -m "Merge pull request #3 from Expensify/pr-3" PR_MERGE_COMMIT="$(git log -1 --format='%H')" -info "Merged PR #$PR_COUNT into main" -git branch -d "pr-$PR_COUNT" -success "Created PR #$PR_COUNT and merged it to main!" +info "Merged PR #3 into main" +git branch -d "pr-3" +success "Created PR #3 and merged it to main!" info "Bumping version to 1.0.2 on main..." setup_git_as_osbotify @@ -170,17 +165,16 @@ git commit -m "Update version to $(print_version)" VERSION_BUMP_COMMIT="$(git log -1 --format='%H')" success "Bumped version to 1.0.2 on main!" -info "Cherry picking PR #$PR_COUNT and the version bump to staging..." +info "Cherry picking PR #3 and the version bump to staging..." git switch staging git switch -c cherry-pick-staging git cherry-pick -x --mainline 1 --strategy=recursive -Xtheirs "$PR_MERGE_COMMIT" git cherry-pick -x --mainline 1 "$VERSION_BUMP_COMMIT" git switch staging -((PR_COUNT++)) -git merge cherry-pick-staging --no-ff -m "Merge pull request #$PR_COUNT from Expensify/cherry-pick-staging" +git merge cherry-pick-staging --no-ff -m "Merge pull request #4 from Expensify/cherry-pick-staging" git branch -d cherry-pick-staging -info "Merged PR #$PR_COUNT into staging" -success "Successfully cherry-picked PR #$((PR_COUNT - 1)) to staging!" +info "Merged PR #4 into staging" +success "Successfully cherry-picked PR #3 to staging!" info "Tagging the new version on staging..." git tag "$(print_version)" @@ -189,12 +183,12 @@ success "Created tag $(print_version)" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') -assert_equal "$output" "[ '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '3', '1' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.0.1 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.1' '1.0.2') -assert_equal "$output" "[ '$((PR_COUNT -1))' ]" +assert_equal "$output" "[ '3' ]" success "Scenario #3 completed successfully!" @@ -210,7 +204,7 @@ success "Recreated production from staging!" # Verify output for release body and production deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" output=$(node "$getPullRequestsMergedBetween" '1.0.0' '1.0.2') -assert_equal "$output" "[ '$((PR_COUNT - 1))', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '3', '1' ]" success "Scenario #4A completed successfully!" @@ -235,26 +229,25 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.0') -assert_equal "$output" "[ '$((PR_COUNT - 2))' ]" +assert_equal "$output" "[ '2' ]" success "Scenario #4B completed successfully!" title "Scenario #5: Merging another pull request when the checklist is unlocked" -((PR_COUNT++)) -info "Creating PR #$PR_COUNT and merging it to main..." +info "Creating PR #5 and merging it to main..." setup_git_as_human git switch main -git switch -c "pr-$PR_COUNT" -echo "Changes from PR #$PR_COUNT" >> "PR$PR_COUNT.txt" -git add "PR$PR_COUNT.txt" -git commit -m "Changes from PR #$PR_COUNT" +git switch -c "pr-5" +echo "Changes from PR #5" >> "PR5.txt" +git add "PR5.txt" +git commit -m "Changes from PR #5" git switch main -git merge "pr-$PR_COUNT" --no-ff -m "Merge pull request #$PR_COUNT from Expensify/pr-$PR_COUNT" -info "Merged PR #$PR_COUNT into main" -git branch -d "pr-$PR_COUNT" -success "Created PR #$PR_COUNT and merged it into main!" +git merge "pr-5" --no-ff -m "Merge pull request #5 from Expensify/pr-5" +info "Merged PR #5 into main" +git branch -d "pr-5" +success "Created PR #5 and merged it into main!" info "Bumping version to 1.1.1 on main..." setup_git_as_osbotify @@ -275,12 +268,12 @@ success "Successfully tagged version $(print_version) on staging" # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.1') -assert_equal "$output" "[ '$PR_COUNT', '$((PR_COUNT - 3))' ]" +assert_equal "$output" "[ '5', '2' ]" # Verify output for deploy comment info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.1.0' '1.1.1') -assert_equal "$output" "[ '$PR_COUNT' ]" +assert_equal "$output" "[ '5' ]" success "Scenario #6 completed successfully!" From e42ea3756e3d08a7cce6a127795c61c3d78022c1 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 10:38:03 -0700 Subject: [PATCH 202/826] Remove unnecessary setupNode --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46718b234e92..750613a07945 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,5 @@ jobs: steps: - uses: actions/checkout@885641592076c27bfb56c028cd5612cdad63e16d - - uses: Expensify/App/.github/actions/composite/setupNode@main - - name: Test CI git logic run: tests/unit/CIGitLogicTest.sh From 246312a5848d65acb22396f318ac637ce58a371d Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 10:39:46 -0700 Subject: [PATCH 203/826] Secrets not inputs --- .github/workflows/finishReleaseCycle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index d98cefa848a8..e5bb97fc086f 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -59,7 +59,7 @@ jobs: - uses: actions/checkout@v3 with: ref: staging - token: ${{ inputs.OS_BOTIFY_TOKEN }} + token: ${{ secrets.OS_BOTIFY_TOKEN }} - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main with: From a6f4a46bd5e79524fe317ef4ea6072ba2be61df4 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 10:40:05 -0700 Subject: [PATCH 204/826] Add setupNode back for underscore --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 750613a07945..46718b234e92 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,5 +53,7 @@ jobs: steps: - uses: actions/checkout@885641592076c27bfb56c028cd5612cdad63e16d + - uses: Expensify/App/.github/actions/composite/setupNode@main + - name: Test CI git logic run: tests/unit/CIGitLogicTest.sh From 112b97dc19462b79bad54c4ebc29a82aa6480f33 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Fri, 16 Jun 2023 08:19:42 -1000 Subject: [PATCH 205/826] update comment --- src/libs/actions/App.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 308c01e3da6a..294ee71fc1b5 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -185,11 +185,11 @@ function openApp() { * Refreshes data when the app reconnects */ function reconnectApp() { - // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID + // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID. // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. // - // - Look through the local report actions to find the most recently modified report action - // - We Send this to the server so that it can compute which chats are critical for the user to see so we can update them in the LHN + // - Look through the local report actions and reports to find the most recently modified report action or report. + // - We send this to the server so that it can compute which chats are critical for the user to see and return only those as an optimization. API.write( CONST.NETWORK.COMMAND.RECONNECT_APP, {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, From 6cb914b755d20163cce37f23af1e4a70e2907f9a Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 11:23:28 -0700 Subject: [PATCH 206/826] Create utility function for bumping version --- tests/unit/CIGitLogicTest.sh | 93 ++++++++++++++++-------------------- 1 file changed, 42 insertions(+), 51 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index ed1e95834ceb..5a4045142830 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -10,10 +10,6 @@ getPullRequestsMergedBetween="$TEST_DIR/utils/getPullRequestsMergedBetween.mjs" source "$SCRIPTS_DIR/shellUtils.sh" -function print_version { - < package.json jq -r .version -} - function setup_git_as_human { info "Switching to human git user" git config user.name test @@ -26,6 +22,23 @@ function setup_git_as_osbotify { git config user.email infra+osbotify@expensify.com } +function print_version { + < package.json jq -r .version +} + +function bump_version { + info "Bumping version..." + setup_git_as_osbotify + if [[ $1 == 'minor' ]]; then + npm --no-git-tag-version version minor + else + npm --no-git-tag-version version patch + fi + git add package.json package-lock.json + git commit -m "Update version to $(print_version)" + success "Version bumped to $(print_version) on main" +} + ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) if ! command -v jq &> /dev/null; then @@ -87,25 +100,19 @@ success "Setup complete!" title "Scenario #1: Merge a pull request while the checklist is unlocked" info "Creating PR #1 and merging it into main..." -git switch -c "pr-1" -echo "Changes from PR #1" >> "PR1.txt" -git add "PR1.txt" +git switch -c pr-1 +echo "Changes from PR #1" >> PR1.txt +git add PR1.txt git commit -m "Changes from PR #1" success "Created PR #1 in branch pr-1" info "Merging PR #1 to main" git switch main -git merge "pr-1" --no-ff -m "Merge pull request #1 from Expensify/pr-1" -git branch -d "pr-1" +git merge pr-1 --no-ff -m "Merge pull request #1 from Expensify/pr-1" +git branch -d pr-1 success "Merged PR #1 to main" -# Bump the version to 1.0.1 -info "Bumping version to 1.0.1" -setup_git_as_osbotify -npm --no-git-tag-version version 1.0.1 -git add package.json package-lock.json -git commit -m "Update version to $(print_version)" -success "Version bumped to $(print_version) on main" +bump_version patch # Recreate staging from main info "Recreating staging from main..." @@ -131,14 +138,14 @@ title "Scenario #2: Merge a pull request with the checklist locked, but don't CP info "Creating PR #2 and merging it into main..." setup_git_as_human -git switch -c "pr-2" -echo "Changes from PR #2" >> "PR2.txt" -git add "PR2.txt" +git switch -c pr-2 +echo "Changes from PR #2" >> PR2.txt +git add PR2.txt git commit -m "Changes from PR #2" git switch main -git merge "pr-2" --no-ff -m "Merge pull request #2 from Expensify/pr-2" +git merge pr-2 --no-ff -m "Merge pull request #2 from Expensify/pr-2" info "Merged PR #2 into main" -git branch -d "pr-2" +git branch -d pr-2 success "Created PR #2 and merged it to main!" success "Scenario #2 completed successfully!" @@ -146,24 +153,18 @@ success "Scenario #2 completed successfully!" title "Scenario #3: Merge a pull request with the checklist locked and CP it to staging" info "Creating PR #3 and merging it into main..." -git switch -c "pr-3" -echo "Changes from PR #3" >> "PR3.txt" -git add "PR3.txt" +git switch -c pr-3 +echo "Changes from PR #3" >> PR3.txt +git add PR3.txt git commit -m "Changes from PR #3" git switch main -git merge "pr-3" --no-ff -m "Merge pull request #3 from Expensify/pr-3" +git merge pr-3 --no-ff -m "Merge pull request #3 from Expensify/pr-3" PR_MERGE_COMMIT="$(git log -1 --format='%H')" info "Merged PR #3 into main" -git branch -d "pr-3" +git branch -d pr-3 success "Created PR #3 and merged it to main!" -info "Bumping version to 1.0.2 on main..." -setup_git_as_osbotify -npm --no-git-tag-version version 1.0.2 -m "Update version to 1.0.2" -git add package.json package-lock.json -git commit -m "Update version to $(print_version)" -VERSION_BUMP_COMMIT="$(git log -1 --format='%H')" -success "Bumped version to 1.0.2 on main!" +bump_version patch info "Cherry picking PR #3 and the version bump to staging..." git switch staging @@ -210,12 +211,7 @@ success "Scenario #4A completed successfully!" title "Scenario #4B: Run the staging deploy and create a new checklist" -info "Bumping version to 1.1.0 on main..." -git switch main -npm --no-git-tag-version version 1.1.0 -git add package.json package-lock.json -git commit -m "Update version to $(print_version)" -success "Successfully updated version to 1.1.0 on main!" +bump_version minor info "Re-creating staging from main..." git branch -D staging @@ -239,22 +235,17 @@ title "Scenario #5: Merging another pull request when the checklist is unlocked" info "Creating PR #5 and merging it to main..." setup_git_as_human git switch main -git switch -c "pr-5" -echo "Changes from PR #5" >> "PR5.txt" -git add "PR5.txt" +git switch -c pr-5 +echo "Changes from PR #5" >> PR5.txt +git add PR5.txt git commit -m "Changes from PR #5" git switch main -git merge "pr-5" --no-ff -m "Merge pull request #5 from Expensify/pr-5" +git merge pr-5 --no-ff -m "Merge pull request #5 from Expensify/pr-5" info "Merged PR #5 into main" -git branch -d "pr-5" +git branch -d pr-5 success "Created PR #5 and merged it into main!" -info "Bumping version to 1.1.1 on main..." -setup_git_as_osbotify -npm --no-git-tag-version version 1.1.1 -m "Update version to 1.1.1" -git add package.json package-lock.json -git commit -m "Update version to $(print_version)" -success "Bumped version to 1.1.1 on main!" +bump_version patch info "Recreating staging from main..." git branch -D staging @@ -275,7 +266,7 @@ info "Checking output of getPullRequestsMergedBetween 1.1.0 1.1.1" output=$(node "$getPullRequestsMergedBetween" '1.1.0' '1.1.1') assert_equal "$output" "[ '5' ]" -success "Scenario #6 completed successfully!" +success "Scenario #5 completed successfully!" ### Cleanup title "Cleaning up..." From 0766dd6cf0a1b7c6dd8f172b1f7160d866a80f27 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 11:27:45 -0700 Subject: [PATCH 207/826] Create utility function for updating protected branch --- tests/unit/CIGitLogicTest.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 5a4045142830..2ce377f5bafd 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -39,6 +39,20 @@ function bump_version { success "Version bumped to $(print_version) on main" } +function update_staging_from_main { + info "Recreating staging from main..." + git branch -D staging + git switch -c staging + success "Recreated staging from main!" +} + +function update_production_from_staging { + info "Recreating production from staging..." + git branch -D production + git switch -c production + success "Recreated production from staging!" +} + ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) if ! command -v jq &> /dev/null; then @@ -113,12 +127,7 @@ git branch -d pr-1 success "Merged PR #1 to main" bump_version patch - -# Recreate staging from main -info "Recreating staging from main..." -git branch -D staging -git switch -c staging -success "Recreated staging from main!" +update_staging_from_main # Tag staging info "Tagging new version..." @@ -197,10 +206,7 @@ success "Scenario #3 completed successfully!" title "Scenario #4: Close the checklist" title "Scenario #4A: Run the production deploy" -info "Recreating production from staging..." -git branch -D production -git switch -c production -success "Recreated production from staging!" +update_production_from_staging # Verify output for release body and production deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" @@ -246,11 +252,7 @@ git branch -d pr-5 success "Created PR #5 and merged it into main!" bump_version patch - -info "Recreating staging from main..." -git branch -D staging -git switch -c staging -success "Recreated staging from main!" +update_staging_from_main info "Tagging staging..." git tag "$(print_version)" From 8e176eece66b154c89f8914296d27be101dc98b5 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 16 Jun 2023 11:52:47 -0700 Subject: [PATCH 208/826] refactor isThread to isChatThread --- src/libs/OptionsListUtils.js | 4 ++-- src/libs/ReportUtils.js | 22 +++++++++---------- src/libs/SidebarUtils.js | 2 +- src/pages/ReportDetailsPage.js | 2 +- src/pages/ReportParticipantsPage.js | 2 +- src/pages/home/HeaderView.js | 2 +- src/pages/home/report/ReportActionsList.js | 2 +- .../settings/Report/ReportSettingsPage.js | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 8669eea4703a..40a3a3dc53fb 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -452,7 +452,7 @@ function createOption(accountIDs, personalDetails, report, reportActions = {}, { result.isArchivedRoom = ReportUtils.isArchivedRoom(report); result.isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report); result.isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report); - result.isThread = ReportUtils.isThread(report); + result.isThread = ReportUtils.isChatThread(report); result.isTaskReport = ReportUtils.isTaskReport(report); result.shouldShowSubscript = ReportUtils.shouldReportShowSubscript(report); result.allReportErrors = getAllReportErrors(report, reportActions); @@ -630,7 +630,7 @@ function getOptions( return; } - const isThread = ReportUtils.isThread(report); + const isThread = ReportUtils.isChatThread(report); const isChatRoom = ReportUtils.isChatRoom(report); const isTaskReport = ReportUtils.isTaskReport(report); const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(report); diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 02c3308898f8..9a4dd5a5c738 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -536,7 +536,7 @@ function isPolicyExpenseChatAdmin(report, policies) { * @param {Object} report * @returns {Boolean} */ -function isThread(report) { +function isChatThread(report) { return Boolean(report && report.parentReportID && report.parentReportActionID && report.type === CONST.REPORT.TYPE.CHAT); } @@ -733,7 +733,7 @@ function getIcons(report, personalDetails, defaultIcon = null, isPayer = false) result.source = Expensicons.DeletedRoomAvatar; return [result]; } - if (isThread(report)) { + if (isChatThread(report)) { const parentReportAction = ReportActionsUtils.getParentReportAction(report); const actorEmail = lodashGet(parentReportAction, 'actorEmail', ''); @@ -1006,7 +1006,7 @@ function getTransactionReportName(reportAction) { */ function getReportName(report) { let formattedName; - if (isThread(report)) { + if (isChatThread(report)) { const parentReportAction = ReportActionsUtils.getParentReportAction(report); if (ReportActionsUtils.isTransactionThread(parentReportAction)) { return getTransactionReportName(parentReportAction); @@ -1053,7 +1053,7 @@ function getReportName(report) { * @returns {String|*} */ function getDMRootReportName(report) { - if (isThread(report) && !getChatType(report)) { + if (isChatThread(report) && !getChatType(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); return getDMRootReportName(parentReport); } @@ -1067,7 +1067,7 @@ function getDMRootReportName(report) { * @returns {String} */ function getChatRoomSubtitle(report) { - if (isThread(report)) { + if (isChatThread(report)) { if (!getChatType(report)) { return `${Localize.translateLocal('threads.from')} ${getDMRootReportName(report)}`; } @@ -1119,7 +1119,7 @@ function getReport(reportID) { function navigateToDetailsPage(report) { const participantAccountIDs = lodashGet(report, 'participantAccountIDs', []); - if (isChatRoom(report) || isPolicyExpenseChat(report) || isThread(report)) { + if (isChatRoom(report) || isPolicyExpenseChat(report) || isChatThread(report)) { Navigation.navigate(ROUTES.getReportDetailsRoute(report.reportID)); return; } @@ -1918,7 +1918,7 @@ function shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, iouR if ( !report || !report.reportID || - (_.isEmpty(report.participantAccountIDs) && !isThread(report) && !isPublicRoom(report) && !isArchivedRoom(report) && !isMoneyRequestReport(report) && !isTaskReport(report)) + (_.isEmpty(report.participantAccountIDs) && !isChatThread(report) && !isPublicRoom(report) && !isArchivedRoom(report) && !isMoneyRequestReport(report) && !isTaskReport(report)) ) { return false; } @@ -1973,7 +1973,7 @@ function getChatByParticipants(newParticipantList) { newParticipantList.sort(); return _.find(allReports, (report) => { // If the report has been deleted, or there are no participants (like an empty #admins room) then skip it - if (!report || !report.participantAccountIDs || isThread(report)) { + if (!report || !report.participantAccountIDs || isChatThread(report)) { return false; } @@ -2113,7 +2113,7 @@ function canRequestMoney(report) { */ function getMoneyRequestOptions(report, reportParticipants, betas) { // In any thread, we do not allow any new money requests yet - if (isThread(report)) { + if (isChatThread(report)) { return []; } @@ -2219,7 +2219,7 @@ function shouldReportShowSubscript(report) { return false; } - if (isPolicyExpenseChat(report) && !isThread(report) && !isTaskReport(report) && !report.isOwnPolicyExpenseChat) { + if (isPolicyExpenseChat(report) && !isChatThread(report) && !isTaskReport(report) && !report.isOwnPolicyExpenseChat) { return true; } @@ -2329,7 +2329,7 @@ export { canRequestMoney, getWhisperDisplayNames, getWorkspaceAvatar, - isThread, + isChatThread, isThreadParent, isThreadFirstChat, shouldReportShowSubscript, diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index a41249ebfa3d..7bd30a13af16 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -263,7 +263,7 @@ function getOptionData(reportID) { const participantPersonalDetailList = _.values(OptionsListUtils.getPersonalDetailsForAccountIDs(report.participantAccountIDs, personalDetails)); const personalDetail = participantPersonalDetailList[0] || {}; - result.isThread = ReportUtils.isThread(report); + result.isThread = ReportUtils.isChatThread(report); result.isChatRoom = ReportUtils.isChatRoom(report); result.isTaskReport = ReportUtils.isTaskReport(report); if (result.isTaskReport) { diff --git a/src/pages/ReportDetailsPage.js b/src/pages/ReportDetailsPage.js index 19f78e08c604..c0e3a07bc214 100644 --- a/src/pages/ReportDetailsPage.js +++ b/src/pages/ReportDetailsPage.js @@ -63,7 +63,7 @@ function ReportDetailsPage(props) { const isPolicyAdmin = useMemo(() => PolicyUtils.isPolicyAdmin(policy), [policy]); const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(props.report), [props.report]); const isChatRoom = useMemo(() => ReportUtils.isChatRoom(props.report), [props.report]); - const isThread = useMemo(() => ReportUtils.isThread(props.report), [props.report]); + const isThread = useMemo(() => ReportUtils.isChatThread(props.report), [props.report]); const isUserCreatedPolicyRoom = useMemo(() => ReportUtils.isUserCreatedPolicyRoom(props.report), [props.report]); const isArchivedRoom = useMemo(() => ReportUtils.isArchivedRoom(props.report), [props.report]); diff --git a/src/pages/ReportParticipantsPage.js b/src/pages/ReportParticipantsPage.js index da065dadcb77..176a0d8f07a4 100755 --- a/src/pages/ReportParticipantsPage.js +++ b/src/pages/ReportParticipantsPage.js @@ -92,7 +92,7 @@ function ReportParticipantsPage(props) { 1; const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(participantPersonalDetails, isMultipleParticipant); - const isThread = ReportUtils.isThread(props.report); + const isThread = ReportUtils.isChatThread(props.report); const isChatRoom = ReportUtils.isChatRoom(props.report); const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(props.report); const isTaskReport = ReportUtils.isTaskReport(props.report); diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index c3288c3eeb6a..1a8b74600e28 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -115,7 +115,7 @@ function ReportActionsList(props) { ({item: reportAction, index}) => { // When the new indicator should not be displayed we explicitly set it to null const shouldDisplayNewMarker = reportAction.reportActionID === newMarkerReportActionID; - const shouldDisplayParentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED && ReportUtils.isThread(report); + const shouldDisplayParentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED && ReportUtils.isChatThread(report); const shouldHideThreadDividerLine = shouldDisplayParentAction && sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === newMarkerReportActionID; return shouldDisplayParentAction ? ( diff --git a/src/pages/settings/Report/ReportSettingsPage.js b/src/pages/settings/Report/ReportSettingsPage.js index ad57de80aaaa..d07da128acd6 100644 --- a/src/pages/settings/Report/ReportSettingsPage.js +++ b/src/pages/settings/Report/ReportSettingsPage.js @@ -94,9 +94,9 @@ class ReportSettingsPage extends Component { } render() { - const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(this.props.report) && !ReportUtils.isThread(this.props.report); + const shouldShowRoomName = !ReportUtils.isPolicyExpenseChat(this.props.report) && !ReportUtils.isChatThread(this.props.report); const linkedWorkspace = _.find(this.props.policies, (policy) => policy && policy.id === this.props.report.policyID); - const shouldDisableRename = this.shouldDisableRename(linkedWorkspace) || ReportUtils.isThread(this.props.report); + const shouldDisableRename = this.shouldDisableRename(linkedWorkspace) || ReportUtils.isChatThread(this.props.report); const notificationPreference = this.props.translate(`notificationPreferencesPage.notificationPreferences.${this.props.report.notificationPreference}`); const shouldDisableWelcomeMessage = this.shouldDisableWelcomeMessage(linkedWorkspace); const writeCapability = this.props.report.writeCapability || CONST.REPORT.WRITE_CAPABILITIES.ALL; From f054742c6a02441ca0e9d301a7f4e4ff0d68e1d1 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 16 Jun 2023 11:55:47 -0700 Subject: [PATCH 209/826] isthread and getChatRoomSubtitleLink --- src/libs/ReportUtils.js | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 9a4dd5a5c738..2a5476e1ef64 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -531,7 +531,17 @@ function isPolicyExpenseChatAdmin(report, policies) { } /** - * Returns true if report has a parent and is therefore a Thread. + * Returns true if report has a parent + * + * @param {Object} report + * @returns {Boolean} + */ +function isThread(report) { + return Boolean(report && report.parentReportID && report.parentReportActionID); +} + +/** + * Returns true if report is of type chat and has a parent and is therefore a Thread. * * @param {Object} report * @returns {Boolean} @@ -1101,6 +1111,33 @@ function getChatRoomSubtitle(report) { return getPolicyName(report); } +/** + * Get either the policyName or domainName the chat is tied to + * @param {Object} report + * @returns {String} + */ +function getChatRoomSubtitleLink(report) { + if (isThread(report)) { + if (!getChatType(report)) { + return `${Localize.translateLocal('threads.from')} ${getDMRootReportName(report)}`; + } + + let roomName = ''; + if (isChatRoom(report)) { + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); + if (parentReport) { + roomName = lodashGet(parentReport, 'displayName', ''); + } else { + roomName = lodashGet(report, 'displayName', ''); + } + } + + const workspaceName = getPolicyName(report); + return `${Localize.translateLocal('threads.from')} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + } + return ''; +} + /** * Get the report for a reportID * @@ -2263,6 +2300,7 @@ export { isUserCreatedPolicyRoom, isChatRoom, getChatRoomSubtitle, + getChatRoomSubtitleLink, getPolicyName, getPolicyType, isArchivedRoom, @@ -2329,6 +2367,7 @@ export { canRequestMoney, getWhisperDisplayNames, getWorkspaceAvatar, + isThread, isChatThread, isThreadParent, isThreadFirstChat, From d78fe9420702d98093560c22eeed14bb0ba8d329 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 16 Jun 2023 11:58:14 -0700 Subject: [PATCH 210/826] getRootReportName refactor --- src/libs/ReportUtils.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 2a5476e1ef64..0ca112f01703 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1058,14 +1058,14 @@ function getReportName(report) { } /** - * Recursively navigates through parent to get the root reports name only for DM reports. + * Recursively navigates through thread parents to get the root reports name. * @param {Object} report * @returns {String|*} */ -function getDMRootReportName(report) { - if (isChatThread(report) && !getChatType(report)) { +function getRootReportName(report) { + if (isThread(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - return getDMRootReportName(parentReport); + return getRootReportName(parentReport); } return getReportName(report); @@ -1079,7 +1079,7 @@ function getDMRootReportName(report) { function getChatRoomSubtitle(report) { if (isChatThread(report)) { if (!getChatType(report)) { - return `${Localize.translateLocal('threads.from')} ${getDMRootReportName(report)}`; + return `${Localize.translateLocal('threads.from')} ${getRootReportName(report)}`; } let roomName = ''; @@ -1118,10 +1118,6 @@ function getChatRoomSubtitle(report) { */ function getChatRoomSubtitleLink(report) { if (isThread(report)) { - if (!getChatType(report)) { - return `${Localize.translateLocal('threads.from')} ${getDMRootReportName(report)}`; - } - let roomName = ''; if (isChatRoom(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); @@ -1130,10 +1126,12 @@ function getChatRoomSubtitleLink(report) { } else { roomName = lodashGet(report, 'displayName', ''); } + + const workspaceName = getPolicyName(report); + return `${Localize.translateLocal('threads.from')} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } - const workspaceName = getPolicyName(report); - return `${Localize.translateLocal('threads.from')} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + return `${Localize.translateLocal('threads.from')} ${getRootReportName(report)}`; } return ''; } From 28282e66ed880af1b867f1b2a864d47bc91411d0 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 12:16:04 -0700 Subject: [PATCH 211/826] Create utility function for merge_pr --- tests/unit/CIGitLogicTest.sh | 45 ++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 2ce377f5bafd..08d09bef0a8b 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -29,6 +29,7 @@ function print_version { function bump_version { info "Bumping version..." setup_git_as_osbotify + git switch main if [[ $1 == 'minor' ]]; then npm --no-git-tag-version version minor else @@ -41,6 +42,7 @@ function bump_version { function update_staging_from_main { info "Recreating staging from main..." + git switch main git branch -D staging git switch -c staging success "Recreated staging from main!" @@ -48,11 +50,20 @@ function update_staging_from_main { function update_production_from_staging { info "Recreating production from staging..." + git switch staging git branch -D production git switch -c production success "Recreated production from staging!" } +function merge_pr { + info "Merging PR #$1 to main" + git switch main + git merge "pr-$1" --no-ff -m "Merge pull request #$1 from Expensify/pr-$1" + git branch -d "pr-$1" + success "Merged PR #$1 to main" +} + ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) if ! command -v jq &> /dev/null; then @@ -113,19 +124,14 @@ success "Setup complete!" title "Scenario #1: Merge a pull request while the checklist is unlocked" -info "Creating PR #1 and merging it into main..." +info "Creating PR #1..." git switch -c pr-1 echo "Changes from PR #1" >> PR1.txt git add PR1.txt git commit -m "Changes from PR #1" success "Created PR #1 in branch pr-1" -info "Merging PR #1 to main" -git switch main -git merge pr-1 --no-ff -m "Merge pull request #1 from Expensify/pr-1" -git branch -d pr-1 -success "Merged PR #1 to main" - +merge_pr 1 bump_version patch update_staging_from_main @@ -145,17 +151,13 @@ success "Scenario #1 completed successfully!" title "Scenario #2: Merge a pull request with the checklist locked, but don't CP it" -info "Creating PR #2 and merging it into main..." +info "Creating PR #2..." setup_git_as_human git switch -c pr-2 echo "Changes from PR #2" >> PR2.txt git add PR2.txt git commit -m "Changes from PR #2" -git switch main -git merge pr-2 --no-ff -m "Merge pull request #2 from Expensify/pr-2" -info "Merged PR #2 into main" -git branch -d pr-2 -success "Created PR #2 and merged it to main!" +merge_pr 2 success "Scenario #2 completed successfully!" @@ -168,12 +170,13 @@ git add PR3.txt git commit -m "Changes from PR #3" git switch main git merge pr-3 --no-ff -m "Merge pull request #3 from Expensify/pr-3" -PR_MERGE_COMMIT="$(git log -1 --format='%H')" +PR_MERGE_COMMIT="$(git rev-parse HEAD)" info "Merged PR #3 into main" git branch -d pr-3 success "Created PR #3 and merged it to main!" bump_version patch +VERSION_BUMP_COMMIT="$(git rev-parse HEAD)" info "Cherry picking PR #3 and the version bump to staging..." git switch staging @@ -218,11 +221,7 @@ success "Scenario #4A completed successfully!" title "Scenario #4B: Run the staging deploy and create a new checklist" bump_version minor - -info "Re-creating staging from main..." -git branch -D staging -git switch -c staging -success "Recreated staging from main!" +update_staging_from_main info "Tagging new version on staging..." git tag "$(print_version)" @@ -238,18 +237,14 @@ success "Scenario #4B completed successfully!" title "Scenario #5: Merging another pull request when the checklist is unlocked" -info "Creating PR #5 and merging it to main..." +info "Creating PR #5..." setup_git_as_human git switch main git switch -c pr-5 echo "Changes from PR #5" >> PR5.txt git add PR5.txt git commit -m "Changes from PR #5" -git switch main -git merge pr-5 --no-ff -m "Merge pull request #5 from Expensify/pr-5" -info "Merged PR #5 into main" -git branch -d pr-5 -success "Created PR #5 and merged it into main!" +merge_pr 5 bump_version patch update_staging_from_main From 1643553a05601ac4efa470de03bc245dcd185150 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 12:21:08 -0700 Subject: [PATCH 212/826] Create utility function for cherry_pick_pr --- tests/unit/CIGitLogicTest.sh | 42 +++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 08d09bef0a8b..dfc28ed68e72 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -64,6 +64,27 @@ function merge_pr { success "Merged PR #$1 to main" } +function cherry_pick_pr { + info "Cherry-picking PR $1 to staging..." + merge_pr "$1" + PR_MERGE_COMMIT="$(git rev-parse HEAD)" + + bump_version patch + VERSION_BUMP_COMMIT="$(git rev-parse HEAD)" + + git switch staging + git switch -c cherry-pick-staging + git cherry-pick -x --mainline 1 --strategy=recursive -Xtheirs "$PR_MERGE_COMMIT" + git cherry-pick -x --mainline 1 "$VERSION_BUMP_COMMIT" + + git switch staging + git merge cherry-pick-staging --no-ff -m "Merge pull request #$(($1 + 1)) from Expensify/cherry-pick-staging" + git branch -d cherry-pick-staging + info "Merged PR #$(($1 + 1)) into staging" + + success "Successfully cherry-picked PR #$1 to staging!" +} + ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) if ! command -v jq &> /dev/null; then @@ -168,26 +189,7 @@ git switch -c pr-3 echo "Changes from PR #3" >> PR3.txt git add PR3.txt git commit -m "Changes from PR #3" -git switch main -git merge pr-3 --no-ff -m "Merge pull request #3 from Expensify/pr-3" -PR_MERGE_COMMIT="$(git rev-parse HEAD)" -info "Merged PR #3 into main" -git branch -d pr-3 -success "Created PR #3 and merged it to main!" - -bump_version patch -VERSION_BUMP_COMMIT="$(git rev-parse HEAD)" - -info "Cherry picking PR #3 and the version bump to staging..." -git switch staging -git switch -c cherry-pick-staging -git cherry-pick -x --mainline 1 --strategy=recursive -Xtheirs "$PR_MERGE_COMMIT" -git cherry-pick -x --mainline 1 "$VERSION_BUMP_COMMIT" -git switch staging -git merge cherry-pick-staging --no-ff -m "Merge pull request #4 from Expensify/cherry-pick-staging" -git branch -d cherry-pick-staging -info "Merged PR #4 into staging" -success "Successfully cherry-picked PR #3 to staging!" +cherry_pick_pr 3 info "Tagging the new version on staging..." git tag "$(print_version)" From a0b951f6e18679b6d34f48c07bcd66a073f7f28c Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 12:29:32 -0700 Subject: [PATCH 213/826] Create tag_staging utility function --- tests/unit/CIGitLogicTest.sh | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index dfc28ed68e72..6c75e691435f 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -85,6 +85,14 @@ function cherry_pick_pr { success "Successfully cherry-picked PR #$1 to staging!" } +function tag_staging { + info "Tagging new version from the staging branch..." + setup_git_as_osbotify + git switch staging + git tag "$(print_version)" + success "Created new tag $(print_version)" +} + ### Phase 0: Verify necessary tools are installed (all tools should be pre-installed on all GitHub Actions runners) if ! command -v jq &> /dev/null; then @@ -134,11 +142,8 @@ git branch production success "Initialized Git repo!" -info "Creating initial tag..." -git switch staging -git tag "$(print_version)" +tag_staging git switch main -success "Created initial tag $(print_version)" success "Setup complete!" @@ -146,6 +151,7 @@ success "Setup complete!" title "Scenario #1: Merge a pull request while the checklist is unlocked" info "Creating PR #1..." +setup_git_as_human git switch -c pr-1 echo "Changes from PR #1" >> PR1.txt git add PR1.txt @@ -157,9 +163,7 @@ bump_version patch update_staging_from_main # Tag staging -info "Tagging new version..." -git tag "$(print_version)" -success "Created new tag $(print_version)" +tag_staging git switch main # Verify output for checklist and deploy comment @@ -191,9 +195,7 @@ git add PR3.txt git commit -m "Changes from PR #3" cherry_pick_pr 3 -info "Tagging the new version on staging..." -git tag "$(print_version)" -success "Created tag $(print_version)" +tag_staging # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.0 1.0.2" @@ -224,10 +226,7 @@ title "Scenario #4B: Run the staging deploy and create a new checklist" bump_version minor update_staging_from_main - -info "Tagging new version on staging..." -git tag "$(print_version)" -success "Successfully tagged version $(print_version) on staging" +tag_staging # Verify output for new checklist and staging deploy comments info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.0" @@ -250,10 +249,7 @@ merge_pr 5 bump_version patch update_staging_from_main - -info "Tagging staging..." -git tag "$(print_version)" -success "Successfully tagged version $(print_version) on staging" +tag_staging # Verify output for checklist info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.1" From 563fe3220c4736e13d0af6769fb4a9c1bb0c7b95 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 16 Jun 2023 12:45:14 -0700 Subject: [PATCH 214/826] updating getChatRoomSubtitleLink --- src/libs/ReportUtils.js | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 0ca112f01703..bb8bd8b7c288 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1078,22 +1078,7 @@ function getRootReportName(report) { */ function getChatRoomSubtitle(report) { if (isChatThread(report)) { - if (!getChatType(report)) { - return `${Localize.translateLocal('threads.from')} ${getRootReportName(report)}`; - } - - let roomName = ''; - if (isChatRoom(report)) { - const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - if (parentReport) { - roomName = lodashGet(parentReport, 'displayName', ''); - } else { - roomName = lodashGet(report, 'displayName', ''); - } - } - - const workspaceName = getPolicyName(report); - return `${Localize.translateLocal('threads.from')} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + return ''; } if (!isDefaultRoom(report) && !isUserCreatedPolicyRoom(report) && !isPolicyExpenseChat(report)) { return ''; @@ -1117,10 +1102,15 @@ function getChatRoomSubtitle(report) { * @returns {String} */ function getChatRoomSubtitleLink(report) { + if (report.reportID == '3346402972554959') { + debugger; + } + if (isThread(report)) { - let roomName = ''; + const from = Localize.translateLocal('threads.from'); if (isChatRoom(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); + let roomName = ''; if (parentReport) { roomName = lodashGet(parentReport, 'displayName', ''); } else { @@ -1128,10 +1118,15 @@ function getChatRoomSubtitleLink(report) { } const workspaceName = getPolicyName(report); - return `${Localize.translateLocal('threads.from')} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + return `${from} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } - return `${Localize.translateLocal('threads.from')} ${getRootReportName(report)}`; + if (isExpenseReport(report)) { + const payeeEmail = getDisplayNameForParticipant(report.managerID); + const workspaceName = getPolicyName(report); + return `${from} ${workspaceName ? [payeeEmail, workspaceName].join(' in ') : payeeEmail}`; + } + return `${from} ${getRootReportName(report)}`; } return ''; } From ff3b93d06c816cc5fdaab5431b3c1b04ec8dc9bc Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 16 Jun 2023 12:45:25 -0700 Subject: [PATCH 215/826] using subtitleLink --- src/pages/home/HeaderView.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 7334bf174e60..86eaa10c2311 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -82,6 +82,7 @@ function HeaderView(props) { const reportHeaderData = !isTaskReport && !isThread && props.report.parentReportID ? props.parentReport : props.report; const title = ReportUtils.getReportName(reportHeaderData); const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData); + const subtitleLink = ReportUtils.getChatRoomSubtitleLink(reportHeaderData); const isConcierge = participants.length === 1 && _.contains(participants, CONST.ACCOUNT_ID.CONCIERGE); const isAutomatedExpensifyAccount = participants.length === 1 && ReportUtils.hasAutomatedExpensifyAccountIDs(participants); const guideCalendarLink = lodashGet(props.account, 'guideCalendarLink'); @@ -177,24 +178,25 @@ function HeaderView(props) { textStyles={[styles.headerText, styles.pre]} shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread || isTaskReport} /> - {(isChatRoom || isPolicyExpenseChat || isThread) && !_.isEmpty(subtitle) && ( + {(isChatRoom || isPolicyExpenseChat || isThread) && ( <> - {isThread ? ( + {!_.isEmpty(subtitleLink) && ( { Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); }} - accessibilityLabel={subtitle} + accessibilityLabel={subtitleLink} accessibilityRole="link" > - {subtitle} + {subtitleLink} - ) : ( + )} + {!_.isEmpty(subtitle) && ( Date: Fri, 16 Jun 2023 12:45:46 -0700 Subject: [PATCH 216/826] using subtitleLink in AvatarWithDisplayName --- src/components/AvatarWithDisplayName.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index 7889dcb0b703..c5a7fcbacc1c 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -17,6 +17,10 @@ import compose from '../libs/compose'; import * as OptionsListUtils from '../libs/OptionsListUtils'; import Text from './Text'; import * as StyleUtils from '../styles/StyleUtils'; +import {getChatRoomSubtitleLink} from '../libs/ReportUtils'; +import Navigation from '../libs/Navigation/Navigation'; +import ROUTES from '../ROUTES'; +import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; const propTypes = { /** The report currently being looked at */ @@ -57,6 +61,7 @@ function AvatarWithDisplayName(props) { const ownerPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs([props.report.ownerAccountID], props.personalDetails); const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(_.values(ownerPersonalDetails), false); const avatarContainerStyle = StyleUtils.getEmptyAvatarStyle(props.size) || styles.emptyAvatar; + const subtitleLink = ReportUtils.getChatRoomSubtitleLink(props.report); return ( {Boolean(props.report && title) && ( @@ -88,6 +93,22 @@ function AvatarWithDisplayName(props) { textStyles={[props.isAnonymous ? styles.headerAnonymousFooter : styles.headerText, styles.pre]} shouldUseFullTitle={isExpenseReport || props.isAnonymous} /> + {!_.isEmpty(subtitleLink) && ( + { + Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); + }} + accessibilityLabel={subtitle} + accessibilityRole="link" + > + + {subtitleLink} + + + )} {!_.isEmpty(subtitle) && ( Date: Fri, 16 Jun 2023 10:48:04 -1000 Subject: [PATCH 217/826] Revert problem code --- src/CONST.js | 3 - src/libs/HttpUtils.js | 22 +----- .../Navigation/AppNavigator/AuthScreens.js | 10 ++- src/libs/SessionUtils.js | 33 ++++++++- src/libs/actions/App.js | 73 +++++++++++-------- src/libs/actions/PersistedRequests.js | 9 +-- src/libs/actions/SignInRedirect.js | 2 + 7 files changed, 88 insertions(+), 64 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index 50bfb5675bd8..8b954a010da6 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -724,9 +724,6 @@ const CONST = { MAX_RETRY_WAIT_TIME_MS: 10 * 1000, PROCESS_REQUEST_DELAY_MS: 1000, MAX_PENDING_TIME_MS: 10 * 1000, - COMMAND: { - RECONNECT_APP: 'ReconnectApp', - }, }, DEFAULT_TIME_ZONE: {automatic: true, selected: 'America/Los_Angeles'}, DEFAULT_ACCOUNT_DATA: {errors: null, success: '', isLoading: false}, diff --git a/src/libs/HttpUtils.js b/src/libs/HttpUtils.js index e76517e2059f..5a8185a03038 100644 --- a/src/libs/HttpUtils.js +++ b/src/libs/HttpUtils.js @@ -22,9 +22,6 @@ Onyx.connect({ // We use the AbortController API to terminate pending request in `cancelPendingRequests` let cancellationController = new AbortController(); -// To terminate pending ReconnectApp requests https://github.com/Expensify/App/issues/15627 -let reconnectAppCancellationController = new AbortController(); - /** * Send an HTTP request, and attempt to resolve the json response. * If there is a network error, we'll set the application offline. @@ -33,18 +30,12 @@ let reconnectAppCancellationController = new AbortController(); * @param {String} [method] * @param {Object} [body] * @param {Boolean} [canCancel] - * @param {String} [command] * @returns {Promise} */ -function processHTTPRequest(url, method = 'get', body = null, canCancel = true, command = '') { - let signal; - if (canCancel) { - signal = command === CONST.NETWORK.COMMAND.RECONNECT_APP ? reconnectAppCancellationController.signal : cancellationController.signal; - } - +function processHTTPRequest(url, method = 'get', body = null, canCancel = true) { return fetch(url, { // We hook requests to the same Controller signal, so we can cancel them all at once - signal, + signal: canCancel ? cancellationController.signal : undefined, method, body, }) @@ -136,12 +127,7 @@ function xhr(command, data, type = CONST.NETWORK.METHOD.POST, shouldUseSecure = }); const url = ApiUtils.getCommandURL({shouldUseSecure, command}); - return processHTTPRequest(url, type, formData, data.canCancel, command); -} - -function cancelPendingReconnectAppRequest() { - reconnectAppCancellationController.abort(); - reconnectAppCancellationController = new AbortController(); + return processHTTPRequest(url, type, formData, data.canCancel); } function cancelPendingRequests() { @@ -150,11 +136,9 @@ function cancelPendingRequests() { // We create a new instance because once `abort()` is called any future requests using the same controller would // automatically get rejected: https://dom.spec.whatwg.org/#abortcontroller-api-integration cancellationController = new AbortController(); - cancelPendingReconnectAppRequest(); } export default { xhr, cancelPendingRequests, - cancelPendingReconnectAppRequest, }; diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js index fb02a811b0ec..182e1cca4a65 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.js +++ b/src/libs/Navigation/AppNavigator/AuthScreens.js @@ -32,6 +32,7 @@ import CentralPaneNavigator from './Navigators/CentralPaneNavigator'; import NAVIGATORS from '../../../NAVIGATORS'; import FullScreenNavigator from './Navigators/FullScreenNavigator'; import styles from '../../../styles/styles'; +import * as SessionUtils from '../../SessionUtils'; let currentUserEmail; Onyx.connect({ @@ -119,7 +120,14 @@ class AuthScreens extends React.Component { User.subscribeToUserEvents(); }); - App.openApp(); + // If we are on this screen then we are "logged in", but the user might not have "just logged in". They could be reopening the app + // or returning from background. If so, we'll assume they have some app data already and we can call reconnectApp() instead of openApp(). + if (SessionUtils.didUserLogInDuringSession()) { + App.openApp(); + } else { + App.reconnectApp(); + } + App.setUpPoliciesAndNavigate(this.props.session); if (this.props.lastOpenedPublicRoomID) { diff --git a/src/libs/SessionUtils.js b/src/libs/SessionUtils.js index 875b540e5599..4d4d4b7658b9 100644 --- a/src/libs/SessionUtils.js +++ b/src/libs/SessionUtils.js @@ -1,4 +1,7 @@ +import Onyx from 'react-native-onyx'; +import _ from 'underscore'; import lodashGet from 'lodash/get'; +import ONYXKEYS from '../ONYXKEYS'; /** * Determine if the transitioning user is logging in as a new user. @@ -28,7 +31,35 @@ function isLoggingInAsNewUser(transitionURL, sessionEmail) { return linkedEmail !== sessionEmail; } +let loggedInDuringSession; + +// To tell if the user logged in during this session we will check the value of session.authToken once when the app's JS inits. When the user logs out +// we can reset this flag so that it can be updated again. +Onyx.connect({ + key: ONYXKEYS.SESSION, + callback: (session) => { + if (!_.isUndefined(loggedInDuringSession)) { + return; + } + + if (session && session.authToken) { + loggedInDuringSession = false; + } else { + loggedInDuringSession = true; + } + }, +}); + +function resetDidUserLogInDuringSession() { + loggedInDuringSession = undefined; +} + +function didUserLogInDuringSession() { + return Boolean(loggedInDuringSession); +} + export { - // eslint-disable-next-line import/prefer-default-export isLoggingInAsNewUser, + didUserLogInDuringSession, + resetDidUserLogInDuringSession, }; diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 821e7f13a254..d01ebd25aebb 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -183,38 +183,47 @@ function openApp() { * Refreshes data when the app reconnects */ function reconnectApp() { - // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID. - // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. - // - // - Look through the local report actions and reports to find the most recently modified report action or report. - // - We send this to the server so that it can compute which chats are critical for the user to see and return only those as an optimization. - API.write( - CONST.NETWORK.COMMAND.RECONNECT_APP, - {policyIDList: getNonOptimisticPolicyIDs(allPolicies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, - { - optimisticData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: true, - }, - ], - successData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: false, - }, - ], - failureData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: false, - }, - ], - }, - ); + isReadyToOpenApp.then(() => { + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.POLICY, + waitForCollectionCallback: true, + callback: (policies) => { + Onyx.disconnect(connectionID); + // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID. + // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. + // + // - Look through the local report actions and reports to find the most recently modified report action or report. + // - We send this to the server so that it can compute which chats are critical for the user to see and return only those as an optimization. + API.write( + 'ReconnectApp', + {policyIDList: getNonOptimisticPolicyIDs(policies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, + { + optimisticData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_LOADING_REPORT_DATA, + value: true, + }, + ], + successData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_LOADING_REPORT_DATA, + value: false, + }, + ], + failureData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_LOADING_REPORT_DATA, + value: false, + }, + ], + }, + ); + }, + }); + }); } /** diff --git a/src/libs/actions/PersistedRequests.js b/src/libs/actions/PersistedRequests.js index e3aafd18c35d..d893ee255287 100644 --- a/src/libs/actions/PersistedRequests.js +++ b/src/libs/actions/PersistedRequests.js @@ -1,8 +1,6 @@ import Onyx from 'react-native-onyx'; import _ from 'underscore'; -import CONST from '../../CONST'; import ONYXKEYS from '../../ONYXKEYS'; -import HttpUtils from '../HttpUtils'; let persistedRequests = []; @@ -19,12 +17,7 @@ function clear() { * @param {Array} requestsToPersist */ function save(requestsToPersist) { - HttpUtils.cancelPendingReconnectAppRequest(); - persistedRequests = _.chain(persistedRequests) - .concat(requestsToPersist) - .partition((request) => request.command !== CONST.NETWORK.COMMAND.RECONNECT_APP) - .flatten() - .value(); + persistedRequests = persistedRequests.concat(requestsToPersist); Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, persistedRequests); } diff --git a/src/libs/actions/SignInRedirect.js b/src/libs/actions/SignInRedirect.js index a500635222d6..a010621c4eea 100644 --- a/src/libs/actions/SignInRedirect.js +++ b/src/libs/actions/SignInRedirect.js @@ -10,6 +10,7 @@ import navigationRef from '../Navigation/navigationRef'; import SCREENS from '../../SCREENS'; import Navigation from '../Navigation/Navigation'; import * as ErrorUtils from '../ErrorUtils'; +import * as SessionUtils from '../SessionUtils'; let currentIsOffline; let currentShouldForceOffline; @@ -87,6 +88,7 @@ function redirectToSignIn(errorMessage) { NetworkConnection.clearReconnectionCallbacks(); clearStorageAndRedirect(errorMessage); resetHomeRouteParams(); + SessionUtils.resetDidUserLogInDuringSession(); } export default redirectToSignIn; From c0583f8ca6ba077fbc1bf2eb0f4093ee652ffa3d Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Fri, 16 Jun 2023 11:02:54 -1000 Subject: [PATCH 218/826] DRY up openApp/reconnectApp method --- src/libs/actions/App.js | 71 +++++++++++------------------------------ 1 file changed, 18 insertions(+), 53 deletions(-) diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index d01ebd25aebb..5d23fddd9654 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -44,13 +44,6 @@ Onyx.connect({ }, }); -let allPolicies = []; -Onyx.connect({ - key: ONYXKEYS.COLLECTION.POLICY, - waitForCollectionCallback: true, - callback: (policies) => (allPolicies = policies), -}); - let preferredLocale; Onyx.connect({ key: ONYXKEYS.NVP_PREFERRED_LOCALE, @@ -138,18 +131,30 @@ AppState.addEventListener('change', (nextAppState) => { /** * Fetches data needed for app initialization + * @param {boolean} [isReconnecting] */ -function openApp() { +function openApp(isReconnecting = false) { isReadyToOpenApp.then(() => { - // We need a fresh connection/callback here to make sure that the list of policyIDs that is sent to OpenApp is the most updated list from Onyx const connectionID = Onyx.connect({ key: ONYXKEYS.COLLECTION.POLICY, waitForCollectionCallback: true, callback: (policies) => { + // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID. + // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. + // + // - Look through the local report actions and reports to find the most recently modified report action or report. + // - We send this to the server so that it can compute which chats are critical for the user to see and return only those as an optimization. + const params = {policyIDList: getNonOptimisticPolicyIDs(policies)}; + if (isReconnecting) { + params.mostRecentReportActionLastModified = ReportActionsUtils.getMostRecentReportActionLastModified(); + } Onyx.disconnect(connectionID); - API.read( - 'OpenApp', - {policyIDList: getNonOptimisticPolicyIDs(policies)}, + + // eslint-disable-next-line rulesdir/no-multiple-api-calls + const apiMethod = isReconnecting ? API.write : API.read; + apiMethod( + isReconnecting ? 'ReconnectApp' : 'OpenApp', + params, { optimisticData: [ { @@ -183,47 +188,7 @@ function openApp() { * Refreshes data when the app reconnects */ function reconnectApp() { - isReadyToOpenApp.then(() => { - const connectionID = Onyx.connect({ - key: ONYXKEYS.COLLECTION.POLICY, - waitForCollectionCallback: true, - callback: (policies) => { - Onyx.disconnect(connectionID); - // When the app reconnects we do a fast "sync" of the LHN and only return chats that have new messages. We achieve this by sending the most recent reportActionID. - // we have locally. And then only update the user about chats with messages that have occurred after that reportActionID. - // - // - Look through the local report actions and reports to find the most recently modified report action or report. - // - We send this to the server so that it can compute which chats are critical for the user to see and return only those as an optimization. - API.write( - 'ReconnectApp', - {policyIDList: getNonOptimisticPolicyIDs(policies), mostRecentReportActionLastModified: ReportActionsUtils.getMostRecentReportActionLastModified()}, - { - optimisticData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: true, - }, - ], - successData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: false, - }, - ], - failureData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: false, - }, - ], - }, - ); - }, - }); - }); + openApp(true); } /** From 0942351991c4328d8731995eaf96752658b9c9ae Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Fri, 16 Jun 2023 11:09:46 -1000 Subject: [PATCH 219/826] run prettier add js doc --- src/libs/SessionUtils.js | 9 ++++---- src/libs/actions/App.js | 50 ++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/src/libs/SessionUtils.js b/src/libs/SessionUtils.js index 4d4d4b7658b9..7b1fc9f42d25 100644 --- a/src/libs/SessionUtils.js +++ b/src/libs/SessionUtils.js @@ -54,12 +54,11 @@ function resetDidUserLogInDuringSession() { loggedInDuringSession = undefined; } +/** + * @returns {boolean} + */ function didUserLogInDuringSession() { return Boolean(loggedInDuringSession); } -export { - isLoggingInAsNewUser, - didUserLogInDuringSession, - resetDidUserLogInDuringSession, -}; +export {isLoggingInAsNewUser, didUserLogInDuringSession, resetDidUserLogInDuringSession}; diff --git a/src/libs/actions/App.js b/src/libs/actions/App.js index 5d23fddd9654..6053bbb81a98 100644 --- a/src/libs/actions/App.js +++ b/src/libs/actions/App.js @@ -152,33 +152,29 @@ function openApp(isReconnecting = false) { // eslint-disable-next-line rulesdir/no-multiple-api-calls const apiMethod = isReconnecting ? API.write : API.read; - apiMethod( - isReconnecting ? 'ReconnectApp' : 'OpenApp', - params, - { - optimisticData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: true, - }, - ], - successData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: false, - }, - ], - failureData: [ - { - onyxMethod: Onyx.METHOD.MERGE, - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - value: false, - }, - ], - }, - ); + apiMethod(isReconnecting ? 'ReconnectApp' : 'OpenApp', params, { + optimisticData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_LOADING_REPORT_DATA, + value: true, + }, + ], + successData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_LOADING_REPORT_DATA, + value: false, + }, + ], + failureData: [ + { + onyxMethod: Onyx.METHOD.MERGE, + key: ONYXKEYS.IS_LOADING_REPORT_DATA, + value: false, + }, + ], + }); }, }); }); From 5b3066518e1f6b107af1a1902f71abc8293ecf24 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 14:33:51 -0700 Subject: [PATCH 220/826] Add tests for the wonky case --- tests/unit/CIGitLogicTest.sh | 115 +++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/tests/unit/CIGitLogicTest.sh b/tests/unit/CIGitLogicTest.sh index 6c75e691435f..be7844b2acac 100755 --- a/tests/unit/CIGitLogicTest.sh +++ b/tests/unit/CIGitLogicTest.sh @@ -263,6 +263,121 @@ assert_equal "$output" "[ '5' ]" success "Scenario #5 completed successfully!" +title "Scenario #6: Deploying a PR, then CPing a revert, then adding the same code back again before the next production deploy results in the correct code on staging and production." + +info "Creating myFile.txt in PR #6" +setup_git_as_human +git switch main +git switch -c pr-6 +echo "Changes from PR #6" >> myFile.txt +git add myFile.txt +git commit -m "Add myFile.txt in PR #6" + +merge_pr 6 +bump_version patch +update_staging_from_main +tag_staging + +# Verify output for checklist +info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.2" +output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.2') +assert_equal "$output" "[ '6', '5', '2' ]" + +# Verify output for deploy comment +info "Checking output of getPullRequestsMergedBetween 1.1.1 1.1.2" +output=$(node "$getPullRequestsMergedBetween" '1.1.1' '1.1.2') +assert_equal "$output" "[ '6' ]" + +info "Appending and prepending content to myFile.txt in PR #7" +setup_git_as_human +git switch main +git switch -c pr-7 +printf "[DEBUG] Before:\n\n%s" "$(cat myFile.txt)" +printf "Prepended content\n%s" "$(cat myFile.txt)" > myFile.txt +printf "\nAppended content\n" >> myFile.txt +printf "\n\n[DEBUG] After:\n\n%s\n" "$(cat myFile.txt)" +git add myFile.txt +git commit -m "Append and prepend content in myFile.txt" + +merge_pr 7 +bump_version patch +update_staging_from_main +tag_staging + +# Verify output for checklist +info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.3" +output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.3') +assert_equal "$output" "[ '7', '6', '5', '2' ]" + +# Verify output for deploy comment +info "Checking output of getPullRequestsMergedBetween 1.1.2 1.1.3" +output=$(node "$getPullRequestsMergedBetween" '1.1.2' '1.1.3') +assert_equal "$output" "[ '7' ]" + +info "Making an unrelated change in PR #8" +setup_git_as_human +git switch main +git switch -c pr-8 +echo "some content" >> anotherFile.txt +git add anotherFile.txt +git commit -m "Create another file" + +merge_pr 8 + +info "Reverting the append + prepend on main in PR #9" +setup_git_as_human +git switch main +git switch -c pr-9 +printf "Before:\n\n%s\n" "$(cat myFile.txt)" +echo "some content" > myFile.txt +printf "\nAfter:\n\n%s\n" "$(cat myFile.txt)" +git add myFile.txt +git commit -m "Revert append and prepend" + +cherry_pick_pr 9 +tag_staging + +info "Verifying that the revert is present on staging, but the unrelated change is not" +if [[ "$(cat myFile.txt)" != "some content" ]]; then + error "Revert did not make it to staging" + exit 1 +else + success "Revert made it to staging" +fi +if [[ -f anotherFile.txt ]]; then + error "Unrelated change made it to staging" + exit 1 +else + success "Unrelated change not on staging yet" +fi + +info "Repeating previously reverted append + prepend on main in PR #10" +setup_git_as_human +git switch main +git switch -c pr-10 +printf "[DEBUG] Before:\n\n%s" "$(cat myFile.txt)" +printf "Prepended content\n%s" "$(cat myFile.txt)" > myFile.txt +printf "\nAppended content\n" >> myFile.txt +printf "\n\n[DEBUG] After:\n\n%s\n" "$(cat myFile.txt)" +git add myFile.txt +git commit -m "Append and prepend content in myFile.txt" + +merge_pr 10 +update_production_from_staging +bump_version minor +update_staging_from_main +tag_staging + +# Verify production release list +info "Checking output of getPullRequestsMergedBetween 1.0.2 1.1.4" +output=$(node "$getPullRequestsMergedBetween" '1.0.2' '1.1.4') +assert_equal "$output" "[ '9', '7', '6', '5', '2' ]" + +# Verify PR list for the new checklist +info "Checking output of getPullRequestsMergedBetween 1.1.4 1.2.0" +output=$(node "$getPullRequestsMergedBetween" '1.1.4' '1.2.0') +assert_equal "$output" "[ '10', '8' ]" + ### Cleanup title "Cleaning up..." cd "$TEST_DIR" || exit 1 From 2c480b387aaf0ee3ec687885e8aab138f959e48a Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Fri, 16 Jun 2023 15:06:18 -0700 Subject: [PATCH 221/826] Add assets for lounge page --- assets/images/lounge-access.svg | 23 + .../product-illustrations/lounge-top-bg.svg | 5710 +++++++++++++++++ .../simple-illustration__chatbubbles.svg | 24 + .../simple-illustration__coffeemug.svg | 46 + .../simple-illustration__sanfrancisco.svg | 78 + src/components/Icon/Expensicons.js | 2 + src/components/Icon/Illustrations.js | 8 + src/pages/settings/LoungeAccessPage.js | 18 +- src/pages/settings/Profile/ProfilePage.js | 4 +- src/styles/StyleUtils.js | 23 + 10 files changed, 5926 insertions(+), 10 deletions(-) create mode 100644 assets/images/lounge-access.svg create mode 100644 assets/images/product-illustrations/lounge-top-bg.svg create mode 100644 assets/images/simple-illustrations/simple-illustration__chatbubbles.svg create mode 100644 assets/images/simple-illustrations/simple-illustration__coffeemug.svg create mode 100644 assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg diff --git a/assets/images/lounge-access.svg b/assets/images/lounge-access.svg new file mode 100644 index 000000000000..3be9ff00fb7a --- /dev/null +++ b/assets/images/lounge-access.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/assets/images/product-illustrations/lounge-top-bg.svg b/assets/images/product-illustrations/lounge-top-bg.svg new file mode 100644 index 000000000000..3130bc8b2d65 --- /dev/null +++ b/assets/images/product-illustrations/lounge-top-bg.svg @@ -0,0 +1,5710 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/simple-illustrations/simple-illustration__chatbubbles.svg b/assets/images/simple-illustrations/simple-illustration__chatbubbles.svg new file mode 100644 index 000000000000..8edeea7e06f9 --- /dev/null +++ b/assets/images/simple-illustrations/simple-illustration__chatbubbles.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + diff --git a/assets/images/simple-illustrations/simple-illustration__coffeemug.svg b/assets/images/simple-illustrations/simple-illustration__coffeemug.svg new file mode 100644 index 000000000000..de4ae88d731b --- /dev/null +++ b/assets/images/simple-illustrations/simple-illustration__coffeemug.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg b/assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg new file mode 100644 index 000000000000..79779e85c940 --- /dev/null +++ b/assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/Icon/Expensicons.js b/src/components/Icon/Expensicons.js index db093d2bc4df..3b1470197f73 100644 --- a/src/components/Icon/Expensicons.js +++ b/src/components/Icon/Expensicons.js @@ -60,6 +60,7 @@ import Keyboard from '../../../assets/images/keyboard.svg'; import Link from '../../../assets/images/link.svg'; import LinkCopy from '../../../assets/images/link-copy.svg'; import Lock from '../../../assets/images/lock.svg'; +import LoungeAccess from '../../../assets/images/lounge-access.svg'; import Luggage from '../../../assets/images/luggage.svg'; import MagnifyingGlass from '../../../assets/images/magnifying-glass.svg'; import Mail from '../../../assets/images/mail.svg'; @@ -185,6 +186,7 @@ export { Link, LinkCopy, Lock, + LoungeAccess, Luggage, MagnifyingGlass, Mail, diff --git a/src/components/Icon/Illustrations.js b/src/components/Icon/Illustrations.js index 0523fdbbc1e7..07a04c3e8d39 100644 --- a/src/components/Icon/Illustrations.js +++ b/src/components/Icon/Illustrations.js @@ -2,6 +2,8 @@ import Abracadabra from '../../../assets/images/product-illustrations/abracadabr import BankArrowPink from '../../../assets/images/product-illustrations/bank-arrow--pink.svg'; import BankMouseGreen from '../../../assets/images/product-illustrations/bank-mouse--green.svg'; import BankUserGreen from '../../../assets/images/product-illustrations/bank-user--green.svg'; +import ChatBubbles from '../../../assets/images/simple-illustrations/simple-illustration__chatbubbles.svg'; +import CoffeeMug from '../../../assets/images/simple-illustrations/simple-illustration__coffeemug.svg'; import ConciergeBlue from '../../../assets/images/product-illustrations/concierge--blue.svg'; import ConciergeExclamation from '../../../assets/images/product-illustrations/concierge--exclamation.svg'; import CreditCardsBlue from '../../../assets/images/product-illustrations/credit-cards--blue.svg'; @@ -18,6 +20,7 @@ import ReceiptYellow from '../../../assets/images/product-illustrations/receipt- import RocketBlue from '../../../assets/images/product-illustrations/rocket--blue.svg'; import RocketOrange from '../../../assets/images/product-illustrations/rocket--orange.svg'; import SafeBlue from '../../../assets/images/product-illustrations/safe.svg'; +import SanFrancisco from '../../../assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg'; import TadaYellow from '../../../assets/images/product-illustrations/tada--yellow.svg'; import TadaBlue from '../../../assets/images/product-illustrations/tada--blue.svg'; import ToddBehindCloud from '../../../assets/images/product-illustrations/todd-behind-cloud.svg'; @@ -28,6 +31,7 @@ import PinkBill from '../../../assets/images/simple-illustrations/simple-illustr import CreditCardsNew from '../../../assets/images/simple-illustrations/simple-illustration__credit-cards.svg'; import InvoiceBlue from '../../../assets/images/simple-illustrations/simple-illustration__invoice.svg'; import LockOpen from '../../../assets/images/simple-illustrations/simple-illustration__lockopen.svg'; +import Lounge from '../../../assets/images/product-illustrations/lounge-top-bg.svg'; import Luggage from '../../../assets/images/simple-illustrations/simple-illustration__luggage.svg'; import MoneyIntoWallet from '../../../assets/images/simple-illustrations/simple-illustration__moneyintowallet.svg'; import MoneyWings from '../../../assets/images/simple-illustrations/simple-illustration__moneywings.svg'; @@ -46,6 +50,8 @@ export { BankArrowPink, BankMouseGreen, BankUserGreen, + ChatBubbles, + CoffeeMug, ConciergeBlue, ConciergeExclamation, CreditCardsBlue, @@ -61,6 +67,7 @@ export { ReceiptYellow, RocketBlue, RocketOrange, + SanFrancisco, SafeBlue, TadaYellow, TadaBlue, @@ -72,6 +79,7 @@ export { CreditCardsNew, InvoiceBlue, LockOpen, + Lounge, Luggage, MoneyIntoWallet, MoneyWings, diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index d0f927821e37..e7829512b1dd 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -6,13 +6,14 @@ import Navigation from '../../libs/Navigation/Navigation'; import ROUTES from '../../ROUTES'; import styles from '../../styles/styles'; import Text from '../../components/Text'; -import * as Expensicons from '../../components/Icon/Expensicons'; import ScreenWrapper from '../../components/ScreenWrapper'; import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; import MenuItem from '../../components/MenuItem'; -import Logo from '../../../assets/images/new-expensify.svg'; import compose from '../../libs/compose'; +import * as Illustrations from '../../components/Icon/Illustrations'; +import * as StyleUtils from '../../styles/StyleUtils'; +import Icon from '../../components/Icon'; const propTypes = { ...withLocalizePropTypes, @@ -23,15 +24,15 @@ function LoungeAccessPage(props) { const menuItems = [ { translationKey: 'loungeAccessPage.coffeePromo', - icon: Expensicons.Link, + icon: Illustrations.CoffeeMug, }, { translationKey: 'loungeAccessPage.networkingPromo', - icon: Expensicons.Link, + icon: Illustrations.ChatBubbles, }, { translationKey: 'loungeAccessPage.viewsPromo', - icon: Expensicons.Link, + icon: Illustrations.SanFrancisco, }, ]; @@ -45,12 +46,9 @@ function LoungeAccessPage(props) { /> + - ))} diff --git a/src/pages/settings/Profile/ProfilePage.js b/src/pages/settings/Profile/ProfilePage.js index 9d5cad544fde..1fd1e585648d 100755 --- a/src/pages/settings/Profile/ProfilePage.js +++ b/src/pages/settings/Profile/ProfilePage.js @@ -125,7 +125,9 @@ function ProfilePage(props) { {props.user.hasLoungeAccess && ( Navigation.navigate(ROUTES.SETTINGS_LOUNGE_ACCESS)} shouldShowRightIcon /> diff --git a/src/styles/StyleUtils.js b/src/styles/StyleUtils.js index 2feed7b9b8d8..4af93b14085d 100644 --- a/src/styles/StyleUtils.js +++ b/src/styles/StyleUtils.js @@ -1184,6 +1184,28 @@ function getOuterModalStyle(windowHeight, viewportOffsetTop) { return Browser.isMobile() ? {maxHeight: windowHeight, marginTop: viewportOffsetTop} : {}; } +/** + * Gets the correct size for the empty state background image based on screen dimensions + * + * @param {Boolean} isSmallScreenWidth + * @returns {Object} + */ +function getLoungeIllustrationBackgroundImageStyle(isSmallScreenWidth) { + if (isSmallScreenWidth) { + return { + height: 80, + width: '100%', + // position: 'absolute', + }; + } + + return { + height: 80, + width: '100%', + // position: 'absolute', + }; +} + export { getAvatarSize, getAvatarStyle, @@ -1250,4 +1272,5 @@ export { getMentionTextColor, getHeightOfMagicCodeInput, getOuterModalStyle, + getLoungeIllustrationBackgroundImageStyle, }; From 09fae724cacaa8db025da6e32994ca3a6d2083c8 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 15:06:45 -0700 Subject: [PATCH 222/826] Remove checkBundleVersionStringMatch --- .../checkBundleVersionStringMatch/action.yml | 8 - .../checkBundleVersionStringMatch.js | 21 - .../checkBundleVersionStringMatch/index.js | 3359 ----------------- .github/scripts/buildActions.sh | 1 - .github/workflows/cherryPick.yml | 16 +- 5 files changed, 1 insertion(+), 3404 deletions(-) delete mode 100644 .github/actions/javascript/checkBundleVersionStringMatch/action.yml delete mode 100644 .github/actions/javascript/checkBundleVersionStringMatch/checkBundleVersionStringMatch.js delete mode 100644 .github/actions/javascript/checkBundleVersionStringMatch/index.js diff --git a/.github/actions/javascript/checkBundleVersionStringMatch/action.yml b/.github/actions/javascript/checkBundleVersionStringMatch/action.yml deleted file mode 100644 index e967ed686939..000000000000 --- a/.github/actions/javascript/checkBundleVersionStringMatch/action.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: 'Check if Bundle Versions Match' -description: "Check if the CFBundleVersion string is compatible with the CFBundleShortVersionString" -outputs: - BUNDLE_VERSIONS_MATCH: - description: Whether or not the bundle versions match -runs: - using: 'node16' - main: './index.js' diff --git a/.github/actions/javascript/checkBundleVersionStringMatch/checkBundleVersionStringMatch.js b/.github/actions/javascript/checkBundleVersionStringMatch/checkBundleVersionStringMatch.js deleted file mode 100644 index f92a41497ba3..000000000000 --- a/.github/actions/javascript/checkBundleVersionStringMatch/checkBundleVersionStringMatch.js +++ /dev/null @@ -1,21 +0,0 @@ -const core = require('@actions/core'); -const {execSync} = require('child_process'); -const {PLIST_PATH} = require('../../../libs/nativeVersionUpdater'); - -const bundleVersion = execSync(`grep -A1 'CFBundleVersion' ${PLIST_PATH} | grep -v 'CFBundleVersion' | sed 's|[,]||g'`).toString().trim(); -const shortBundleVersion = execSync(`grep -A1 'CFBundleShortVersionString' ${PLIST_PATH} | grep -v 'CFBundleShortVersionString' | sed 's|[,]||g'`).toString().trim(); - -console.log(`Bundle Version: ${bundleVersion}`); -console.log(`Short Bundle Version: ${shortBundleVersion}`); - -const hasValue = shortBundleVersion && bundleVersion; -if (!hasValue) { - console.log('Failed to get Bundle Versions from plist'); - core.setOutput('BUNDLE_VERSIONS_MATCH', false); -} else if (bundleVersion.includes(shortBundleVersion)) { - console.log('Bundle Versions are compatible'); - core.setOutput('BUNDLE_VERSIONS_MATCH', true); -} else { - console.log('Bundle Versions are not compatible'); - core.setOutput('BUNDLE_VERSIONS_MATCH', false); -} diff --git a/.github/actions/javascript/checkBundleVersionStringMatch/index.js b/.github/actions/javascript/checkBundleVersionStringMatch/index.js deleted file mode 100644 index 4e5d88e69ca7..000000000000 --- a/.github/actions/javascript/checkBundleVersionStringMatch/index.js +++ /dev/null @@ -1,3359 +0,0 @@ -/** - * NOTE: This is a compiled file. DO NOT directly edit this file. - */ -module.exports = -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 855: -/***/ ((__unused_webpack_module, __unused_webpack_exports, __nccwpck_require__) => { - -const core = __nccwpck_require__(186); -const {execSync} = __nccwpck_require__(129); -const {PLIST_PATH} = __nccwpck_require__(322); - -const bundleVersion = execSync(`grep -A1 'CFBundleVersion' ${PLIST_PATH} | grep -v 'CFBundleVersion' | sed 's|[,]||g'`).toString().trim(); -const shortBundleVersion = execSync(`grep -A1 'CFBundleShortVersionString' ${PLIST_PATH} | grep -v 'CFBundleShortVersionString' | sed 's|[,]||g'`).toString().trim(); - -console.log(`Bundle Version: ${bundleVersion}`); -console.log(`Short Bundle Version: ${shortBundleVersion}`); - -const hasValue = shortBundleVersion && bundleVersion; -if (!hasValue) { - console.log('Failed to get Bundle Versions from plist'); - core.setOutput('BUNDLE_VERSIONS_MATCH', false); -} else if (bundleVersion.includes(shortBundleVersion)) { - console.log('Bundle Versions are compatible'); - core.setOutput('BUNDLE_VERSIONS_MATCH', true); -} else { - console.log('Bundle Versions are not compatible'); - core.setOutput('BUNDLE_VERSIONS_MATCH', false); -} - - -/***/ }), - -/***/ 322: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -const {execSync} = __nccwpck_require__(129); -const fs = __nccwpck_require__(747).promises; -const path = __nccwpck_require__(622); -const getMajorVersion = __nccwpck_require__(688); -const getMinorVersion = __nccwpck_require__(447); -const getPatchVersion = __nccwpck_require__(866); -const getBuildVersion = __nccwpck_require__(14); - -// Filepath constants -const BUILD_GRADLE_PATH = process.env.NODE_ENV === 'test' ? path.resolve(__dirname, '../../android/app/build.gradle') : './android/app/build.gradle'; -const PLIST_PATH = './ios/NewExpensify/Info.plist'; -const PLIST_PATH_TEST = './ios/NewExpensifyTests/Info.plist'; - -exports.BUILD_GRADLE_PATH = BUILD_GRADLE_PATH; -exports.PLIST_PATH = PLIST_PATH; -exports.PLIST_PATH_TEST = PLIST_PATH_TEST; - -/** - * Pad a number to be two digits (with leading zeros if necessary). - * - * @param {Number} number - Must be an integer. - * @returns {String} - A string representation of the number with length 2. - */ -function padToTwoDigits(number) { - if (number >= 10) { - return number.toString(); - } - return `0${number.toString()}`; -} - -/** - * Generate the 10-digit versionCode for android. - * This version code allocates two digits each for PREFIX, MAJOR, MINOR, PATCH, and BUILD versions. - * As a result, our max version is 99.99.99-99. - * - * @param {String} npmVersion - * @returns {String} - */ -exports.generateAndroidVersionCode = function generateAndroidVersionCode(npmVersion) { - // All Android versions will be prefixed with '10' due to previous versioning - const prefix = '10'; - return ''.concat( - prefix, - padToTwoDigits(getMajorVersion(npmVersion) || 0), - padToTwoDigits(getMinorVersion(npmVersion) || 0), - padToTwoDigits(getPatchVersion(npmVersion) || 0), - padToTwoDigits(getBuildVersion(npmVersion) || 0), - ); -}; - -/** - * Update the Android app versionName and versionCode. - * - * @param {String} versionName - * @param {String} versionCode - * @returns {Promise} - */ -exports.updateAndroidVersion = function updateAndroidVersion(versionName, versionCode) { - console.log('Updating android:', `versionName: ${versionName}`, `versionCode: ${versionCode}`); - return fs - .readFile(BUILD_GRADLE_PATH, {encoding: 'utf8'}) - .then((content) => { - let updatedContent = content.toString().replace(/versionName "([0-9.-]*)"/, `versionName "${versionName}"`); - return (updatedContent = updatedContent.replace(/versionCode ([0-9]*)/, `versionCode ${versionCode}`)); - }) - .then((updatedContent) => fs.writeFile(BUILD_GRADLE_PATH, updatedContent, {encoding: 'utf8'})); -}; - -/** - * Update the iOS app version. - * Updates the CFBundleShortVersionString and the CFBundleVersion. - * - * @param {String} version - * @returns {String} - */ -exports.updateiOSVersion = function updateiOSVersion(version) { - const shortVersion = version.split('-')[0]; - const cfVersion = version.includes('-') ? version.replace('-', '.') : `${version}.0`; - console.log('Updating iOS', `CFBundleShortVersionString: ${shortVersion}`, `CFBundleVersion: ${cfVersion}`); - - // Update Plists - execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH}`); - execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${shortVersion}" ${PLIST_PATH_TEST}`); - execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH}`); - execSync(`/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${cfVersion}" ${PLIST_PATH_TEST}`); - - // Return the cfVersion so we can set the NEW_IOS_VERSION in ios.yml - return cfVersion; -}; - - -/***/ }), - -/***/ 351: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(87)); -const utils_1 = __nccwpck_require__(278); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map - -/***/ }), - -/***/ 186: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(278); -const os = __importStar(__nccwpck_require__(87)); -const path = __importStar(__nccwpck_require__(622)); -const oidc_utils_1 = __nccwpck_require__(41); -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); - } - command_1.issueCommand('set-env', { name }, convertedVal); -} -exports.exportVariable = exportVariable; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ -function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); -} -exports.setSecret = setSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - file_command_1.issueFileCommand('PATH', inputPath); - } - else { - command_1.issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = addPath; -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -exports.getInput = getInput; -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -exports.getMultilineInput = getMultilineInput; -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -exports.getBooleanInput = getBooleanInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); -} -exports.setOutput = setOutput; -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); -} -exports.setCommandEcho = setCommandEcho; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -exports.isDebug = isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - command_1.issueCommand('debug', {}, message); -} -exports.debug = debug; -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.error = error; -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.warning = warning; -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.notice = notice; -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -exports.info = info; -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - command_1.issue('group', name); -} -exports.startGroup = startGroup; -/** - * End an output group. - */ -function endGroup() { - command_1.issue('endgroup'); -} -exports.endGroup = endGroup; -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -exports.group = group; -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); - } - command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); -} -exports.saveState = saveState; -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -exports.getState = getState; -function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); -} -exports.getIDToken = getIDToken; -/** - * Summary exports - */ -var summary_1 = __nccwpck_require__(327); -Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); -/** - * @deprecated use core.summary - */ -var summary_2 = __nccwpck_require__(327); -Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); -/** - * Path exports - */ -var path_utils_1 = __nccwpck_require__(981); -Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); -Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); -Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 717: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// For internal use, subject to change. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(747)); -const os = __importStar(__nccwpck_require__(87)); -const uuid_1 = __nccwpck_require__(521); -const utils_1 = __nccwpck_require__(278); -function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -exports.issueFileCommand = issueFileCommand; -function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -exports.prepareKeyValueMessage = prepareKeyValueMessage; -//# sourceMappingURL=file-command.js.map - -/***/ }), - -/***/ 41: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(255); -const auth_1 = __nccwpck_require__(526); -const core_1 = __nccwpck_require__(186); -class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.result.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - core_1.debug(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -exports.OidcClient = OidcClient; -//# sourceMappingURL=oidc-utils.js.map - -/***/ }), - -/***/ 981: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(622)); -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -exports.toPosixPath = toPosixPath; -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -exports.toWin32Path = toWin32Path; -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -exports.toPlatformPath = toPlatformPath; -//# sourceMappingURL=path-utils.js.map - -/***/ }), - -/***/ 327: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(87); -const fs_1 = __nccwpck_require__(747); -const { access, appendFile, writeFile } = fs_1.promises; -exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -exports.markdownSummary = _summary; -exports.summary = _summary; -//# sourceMappingURL=summary.js.map - -/***/ }), - -/***/ 278: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCommandProperties = exports.toCommandValue = void 0; -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -exports.toCommandProperties = toCommandProperties; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 526: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -//# sourceMappingURL=auth.js.map - -/***/ }), - -/***/ 255: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(605)); -const https = __importStar(__nccwpck_require__(211)); -const pm = __importStar(__nccwpck_require__(835)); -const tunnel = __importStar(__nccwpck_require__(294)); -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -exports.HttpClient = HttpClient; -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 835: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkBypass = exports.getProxyUrl = void 0; -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - return new URL(proxyVar); - } - else { - return undefined; - } -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; -//# sourceMappingURL=proxy.js.map - -/***/ }), - -/***/ 88: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const debug = __nccwpck_require__(427) -const { MAX_LENGTH, MAX_SAFE_INTEGER } = __nccwpck_require__(293) -const { re, t } = __nccwpck_require__(523) - -const parseOptions = __nccwpck_require__(785) -const { compareIdentifiers } = __nccwpck_require__(463) -class SemVer { - constructor (version, options) { - options = parseOptions(options) - - if (version instanceof SemVer) { - if (version.loose === !!options.loose && - version.includePrerelease === !!options.includePrerelease) { - return version - } else { - version = version.version - } - } else if (typeof version !== 'string') { - throw new TypeError(`Invalid Version: ${version}`) - } - - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ) - } - - debug('SemVer', version, options) - this.options = options - this.loose = !!options.loose - // this isn't actually relevant for versions, but keep it so that we - // don't run into trouble passing this.options around. - this.includePrerelease = !!options.includePrerelease - - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) - - if (!m) { - throw new TypeError(`Invalid Version: ${version}`) - } - - this.raw = version - - // these are actually numbers - this.major = +m[1] - this.minor = +m[2] - this.patch = +m[3] - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError('Invalid major version') - } - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError('Invalid minor version') - } - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError('Invalid patch version') - } - - // numberify any prerelease numeric ids - if (!m[4]) { - this.prerelease = [] - } else { - this.prerelease = m[4].split('.').map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num - } - } - return id - }) - } - - this.build = m[5] ? m[5].split('.') : [] - this.format() - } - - format () { - this.version = `${this.major}.${this.minor}.${this.patch}` - if (this.prerelease.length) { - this.version += `-${this.prerelease.join('.')}` - } - return this.version - } - - toString () { - return this.version - } - - compare (other) { - debug('SemVer.compare', this.version, this.options, other) - if (!(other instanceof SemVer)) { - if (typeof other === 'string' && other === this.version) { - return 0 - } - other = new SemVer(other, this.options) - } - - if (other.version === this.version) { - return 0 - } - - return this.compareMain(other) || this.comparePre(other) - } - - compareMain (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - return ( - compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch) - ) - } - - comparePre (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) { - return -1 - } else if (!this.prerelease.length && other.prerelease.length) { - return 1 - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0 - } - - let i = 0 - do { - const a = this.prerelease[i] - const b = other.prerelease[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - compareBuild (other) { - if (!(other instanceof SemVer)) { - other = new SemVer(other, this.options) - } - - let i = 0 - do { - const a = this.build[i] - const b = other.build[i] - debug('prerelease compare', i, a, b) - if (a === undefined && b === undefined) { - return 0 - } else if (b === undefined) { - return 1 - } else if (a === undefined) { - return -1 - } else if (a === b) { - continue - } else { - return compareIdentifiers(a, b) - } - } while (++i) - } - - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0 - this.patch = 0 - this.minor = 0 - this.major++ - this.inc('pre', identifier) - break - case 'preminor': - this.prerelease.length = 0 - this.patch = 0 - this.minor++ - this.inc('pre', identifier) - break - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0 - this.inc('patch', identifier) - this.inc('pre', identifier) - break - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) { - this.inc('patch', identifier) - } - this.inc('pre', identifier) - break - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if ( - this.minor !== 0 || - this.patch !== 0 || - this.prerelease.length === 0 - ) { - this.major++ - } - this.minor = 0 - this.patch = 0 - this.prerelease = [] - break - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++ - } - this.patch = 0 - this.prerelease = [] - break - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) { - this.patch++ - } - this.prerelease = [] - break - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) { - this.prerelease = [0] - } else { - let i = this.prerelease.length - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++ - i = -2 - } - } - if (i === -1) { - // didn't increment anything - this.prerelease.push(0) - } - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (compareIdentifiers(this.prerelease[0], identifier) === 0) { - if (isNaN(this.prerelease[1])) { - this.prerelease = [identifier, 0] - } - } else { - this.prerelease = [identifier, 0] - } - } - break - - default: - throw new Error(`invalid increment argument: ${release}`) - } - this.format() - this.raw = this.version - return this - } -} - -module.exports = SemVer - - -/***/ }), - -/***/ 688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(88) -const major = (a, loose) => new SemVer(a, loose).major -module.exports = major - - -/***/ }), - -/***/ 447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(88) -const minor = (a, loose) => new SemVer(a, loose).minor -module.exports = minor - - -/***/ }), - -/***/ 925: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { MAX_LENGTH } = __nccwpck_require__(293) -const { re, t } = __nccwpck_require__(523) -const SemVer = __nccwpck_require__(88) - -const parseOptions = __nccwpck_require__(785) -const parse = (version, options) => { - options = parseOptions(options) - - if (version instanceof SemVer) { - return version - } - - if (typeof version !== 'string') { - return null - } - - if (version.length > MAX_LENGTH) { - return null - } - - const r = options.loose ? re[t.LOOSE] : re[t.FULL] - if (!r.test(version)) { - return null - } - - try { - return new SemVer(version, options) - } catch (er) { - return null - } -} - -module.exports = parse - - -/***/ }), - -/***/ 866: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const SemVer = __nccwpck_require__(88) -const patch = (a, loose) => new SemVer(a, loose).patch -module.exports = patch - - -/***/ }), - -/***/ 14: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const parse = __nccwpck_require__(925) -const prerelease = (version, options) => { - const parsed = parse(version, options) - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null -} -module.exports = prerelease - - -/***/ }), - -/***/ 293: -/***/ ((module) => { - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -const SEMVER_SPEC_VERSION = '2.0.0' - -const MAX_LENGTH = 256 -const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || -/* istanbul ignore next */ 9007199254740991 - -// Max safe segment length for coercion. -const MAX_SAFE_COMPONENT_LENGTH = 16 - -module.exports = { - SEMVER_SPEC_VERSION, - MAX_LENGTH, - MAX_SAFE_INTEGER, - MAX_SAFE_COMPONENT_LENGTH, -} - - -/***/ }), - -/***/ 427: -/***/ ((module) => { - -const debug = ( - typeof process === 'object' && - process.env && - process.env.NODE_DEBUG && - /\bsemver\b/i.test(process.env.NODE_DEBUG) -) ? (...args) => console.error('SEMVER', ...args) - : () => {} - -module.exports = debug - - -/***/ }), - -/***/ 463: -/***/ ((module) => { - -const numeric = /^[0-9]+$/ -const compareIdentifiers = (a, b) => { - const anum = numeric.test(a) - const bnum = numeric.test(b) - - if (anum && bnum) { - a = +a - b = +b - } - - return a === b ? 0 - : (anum && !bnum) ? -1 - : (bnum && !anum) ? 1 - : a < b ? -1 - : 1 -} - -const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) - -module.exports = { - compareIdentifiers, - rcompareIdentifiers, -} - - -/***/ }), - -/***/ 785: -/***/ ((module) => { - -// parse out just the options we care about so we always get a consistent -// obj with keys in a consistent order. -const opts = ['includePrerelease', 'loose', 'rtl'] -const parseOptions = options => - !options ? {} - : typeof options !== 'object' ? { loose: true } - : opts.filter(k => options[k]).reduce((o, k) => { - o[k] = true - return o - }, {}) -module.exports = parseOptions - - -/***/ }), - -/***/ 523: -/***/ ((module, exports, __nccwpck_require__) => { - -const { MAX_SAFE_COMPONENT_LENGTH } = __nccwpck_require__(293) -const debug = __nccwpck_require__(427) -exports = module.exports = {} - -// The actual regexps go on exports.re -const re = exports.re = [] -const src = exports.src = [] -const t = exports.t = {} -let R = 0 - -const createToken = (name, value, isGlobal) => { - const index = R++ - debug(name, index, value) - t[name] = index - src[index] = value - re[index] = new RegExp(value, isGlobal ? 'g' : undefined) -} - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') - -// ## Main Version -// Three dot-separated numeric identifiers. - -createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})\\.` + - `(${src[t.NUMERICIDENTIFIER]})`) - -createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + - `(${src[t.NUMERICIDENTIFIERLOOSE]})`) - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] -}|${src[t.NONNUMERICIDENTIFIER]})`) - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] -}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) - -createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] -}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] -}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -createToken('FULLPLAIN', `v?${src[t.MAINVERSION] -}${src[t.PRERELEASE]}?${ - src[t.BUILD]}?`) - -createToken('FULL', `^${src[t.FULLPLAIN]}$`) - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] -}${src[t.PRERELEASELOOSE]}?${ - src[t.BUILD]}?`) - -createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) - -createToken('GTLT', '((?:<|>)?=?)') - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) -createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) - -createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + - `(?:${src[t.PRERELEASE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + - `(?:${src[t.PRERELEASELOOSE]})?${ - src[t.BUILD]}?` + - `)?)?`) - -createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) -createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -createToken('COERCE', `${'(^|[^\\d])' + - '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + - `(?:$|[^\\d])`) -createToken('COERCERTL', src[t.COERCE], true) - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -createToken('LONETILDE', '(?:~>?)') - -createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) -exports.tildeTrimReplace = '$1~' - -createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) -createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -createToken('LONECARET', '(?:\\^)') - -createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) -exports.caretTrimReplace = '$1^' - -createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) -createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) -createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] -}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) -exports.comparatorTrimReplace = '$1$2$3' - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAIN]})` + - `\\s*$`) - -createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + - `\\s+-\\s+` + - `(${src[t.XRANGEPLAINLOOSE]})` + - `\\s*$`) - -// Star ranges basically just allow anything at all. -createToken('STAR', '(<|>)?=?\\s*\\*') -// >=0.0.0 is like a star -createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$') -createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$') - - -/***/ }), - -/***/ 294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(219); - - -/***/ }), - -/***/ 219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(631); -var tls = __nccwpck_require__(16); -var http = __nccwpck_require__(605); -var https = __nccwpck_require__(211); -var events = __nccwpck_require__(614); -var assert = __nccwpck_require__(357); -var util = __nccwpck_require__(669); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 521: -/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { - -"use strict"; -// ESM COMPAT FLAG -__nccwpck_require__.r(__webpack_exports__); - -// EXPORTS -__nccwpck_require__.d(__webpack_exports__, { - "NIL": () => /* reexport */ nil, - "parse": () => /* reexport */ esm_node_parse, - "stringify": () => /* reexport */ esm_node_stringify, - "v1": () => /* reexport */ esm_node_v1, - "v3": () => /* reexport */ esm_node_v3, - "v4": () => /* reexport */ esm_node_v4, - "v5": () => /* reexport */ esm_node_v5, - "validate": () => /* reexport */ esm_node_validate, - "version": () => /* reexport */ esm_node_version -}); - -// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = require("crypto");; -var external_crypto_default = /*#__PURE__*/__nccwpck_require__.n(external_crypto_namespaceObject); - -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/rng.js - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - external_crypto_default().randomFillSync(rnds8Pool); - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/regex.js -/* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/validate.js - - -function validate(uuid) { - return typeof uuid === 'string' && regex.test(uuid); -} - -/* harmony default export */ const esm_node_validate = (validate); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/stringify.js - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!esm_node_validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -/* harmony default export */ const esm_node_stringify = (stringify); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v1.js - - // **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || esm_node_stringify(b); -} - -/* harmony default export */ const esm_node_v1 = (v1); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/parse.js - - -function parse(uuid) { - if (!esm_node_validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -/* harmony default export */ const esm_node_parse = (parse); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v35.js - - - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -/* harmony default export */ function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = esm_node_parse(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return esm_node_stringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/md5.js - - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return external_crypto_default().createHash('md5').update(bytes).digest(); -} - -/* harmony default export */ const esm_node_md5 = (md5); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v3.js - - -const v3 = v35('v3', 0x30, esm_node_md5); -/* harmony default export */ const esm_node_v3 = (v3); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v4.js - - - -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return esm_node_stringify(rnds); -} - -/* harmony default export */ const esm_node_v4 = (v4); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/sha1.js - - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return external_crypto_default().createHash('sha1').update(bytes).digest(); -} - -/* harmony default export */ const esm_node_sha1 = (sha1); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v5.js - - -const v5 = v35('v5', 0x50, esm_node_sha1); -/* harmony default export */ const esm_node_v5 = (v5); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/nil.js -/* harmony default export */ const nil = ('00000000-0000-0000-0000-000000000000'); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/version.js - - -function version(uuid) { - if (!esm_node_validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -/* harmony default export */ const esm_node_version = (version); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/index.js - - - - - - - - - - -/***/ }), - -/***/ 357: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert");; - -/***/ }), - -/***/ 129: -/***/ ((module) => { - -"use strict"; -module.exports = require("child_process");; - -/***/ }), - -/***/ 614: -/***/ ((module) => { - -"use strict"; -module.exports = require("events");; - -/***/ }), - -/***/ 747: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs");; - -/***/ }), - -/***/ 605: -/***/ ((module) => { - -"use strict"; -module.exports = require("http");; - -/***/ }), - -/***/ 211: -/***/ ((module) => { - -"use strict"; -module.exports = require("https");; - -/***/ }), - -/***/ 631: -/***/ ((module) => { - -"use strict"; -module.exports = require("net");; - -/***/ }), - -/***/ 87: -/***/ ((module) => { - -"use strict"; -module.exports = require("os");; - -/***/ }), - -/***/ 622: -/***/ ((module) => { - -"use strict"; -module.exports = require("path");; - -/***/ }), - -/***/ 16: -/***/ ((module) => { - -"use strict"; -module.exports = require("tls");; - -/***/ }), - -/***/ 669: -/***/ ((module) => { - -"use strict"; -module.exports = require("util");; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ if(__webpack_module_cache__[moduleId]) { -/******/ return __webpack_module_cache__[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __nccwpck_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => module['default'] : -/******/ () => module; -/******/ __nccwpck_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ -/******/ // module exports must be returned from runtime so entry inlining is disabled -/******/ // startup -/******/ // Load entry module and return exports -/******/ return __nccwpck_require__(855); -/******/ })() -; diff --git a/.github/scripts/buildActions.sh b/.github/scripts/buildActions.sh index 169efabcec72..df5c86b02ba8 100755 --- a/.github/scripts/buildActions.sh +++ b/.github/scripts/buildActions.sh @@ -11,7 +11,6 @@ ACTIONS_DIR="$(dirname "$(dirname "$0")")/actions/javascript" declare -r GITHUB_ACTIONS=( "$ACTIONS_DIR/awaitStagingDeploys/awaitStagingDeploys.js" "$ACTIONS_DIR/bumpVersion/bumpVersion.js" - "$ACTIONS_DIR/checkBundleVersionStringMatch/checkBundleVersionStringMatch.js" "$ACTIONS_DIR/checkDeployBlockers/checkDeployBlockers.js" "$ACTIONS_DIR/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.js" "$ACTIONS_DIR/getDeployPullRequestList/getDeployPullRequestList.js" diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index f9876f714f86..498b9f31cf56 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -114,12 +114,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - name: Check if ShortVersionString is up to date - id: isShortVersionStringUpdated - uses: Expensify/App/.github/actions/javascript/checkBundleVersionStringMatch@main - - name: Auto-assign PR if there are merge conflicts or if the bundle versions are mismatched - if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) || !fromJSON(steps.isShortVersionStringUpdated.outputs.BUNDLE_VERSIONS_MATCH) }} + if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) }} run: gh pr edit --add-label "Engineering,Hourly" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -140,16 +136,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - name: If PR has a bundle version mismatch, comment with the instructions for assignee - if: ${{ !fromJSON(steps.isShortVersionStringUpdated.outputs.BUNDLE_VERSIONS_MATCH) }} - run: | - gh pr comment --body \ - "The CFBundleShortVersionString value in this PR is not compatible with the CFBundleVersion, so cherry picking it will result in an iOS deploy failure. - Please manually resolve the mismatch, push your changes, and then request another reviewer to review and merge. - **Important:** This mismatch can be caused by a failed Update Protected Branch workflow followed by a manual CP, but please confirm the cause of the mismatch before updating any version numbers." - env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - name: Auto-approve the PR # Important: only auto-approve if there was no merge conflict! if: ${{ fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) }} From 7ee32c8eb770c2e4e6bbf00d53b4bac1578583f8 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 15:31:07 -0700 Subject: [PATCH 223/826] Only create pull request for cherrypick if theres a conflict --- .github/workflows/cherryPick.yml | 79 +++++++++----------------------- 1 file changed, 21 insertions(+), 58 deletions(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 498b9f31cf56..06da3e4ae67a 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -45,11 +45,6 @@ jobs: with: GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} - - name: Create branch for new pull request - run: | - git checkout -b ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }} - git push --set-upstream origin ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }} - - name: Get merge commit for CP pull request id: getCPMergeCommit uses: Expensify/App/.github/actions/javascript/getPullRequestDetails@main @@ -78,88 +73,56 @@ jobs: USER: OSBotify TITLE_REGEX: Update version to ${{ env.NEW_VERSION }} - - name: Cherry-pick the version-bump to new branch + - name: Cherry-pick the version-bump to staging run: | - git fetch + git fetch main git cherry-pick -S -x --mainline 1 --strategy=recursive -Xtheirs ${{ steps.getVersionBumpMergeCommit.outputs.MERGE_COMMIT_SHA }} - - name: Cherry-pick the merge commit of target PR to new branch + - name: Cherry-pick the merge commit of target PR id: cherryPick run: | echo "Attempting to cherry-pick ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}" if git cherry-pick -S -x --mainline 1 ${{ steps.getCPMergeCommit.outputs.MERGE_COMMIT_SHA }}; then echo "🎉 No conflicts! CP was a success, PR can be automerged 🎉" - echo "SHOULD_AUTOMERGE=true" >> "$GITHUB_OUTPUT" + echo "HAS_CONFLICTS=false" >> "$GITHUB_OUTPUT" else echo "😞 PR can't be automerged, there are merge conflicts in the following files:" git --no-pager diff --name-only --diff-filter=U git add . GIT_MERGE_AUTOEDIT=no git cherry-pick --continue - echo "SHOULD_AUTOMERGE=false" >> "$GITHUB_OUTPUT" + echo "HAS_CONFLICTS=true" >> "$GITHUB_OUTPUT" fi - - name: Push changes to CP branch - run: git push + - name: Push changes + run: | + if [[ ${{steps.cherryPick.outputs.HAS_CONFLICTS}} == 'true' ]]; then + git checkout -b ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }} + git push --set-upstream origin ${{ github.actor }}-cherry-pick-staging-${{ github.event.inputs.PULL_REQUEST_NUMBER }}-${{ github.run_attempt }} + else + git push origin staging + fi - - name: Create Pull Request + - name: Create Pull Request to manually finish CP + if: fromJSON(steps.cherryPick.output.hasConflicts) id: createPullRequest run: | gh pr create \ --title "🍒 Cherry pick PR #${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒" \ --body "🍒 Cherry pick https://github.com/Expensify/App/pull/${{ github.event.inputs.PULL_REQUEST_NUMBER }} to staging 🍒" \ - --label "automerge" \ + --label "Engineering,Hourly" \ --base "staging" sleep 5 - echo "PR_NUMBER=$(gh pr view --json 'number' --jq '.number')" >> "$GITHUB_OUTPUT" - env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - - name: Auto-assign PR if there are merge conflicts or if the bundle versions are mismatched - if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) }} - run: gh pr edit --add-label "Engineering,Hourly" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Assign the PR to the deployer - if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) }} - run: gh pr edit --add-assignee ${{ steps.getCPMergeCommit.outputs.MERGE_ACTOR }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: If PR has merge conflicts, comment with instructions for assignee - if: ${{ !fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) }} - run: | gh pr comment --body \ - "This pull request has merge conflicts and can not be automatically merged. :disappointed: - Please manually resolve the conflicts, push your changes, and then request another reviewer to review and merge. - **Important:** There may be conflicts that GitHub is not able to detect, so please _carefully_ review this pull request before approving." - env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - - name: Auto-approve the PR - # Important: only auto-approve if there was no merge conflict! - if: ${{ fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) }} - run: gh pr review --approve - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Check if pull request is mergeable - id: isPullRequestMergeable - uses: Expensify/App/.github/actions/javascript/isPullRequestMergeable@main - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PULL_REQUEST_NUMBER: ${{ steps.createPullRequest.outputs.pr_number }} - - - name: Auto-merge the PR - # Important: only auto-merge if there was no merge conflict and the PR is mergable (not blocked by a missing status check)! - if: ${{ fromJSON(steps.cherryPick.outputs.SHOULD_AUTOMERGE) && fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }} - run: gh pr merge ${{ steps.createPullRequest.outputs.pr_number }} --merge --delete-branch + "This pull request has merge conflicts and can not be automatically merged. :disappointed: + Please manually resolve the conflicts, push your changes, and then request another reviewer to review and merge. + **Important:** There may be conflicts that GitHub is not able to detect, so please _carefully_ review this pull request before approving." + gh pr edit --add-assignee "${{ github.actor }},${{ steps.getCPMergeCommit.outputs.MERGE_ACTOR }}" env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - name: 'Announces a CP failure in the #announce Slack room' uses: 8398a7/action-slack@v3 - if: ${{ failure() || !fromJSON(steps.isPullRequestMergeable.outputs.IS_MERGEABLE) }} + if: ${{ failure() }} with: status: custom custom_payload: | From 30826f0e5a756b8ff621d3d78b248646f4919d3a Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 15:41:39 -0700 Subject: [PATCH 224/826] Remove unused isPullRequestMergeable actione --- .../isPullRequestMergeable/action.yml | 15 - .../isPullRequestMergeable/index.js | 19047 ---------------- .../isPullRequestMergeable.js | 95 - .github/scripts/buildActions.sh | 1 - tests/unit/isPullRequestMergeableTest.js | 125 - 5 files changed, 19283 deletions(-) delete mode 100644 .github/actions/javascript/isPullRequestMergeable/action.yml delete mode 100644 .github/actions/javascript/isPullRequestMergeable/index.js delete mode 100644 .github/actions/javascript/isPullRequestMergeable/isPullRequestMergeable.js delete mode 100644 tests/unit/isPullRequestMergeableTest.js diff --git a/.github/actions/javascript/isPullRequestMergeable/action.yml b/.github/actions/javascript/isPullRequestMergeable/action.yml deleted file mode 100644 index dc1a3efcf657..000000000000 --- a/.github/actions/javascript/isPullRequestMergeable/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: 'Check if PR is mergeable' -description: "Github uses a background job to determine the mergeability of a PR, so this PR polls the GH API until the mergeability of a PR is resolved." -inputs: - PULL_REQUEST_NUMBER: - description: PR number - required: true - GITHUB_TOKEN: - description: "Github token for authentication" - required: true -outputs: - IS_MERGEABLE: - description: Whether or not the PR is mergeable -runs: - using: 'node16' - main: './index.js' diff --git a/.github/actions/javascript/isPullRequestMergeable/index.js b/.github/actions/javascript/isPullRequestMergeable/index.js deleted file mode 100644 index 01971aa8457f..000000000000 --- a/.github/actions/javascript/isPullRequestMergeable/index.js +++ /dev/null @@ -1,19047 +0,0 @@ -/** - * NOTE: This is a compiled file. DO NOT directly edit this file. - */ -module.exports = -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ 598: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const _ = __nccwpck_require__(3571); -const core = __nccwpck_require__(2186); -const GithubUtils = __nccwpck_require__(7999); -const {promiseWhile} = __nccwpck_require__(4502); - -const MAX_RETRIES = 30; -const THROTTLE_DURATION = process.env.NODE_ENV === 'test' ? 5 : 5000; - -const run = function () { - const pullRequestNumber = Number(core.getInput('PULL_REQUEST_NUMBER', {required: true})); - - let retryCount = 0; - let isMergeable = false; - let mergeabilityResolved = false; - console.log(`Checking the mergeability of PR #${pullRequestNumber}`); - return GithubUtils.octokit.pulls - .get({ - owner: GithubUtils.GITHUB_OWNER, - repo: GithubUtils.APP_REPO, - pull_number: pullRequestNumber, - }) - .then(({data}) => data.head.sha) - .then((headRef) => - promiseWhile( - () => !mergeabilityResolved && retryCount < MAX_RETRIES, - _.throttle( - () => - Promise.all([ - GithubUtils.octokit.pulls.get({ - owner: GithubUtils.GITHUB_OWNER, - repo: GithubUtils.APP_REPO, - pull_number: pullRequestNumber, - }), - GithubUtils.octokit.checks.listForRef({ - owner: GithubUtils.GITHUB_OWNER, - repo: GithubUtils.APP_REPO, - ref: headRef, - }), - ]) - .then(([prResponse, checksResponse]) => { - const mergeable = prResponse.data.mergeable; - const mergeableState = prResponse.data.mergeable_state; - const areChecksComplete = _.every(checksResponse.data.check_runs, (check) => check.status === 'completed'); - - if (_.isNull(mergeable)) { - console.log('Pull request mergeability is not yet resolved...'); - retryCount++; - return; - } - - if (_.isEmpty(mergeableState)) { - console.log('Pull request mergeable_state is not yet resolved...'); - retryCount++; - return; - } - - if (!areChecksComplete) { - console.log('Pull request checks are not yet complete...'); - retryCount++; - return; - } - - mergeabilityResolved = true; - console.log(`Merge information for #${pullRequestNumber} - mergeable: ${mergeable}, mergeable_state: ${mergeableState}`); - isMergeable = mergeable && mergeableState !== 'blocked'; - }) - .catch((githubError) => { - mergeabilityResolved = true; - console.error(`An error occurred fetching the PR from Github: ${JSON.stringify(githubError)}`); - core.setFailed(githubError); - }), - THROTTLE_DURATION, - ), - ), - ) - .then(() => { - if (retryCount >= MAX_RETRIES) { - console.error('Maximum retries reached, mergeability is undetermined, defaulting to false'); - } else { - console.log(`Pull request #${pullRequestNumber} is ${isMergeable ? '' : 'not '}mergeable`); - } - core.setOutput('IS_MERGEABLE', isMergeable); - }) - .catch((githubError) => { - mergeabilityResolved = true; - console.error(`An error occurred fetching the PR from Github: ${JSON.stringify(githubError)}`); - core.setFailed(githubError); - }); -}; - -if (require.main === require.cache[eval('__filename')]) { - run(); -} - -module.exports = run; - - -/***/ }), - -/***/ 7999: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const _ = __nccwpck_require__(3571); -const lodashGet = __nccwpck_require__(6908); -const core = __nccwpck_require__(2186); -const {GitHub, getOctokitOptions} = __nccwpck_require__(3030); -const {throttling} = __nccwpck_require__(9968); -const {paginateRest} = __nccwpck_require__(4193); - -const GITHUB_OWNER = 'Expensify'; -const APP_REPO = 'App'; -const APP_REPO_URL = 'https://github.com/Expensify/App'; - -const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)'); -const PULL_REQUEST_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`); -const ISSUE_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`); -const ISSUE_OR_PULL_REQUEST_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`); - -const APPLAUSE_BOT = 'applausebot'; -const STAGING_DEPLOY_CASH_LABEL = 'StagingDeployCash'; -const DEPLOY_BLOCKER_CASH_LABEL = 'DeployBlockerCash'; -const INTERNAL_QA_LABEL = 'InternalQA'; - -/** - * The standard rate in ms at which we'll poll the GitHub API to check for status changes. - * It's 10 seconds :) - * @type {number} - */ -const POLL_RATE = 10000; - -class GithubUtils { - /** - * Initialize internal octokit - * - * @private - */ - static initOctokit() { - const Octokit = GitHub.plugin(throttling, paginateRest); - const token = core.getInput('GITHUB_TOKEN', {required: true}); - - // Save a copy of octokit used in this class - this.internalOctokit = new Octokit( - getOctokitOptions(token, { - throttle: { - onRateLimit: (retryAfter, options) => { - console.warn(`Request quota exhausted for request ${options.method} ${options.url}`); - - // Retry once after hitting a rate limit error, then give up - if (options.request.retryCount <= 1) { - console.log(`Retrying after ${retryAfter} seconds!`); - return true; - } - }, - onAbuseLimit: (retryAfter, options) => { - // does not retry, only logs a warning - console.warn(`Abuse detected for request ${options.method} ${options.url}`); - }, - }, - }), - ); - } - - /** - * Either give an existing instance of Octokit rest or create a new one - * - * @readonly - * @static - * @memberof GithubUtils - */ - static get octokit() { - if (this.internalOctokit) { - return this.internalOctokit.rest; - } - this.initOctokit(); - return this.internalOctokit.rest; - } - - /** - * Either give an existing instance of Octokit paginate or create a new one - * - * @readonly - * @static - * @memberof GithubUtils - */ - static get paginate() { - if (this.internalOctokit) { - return this.internalOctokit.paginate; - } - this.initOctokit(); - return this.internalOctokit.paginate; - } - - /** - * Finds one open `StagingDeployCash` issue via GitHub octokit library. - * - * @returns {Promise} - */ - static getStagingDeployCash() { - return this.octokit.issues - .listForRepo({ - owner: GITHUB_OWNER, - repo: APP_REPO, - labels: STAGING_DEPLOY_CASH_LABEL, - state: 'open', - }) - .then(({data}) => { - if (!data.length) { - const error = new Error(`Unable to find ${STAGING_DEPLOY_CASH_LABEL} issue.`); - error.code = 404; - throw error; - } - - if (data.length > 1) { - const error = new Error(`Found more than one ${STAGING_DEPLOY_CASH_LABEL} issue.`); - error.code = 500; - throw error; - } - - return this.getStagingDeployCashData(data[0]); - }); - } - - /** - * Takes in a GitHub issue object and returns the data we want. - * - * @param {Object} issue - * @returns {Object} - */ - static getStagingDeployCashData(issue) { - try { - const versionRegex = new RegExp('([0-9]+)\\.([0-9]+)\\.([0-9]+)(?:-([0-9]+))?', 'g'); - const tag = issue.body.match(versionRegex)[0].replace(/`/g, ''); - return { - title: issue.title, - url: issue.url, - number: this.getIssueOrPullRequestNumberFromURL(issue.url), - labels: issue.labels, - PRList: this.getStagingDeployCashPRList(issue), - deployBlockers: this.getStagingDeployCashDeployBlockers(issue), - internalQAPRList: this.getStagingDeployCashInternalQA(issue), - isTimingDashboardChecked: /-\s\[x]\sI checked the \[App Timing Dashboard]/.test(issue.body), - isFirebaseChecked: /-\s\[x]\sI checked \[Firebase Crashlytics]/.test(issue.body), - isGHStatusChecked: /-\s\[x]\sI checked \[GitHub Status]/.test(issue.body), - tag, - }; - } catch (exception) { - throw new Error(`Unable to find ${STAGING_DEPLOY_CASH_LABEL} issue with correct data.`); - } - } - - /** - * Parse the PRList and Internal QA section of the StagingDeployCash issue body. - * - * @private - * - * @param {Object} issue - * @returns {Array} - [{url: String, number: Number, isVerified: Boolean}] - */ - static getStagingDeployCashPRList(issue) { - let PRListSection = issue.body.match(/pull requests:\*\*\r?\n((?:-.*\r?\n)+)\r?\n\r?\n?/) || []; - if (PRListSection.length !== 2) { - // No PRs, return an empty array - console.log('Hmmm...The open StagingDeployCash does not list any pull requests, continuing...'); - return []; - } - PRListSection = PRListSection[1]; - const PRList = _.map([...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))], (match) => ({ - url: match[2], - number: Number.parseInt(match[3], 10), - isVerified: match[1] === 'x', - })); - return _.sortBy(PRList, 'number'); - } - - /** - * Parse DeployBlocker section of the StagingDeployCash issue body. - * - * @private - * - * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] - */ - static getStagingDeployCashDeployBlockers(issue) { - let deployBlockerSection = issue.body.match(/Deploy Blockers:\*\*\r?\n((?:-.*\r?\n)+)/) || []; - if (deployBlockerSection.length !== 2) { - return []; - } - deployBlockerSection = deployBlockerSection[1]; - const deployBlockers = _.map([...deployBlockerSection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))], (match) => ({ - url: match[2], - number: Number.parseInt(match[3], 10), - isResolved: match[1] === 'x', - })); - return _.sortBy(deployBlockers, 'number'); - } - - /** - * Parse InternalQA section of the StagingDeployCash issue body. - * - * @private - * - * @param {Object} issue - * @returns {Array} - [{URL: String, number: Number, isResolved: Boolean}] - */ - static getStagingDeployCashInternalQA(issue) { - let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:- \[[ x]].*\r?\n)+)/) || []; - if (internalQASection.length !== 2) { - return []; - } - internalQASection = internalQASection[1]; - const internalQAPRs = _.map([...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${PULL_REQUEST_REGEX.source})`, 'g'))], (match) => ({ - url: match[2].split('-')[0].trim(), - number: Number.parseInt(match[3], 10), - isResolved: match[1] === 'x', - })); - return _.sortBy(internalQAPRs, 'number'); - } - - /** - * Generate the issue body for a StagingDeployCash. - * - * @param {String} tag - * @param {Array} PRList - The list of PR URLs which are included in this StagingDeployCash - * @param {Array} [verifiedPRList] - The list of PR URLs which have passed QA. - * @param {Array} [deployBlockers] - The list of DeployBlocker URLs. - * @param {Array} [resolvedDeployBlockers] - The list of DeployBlockers URLs which have been resolved. - * @param {Array} [resolvedInternalQAPRs] - The list of Internal QA PR URLs which have been resolved. - * @param {Boolean} [isTimingDashboardChecked] - * @param {Boolean} [isFirebaseChecked] - * @param {Boolean} [isGHStatusChecked] - * @returns {Promise} - */ - static generateStagingDeployCashBody( - tag, - PRList, - verifiedPRList = [], - deployBlockers = [], - resolvedDeployBlockers = [], - resolvedInternalQAPRs = [], - isTimingDashboardChecked = false, - isFirebaseChecked = false, - isGHStatusChecked = false, - ) { - return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) - .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - - // The format of this map is following: - // { - // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], - // 'https://github.com/Expensify/App/pull/9642': [ 'mountiny', 'kidroca' ] - // } - const internalQAPRMap = _.reduce( - _.filter(data, (pr) => !_.isEmpty(_.findWhere(pr.labels, {name: INTERNAL_QA_LABEL}))), - (map, pr) => { - // eslint-disable-next-line no-param-reassign - map[pr.html_url] = _.compact(_.pluck(pr.assignees, 'login')); - return map; - }, - {}, - ); - console.log('Found the following Internal QA PRs:', internalQAPRMap); - - const noQAPRs = _.pluck( - _.filter(data, (PR) => /\[No\s?QA]/i.test(PR.title)), - 'html_url', - ); - console.log('Found the following NO QA PRs:', noQAPRs); - const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); - const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); - - // Tag version and comparison URL - // eslint-disable-next-line max-len - let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/App/compare/production...staging\r\n`; - - // PR list - if (!_.isEmpty(sortedPRList)) { - issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n'; - _.each(sortedPRList, (URL) => { - issueBody += _.contains(verifiedOrNoQAPRs, URL) ? '- [x]' : '- [ ]'; - issueBody += ` ${URL}\r\n`; - }); - issueBody += '\r\n\r\n'; - } - - // Internal QA PR list - if (!_.isEmpty(internalQAPRMap)) { - console.log('Found the following verified Internal QA PRs:', resolvedInternalQAPRs); - issueBody += '**Internal QA:**\r\n'; - _.each(internalQAPRMap, (assignees, URL) => { - const assigneeMentions = _.reduce(assignees, (memo, assignee) => `${memo} @${assignee}`, ''); - issueBody += `${_.contains(resolvedInternalQAPRs, URL) ? '- [x]' : '- [ ]'} `; - issueBody += `${URL}`; - issueBody += ` -${assigneeMentions}`; - issueBody += '\r\n'; - }); - issueBody += '\r\n\r\n'; - } - - // Deploy blockers - if (!_.isEmpty(deployBlockers)) { - issueBody += '**Deploy Blockers:**\r\n'; - _.each(sortedDeployBlockers, (URL) => { - issueBody += _.contains(resolvedDeployBlockers, URL) ? '- [x] ' : '- [ ] '; - issueBody += URL; - issueBody += '\r\n'; - }); - issueBody += '\r\n\r\n'; - } - - issueBody += '**Deployer verifications:**'; - // eslint-disable-next-line max-len - issueBody += `\r\n- [${ - isTimingDashboardChecked ? 'x' : ' ' - }] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`; - // eslint-disable-next-line max-len - issueBody += `\r\n- [${ - isFirebaseChecked ? 'x' : ' ' - }] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).`; - // eslint-disable-next-line max-len - issueBody += `\r\n- [${isGHStatusChecked ? 'x' : ' '}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.`; - - issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; - return issueBody; - }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); - } - - /** - * Fetch all pull requests given a list of PR numbers. - * - * @param {Array} pullRequestNumbers - * @returns {Promise} - */ - static fetchAllPullRequests(pullRequestNumbers) { - const oldestPR = _.first(_.sortBy(pullRequestNumbers)); - return this.paginate( - this.octokit.pulls.list, - { - owner: GITHUB_OWNER, - repo: APP_REPO, - state: 'all', - sort: 'created', - direction: 'desc', - per_page: 100, - }, - ({data}, done) => { - if (_.find(data, (pr) => pr.number === oldestPR)) { - done(); - } - return data; - }, - ) - .then((prList) => _.filter(prList, (pr) => _.contains(pullRequestNumbers, pr.number))) - .catch((err) => console.error('Failed to get PR list', err)); - } - - /** - * @param {Number} pullRequestNumber - * @returns {Promise} - */ - static getPullRequestBody(pullRequestNumber) { - return this.octokit.pulls - .get({ - owner: GITHUB_OWNER, - repo: APP_REPO, - pull_number: pullRequestNumber, - }) - .then(({data: pullRequestComment}) => pullRequestComment.body); - } - - /** - * @param {Number} pullRequestNumber - * @returns {Promise} - */ - static getAllReviewComments(pullRequestNumber) { - return this.paginate( - this.octokit.pulls.listReviews, - { - owner: GITHUB_OWNER, - repo: APP_REPO, - pull_number: pullRequestNumber, - per_page: 100, - }, - (response) => _.map(response.data, (review) => review.body), - ); - } - - /** - * @param {Number} issueNumber - * @returns {Promise} - */ - static getAllComments(issueNumber) { - return this.paginate( - this.octokit.issues.listComments, - { - owner: GITHUB_OWNER, - repo: APP_REPO, - issue_number: issueNumber, - per_page: 100, - }, - (response) => _.map(response.data, (comment) => comment.body), - ); - } - - /** - * Create comment on pull request - * - * @param {String} repo - The repo to search for a matching pull request or issue number - * @param {Number} number - The pull request or issue number - * @param {String} messageBody - The comment message - * @returns {Promise} - */ - static createComment(repo, number, messageBody) { - console.log(`Writing comment on #${number}`); - return this.octokit.issues.createComment({ - owner: GITHUB_OWNER, - repo, - issue_number: number, - body: messageBody, - }); - } - - /** - * Get the most recent workflow run for the given New Expensify workflow. - * - * @param {String} workflow - * @returns {Promise} - */ - static getLatestWorkflowRunID(workflow) { - console.log(`Fetching New Expensify workflow runs for ${workflow}...`); - return this.octokit.actions - .listWorkflowRuns({ - owner: GITHUB_OWNER, - repo: APP_REPO, - workflow_id: workflow, - }) - .then((response) => lodashGet(response, 'data.workflow_runs[0].id')); - } - - /** - * Generate the well-formatted body of a production release. - * - * @param {Array} pullRequests - * @returns {String} - */ - static getReleaseBody(pullRequests) { - return _.map(pullRequests, (number) => `- ${this.getPullRequestURLFromNumber(number)}`).join('\r\n'); - } - - /** - * Generate the URL of an New Expensify pull request given the PR number. - * - * @param {Number} number - * @returns {String} - */ - static getPullRequestURLFromNumber(number) { - return `${APP_REPO_URL}/pull/${number}`; - } - - /** - * Parse the pull request number from a URL. - * - * @param {String} URL - * @returns {Number} - * @throws {Error} If the URL is not a valid Github Pull Request. - */ - static getPullRequestNumberFromURL(URL) { - const matches = URL.match(PULL_REQUEST_REGEX); - if (!_.isArray(matches) || matches.length !== 2) { - throw new Error(`Provided URL ${URL} is not a Github Pull Request!`); - } - return Number.parseInt(matches[1], 10); - } - - /** - * Parse the issue number from a URL. - * - * @param {String} URL - * @returns {Number} - * @throws {Error} If the URL is not a valid Github Issue. - */ - static getIssueNumberFromURL(URL) { - const matches = URL.match(ISSUE_REGEX); - if (!_.isArray(matches) || matches.length !== 2) { - throw new Error(`Provided URL ${URL} is not a Github Issue!`); - } - return Number.parseInt(matches[1], 10); - } - - /** - * Parse the issue or pull request number from a URL. - * - * @param {String} URL - * @returns {Number} - * @throws {Error} If the URL is not a valid Github Issue or Pull Request. - */ - static getIssueOrPullRequestNumberFromURL(URL) { - const matches = URL.match(ISSUE_OR_PULL_REQUEST_REGEX); - if (!_.isArray(matches) || matches.length !== 2) { - throw new Error(`Provided URL ${URL} is not a valid Github Issue or Pull Request!`); - } - return Number.parseInt(matches[1], 10); - } - - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), 'OSBotify'); - } - - /** - * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. - * - * @param {Number} issueNumber - * @returns {Promise} - */ - static getActorWhoClosedIssue(issueNumber) { - return this.paginate(this.octokit.issues.listEvents, { - owner: GITHUB_OWNER, - repo: APP_REPO, - issue_number: issueNumber, - per_page: 100, - }) - .then((events) => _.filter(events, (event) => event.event === 'closed')) - .then((closedEvents) => lodashGet(_.last(closedEvents), 'actor.login', '')); - } -} - -module.exports = GithubUtils; -module.exports.GITHUB_OWNER = GITHUB_OWNER; -module.exports.APP_REPO = APP_REPO; -module.exports.APP_REPO_URL = APP_REPO_URL; -module.exports.STAGING_DEPLOY_CASH_LABEL = STAGING_DEPLOY_CASH_LABEL; -module.exports.DEPLOY_BLOCKER_CASH_LABEL = DEPLOY_BLOCKER_CASH_LABEL; -module.exports.APPLAUSE_BOT = APPLAUSE_BOT; -module.exports.ISSUE_OR_PULL_REQUEST_REGEX = ISSUE_OR_PULL_REQUEST_REGEX; -module.exports.POLL_RATE = POLL_RATE; - - -/***/ }), - -/***/ 4502: -/***/ ((module) => { - -/** - * Simulates a while loop where the condition is determined by the result of a Promise. - * - * @param {Function} condition - * @param {Function} action - * @returns {Promise} - */ -function promiseWhile(condition, action) { - return new Promise((resolve, reject) => { - const loop = function () { - if (!condition()) { - resolve(); - } else { - Promise.resolve(action()).then(loop).catch(reject); - } - }; - loop(); - }); -} - -/** - * Simulates a do-while loop where the condition is determined by the result of a Promise. - * - * @param {Function} condition - * @param {Function} action - * @returns {Promise} - */ -function promiseDoWhile(condition, action) { - return new Promise((resolve, reject) => { - action() - .then(() => promiseWhile(condition, action)) - .then(() => resolve()) - .catch(reject); - }); -} - -module.exports = { - promiseWhile, - promiseDoWhile, -}; - - -/***/ }), - -/***/ 7351: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.issue = exports.issueCommand = void 0; -const os = __importStar(__nccwpck_require__(2087)); -const utils_1 = __nccwpck_require__(5278); -/** - * Commands - * - * Command Format: - * ::name key=value,key=value::message - * - * Examples: - * ::warning::This is the message - * ::set-env name=MY_VAR::some value - */ -function issueCommand(command, properties, message) { - const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); -} -exports.issueCommand = issueCommand; -function issue(name, message = '') { - issueCommand(name, {}, message); -} -exports.issue = issue; -const CMD_STRING = '::'; -class Command { - constructor(command, properties, message) { - if (!command) { - command = 'missing.command'; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += ' '; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } - else { - cmdStr += ','; - } - cmdStr += `${key}=${escapeProperty(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING}${escapeData(this.message)}`; - return cmdStr; - } -} -function escapeData(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A'); -} -function escapeProperty(s) { - return utils_1.toCommandValue(s) - .replace(/%/g, '%25') - .replace(/\r/g, '%0D') - .replace(/\n/g, '%0A') - .replace(/:/g, '%3A') - .replace(/,/g, '%2C'); -} -//# sourceMappingURL=command.js.map - -/***/ }), - -/***/ 2186: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(7351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(5278); -const os = __importStar(__nccwpck_require__(2087)); -const path = __importStar(__nccwpck_require__(5622)); -const oidc_utils_1 = __nccwpck_require__(8041); -/** - * The code to exit an action - */ -var ExitCode; -(function (ExitCode) { - /** - * A code indicating that the action was successful - */ - ExitCode[ExitCode["Success"] = 0] = "Success"; - /** - * A code indicating that the action was a failure - */ - ExitCode[ExitCode["Failure"] = 1] = "Failure"; -})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); -//----------------------------------------------------------------------- -// Variables -//----------------------------------------------------------------------- -/** - * Sets env variable for this action and future actions in the job - * @param name the name of the variable to set - * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function exportVariable(name, val) { - const convertedVal = utils_1.toCommandValue(val); - process.env[name] = convertedVal; - const filePath = process.env['GITHUB_ENV'] || ''; - if (filePath) { - return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); - } - command_1.issueCommand('set-env', { name }, convertedVal); -} -exports.exportVariable = exportVariable; -/** - * Registers a secret which will get masked from logs - * @param secret value of the secret - */ -function setSecret(secret) { - command_1.issueCommand('add-mask', {}, secret); -} -exports.setSecret = setSecret; -/** - * Prepends inputPath to the PATH (for this action and future actions) - * @param inputPath - */ -function addPath(inputPath) { - const filePath = process.env['GITHUB_PATH'] || ''; - if (filePath) { - file_command_1.issueFileCommand('PATH', inputPath); - } - else { - command_1.issueCommand('add-path', {}, inputPath); - } - process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; -} -exports.addPath = addPath; -/** - * Gets the value of an input. - * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. - * Returns an empty string if the value is not defined. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string - */ -function getInput(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); -} -exports.getInput = getInput; -/** - * Gets the values of an multiline input. Each value is also trimmed. - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns string[] - * - */ -function getMultilineInput(name, options) { - const inputs = getInput(name, options) - .split('\n') - .filter(x => x !== ''); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map(input => input.trim()); -} -exports.getMultilineInput = getMultilineInput; -/** - * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. - * Support boolean input list: `true | True | TRUE | false | False | FALSE` . - * The return value is also in boolean type. - * ref: https://yaml.org/spec/1.2/spec.html#id2804923 - * - * @param name name of the input to get - * @param options optional. See InputOptions. - * @returns boolean - */ -function getBooleanInput(name, options) { - const trueValue = ['true', 'True', 'TRUE']; - const falseValue = ['false', 'False', 'FALSE']; - const val = getInput(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + - `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); -} -exports.getBooleanInput = getBooleanInput; -/** - * Sets the value of an output. - * - * @param name name of the output to set - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function setOutput(name, value) { - const filePath = process.env['GITHUB_OUTPUT'] || ''; - if (filePath) { - return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); - } - process.stdout.write(os.EOL); - command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); -} -exports.setOutput = setOutput; -/** - * Enables or disables the echoing of commands into stdout for the rest of the step. - * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. - * - */ -function setCommandEcho(enabled) { - command_1.issue('echo', enabled ? 'on' : 'off'); -} -exports.setCommandEcho = setCommandEcho; -//----------------------------------------------------------------------- -// Results -//----------------------------------------------------------------------- -/** - * Sets the action status to failed. - * When the action exits it will be with an exit code of 1 - * @param message add error issue message - */ -function setFailed(message) { - process.exitCode = ExitCode.Failure; - error(message); -} -exports.setFailed = setFailed; -//----------------------------------------------------------------------- -// Logging Commands -//----------------------------------------------------------------------- -/** - * Gets whether Actions Step Debug is on or not - */ -function isDebug() { - return process.env['RUNNER_DEBUG'] === '1'; -} -exports.isDebug = isDebug; -/** - * Writes debug message to user log - * @param message debug message - */ -function debug(message) { - command_1.issueCommand('debug', {}, message); -} -exports.debug = debug; -/** - * Adds an error issue - * @param message error issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function error(message, properties = {}) { - command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.error = error; -/** - * Adds a warning issue - * @param message warning issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function warning(message, properties = {}) { - command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.warning = warning; -/** - * Adds a notice issue - * @param message notice issue message. Errors will be converted to string via toString() - * @param properties optional properties to add to the annotation. - */ -function notice(message, properties = {}) { - command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); -} -exports.notice = notice; -/** - * Writes info to log with console.log. - * @param message info message - */ -function info(message) { - process.stdout.write(message + os.EOL); -} -exports.info = info; -/** - * Begin an output group. - * - * Output until the next `groupEnd` will be foldable in this group - * - * @param name The name of the output group - */ -function startGroup(name) { - command_1.issue('group', name); -} -exports.startGroup = startGroup; -/** - * End an output group. - */ -function endGroup() { - command_1.issue('endgroup'); -} -exports.endGroup = endGroup; -/** - * Wrap an asynchronous function call in a group. - * - * Returns the same type as the function itself. - * - * @param name The name of the group - * @param fn The function to wrap in the group - */ -function group(name, fn) { - return __awaiter(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } - finally { - endGroup(); - } - return result; - }); -} -exports.group = group; -//----------------------------------------------------------------------- -// Wrapper action state -//----------------------------------------------------------------------- -/** - * Saves state for current action, the state can only be retrieved by this action's post job execution. - * - * @param name name of the state to store - * @param value value to store. Non-string values will be converted to a string via JSON.stringify - */ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -function saveState(name, value) { - const filePath = process.env['GITHUB_STATE'] || ''; - if (filePath) { - return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); - } - command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); -} -exports.saveState = saveState; -/** - * Gets the value of an state set by this action's main execution. - * - * @param name name of the state to get - * @returns string - */ -function getState(name) { - return process.env[`STATE_${name}`] || ''; -} -exports.getState = getState; -function getIDToken(aud) { - return __awaiter(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); -} -exports.getIDToken = getIDToken; -/** - * Summary exports - */ -var summary_1 = __nccwpck_require__(1327); -Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); -/** - * @deprecated use core.summary - */ -var summary_2 = __nccwpck_require__(1327); -Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); -/** - * Path exports - */ -var path_utils_1 = __nccwpck_require__(2981); -Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); -Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); -Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); -//# sourceMappingURL=core.js.map - -/***/ }), - -/***/ 717: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -// For internal use, subject to change. -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -const fs = __importStar(__nccwpck_require__(5747)); -const os = __importStar(__nccwpck_require__(2087)); -const uuid_1 = __nccwpck_require__(9521); -const utils_1 = __nccwpck_require__(5278); -function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }); -} -exports.issueFileCommand = issueFileCommand; -function prepareKeyValueMessage(key, value) { - const delimiter = `ghadelimiter_${uuid_1.v4()}`; - const convertedValue = utils_1.toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); - } - if (convertedValue.includes(delimiter)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); - } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; -} -exports.prepareKeyValueMessage = prepareKeyValueMessage; -//# sourceMappingURL=file-command.js.map - -/***/ }), - -/***/ 8041: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(6255); -const auth_1 = __nccwpck_require__(5526); -const core_1 = __nccwpck_require__(2186); -class OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; - if (!token) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; - if (!runtimeUrl) { - throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); - } - return runtimeUrl; - } - static getCall(id_token_url) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - const httpclient = OidcClient.createHttpClient(); - const res = yield httpclient - .getJson(id_token_url) - .catch(error => { - throw new Error(`Failed to get ID Token. \n - Error Code : ${error.statusCode}\n - Error Message: ${error.result.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error('Response json body do not have ID Token field'); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter(this, void 0, void 0, function* () { - try { - // New ID Token is requested from action service - let id_token_url = OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - core_1.debug(`ID token url is ${id_token_url}`); - const id_token = yield OidcClient.getCall(id_token_url); - core_1.setSecret(id_token); - return id_token; - } - catch (error) { - throw new Error(`Error message: ${error.message}`); - } - }); - } -} -exports.OidcClient = OidcClient; -//# sourceMappingURL=oidc-utils.js.map - -/***/ }), - -/***/ 2981: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; -const path = __importStar(__nccwpck_require__(5622)); -/** - * toPosixPath converts the given path to the posix form. On Windows, \\ will be - * replaced with /. - * - * @param pth. Path to transform. - * @return string Posix path. - */ -function toPosixPath(pth) { - return pth.replace(/[\\]/g, '/'); -} -exports.toPosixPath = toPosixPath; -/** - * toWin32Path converts the given path to the win32 form. On Linux, / will be - * replaced with \\. - * - * @param pth. Path to transform. - * @return string Win32 path. - */ -function toWin32Path(pth) { - return pth.replace(/[/]/g, '\\'); -} -exports.toWin32Path = toWin32Path; -/** - * toPlatformPath converts the given path to a platform-specific path. It does - * this by replacing instances of / and \ with the platform-specific path - * separator. - * - * @param pth The path to platformize. - * @return string The platform-specific path. - */ -function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path.sep); -} -exports.toPlatformPath = toPlatformPath; -//# sourceMappingURL=path-utils.js.map - -/***/ }), - -/***/ 1327: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; -const os_1 = __nccwpck_require__(2087); -const fs_1 = __nccwpck_require__(5747); -const { access, appendFile, writeFile } = fs_1.promises; -exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; -exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; -class Summary { - constructor() { - this._buffer = ''; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } - catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs) - .map(([key, value]) => ` ${key}="${value}"`) - .join(''); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile : appendFile; - yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ''; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, (lang && { lang })); - const element = this.wrap('pre', this.wrap('code', code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? 'ol' : 'ul'; - const listItems = items.map(item => this.wrap('li', item)).join(''); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows - .map(row => { - const cells = row - .map(cell => { - if (typeof cell === 'string') { - return this.wrap('td', cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? 'th' : 'td'; - const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); - return this.wrap(tag, data, attrs); - }) - .join(''); - return this.wrap('tr', cells); - }) - .join(''); - const element = this.wrap('table', tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap('details', this.wrap('summary', label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); - const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) - ? tag - : 'h1'; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap('hr', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap('br', null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, (cite && { cite })); - const element = this.wrap('blockquote', text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap('a', text, { href }); - return this.addRaw(element).addEOL(); - } -} -const _summary = new Summary(); -/** - * @deprecated use `core.summary` - */ -exports.markdownSummary = _summary; -exports.summary = _summary; -//# sourceMappingURL=summary.js.map - -/***/ }), - -/***/ 5278: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -// We use any as a valid input type -/* eslint-disable @typescript-eslint/no-explicit-any */ -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toCommandProperties = exports.toCommandValue = void 0; -/** - * Sanitizes an input into a string so it can be passed into issueCommand safely - * @param input input to sanitize into a string - */ -function toCommandValue(input) { - if (input === null || input === undefined) { - return ''; - } - else if (typeof input === 'string' || input instanceof String) { - return input; - } - return JSON.stringify(input); -} -exports.toCommandValue = toCommandValue; -/** - * - * @param annotationProperties - * @returns The command properties to send with the actual annotation command - * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 - */ -function toCommandProperties(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; -} -exports.toCommandProperties = toCommandProperties; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 4087: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.Context = void 0; -const fs_1 = __nccwpck_require__(5747); -const os_1 = __nccwpck_require__(2087); -class Context { - /** - * Hydrate the context from the environment - */ - constructor() { - var _a, _b, _c; - this.payload = {}; - if (process.env.GITHUB_EVENT_PATH) { - if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); - } - else { - const path = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); - } - } - this.eventName = process.env.GITHUB_EVENT_NAME; - this.sha = process.env.GITHUB_SHA; - this.ref = process.env.GITHUB_REF; - this.workflow = process.env.GITHUB_WORKFLOW; - this.action = process.env.GITHUB_ACTION; - this.actor = process.env.GITHUB_ACTOR; - this.job = process.env.GITHUB_JOB; - this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); - this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); - this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; - this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; - this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; - } - get issue() { - const payload = this.payload; - return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); - } - get repo() { - if (process.env.GITHUB_REPOSITORY) { - const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); - return { owner, repo }; - } - if (this.payload.repository) { - return { - owner: this.payload.repository.owner.login, - repo: this.payload.repository.name - }; - } - throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); - } -} -exports.Context = Context; -//# sourceMappingURL=context.js.map - -/***/ }), - -/***/ 7914: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; -const httpClient = __importStar(__nccwpck_require__(6255)); -function getAuthString(token, options) { - if (!token && !options.auth) { - throw new Error('Parameter token or opts.auth is required'); - } - else if (token && options.auth) { - throw new Error('Parameters token and opts.auth may not both be specified'); - } - return typeof options.auth === 'string' ? options.auth : `token ${token}`; -} -exports.getAuthString = getAuthString; -function getProxyAgent(destinationUrl) { - const hc = new httpClient.HttpClient(); - return hc.getAgent(destinationUrl); -} -exports.getProxyAgent = getProxyAgent; -function getApiBaseUrl() { - return process.env['GITHUB_API_URL'] || 'https://api.github.com'; -} -exports.getApiBaseUrl = getApiBaseUrl; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 3030: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; -const Context = __importStar(__nccwpck_require__(4087)); -const Utils = __importStar(__nccwpck_require__(7914)); -// octokit + plugins -const core_1 = __nccwpck_require__(8525); -const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044); -const plugin_paginate_rest_1 = __nccwpck_require__(8945); -exports.context = new Context.Context(); -const baseUrl = Utils.getApiBaseUrl(); -exports.defaults = { - baseUrl, - request: { - agent: Utils.getProxyAgent(baseUrl) - } -}; -exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults); -/** - * Convience function to correctly format Octokit Options to pass into the constructor. - * - * @param token the repo PAT or GITHUB_TOKEN - * @param options other options to set - */ -function getOctokitOptions(token, options) { - const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller - // Auth - const auth = Utils.getAuthString(token, opts); - if (auth) { - opts.auth = auth; - } - return opts; -} -exports.getOctokitOptions = getOctokitOptions; -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ 673: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; -const REGEX_IS_INSTALLATION = /^ghs_/; -const REGEX_IS_USER_TO_SERVER = /^ghu_/; -async function auth(token) { - const isApp = token.split(/\./).length === 3; - const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); - const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); - const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; - return { - type: "token", - token: token, - tokenType - }; -} - -/** - * Prefix token for usage in the Authorization header - * - * @param token OAuth token or JSON Web Token - */ -function withAuthorizationPrefix(token) { - if (token.split(/\./).length === 3) { - return `bearer ${token}`; - } - - return `token ${token}`; -} - -async function hook(token, request, route, parameters) { - const endpoint = request.endpoint.merge(route, parameters); - endpoint.headers.authorization = withAuthorizationPrefix(token); - return request(endpoint); -} - -const createTokenAuth = function createTokenAuth(token) { - if (!token) { - throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); - } - - if (typeof token !== "string") { - throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); - } - - token = token.replace(/^(token|bearer) +/i, ""); - return Object.assign(auth.bind(null, token), { - hook: hook.bind(null, token) - }); -}; - -exports.createTokenAuth = createTokenAuth; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 8525: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var universalUserAgent = __nccwpck_require__(5030); -var beforeAfterHook = __nccwpck_require__(3682); -var request = __nccwpck_require__(9353); -var graphql = __nccwpck_require__(6422); -var authToken = __nccwpck_require__(673); - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _objectWithoutProperties(source, excluded) { - if (source == null) return {}; - - var target = _objectWithoutPropertiesLoose(source, excluded); - - var key, i; - - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - - for (i = 0; i < sourceSymbolKeys.length; i++) { - key = sourceSymbolKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; - target[key] = source[key]; - } - } - - return target; -} - -const VERSION = "3.6.0"; - -const _excluded = ["authStrategy"]; -class Octokit { - constructor(options = {}) { - const hook = new beforeAfterHook.Collection(); - const requestDefaults = { - baseUrl: request.request.endpoint.DEFAULTS.baseUrl, - headers: {}, - request: Object.assign({}, options.request, { - // @ts-ignore internal usage only, no need to type - hook: hook.bind(null, "request") - }), - mediaType: { - previews: [], - format: "" - } - }; // prepend default user agent with `options.userAgent` if set - - requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" "); - - if (options.baseUrl) { - requestDefaults.baseUrl = options.baseUrl; - } - - if (options.previews) { - requestDefaults.mediaType.previews = options.previews; - } - - if (options.timeZone) { - requestDefaults.headers["time-zone"] = options.timeZone; - } - - this.request = request.request.defaults(requestDefaults); - this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults); - this.log = Object.assign({ - debug: () => {}, - info: () => {}, - warn: console.warn.bind(console), - error: console.error.bind(console) - }, options.log); - this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance - // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. - // (2) If only `options.auth` is set, use the default token authentication strategy. - // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. - // TODO: type `options.auth` based on `options.authStrategy`. - - if (!options.authStrategy) { - if (!options.auth) { - // (1) - this.auth = async () => ({ - type: "unauthenticated" - }); - } else { - // (2) - const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯ - - hook.wrap("request", auth.hook); - this.auth = auth; - } - } else { - const { - authStrategy - } = options, - otherOptions = _objectWithoutProperties(options, _excluded); - - const auth = authStrategy(Object.assign({ - request: this.request, - log: this.log, - // we pass the current octokit instance as well as its constructor options - // to allow for authentication strategies that return a new octokit instance - // that shares the same internal state as the current one. The original - // requirement for this was the "event-octokit" authentication strategy - // of https://github.com/probot/octokit-auth-probot. - octokit: this, - octokitOptions: otherOptions - }, options.auth)); // @ts-ignore ¯\_(ツ)_/¯ - - hook.wrap("request", auth.hook); - this.auth = auth; - } // apply plugins - // https://stackoverflow.com/a/16345172 - - - const classConstructor = this.constructor; - classConstructor.plugins.forEach(plugin => { - Object.assign(this, plugin(this, options)); - }); - } - - static defaults(defaults) { - const OctokitWithDefaults = class extends this { - constructor(...args) { - const options = args[0] || {}; - - if (typeof defaults === "function") { - super(defaults(options)); - return; - } - - super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null)); - } - - }; - return OctokitWithDefaults; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - - - static plugin(...newPlugins) { - var _a; - - const currentPlugins = this.plugins; - const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a); - return NewOctokit; - } - -} -Octokit.VERSION = VERSION; -Octokit.plugins = []; - -exports.Octokit = Octokit; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 8713: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var isPlainObject = __nccwpck_require__(3287); -var universalUserAgent = __nccwpck_require__(5030); - -function lowercaseKeys(object) { - if (!object) { - return {}; - } - - return Object.keys(object).reduce((newObj, key) => { - newObj[key.toLowerCase()] = object[key]; - return newObj; - }, {}); -} - -function mergeDeep(defaults, options) { - const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject.isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { - [key]: options[key] - });else result[key] = mergeDeep(defaults[key], options[key]); - } else { - Object.assign(result, { - [key]: options[key] - }); - } - }); - return result; -} - -function removeUndefinedProperties(obj) { - for (const key in obj) { - if (obj[key] === undefined) { - delete obj[key]; - } - } - - return obj; -} - -function merge(defaults, route, options) { - if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { - method, - url - } : { - url: method - }, options); - } else { - options = Object.assign({}, route); - } // lowercase header names before merging with defaults to avoid duplicates - - - options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging - - removeUndefinedProperties(options); - removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten - - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); - } - - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); - return mergedOptions; -} - -function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; - const names = Object.keys(parameters); - - if (names.length === 0) { - return url; - } - - return url + separator + names.map(name => { - if (name === "q") { - return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); - } - - return `${name}=${encodeURIComponent(parameters[name])}`; - }).join("&"); -} - -const urlVariableRegex = /\{[^}]+\}/g; - -function removeNonChars(variableName) { - return variableName.replace(/^\W+|\W+$/g, "").split(/,/); -} - -function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); - - if (!matches) { - return []; - } - - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); -} - -function omit(object, keysToOmit) { - return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); -} - -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* istanbul ignore file */ -function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { - if (!/%[0-9A-Fa-f]/.test(part)) { - part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); - } - - return part; - }).join(""); -} - -function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { - return "%" + c.charCodeAt(0).toString(16).toUpperCase(); - }); -} - -function encodeValue(operator, value, key) { - value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - - if (key) { - return encodeUnreserved(key) + "=" + value; - } else { - return value; - } -} - -function isDefined(value) { - return value !== undefined && value !== null; -} - -function isKeyOperator(operator) { - return operator === ";" || operator === "&" || operator === "?"; -} - -function getValues(context, operator, key, modifier) { - var value = context[key], - result = []; - - if (isDefined(value) && value !== "") { - if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { - value = value.toString(); - - if (modifier && modifier !== "*") { - value = value.substring(0, parseInt(modifier, 10)); - } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - } else { - if (modifier === "*") { - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - result.push(encodeValue(operator, value[k], k)); - } - }); - } - } else { - const tmp = []; - - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); - }); - } else { - Object.keys(value).forEach(function (k) { - if (isDefined(value[k])) { - tmp.push(encodeUnreserved(k)); - tmp.push(encodeValue(operator, value[k].toString())); - } - }); - } - - if (isKeyOperator(operator)) { - result.push(encodeUnreserved(key) + "=" + tmp.join(",")); - } else if (tmp.length !== 0) { - result.push(tmp.join(",")); - } - } - } - } else { - if (operator === ";") { - if (isDefined(value)) { - result.push(encodeUnreserved(key)); - } - } else if (value === "" && (operator === "&" || operator === "?")) { - result.push(encodeUnreserved(key) + "="); - } else if (value === "") { - result.push(""); - } - } - - return result; -} - -function parseUrl(template) { - return { - expand: expand.bind(null, template) - }; -} - -function expand(template, context) { - var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - - if (operator && operator !== "+") { - var separator = ","; - - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; - } - - return (values.length !== 0 ? operator : "") + values.join(separator); - } else { - return values.join(","); - } - } else { - return encodeReserved(literal); - } - }); -} - -function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible - - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); - let headers = Object.assign({}, options.headers); - let body; - let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later - - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - - if (!/^http/.test(url)) { - url = options.baseUrl + url; - } - - const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); - const remainingParameters = omit(parameters, omittedParameters); - const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - - if (!isBinaryRequest) { - if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); - } - - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); - } - } // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - - - if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); - } else { - if ("data" in remainingParameters) { - body = remainingParameters.data; - } else { - if (Object.keys(remainingParameters).length) { - body = remainingParameters; - } else { - headers["content-length"] = 0; - } - } - } // default content-type for JSON if body is set - - - if (!headers["content-type"] && typeof body !== "undefined") { - headers["content-type"] = "application/json; charset=utf-8"; - } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - - - if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { - body = ""; - } // Only return body/request keys if present - - - return Object.assign({ - method, - url, - headers - }, typeof body !== "undefined" ? { - body - } : null, options.request ? { - request: options.request - } : null); -} - -function endpointWithDefaults(defaults, route, options) { - return parse(merge(defaults, route, options)); -} - -function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), - parse - }); -} - -const VERSION = "6.0.12"; - -const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. -// So we use RequestParameters and add method as additional required property. - -const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } -}; - -const endpoint = withDefaults(null, DEFAULTS); - -exports.endpoint = endpoint; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 6422: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var request = __nccwpck_require__(9353); -var universalUserAgent = __nccwpck_require__(5030); - -const VERSION = "4.8.0"; - -function _buildMessageForResponseErrors(data) { - return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n"); -} - -class GraphqlResponseError extends Error { - constructor(request, headers, response) { - super(_buildMessageForResponseErrors(response)); - this.request = request; - this.headers = headers; - this.response = response; - this.name = "GraphqlResponseError"; // Expose the errors and response data in their shorthand properties. - - this.errors = response.errors; - this.data = response.data; // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - } - -} - -const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; -const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; -const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; -function graphql(request, query, options) { - if (options) { - if (typeof query === "string" && "query" in options) { - return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); - } - - for (const key in options) { - if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; - return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); - } - } - - const parsedOptions = typeof query === "string" ? Object.assign({ - query - }, options) : query; - const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { - if (NON_VARIABLE_OPTIONS.includes(key)) { - result[key] = parsedOptions[key]; - return result; - } - - if (!result.variables) { - result.variables = {}; - } - - result.variables[key] = parsedOptions[key]; - return result; - }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix - // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 - - const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; - - if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { - requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); - } - - return request(requestOptions).then(response => { - if (response.data.errors) { - const headers = {}; - - for (const key of Object.keys(response.headers)) { - headers[key] = response.headers[key]; - } - - throw new GraphqlResponseError(requestOptions, headers, response.data); - } - - return response.data.data; - }); -} - -function withDefaults(request$1, newDefaults) { - const newRequest = request$1.defaults(newDefaults); - - const newApi = (query, options) => { - return graphql(newRequest, query, options); - }; - - return Object.assign(newApi, { - defaults: withDefaults.bind(null, newRequest), - endpoint: request.request.endpoint - }); -} - -const graphql$1 = withDefaults(request.request, { - headers: { - "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` - }, - method: "POST", - url: "/graphql" -}); -function withCustomRequest(customRequest) { - return withDefaults(customRequest, { - method: "POST", - url: "/graphql" - }); -} - -exports.GraphqlResponseError = GraphqlResponseError; -exports.graphql = graphql$1; -exports.withCustomRequest = withCustomRequest; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 8945: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const VERSION = "2.21.3"; - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && (symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { - _defineProperty(target, key, source[key]); - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -/** - * Some “list” response that can be paginated have a different response structure - * - * They have a `total_count` key in the response (search also has `incomplete_results`, - * /installation/repositories also has `repository_selection`), as well as a key with - * the list of the items which name varies from endpoint to endpoint. - * - * Octokit normalizes these responses so that paginated results are always returned following - * the same structure. One challenge is that if the list response has only one page, no Link - * header is provided, so this header alone is not sufficient to check wether a response is - * paginated or not. - * - * We check if a "total_count" key is present in the response data, but also make sure that - * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would - * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref - */ -function normalizePaginatedListResponse(response) { - // endpoints can respond with 204 if repository is empty - if (!response.data) { - return _objectSpread2(_objectSpread2({}, response), {}, { - data: [] - }); - } - - const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); - if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way - // to retrieve the same information. - - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - - response.data.total_count = totalCount; - return response; -} - -function iterator(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url) return { - done: true - }; - - try { - const response = await requestMethod({ - method, - url, - headers - }); - const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format: - // '; rel="next", ; rel="last"' - // sets `url` to undefined if "next" URL is not present or `link` header is not set - - url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; - return { - value: normalizedResponse - }; - } catch (error) { - if (error.status !== 409) throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; - } - } - - }) - }; -} - -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = undefined; - } - - return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); -} - -function gather(octokit, results, iterator, mapFn) { - return iterator.next().then(result => { - if (result.done) { - return results; - } - - let earlyExit = false; - - function done() { - earlyExit = true; - } - - results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); - - if (earlyExit) { - return results; - } - - return gather(octokit, results, iterator, mapFn); - }); -} - -const composePaginateRest = Object.assign(paginate, { - iterator -}); - -const paginatingEndpoints = ["GET /app/hook/deliveries", "GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/audit-log", "GET /enterprises/{enterprise}/secret-scanning/alerts", "GET /enterprises/{enterprise}/settings/billing/advanced-security", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /licenses", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/cache/usage-by-repository", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/actions/runners", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/audit-log", "GET /orgs/{org}/blocks", "GET /orgs/{org}/code-scanning/alerts", "GET /orgs/{org}/codespaces", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/dependabot/secrets", "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", "GET /orgs/{org}/events", "GET /orgs/{org}/external-groups", "GET /orgs/{org}/failed_invitations", "GET /orgs/{org}/hooks", "GET /orgs/{org}/hooks/{hook_id}/deliveries", "GET /orgs/{org}/installations", "GET /orgs/{org}/invitations", "GET /orgs/{org}/invitations/{invitation_id}/teams", "GET /orgs/{org}/issues", "GET /orgs/{org}/members", "GET /orgs/{org}/migrations", "GET /orgs/{org}/migrations/{migration_id}/repositories", "GET /orgs/{org}/outside_collaborators", "GET /orgs/{org}/packages", "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "GET /orgs/{org}/settings/billing/advanced-security", "GET /orgs/{org}/team-sync/groups", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/invitations", "GET /orgs/{org}/teams/{team_slug}/members", "GET /orgs/{org}/teams/{team_slug}/projects", "GET /orgs/{org}/teams/{team_slug}/repos", "GET /orgs/{org}/teams/{team_slug}/teams", "GET /projects/columns/{column_id}/cards", "GET /projects/{project_id}/collaborators", "GET /projects/{project_id}/columns", "GET /repos/{owner}/{repo}/actions/artifacts", "GET /repos/{owner}/{repo}/actions/caches", "GET /repos/{owner}/{repo}/actions/runners", "GET /repos/{owner}/{repo}/actions/runs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "GET /repos/{owner}/{repo}/actions/secrets", "GET /repos/{owner}/{repo}/actions/workflows", "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "GET /repos/{owner}/{repo}/assignees", "GET /repos/{owner}/{repo}/branches", "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "GET /repos/{owner}/{repo}/code-scanning/alerts", "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "GET /repos/{owner}/{repo}/code-scanning/analyses", "GET /repos/{owner}/{repo}/codespaces", "GET /repos/{owner}/{repo}/codespaces/devcontainers", "GET /repos/{owner}/{repo}/codespaces/secrets", "GET /repos/{owner}/{repo}/collaborators", "GET /repos/{owner}/{repo}/comments", "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/commits", "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", "GET /repos/{owner}/{repo}/commits/{ref}/status", "GET /repos/{owner}/{repo}/commits/{ref}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/dependabot/secrets", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "GET /repos/{owner}/{repo}/environments", "GET /repos/{owner}/{repo}/events", "GET /repos/{owner}/{repo}/forks", "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", "GET /repos/{owner}/{repo}/hooks", "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "GET /repos/{owner}/{repo}/invitations", "GET /repos/{owner}/{repo}/issues", "GET /repos/{owner}/{repo}/issues/comments", "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/issues/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", "GET /repos/{owner}/{repo}/issues/{issue_number}/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", "GET /repos/{owner}/{repo}/keys", "GET /repos/{owner}/{repo}/labels", "GET /repos/{owner}/{repo}/milestones", "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", "GET /repos/{owner}/{repo}/notifications", "GET /repos/{owner}/{repo}/pages/builds", "GET /repos/{owner}/{repo}/projects", "GET /repos/{owner}/{repo}/pulls", "GET /repos/{owner}/{repo}/pulls/comments", "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "GET /repos/{owner}/{repo}/stargazers", "GET /repos/{owner}/{repo}/subscribers", "GET /repos/{owner}/{repo}/tags", "GET /repos/{owner}/{repo}/teams", "GET /repos/{owner}/{repo}/topics", "GET /repositories", "GET /repositories/{repository_id}/environments/{environment_name}/secrets", "GET /search/code", "GET /search/commits", "GET /search/issues", "GET /search/labels", "GET /search/repositories", "GET /search/topics", "GET /search/users", "GET /teams/{team_id}/discussions", "GET /teams/{team_id}/discussions/{discussion_number}/comments", "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /teams/{team_id}/discussions/{discussion_number}/reactions", "GET /teams/{team_id}/invitations", "GET /teams/{team_id}/members", "GET /teams/{team_id}/projects", "GET /teams/{team_id}/repos", "GET /teams/{team_id}/teams", "GET /user/blocks", "GET /user/codespaces", "GET /user/codespaces/secrets", "GET /user/emails", "GET /user/followers", "GET /user/following", "GET /user/gpg_keys", "GET /user/installations", "GET /user/installations/{installation_id}/repositories", "GET /user/issues", "GET /user/keys", "GET /user/marketplace_purchases", "GET /user/marketplace_purchases/stubbed", "GET /user/memberships/orgs", "GET /user/migrations", "GET /user/migrations/{migration_id}/repositories", "GET /user/orgs", "GET /user/packages", "GET /user/packages/{package_type}/{package_name}/versions", "GET /user/public_emails", "GET /user/repos", "GET /user/repository_invitations", "GET /user/starred", "GET /user/subscriptions", "GET /user/teams", "GET /users", "GET /users/{username}/events", "GET /users/{username}/events/orgs/{org}", "GET /users/{username}/events/public", "GET /users/{username}/followers", "GET /users/{username}/following", "GET /users/{username}/gists", "GET /users/{username}/gpg_keys", "GET /users/{username}/keys", "GET /users/{username}/orgs", "GET /users/{username}/packages", "GET /users/{username}/projects", "GET /users/{username}/received_events", "GET /users/{username}/received_events/public", "GET /users/{username}/repos", "GET /users/{username}/starred", "GET /users/{username}/subscriptions"]; - -function isPaginatingEndpoint(arg) { - if (typeof arg === "string") { - return paginatingEndpoints.includes(arg); - } else { - return false; - } -} - -/** - * @param octokit Octokit instance - * @param options Options passed to Octokit constructor - */ - -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = VERSION; - -exports.composePaginateRest = composePaginateRest; -exports.isPaginatingEndpoint = isPaginatingEndpoint; -exports.paginateRest = paginateRest; -exports.paginatingEndpoints = paginatingEndpoints; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 7471: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var deprecation = __nccwpck_require__(8932); -var once = _interopDefault(__nccwpck_require__(1223)); - -const logOnceCode = once(deprecation => console.warn(deprecation)); -const logOnceHeaders = once(deprecation => console.warn(deprecation)); -/** - * Error with extra properties to help with debugging - */ - -class RequestError extends Error { - constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = "HttpError"; - this.status = statusCode; - let headers; - - if ("headers" in options && typeof options.headers !== "undefined") { - headers = options.headers; - } - - if ("response" in options) { - this.response = options.response; - headers = options.response.headers; - } // redact request credentials without mutating original request options - - - const requestCopy = Object.assign({}, options.request); - - if (options.request.headers.authorization) { - requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") - }); - } - - requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; // deprecations - - Object.defineProperty(this, "code", { - get() { - logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); - return statusCode; - } - - }); - Object.defineProperty(this, "headers", { - get() { - logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); - return headers || {}; - } - - }); - } - -} - -exports.RequestError = RequestError; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 9353: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var endpoint = __nccwpck_require__(8713); -var universalUserAgent = __nccwpck_require__(5030); -var isPlainObject = __nccwpck_require__(3287); -var nodeFetch = _interopDefault(__nccwpck_require__(467)); -var requestError = __nccwpck_require__(7471); - -const VERSION = "5.6.3"; - -function getBufferResponse(response) { - return response.arrayBuffer(); -} - -function fetchWrapper(requestOptions) { - const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - - if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { - requestOptions.body = JSON.stringify(requestOptions.body); - } - - let headers = {}; - let status; - let url; - const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; - return fetch(requestOptions.url, Object.assign({ - method: requestOptions.method, - body: requestOptions.body, - headers: requestOptions.headers, - redirect: requestOptions.redirect - }, // `requestOptions.request.agent` type is incompatible - // see https://github.com/octokit/types.ts/pull/264 - requestOptions.request)).then(async response => { - url = response.url; - status = response.status; - - for (const keyAndValue of response.headers) { - headers[keyAndValue[0]] = keyAndValue[1]; - } - - if ("deprecation" in headers) { - const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); - const deprecationLink = matches && matches.pop(); - log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); - } - - if (status === 204 || status === 205) { - return; - } // GitHub API returns 200 for HEAD requests - - - if (requestOptions.method === "HEAD") { - if (status < 400) { - return; - } - - throw new requestError.RequestError(response.statusText, status, { - response: { - url, - status, - headers, - data: undefined - }, - request: requestOptions - }); - } - - if (status === 304) { - throw new requestError.RequestError("Not modified", status, { - response: { - url, - status, - headers, - data: await getResponseData(response) - }, - request: requestOptions - }); - } - - if (status >= 400) { - const data = await getResponseData(response); - const error = new requestError.RequestError(toErrorMessage(data), status, { - response: { - url, - status, - headers, - data - }, - request: requestOptions - }); - throw error; - } - - return getResponseData(response); - }).then(data => { - return { - status, - url, - headers, - data - }; - }).catch(error => { - if (error instanceof requestError.RequestError) throw error; - throw new requestError.RequestError(error.message, 500, { - request: requestOptions - }); - }); -} - -async function getResponseData(response) { - const contentType = response.headers.get("content-type"); - - if (/application\/json/.test(contentType)) { - return response.json(); - } - - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { - return response.text(); - } - - return getBufferResponse(response); -} - -function toErrorMessage(data) { - if (typeof data === "string") return data; // istanbul ignore else - just in case - - if ("message" in data) { - if (Array.isArray(data.errors)) { - return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; - } - - return data.message; - } // istanbul ignore next - just in case - - - return `Unknown error: ${JSON.stringify(data)}`; -} - -function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - - if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); - } - - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); - }; - - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); - return endpointOptions.request.hook(request, endpointOptions); - }; - - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) - }); -} - -const request = withDefaults(endpoint.endpoint, { - headers: { - "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` - } -}); - -exports.request = request; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 5526: -/***/ (function(__unused_webpack_module, exports) { - -"use strict"; - -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; -class BasicCredentialHandler { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BasicCredentialHandler = BasicCredentialHandler; -class BearerCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.BearerCredentialHandler = BearerCredentialHandler; -class PersonalAccessTokenCredentialHandler { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error('The request has no headers'); - } - options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter(this, void 0, void 0, function* () { - throw new Error('not implemented'); - }); - } -} -exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; -//# sourceMappingURL=auth.js.map - -/***/ }), - -/***/ 6255: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { - -"use strict"; - -/* eslint-disable @typescript-eslint/no-explicit-any */ -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(8605)); -const https = __importStar(__nccwpck_require__(7211)); -const pm = __importStar(__nccwpck_require__(9835)); -const tunnel = __importStar(__nccwpck_require__(4294)); -var HttpCodes; -(function (HttpCodes) { - HttpCodes[HttpCodes["OK"] = 200] = "OK"; - HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; - HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; - HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; - HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; - HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; - HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; - HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; - HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; - HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; - HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); -var Headers; -(function (Headers) { - Headers["Accept"] = "accept"; - Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); -var MediaTypes; -(function (MediaTypes) { - MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); -/** - * Returns the proxy URL, depending upon the supplied url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ -function getProxyUrl(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ''; -} -exports.getProxyUrl = getProxyUrl; -const HttpRedirectCodes = [ - HttpCodes.MovedPermanently, - HttpCodes.ResourceMoved, - HttpCodes.SeeOther, - HttpCodes.TemporaryRedirect, - HttpCodes.PermanentRedirect -]; -const HttpResponseRetryCodes = [ - HttpCodes.BadGateway, - HttpCodes.ServiceUnavailable, - HttpCodes.GatewayTimeout -]; -const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; -const ExponentialBackoffCeiling = 10; -const ExponentialBackoffTimeSlice = 5; -class HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = 'HttpClientError'; - this.statusCode = statusCode; - Object.setPrototypeOf(this, HttpClientError.prototype); - } -} -exports.HttpClientError = HttpClientError; -class HttpClientResponse { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on('data', (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on('end', () => { - resolve(output.toString()); - }); - })); - }); - } -} -exports.HttpClientResponse = HttpClientResponse; -function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === 'https:'; -} -exports.isHttps = isHttps; -class HttpClient { - constructor(userAgent, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('GET', requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('DELETE', requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('POST', requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PATCH', requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('PUT', requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request('HEAD', requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream, additionalHeaders) { - return __awaiter(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); - additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error('Client has already been disposed.'); - } - const parsedUrl = new URL(requestUrl); - let info = this._prepareRequest(verb, parsedUrl, headers); - // Only perform retries on reads since writes may not be idempotent. - const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) - ? this._maxRetries + 1 - : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info, data); - // Check if it's an authentication challenge - if (response && - response.message && - response.message.statusCode === HttpCodes.Unauthorized) { - let authenticationHandler; - for (const handler of this.handlers) { - if (handler.canHandleAuthentication(response)) { - authenticationHandler = handler; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info, data); - } - else { - // We have received an unauthorized response but have no handlers to handle it. - // Let the response return to the caller. - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && - HttpRedirectCodes.includes(response.message.statusCode) && - this._allowRedirects && - redirectsRemaining > 0) { - const redirectUrl = response.message.headers['location']; - if (!redirectUrl) { - // if there's no location to redirect to, we won't - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === 'https:' && - parsedUrl.protocol !== parsedRedirectUrl.protocol && - !this._allowRedirectDowngrade) { - throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); - } - // we need to finish reading the response before reassigning response - // which will leak the open socket. - yield response.readBody(); - // strip authorization header if redirected to a different hostname - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - // header names are case insensitive - if (header.toLowerCase() === 'authorization') { - delete headers[header]; - } - } - } - // let's make the request with the new redirectUrl - info = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info, data); - redirectsRemaining--; - } - if (!response.message.statusCode || - !HttpResponseRetryCodes.includes(response.message.statusCode)) { - // If not a retry code, return immediately instead of retrying - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info, data) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } - else if (!res) { - // If `err` is not passed, then `res` must be passed. - reject(new Error('Unknown error')); - } - else { - resolve(res); - } - } - this.requestRawWithCallback(info, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info, data, onResult) { - if (typeof data === 'string') { - if (!info.options.headers) { - info.options.headers = {}; - } - info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info.httpModule.request(info.options, (msg) => { - const res = new HttpClientResponse(msg); - handleResult(undefined, res); - }); - let socket; - req.on('socket', sock => { - socket = sock; - }); - // If we ever get disconnected, we want the socket to timeout eventually - req.setTimeout(this._socketTimeout || 3 * 60000, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info.options.path}`)); - }); - req.on('error', function (err) { - // err has statusCode property - // res should have headers - handleResult(err); - }); - if (data && typeof data === 'string') { - req.write(data, 'utf8'); - } - if (data && typeof data !== 'string') { - data.on('close', function () { - req.end(); - }); - data.pipe(req); - } - else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info = {}; - info.parsedUrl = requestUrl; - const usingSsl = info.parsedUrl.protocol === 'https:'; - info.httpModule = usingSsl ? https : http; - const defaultPort = usingSsl ? 443 : 80; - info.options = {}; - info.options.host = info.parsedUrl.hostname; - info.options.port = info.parsedUrl.port - ? parseInt(info.parsedUrl.port) - : defaultPort; - info.options.path = - (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); - info.options.method = method; - info.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info.options.headers['user-agent'] = this.userAgent; - } - info.options.agent = this._getAgent(info.parsedUrl); - // gives handlers an opportunity to participate - if (this.handlers) { - for (const handler of this.handlers) { - handler.prepareRequest(info.options); - } - } - return info; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); - } - return lowercaseKeys(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (this._keepAlive && !useProxy) { - agent = this._agent; - } - // if agent is already assigned use that agent. - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === 'https:'; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; - } - // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - })), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === 'https:'; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; - } - else { - tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - // if reusing agent across request and tunneling agent isn't assigned create a new agent - if (this._keepAlive && !agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https.Agent(options) : new http.Agent(options); - this._agent = agent; - } - // if not using private agent and tunnel agent isn't setup then use global agent - if (!agent) { - agent = usingSsl ? https.globalAgent : http.globalAgent; - } - if (usingSsl && this._ignoreSslError) { - // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process - // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options - // we have to cast it to any and change it directly - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); - const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise(resolve => setTimeout(() => resolve(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - // not found leads to null obj returned - if (statusCode === HttpCodes.NotFound) { - resolve(response); - } - // get the result from the body - function dateTimeDeserializer(key, value) { - if (typeof value === 'string') { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } - else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } - catch (err) { - // Invalid resource (contents not json); leaving result obj null - } - // note that 3xx redirects are handled by the http layer. - if (statusCode > 299) { - let msg; - // if exception/error in body, attempt to get better error - if (obj && obj.message) { - msg = obj.message; - } - else if (contents && contents.length > 0) { - // it may be the case that the exception is in the body message as string - msg = contents; - } - else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError(msg, statusCode); - err.result = response.result; - reject(err); - } - else { - resolve(response); - } - })); - }); - } -} -exports.HttpClient = HttpClient; -const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ 9835: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.checkBypass = exports.getProxyUrl = void 0; -function getProxyUrl(reqUrl) { - const usingSsl = reqUrl.protocol === 'https:'; - if (checkBypass(reqUrl)) { - return undefined; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env['https_proxy'] || process.env['HTTPS_PROXY']; - } - else { - return process.env['http_proxy'] || process.env['HTTP_PROXY']; - } - })(); - if (proxyVar) { - return new URL(proxyVar); - } - else { - return undefined; - } -} -exports.getProxyUrl = getProxyUrl; -function checkBypass(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; - if (!noProxy) { - return false; - } - // Determine the request port - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } - else if (reqUrl.protocol === 'http:') { - reqPort = 80; - } - else if (reqUrl.protocol === 'https:') { - reqPort = 443; - } - // Format the request hostname and hostname with port - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === 'number') { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - // Compare request host against noproxy - for (const upperNoProxyItem of noProxy - .split(',') - .map(x => x.trim().toUpperCase()) - .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { - return true; - } - } - return false; -} -exports.checkBypass = checkBypass; -//# sourceMappingURL=proxy.js.map - -/***/ }), - -/***/ 4193: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const VERSION = "3.1.0"; - -/** - * Some “list” response that can be paginated have a different response structure - * - * They have a `total_count` key in the response (search also has `incomplete_results`, - * /installation/repositories also has `repository_selection`), as well as a key with - * the list of the items which name varies from endpoint to endpoint. - * - * Octokit normalizes these responses so that paginated results are always returned following - * the same structure. One challenge is that if the list response has only one page, no Link - * header is provided, so this header alone is not sufficient to check wether a response is - * paginated or not. - * - * We check if a "total_count" key is present in the response data, but also make sure that - * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would - * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref - */ -function normalizePaginatedListResponse(response) { - // endpoints can respond with 204 if repository is empty - if (!response.data) { - return { ...response, - data: [] - }; - } - - const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); - if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way - // to retrieve the same information. - - const incompleteResults = response.data.incomplete_results; - const repositorySelection = response.data.repository_selection; - const totalCount = response.data.total_count; - delete response.data.incomplete_results; - delete response.data.repository_selection; - delete response.data.total_count; - const namespaceKey = Object.keys(response.data)[0]; - const data = response.data[namespaceKey]; - response.data = data; - - if (typeof incompleteResults !== "undefined") { - response.data.incomplete_results = incompleteResults; - } - - if (typeof repositorySelection !== "undefined") { - response.data.repository_selection = repositorySelection; - } - - response.data.total_count = totalCount; - return response; -} - -function iterator(octokit, route, parameters) { - const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); - const requestMethod = typeof route === "function" ? route : octokit.request; - const method = options.method; - const headers = options.headers; - let url = options.url; - return { - [Symbol.asyncIterator]: () => ({ - async next() { - if (!url) return { - done: true - }; - - try { - const response = await requestMethod({ - method, - url, - headers - }); - const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format: - // '; rel="next", ; rel="last"' - // sets `url` to undefined if "next" URL is not present or `link` header is not set - - url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; - return { - value: normalizedResponse - }; - } catch (error) { - if (error.status !== 409) throw error; - url = ""; - return { - value: { - status: 200, - headers: {}, - data: [] - } - }; - } - } - - }) - }; -} - -function paginate(octokit, route, parameters, mapFn) { - if (typeof parameters === "function") { - mapFn = parameters; - parameters = undefined; - } - - return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); -} - -function gather(octokit, results, iterator, mapFn) { - return iterator.next().then(result => { - if (result.done) { - return results; - } - - let earlyExit = false; - - function done() { - earlyExit = true; - } - - results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); - - if (earlyExit) { - return results; - } - - return gather(octokit, results, iterator, mapFn); - }); -} - -const composePaginateRest = Object.assign(paginate, { - iterator -}); - -const paginatingEndpoints = ["GET /app/hook/deliveries", "GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/audit-log", "GET /enterprises/{enterprise}/code-scanning/alerts", "GET /enterprises/{enterprise}/secret-scanning/alerts", "GET /enterprises/{enterprise}/settings/billing/advanced-security", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /licenses", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/cache/usage-by-repository", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/actions/runners", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/audit-log", "GET /orgs/{org}/blocks", "GET /orgs/{org}/code-scanning/alerts", "GET /orgs/{org}/codespaces", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/dependabot/secrets", "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", "GET /orgs/{org}/events", "GET /orgs/{org}/external-groups", "GET /orgs/{org}/failed_invitations", "GET /orgs/{org}/hooks", "GET /orgs/{org}/hooks/{hook_id}/deliveries", "GET /orgs/{org}/installations", "GET /orgs/{org}/invitations", "GET /orgs/{org}/invitations/{invitation_id}/teams", "GET /orgs/{org}/issues", "GET /orgs/{org}/members", "GET /orgs/{org}/migrations", "GET /orgs/{org}/migrations/{migration_id}/repositories", "GET /orgs/{org}/outside_collaborators", "GET /orgs/{org}/packages", "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "GET /orgs/{org}/settings/billing/advanced-security", "GET /orgs/{org}/team-sync/groups", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/invitations", "GET /orgs/{org}/teams/{team_slug}/members", "GET /orgs/{org}/teams/{team_slug}/projects", "GET /orgs/{org}/teams/{team_slug}/repos", "GET /orgs/{org}/teams/{team_slug}/teams", "GET /projects/columns/{column_id}/cards", "GET /projects/{project_id}/collaborators", "GET /projects/{project_id}/columns", "GET /repos/{owner}/{repo}/actions/artifacts", "GET /repos/{owner}/{repo}/actions/caches", "GET /repos/{owner}/{repo}/actions/runners", "GET /repos/{owner}/{repo}/actions/runs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "GET /repos/{owner}/{repo}/actions/secrets", "GET /repos/{owner}/{repo}/actions/workflows", "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "GET /repos/{owner}/{repo}/assignees", "GET /repos/{owner}/{repo}/branches", "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "GET /repos/{owner}/{repo}/code-scanning/alerts", "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "GET /repos/{owner}/{repo}/code-scanning/analyses", "GET /repos/{owner}/{repo}/codespaces", "GET /repos/{owner}/{repo}/codespaces/devcontainers", "GET /repos/{owner}/{repo}/codespaces/secrets", "GET /repos/{owner}/{repo}/collaborators", "GET /repos/{owner}/{repo}/comments", "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/commits", "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", "GET /repos/{owner}/{repo}/commits/{ref}/status", "GET /repos/{owner}/{repo}/commits/{ref}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/dependabot/secrets", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "GET /repos/{owner}/{repo}/environments", "GET /repos/{owner}/{repo}/events", "GET /repos/{owner}/{repo}/forks", "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", "GET /repos/{owner}/{repo}/hooks", "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "GET /repos/{owner}/{repo}/invitations", "GET /repos/{owner}/{repo}/issues", "GET /repos/{owner}/{repo}/issues/comments", "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/issues/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", "GET /repos/{owner}/{repo}/issues/{issue_number}/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", "GET /repos/{owner}/{repo}/keys", "GET /repos/{owner}/{repo}/labels", "GET /repos/{owner}/{repo}/milestones", "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", "GET /repos/{owner}/{repo}/notifications", "GET /repos/{owner}/{repo}/pages/builds", "GET /repos/{owner}/{repo}/projects", "GET /repos/{owner}/{repo}/pulls", "GET /repos/{owner}/{repo}/pulls/comments", "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "GET /repos/{owner}/{repo}/stargazers", "GET /repos/{owner}/{repo}/subscribers", "GET /repos/{owner}/{repo}/tags", "GET /repos/{owner}/{repo}/teams", "GET /repos/{owner}/{repo}/topics", "GET /repositories", "GET /repositories/{repository_id}/environments/{environment_name}/secrets", "GET /search/code", "GET /search/commits", "GET /search/issues", "GET /search/labels", "GET /search/repositories", "GET /search/topics", "GET /search/users", "GET /teams/{team_id}/discussions", "GET /teams/{team_id}/discussions/{discussion_number}/comments", "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /teams/{team_id}/discussions/{discussion_number}/reactions", "GET /teams/{team_id}/invitations", "GET /teams/{team_id}/members", "GET /teams/{team_id}/projects", "GET /teams/{team_id}/repos", "GET /teams/{team_id}/teams", "GET /user/blocks", "GET /user/codespaces", "GET /user/codespaces/secrets", "GET /user/emails", "GET /user/followers", "GET /user/following", "GET /user/gpg_keys", "GET /user/installations", "GET /user/installations/{installation_id}/repositories", "GET /user/issues", "GET /user/keys", "GET /user/marketplace_purchases", "GET /user/marketplace_purchases/stubbed", "GET /user/memberships/orgs", "GET /user/migrations", "GET /user/migrations/{migration_id}/repositories", "GET /user/orgs", "GET /user/packages", "GET /user/packages/{package_type}/{package_name}/versions", "GET /user/public_emails", "GET /user/repos", "GET /user/repository_invitations", "GET /user/starred", "GET /user/subscriptions", "GET /user/teams", "GET /users", "GET /users/{username}/events", "GET /users/{username}/events/orgs/{org}", "GET /users/{username}/events/public", "GET /users/{username}/followers", "GET /users/{username}/following", "GET /users/{username}/gists", "GET /users/{username}/gpg_keys", "GET /users/{username}/keys", "GET /users/{username}/orgs", "GET /users/{username}/packages", "GET /users/{username}/projects", "GET /users/{username}/received_events", "GET /users/{username}/received_events/public", "GET /users/{username}/repos", "GET /users/{username}/starred", "GET /users/{username}/subscriptions"]; - -function isPaginatingEndpoint(arg) { - if (typeof arg === "string") { - return paginatingEndpoints.includes(arg); - } else { - return false; - } -} - -/** - * @param octokit Octokit instance - * @param options Options passed to Octokit constructor - */ - -function paginateRest(octokit) { - return { - paginate: Object.assign(paginate.bind(null, octokit), { - iterator: iterator.bind(null, octokit) - }) - }; -} -paginateRest.VERSION = VERSION; - -exports.composePaginateRest = composePaginateRest; -exports.isPaginatingEndpoint = isPaginatingEndpoint; -exports.paginateRest = paginateRest; -exports.paginatingEndpoints = paginatingEndpoints; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 3044: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - - if (enumerableOnly) { - symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); - } - - keys.push.apply(keys, symbols); - } - - return keys; -} - -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; - - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); - } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); - } - } - - return target; -} - -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } - - return obj; -} - -const Endpoints = { - actions: { - addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"], - addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], - addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], - approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"], - cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"], - createOrUpdateEnvironmentSecret: ["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], - createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], - createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"], - createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"], - createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], - createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"], - createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"], - deleteActionsCacheById: ["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"], - deleteActionsCacheByKey: ["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"], - deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], - deleteEnvironmentSecret: ["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], - deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], - deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"], - deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"], - deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], - deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], - disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"], - disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"], - downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"], - downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"], - downloadWorkflowRunAttemptLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"], - downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], - enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"], - enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"], - getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], - getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], - getActionsCacheUsageByRepoForOrg: ["GET /orgs/{org}/actions/cache/usage-by-repository"], - getActionsCacheUsageForEnterprise: ["GET /enterprises/{enterprise}/actions/cache/usage"], - getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], - getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"], - getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"], - getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], - getEnvironmentPublicKey: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"], - getEnvironmentSecret: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], - getGithubActionsDefaultWorkflowPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/workflow"], - getGithubActionsDefaultWorkflowPermissionsOrganization: ["GET /orgs/{org}/actions/permissions/workflow"], - getGithubActionsDefaultWorkflowPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/workflow"], - getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"], - getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"], - getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], - getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], - getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], - getRepoPermissions: ["GET /repos/{owner}/{repo}/actions/permissions", {}, { - renamed: ["actions", "getGithubActionsPermissionsRepository"] - }], - getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], - getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"], - getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], - getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"], - getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], - getWorkflowAccessToRepository: ["GET /repos/{owner}/{repo}/actions/permissions/access"], - getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], - getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"], - getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"], - getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"], - listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], - listEnvironmentSecrets: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets"], - listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"], - listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"], - listLabelsForSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}/labels"], - listLabelsForSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], - listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], - listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], - listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], - listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"], - listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"], - listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"], - listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], - listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], - listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"], - listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"], - listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], - reRunJobForWorkflowRun: ["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"], - reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], - reRunWorkflowFailedJobs: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"], - removeAllCustomLabelsFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"], - removeAllCustomLabelsFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], - removeCustomLabelFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"], - removeCustomLabelFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"], - removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], - reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], - setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"], - setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"], - setCustomLabelsForSelfHostedRunnerForOrg: ["PUT /orgs/{org}/actions/runners/{runner_id}/labels"], - setCustomLabelsForSelfHostedRunnerForRepo: ["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], - setGithubActionsDefaultWorkflowPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/workflow"], - setGithubActionsDefaultWorkflowPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions/workflow"], - setGithubActionsDefaultWorkflowPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/workflow"], - setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"], - setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"], - setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"], - setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"], - setWorkflowAccessToRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/access"] - }, - activity: { - checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], - deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], - deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"], - getFeeds: ["GET /feeds"], - getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], - getThread: ["GET /notifications/threads/{thread_id}"], - getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"], - listEventsForAuthenticatedUser: ["GET /users/{username}/events"], - listNotificationsForAuthenticatedUser: ["GET /notifications"], - listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"], - listPublicEvents: ["GET /events"], - listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], - listPublicEventsForUser: ["GET /users/{username}/events/public"], - listPublicOrgEvents: ["GET /orgs/{org}/events"], - listReceivedEventsForUser: ["GET /users/{username}/received_events"], - listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"], - listRepoEvents: ["GET /repos/{owner}/{repo}/events"], - listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"], - listReposStarredByAuthenticatedUser: ["GET /user/starred"], - listReposStarredByUser: ["GET /users/{username}/starred"], - listReposWatchedByUser: ["GET /users/{username}/subscriptions"], - listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], - listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], - listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], - markNotificationsAsRead: ["PUT /notifications"], - markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], - markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], - setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], - setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"], - starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], - unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] - }, - apps: { - addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}", {}, { - renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] - }], - addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], - checkToken: ["POST /applications/{client_id}/token"], - createFromManifest: ["POST /app-manifests/{code}/conversions"], - createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"], - deleteAuthorization: ["DELETE /applications/{client_id}/grant"], - deleteInstallation: ["DELETE /app/installations/{installation_id}"], - deleteToken: ["DELETE /applications/{client_id}/token"], - getAuthenticated: ["GET /app"], - getBySlug: ["GET /apps/{app_slug}"], - getInstallation: ["GET /app/installations/{installation_id}"], - getOrgInstallation: ["GET /orgs/{org}/installation"], - getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], - getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"], - getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"], - getUserInstallation: ["GET /users/{username}/installation"], - getWebhookConfigForApp: ["GET /app/hook/config"], - getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], - listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], - listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"], - listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"], - listInstallations: ["GET /app/installations"], - listInstallationsForAuthenticatedUser: ["GET /user/installations"], - listPlans: ["GET /marketplace_listing/plans"], - listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], - listReposAccessibleToInstallation: ["GET /installation/repositories"], - listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], - listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"], - listWebhookDeliveries: ["GET /app/hook/deliveries"], - redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"], - removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}", {}, { - renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] - }], - removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], - resetToken: ["PATCH /applications/{client_id}/token"], - revokeInstallationAccessToken: ["DELETE /installation/token"], - scopeToken: ["POST /applications/{client_id}/token/scoped"], - suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], - unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"], - updateWebhookConfigForApp: ["PATCH /app/hook/config"] - }, - billing: { - getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], - getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"], - getGithubAdvancedSecurityBillingGhe: ["GET /enterprises/{enterprise}/settings/billing/advanced-security"], - getGithubAdvancedSecurityBillingOrg: ["GET /orgs/{org}/settings/billing/advanced-security"], - getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], - getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"], - getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"], - getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"] - }, - checks: { - create: ["POST /repos/{owner}/{repo}/check-runs"], - createSuite: ["POST /repos/{owner}/{repo}/check-suites"], - get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], - getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], - listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"], - listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], - listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"], - listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], - rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"], - rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"], - setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"], - update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] - }, - codeScanning: { - deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"], - getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, { - renamedParameters: { - alert_id: "alert_number" - } - }], - getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"], - getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], - listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"], - listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], - listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", {}, { - renamed: ["codeScanning", "listAlertInstances"] - }], - listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], - updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"], - uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] - }, - codesOfConduct: { - getAllCodesOfConduct: ["GET /codes_of_conduct"], - getConductCode: ["GET /codes_of_conduct/{key}"] - }, - codespaces: { - addRepositoryForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], - codespaceMachinesForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/machines"], - createForAuthenticatedUser: ["POST /user/codespaces"], - createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], - createOrUpdateSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}"], - createWithPrForAuthenticatedUser: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"], - createWithRepoForAuthenticatedUser: ["POST /repos/{owner}/{repo}/codespaces"], - deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], - deleteFromOrganization: ["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"], - deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], - deleteSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}"], - exportForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/exports"], - getExportDetailsForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/exports/{export_id}"], - getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], - getPublicKeyForAuthenticatedUser: ["GET /user/codespaces/secrets/public-key"], - getRepoPublicKey: ["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"], - getRepoSecret: ["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], - getSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}"], - listDevcontainersInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/devcontainers"], - listForAuthenticatedUser: ["GET /user/codespaces"], - listInOrganization: ["GET /orgs/{org}/codespaces", {}, { - renamedParameters: { - org_id: "org" - } - }], - listInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], - listRepositoriesForSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}/repositories"], - listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], - removeRepositoryForSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], - repoMachinesForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/machines"], - setRepositoriesForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories"], - startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], - stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], - stopInOrganization: ["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"], - updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] - }, - dependabot: { - addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], - createOrUpdateOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}"], - createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], - deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], - deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], - getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], - getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], - getRepoPublicKey: ["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"], - getRepoSecret: ["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], - listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], - listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], - listSelectedReposForOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"], - removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], - setSelectedReposForOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"] - }, - dependencyGraph: { - createRepositorySnapshot: ["POST /repos/{owner}/{repo}/dependency-graph/snapshots"], - diffRange: ["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"] - }, - emojis: { - get: ["GET /emojis"] - }, - enterpriseAdmin: { - addCustomLabelsToSelfHostedRunnerForEnterprise: ["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], - disableSelectedOrganizationGithubActionsEnterprise: ["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], - enableSelectedOrganizationGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], - getAllowedActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/selected-actions"], - getGithubActionsPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions"], - getServerStatistics: ["GET /enterprise-installation/{enterprise_or_org}/server-statistics"], - listLabelsForSelfHostedRunnerForEnterprise: ["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], - listSelectedOrganizationsEnabledGithubActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/organizations"], - removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: ["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], - removeCustomLabelFromSelfHostedRunnerForEnterprise: ["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"], - setAllowedActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"], - setCustomLabelsForSelfHostedRunnerForEnterprise: ["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], - setGithubActionsPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions"], - setSelectedOrganizationsEnabledGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations"] - }, - gists: { - checkIsStarred: ["GET /gists/{gist_id}/star"], - create: ["POST /gists"], - createComment: ["POST /gists/{gist_id}/comments"], - delete: ["DELETE /gists/{gist_id}"], - deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], - fork: ["POST /gists/{gist_id}/forks"], - get: ["GET /gists/{gist_id}"], - getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], - getRevision: ["GET /gists/{gist_id}/{sha}"], - list: ["GET /gists"], - listComments: ["GET /gists/{gist_id}/comments"], - listCommits: ["GET /gists/{gist_id}/commits"], - listForUser: ["GET /users/{username}/gists"], - listForks: ["GET /gists/{gist_id}/forks"], - listPublic: ["GET /gists/public"], - listStarred: ["GET /gists/starred"], - star: ["PUT /gists/{gist_id}/star"], - unstar: ["DELETE /gists/{gist_id}/star"], - update: ["PATCH /gists/{gist_id}"], - updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] - }, - git: { - createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], - createCommit: ["POST /repos/{owner}/{repo}/git/commits"], - createRef: ["POST /repos/{owner}/{repo}/git/refs"], - createTag: ["POST /repos/{owner}/{repo}/git/tags"], - createTree: ["POST /repos/{owner}/{repo}/git/trees"], - deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], - getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], - getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], - getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], - getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], - getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], - listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], - updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] - }, - gitignore: { - getAllTemplates: ["GET /gitignore/templates"], - getTemplate: ["GET /gitignore/templates/{name}"] - }, - interactions: { - getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], - getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], - getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], - getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits", {}, { - renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] - }], - removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], - removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], - removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"], - removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits", {}, { - renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] - }], - setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], - setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], - setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], - setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits", {}, { - renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] - }] - }, - issues: { - addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"], - addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], - checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], - create: ["POST /repos/{owner}/{repo}/issues"], - createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"], - createLabel: ["POST /repos/{owner}/{repo}/labels"], - createMilestone: ["POST /repos/{owner}/{repo}/milestones"], - deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"], - deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], - deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"], - get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], - getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], - getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], - getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], - getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], - list: ["GET /issues"], - listAssignees: ["GET /repos/{owner}/{repo}/assignees"], - listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], - listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], - listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], - listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], - listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"], - listForAuthenticatedUser: ["GET /user/issues"], - listForOrg: ["GET /orgs/{org}/issues"], - listForRepo: ["GET /repos/{owner}/{repo}/issues"], - listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"], - listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], - listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"], - listMilestones: ["GET /repos/{owner}/{repo}/milestones"], - lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], - removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"], - removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"], - removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"], - setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], - unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], - update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], - updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], - updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], - updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"] - }, - licenses: { - get: ["GET /licenses/{license}"], - getAllCommonlyUsed: ["GET /licenses"], - getForRepo: ["GET /repos/{owner}/{repo}/license"] - }, - markdown: { - render: ["POST /markdown"], - renderRaw: ["POST /markdown/raw", { - headers: { - "content-type": "text/plain; charset=utf-8" - } - }] - }, - meta: { - get: ["GET /meta"], - getOctocat: ["GET /octocat"], - getZen: ["GET /zen"], - root: ["GET /"] - }, - migrations: { - cancelImport: ["DELETE /repos/{owner}/{repo}/import"], - deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"], - deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"], - downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"], - getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"], - getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], - getImportStatus: ["GET /repos/{owner}/{repo}/import"], - getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], - getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], - getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], - listForAuthenticatedUser: ["GET /user/migrations"], - listForOrg: ["GET /orgs/{org}/migrations"], - listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"], - listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], - listReposForUser: ["GET /user/migrations/{migration_id}/repositories", {}, { - renamed: ["migrations", "listReposForAuthenticatedUser"] - }], - mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], - setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], - startForAuthenticatedUser: ["POST /user/migrations"], - startForOrg: ["POST /orgs/{org}/migrations"], - startImport: ["PUT /repos/{owner}/{repo}/import"], - unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"], - unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"], - updateImport: ["PATCH /repos/{owner}/{repo}/import"] - }, - orgs: { - blockUser: ["PUT /orgs/{org}/blocks/{username}"], - cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], - checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], - checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], - checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], - convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"], - createInvitation: ["POST /orgs/{org}/invitations"], - createWebhook: ["POST /orgs/{org}/hooks"], - deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], - get: ["GET /orgs/{org}"], - getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], - getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], - getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], - getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], - getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"], - list: ["GET /organizations"], - listAppInstallations: ["GET /orgs/{org}/installations"], - listBlockedUsers: ["GET /orgs/{org}/blocks"], - listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], - listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], - listForAuthenticatedUser: ["GET /user/orgs"], - listForUser: ["GET /users/{username}/orgs"], - listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], - listMembers: ["GET /orgs/{org}/members"], - listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], - listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], - listPendingInvitations: ["GET /orgs/{org}/invitations"], - listPublicMembers: ["GET /orgs/{org}/public_members"], - listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], - listWebhooks: ["GET /orgs/{org}/hooks"], - pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], - removeMember: ["DELETE /orgs/{org}/members/{username}"], - removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], - removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"], - removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"], - setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"], - unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], - update: ["PATCH /orgs/{org}"], - updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"], - updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], - updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] - }, - packages: { - deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"], - deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"], - deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"], - deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], - deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], - deletePackageVersionForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], - getAllPackageVersionsForAPackageOwnedByAnOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions", {}, { - renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] - }], - getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions", {}, { - renamed: ["packages", "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"] - }], - getAllPackageVersionsForPackageOwnedByAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"], - getAllPackageVersionsForPackageOwnedByOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"], - getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"], - getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"], - getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"], - getPackageForUser: ["GET /users/{username}/packages/{package_type}/{package_name}"], - getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], - getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], - getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], - listPackagesForAuthenticatedUser: ["GET /user/packages"], - listPackagesForOrganization: ["GET /orgs/{org}/packages"], - listPackagesForUser: ["GET /users/{username}/packages"], - restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore{?token}"], - restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"], - restorePackageForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"], - restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], - restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], - restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"] - }, - projects: { - addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], - createCard: ["POST /projects/columns/{column_id}/cards"], - createColumn: ["POST /projects/{project_id}/columns"], - createForAuthenticatedUser: ["POST /user/projects"], - createForOrg: ["POST /orgs/{org}/projects"], - createForRepo: ["POST /repos/{owner}/{repo}/projects"], - delete: ["DELETE /projects/{project_id}"], - deleteCard: ["DELETE /projects/columns/cards/{card_id}"], - deleteColumn: ["DELETE /projects/columns/{column_id}"], - get: ["GET /projects/{project_id}"], - getCard: ["GET /projects/columns/cards/{card_id}"], - getColumn: ["GET /projects/columns/{column_id}"], - getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission"], - listCards: ["GET /projects/columns/{column_id}/cards"], - listCollaborators: ["GET /projects/{project_id}/collaborators"], - listColumns: ["GET /projects/{project_id}/columns"], - listForOrg: ["GET /orgs/{org}/projects"], - listForRepo: ["GET /repos/{owner}/{repo}/projects"], - listForUser: ["GET /users/{username}/projects"], - moveCard: ["POST /projects/columns/cards/{card_id}/moves"], - moveColumn: ["POST /projects/columns/{column_id}/moves"], - removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}"], - update: ["PATCH /projects/{project_id}"], - updateCard: ["PATCH /projects/columns/cards/{card_id}"], - updateColumn: ["PATCH /projects/columns/{column_id}"] - }, - pulls: { - checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - create: ["POST /repos/{owner}/{repo}/pulls"], - createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"], - createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"], - deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], - deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"], - get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], - getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], - getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - list: ["GET /repos/{owner}/{repo}/pulls"], - listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"], - listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], - listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], - listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"], - listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], - listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"], - update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], - updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"], - updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], - updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"] - }, - rateLimit: { - get: ["GET /rate_limit"] - }, - reactions: { - createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"], - createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"], - createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], - createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], - createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"], - createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], - createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"], - deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"], - deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"], - deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"], - deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"], - deleteForRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"], - deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"], - deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"], - listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"], - listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], - listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], - listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], - listForRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"], - listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], - listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"] - }, - repos: { - acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}", {}, { - renamed: ["repos", "acceptInvitationForAuthenticatedUser"] - }], - acceptInvitationForAuthenticatedUser: ["PATCH /user/repository_invitations/{invitation_id}"], - addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], - addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], - addStatusCheckContexts: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - addTeamAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - addUserAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], - checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], - checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"], - codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], - compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], - compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"], - createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], - createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"], - createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], - createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], - createDeployKey: ["POST /repos/{owner}/{repo}/keys"], - createDeployment: ["POST /repos/{owner}/{repo}/deployments"], - createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], - createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], - createForAuthenticatedUser: ["POST /user/repos"], - createFork: ["POST /repos/{owner}/{repo}/forks"], - createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"], - createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], - createPagesSite: ["POST /repos/{owner}/{repo}/pages"], - createRelease: ["POST /repos/{owner}/{repo}/releases"], - createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], - createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"], - createWebhook: ["POST /repos/{owner}/{repo}/hooks"], - declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}", {}, { - renamed: ["repos", "declineInvitationForAuthenticatedUser"] - }], - declineInvitationForAuthenticatedUser: ["DELETE /user/repository_invitations/{invitation_id}"], - delete: ["DELETE /repos/{owner}/{repo}"], - deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], - deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - deleteAnEnvironment: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}"], - deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], - deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"], - deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], - deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], - deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], - deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"], - deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], - deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"], - deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], - deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], - deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], - deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"], - deleteTagProtection: ["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"], - deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], - disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"], - disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], - disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"], - downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, { - renamed: ["repos", "downloadZipballArchive"] - }], - downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], - downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], - enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"], - enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], - enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"], - generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"], - get: ["GET /repos/{owner}/{repo}"], - getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], - getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], - getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"], - getAllTopics: ["GET /repos/{owner}/{repo}/topics"], - getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"], - getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], - getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], - getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"], - getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], - getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], - getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"], - getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], - getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], - getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], - getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], - getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], - getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], - getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], - getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], - getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], - getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], - getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"], - getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"], - getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], - getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], - getPages: ["GET /repos/{owner}/{repo}/pages"], - getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], - getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], - getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], - getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], - getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], - getReadme: ["GET /repos/{owner}/{repo}/readme"], - getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], - getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], - getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], - getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], - getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], - getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"], - getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], - getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], - getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"], - getViews: ["GET /repos/{owner}/{repo}/traffic/views"], - getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], - getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"], - getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"], - listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], - listBranches: ["GET /repos/{owner}/{repo}/branches"], - listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"], - listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], - listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"], - listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], - listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"], - listCommits: ["GET /repos/{owner}/{repo}/commits"], - listContributors: ["GET /repos/{owner}/{repo}/contributors"], - listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], - listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], - listDeployments: ["GET /repos/{owner}/{repo}/deployments"], - listForAuthenticatedUser: ["GET /user/repos"], - listForOrg: ["GET /orgs/{org}/repos"], - listForUser: ["GET /users/{username}/repos"], - listForks: ["GET /repos/{owner}/{repo}/forks"], - listInvitations: ["GET /repos/{owner}/{repo}/invitations"], - listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], - listLanguages: ["GET /repos/{owner}/{repo}/languages"], - listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], - listPublic: ["GET /repositories"], - listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"], - listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"], - listReleases: ["GET /repos/{owner}/{repo}/releases"], - listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], - listTags: ["GET /repos/{owner}/{repo}/tags"], - listTeams: ["GET /repos/{owner}/{repo}/teams"], - listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"], - listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], - merge: ["POST /repos/{owner}/{repo}/merges"], - mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], - pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], - redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], - removeAppAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], - removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"], - removeStatusCheckContexts: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - removeStatusCheckProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], - removeTeamAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - removeUserAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], - renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], - replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], - requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], - setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - setAppAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], - setStatusCheckContexts: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - setTeamAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - setUserAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], - testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], - transfer: ["POST /repos/{owner}/{repo}/transfer"], - update: ["PATCH /repos/{owner}/{repo}"], - updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"], - updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], - updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], - updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"], - updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], - updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], - updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"], - updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", {}, { - renamed: ["repos", "updateStatusCheckProtection"] - }], - updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], - updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], - updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"], - uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", { - baseUrl: "https://uploads.github.com" - }] - }, - search: { - code: ["GET /search/code"], - commits: ["GET /search/commits"], - issuesAndPullRequests: ["GET /search/issues"], - labels: ["GET /search/labels"], - repos: ["GET /search/repositories"], - topics: ["GET /search/topics"], - users: ["GET /search/users"] - }, - secretScanning: { - getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"], - listAlertsForEnterprise: ["GET /enterprises/{enterprise}/secret-scanning/alerts"], - listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], - listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], - listLocationsForAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"], - updateAlert: ["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"] - }, - teams: { - addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"], - addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"], - addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"], - checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - create: ["POST /orgs/{org}/teams"], - createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], - createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], - deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], - deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], - getByName: ["GET /orgs/{org}/teams/{team_slug}"], - getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], - getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"], - list: ["GET /orgs/{org}/teams"], - listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], - listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], - listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], - listForAuthenticatedUser: ["GET /user/teams"], - listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], - listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"], - listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], - listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"], - removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"], - removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], - updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] - }, - users: { - addEmailForAuthenticated: ["POST /user/emails", {}, { - renamed: ["users", "addEmailForAuthenticatedUser"] - }], - addEmailForAuthenticatedUser: ["POST /user/emails"], - block: ["PUT /user/blocks/{username}"], - checkBlocked: ["GET /user/blocks/{username}"], - checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], - checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], - createGpgKeyForAuthenticated: ["POST /user/gpg_keys", {}, { - renamed: ["users", "createGpgKeyForAuthenticatedUser"] - }], - createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], - createPublicSshKeyForAuthenticated: ["POST /user/keys", {}, { - renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] - }], - createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], - deleteEmailForAuthenticated: ["DELETE /user/emails", {}, { - renamed: ["users", "deleteEmailForAuthenticatedUser"] - }], - deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], - deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}", {}, { - renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] - }], - deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], - deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}", {}, { - renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] - }], - deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], - follow: ["PUT /user/following/{username}"], - getAuthenticated: ["GET /user"], - getByUsername: ["GET /users/{username}"], - getContextForUser: ["GET /users/{username}/hovercard"], - getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}", {}, { - renamed: ["users", "getGpgKeyForAuthenticatedUser"] - }], - getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], - getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}", {}, { - renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] - }], - getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], - list: ["GET /users"], - listBlockedByAuthenticated: ["GET /user/blocks", {}, { - renamed: ["users", "listBlockedByAuthenticatedUser"] - }], - listBlockedByAuthenticatedUser: ["GET /user/blocks"], - listEmailsForAuthenticated: ["GET /user/emails", {}, { - renamed: ["users", "listEmailsForAuthenticatedUser"] - }], - listEmailsForAuthenticatedUser: ["GET /user/emails"], - listFollowedByAuthenticated: ["GET /user/following", {}, { - renamed: ["users", "listFollowedByAuthenticatedUser"] - }], - listFollowedByAuthenticatedUser: ["GET /user/following"], - listFollowersForAuthenticatedUser: ["GET /user/followers"], - listFollowersForUser: ["GET /users/{username}/followers"], - listFollowingForUser: ["GET /users/{username}/following"], - listGpgKeysForAuthenticated: ["GET /user/gpg_keys", {}, { - renamed: ["users", "listGpgKeysForAuthenticatedUser"] - }], - listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], - listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], - listPublicEmailsForAuthenticated: ["GET /user/public_emails", {}, { - renamed: ["users", "listPublicEmailsForAuthenticatedUser"] - }], - listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], - listPublicKeysForUser: ["GET /users/{username}/keys"], - listPublicSshKeysForAuthenticated: ["GET /user/keys", {}, { - renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] - }], - listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], - setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility", {}, { - renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] - }], - setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"], - unblock: ["DELETE /user/blocks/{username}"], - unfollow: ["DELETE /user/following/{username}"], - updateAuthenticated: ["PATCH /user"] - } -}; - -const VERSION = "5.16.2"; - -function endpointsToMethods(octokit, endpointsMap) { - const newMethods = {}; - - for (const [scope, endpoints] of Object.entries(endpointsMap)) { - for (const [methodName, endpoint] of Object.entries(endpoints)) { - const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); - const endpointDefaults = Object.assign({ - method, - url - }, defaults); - - if (!newMethods[scope]) { - newMethods[scope] = {}; - } - - const scopeMethods = newMethods[scope]; - - if (decorations) { - scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); - continue; - } - - scopeMethods[methodName] = octokit.request.defaults(endpointDefaults); - } - } - - return newMethods; -} - -function decorate(octokit, scope, methodName, defaults, decorations) { - const requestWithDefaults = octokit.request.defaults(defaults); - /* istanbul ignore next */ - - function withDecorations(...args) { - // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData` - - if (decorations.mapToData) { - options = Object.assign({}, options, { - data: options[decorations.mapToData], - [decorations.mapToData]: undefined - }); - return requestWithDefaults(options); - } - - if (decorations.renamed) { - const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); - } - - if (decorations.deprecated) { - octokit.log.warn(decorations.deprecated); - } - - if (decorations.renamedParameters) { - // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - const options = requestWithDefaults.endpoint.merge(...args); - - for (const [name, alias] of Object.entries(decorations.renamedParameters)) { - if (name in options) { - octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); - - if (!(alias in options)) { - options[alias] = options[name]; - } - - delete options[name]; - } - } - - return requestWithDefaults(options); - } // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - - - return requestWithDefaults(...args); - } - - return Object.assign(withDecorations, requestWithDefaults); -} - -function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit, Endpoints); - return { - rest: api - }; -} -restEndpointMethods.VERSION = VERSION; -function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit, Endpoints); - return _objectSpread2(_objectSpread2({}, api), {}, { - rest: api - }); -} -legacyRestEndpointMethods.VERSION = VERSION; - -exports.legacyRestEndpointMethods = legacyRestEndpointMethods; -exports.restEndpointMethods = restEndpointMethods; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 9968: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var BottleneckLight = _interopDefault(__nccwpck_require__(1174)); - -const VERSION = "4.1.0"; - -const noop = () => Promise.resolve(); // @ts-expect-error - - -function wrapRequest(state, request, options) { - return state.retryLimiter.schedule(doRequest, state, request, options); -} // @ts-expect-error - -async function doRequest(state, request, options) { - const isWrite = options.method !== "GET" && options.method !== "HEAD"; - const { - pathname - } = new URL(options.url, "http://github.test"); - const isSearch = options.method === "GET" && pathname.startsWith("/search/"); - const isGraphQL = pathname.startsWith("/graphql"); - const retryCount = ~~options.request.retryCount; - const jobOptions = retryCount > 0 ? { - priority: 0, - weight: 0 - } : {}; - - if (state.clustering) { - // Remove a job from Redis if it has not completed or failed within 60s - // Examples: Node process terminated, client disconnected, etc. - // @ts-expect-error - jobOptions.expiration = 1000 * 60; - } // Guarantee at least 1000ms between writes - // GraphQL can also trigger writes - - - if (isWrite || isGraphQL) { - await state.write.key(state.id).schedule(jobOptions, noop); - } // Guarantee at least 3000ms between requests that trigger notifications - - - if (isWrite && state.triggersNotification(pathname)) { - await state.notifications.key(state.id).schedule(jobOptions, noop); - } // Guarantee at least 2000ms between search requests - - - if (isSearch) { - await state.search.key(state.id).schedule(jobOptions, noop); - } - - const req = state.global.key(state.id).schedule(jobOptions, request, options); - - if (isGraphQL) { - const res = await req; - - if (res.data.errors != null && // @ts-expect-error - res.data.errors.some(error => error.type === "RATE_LIMITED")) { - const error = Object.assign(new Error("GraphQL Rate Limit Exceeded"), { - response: res, - data: res.data - }); - throw error; - } - } - - return req; -} - -var triggersNotificationPaths = ["/orgs/{org}/invitations", "/orgs/{org}/invitations/{invitation_id}", "/orgs/{org}/teams/{team_slug}/discussions", "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "/repos/{owner}/{repo}/collaborators/{username}", "/repos/{owner}/{repo}/commits/{commit_sha}/comments", "/repos/{owner}/{repo}/issues", "/repos/{owner}/{repo}/issues/{issue_number}/comments", "/repos/{owner}/{repo}/pulls", "/repos/{owner}/{repo}/pulls/{pull_number}/comments", "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "/repos/{owner}/{repo}/pulls/{pull_number}/merge", "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "/repos/{owner}/{repo}/releases", "/teams/{team_id}/discussions", "/teams/{team_id}/discussions/{discussion_number}/comments"]; - -function routeMatcher(paths) { - // EXAMPLE. For the following paths: - - /* [ - "/orgs/{org}/invitations", - "/repos/{owner}/{repo}/collaborators/{username}" - ] */ - const regexes = paths.map(path => path.split("/").map(c => c.startsWith("{") ? "(?:.+?)" : c).join("/")); // 'regexes' would contain: - - /* [ - '/orgs/(?:.+?)/invitations', - '/repos/(?:.+?)/(?:.+?)/collaborators/(?:.+?)' - ] */ - - const regex = `^(?:${regexes.map(r => `(?:${r})`).join("|")})[^/]*$`; // 'regex' would contain: - - /* - ^(?:(?:\/orgs\/(?:.+?)\/invitations)|(?:\/repos\/(?:.+?)\/(?:.+?)\/collaborators\/(?:.+?)))[^\/]*$ - It may look scary, but paste it into https://www.debuggex.com/ - and it will make a lot more sense! - */ - - return new RegExp(regex, "i"); -} - -// @ts-expect-error - -const regex = routeMatcher(triggersNotificationPaths); -const triggersNotification = regex.test.bind(regex); -const groups = {}; // @ts-expect-error - -const createGroups = function (Bottleneck, common) { - groups.global = new Bottleneck.Group({ - id: "octokit-global", - maxConcurrent: 10, - ...common - }); - groups.search = new Bottleneck.Group({ - id: "octokit-search", - maxConcurrent: 1, - minTime: 2000, - ...common - }); - groups.write = new Bottleneck.Group({ - id: "octokit-write", - maxConcurrent: 1, - minTime: 1000, - ...common - }); - groups.notifications = new Bottleneck.Group({ - id: "octokit-notifications", - maxConcurrent: 1, - minTime: 3000, - ...common - }); -}; - -function throttling(octokit, octokitOptions) { - const { - enabled = true, - Bottleneck = BottleneckLight, - id = "no-id", - timeout = 1000 * 60 * 2, - // Redis TTL: 2 minutes - connection - } = octokitOptions.throttle || {}; - - if (!enabled) { - return {}; - } - - const common = { - connection, - timeout - }; - - if (groups.global == null) { - createGroups(Bottleneck, common); - } - - const state = Object.assign({ - clustering: connection != null, - triggersNotification, - minimumSecondaryRateRetryAfter: 5, - retryAfterBaseValue: 1000, - retryLimiter: new Bottleneck(), - id, - ...groups - }, octokitOptions.throttle); - const isUsingDeprecatedOnAbuseLimitHandler = typeof state.onAbuseLimit === "function" && state.onAbuseLimit; - - if (typeof (isUsingDeprecatedOnAbuseLimitHandler ? state.onAbuseLimit : state.onSecondaryRateLimit) !== "function" || typeof state.onRateLimit !== "function") { - throw new Error(`octokit/plugin-throttling error: - You must pass the onSecondaryRateLimit and onRateLimit error handlers. - See https://github.com/octokit/rest.js#throttling - - const octokit = new Octokit({ - throttle: { - onSecondaryRateLimit: (retryAfter, options) => {/* ... */}, - onRateLimit: (retryAfter, options) => {/* ... */} - } - }) - `); - } - - const events = {}; - const emitter = new Bottleneck.Events(events); // @ts-expect-error - - events.on("secondary-limit", isUsingDeprecatedOnAbuseLimitHandler ? function (...args) { - octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead"); - return state.onAbuseLimit(...args); - } : state.onSecondaryRateLimit); // @ts-expect-error - - events.on("rate-limit", state.onRateLimit); // @ts-expect-error - - events.on("error", e => octokit.log.warn("Error in throttling-plugin limit handler", e)); // @ts-expect-error - - state.retryLimiter.on("failed", async function (error, info) { - const options = info.args[info.args.length - 1]; - const { - pathname - } = new URL(options.url, "http://github.test"); - const shouldRetryGraphQL = pathname.startsWith("/graphql") && error.status !== 401; - - if (!(shouldRetryGraphQL || error.status === 403)) { - return; - } - - const retryCount = ~~options.request.retryCount; - options.request.retryCount = retryCount; - const { - wantRetry, - retryAfter = 0 - } = await async function () { - if (/\bsecondary rate\b/i.test(error.message)) { - // The user has hit the secondary rate limit. (REST and GraphQL) - // https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits - // The Retry-After header can sometimes be blank when hitting a secondary rate limit, - // but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default. - const retryAfter = Math.max(~~error.response.headers["retry-after"], state.minimumSecondaryRateRetryAfter); - const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit); - return { - wantRetry, - retryAfter - }; - } - - if (error.response.headers != null && error.response.headers["x-ratelimit-remaining"] === "0") { - // The user has used all their allowed calls for the current time period (REST and GraphQL) - // https://docs.github.com/en/rest/reference/rate-limit (REST) - // https://docs.github.com/en/graphql/overview/resource-limitations#rate-limit (GraphQL) - const rateLimitReset = new Date(~~error.response.headers["x-ratelimit-reset"] * 1000).getTime(); - const retryAfter = Math.max(Math.ceil((rateLimitReset - Date.now()) / 1000), 0); - const wantRetry = await emitter.trigger("rate-limit", retryAfter, options, octokit); - return { - wantRetry, - retryAfter - }; - } - - return {}; - }(); - - if (wantRetry) { - options.request.retryCount++; - return retryAfter * state.retryAfterBaseValue; - } - }); - octokit.hook.wrap("request", wrapRequest.bind(null, state)); - return {}; -} -throttling.VERSION = VERSION; -throttling.triggersNotification = triggersNotification; - -exports.throttling = throttling; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 3682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var register = __nccwpck_require__(4670) -var addHook = __nccwpck_require__(5549) -var removeHook = __nccwpck_require__(6819) - -// bind with array of arguments: https://stackoverflow.com/a/21792913 -var bind = Function.bind -var bindable = bind.bind(bind) - -function bindApi (hook, state, name) { - var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) - hook.api = { remove: removeHookRef } - hook.remove = removeHookRef - - ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { - var args = name ? [state, kind, name] : [state, kind] - hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) - }) -} - -function HookSingular () { - var singularHookName = 'h' - var singularHookState = { - registry: {} - } - var singularHook = register.bind(null, singularHookState, singularHookName) - bindApi(singularHook, singularHookState, singularHookName) - return singularHook -} - -function HookCollection () { - var state = { - registry: {} - } - - var hook = register.bind(null, state) - bindApi(hook, state) - - return hook -} - -var collectionHookDeprecationMessageDisplayed = false -function Hook () { - if (!collectionHookDeprecationMessageDisplayed) { - console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') - collectionHookDeprecationMessageDisplayed = true - } - return HookCollection() -} - -Hook.Singular = HookSingular.bind() -Hook.Collection = HookCollection.bind() - -module.exports = Hook -// expose constructors as a named property for TypeScript -module.exports.Hook = Hook -module.exports.Singular = Hook.Singular -module.exports.Collection = Hook.Collection - - -/***/ }), - -/***/ 5549: -/***/ ((module) => { - -module.exports = addHook; - -function addHook(state, kind, name, hook) { - var orig = hook; - if (!state.registry[name]) { - state.registry[name] = []; - } - - if (kind === "before") { - hook = function (method, options) { - return Promise.resolve() - .then(orig.bind(null, options)) - .then(method.bind(null, options)); - }; - } - - if (kind === "after") { - hook = function (method, options) { - var result; - return Promise.resolve() - .then(method.bind(null, options)) - .then(function (result_) { - result = result_; - return orig(result, options); - }) - .then(function () { - return result; - }); - }; - } - - if (kind === "error") { - hook = function (method, options) { - return Promise.resolve() - .then(method.bind(null, options)) - .catch(function (error) { - return orig(error, options); - }); - }; - } - - state.registry[name].push({ - hook: hook, - orig: orig, - }); -} - - -/***/ }), - -/***/ 4670: -/***/ ((module) => { - -module.exports = register; - -function register(state, name, method, options) { - if (typeof method !== "function") { - throw new Error("method for before hook must be a function"); - } - - if (!options) { - options = {}; - } - - if (Array.isArray(name)) { - return name.reverse().reduce(function (callback, name) { - return register.bind(null, state, name, callback, options); - }, method)(); - } - - return Promise.resolve().then(function () { - if (!state.registry[name]) { - return method(options); - } - - return state.registry[name].reduce(function (method, registered) { - return registered.hook.bind(null, method, options); - }, method)(); - }); -} - - -/***/ }), - -/***/ 6819: -/***/ ((module) => { - -module.exports = removeHook; - -function removeHook(state, name, method) { - if (!state.registry[name]) { - return; - } - - var index = state.registry[name] - .map(function (registered) { - return registered.orig; - }) - .indexOf(method); - - if (index === -1) { - return; - } - - state.registry[name].splice(index, 1); -} - - -/***/ }), - -/***/ 1174: -/***/ (function(module) { - -/** - * This file contains the Bottleneck library (MIT), compiled to ES2017, and without Clustering support. - * https://github.com/SGrondin/bottleneck - */ -(function (global, factory) { - true ? module.exports = factory() : - 0; -}(this, (function () { 'use strict'; - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function getCjsExportFromNamespace (n) { - return n && n['default'] || n; - } - - var load = function(received, defaults, onto = {}) { - var k, ref, v; - for (k in defaults) { - v = defaults[k]; - onto[k] = (ref = received[k]) != null ? ref : v; - } - return onto; - }; - - var overwrite = function(received, defaults, onto = {}) { - var k, v; - for (k in received) { - v = received[k]; - if (defaults[k] !== void 0) { - onto[k] = v; - } - } - return onto; - }; - - var parser = { - load: load, - overwrite: overwrite - }; - - var DLList; - - DLList = class DLList { - constructor(incr, decr) { - this.incr = incr; - this.decr = decr; - this._first = null; - this._last = null; - this.length = 0; - } - - push(value) { - var node; - this.length++; - if (typeof this.incr === "function") { - this.incr(); - } - node = { - value, - prev: this._last, - next: null - }; - if (this._last != null) { - this._last.next = node; - this._last = node; - } else { - this._first = this._last = node; - } - return void 0; - } - - shift() { - var value; - if (this._first == null) { - return; - } else { - this.length--; - if (typeof this.decr === "function") { - this.decr(); - } - } - value = this._first.value; - if ((this._first = this._first.next) != null) { - this._first.prev = null; - } else { - this._last = null; - } - return value; - } - - first() { - if (this._first != null) { - return this._first.value; - } - } - - getArray() { - var node, ref, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, ref.value)); - } - return results; - } - - forEachShift(cb) { - var node; - node = this.shift(); - while (node != null) { - (cb(node), node = this.shift()); - } - return void 0; - } - - debug() { - var node, ref, ref1, ref2, results; - node = this._first; - results = []; - while (node != null) { - results.push((ref = node, node = node.next, { - value: ref.value, - prev: (ref1 = ref.prev) != null ? ref1.value : void 0, - next: (ref2 = ref.next) != null ? ref2.value : void 0 - })); - } - return results; - } - - }; - - var DLList_1 = DLList; - - var Events; - - Events = class Events { - constructor(instance) { - this.instance = instance; - this._events = {}; - if ((this.instance.on != null) || (this.instance.once != null) || (this.instance.removeAllListeners != null)) { - throw new Error("An Emitter already exists for this object"); - } - this.instance.on = (name, cb) => { - return this._addListener(name, "many", cb); - }; - this.instance.once = (name, cb) => { - return this._addListener(name, "once", cb); - }; - this.instance.removeAllListeners = (name = null) => { - if (name != null) { - return delete this._events[name]; - } else { - return this._events = {}; - } - }; - } - - _addListener(name, status, cb) { - var base; - if ((base = this._events)[name] == null) { - base[name] = []; - } - this._events[name].push({cb, status}); - return this.instance; - } - - listenerCount(name) { - if (this._events[name] != null) { - return this._events[name].length; - } else { - return 0; - } - } - - async trigger(name, ...args) { - var e, promises; - try { - if (name !== "debug") { - this.trigger("debug", `Event triggered: ${name}`, args); - } - if (this._events[name] == null) { - return; - } - this._events[name] = this._events[name].filter(function(listener) { - return listener.status !== "none"; - }); - promises = this._events[name].map(async(listener) => { - var e, returned; - if (listener.status === "none") { - return; - } - if (listener.status === "once") { - listener.status = "none"; - } - try { - returned = typeof listener.cb === "function" ? listener.cb(...args) : void 0; - if (typeof (returned != null ? returned.then : void 0) === "function") { - return (await returned); - } else { - return returned; - } - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - }); - return ((await Promise.all(promises))).find(function(x) { - return x != null; - }); - } catch (error) { - e = error; - { - this.trigger("error", e); - } - return null; - } - } - - }; - - var Events_1 = Events; - - var DLList$1, Events$1, Queues; - - DLList$1 = DLList_1; - - Events$1 = Events_1; - - Queues = class Queues { - constructor(num_priorities) { - var i; - this.Events = new Events$1(this); - this._length = 0; - this._lists = (function() { - var j, ref, results; - results = []; - for (i = j = 1, ref = num_priorities; (1 <= ref ? j <= ref : j >= ref); i = 1 <= ref ? ++j : --j) { - results.push(new DLList$1((() => { - return this.incr(); - }), (() => { - return this.decr(); - }))); - } - return results; - }).call(this); - } - - incr() { - if (this._length++ === 0) { - return this.Events.trigger("leftzero"); - } - } - - decr() { - if (--this._length === 0) { - return this.Events.trigger("zero"); - } - } - - push(job) { - return this._lists[job.options.priority].push(job); - } - - queued(priority) { - if (priority != null) { - return this._lists[priority].length; - } else { - return this._length; - } - } - - shiftAll(fn) { - return this._lists.forEach(function(list) { - return list.forEachShift(fn); - }); - } - - getFirst(arr = this._lists) { - var j, len, list; - for (j = 0, len = arr.length; j < len; j++) { - list = arr[j]; - if (list.length > 0) { - return list; - } - } - return []; - } - - shiftLastFrom(priority) { - return this.getFirst(this._lists.slice(priority).reverse()).shift(); - } - - }; - - var Queues_1 = Queues; - - var BottleneckError; - - BottleneckError = class BottleneckError extends Error {}; - - var BottleneckError_1 = BottleneckError; - - var BottleneckError$1, DEFAULT_PRIORITY, Job, NUM_PRIORITIES, parser$1; - - NUM_PRIORITIES = 10; - - DEFAULT_PRIORITY = 5; - - parser$1 = parser; - - BottleneckError$1 = BottleneckError_1; - - Job = class Job { - constructor(task, args, options, jobDefaults, rejectOnDrop, Events, _states, Promise) { - this.task = task; - this.args = args; - this.rejectOnDrop = rejectOnDrop; - this.Events = Events; - this._states = _states; - this.Promise = Promise; - this.options = parser$1.load(options, jobDefaults); - this.options.priority = this._sanitizePriority(this.options.priority); - if (this.options.id === jobDefaults.id) { - this.options.id = `${this.options.id}-${this._randomIndex()}`; - } - this.promise = new this.Promise((_resolve, _reject) => { - this._resolve = _resolve; - this._reject = _reject; - }); - this.retryCount = 0; - } - - _sanitizePriority(priority) { - var sProperty; - sProperty = ~~priority !== priority ? DEFAULT_PRIORITY : priority; - if (sProperty < 0) { - return 0; - } else if (sProperty > NUM_PRIORITIES - 1) { - return NUM_PRIORITIES - 1; - } else { - return sProperty; - } - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - doDrop({error, message = "This job has been dropped by Bottleneck"} = {}) { - if (this._states.remove(this.options.id)) { - if (this.rejectOnDrop) { - this._reject(error != null ? error : new BottleneckError$1(message)); - } - this.Events.trigger("dropped", {args: this.args, options: this.options, task: this.task, promise: this.promise}); - return true; - } else { - return false; - } - } - - _assertStatus(expected) { - var status; - status = this._states.jobStatus(this.options.id); - if (!(status === expected || (expected === "DONE" && status === null))) { - throw new BottleneckError$1(`Invalid job status ${status}, expected ${expected}. Please open an issue at https://github.com/SGrondin/bottleneck/issues`); - } - } - - doReceive() { - this._states.start(this.options.id); - return this.Events.trigger("received", {args: this.args, options: this.options}); - } - - doQueue(reachedHWM, blocked) { - this._assertStatus("RECEIVED"); - this._states.next(this.options.id); - return this.Events.trigger("queued", {args: this.args, options: this.options, reachedHWM, blocked}); - } - - doRun() { - if (this.retryCount === 0) { - this._assertStatus("QUEUED"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - return this.Events.trigger("scheduled", {args: this.args, options: this.options}); - } - - async doExecute(chained, clearGlobalState, run, free) { - var error, eventInfo, passed; - if (this.retryCount === 0) { - this._assertStatus("RUNNING"); - this._states.next(this.options.id); - } else { - this._assertStatus("EXECUTING"); - } - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - this.Events.trigger("executing", eventInfo); - try { - passed = (await (chained != null ? chained.schedule(this.options, this.task, ...this.args) : this.task(...this.args))); - if (clearGlobalState()) { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._resolve(passed); - } - } catch (error1) { - error = error1; - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - } - - doExpire(clearGlobalState, run, free) { - var error, eventInfo; - if (this._states.jobStatus(this.options.id === "RUNNING")) { - this._states.next(this.options.id); - } - this._assertStatus("EXECUTING"); - eventInfo = {args: this.args, options: this.options, retryCount: this.retryCount}; - error = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error, eventInfo, clearGlobalState, run, free); - } - - async _onFailure(error, eventInfo, clearGlobalState, run, free) { - var retry, retryAfter; - if (clearGlobalState()) { - retry = (await this.Events.trigger("failed", error, eventInfo)); - if (retry != null) { - retryAfter = ~~retry; - this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); - this.retryCount++; - return run(retryAfter); - } else { - this.doDone(eventInfo); - await free(this.options, eventInfo); - this._assertStatus("DONE"); - return this._reject(error); - } - } - } - - doDone(eventInfo) { - this._assertStatus("EXECUTING"); - this._states.next(this.options.id); - return this.Events.trigger("done", eventInfo); - } - - }; - - var Job_1 = Job; - - var BottleneckError$2, LocalDatastore, parser$2; - - parser$2 = parser; - - BottleneckError$2 = BottleneckError_1; - - LocalDatastore = class LocalDatastore { - constructor(instance, storeOptions, storeInstanceOptions) { - this.instance = instance; - this.storeOptions = storeOptions; - this.clientId = this.instance._randomIndex(); - parser$2.load(storeInstanceOptions, storeInstanceOptions, this); - this._nextRequest = this._lastReservoirRefresh = this._lastReservoirIncrease = Date.now(); - this._running = 0; - this._done = 0; - this._unblockTime = 0; - this.ready = this.Promise.resolve(); - this.clients = {}; - this._startHeartbeat(); - } - - _startHeartbeat() { - var base; - if ((this.heartbeat == null) && (((this.storeOptions.reservoirRefreshInterval != null) && (this.storeOptions.reservoirRefreshAmount != null)) || ((this.storeOptions.reservoirIncreaseInterval != null) && (this.storeOptions.reservoirIncreaseAmount != null)))) { - return typeof (base = (this.heartbeat = setInterval(() => { - var amount, incr, maximum, now, reservoir; - now = Date.now(); - if ((this.storeOptions.reservoirRefreshInterval != null) && now >= this._lastReservoirRefresh + this.storeOptions.reservoirRefreshInterval) { - this._lastReservoirRefresh = now; - this.storeOptions.reservoir = this.storeOptions.reservoirRefreshAmount; - this.instance._drainAll(this.computeCapacity()); - } - if ((this.storeOptions.reservoirIncreaseInterval != null) && now >= this._lastReservoirIncrease + this.storeOptions.reservoirIncreaseInterval) { - ({ - reservoirIncreaseAmount: amount, - reservoirIncreaseMaximum: maximum, - reservoir - } = this.storeOptions); - this._lastReservoirIncrease = now; - incr = maximum != null ? Math.min(amount, maximum - reservoir) : amount; - if (incr > 0) { - this.storeOptions.reservoir += incr; - return this.instance._drainAll(this.computeCapacity()); - } - } - }, this.heartbeatInterval))).unref === "function" ? base.unref() : void 0; - } else { - return clearInterval(this.heartbeat); - } - } - - async __publish__(message) { - await this.yieldLoop(); - return this.instance.Events.trigger("message", message.toString()); - } - - async __disconnect__(flush) { - await this.yieldLoop(); - clearInterval(this.heartbeat); - return this.Promise.resolve(); - } - - yieldLoop(t = 0) { - return new this.Promise(function(resolve, reject) { - return setTimeout(resolve, t); - }); - } - - computePenalty() { - var ref; - return (ref = this.storeOptions.penalty) != null ? ref : (15 * this.storeOptions.minTime) || 5000; - } - - async __updateSettings__(options) { - await this.yieldLoop(); - parser$2.overwrite(options, options, this.storeOptions); - this._startHeartbeat(); - this.instance._drainAll(this.computeCapacity()); - return true; - } - - async __running__() { - await this.yieldLoop(); - return this._running; - } - - async __queued__() { - await this.yieldLoop(); - return this.instance.queued(); - } - - async __done__() { - await this.yieldLoop(); - return this._done; - } - - async __groupCheck__(time) { - await this.yieldLoop(); - return (this._nextRequest + this.timeout) < time; - } - - computeCapacity() { - var maxConcurrent, reservoir; - ({maxConcurrent, reservoir} = this.storeOptions); - if ((maxConcurrent != null) && (reservoir != null)) { - return Math.min(maxConcurrent - this._running, reservoir); - } else if (maxConcurrent != null) { - return maxConcurrent - this._running; - } else if (reservoir != null) { - return reservoir; - } else { - return null; - } - } - - conditionsCheck(weight) { - var capacity; - capacity = this.computeCapacity(); - return (capacity == null) || weight <= capacity; - } - - async __incrementReservoir__(incr) { - var reservoir; - await this.yieldLoop(); - reservoir = this.storeOptions.reservoir += incr; - this.instance._drainAll(this.computeCapacity()); - return reservoir; - } - - async __currentReservoir__() { - await this.yieldLoop(); - return this.storeOptions.reservoir; - } - - isBlocked(now) { - return this._unblockTime >= now; - } - - check(weight, now) { - return this.conditionsCheck(weight) && (this._nextRequest - now) <= 0; - } - - async __check__(weight) { - var now; - await this.yieldLoop(); - now = Date.now(); - return this.check(weight, now); - } - - async __register__(index, weight, expiration) { - var now, wait; - await this.yieldLoop(); - now = Date.now(); - if (this.conditionsCheck(weight)) { - this._running += weight; - if (this.storeOptions.reservoir != null) { - this.storeOptions.reservoir -= weight; - } - wait = Math.max(this._nextRequest - now, 0); - this._nextRequest = now + wait + this.storeOptions.minTime; - return { - success: true, - wait, - reservoir: this.storeOptions.reservoir - }; - } else { - return { - success: false - }; - } - } - - strategyIsBlock() { - return this.storeOptions.strategy === 3; - } - - async __submit__(queueLength, weight) { - var blocked, now, reachedHWM; - await this.yieldLoop(); - if ((this.storeOptions.maxConcurrent != null) && weight > this.storeOptions.maxConcurrent) { - throw new BottleneckError$2(`Impossible to add a job having a weight of ${weight} to a limiter having a maxConcurrent setting of ${this.storeOptions.maxConcurrent}`); - } - now = Date.now(); - reachedHWM = (this.storeOptions.highWater != null) && queueLength === this.storeOptions.highWater && !this.check(weight, now); - blocked = this.strategyIsBlock() && (reachedHWM || this.isBlocked(now)); - if (blocked) { - this._unblockTime = now + this.computePenalty(); - this._nextRequest = this._unblockTime + this.storeOptions.minTime; - this.instance._dropAllQueued(); - } - return { - reachedHWM, - blocked, - strategy: this.storeOptions.strategy - }; - } - - async __free__(index, weight) { - await this.yieldLoop(); - this._running -= weight; - this._done += weight; - this.instance._drainAll(this.computeCapacity()); - return { - running: this._running - }; - } - - }; - - var LocalDatastore_1 = LocalDatastore; - - var BottleneckError$3, States; - - BottleneckError$3 = BottleneckError_1; - - States = class States { - constructor(status1) { - this.status = status1; - this._jobs = {}; - this.counts = this.status.map(function() { - return 0; - }); - } - - next(id) { - var current, next; - current = this._jobs[id]; - next = current + 1; - if ((current != null) && next < this.status.length) { - this.counts[current]--; - this.counts[next]++; - return this._jobs[id]++; - } else if (current != null) { - this.counts[current]--; - return delete this._jobs[id]; - } - } - - start(id) { - var initial; - initial = 0; - this._jobs[id] = initial; - return this.counts[initial]++; - } - - remove(id) { - var current; - current = this._jobs[id]; - if (current != null) { - this.counts[current]--; - delete this._jobs[id]; - } - return current != null; - } - - jobStatus(id) { - var ref; - return (ref = this.status[this._jobs[id]]) != null ? ref : null; - } - - statusJobs(status) { - var k, pos, ref, results, v; - if (status != null) { - pos = this.status.indexOf(status); - if (pos < 0) { - throw new BottleneckError$3(`status must be one of ${this.status.join(', ')}`); - } - ref = this._jobs; - results = []; - for (k in ref) { - v = ref[k]; - if (v === pos) { - results.push(k); - } - } - return results; - } else { - return Object.keys(this._jobs); - } - } - - statusCounts() { - return this.counts.reduce(((acc, v, i) => { - acc[this.status[i]] = v; - return acc; - }), {}); - } - - }; - - var States_1 = States; - - var DLList$2, Sync; - - DLList$2 = DLList_1; - - Sync = class Sync { - constructor(name, Promise) { - this.schedule = this.schedule.bind(this); - this.name = name; - this.Promise = Promise; - this._running = 0; - this._queue = new DLList$2(); - } - - isEmpty() { - return this._queue.length === 0; - } - - async _tryToRun() { - var args, cb, error, reject, resolve, returned, task; - if ((this._running < 1) && this._queue.length > 0) { - this._running++; - ({task, args, resolve, reject} = this._queue.shift()); - cb = (await (async function() { - try { - returned = (await task(...args)); - return function() { - return resolve(returned); - }; - } catch (error1) { - error = error1; - return function() { - return reject(error); - }; - } - })()); - this._running--; - this._tryToRun(); - return cb(); - } - } - - schedule(task, ...args) { - var promise, reject, resolve; - resolve = reject = null; - promise = new this.Promise(function(_resolve, _reject) { - resolve = _resolve; - return reject = _reject; - }); - this._queue.push({task, args, resolve, reject}); - this._tryToRun(); - return promise; - } - - }; - - var Sync_1 = Sync; - - var version = "2.19.5"; - var version$1 = { - version: version - }; - - var version$2 = /*#__PURE__*/Object.freeze({ - version: version, - default: version$1 - }); - - var require$$2 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$3 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$4 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var Events$2, Group, IORedisConnection$1, RedisConnection$1, Scripts$1, parser$3; - - parser$3 = parser; - - Events$2 = Events_1; - - RedisConnection$1 = require$$2; - - IORedisConnection$1 = require$$3; - - Scripts$1 = require$$4; - - Group = (function() { - class Group { - constructor(limiterOptions = {}) { - this.deleteKey = this.deleteKey.bind(this); - this.limiterOptions = limiterOptions; - parser$3.load(this.limiterOptions, this.defaults, this); - this.Events = new Events$2(this); - this.instances = {}; - this.Bottleneck = Bottleneck_1; - this._startAutoCleanup(); - this.sharedConnection = this.connection != null; - if (this.connection == null) { - if (this.limiterOptions.datastore === "redis") { - this.connection = new RedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } else if (this.limiterOptions.datastore === "ioredis") { - this.connection = new IORedisConnection$1(Object.assign({}, this.limiterOptions, {Events: this.Events})); - } - } - } - - key(key = "") { - var ref; - return (ref = this.instances[key]) != null ? ref : (() => { - var limiter; - limiter = this.instances[key] = new this.Bottleneck(Object.assign(this.limiterOptions, { - id: `${this.id}-${key}`, - timeout: this.timeout, - connection: this.connection - })); - this.Events.trigger("created", limiter, key); - return limiter; - })(); - } - - async deleteKey(key = "") { - var deleted, instance; - instance = this.instances[key]; - if (this.connection) { - deleted = (await this.connection.__runCommand__(['del', ...Scripts$1.allKeys(`${this.id}-${key}`)])); - } - if (instance != null) { - delete this.instances[key]; - await instance.disconnect(); - } - return (instance != null) || deleted > 0; - } - - limiters() { - var k, ref, results, v; - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - results.push({ - key: k, - limiter: v - }); - } - return results; - } - - keys() { - return Object.keys(this.instances); - } - - async clusterKeys() { - var cursor, end, found, i, k, keys, len, next, start; - if (this.connection == null) { - return this.Promise.resolve(this.keys()); - } - keys = []; - cursor = null; - start = `b_${this.id}-`.length; - end = "_settings".length; - while (cursor !== 0) { - [next, found] = (await this.connection.__runCommand__(["scan", cursor != null ? cursor : 0, "match", `b_${this.id}-*_settings`, "count", 10000])); - cursor = ~~next; - for (i = 0, len = found.length; i < len; i++) { - k = found[i]; - keys.push(k.slice(start, -end)); - } - } - return keys; - } - - _startAutoCleanup() { - var base; - clearInterval(this.interval); - return typeof (base = (this.interval = setInterval(async() => { - var e, k, ref, results, time, v; - time = Date.now(); - ref = this.instances; - results = []; - for (k in ref) { - v = ref[k]; - try { - if ((await v._store.__groupCheck__(time))) { - results.push(this.deleteKey(k)); - } else { - results.push(void 0); - } - } catch (error) { - e = error; - results.push(v.Events.trigger("error", e)); - } - } - return results; - }, this.timeout / 2))).unref === "function" ? base.unref() : void 0; - } - - updateSettings(options = {}) { - parser$3.overwrite(options, this.defaults, this); - parser$3.overwrite(options, options, this.limiterOptions); - if (options.timeout != null) { - return this._startAutoCleanup(); - } - } - - disconnect(flush = true) { - var ref; - if (!this.sharedConnection) { - return (ref = this.connection) != null ? ref.disconnect(flush) : void 0; - } - } - - } - Group.prototype.defaults = { - timeout: 1000 * 60 * 5, - connection: null, - Promise: Promise, - id: "group-key" - }; - - return Group; - - }).call(commonjsGlobal); - - var Group_1 = Group; - - var Batcher, Events$3, parser$4; - - parser$4 = parser; - - Events$3 = Events_1; - - Batcher = (function() { - class Batcher { - constructor(options = {}) { - this.options = options; - parser$4.load(this.options, this.defaults, this); - this.Events = new Events$3(this); - this._arr = []; - this._resetPromise(); - this._lastFlush = Date.now(); - } - - _resetPromise() { - return this._promise = new this.Promise((res, rej) => { - return this._resolve = res; - }); - } - - _flush() { - clearTimeout(this._timeout); - this._lastFlush = Date.now(); - this._resolve(); - this.Events.trigger("batch", this._arr); - this._arr = []; - return this._resetPromise(); - } - - add(data) { - var ret; - this._arr.push(data); - ret = this._promise; - if (this._arr.length === this.maxSize) { - this._flush(); - } else if ((this.maxTime != null) && this._arr.length === 1) { - this._timeout = setTimeout(() => { - return this._flush(); - }, this.maxTime); - } - return ret; - } - - } - Batcher.prototype.defaults = { - maxTime: null, - maxSize: null, - Promise: Promise - }; - - return Batcher; - - }).call(commonjsGlobal); - - var Batcher_1 = Batcher; - - var require$$4$1 = () => console.log('You must import the full version of Bottleneck in order to use this feature.'); - - var require$$8 = getCjsExportFromNamespace(version$2); - - var Bottleneck, DEFAULT_PRIORITY$1, Events$4, Job$1, LocalDatastore$1, NUM_PRIORITIES$1, Queues$1, RedisDatastore$1, States$1, Sync$1, parser$5, - splice = [].splice; - - NUM_PRIORITIES$1 = 10; - - DEFAULT_PRIORITY$1 = 5; - - parser$5 = parser; - - Queues$1 = Queues_1; - - Job$1 = Job_1; - - LocalDatastore$1 = LocalDatastore_1; - - RedisDatastore$1 = require$$4$1; - - Events$4 = Events_1; - - States$1 = States_1; - - Sync$1 = Sync_1; - - Bottleneck = (function() { - class Bottleneck { - constructor(options = {}, ...invalid) { - var storeInstanceOptions, storeOptions; - this._addToQueue = this._addToQueue.bind(this); - this._validateOptions(options, invalid); - parser$5.load(options, this.instanceDefaults, this); - this._queues = new Queues$1(NUM_PRIORITIES$1); - this._scheduled = {}; - this._states = new States$1(["RECEIVED", "QUEUED", "RUNNING", "EXECUTING"].concat(this.trackDoneStatus ? ["DONE"] : [])); - this._limiter = null; - this.Events = new Events$4(this); - this._submitLock = new Sync$1("submit", this.Promise); - this._registerLock = new Sync$1("register", this.Promise); - storeOptions = parser$5.load(options, this.storeDefaults, {}); - this._store = (function() { - if (this.datastore === "redis" || this.datastore === "ioredis" || (this.connection != null)) { - storeInstanceOptions = parser$5.load(options, this.redisStoreDefaults, {}); - return new RedisDatastore$1(this, storeOptions, storeInstanceOptions); - } else if (this.datastore === "local") { - storeInstanceOptions = parser$5.load(options, this.localStoreDefaults, {}); - return new LocalDatastore$1(this, storeOptions, storeInstanceOptions); - } else { - throw new Bottleneck.prototype.BottleneckError(`Invalid datastore type: ${this.datastore}`); - } - }).call(this); - this._queues.on("leftzero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.ref === "function" ? ref.ref() : void 0 : void 0; - }); - this._queues.on("zero", () => { - var ref; - return (ref = this._store.heartbeat) != null ? typeof ref.unref === "function" ? ref.unref() : void 0 : void 0; - }); - } - - _validateOptions(options, invalid) { - if (!((options != null) && typeof options === "object" && invalid.length === 0)) { - throw new Bottleneck.prototype.BottleneckError("Bottleneck v2 takes a single object argument. Refer to https://github.com/SGrondin/bottleneck#upgrading-to-v2 if you're upgrading from Bottleneck v1."); - } - } - - ready() { - return this._store.ready; - } - - clients() { - return this._store.clients; - } - - channel() { - return `b_${this.id}`; - } - - channel_client() { - return `b_${this.id}_${this._store.clientId}`; - } - - publish(message) { - return this._store.__publish__(message); - } - - disconnect(flush = true) { - return this._store.__disconnect__(flush); - } - - chain(_limiter) { - this._limiter = _limiter; - return this; - } - - queued(priority) { - return this._queues.queued(priority); - } - - clusterQueued() { - return this._store.__queued__(); - } - - empty() { - return this.queued() === 0 && this._submitLock.isEmpty(); - } - - running() { - return this._store.__running__(); - } - - done() { - return this._store.__done__(); - } - - jobStatus(id) { - return this._states.jobStatus(id); - } - - jobs(status) { - return this._states.statusJobs(status); - } - - counts() { - return this._states.statusCounts(); - } - - _randomIndex() { - return Math.random().toString(36).slice(2); - } - - check(weight = 1) { - return this._store.__check__(weight); - } - - _clearGlobalState(index) { - if (this._scheduled[index] != null) { - clearTimeout(this._scheduled[index].expiration); - delete this._scheduled[index]; - return true; - } else { - return false; - } - } - - async _free(index, job, options, eventInfo) { - var e, running; - try { - ({running} = (await this._store.__free__(index, options.weight))); - this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); - if (running === 0 && this.empty()) { - return this.Events.trigger("idle"); - } - } catch (error1) { - e = error1; - return this.Events.trigger("error", e); - } - } - - _run(index, job, wait) { - var clearGlobalState, free, run; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function() { - return job.doExpire(clearGlobalState, run, free); - }, wait + job.options.expiration) : void 0, - job: job - }; - } - - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - queue = this._queues.getFirst(); - ({options, args} = next = queue.first()); - if ((capacity != null) && options.weight > capacity) { - return this.Promise.resolve(null); - } - this.Events.trigger("debug", `Draining ${options.id}`, {args, options}); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({success, wait, reservoir}) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, {success, args, options}); - if (success) { - queue.shift(); - empty = this.empty(); - if (empty) { - this.Events.trigger("empty"); - } - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - this._run(index, next, wait); - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); - }); - } - - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then((drained) => { - var newCapacity; - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch((e) => { - return this.Events.trigger("error", e); - }); - } - - _dropAllQueued(message) { - return this._queues.shiftAll(function(job) { - return job.doDrop({message}); - }); - } - - stop(options = {}) { - var done, waitForExecuting; - options = parser$5.load(options, this.stopDefaults); - waitForExecuting = (at) => { - var finished; - finished = () => { - var counts; - counts = this._states.counts; - return (counts[0] + counts[1] + counts[2] + counts[3]) === at; - }; - return new this.Promise((resolve, reject) => { - if (finished()) { - return resolve(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve(); - } - }); - } - }); - }; - done = options.dropWaitingJobs ? (this._run = function(index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - for (k in ref) { - v = ref[k]; - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } - } - this._dropAllQueued(options.dropErrorMessage); - return waitForExecuting(0); - }); - })) : this.schedule({ - priority: NUM_PRIORITIES$1 - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - this._receive = function(job) { - return job._reject(new Bottleneck.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - this.stop = () => { - return this.Promise.reject(new Bottleneck.prototype.BottleneckError("stop() has already been called")); - }; - return done; - } - - async _addToQueue(job) { - var args, blocked, error, options, reachedHWM, shifted, strategy; - ({args, options} = job); - try { - ({reachedHWM, blocked, strategy} = (await this._store.__submit__(this.queued(), options.weight))); - } catch (error1) { - error = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, {args, options, error}); - job.doDrop({error}); - return false; - } - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck.prototype.strategy.OVERFLOW ? job : void 0; - if (shifted != null) { - shifted.doDrop(); - } - if ((shifted == null) || strategy === Bottleneck.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); - } - return reachedHWM; - } - } - job.doQueue(reachedHWM, blocked); - this._queues.push(job); - await this._drainAll(); - return reachedHWM; - } - - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } - - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - if (typeof args[0] === "function") { - ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); - options = parser$5.load({}, this.jobDefaults); - } else { - ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); - options = parser$5.load(options, this.jobDefaults); - } - task = (...args) => { - return new this.Promise(function(resolve, reject) { - return fn(...args, function(...args) { - return (args[0] != null ? reject : resolve)(args); - }); - }); - }; - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function(args) { - return typeof cb === "function" ? cb(...args) : void 0; - }).catch(function(args) { - if (Array.isArray(args)) { - return typeof cb === "function" ? cb(...args) : void 0; - } else { - return typeof cb === "function" ? cb(args) : void 0; - } - }); - return this._receive(job); - } - - schedule(...args) { - var job, options, task; - if (typeof args[0] === "function") { - [task, ...args] = args; - options = {}; - } else { - [options, task, ...args] = args; - } - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - this._receive(job); - return job.promise; - } - - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - wrapped = function(...args) { - return schedule(fn.bind(this), ...args); - }; - wrapped.withOptions = function(options, ...args) { - return schedule(options, fn, ...args); - }; - return wrapped; - } - - async updateSettings(options = {}) { - await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); - parser$5.overwrite(options, this.instanceDefaults, this); - return this; - } - - currentReservoir() { - return this._store.__currentReservoir__(); - } - - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); - } - - } - Bottleneck.default = Bottleneck; - - Bottleneck.Events = Events$4; - - Bottleneck.version = Bottleneck.prototype.version = require$$8.version; - - Bottleneck.strategy = Bottleneck.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - - Bottleneck.BottleneckError = Bottleneck.prototype.BottleneckError = BottleneckError_1; - - Bottleneck.Group = Bottleneck.prototype.Group = Group_1; - - Bottleneck.RedisConnection = Bottleneck.prototype.RedisConnection = require$$2; - - Bottleneck.IORedisConnection = Bottleneck.prototype.IORedisConnection = require$$3; - - Bottleneck.Batcher = Bottleneck.prototype.Batcher = Batcher_1; - - Bottleneck.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY$1, - weight: 1, - expiration: null, - id: "" - }; - - Bottleneck.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - - Bottleneck.prototype.localStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 250 - }; - - Bottleneck.prototype.redisStoreDefaults = { - Promise: Promise, - timeout: null, - heartbeatInterval: 5000, - clientTimeout: 10000, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null - }; - - Bottleneck.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise: Promise - }; - - Bottleneck.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." - }; - - return Bottleneck; - - }).call(commonjsGlobal); - - var Bottleneck_1 = Bottleneck; - - var lib = Bottleneck_1; - - return lib; - -}))); - - -/***/ }), - -/***/ 8932: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - - this.name = 'Deprecation'; - } - -} - -exports.Deprecation = Deprecation; - - -/***/ }), - -/***/ 8685: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var iconvLite = __nccwpck_require__(9032); - -// Expose to the world -module.exports.O = convert; - -/** - * Convert encoding of an UTF-8 string or a buffer - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convert(str, to, from) { - from = checkEncoding(from || 'UTF-8'); - to = checkEncoding(to || 'UTF-8'); - str = str || ''; - - var result; - - if (from !== 'UTF-8' && typeof str === 'string') { - str = Buffer.from(str, 'binary'); - } - - if (from === to) { - if (typeof str === 'string') { - result = Buffer.from(str); - } else { - result = str; - } - } else { - try { - result = convertIconvLite(str, to, from); - } catch (E) { - console.error(E); - result = str; - } - } - - if (typeof result === 'string') { - result = Buffer.from(result, 'utf-8'); - } - - return result; -} - -/** - * Convert encoding of astring with iconv-lite - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convertIconvLite(str, to, from) { - if (to === 'UTF-8') { - return iconvLite.decode(str, from); - } else if (from === 'UTF-8') { - return iconvLite.encode(str, to); - } else { - return iconvLite.encode(iconvLite.decode(str, from), to); - } -} - -/** - * Converts charset name if needed - * - * @param {String} name Character set - * @return {String} Character set name - */ -function checkEncoding(name) { - return (name || '') - .toString() - .trim() - .replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1') - .replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1') - .replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1') - .replace(/^ks_c_5601\-1987$/i, 'CP949') - .replace(/^us[\-_]?ascii$/i, 'ASCII') - .toUpperCase(); -} - - -/***/ }), - -/***/ 9695: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var Buffer = __nccwpck_require__(5118).Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } - - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } - } - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; - } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; - } - } - return hasValues; -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBytes = []; - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. - uCode; - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } - else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); - } - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 | (uCode & 0x3FF); - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); - - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); - - // Parse remaining as usual. - this.prevBytes = []; - this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); - } - - this.prevBytes = []; - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - - - -/***/ }), - -/***/ 1386: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return __nccwpck_require__(4108) }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return __nccwpck_require__(2417) }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return __nccwpck_require__(7803) }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return __nccwpck_require__(7803).concat(__nccwpck_require__(7419)) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return __nccwpck_require__(7803).concat(__nccwpck_require__(7419)) }, - gb18030: function() { return __nccwpck_require__(6351) }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return __nccwpck_require__(7013) }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return __nccwpck_require__(3104) }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return __nccwpck_require__(3104).concat(__nccwpck_require__(3612)) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, - - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, - ], - }, - - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', -}; - - -/***/ }), - -/***/ 2733: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - __nccwpck_require__(2376), - __nccwpck_require__(9557), - __nccwpck_require__(1155), - __nccwpck_require__(1644), - __nccwpck_require__(373), - __nccwpck_require__(1080), - __nccwpck_require__(1012), - __nccwpck_require__(9695), - __nccwpck_require__(1386), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} - - -/***/ }), - -/***/ 2376: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var Buffer = __nccwpck_require__(5118).Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = __nccwpck_require__(4304).StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); -} - -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } - - return this.decoder.write(buf); -} - -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} - - -/***/ }), - -/***/ 373: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var Buffer = __nccwpck_require__(5118).Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} - - -/***/ }), - -/***/ 1012: -/***/ ((module) => { - -"use strict"; - - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} - -/***/ }), - -/***/ 1080: -/***/ ((module) => { - -"use strict"; - - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - - - -/***/ }), - -/***/ 1155: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var Buffer = __nccwpck_require__(5118).Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - return this.decoder.end(); -} - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } - - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; -} - - - - -/***/ }), - -/***/ 9557: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var Buffer = __nccwpck_require__(5118).Buffer; - -// == UTF32-LE/BE codec. ========================================================== - -exports._utf32 = Utf32Codec; - -function Utf32Codec(codecOptions, iconv) { - this.iconv = iconv; - this.bomAware = true; - this.isLE = codecOptions.isLE; -} - -exports.utf32le = { type: '_utf32', isLE: true }; -exports.utf32be = { type: '_utf32', isLE: false }; - -// Aliases -exports.ucs4le = 'utf32le'; -exports.ucs4be = 'utf32be'; - -Utf32Codec.prototype.encoder = Utf32Encoder; -Utf32Codec.prototype.decoder = Utf32Decoder; - -// -- Encoding - -function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; - this.highSurrogate = 0; -} - -Utf32Encoder.prototype.write = function(str) { - var src = Buffer.from(str, 'ucs2'); - var dst = Buffer.alloc(src.length * 2); - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; - var offset = 0; - - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i); - var isHighSurrogate = (0xD800 <= code && code < 0xDC00); - var isLowSurrogate = (0xDC00 <= code && code < 0xE000); - - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset); - offset += 4; - } - else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; - - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; - - continue; - } - } - - if (isHighSurrogate) - this.highSurrogate = code; - else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset); - offset += 4; - this.highSurrogate = 0; - } - } - - if (offset < dst.length) - dst = dst.slice(0, offset); - - return dst; -}; - -Utf32Encoder.prototype.end = function() { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) - return; - - var buf = Buffer.alloc(4); - - if (this.isLE) - buf.writeUInt32LE(this.highSurrogate, 0); - else - buf.writeUInt32BE(this.highSurrogate, 0); - - this.highSurrogate = 0; - - return buf; -}; - -// -- Decoding - -function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); - this.overflow = []; -} - -Utf32Decoder.prototype.write = function(src) { - if (src.length === 0) - return ''; - - var i = 0; - var codepoint = 0; - var dst = Buffer.alloc(src.length + 4); - var offset = 0; - var isLE = this.isLE; - var overflow = this.overflow; - var badChar = this.badChar; - - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) - overflow.push(src[i]); - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); - } else { - codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); - } - overflow.length = 0; - - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); - } else { - codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); - } - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]); - } - - return dst.slice(0, offset).toString('ucs2'); -}; - -function _writeCodepoint(dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar; - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000; - - var high = 0xD800 | (codepoint >> 10); - dst[offset++] = high & 0xff; - dst[offset++] = high >> 8; - - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF); - } - - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff; - dst[offset++] = codepoint >> 8; - - return offset; -}; - -Utf32Decoder.prototype.end = function() { - this.overflow.length = 0; -}; - -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); - -// Encoder prepends BOM (which can be overridden with (addBOM: false}). - -exports.utf32 = Utf32AutoCodec; -exports.ucs4 = 'utf32'; - -function Utf32AutoCodec(options, iconv) { - this.iconv = iconv; -} - -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - -// -- Encoding - -function Utf32AutoEncoder(options, codec) { - options = options || {}; - - if (options.addBOM === undefined) - options.addBOM = true; - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); -} - -Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); -}; - -Utf32AutoEncoder.prototype.end = function() { - return this.encoder.end(); -}; - -// -- Decoding - -function Utf32AutoDecoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf32AutoDecoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.write(buf); -}; - -Utf32AutoDecoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - - var trail = this.decoder.end(); - if (trail) - resStr += trail; - - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - - return this.decoder.end(); -}; - -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return 'utf-32le'; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return 'utf-32be'; - } - } - - if (b[0] !== 0 || b[1] > 0x10) invalidBE++; - if (b[3] !== 0 || b[2] > 0x10) invalidLE++; - - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; - - b.length = 0; - charsProcessed++; - - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-32le'; -} - - -/***/ }), - -/***/ 1644: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var Buffer = __nccwpck_require__(5118).Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - - - -/***/ }), - -/***/ 7961: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - - - -/***/ }), - -/***/ 9032: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Buffer = __nccwpck_require__(5118).Buffer; - -var bomHandling = __nccwpck_require__(7961), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = __nccwpck_require__(2733); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; - - // Dependency-inject stream module to create IconvLite stream classes. - var streams = __nccwpck_require__(6409)(stream_module); - - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; - - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; -} - -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = __nccwpck_require__(2413); -} catch (e) {} - -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; -} - -if (false) {} - - -/***/ }), - -/***/ 6409: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var Buffer = __nccwpck_require__(5118).Buffer; - -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - - // == Encoder stream ======================================================= - - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } - - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } - - - // == Decoder stream ======================================================= - - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); - } - - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } - - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; - - -/***/ }), - -/***/ 3287: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - -function isObject(o) { - return Object.prototype.toString.call(o) === '[object Object]'; -} - -function isPlainObject(o) { - var ctor,prot; - - if (isObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (ctor === undefined) return true; - - // If has modified prototype - prot = ctor.prototype; - if (isObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -} - -exports.isPlainObject = isPlainObject; - - -/***/ }), - -/***/ 5902: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var hashClear = __nccwpck_require__(1789), - hashDelete = __nccwpck_require__(712), - hashGet = __nccwpck_require__(5395), - hashHas = __nccwpck_require__(5232), - hashSet = __nccwpck_require__(7320); - -/** - * Creates a hash object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `Hash`. -Hash.prototype.clear = hashClear; -Hash.prototype['delete'] = hashDelete; -Hash.prototype.get = hashGet; -Hash.prototype.has = hashHas; -Hash.prototype.set = hashSet; - -module.exports = Hash; - - -/***/ }), - -/***/ 6608: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var listCacheClear = __nccwpck_require__(9792), - listCacheDelete = __nccwpck_require__(7716), - listCacheGet = __nccwpck_require__(5789), - listCacheHas = __nccwpck_require__(9386), - listCacheSet = __nccwpck_require__(7399); - -/** - * Creates an list cache object. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function ListCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `ListCache`. -ListCache.prototype.clear = listCacheClear; -ListCache.prototype['delete'] = listCacheDelete; -ListCache.prototype.get = listCacheGet; -ListCache.prototype.has = listCacheHas; -ListCache.prototype.set = listCacheSet; - -module.exports = ListCache; - - -/***/ }), - -/***/ 881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getNative = __nccwpck_require__(4479), - root = __nccwpck_require__(9882); - -/* Built-in method references that are verified to be native. */ -var Map = getNative(root, 'Map'); - -module.exports = Map; - - -/***/ }), - -/***/ 938: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var mapCacheClear = __nccwpck_require__(1610), - mapCacheDelete = __nccwpck_require__(6657), - mapCacheGet = __nccwpck_require__(1372), - mapCacheHas = __nccwpck_require__(609), - mapCacheSet = __nccwpck_require__(5582); - -/** - * Creates a map cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ -function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } -} - -// Add methods to `MapCache`. -MapCache.prototype.clear = mapCacheClear; -MapCache.prototype['delete'] = mapCacheDelete; -MapCache.prototype.get = mapCacheGet; -MapCache.prototype.has = mapCacheHas; -MapCache.prototype.set = mapCacheSet; - -module.exports = MapCache; - - -/***/ }), - -/***/ 9213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var root = __nccwpck_require__(9882); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - - -/***/ }), - -/***/ 4356: -/***/ ((module) => { - -/** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -module.exports = arrayMap; - - -/***/ }), - -/***/ 6752: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var eq = __nccwpck_require__(1901); - -/** - * Gets the index at which the `key` is found in `array` of key-value pairs. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } - } - return -1; -} - -module.exports = assocIndexOf; - - -/***/ }), - -/***/ 5758: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var castPath = __nccwpck_require__(2688), - toKey = __nccwpck_require__(9071); - -/** - * The base implementation of `_.get` without support for default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path) { - path = castPath(path, object); - - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; -} - -module.exports = baseGet; - - -/***/ }), - -/***/ 7497: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Symbol = __nccwpck_require__(9213), - getRawTag = __nccwpck_require__(923), - objectToString = __nccwpck_require__(4200); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - - -/***/ }), - -/***/ 411: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var isFunction = __nccwpck_require__(7799), - isMasked = __nccwpck_require__(9058), - isObject = __nccwpck_require__(3334), - toSource = __nccwpck_require__(6928); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -module.exports = baseIsNative; - - -/***/ }), - -/***/ 6792: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Symbol = __nccwpck_require__(9213), - arrayMap = __nccwpck_require__(4356), - isArray = __nccwpck_require__(4869), - isSymbol = __nccwpck_require__(6403); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - -/** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = baseToString; - - -/***/ }), - -/***/ 2688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var isArray = __nccwpck_require__(4869), - isKey = __nccwpck_require__(9084), - stringToPath = __nccwpck_require__(1853), - toString = __nccwpck_require__(2931); - -/** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. - */ -function castPath(value, object) { - if (isArray(value)) { - return value; - } - return isKey(value, object) ? [value] : stringToPath(toString(value)); -} - -module.exports = castPath; - - -/***/ }), - -/***/ 8380: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var root = __nccwpck_require__(9882); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; - - -/***/ }), - -/***/ 2085: -/***/ ((module) => { - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - - -/***/ }), - -/***/ 9980: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var isKeyable = __nccwpck_require__(3308); - -/** - * Gets the data for `map`. - * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. - */ -function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; -} - -module.exports = getMapData; - - -/***/ }), - -/***/ 4479: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var baseIsNative = __nccwpck_require__(411), - getValue = __nccwpck_require__(3542); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; - - -/***/ }), - -/***/ 923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Symbol = __nccwpck_require__(9213); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; - - -/***/ }), - -/***/ 3542: -/***/ ((module) => { - -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -module.exports = getValue; - - -/***/ }), - -/***/ 1789: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var nativeCreate = __nccwpck_require__(3041); - -/** - * Removes all key-value entries from the hash. - * - * @private - * @name clear - * @memberOf Hash - */ -function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; -} - -module.exports = hashClear; - - -/***/ }), - -/***/ 712: -/***/ ((module) => { - -/** - * Removes `key` and its value from the hash. - * - * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; -} - -module.exports = hashDelete; - - -/***/ }), - -/***/ 5395: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var nativeCreate = __nccwpck_require__(3041); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; -} - -module.exports = hashGet; - - -/***/ }), - -/***/ 5232: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var nativeCreate = __nccwpck_require__(3041); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Checks if a hash value for `key` exists. - * - * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); -} - -module.exports = hashHas; - - -/***/ }), - -/***/ 7320: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var nativeCreate = __nccwpck_require__(3041); - -/** Used to stand-in for `undefined` hash values. */ -var HASH_UNDEFINED = '__lodash_hash_undefined__'; - -/** - * Sets the hash `key` to `value`. - * - * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. - */ -function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; -} - -module.exports = hashSet; - - -/***/ }), - -/***/ 9084: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var isArray = __nccwpck_require__(4869), - isSymbol = __nccwpck_require__(6403); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); -} - -module.exports = isKey; - - -/***/ }), - -/***/ 3308: -/***/ ((module) => { - -/** - * Checks if `value` is suitable for use as unique object key. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. - */ -function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); -} - -module.exports = isKeyable; - - -/***/ }), - -/***/ 9058: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var coreJsData = __nccwpck_require__(8380); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -module.exports = isMasked; - - -/***/ }), - -/***/ 9792: -/***/ ((module) => { - -/** - * Removes all key-value entries from the list cache. - * - * @private - * @name clear - * @memberOf ListCache - */ -function listCacheClear() { - this.__data__ = []; - this.size = 0; -} - -module.exports = listCacheClear; - - -/***/ }), - -/***/ 7716: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var assocIndexOf = __nccwpck_require__(6752); - -/** Used for built-in method references. */ -var arrayProto = Array.prototype; - -/** Built-in value references. */ -var splice = arrayProto.splice; - -/** - * Removes `key` and its value from the list cache. - * - * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; -} - -module.exports = listCacheDelete; - - -/***/ }), - -/***/ 5789: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var assocIndexOf = __nccwpck_require__(6752); - -/** - * Gets the list cache value for `key`. - * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; -} - -module.exports = listCacheGet; - - -/***/ }), - -/***/ 9386: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var assocIndexOf = __nccwpck_require__(6752); - -/** - * Checks if a list cache value for `key` exists. - * - * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; -} - -module.exports = listCacheHas; - - -/***/ }), - -/***/ 7399: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var assocIndexOf = __nccwpck_require__(6752); - -/** - * Sets the list cache `key` to `value`. - * - * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. - */ -function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; -} - -module.exports = listCacheSet; - - -/***/ }), - -/***/ 1610: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Hash = __nccwpck_require__(5902), - ListCache = __nccwpck_require__(6608), - Map = __nccwpck_require__(881); - -/** - * Removes all key-value entries from the map. - * - * @private - * @name clear - * @memberOf MapCache - */ -function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; -} - -module.exports = mapCacheClear; - - -/***/ }), - -/***/ 6657: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getMapData = __nccwpck_require__(9980); - -/** - * Removes `key` and its value from the map. - * - * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. - */ -function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; - return result; -} - -module.exports = mapCacheDelete; - - -/***/ }), - -/***/ 1372: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getMapData = __nccwpck_require__(9980); - -/** - * Gets the map value for `key`. - * - * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ -function mapCacheGet(key) { - return getMapData(this, key).get(key); -} - -module.exports = mapCacheGet; - - -/***/ }), - -/***/ 609: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getMapData = __nccwpck_require__(9980); - -/** - * Checks if a map value for `key` exists. - * - * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ -function mapCacheHas(key) { - return getMapData(this, key).has(key); -} - -module.exports = mapCacheHas; - - -/***/ }), - -/***/ 5582: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getMapData = __nccwpck_require__(9980); - -/** - * Sets the map `key` to `value`. - * - * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. - */ -function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; -} - -module.exports = mapCacheSet; - - -/***/ }), - -/***/ 9422: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var memoize = __nccwpck_require__(9885); - -/** Used as the maximum memoize cache size. */ -var MAX_MEMOIZE_SIZE = 500; - -/** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. - * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ -function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; -} - -module.exports = memoizeCapped; - - -/***/ }), - -/***/ 3041: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var getNative = __nccwpck_require__(4479); - -/* Built-in method references that are verified to be native. */ -var nativeCreate = getNative(Object, 'create'); - -module.exports = nativeCreate; - - -/***/ }), - -/***/ 4200: -/***/ ((module) => { - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; - - -/***/ }), - -/***/ 9882: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var freeGlobal = __nccwpck_require__(2085); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - - -/***/ }), - -/***/ 1853: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var memoizeCapped = __nccwpck_require__(9422); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ -var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -}); - -module.exports = stringToPath; - - -/***/ }), - -/***/ 9071: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var isSymbol = __nccwpck_require__(6403); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** - * Converts `value` to a string key if it's not a string or symbol. - * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ -function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -module.exports = toKey; - - -/***/ }), - -/***/ 6928: -/***/ ((module) => { - -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -module.exports = toSource; - - -/***/ }), - -/***/ 1901: -/***/ ((module) => { - -/** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.eq(object, object); - * // => true - * - * _.eq(object, other); - * // => false - * - * _.eq('a', 'a'); - * // => true - * - * _.eq('a', Object('a')); - * // => false - * - * _.eq(NaN, NaN); - * // => true - */ -function eq(value, other) { - return value === other || (value !== value && other !== other); -} - -module.exports = eq; - - -/***/ }), - -/***/ 6908: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var baseGet = __nccwpck_require__(5758); - -/** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 - * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 - * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' - */ -function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; -} - -module.exports = get; - - -/***/ }), - -/***/ 4869: -/***/ ((module) => { - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; - - -/***/ }), - -/***/ 7799: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var baseGetTag = __nccwpck_require__(7497), - isObject = __nccwpck_require__(3334); - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -module.exports = isFunction; - - -/***/ }), - -/***/ 3334: -/***/ ((module) => { - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - - -/***/ }), - -/***/ 5926: -/***/ ((module) => { - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - - -/***/ }), - -/***/ 6403: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var baseGetTag = __nccwpck_require__(7497), - isObjectLike = __nccwpck_require__(5926); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; - - -/***/ }), - -/***/ 9885: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var MapCache = __nccwpck_require__(938); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. - * @example - * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] - * - * object.a = 2; - * values(object); - * // => [1, 2] - * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] - * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; - */ -function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; -} - -// Expose `MapCache`. -memoize.Cache = MapCache; - -module.exports = memoize; - - -/***/ }), - -/***/ 2931: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var baseToString = __nccwpck_require__(6792); - -/** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - return value == null ? '' : baseToString(value); -} - -module.exports = toString; - - -/***/ }), - -/***/ 467: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var Stream = _interopDefault(__nccwpck_require__(2413)); -var http = _interopDefault(__nccwpck_require__(8605)); -var Url = _interopDefault(__nccwpck_require__(8835)); -var whatwgUrl = _interopDefault(__nccwpck_require__(3323)); -var https = _interopDefault(__nccwpck_require__(7211)); -var zlib = _interopDefault(__nccwpck_require__(8761)); - -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js - -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; - -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); - -class Blob { - constructor() { - this[TYPE] = ''; - - const blobParts = arguments[0]; - const options = arguments[1]; - - const buffers = []; - let size = 0; - - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - - this[BUFFER] = Buffer.concat(buffers); - - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} - -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); - -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ - -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - - this.message = message; - this.type = type; - - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = __nccwpck_require__(8685)/* .convert */ .O; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; - - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} - -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, - - get bodyUsed() { - return this[INTERNALS].disturbed; - }, - - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, - - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, - - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, - - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, - - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; - - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; - -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); - -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; - -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; - - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - - this[INTERNALS].disturbed = true; - - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } - - let body = this.body; - - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } - - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; - - return new Body.Promise(function (resolve, reject) { - let resTimeout; - - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } - - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } - - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - - accumBytes += chunk.length; - accum.push(chunk); - }); - - body.on('end', function () { - if (abort) { - return; - } - - clearTimeout(resTimeout); - - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} - -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; - - this[MAP] = Object.create(null); - - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } - - return; - } - - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } - - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } - - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } - - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } - - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } - - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; - -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); - -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; - - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} - -const INTERNAL = Symbol('internal'); - -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} - -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } - - this[INTERNAL].index = index + 1; - - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); - -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); - -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - - return obj; -} - -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} - -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; - -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - - get url() { - return this[INTERNALS$1].url || ''; - } - - get status() { - return this[INTERNALS$1].status; - } - - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - - get redirected() { - return this[INTERNALS$1].counter > 0; - } - - get statusText() { - return this[INTERNALS$1].statusText; - } - - get headers() { - return this[INTERNALS$1].headers; - } - - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); - -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; - -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; - -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } - - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} - -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; - -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} - -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - let parsedURL; - - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } - - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - - const headers = new Headers(init.headers || input.headers || {}); - - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; - - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } - - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - - get headers() { - return this[INTERNALS$2].headers; - } - - get redirect() { - return this[INTERNALS$2].redirect; - } - - get signal() { - return this[INTERNALS$2].signal; - } - - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} - -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } - - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } - - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js - - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} - -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -const URL$1 = Url.URL || whatwgUrl.URL; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; - -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; - - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - - Body.Promise = fetch.Promise; - - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - - let response = null; - - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; - - if (signal && signal.aborted) { - abort(); - return; - } - - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; - - // send request - const req = send(options); - let reqTimeout; - - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } - - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } - - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } - - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); - - req.on('response', function (res) { - clearTimeout(reqTimeout); - - const headers = createHeadersLenient(res.headers); - - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); - - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } - - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } - - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - - if (!isDomainOrSubdomain(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } - - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } - - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; - -// expose Promise -fetch.Promise = global.Promise; - -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.default = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; - - -/***/ }), - -/***/ 2299: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -var punycode = __nccwpck_require__(4213); -var mappingTable = __nccwpck_require__(8661); - -var PROCESSING_OPTIONS = { - TRANSITIONAL: 0, - NONTRANSITIONAL: 1 -}; - -function normalize(str) { // fix bug in v8 - return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); -} - -function findStatus(val) { - var start = 0; - var end = mappingTable.length - 1; - - while (start <= end) { - var mid = Math.floor((start + end) / 2); - - var target = mappingTable[mid]; - if (target[0][0] <= val && target[0][1] >= val) { - return target; - } else if (target[0][0] > val) { - end = mid - 1; - } else { - start = mid + 1; - } - } - - return null; -} - -var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; - -function countSymbols(string) { - return string - // replace every surrogate pair with a BMP symbol - .replace(regexAstralSymbols, '_') - // then get the length - .length; -} - -function mapChars(domain_name, useSTD3, processing_option) { - var hasError = false; - var processed = ""; - - var len = countSymbols(domain_name); - for (var i = 0; i < len; ++i) { - var codePoint = domain_name.codePointAt(i); - var status = findStatus(codePoint); - - switch (status[1]) { - case "disallowed": - hasError = true; - processed += String.fromCodePoint(codePoint); - break; - case "ignored": - break; - case "mapped": - processed += String.fromCodePoint.apply(String, status[2]); - break; - case "deviation": - if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { - processed += String.fromCodePoint.apply(String, status[2]); - } else { - processed += String.fromCodePoint(codePoint); - } - break; - case "valid": - processed += String.fromCodePoint(codePoint); - break; - case "disallowed_STD3_mapped": - if (useSTD3) { - hasError = true; - processed += String.fromCodePoint(codePoint); - } else { - processed += String.fromCodePoint.apply(String, status[2]); - } - break; - case "disallowed_STD3_valid": - if (useSTD3) { - hasError = true; - } - - processed += String.fromCodePoint(codePoint); - break; - } - } - - return { - string: processed, - error: hasError - }; -} - -var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; - -function validateLabel(label, processing_option) { - if (label.substr(0, 4) === "xn--") { - label = punycode.toUnicode(label); - processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; - } - - var error = false; - - if (normalize(label) !== label || - (label[3] === "-" && label[4] === "-") || - label[0] === "-" || label[label.length - 1] === "-" || - label.indexOf(".") !== -1 || - label.search(combiningMarksRegex) === 0) { - error = true; - } - - var len = countSymbols(label); - for (var i = 0; i < len; ++i) { - var status = findStatus(label.codePointAt(i)); - if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || - (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && - status[1] !== "valid" && status[1] !== "deviation")) { - error = true; - break; - } - } - - return { - label: label, - error: error - }; -} - -function processing(domain_name, useSTD3, processing_option) { - var result = mapChars(domain_name, useSTD3, processing_option); - result.string = normalize(result.string); - - var labels = result.string.split("."); - for (var i = 0; i < labels.length; ++i) { - try { - var validation = validateLabel(labels[i]); - labels[i] = validation.label; - result.error = result.error || validation.error; - } catch(e) { - result.error = true; - } - } - - return { - string: labels.join("."), - error: result.error - }; -} - -module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { - var result = processing(domain_name, useSTD3, processing_option); - var labels = result.string.split("."); - labels = labels.map(function(l) { - try { - return punycode.toASCII(l); - } catch(e) { - result.error = true; - return l; - } - }); - - if (verifyDnsLength) { - var total = labels.slice(0, labels.length - 1).join(".").length; - if (total.length > 253 || total.length === 0) { - result.error = true; - } - - for (var i=0; i < labels.length; ++i) { - if (labels.length > 63 || labels.length === 0) { - result.error = true; - break; - } - } - } - - if (result.error) return null; - return labels.join("."); -}; - -module.exports.toUnicode = function(domain_name, useSTD3) { - var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); - - return { - domain: result.string, - error: result.error - }; -}; - -module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; - - -/***/ }), - -/***/ 5871: -/***/ ((module) => { - -"use strict"; - - -var conversions = {}; -module.exports = conversions; - -function sign(x) { - return x < 0 ? -1 : 1; -} - -function evenRound(x) { - // Round x to the nearest integer, choosing the even integer if it lies halfway between two. - if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) - return Math.floor(x); - } else { - return Math.round(x); - } -} - -function createNumberConversion(bitLength, typeOpts) { - if (!typeOpts.unsigned) { - --bitLength; - } - const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); - const upperBound = Math.pow(2, bitLength) - 1; - - const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); - const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); - - return function(V, opts) { - if (!opts) opts = {}; - - let x = +V; - - if (opts.enforceRange) { - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite number"); - } - - x = sign(x) * Math.floor(Math.abs(x)); - if (x < lowerBound || x > upperBound) { - throw new TypeError("Argument is not in byte range"); - } - - return x; - } - - if (!isNaN(x) && opts.clamp) { - x = evenRound(x); - - if (x < lowerBound) x = lowerBound; - if (x > upperBound) x = upperBound; - return x; - } - - if (!Number.isFinite(x) || x === 0) { - return 0; - } - - x = sign(x) * Math.floor(Math.abs(x)); - x = x % moduloVal; - - if (!typeOpts.unsigned && x >= moduloBound) { - return x - moduloVal; - } else if (typeOpts.unsigned) { - if (x < 0) { - x += moduloVal; - } else if (x === -0) { // don't return negative zero - return 0; - } - } - - return x; - } -} - -conversions["void"] = function () { - return undefined; -}; - -conversions["boolean"] = function (val) { - return !!val; -}; - -conversions["byte"] = createNumberConversion(8, { unsigned: false }); -conversions["octet"] = createNumberConversion(8, { unsigned: true }); - -conversions["short"] = createNumberConversion(16, { unsigned: false }); -conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); - -conversions["long"] = createNumberConversion(32, { unsigned: false }); -conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); - -conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); -conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); - -conversions["double"] = function (V) { - const x = +V; - - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite floating-point value"); - } - - return x; -}; - -conversions["unrestricted double"] = function (V) { - const x = +V; - - if (isNaN(x)) { - throw new TypeError("Argument is NaN"); - } - - return x; -}; - -// not quite valid, but good enough for JS -conversions["float"] = conversions["double"]; -conversions["unrestricted float"] = conversions["unrestricted double"]; - -conversions["DOMString"] = function (V, opts) { - if (!opts) opts = {}; - - if (opts.treatNullAsEmptyString && V === null) { - return ""; - } - - return String(V); -}; - -conversions["ByteString"] = function (V, opts) { - const x = String(V); - let c = undefined; - for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { - if (c > 255) { - throw new TypeError("Argument is not a valid bytestring"); - } - } - - return x; -}; - -conversions["USVString"] = function (V) { - const S = String(V); - const n = S.length; - const U = []; - for (let i = 0; i < n; ++i) { - const c = S.charCodeAt(i); - if (c < 0xD800 || c > 0xDFFF) { - U.push(String.fromCodePoint(c)); - } else if (0xDC00 <= c && c <= 0xDFFF) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - if (i === n - 1) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - const d = S.charCodeAt(i + 1); - if (0xDC00 <= d && d <= 0xDFFF) { - const a = c & 0x3FF; - const b = d & 0x3FF; - U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); - ++i; - } else { - U.push(String.fromCodePoint(0xFFFD)); - } - } - } - } - - return U.join(''); -}; - -conversions["Date"] = function (V, opts) { - if (!(V instanceof Date)) { - throw new TypeError("Argument is not a Date object"); - } - if (isNaN(V)) { - return undefined; - } - - return V; -}; - -conversions["RegExp"] = function (V, opts) { - if (!(V instanceof RegExp)) { - V = new RegExp(V); - } - - return V; -}; - - -/***/ }), - -/***/ 8262: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -const usm = __nccwpck_require__(33); - -exports.implementation = class URLImpl { - constructor(constructorArgs) { - const url = constructorArgs[0]; - const base = constructorArgs[1]; - - let parsedBase = null; - if (base !== undefined) { - parsedBase = usm.basicURLParse(base); - if (parsedBase === "failure") { - throw new TypeError("Invalid base URL"); - } - } - - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } - - this._url = parsedURL; - - // TODO: query stuff - } - - get href() { - return usm.serializeURL(this._url); - } - - set href(v) { - const parsedURL = usm.basicURLParse(v); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } - - this._url = parsedURL; - } - - get origin() { - return usm.serializeURLOrigin(this._url); - } - - get protocol() { - return this._url.scheme + ":"; - } - - set protocol(v) { - usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); - } - - get username() { - return this._url.username; - } - - set username(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } - - usm.setTheUsername(this._url, v); - } - - get password() { - return this._url.password; - } - - set password(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } - - usm.setThePassword(this._url, v); - } - - get host() { - const url = this._url; - - if (url.host === null) { - return ""; - } - - if (url.port === null) { - return usm.serializeHost(url.host); - } - - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); - } - - set host(v) { - if (this._url.cannotBeABaseURL) { - return; - } - - usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); - } - - get hostname() { - if (this._url.host === null) { - return ""; - } - - return usm.serializeHost(this._url.host); - } - - set hostname(v) { - if (this._url.cannotBeABaseURL) { - return; - } - - usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); - } - - get port() { - if (this._url.port === null) { - return ""; - } - - return usm.serializeInteger(this._url.port); - } - - set port(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } - - if (v === "") { - this._url.port = null; - } else { - usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); - } - } - - get pathname() { - if (this._url.cannotBeABaseURL) { - return this._url.path[0]; - } - - if (this._url.path.length === 0) { - return ""; - } - - return "/" + this._url.path.join("/"); - } - - set pathname(v) { - if (this._url.cannotBeABaseURL) { - return; - } - - this._url.path = []; - usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); - } - - get search() { - if (this._url.query === null || this._url.query === "") { - return ""; - } - - return "?" + this._url.query; - } - - set search(v) { - // TODO: query stuff - - const url = this._url; - - if (v === "") { - url.query = null; - return; - } - - const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); - } - - get hash() { - if (this._url.fragment === null || this._url.fragment === "") { - return ""; - } - - return "#" + this._url.fragment; - } - - set hash(v) { - if (v === "") { - this._url.fragment = null; - return; - } - - const input = v[0] === "#" ? v.substring(1) : v; - this._url.fragment = ""; - usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); - } - - toJSON() { - return this.href; - } -}; - - -/***/ }), - -/***/ 653: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const conversions = __nccwpck_require__(5871); -const utils = __nccwpck_require__(276); -const Impl = __nccwpck_require__(8262); - -const impl = utils.implSymbol; - -function URL(url) { - if (!this || this[impl] || !(this instanceof URL)) { - throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); - } - if (arguments.length < 1) { - throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); - } - const args = []; - for (let i = 0; i < arguments.length && i < 2; ++i) { - args[i] = arguments[i]; - } - args[0] = conversions["USVString"](args[0]); - if (args[1] !== undefined) { - args[1] = conversions["USVString"](args[1]); - } - - module.exports.setup(this, args); -} - -URL.prototype.toJSON = function toJSON() { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - const args = []; - for (let i = 0; i < arguments.length && i < 0; ++i) { - args[i] = arguments[i]; - } - return this[impl].toJSON.apply(this[impl], args); -}; -Object.defineProperty(URL.prototype, "href", { - get() { - return this[impl].href; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].href = V; - }, - enumerable: true, - configurable: true -}); - -URL.prototype.toString = function () { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - return this.href; -}; - -Object.defineProperty(URL.prototype, "origin", { - get() { - return this[impl].origin; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "protocol", { - get() { - return this[impl].protocol; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].protocol = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "username", { - get() { - return this[impl].username; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].username = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "password", { - get() { - return this[impl].password; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].password = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "host", { - get() { - return this[impl].host; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].host = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "hostname", { - get() { - return this[impl].hostname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hostname = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "port", { - get() { - return this[impl].port; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].port = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "pathname", { - get() { - return this[impl].pathname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].pathname = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "search", { - get() { - return this[impl].search; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].search = V; - }, - enumerable: true, - configurable: true -}); - -Object.defineProperty(URL.prototype, "hash", { - get() { - return this[impl].hash; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hash = V; - }, - enumerable: true, - configurable: true -}); - - -module.exports = { - is(obj) { - return !!obj && obj[impl] instanceof Impl.implementation; - }, - create(constructorArgs, privateData) { - let obj = Object.create(URL.prototype); - this.setup(obj, constructorArgs, privateData); - return obj; - }, - setup(obj, constructorArgs, privateData) { - if (!privateData) privateData = {}; - privateData.wrapper = obj; - - obj[impl] = new Impl.implementation(constructorArgs, privateData); - obj[impl][utils.wrapperSymbol] = obj; - }, - interface: URL, - expose: { - Window: { URL: URL }, - Worker: { URL: URL } - } -}; - - - -/***/ }), - -/***/ 3323: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -exports.URL = __nccwpck_require__(653).interface; -exports.serializeURL = __nccwpck_require__(33).serializeURL; -exports.serializeURLOrigin = __nccwpck_require__(33).serializeURLOrigin; -exports.basicURLParse = __nccwpck_require__(33).basicURLParse; -exports.setTheUsername = __nccwpck_require__(33).setTheUsername; -exports.setThePassword = __nccwpck_require__(33).setThePassword; -exports.serializeHost = __nccwpck_require__(33).serializeHost; -exports.serializeInteger = __nccwpck_require__(33).serializeInteger; -exports.parseURL = __nccwpck_require__(33).parseURL; - - -/***/ }), - -/***/ 33: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -const punycode = __nccwpck_require__(4213); -const tr46 = __nccwpck_require__(2299); - -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; - -const failure = Symbol("failure"); - -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} - -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); -} - -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; -} - -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} - -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); -} - -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); -} - -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} - -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; -} - -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} - -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} - -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; -} - -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} - -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} - -function defaultPort(scheme) { - return specialSchemes[scheme]; -} - -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } - - return "%" + hex; -} - -function utf8PercentEncode(c) { - const buf = new Buffer(c); - - let str = ""; - - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } - - return str; -} - -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); - } - } - return new Buffer(output).toString(); -} - -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; -} - -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); -} - -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} - -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); - - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } - - return cStr; -} - -function parseIPv4Number(input) { - let R = 10; - - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; - } - - if (input === "") { - return 0; - } - - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } - - return parseInt(input, R); -} - -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); - } - } - - if (parts.length > 4) { - return input; - } - - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; - } - const n = parseIPv4Number(part); - if (n === failure) { - return input; - } - - numbers.push(n); - } - - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; - } - } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; - } - - let ipv4 = numbers.pop(); - let counter = 0; - - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; - } - - return ipv4; -} - -function serializeIPv4(address) { - let output = ""; - let n = address; - - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; - } - n = Math.floor(n / 256); - } - - return output; -} - -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; - - input = punycode.ucs2.decode(input); - - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; - } - - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } - - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; - } - - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; - } - - let value = 0; - let length = 0; - - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; - } - - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } - - pointer -= length; - - if (pieceIndex > 6) { - return failure; - } - - let numbersSeen = 0; - - while (input[pointer] !== undefined) { - let ipv4Piece = null; - - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } - } - - if (!isASCIIDigit(input[pointer])) { - return failure; - } - - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } - - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - - ++numbersSeen; - - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } - - if (numbersSeen !== 4) { - return failure; - } - - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; - } - - address[pieceIndex] = value; - ++pieceIndex; - } - - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; - } - } else if (compress === null && pieceIndex !== 8) { - return failure; - } - - return address; -} - -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; - - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; - } - - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; - } - - output += address[pieceIndex].toString(16); - - if (pieceIndex !== 7) { - output += ":"; - } - } - - return output; -} - -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } - - return parseIPv6(input.substring(1, input.length - 1)); - } - - if (!isSpecialArg) { - return parseOpaqueHost(input); - } - - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; - } - - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } - - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; - } - - return asciiDomain; -} - -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; - } - - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); - } - return output; -} - -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; - - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; - } - } - - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - return { - idx: maxIdx, - len: maxLen - }; -} - -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); - } - - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } - - return host; -} - -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} - -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); -} - -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } - - path.pop(); -} - -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} - -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} - -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} - -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; - - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, - - cannotBeABaseURL: false - }; - - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } - - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - - this.state = stateOverride || "scheme start"; - - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; - - this.input = punycode.ucs2.decode(this.input); - - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); - - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; - } - } -} - -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } - - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; - } - - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } - - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; - } - } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; - } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; - } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; - } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); - - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; - } - - return true; -}; - -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; - } - this.atFlag = true; - - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); - - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; - } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; - } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; - } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; - } - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; - } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; - - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; - } - - this.state = "path"; - --this.pointer; - } - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); - } else { - this.url.host = this.base.host; - } - } - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; - - if (this.stateOverride) { - return false; - } - - this.buffer = ""; - this.state = "path start"; - } - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; - } - this.state = "path"; - - if (c !== 47 && c !== 92) { - --this.pointer; - } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; - } - } - - return true; -}; - -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; - } - - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } - - return true; -}; - -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; - } - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); - } - } - - return true; -}; - -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } - - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); - } else { - this.url.query += String.fromCodePoint(buffer[i]); - } - } - - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); - } - - return true; -}; - -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; - - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; - } - output += "@"; - } - - output += serializeHost(url.host); - - if (url.port !== null) { - output += ":" + url.port; - } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } - - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; - } - } - - if (url.query !== null) { - output += "?" + url.query; - } - - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; - } - - return output; -} - -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); - - if (tuple.port !== null) { - result += ":" + tuple.port; - } - - return result; -} - -module.exports.serializeURL = serializeURL; - -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; - } -}; - -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; - } - - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; - } - - return usm.url; -}; - -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.serializeHost = serializeHost; - -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - -module.exports.serializeInteger = function (integer) { - return String(integer); -}; - -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; - } - - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; - - -/***/ }), - -/***/ 276: -/***/ ((module) => { - -"use strict"; - - -module.exports.mixin = function mixin(target, source) { - const keys = Object.getOwnPropertyNames(source); - for (let i = 0; i < keys.length; ++i) { - Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); - } -}; - -module.exports.wrapperSymbol = Symbol("wrapper"); -module.exports.implSymbol = Symbol("impl"); - -module.exports.wrapperForImpl = function (impl) { - return impl[module.exports.wrapperSymbol]; -}; - -module.exports.implForWrapper = function (wrapper) { - return wrapper[module.exports.implSymbol]; -}; - - - -/***/ }), - -/***/ 1223: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var wrappy = __nccwpck_require__(2940) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} - - -/***/ }), - -/***/ 5118: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/* eslint-disable node/no-deprecated-api */ - - - -var buffer = __nccwpck_require__(4293) -var Buffer = buffer.Buffer - -var safer = {} - -var key - -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] -} - -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] -} - -safer.Buffer.prototype = Buffer.prototype - -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) - } -} - -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - return buf - } -} - -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it - } -} - -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength - } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength - } -} - -module.exports = safer - - -/***/ }), - -/***/ 4294: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -module.exports = __nccwpck_require__(4219); - - -/***/ }), - -/***/ 4219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var net = __nccwpck_require__(1631); -var tls = __nccwpck_require__(4016); -var http = __nccwpck_require__(8605); -var https = __nccwpck_require__(7211); -var events = __nccwpck_require__(8614); -var assert = __nccwpck_require__(2357); -var util = __nccwpck_require__(1669); - - -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; - - -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} - -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} - -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} - - -function TunnelingAgent(options) { - var self = this; - self.options = options || {}; - self.proxyOptions = self.options.proxy || {}; - self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; - self.requests = []; - self.sockets = []; - - self.on('free', function onFree(socket, host, port, localAddress) { - var options = toOptions(host, port, localAddress); - for (var i = 0, len = self.requests.length; i < len; ++i) { - var pending = self.requests[i]; - if (pending.host === options.host && pending.port === options.port) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); - -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); - - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } - - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); - - function onFree() { - self.emit('free', socket, options); - } - - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; - -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); - - var connectOptions = mergeOptions({}, self.proxyOptions, { - method: 'CONNECT', - path: options.host + ':' + options.port, - agent: false, - headers: { - host: options.host + ':' + options.port - } - }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } - if (connectOptions.proxyAuth) { - connectOptions.headers = connectOptions.headers || {}; - connectOptions.headers['Proxy-Authorization'] = 'Basic ' + - new Buffer(connectOptions.proxyAuth).toString('base64'); - } - - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } - - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); - - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = new Error('tunneling socket could not be established, ' + - 'statusCode=' + res.statusCode); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - if (head.length > 0) { - debug('got illegal response body from proxy'); - socket.destroy(); - var error = new Error('got illegal response body from proxy'); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - return; - } - debug('tunneling connection has established'); - self.sockets[self.sockets.indexOf(placeholder)] = socket; - return cb(socket); - } - - function onError(cause) { - connectReq.removeAllListeners(); - - debug('tunneling socket could not be established, cause=%s\n', - cause.message, cause.stack); - var error = new Error('tunneling socket could not be established, ' + - 'cause=' + cause.message); - error.code = 'ECONNRESET'; - options.request.emit('error', error); - self.removeSocket(placeholder); - } -}; - -TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { - var pos = this.sockets.indexOf(socket) - if (pos === -1) { - return; - } - this.sockets.splice(pos, 1); - - var pending = this.requests.shift(); - if (pending) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } -}; - -function createSecureSocket(options, cb) { - var self = this; - TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { - var hostHeader = options.request.getHeader('host'); - var tlsOptions = mergeOptions({}, self.options, { - socket: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} - - -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} - -function mergeOptions(target) { - for (var i = 1, len = arguments.length; i < len; ++i) { - var overrides = arguments[i]; - if (typeof overrides === 'object') { - var keys = Object.keys(overrides); - for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { - var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } - } - } - } - return target; -} - - -var debug; -if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === 'string') { - args[0] = 'TUNNEL: ' + args[0]; - } else { - args.unshift('TUNNEL:'); - } - console.error.apply(console, args); - } -} else { - debug = function() {}; -} -exports.debug = debug; // for test - - -/***/ }), - -/***/ 5030: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } - - if (typeof process === "object" && "version" in process) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } - - return ""; -} - -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map - - -/***/ }), - -/***/ 9521: -/***/ ((__unused_webpack_module, __webpack_exports__, __nccwpck_require__) => { - -"use strict"; -// ESM COMPAT FLAG -__nccwpck_require__.r(__webpack_exports__); - -// EXPORTS -__nccwpck_require__.d(__webpack_exports__, { - "NIL": () => /* reexport */ nil, - "parse": () => /* reexport */ esm_node_parse, - "stringify": () => /* reexport */ esm_node_stringify, - "v1": () => /* reexport */ esm_node_v1, - "v3": () => /* reexport */ esm_node_v3, - "v4": () => /* reexport */ esm_node_v4, - "v5": () => /* reexport */ esm_node_v5, - "validate": () => /* reexport */ esm_node_validate, - "version": () => /* reexport */ esm_node_version -}); - -// CONCATENATED MODULE: external "crypto" -const external_crypto_namespaceObject = require("crypto");; -var external_crypto_default = /*#__PURE__*/__nccwpck_require__.n(external_crypto_namespaceObject); - -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/rng.js - -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate - -let poolPtr = rnds8Pool.length; -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - external_crypto_default().randomFillSync(rnds8Pool); - poolPtr = 0; - } - - return rnds8Pool.slice(poolPtr, poolPtr += 16); -} -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/regex.js -/* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/validate.js - - -function validate(uuid) { - return typeof uuid === 'string' && regex.test(uuid); -} - -/* harmony default export */ const esm_node_validate = (validate); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/stringify.js - -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ - -const byteToHex = []; - -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} - -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - - if (!esm_node_validate(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - - return uuid; -} - -/* harmony default export */ const esm_node_stringify = (stringify); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v1.js - - // **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html - -let _nodeId; - -let _clockseq; // Previous uuid creation time - - -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details - -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || rng)(); - - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; - } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; - } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - - - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - - - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - - msecs += 12219292800000; // `time_low` - - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - - b[i++] = clockseq & 0xff; // `node` - - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; - } - - return buf || esm_node_stringify(b); -} - -/* harmony default export */ const esm_node_v1 = (v1); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/parse.js - - -function parse(uuid) { - if (!esm_node_validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ - - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ - - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ - - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) - - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} - -/* harmony default export */ const esm_node_parse = (parse); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v35.js - - - -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape - - const bytes = []; - - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); - } - - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -/* harmony default export */ function v35(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); - } - - if (typeof namespace === 'string') { - namespace = esm_node_parse(namespace); - } - - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; - } - - return buf; - } - - return esm_node_stringify(bytes); - } // Function#name is not settable on some platforms (#270) - - - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support - - - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; -} -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/md5.js - - -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return external_crypto_default().createHash('md5').update(bytes).digest(); -} - -/* harmony default export */ const esm_node_md5 = (md5); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v3.js - - -const v3 = v35('v3', 0x30, esm_node_md5); -/* harmony default export */ const esm_node_v3 = (v3); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v4.js - - - -function v4(options, buf, offset) { - options = options || {}; - const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; - } - - return buf; - } - - return esm_node_stringify(rnds); -} - -/* harmony default export */ const esm_node_v4 = (v4); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/sha1.js - - -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } - - return external_crypto_default().createHash('sha1').update(bytes).digest(); -} - -/* harmony default export */ const esm_node_sha1 = (sha1); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/v5.js - - -const v5 = v35('v5', 0x50, esm_node_sha1); -/* harmony default export */ const esm_node_v5 = (v5); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/nil.js -/* harmony default export */ const nil = ('00000000-0000-0000-0000-000000000000'); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/version.js - - -function version(uuid) { - if (!esm_node_validate(uuid)) { - throw TypeError('Invalid UUID'); - } - - return parseInt(uuid.substr(14, 1), 16); -} - -/* harmony default export */ const esm_node_version = (version); -// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-node/index.js - - - - - - - - - - -/***/ }), - -/***/ 2940: -/***/ ((module) => { - -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} - - -/***/ }), - -/***/ 1641: -/***/ ((__unused_webpack_module, exports) => { - -// Underscore.js 1.13.4 -// https://underscorejs.org -// (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -// Current version. -var VERSION = '1.13.4'; - -// Establish the root object, `window` (`self`) in the browser, `global` -// on the server, or `this` in some virtual machines. We use `self` -// instead of `window` for `WebWorker` support. -var root = (typeof self == 'object' && self.self === self && self) || - (typeof global == 'object' && global.global === global && global) || - Function('return this')() || - {}; - -// Save bytes in the minified (but not gzipped) version: -var ArrayProto = Array.prototype, ObjProto = Object.prototype; -var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; - -// Create quick reference variables for speed access to core prototypes. -var push = ArrayProto.push, - slice = ArrayProto.slice, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - -// Modern feature detection. -var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', - supportsDataView = typeof DataView !== 'undefined'; - -// All **ECMAScript 5+** native function implementations that we hope to use -// are declared here. -var nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeCreate = Object.create, - nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; - -// Create references to these builtin functions because we override them. -var _isNaN = isNaN, - _isFinite = isFinite; - -// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. -var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); -var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - -// The largest integer that can be represented exactly. -var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; - -// Some functions take a variable number of arguments, or a few expected -// arguments at the beginning and then a variable number of values to operate -// on. This helper accumulates all remaining arguments past the function’s -// argument length (or an explicit `startIndex`), into an array that becomes -// the last argument. Similar to ES6’s "rest parameter". -function restArguments(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0), - rest = Array(length), - index = 0; - for (; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - case 2: return func.call(this, arguments[0], arguments[1], rest); - } - var args = Array(startIndex + 1); - for (index = 0; index < startIndex; index++) { - args[index] = arguments[index]; - } - args[startIndex] = rest; - return func.apply(this, args); - }; -} - -// Is a given variable an object? -function isObject(obj) { - var type = typeof obj; - return type === 'function' || (type === 'object' && !!obj); -} - -// Is a given value equal to null? -function isNull(obj) { - return obj === null; -} - -// Is a given variable undefined? -function isUndefined(obj) { - return obj === void 0; -} - -// Is a given value a boolean? -function isBoolean(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; -} - -// Is a given value a DOM element? -function isElement(obj) { - return !!(obj && obj.nodeType === 1); -} - -// Internal function for creating a `toString`-based type tester. -function tagTester(name) { - var tag = '[object ' + name + ']'; - return function(obj) { - return toString.call(obj) === tag; - }; -} - -var isString = tagTester('String'); - -var isNumber = tagTester('Number'); - -var isDate = tagTester('Date'); - -var isRegExp = tagTester('RegExp'); - -var isError = tagTester('Error'); - -var isSymbol = tagTester('Symbol'); - -var isArrayBuffer = tagTester('ArrayBuffer'); - -var isFunction = tagTester('Function'); - -// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old -// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). -var nodelist = root.document && root.document.childNodes; -if ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') { - isFunction = function(obj) { - return typeof obj == 'function' || false; - }; -} - -var isFunction$1 = isFunction; - -var hasObjectTag = tagTester('Object'); - -// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. -// In IE 11, the most common among them, this problem also applies to -// `Map`, `WeakMap` and `Set`. -var hasStringTagBug = ( - supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8))) - ), - isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map)); - -var isDataView = tagTester('DataView'); - -// In IE 10 - Edge 13, we need a different heuristic -// to determine whether an object is a `DataView`. -function ie10IsDataView(obj) { - return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); -} - -var isDataView$1 = (hasStringTagBug ? ie10IsDataView : isDataView); - -// Is a given value an array? -// Delegates to ECMA5's native `Array.isArray`. -var isArray = nativeIsArray || tagTester('Array'); - -// Internal function to check whether `key` is an own property name of `obj`. -function has$1(obj, key) { - return obj != null && hasOwnProperty.call(obj, key); -} - -var isArguments = tagTester('Arguments'); - -// Define a fallback version of the method in browsers (ahem, IE < 9), where -// there isn't any inspectable "Arguments" type. -(function() { - if (!isArguments(arguments)) { - isArguments = function(obj) { - return has$1(obj, 'callee'); - }; - } -}()); - -var isArguments$1 = isArguments; - -// Is a given object a finite number? -function isFinite$1(obj) { - return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj)); -} - -// Is the given value `NaN`? -function isNaN$1(obj) { - return isNumber(obj) && _isNaN(obj); -} - -// Predicate-generating function. Often useful outside of Underscore. -function constant(value) { - return function() { - return value; - }; -} - -// Common internal logic for `isArrayLike` and `isBufferLike`. -function createSizePropertyCheck(getSizeProperty) { - return function(collection) { - var sizeProperty = getSizeProperty(collection); - return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX; - } -} - -// Internal helper to generate a function to obtain property `key` from `obj`. -function shallowProperty(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; -} - -// Internal helper to obtain the `byteLength` property of an object. -var getByteLength = shallowProperty('byteLength'); - -// Internal helper to determine whether we should spend extensive checks against -// `ArrayBuffer` et al. -var isBufferLike = createSizePropertyCheck(getByteLength); - -// Is a given value a typed array? -var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; -function isTypedArray(obj) { - // `ArrayBuffer.isView` is the most future-proof, so use it when available. - // Otherwise, fall back on the above regular expression. - return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) : - isBufferLike(obj) && typedArrayPattern.test(toString.call(obj)); -} - -var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false); - -// Internal helper to obtain the `length` property of an object. -var getLength = shallowProperty('length'); - -// Internal helper to create a simple lookup structure. -// `collectNonEnumProps` used to depend on `_.contains`, but this led to -// circular imports. `emulatedSet` is a one-off solution that only works for -// arrays of strings. -function emulatedSet(keys) { - var hash = {}; - for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; - return { - contains: function(key) { return hash[key] === true; }, - push: function(key) { - hash[key] = true; - return keys.push(key); - } - }; -} - -// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't -// be iterated by `for key in ...` and thus missed. Extends `keys` in place if -// needed. -function collectNonEnumProps(obj, keys) { - keys = emulatedSet(keys); - var nonEnumIdx = nonEnumerableProps.length; - var constructor = obj.constructor; - var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto; - - // Constructor is a special case. - var prop = 'constructor'; - if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop); - - while (nonEnumIdx--) { - prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { - keys.push(prop); - } - } -} - -// Retrieve the names of an object's own properties. -// Delegates to **ECMAScript 5**'s native `Object.keys`. -function keys(obj) { - if (!isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (has$1(obj, key)) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; -} - -// Is a given array, string, or object empty? -// An "empty" object has no enumerable own-properties. -function isEmpty(obj) { - if (obj == null) return true; - // Skip the more expensive `toString`-based type checks if `obj` has no - // `.length`. - var length = getLength(obj); - if (typeof length == 'number' && ( - isArray(obj) || isString(obj) || isArguments$1(obj) - )) return length === 0; - return getLength(keys(obj)) === 0; -} - -// Returns whether an object has a given set of `key:value` pairs. -function isMatch(object, attrs) { - var _keys = keys(attrs), length = _keys.length; - if (object == null) return !length; - var obj = Object(object); - for (var i = 0; i < length; i++) { - var key = _keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) return false; - } - return true; -} - -// If Underscore is called as a function, it returns a wrapped object that can -// be used OO-style. This wrapper holds altered versions of all functions added -// through `_.mixin`. Wrapped objects may be chained. -function _$1(obj) { - if (obj instanceof _$1) return obj; - if (!(this instanceof _$1)) return new _$1(obj); - this._wrapped = obj; -} - -_$1.VERSION = VERSION; - -// Extracts the result from a wrapped and chained object. -_$1.prototype.value = function() { - return this._wrapped; -}; - -// Provide unwrapping proxies for some methods used in engine operations -// such as arithmetic and JSON stringification. -_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value; - -_$1.prototype.toString = function() { - return String(this._wrapped); -}; - -// Internal function to wrap or shallow-copy an ArrayBuffer, -// typed array or DataView to a new view, reusing the buffer. -function toBufferView(bufferSource) { - return new Uint8Array( - bufferSource.buffer || bufferSource, - bufferSource.byteOffset || 0, - getByteLength(bufferSource) - ); -} - -// We use this string twice, so give it a name for minification. -var tagDataView = '[object DataView]'; - -// Internal recursive comparison function for `_.isEqual`. -function eq(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a === 1 / b; - // `null` or `undefined` only equal to itself (strict comparison). - if (a == null || b == null) return false; - // `NaN`s are equivalent, but non-reflexive. - if (a !== a) return b !== b; - // Exhaust primitive checks - var type = typeof a; - if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; - return deepEq(a, b, aStack, bStack); -} - -// Internal recursive comparison function for `_.isEqual`. -function deepEq(a, b, aStack, bStack) { - // Unwrap any wrapped objects. - if (a instanceof _$1) a = a._wrapped; - if (b instanceof _$1) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className !== toString.call(b)) return false; - // Work around a bug in IE 10 - Edge 13. - if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) { - if (!isDataView$1(b)) return false; - className = tagDataView; - } - switch (className) { - // These types are compared by value. - case '[object RegExp]': - // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return '' + a === '' + b; - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. - // Object(NaN) is equivalent to NaN. - if (+a !== +a) return +b !== +b; - // An `egal` comparison is performed for other numeric values. - return +a === 0 ? 1 / +a === 1 / b : +a === +b; - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a === +b; - case '[object Symbol]': - return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b); - case '[object ArrayBuffer]': - case tagDataView: - // Coerce to typed array so we can fall through. - return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); - } - - var areArrays = className === '[object Array]'; - if (!areArrays && isTypedArray$1(a)) { - var byteLength = getByteLength(a); - if (byteLength !== getByteLength(b)) return false; - if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; - areArrays = true; - } - if (!areArrays) { - if (typeof a != 'object' || typeof b != 'object') return false; - - // Objects with different constructors are not equivalent, but `Object`s or `Array`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && - isFunction$1(bCtor) && bCtor instanceof bCtor) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - } - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - - // Initializing stack of traversed objects. - // It's done here since we only need them for objects and arrays comparison. - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] === a) return bStack[length] === b; - } - - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - - // Recursively compare objects and arrays. - if (areArrays) { - // Compare array lengths to determine if a deep comparison is necessary. - length = a.length; - if (length !== b.length) return false; - // Deep compare the contents, ignoring non-numeric properties. - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } - } else { - // Deep compare objects. - var _keys = keys(a), key; - length = _keys.length; - // Ensure that both objects contain the same number of properties before comparing deep equality. - if (keys(b).length !== length) return false; - while (length--) { - // Deep compare each member - key = _keys[length]; - if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return true; -} - -// Perform a deep comparison to check if two objects are equal. -function isEqual(a, b) { - return eq(a, b); -} - -// Retrieve all the enumerable property names of an object. -function allKeys(obj) { - if (!isObject(obj)) return []; - var keys = []; - for (var key in obj) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; -} - -// Since the regular `Object.prototype.toString` type tests don't work for -// some types in IE 11, we use a fingerprinting heuristic instead, based -// on the methods. It's not great, but it's the best we got. -// The fingerprint method lists are defined below. -function ie11fingerprint(methods) { - var length = getLength(methods); - return function(obj) { - if (obj == null) return false; - // `Map`, `WeakMap` and `Set` have no enumerable keys. - var keys = allKeys(obj); - if (getLength(keys)) return false; - for (var i = 0; i < length; i++) { - if (!isFunction$1(obj[methods[i]])) return false; - } - // If we are testing against `WeakMap`, we need to ensure that - // `obj` doesn't have a `forEach` method in order to distinguish - // it from a regular `Map`. - return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); - }; -} - -// In the interest of compact minification, we write -// each string in the fingerprints only once. -var forEachName = 'forEach', - hasName = 'has', - commonInit = ['clear', 'delete'], - mapTail = ['get', hasName, 'set']; - -// `Map`, `WeakMap` and `Set` each have slightly different -// combinations of the above sublists. -var mapMethods = commonInit.concat(forEachName, mapTail), - weakMapMethods = commonInit.concat(mapTail), - setMethods = ['add'].concat(commonInit, forEachName, hasName); - -var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map'); - -var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap'); - -var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set'); - -var isWeakSet = tagTester('WeakSet'); - -// Retrieve the values of an object's properties. -function values(obj) { - var _keys = keys(obj); - var length = _keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[_keys[i]]; - } - return values; -} - -// Convert an object into a list of `[key, value]` pairs. -// The opposite of `_.object` with one argument. -function pairs(obj) { - var _keys = keys(obj); - var length = _keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [_keys[i], obj[_keys[i]]]; - } - return pairs; -} - -// Invert the keys and values of an object. The values must be serializable. -function invert(obj) { - var result = {}; - var _keys = keys(obj); - for (var i = 0, length = _keys.length; i < length; i++) { - result[obj[_keys[i]]] = _keys[i]; - } - return result; -} - -// Return a sorted list of the function names available on the object. -function functions(obj) { - var names = []; - for (var key in obj) { - if (isFunction$1(obj[key])) names.push(key); - } - return names.sort(); -} - -// An internal function for creating assigner functions. -function createAssigner(keysFunc, defaults) { - return function(obj) { - var length = arguments.length; - if (defaults) obj = Object(obj); - if (length < 2 || obj == null) return obj; - for (var index = 1; index < length; index++) { - var source = arguments[index], - keys = keysFunc(source), - l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (!defaults || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; -} - -// Extend a given object with all the properties in passed-in object(s). -var extend = createAssigner(allKeys); - -// Assigns a given object with all the own properties in the passed-in -// object(s). -// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) -var extendOwn = createAssigner(keys); - -// Fill in a given object with default properties. -var defaults = createAssigner(allKeys, true); - -// Create a naked function reference for surrogate-prototype-swapping. -function ctor() { - return function(){}; -} - -// An internal function for creating a new object that inherits from another. -function baseCreate(prototype) { - if (!isObject(prototype)) return {}; - if (nativeCreate) return nativeCreate(prototype); - var Ctor = ctor(); - Ctor.prototype = prototype; - var result = new Ctor; - Ctor.prototype = null; - return result; -} - -// Creates an object that inherits from the given prototype object. -// If additional properties are provided then they will be added to the -// created object. -function create(prototype, props) { - var result = baseCreate(prototype); - if (props) extendOwn(result, props); - return result; -} - -// Create a (shallow-cloned) duplicate of an object. -function clone(obj) { - if (!isObject(obj)) return obj; - return isArray(obj) ? obj.slice() : extend({}, obj); -} - -// Invokes `interceptor` with the `obj` and then returns `obj`. -// The primary purpose of this method is to "tap into" a method chain, in -// order to perform operations on intermediate results within the chain. -function tap(obj, interceptor) { - interceptor(obj); - return obj; -} - -// Normalize a (deep) property `path` to array. -// Like `_.iteratee`, this function can be customized. -function toPath$1(path) { - return isArray(path) ? path : [path]; -} -_$1.toPath = toPath$1; - -// Internal wrapper for `_.toPath` to enable minification. -// Similar to `cb` for `_.iteratee`. -function toPath(path) { - return _$1.toPath(path); -} - -// Internal function to obtain a nested property in `obj` along `path`. -function deepGet(obj, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - if (obj == null) return void 0; - obj = obj[path[i]]; - } - return length ? obj : void 0; -} - -// Get the value of the (deep) property on `path` from `object`. -// If any property in `path` does not exist or if the value is -// `undefined`, return `defaultValue` instead. -// The `path` is normalized through `_.toPath`. -function get(object, path, defaultValue) { - var value = deepGet(object, toPath(path)); - return isUndefined(value) ? defaultValue : value; -} - -// Shortcut function for checking if an object has a given property directly on -// itself (in other words, not on a prototype). Unlike the internal `has` -// function, this public version can also traverse nested properties. -function has(obj, path) { - path = toPath(path); - var length = path.length; - for (var i = 0; i < length; i++) { - var key = path[i]; - if (!has$1(obj, key)) return false; - obj = obj[key]; - } - return !!length; -} - -// Keep the identity function around for default iteratees. -function identity(value) { - return value; -} - -// Returns a predicate for checking whether an object has a given set of -// `key:value` pairs. -function matcher(attrs) { - attrs = extendOwn({}, attrs); - return function(obj) { - return isMatch(obj, attrs); - }; -} - -// Creates a function that, when passed an object, will traverse that object’s -// properties down the given `path`, specified as an array of keys or indices. -function property(path) { - path = toPath(path); - return function(obj) { - return deepGet(obj, path); - }; -} - -// Internal function that returns an efficient (for current engines) version -// of the passed-in callback, to be repeatedly applied in other Underscore -// functions. -function optimizeCb(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - // The 2-argument case is omitted because we’re not using it. - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; -} - -// An internal function to generate callbacks that can be applied to each -// element in a collection, returning the desired result — either `_.identity`, -// an arbitrary callback, a property matcher, or a property accessor. -function baseIteratee(value, context, argCount) { - if (value == null) return identity; - if (isFunction$1(value)) return optimizeCb(value, context, argCount); - if (isObject(value) && !isArray(value)) return matcher(value); - return property(value); -} - -// External wrapper for our callback generator. Users may customize -// `_.iteratee` if they want additional predicate/iteratee shorthand styles. -// This abstraction hides the internal-only `argCount` argument. -function iteratee(value, context) { - return baseIteratee(value, context, Infinity); -} -_$1.iteratee = iteratee; - -// The function we call internally to generate a callback. It invokes -// `_.iteratee` if overridden, otherwise `baseIteratee`. -function cb(value, context, argCount) { - if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context); - return baseIteratee(value, context, argCount); -} - -// Returns the results of applying the `iteratee` to each element of `obj`. -// In contrast to `_.map` it returns an object. -function mapObject(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var _keys = keys(obj), - length = _keys.length, - results = {}; - for (var index = 0; index < length; index++) { - var currentKey = _keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; -} - -// Predicate-generating function. Often useful outside of Underscore. -function noop(){} - -// Generates a function for a given object that returns a given property. -function propertyOf(obj) { - if (obj == null) return noop; - return function(path) { - return get(obj, path); - }; -} - -// Run a function **n** times. -function times(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = optimizeCb(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; -} - -// Return a random integer between `min` and `max` (inclusive). -function random(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); -} - -// A (possibly faster) way to get the current timestamp as an integer. -var now = Date.now || function() { - return new Date().getTime(); -}; - -// Internal helper to generate functions for escaping and unescaping strings -// to/from HTML interpolation. -function createEscaper(map) { - var escaper = function(match) { - return map[match]; - }; - // Regexes for identifying a key that needs to be escaped. - var source = '(?:' + keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; -} - -// Internal list of HTML entities for escaping. -var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' -}; - -// Function for escaping strings to HTML interpolation. -var _escape = createEscaper(escapeMap); - -// Internal list of HTML entities for unescaping. -var unescapeMap = invert(escapeMap); - -// Function for unescaping strings from HTML interpolation. -var _unescape = createEscaper(unescapeMap); - -// By default, Underscore uses ERB-style template delimiters. Change the -// following template settings to use alternative delimiters. -var templateSettings = _$1.templateSettings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g -}; - -// When customizing `_.templateSettings`, if you don't want to define an -// interpolation, evaluation or escaping regex, we need one that is -// guaranteed not to match. -var noMatch = /(.)^/; - -// Certain characters need to be escaped so that they can be put into a -// string literal. -var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' -}; - -var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; - -function escapeChar(match) { - return '\\' + escapes[match]; -} - -// In order to prevent third-party code injection through -// `_.templateSettings.variable`, we test it against the following regular -// expression. It is intentionally a bit more liberal than just matching valid -// identifiers, but still prevents possible loopholes through defaults or -// destructuring assignment. -var bareIdentifier = /^\s*(\w|\$)+\s*$/; - -// JavaScript micro-templating, similar to John Resig's implementation. -// Underscore templating handles arbitrary delimiters, preserves whitespace, -// and correctly escapes quotes within interpolated code. -// NB: `oldSettings` only exists for backwards compatibility. -function template(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = defaults({}, settings, _$1.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escapeRegExp, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - - // Adobe VMs need the match returned to produce the correct offset. - return match; - }); - source += "';\n"; - - var argument = settings.variable; - if (argument) { - // Insure against third-party code injection. (CVE-2021-23358) - if (!bareIdentifier.test(argument)) throw new Error( - 'variable is not a bare identifier: ' + argument - ); - } else { - // If a variable is not specified, place data values in local scope. - source = 'with(obj||{}){\n' + source + '}\n'; - argument = 'obj'; - } - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - var render; - try { - render = new Function(argument, '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _$1); - }; - - // Provide the compiled source as a convenience for precompilation. - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; -} - -// Traverses the children of `obj` along `path`. If a child is a function, it -// is invoked with its parent as context. Returns the value of the final -// child, or `fallback` if any child is undefined. -function result(obj, path, fallback) { - path = toPath(path); - var length = path.length; - if (!length) { - return isFunction$1(fallback) ? fallback.call(obj) : fallback; - } - for (var i = 0; i < length; i++) { - var prop = obj == null ? void 0 : obj[path[i]]; - if (prop === void 0) { - prop = fallback; - i = length; // Ensure we don't continue iterating. - } - obj = isFunction$1(prop) ? prop.call(obj) : prop; - } - return obj; -} - -// Generate a unique integer id (unique within the entire client session). -// Useful for temporary DOM ids. -var idCounter = 0; -function uniqueId(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; -} - -// Start chaining a wrapped Underscore object. -function chain(obj) { - var instance = _$1(obj); - instance._chain = true; - return instance; -} - -// Internal function to execute `sourceFunc` bound to `context` with optional -// `args`. Determines whether to execute a function as a constructor or as a -// normal function. -function executeBound(sourceFunc, boundFunc, context, callingContext, args) { - if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); - var self = baseCreate(sourceFunc.prototype); - var result = sourceFunc.apply(self, args); - if (isObject(result)) return result; - return self; -} - -// Partially apply a function by creating a version that has had some of its -// arguments pre-filled, without changing its dynamic `this` context. `_` acts -// as a placeholder by default, allowing any combination of arguments to be -// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. -var partial = restArguments(function(func, boundArgs) { - var placeholder = partial.placeholder; - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; -}); - -partial.placeholder = _$1; - -// Create a function bound to a given object (assigning `this`, and arguments, -// optionally). -var bind = restArguments(function(func, context, args) { - if (!isFunction$1(func)) throw new TypeError('Bind must be called on a function'); - var bound = restArguments(function(callArgs) { - return executeBound(func, bound, context, this, args.concat(callArgs)); - }); - return bound; -}); - -// Internal helper for collection methods to determine whether a collection -// should be iterated as an array or as an object. -// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength -// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 -var isArrayLike = createSizePropertyCheck(getLength); - -// Internal implementation of a recursive `flatten` function. -function flatten$1(input, depth, strict, output) { - output = output || []; - if (!depth && depth !== 0) { - depth = Infinity; - } else if (depth <= 0) { - return output.concat(input); - } - var idx = output.length; - for (var i = 0, length = getLength(input); i < length; i++) { - var value = input[i]; - if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { - // Flatten current level of array or arguments object. - if (depth > 1) { - flatten$1(value, depth - 1, strict, output); - idx = output.length; - } else { - var j = 0, len = value.length; - while (j < len) output[idx++] = value[j++]; - } - } else if (!strict) { - output[idx++] = value; - } - } - return output; -} - -// Bind a number of an object's methods to that object. Remaining arguments -// are the method names to be bound. Useful for ensuring that all callbacks -// defined on an object belong to it. -var bindAll = restArguments(function(obj, keys) { - keys = flatten$1(keys, false, false); - var index = keys.length; - if (index < 1) throw new Error('bindAll must be passed function names'); - while (index--) { - var key = keys[index]; - obj[key] = bind(obj[key], obj); - } - return obj; -}); - -// Memoize an expensive function by storing its results. -function memoize(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = '' + (hasher ? hasher.apply(this, arguments) : key); - if (!has$1(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; -} - -// Delays a function for the given number of milliseconds, and then calls -// it with the arguments supplied. -var delay = restArguments(function(func, wait, args) { - return setTimeout(function() { - return func.apply(null, args); - }, wait); -}); - -// Defers a function, scheduling it to run after the current call stack has -// cleared. -var defer = partial(delay, _$1, 1); - -// Returns a function, that, when invoked, will only be triggered at most once -// during a given window of time. Normally, the throttled function will run -// as much as it can, without ever going more than once per `wait` duration; -// but if you'd like to disable the execution on the leading edge, pass -// `{leading: false}`. To disable execution on the trailing edge, ditto. -function throttle(func, wait, options) { - var timeout, context, args, result; - var previous = 0; - if (!options) options = {}; - - var later = function() { - previous = options.leading === false ? 0 : now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - - var throttled = function() { - var _now = now(); - if (!previous && options.leading === false) previous = _now; - var remaining = wait - (_now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = _now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - - throttled.cancel = function() { - clearTimeout(timeout); - previous = 0; - timeout = context = args = null; - }; - - return throttled; -} - -// When a sequence of calls of the returned function ends, the argument -// function is triggered. The end of a sequence is defined by the `wait` -// parameter. If `immediate` is passed, the argument function will be -// triggered at the beginning of the sequence instead of at the end. -function debounce(func, wait, immediate) { - var timeout, previous, args, result, context; - - var later = function() { - var passed = now() - previous; - if (wait > passed) { - timeout = setTimeout(later, wait - passed); - } else { - timeout = null; - if (!immediate) result = func.apply(context, args); - // This check is needed because `func` can recursively invoke `debounced`. - if (!timeout) args = context = null; - } - }; - - var debounced = restArguments(function(_args) { - context = this; - args = _args; - previous = now(); - if (!timeout) { - timeout = setTimeout(later, wait); - if (immediate) result = func.apply(context, args); - } - return result; - }); - - debounced.cancel = function() { - clearTimeout(timeout); - timeout = args = context = null; - }; - - return debounced; -} - -// Returns the first function passed as an argument to the second, -// allowing you to adjust arguments, run code before and after, and -// conditionally execute the original function. -function wrap(func, wrapper) { - return partial(wrapper, func); -} - -// Returns a negated version of the passed-in predicate. -function negate(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; -} - -// Returns a function that is the composition of a list of functions, each -// consuming the return value of the function that follows. -function compose() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; -} - -// Returns a function that will only be executed on and after the Nth call. -function after(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; -} - -// Returns a function that will only be executed up to (but not including) the -// Nth call. -function before(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } - if (times <= 1) func = null; - return memo; - }; -} - -// Returns a function that will be executed at most one time, no matter how -// often you call it. Useful for lazy initialization. -var once = partial(before, 2); - -// Returns the first key on an object that passes a truth test. -function findKey(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = keys(obj), key; - for (var i = 0, length = _keys.length; i < length; i++) { - key = _keys[i]; - if (predicate(obj[key], key, obj)) return key; - } -} - -// Internal function to generate `_.findIndex` and `_.findLastIndex`. -function createPredicateIndexFinder(dir) { - return function(array, predicate, context) { - predicate = cb(predicate, context); - var length = getLength(array); - var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } - return -1; - }; -} - -// Returns the first index on an array-like that passes a truth test. -var findIndex = createPredicateIndexFinder(1); - -// Returns the last index on an array-like that passes a truth test. -var findLastIndex = createPredicateIndexFinder(-1); - -// Use a comparator function to figure out the smallest index at which -// an object should be inserted so as to maintain order. Uses binary search. -function sortedIndex(array, obj, iteratee, context) { - iteratee = cb(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = getLength(array); - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; -} - -// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. -function createIndexFinder(dir, predicateFind, sortedIndex) { - return function(array, item, idx) { - var i = 0, length = getLength(array); - if (typeof idx == 'number') { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { - idx = sortedIndex(array, item); - return array[idx] === item ? idx : -1; - } - if (item !== item) { - idx = predicateFind(slice.call(array, i, length), isNaN$1); - return idx >= 0 ? idx + i : -1; - } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } - return -1; - }; -} - -// Return the position of the first occurrence of an item in an array, -// or -1 if the item is not included in the array. -// If the array is large and already in sort order, pass `true` -// for **isSorted** to use binary search. -var indexOf = createIndexFinder(1, findIndex, sortedIndex); - -// Return the position of the last occurrence of an item in an array, -// or -1 if the item is not included in the array. -var lastIndexOf = createIndexFinder(-1, findLastIndex); - -// Return the first value which passes a truth test. -function find(obj, predicate, context) { - var keyFinder = isArrayLike(obj) ? findIndex : findKey; - var key = keyFinder(obj, predicate, context); - if (key !== void 0 && key !== -1) return obj[key]; -} - -// Convenience version of a common use case of `_.find`: getting the first -// object containing specific `key:value` pairs. -function findWhere(obj, attrs) { - return find(obj, matcher(attrs)); -} - -// The cornerstone for collection functions, an `each` -// implementation, aka `forEach`. -// Handles raw objects in addition to array-likes. Treats all -// sparse array-likes as if they were dense. -function each(obj, iteratee, context) { - iteratee = optimizeCb(iteratee, context); - var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var _keys = keys(obj); - for (i = 0, length = _keys.length; i < length; i++) { - iteratee(obj[_keys[i]], _keys[i], obj); - } - } - return obj; -} - -// Return the results of applying the iteratee to each element. -function map(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length, - results = Array(length); - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; -} - -// Internal helper to create a reducing function, iterating left or right. -function createReduce(dir) { - // Wrap code that reassigns argument variables in a separate function than - // the one that accesses `arguments.length` to avoid a perf hit. (#1991) - var reducer = function(obj, iteratee, memo, initial) { - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length, - index = dir > 0 ? 0 : length - 1; - if (!initial) { - memo = obj[_keys ? _keys[index] : index]; - index += dir; - } - for (; index >= 0 && index < length; index += dir) { - var currentKey = _keys ? _keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - }; - - return function(obj, iteratee, memo, context) { - var initial = arguments.length >= 3; - return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); - }; -} - -// **Reduce** builds up a single result from a list of values, aka `inject`, -// or `foldl`. -var reduce = createReduce(1); - -// The right-associative version of reduce, also known as `foldr`. -var reduceRight = createReduce(-1); - -// Return all the elements that pass a truth test. -function filter(obj, predicate, context) { - var results = []; - predicate = cb(predicate, context); - each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; -} - -// Return all the elements for which a truth test fails. -function reject(obj, predicate, context) { - return filter(obj, negate(cb(predicate)), context); -} - -// Determine whether all of the elements pass a truth test. -function every(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; -} - -// Determine if at least one element in the object passes a truth test. -function some(obj, predicate, context) { - predicate = cb(predicate, context); - var _keys = !isArrayLike(obj) && keys(obj), - length = (_keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = _keys ? _keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; -} - -// Determine if the array or object contains a given item (using `===`). -function contains(obj, item, fromIndex, guard) { - if (!isArrayLike(obj)) obj = values(obj); - if (typeof fromIndex != 'number' || guard) fromIndex = 0; - return indexOf(obj, item, fromIndex) >= 0; -} - -// Invoke a method (with arguments) on every item in a collection. -var invoke = restArguments(function(obj, path, args) { - var contextPath, func; - if (isFunction$1(path)) { - func = path; - } else { - path = toPath(path); - contextPath = path.slice(0, -1); - path = path[path.length - 1]; - } - return map(obj, function(context) { - var method = func; - if (!method) { - if (contextPath && contextPath.length) { - context = deepGet(context, contextPath); - } - if (context == null) return void 0; - method = context[path]; - } - return method == null ? method : method.apply(context, args); - }); -}); - -// Convenience version of a common use case of `_.map`: fetching a property. -function pluck(obj, key) { - return map(obj, property(key)); -} - -// Convenience version of a common use case of `_.filter`: selecting only -// objects containing specific `key:value` pairs. -function where(obj, attrs) { - return filter(obj, matcher(attrs)); -} - -// Return the maximum element (or element-based computation). -function max(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { - obj = isArrayLike(obj) ? obj : values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) { - result = v; - lastComputed = computed; - } - }); - } - return result; -} - -// Return the minimum element (or element-based computation). -function min(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { - obj = isArrayLike(obj) ? obj : values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed < lastComputed || (computed === Infinity && result === Infinity)) { - result = v; - lastComputed = computed; - } - }); - } - return result; -} - -// Safely create a real, live array from anything iterable. -var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; -function toArray(obj) { - if (!obj) return []; - if (isArray(obj)) return slice.call(obj); - if (isString(obj)) { - // Keep surrogate pair characters together. - return obj.match(reStrSymbol); - } - if (isArrayLike(obj)) return map(obj, identity); - return values(obj); -} - -// Sample **n** random values from a collection using the modern version of the -// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). -// If **n** is not specified, returns a single random element. -// The internal `guard` argument allows it to work with `_.map`. -function sample(obj, n, guard) { - if (n == null || guard) { - if (!isArrayLike(obj)) obj = values(obj); - return obj[random(obj.length - 1)]; - } - var sample = toArray(obj); - var length = getLength(sample); - n = Math.max(Math.min(n, length), 0); - var last = length - 1; - for (var index = 0; index < n; index++) { - var rand = random(index, last); - var temp = sample[index]; - sample[index] = sample[rand]; - sample[rand] = temp; - } - return sample.slice(0, n); -} - -// Shuffle a collection. -function shuffle(obj) { - return sample(obj, Infinity); -} - -// Sort the object's values by a criterion produced by an iteratee. -function sortBy(obj, iteratee, context) { - var index = 0; - iteratee = cb(iteratee, context); - return pluck(map(obj, function(value, key, list) { - return { - value: value, - index: index++, - criteria: iteratee(value, key, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); -} - -// An internal function used for aggregate "group by" operations. -function group(behavior, partition) { - return function(obj, iteratee, context) { - var result = partition ? [[], []] : {}; - iteratee = cb(iteratee, context); - each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; -} - -// Groups the object's values by a criterion. Pass either a string attribute -// to group by, or a function that returns the criterion. -var groupBy = group(function(result, value, key) { - if (has$1(result, key)) result[key].push(value); else result[key] = [value]; -}); - -// Indexes the object's values by a criterion, similar to `_.groupBy`, but for -// when you know that your index values will be unique. -var indexBy = group(function(result, value, key) { - result[key] = value; -}); - -// Counts instances of an object that group by a certain criterion. Pass -// either a string attribute to count by, or a function that returns the -// criterion. -var countBy = group(function(result, value, key) { - if (has$1(result, key)) result[key]++; else result[key] = 1; -}); - -// Split a collection into two arrays: one whose elements all pass the given -// truth test, and one whose elements all do not pass the truth test. -var partition = group(function(result, value, pass) { - result[pass ? 0 : 1].push(value); -}, true); - -// Return the number of elements in a collection. -function size(obj) { - if (obj == null) return 0; - return isArrayLike(obj) ? obj.length : keys(obj).length; -} - -// Internal `_.pick` helper function to determine whether `key` is an enumerable -// property name of `obj`. -function keyInObj(value, key, obj) { - return key in obj; -} - -// Return a copy of the object only containing the allowed properties. -var pick = restArguments(function(obj, keys) { - var result = {}, iteratee = keys[0]; - if (obj == null) return result; - if (isFunction$1(iteratee)) { - if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); - keys = allKeys(obj); - } else { - iteratee = keyInObj; - keys = flatten$1(keys, false, false); - obj = Object(obj); - } - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i]; - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - return result; -}); - -// Return a copy of the object without the disallowed properties. -var omit = restArguments(function(obj, keys) { - var iteratee = keys[0], context; - if (isFunction$1(iteratee)) { - iteratee = negate(iteratee); - if (keys.length > 1) context = keys[1]; - } else { - keys = map(flatten$1(keys, false, false), String); - iteratee = function(value, key) { - return !contains(keys, key); - }; - } - return pick(obj, iteratee, context); -}); - -// Returns everything but the last entry of the array. Especially useful on -// the arguments object. Passing **n** will return all the values in -// the array, excluding the last N. -function initial(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); -} - -// Get the first element of an array. Passing **n** will return the first N -// values in the array. The **guard** check allows it to work with `_.map`. -function first(array, n, guard) { - if (array == null || array.length < 1) return n == null || guard ? void 0 : []; - if (n == null || guard) return array[0]; - return initial(array, array.length - n); -} - -// Returns everything but the first entry of the `array`. Especially useful on -// the `arguments` object. Passing an **n** will return the rest N values in the -// `array`. -function rest(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); -} - -// Get the last element of an array. Passing **n** will return the last N -// values in the array. -function last(array, n, guard) { - if (array == null || array.length < 1) return n == null || guard ? void 0 : []; - if (n == null || guard) return array[array.length - 1]; - return rest(array, Math.max(0, array.length - n)); -} - -// Trim out all falsy values from an array. -function compact(array) { - return filter(array, Boolean); -} - -// Flatten out an array, either recursively (by default), or up to `depth`. -// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. -function flatten(array, depth) { - return flatten$1(array, depth, false); -} - -// Take the difference between one array and a number of other arrays. -// Only the elements present in just the first array will remain. -var difference = restArguments(function(array, rest) { - rest = flatten$1(rest, true, true); - return filter(array, function(value){ - return !contains(rest, value); - }); -}); - -// Return a version of the array that does not contain the specified value(s). -var without = restArguments(function(array, otherArrays) { - return difference(array, otherArrays); -}); - -// Produce a duplicate-free version of the array. If the array has already -// been sorted, you have the option of using a faster algorithm. -// The faster algorithm will not work with an iteratee if the iteratee -// is not a one-to-one function, so providing an iteratee will disable -// the faster algorithm. -function uniq(array, isSorted, iteratee, context) { - if (!isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = cb(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = getLength(array); i < length; i++) { - var value = array[i], - computed = iteratee ? iteratee(value, i, array) : value; - if (isSorted && !iteratee) { - if (!i || seen !== computed) result.push(value); - seen = computed; - } else if (iteratee) { - if (!contains(seen, computed)) { - seen.push(computed); - result.push(value); - } - } else if (!contains(result, value)) { - result.push(value); - } - } - return result; -} - -// Produce an array that contains the union: each distinct element from all of -// the passed-in arrays. -var union = restArguments(function(arrays) { - return uniq(flatten$1(arrays, true, true)); -}); - -// Produce an array that contains every item shared between all the -// passed-in arrays. -function intersection(array) { - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = getLength(array); i < length; i++) { - var item = array[i]; - if (contains(result, item)) continue; - var j; - for (j = 1; j < argsLength; j++) { - if (!contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; -} - -// Complement of zip. Unzip accepts an array of arrays and groups -// each array's elements on shared indices. -function unzip(array) { - var length = (array && max(array, getLength).length) || 0; - var result = Array(length); - - for (var index = 0; index < length; index++) { - result[index] = pluck(array, index); - } - return result; -} - -// Zip together multiple lists into a single array -- elements that share -// an index go together. -var zip = restArguments(unzip); - -// Converts lists into objects. Pass either a single array of `[key, value]` -// pairs, or two parallel arrays of the same length -- one of keys, and one of -// the corresponding values. Passing by pairs is the reverse of `_.pairs`. -function object(list, values) { - var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; -} - -// Generate an integer Array containing an arithmetic progression. A port of -// the native Python `range()` function. See -// [the Python documentation](https://docs.python.org/library/functions.html#range). -function range(start, stop, step) { - if (stop == null) { - stop = start || 0; - start = 0; - } - if (!step) { - step = stop < start ? -1 : 1; - } - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; -} - -// Chunk a single array into multiple arrays, each containing `count` or fewer -// items. -function chunk(array, count) { - if (count == null || count < 1) return []; - var result = []; - var i = 0, length = array.length; - while (i < length) { - result.push(slice.call(array, i, i += count)); - } - return result; -} - -// Helper function to continue chaining intermediate results. -function chainResult(instance, obj) { - return instance._chain ? _$1(obj).chain() : obj; -} - -// Add your own custom functions to the Underscore object. -function mixin(obj) { - each(functions(obj), function(name) { - var func = _$1[name] = obj[name]; - _$1.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return chainResult(this, func.apply(_$1, args)); - }; - }); - return _$1; -} - -// Add all mutator `Array` functions to the wrapper. -each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _$1.prototype[name] = function() { - var obj = this._wrapped; - if (obj != null) { - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) { - delete obj[0]; - } - } - return chainResult(this, obj); - }; -}); - -// Add all accessor `Array` functions to the wrapper. -each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _$1.prototype[name] = function() { - var obj = this._wrapped; - if (obj != null) obj = method.apply(obj, arguments); - return chainResult(this, obj); - }; -}); - -// Named Exports - -var allExports = { - __proto__: null, - VERSION: VERSION, - restArguments: restArguments, - isObject: isObject, - isNull: isNull, - isUndefined: isUndefined, - isBoolean: isBoolean, - isElement: isElement, - isString: isString, - isNumber: isNumber, - isDate: isDate, - isRegExp: isRegExp, - isError: isError, - isSymbol: isSymbol, - isArrayBuffer: isArrayBuffer, - isDataView: isDataView$1, - isArray: isArray, - isFunction: isFunction$1, - isArguments: isArguments$1, - isFinite: isFinite$1, - isNaN: isNaN$1, - isTypedArray: isTypedArray$1, - isEmpty: isEmpty, - isMatch: isMatch, - isEqual: isEqual, - isMap: isMap, - isWeakMap: isWeakMap, - isSet: isSet, - isWeakSet: isWeakSet, - keys: keys, - allKeys: allKeys, - values: values, - pairs: pairs, - invert: invert, - functions: functions, - methods: functions, - extend: extend, - extendOwn: extendOwn, - assign: extendOwn, - defaults: defaults, - create: create, - clone: clone, - tap: tap, - get: get, - has: has, - mapObject: mapObject, - identity: identity, - constant: constant, - noop: noop, - toPath: toPath$1, - property: property, - propertyOf: propertyOf, - matcher: matcher, - matches: matcher, - times: times, - random: random, - now: now, - escape: _escape, - unescape: _unescape, - templateSettings: templateSettings, - template: template, - result: result, - uniqueId: uniqueId, - chain: chain, - iteratee: iteratee, - partial: partial, - bind: bind, - bindAll: bindAll, - memoize: memoize, - delay: delay, - defer: defer, - throttle: throttle, - debounce: debounce, - wrap: wrap, - negate: negate, - compose: compose, - after: after, - before: before, - once: once, - findKey: findKey, - findIndex: findIndex, - findLastIndex: findLastIndex, - sortedIndex: sortedIndex, - indexOf: indexOf, - lastIndexOf: lastIndexOf, - find: find, - detect: find, - findWhere: findWhere, - each: each, - forEach: each, - map: map, - collect: map, - reduce: reduce, - foldl: reduce, - inject: reduce, - reduceRight: reduceRight, - foldr: reduceRight, - filter: filter, - select: filter, - reject: reject, - every: every, - all: every, - some: some, - any: some, - contains: contains, - includes: contains, - include: contains, - invoke: invoke, - pluck: pluck, - where: where, - max: max, - min: min, - shuffle: shuffle, - sample: sample, - sortBy: sortBy, - groupBy: groupBy, - indexBy: indexBy, - countBy: countBy, - partition: partition, - toArray: toArray, - size: size, - pick: pick, - omit: omit, - first: first, - head: first, - take: first, - initial: initial, - last: last, - rest: rest, - tail: rest, - drop: rest, - compact: compact, - flatten: flatten, - without: without, - uniq: uniq, - unique: uniq, - union: union, - intersection: intersection, - difference: difference, - unzip: unzip, - transpose: unzip, - zip: zip, - object: object, - range: range, - chunk: chunk, - mixin: mixin, - 'default': _$1 -}; - -// Default Export - -// Add all of the Underscore functions to the wrapper object. -var _ = mixin(allExports); -// Legacy Node.js API. -_._ = _; - -exports.VERSION = VERSION; -exports._ = _; -exports._escape = _escape; -exports._unescape = _unescape; -exports.after = after; -exports.allKeys = allKeys; -exports.before = before; -exports.bind = bind; -exports.bindAll = bindAll; -exports.chain = chain; -exports.chunk = chunk; -exports.clone = clone; -exports.compact = compact; -exports.compose = compose; -exports.constant = constant; -exports.contains = contains; -exports.countBy = countBy; -exports.create = create; -exports.debounce = debounce; -exports.defaults = defaults; -exports.defer = defer; -exports.delay = delay; -exports.difference = difference; -exports.each = each; -exports.every = every; -exports.extend = extend; -exports.extendOwn = extendOwn; -exports.filter = filter; -exports.find = find; -exports.findIndex = findIndex; -exports.findKey = findKey; -exports.findLastIndex = findLastIndex; -exports.findWhere = findWhere; -exports.first = first; -exports.flatten = flatten; -exports.functions = functions; -exports.get = get; -exports.groupBy = groupBy; -exports.has = has; -exports.identity = identity; -exports.indexBy = indexBy; -exports.indexOf = indexOf; -exports.initial = initial; -exports.intersection = intersection; -exports.invert = invert; -exports.invoke = invoke; -exports.isArguments = isArguments$1; -exports.isArray = isArray; -exports.isArrayBuffer = isArrayBuffer; -exports.isBoolean = isBoolean; -exports.isDataView = isDataView$1; -exports.isDate = isDate; -exports.isElement = isElement; -exports.isEmpty = isEmpty; -exports.isEqual = isEqual; -exports.isError = isError; -exports.isFinite = isFinite$1; -exports.isFunction = isFunction$1; -exports.isMap = isMap; -exports.isMatch = isMatch; -exports.isNaN = isNaN$1; -exports.isNull = isNull; -exports.isNumber = isNumber; -exports.isObject = isObject; -exports.isRegExp = isRegExp; -exports.isSet = isSet; -exports.isString = isString; -exports.isSymbol = isSymbol; -exports.isTypedArray = isTypedArray$1; -exports.isUndefined = isUndefined; -exports.isWeakMap = isWeakMap; -exports.isWeakSet = isWeakSet; -exports.iteratee = iteratee; -exports.keys = keys; -exports.last = last; -exports.lastIndexOf = lastIndexOf; -exports.map = map; -exports.mapObject = mapObject; -exports.matcher = matcher; -exports.max = max; -exports.memoize = memoize; -exports.min = min; -exports.mixin = mixin; -exports.negate = negate; -exports.noop = noop; -exports.now = now; -exports.object = object; -exports.omit = omit; -exports.once = once; -exports.pairs = pairs; -exports.partial = partial; -exports.partition = partition; -exports.pick = pick; -exports.pluck = pluck; -exports.property = property; -exports.propertyOf = propertyOf; -exports.random = random; -exports.range = range; -exports.reduce = reduce; -exports.reduceRight = reduceRight; -exports.reject = reject; -exports.rest = rest; -exports.restArguments = restArguments; -exports.result = result; -exports.sample = sample; -exports.shuffle = shuffle; -exports.size = size; -exports.some = some; -exports.sortBy = sortBy; -exports.sortedIndex = sortedIndex; -exports.tap = tap; -exports.template = template; -exports.templateSettings = templateSettings; -exports.throttle = throttle; -exports.times = times; -exports.toArray = toArray; -exports.toPath = toPath$1; -exports.union = union; -exports.uniq = uniq; -exports.uniqueId = uniqueId; -exports.unzip = unzip; -exports.values = values; -exports.where = where; -exports.without = without; -exports.wrap = wrap; -exports.zip = zip; -//# sourceMappingURL=underscore-node-f.cjs.map - - -/***/ }), - -/***/ 3571: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -// Underscore.js 1.13.4 -// https://underscorejs.org -// (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -var underscoreNodeF = __nccwpck_require__(1641); - - - -module.exports = underscoreNodeF._; -//# sourceMappingURL=underscore-node.cjs.map - - -/***/ }), - -/***/ 3612: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"8740\",\"䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻\"],[\"8767\",\"綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬\"],[\"87a1\",\"𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋\"],[\"8840\",\"㇀\",4,\"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ\"],[\"88a1\",\"ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛\"],[\"8940\",\"𪎩𡅅\"],[\"8943\",\"攊\"],[\"8946\",\"丽滝鵎釟\"],[\"894c\",\"𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮\"],[\"89a1\",\"琑糼緍楆竉刧\"],[\"89ab\",\"醌碸酞肼\"],[\"89b0\",\"贋胶𠧧\"],[\"89b5\",\"肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁\"],[\"89c1\",\"溚舾甙\"],[\"89c5\",\"䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅\"],[\"8a40\",\"𧶄唥\"],[\"8a43\",\"𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓\"],[\"8a64\",\"𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕\"],[\"8a76\",\"䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯\"],[\"8aa1\",\"𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱\"],[\"8aac\",\"䠋𠆩㿺塳𢶍\"],[\"8ab2\",\"𤗈𠓼𦂗𠽌𠶖啹䂻䎺\"],[\"8abb\",\"䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃\"],[\"8ac9\",\"𪘁𠸉𢫏𢳉\"],[\"8ace\",\"𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻\"],[\"8adf\",\"𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌\"],[\"8af6\",\"𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭\"],[\"8b40\",\"𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹\"],[\"8b55\",\"𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑\"],[\"8ba1\",\"𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁\"],[\"8bde\",\"𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢\"],[\"8c40\",\"倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋\"],[\"8ca1\",\"𣏹椙橃𣱣泿\"],[\"8ca7\",\"爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚\"],[\"8cc9\",\"顨杫䉶圽\"],[\"8cce\",\"藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶\"],[\"8ce6\",\"峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻\"],[\"8d40\",\"𠮟\"],[\"8d42\",\"𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱\"],[\"8da1\",\"㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘\"],[\"8e40\",\"𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎\"],[\"8ea1\",\"繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛\"],[\"8f40\",\"蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖\"],[\"8fa1\",\"𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起\"],[\"9040\",\"趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛\"],[\"90a1\",\"𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜\"],[\"9140\",\"𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈\"],[\"91a1\",\"鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨\"],[\"9240\",\"𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘\"],[\"92a1\",\"働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃\"],[\"9340\",\"媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍\"],[\"93a1\",\"摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋\"],[\"9440\",\"銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻\"],[\"94a1\",\"㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡\"],[\"9540\",\"𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂\"],[\"95a1\",\"衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰\"],[\"9640\",\"桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸\"],[\"96a1\",\"𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉\"],[\"9740\",\"愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫\"],[\"97a1\",\"𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎\"],[\"9840\",\"𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦\"],[\"98a1\",\"咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃\"],[\"9940\",\"䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚\"],[\"99a1\",\"䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿\"],[\"9a40\",\"鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺\"],[\"9aa1\",\"黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪\"],[\"9b40\",\"𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌\"],[\"9b62\",\"𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎\"],[\"9ba1\",\"椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊\"],[\"9c40\",\"嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶\"],[\"9ca1\",\"㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏\"],[\"9d40\",\"𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁\"],[\"9da1\",\"辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢\"],[\"9e40\",\"𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺\"],[\"9ea1\",\"鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭\"],[\"9ead\",\"𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹\"],[\"9ec5\",\"㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲\"],[\"9ef5\",\"噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼\"],[\"9f40\",\"籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱\"],[\"9f4f\",\"凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰\"],[\"9fa1\",\"椬叚鰊鴂䰻陁榀傦畆𡝭駚剳\"],[\"9fae\",\"酙隁酜\"],[\"9fb2\",\"酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽\"],[\"9fc1\",\"𤤙盖鮝个𠳔莾衂\"],[\"9fc9\",\"届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳\"],[\"9fdb\",\"歒酼龥鮗頮颴骺麨麄煺笔\"],[\"9fe7\",\"毺蠘罸\"],[\"9feb\",\"嘠𪙊蹷齓\"],[\"9ff0\",\"跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇\"],[\"a040\",\"𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷\"],[\"a055\",\"𡠻𦸅\"],[\"a058\",\"詾𢔛\"],[\"a05b\",\"惽癧髗鵄鍮鮏蟵\"],[\"a063\",\"蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽\"],[\"a073\",\"坟慯抦戹拎㩜懢厪𣏵捤栂㗒\"],[\"a0a1\",\"嵗𨯂迚𨸹\"],[\"a0a6\",\"僙𡵆礆匲阸𠼻䁥\"],[\"a0ae\",\"矾\"],[\"a0b0\",\"糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦\"],[\"a0d4\",\"覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷\"],[\"a0e2\",\"罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫\"],[\"a3c0\",\"␀\",31,\"␡\"],[\"c6a1\",\"①\",9,\"⑴\",9,\"ⅰ\",9,\"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ\",23],[\"c740\",\"す\",58,\"ァアィイ\"],[\"c7a1\",\"ゥ\",81,\"А\",5,\"ЁЖ\",4],[\"c840\",\"Л\",26,\"ёж\",25,\"⇧↸↹㇏𠃌乚𠂊刂䒑\"],[\"c8a1\",\"龰冈龱𧘇\"],[\"c8cd\",\"¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣\"],[\"c8f5\",\"ʃɐɛɔɵœøŋʊɪ\"],[\"f9fe\",\"■\"],[\"fa40\",\"𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸\"],[\"faa1\",\"鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍\"],[\"fb40\",\"𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙\"],[\"fba1\",\"𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂\"],[\"fc40\",\"廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷\"],[\"fca1\",\"𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝\"],[\"fd40\",\"𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀\"],[\"fda1\",\"𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎\"],[\"fe40\",\"鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌\"],[\"fea1\",\"𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔\"]]"); - -/***/ }), - -/***/ 7803: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"0\",\"\\u0000\",127,\"€\"],[\"8140\",\"丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪\",5,\"乲乴\",9,\"乿\",6,\"亇亊\"],[\"8180\",\"亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂\",6,\"伋伌伒\",4,\"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾\",4,\"佄佅佇\",5,\"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢\"],[\"8240\",\"侤侫侭侰\",4,\"侶\",8,\"俀俁係俆俇俈俉俋俌俍俒\",4,\"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿\",11],[\"8280\",\"個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯\",10,\"倻倽倿偀偁偂偄偅偆偉偊偋偍偐\",4,\"偖偗偘偙偛偝\",7,\"偦\",5,\"偭\",8,\"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎\",20,\"傤傦傪傫傭\",4,\"傳\",6,\"傼\"],[\"8340\",\"傽\",17,\"僐\",5,\"僗僘僙僛\",10,\"僨僩僪僫僯僰僱僲僴僶\",4,\"僼\",9,\"儈\"],[\"8380\",\"儉儊儌\",5,\"儓\",13,\"儢\",28,\"兂兇兊兌兎兏児兒兓兗兘兙兛兝\",4,\"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦\",4,\"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒\",5],[\"8440\",\"凘凙凚凜凞凟凢凣凥\",5,\"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄\",5,\"剋剎剏剒剓剕剗剘\"],[\"8480\",\"剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳\",9,\"剾劀劃\",4,\"劉\",6,\"劑劒劔\",6,\"劜劤劥劦劧劮劯劰労\",9,\"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務\",5,\"勠勡勢勣勥\",10,\"勱\",7,\"勻勼勽匁匂匃匄匇匉匊匋匌匎\"],[\"8540\",\"匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯\",9,\"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏\"],[\"8580\",\"厐\",4,\"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯\",6,\"厷厸厹厺厼厽厾叀參\",4,\"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝\",4,\"呣呥呧呩\",7,\"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡\"],[\"8640\",\"咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠\",4,\"哫哬哯哰哱哴\",5,\"哻哾唀唂唃唄唅唈唊\",4,\"唒唓唕\",5,\"唜唝唞唟唡唥唦\"],[\"8680\",\"唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋\",4,\"啑啒啓啔啗\",4,\"啝啞啟啠啢啣啨啩啫啯\",5,\"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠\",6,\"喨\",8,\"喲喴営喸喺喼喿\",4,\"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗\",4,\"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸\",4,\"嗿嘂嘃嘄嘅\"],[\"8740\",\"嘆嘇嘊嘋嘍嘐\",7,\"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀\",11,\"噏\",4,\"噕噖噚噛噝\",4],[\"8780\",\"噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽\",7,\"嚇\",6,\"嚐嚑嚒嚔\",14,\"嚤\",10,\"嚰\",6,\"嚸嚹嚺嚻嚽\",12,\"囋\",8,\"囕囖囘囙囜団囥\",5,\"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國\",6],[\"8840\",\"園\",9,\"圝圞圠圡圢圤圥圦圧圫圱圲圴\",4,\"圼圽圿坁坃坄坅坆坈坉坋坒\",4,\"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀\"],[\"8880\",\"垁垇垈垉垊垍\",4,\"垔\",6,\"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹\",8,\"埄\",6,\"埌埍埐埑埓埖埗埛埜埞埡埢埣埥\",7,\"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥\",4,\"堫\",4,\"報堲堳場堶\",7],[\"8940\",\"堾\",5,\"塅\",6,\"塎塏塐塒塓塕塖塗塙\",4,\"塟\",5,\"塦\",4,\"塭\",16,\"塿墂墄墆墇墈墊墋墌\"],[\"8980\",\"墍\",4,\"墔\",4,\"墛墜墝墠\",7,\"墪\",17,\"墽墾墿壀壂壃壄壆\",10,\"壒壓壔壖\",13,\"壥\",5,\"壭壯壱売壴壵壷壸壺\",7,\"夃夅夆夈\",4,\"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻\"],[\"8a40\",\"夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛\",4,\"奡奣奤奦\",12,\"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦\"],[\"8a80\",\"妧妬妭妰妱妳\",5,\"妺妼妽妿\",6,\"姇姈姉姌姍姎姏姕姖姙姛姞\",4,\"姤姦姧姩姪姫姭\",11,\"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪\",6,\"娳娵娷\",4,\"娽娾娿婁\",4,\"婇婈婋\",9,\"婖婗婘婙婛\",5],[\"8b40\",\"婡婣婤婥婦婨婩婫\",8,\"婸婹婻婼婽婾媀\",17,\"媓\",6,\"媜\",13,\"媫媬\"],[\"8b80\",\"媭\",4,\"媴媶媷媹\",4,\"媿嫀嫃\",5,\"嫊嫋嫍\",4,\"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬\",4,\"嫲\",22,\"嬊\",11,\"嬘\",25,\"嬳嬵嬶嬸\",7,\"孁\",6],[\"8c40\",\"孈\",7,\"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏\"],[\"8c80\",\"寑寔\",8,\"寠寢寣實寧審\",4,\"寯寱\",6,\"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧\",6,\"屰屲\",6,\"屻屼屽屾岀岃\",4,\"岉岊岋岎岏岒岓岕岝\",4,\"岤\",4],[\"8d40\",\"岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅\",5,\"峌\",5,\"峓\",5,\"峚\",6,\"峢峣峧峩峫峬峮峯峱\",9,\"峼\",4],[\"8d80\",\"崁崄崅崈\",5,\"崏\",4,\"崕崗崘崙崚崜崝崟\",4,\"崥崨崪崫崬崯\",4,\"崵\",7,\"崿\",7,\"嵈嵉嵍\",10,\"嵙嵚嵜嵞\",10,\"嵪嵭嵮嵰嵱嵲嵳嵵\",12,\"嶃\",21,\"嶚嶛嶜嶞嶟嶠\"],[\"8e40\",\"嶡\",21,\"嶸\",12,\"巆\",6,\"巎\",12,\"巜巟巠巣巤巪巬巭\"],[\"8e80\",\"巰巵巶巸\",4,\"巿帀帄帇帉帊帋帍帎帒帓帗帞\",7,\"帨\",4,\"帯帰帲\",4,\"帹帺帾帿幀幁幃幆\",5,\"幍\",6,\"幖\",4,\"幜幝幟幠幣\",14,\"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨\",4,\"庮\",4,\"庴庺庻庼庽庿\",6],[\"8f40\",\"廆廇廈廋\",5,\"廔廕廗廘廙廚廜\",11,\"廩廫\",8,\"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤\"],[\"8f80\",\"弨弫弬弮弰弲\",6,\"弻弽弾弿彁\",14,\"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢\",5,\"復徫徬徯\",5,\"徶徸徹徺徻徾\",4,\"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇\"],[\"9040\",\"怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰\",4,\"怶\",4,\"怽怾恀恄\",6,\"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀\"],[\"9080\",\"悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽\",7,\"惇惈惉惌\",4,\"惒惓惔惖惗惙惛惞惡\",4,\"惪惱惲惵惷惸惻\",4,\"愂愃愄愅愇愊愋愌愐\",4,\"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬\",18,\"慀\",6],[\"9140\",\"慇慉態慍慏慐慒慓慔慖\",6,\"慞慟慠慡慣慤慥慦慩\",6,\"慱慲慳慴慶慸\",18,\"憌憍憏\",4,\"憕\"],[\"9180\",\"憖\",6,\"憞\",8,\"憪憫憭\",9,\"憸\",5,\"憿懀懁懃\",4,\"應懌\",4,\"懓懕\",16,\"懧\",13,\"懶\",8,\"戀\",5,\"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸\",4,\"扂扄扅扆扊\"],[\"9240\",\"扏扐払扖扗扙扚扜\",6,\"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋\",5,\"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁\"],[\"9280\",\"拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳\",5,\"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖\",7,\"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙\",6,\"採掤掦掫掯掱掲掵掶掹掻掽掿揀\"],[\"9340\",\"揁揂揃揅揇揈揊揋揌揑揓揔揕揗\",6,\"揟揢揤\",4,\"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆\",4,\"損搎搑搒搕\",5,\"搝搟搢搣搤\"],[\"9380\",\"搥搧搨搩搫搮\",5,\"搵\",4,\"搻搼搾摀摂摃摉摋\",6,\"摓摕摖摗摙\",4,\"摟\",7,\"摨摪摫摬摮\",9,\"摻\",6,\"撃撆撈\",8,\"撓撔撗撘撚撛撜撝撟\",4,\"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆\",6,\"擏擑擓擔擕擖擙據\"],[\"9440\",\"擛擜擝擟擠擡擣擥擧\",24,\"攁\",7,\"攊\",7,\"攓\",4,\"攙\",8],[\"9480\",\"攢攣攤攦\",4,\"攬攭攰攱攲攳攷攺攼攽敀\",4,\"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數\",14,\"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱\",7,\"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘\",7,\"旡旣旤旪旫\"],[\"9540\",\"旲旳旴旵旸旹旻\",4,\"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷\",4,\"昽昿晀時晄\",6,\"晍晎晐晑晘\"],[\"9580\",\"晙晛晜晝晞晠晢晣晥晧晩\",4,\"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘\",4,\"暞\",8,\"暩\",4,\"暯\",4,\"暵暶暷暸暺暻暼暽暿\",25,\"曚曞\",7,\"曧曨曪\",5,\"曱曵曶書曺曻曽朁朂會\"],[\"9640\",\"朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠\",5,\"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗\",4,\"杝杢杣杤杦杧杫杬杮東杴杶\"],[\"9680\",\"杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹\",7,\"柂柅\",9,\"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵\",7,\"柾栁栂栃栄栆栍栐栒栔栕栘\",4,\"栞栟栠栢\",6,\"栫\",6,\"栴栵栶栺栻栿桇桋桍桏桒桖\",5],[\"9740\",\"桜桝桞桟桪桬\",7,\"桵桸\",8,\"梂梄梇\",7,\"梐梑梒梔梕梖梘\",9,\"梣梤梥梩梪梫梬梮梱梲梴梶梷梸\"],[\"9780\",\"梹\",6,\"棁棃\",5,\"棊棌棎棏棐棑棓棔棖棗棙棛\",4,\"棡棢棤\",9,\"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆\",4,\"椌椏椑椓\",11,\"椡椢椣椥\",7,\"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃\",16,\"楕楖楘楙楛楜楟\"],[\"9840\",\"楡楢楤楥楧楨楩楪楬業楯楰楲\",4,\"楺楻楽楾楿榁榃榅榊榋榌榎\",5,\"榖榗榙榚榝\",9,\"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽\"],[\"9880\",\"榾榿槀槂\",7,\"構槍槏槑槒槓槕\",5,\"槜槝槞槡\",11,\"槮槯槰槱槳\",9,\"槾樀\",9,\"樋\",11,\"標\",5,\"樠樢\",5,\"権樫樬樭樮樰樲樳樴樶\",6,\"樿\",4,\"橅橆橈\",7,\"橑\",6,\"橚\"],[\"9940\",\"橜\",4,\"橢橣橤橦\",10,\"橲\",6,\"橺橻橽橾橿檁檂檃檅\",8,\"檏檒\",4,\"檘\",7,\"檡\",5],[\"9980\",\"檧檨檪檭\",114,\"欥欦欨\",6],[\"9a40\",\"欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍\",11,\"歚\",7,\"歨歩歫\",13,\"歺歽歾歿殀殅殈\"],[\"9a80\",\"殌殎殏殐殑殔殕殗殘殙殜\",4,\"殢\",7,\"殫\",7,\"殶殸\",6,\"毀毃毄毆\",4,\"毌毎毐毑毘毚毜\",4,\"毢\",7,\"毬毭毮毰毱毲毴毶毷毸毺毻毼毾\",6,\"氈\",4,\"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋\",4,\"汑汒汓汖汘\"],[\"9b40\",\"汙汚汢汣汥汦汧汫\",4,\"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘\"],[\"9b80\",\"泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟\",5,\"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽\",4,\"涃涄涆涇涊涋涍涏涐涒涖\",4,\"涜涢涥涬涭涰涱涳涴涶涷涹\",5,\"淁淂淃淈淉淊\"],[\"9c40\",\"淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽\",7,\"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵\"],[\"9c80\",\"渶渷渹渻\",7,\"湅\",7,\"湏湐湑湒湕湗湙湚湜湝湞湠\",10,\"湬湭湯\",14,\"満溁溂溄溇溈溊\",4,\"溑\",6,\"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪\",5],[\"9d40\",\"滰滱滲滳滵滶滷滸滺\",7,\"漃漄漅漇漈漊\",4,\"漐漑漒漖\",9,\"漡漢漣漥漦漧漨漬漮漰漲漴漵漷\",6,\"漿潀潁潂\"],[\"9d80\",\"潃潄潅潈潉潊潌潎\",9,\"潙潚潛潝潟潠潡潣潤潥潧\",5,\"潯潰潱潳潵潶潷潹潻潽\",6,\"澅澆澇澊澋澏\",12,\"澝澞澟澠澢\",4,\"澨\",10,\"澴澵澷澸澺\",5,\"濁濃\",5,\"濊\",6,\"濓\",10,\"濟濢濣濤濥\"],[\"9e40\",\"濦\",7,\"濰\",32,\"瀒\",7,\"瀜\",6,\"瀤\",6],[\"9e80\",\"瀫\",9,\"瀶瀷瀸瀺\",17,\"灍灎灐\",13,\"灟\",11,\"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞\",12,\"炰炲炴炵炶為炾炿烄烅烆烇烉烋\",12,\"烚\"],[\"9f40\",\"烜烝烞烠烡烢烣烥烪烮烰\",6,\"烸烺烻烼烾\",10,\"焋\",4,\"焑焒焔焗焛\",10,\"焧\",7,\"焲焳焴\"],[\"9f80\",\"焵焷\",13,\"煆煇煈煉煋煍煏\",12,\"煝煟\",4,\"煥煩\",4,\"煯煰煱煴煵煶煷煹煻煼煾\",5,\"熅\",4,\"熋熌熍熎熐熑熒熓熕熖熗熚\",4,\"熡\",6,\"熩熪熫熭\",5,\"熴熶熷熸熺\",8,\"燄\",9,\"燏\",4],[\"a040\",\"燖\",9,\"燡燢燣燤燦燨\",5,\"燯\",9,\"燺\",11,\"爇\",19],[\"a080\",\"爛爜爞\",9,\"爩爫爭爮爯爲爳爴爺爼爾牀\",6,\"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅\",4,\"犌犎犐犑犓\",11,\"犠\",11,\"犮犱犲犳犵犺\",6,\"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛\"],[\"a1a1\",\" 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈\",7,\"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓\"],[\"a2a1\",\"ⅰ\",9],[\"a2b1\",\"⒈\",19,\"⑴\",19,\"①\",9],[\"a2e5\",\"㈠\",9],[\"a2f1\",\"Ⅰ\",11],[\"a3a1\",\"!"#¥%\",88,\" ̄\"],[\"a4a1\",\"ぁ\",82],[\"a5a1\",\"ァ\",85],[\"a6a1\",\"Α\",16,\"Σ\",6],[\"a6c1\",\"α\",16,\"σ\",6],[\"a6e0\",\"︵︶︹︺︿﹀︽︾﹁﹂﹃﹄\"],[\"a6ee\",\"︻︼︷︸︱\"],[\"a6f4\",\"︳︴\"],[\"a7a1\",\"А\",5,\"ЁЖ\",25],[\"a7d1\",\"а\",5,\"ёж\",25],[\"a840\",\"ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═\",35,\"▁\",6],[\"a880\",\"█\",7,\"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞\"],[\"a8a1\",\"āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ\"],[\"a8bd\",\"ńň\"],[\"a8c0\",\"ɡ\"],[\"a8c5\",\"ㄅ\",36],[\"a940\",\"〡\",8,\"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦\"],[\"a959\",\"℡㈱\"],[\"a95c\",\"‐\"],[\"a960\",\"ー゛゜ヽヾ〆ゝゞ﹉\",9,\"﹔﹕﹖﹗﹙\",8],[\"a980\",\"﹢\",4,\"﹨﹩﹪﹫\"],[\"a996\",\"〇\"],[\"a9a4\",\"─\",75],[\"aa40\",\"狜狝狟狢\",5,\"狪狫狵狶狹狽狾狿猀猂猄\",5,\"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀\",8],[\"aa80\",\"獉獊獋獌獎獏獑獓獔獕獖獘\",7,\"獡\",10,\"獮獰獱\"],[\"ab40\",\"獲\",11,\"獿\",4,\"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣\",5,\"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃\",4],[\"ab80\",\"珋珌珎珒\",6,\"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳\",4],[\"ac40\",\"珸\",10,\"琄琇琈琋琌琍琎琑\",8,\"琜\",5,\"琣琤琧琩琫琭琯琱琲琷\",4,\"琽琾琿瑀瑂\",11],[\"ac80\",\"瑎\",6,\"瑖瑘瑝瑠\",12,\"瑮瑯瑱\",4,\"瑸瑹瑺\"],[\"ad40\",\"瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑\",10,\"璝璟\",7,\"璪\",15,\"璻\",12],[\"ad80\",\"瓈\",9,\"瓓\",8,\"瓝瓟瓡瓥瓧\",6,\"瓰瓱瓲\"],[\"ae40\",\"瓳瓵瓸\",6,\"甀甁甂甃甅\",7,\"甎甐甒甔甕甖甗甛甝甞甠\",4,\"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘\"],[\"ae80\",\"畝\",7,\"畧畨畩畫\",6,\"畳畵當畷畺\",4,\"疀疁疂疄疅疇\"],[\"af40\",\"疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦\",4,\"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇\"],[\"af80\",\"瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄\"],[\"b040\",\"癅\",6,\"癎\",5,\"癕癗\",4,\"癝癟癠癡癢癤\",6,\"癬癭癮癰\",7,\"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛\"],[\"b080\",\"皜\",7,\"皥\",8,\"皯皰皳皵\",9,\"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥\"],[\"b140\",\"盄盇盉盋盌盓盕盙盚盜盝盞盠\",4,\"盦\",7,\"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎\",10,\"眛眜眝眞眡眣眤眥眧眪眫\"],[\"b180\",\"眬眮眰\",4,\"眹眻眽眾眿睂睄睅睆睈\",7,\"睒\",7,\"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳\"],[\"b240\",\"睝睞睟睠睤睧睩睪睭\",11,\"睺睻睼瞁瞂瞃瞆\",5,\"瞏瞐瞓\",11,\"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶\",4],[\"b280\",\"瞼瞾矀\",12,\"矎\",8,\"矘矙矚矝\",4,\"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖\"],[\"b340\",\"矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃\",5,\"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚\"],[\"b380\",\"硛硜硞\",11,\"硯\",7,\"硸硹硺硻硽\",6,\"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚\"],[\"b440\",\"碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨\",7,\"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚\",9],[\"b480\",\"磤磥磦磧磩磪磫磭\",4,\"磳磵磶磸磹磻\",5,\"礂礃礄礆\",6,\"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮\"],[\"b540\",\"礍\",5,\"礔\",9,\"礟\",4,\"礥\",14,\"礵\",4,\"礽礿祂祃祄祅祇祊\",8,\"祔祕祘祙祡祣\"],[\"b580\",\"祤祦祩祪祫祬祮祰\",6,\"祹祻\",4,\"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠\"],[\"b640\",\"禓\",6,\"禛\",11,\"禨\",10,\"禴\",4,\"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙\",5,\"秠秡秢秥秨秪\"],[\"b680\",\"秬秮秱\",6,\"秹秺秼秾秿稁稄稅稇稈稉稊稌稏\",4,\"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二\"],[\"b740\",\"稝稟稡稢稤\",14,\"稴稵稶稸稺稾穀\",5,\"穇\",9,\"穒\",4,\"穘\",16],[\"b780\",\"穩\",6,\"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服\"],[\"b840\",\"窣窤窧窩窪窫窮\",4,\"窴\",10,\"竀\",10,\"竌\",9,\"竗竘竚竛竜竝竡竢竤竧\",5,\"竮竰竱竲竳\"],[\"b880\",\"竴\",4,\"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹\"],[\"b940\",\"笯笰笲笴笵笶笷笹笻笽笿\",5,\"筆筈筊筍筎筓筕筗筙筜筞筟筡筣\",10,\"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆\",6,\"箎箏\"],[\"b980\",\"箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹\",7,\"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈\"],[\"ba40\",\"篅篈築篊篋篍篎篏篐篒篔\",4,\"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲\",4,\"篸篹篺篻篽篿\",7,\"簈簉簊簍簎簐\",5,\"簗簘簙\"],[\"ba80\",\"簚\",4,\"簠\",5,\"簨簩簫\",12,\"簹\",5,\"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖\"],[\"bb40\",\"籃\",9,\"籎\",36,\"籵\",5,\"籾\",9],[\"bb80\",\"粈粊\",6,\"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴\",4,\"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕\"],[\"bc40\",\"粿糀糂糃糄糆糉糋糎\",6,\"糘糚糛糝糞糡\",6,\"糩\",5,\"糰\",7,\"糹糺糼\",13,\"紋\",5],[\"bc80\",\"紑\",14,\"紡紣紤紥紦紨紩紪紬紭紮細\",6,\"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件\"],[\"bd40\",\"紷\",54,\"絯\",7],[\"bd80\",\"絸\",32,\"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸\"],[\"be40\",\"継\",12,\"綧\",6,\"綯\",42],[\"be80\",\"線\",32,\"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻\"],[\"bf40\",\"緻\",62],[\"bf80\",\"縺縼\",4,\"繂\",4,\"繈\",21,\"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀\"],[\"c040\",\"繞\",35,\"纃\",23,\"纜纝纞\"],[\"c080\",\"纮纴纻纼绖绤绬绹缊缐缞缷缹缻\",6,\"罃罆\",9,\"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐\"],[\"c140\",\"罖罙罛罜罝罞罠罣\",4,\"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂\",7,\"羋羍羏\",4,\"羕\",4,\"羛羜羠羢羣羥羦羨\",6,\"羱\"],[\"c180\",\"羳\",4,\"羺羻羾翀翂翃翄翆翇翈翉翋翍翏\",4,\"翖翗翙\",5,\"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿\"],[\"c240\",\"翤翧翨翪翫翬翭翯翲翴\",6,\"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫\",5,\"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗\"],[\"c280\",\"聙聛\",13,\"聫\",5,\"聲\",11,\"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫\"],[\"c340\",\"聾肁肂肅肈肊肍\",5,\"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇\",4,\"胏\",6,\"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋\"],[\"c380\",\"脌脕脗脙脛脜脝脟\",12,\"脭脮脰脳脴脵脷脹\",4,\"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸\"],[\"c440\",\"腀\",5,\"腇腉腍腎腏腒腖腗腘腛\",4,\"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃\",4,\"膉膋膌膍膎膐膒\",5,\"膙膚膞\",4,\"膤膥\"],[\"c480\",\"膧膩膫\",7,\"膴\",5,\"膼膽膾膿臄臅臇臈臉臋臍\",6,\"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁\"],[\"c540\",\"臔\",14,\"臤臥臦臨臩臫臮\",4,\"臵\",5,\"臽臿舃與\",4,\"舎舏舑舓舕\",5,\"舝舠舤舥舦舧舩舮舲舺舼舽舿\"],[\"c580\",\"艀艁艂艃艅艆艈艊艌艍艎艐\",7,\"艙艛艜艝艞艠\",7,\"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗\"],[\"c640\",\"艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸\"],[\"c680\",\"苺苼\",4,\"茊茋茍茐茒茓茖茘茙茝\",9,\"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐\"],[\"c740\",\"茾茿荁荂荄荅荈荊\",4,\"荓荕\",4,\"荝荢荰\",6,\"荹荺荾\",6,\"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡\",6,\"莬莭莮\"],[\"c780\",\"莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠\"],[\"c840\",\"菮華菳\",4,\"菺菻菼菾菿萀萂萅萇萈萉萊萐萒\",5,\"萙萚萛萞\",5,\"萩\",7,\"萲\",5,\"萹萺萻萾\",7,\"葇葈葉\"],[\"c880\",\"葊\",6,\"葒\",4,\"葘葝葞葟葠葢葤\",4,\"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁\"],[\"c940\",\"葽\",4,\"蒃蒄蒅蒆蒊蒍蒏\",7,\"蒘蒚蒛蒝蒞蒟蒠蒢\",12,\"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗\"],[\"c980\",\"蓘\",4,\"蓞蓡蓢蓤蓧\",4,\"蓭蓮蓯蓱\",10,\"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳\"],[\"ca40\",\"蔃\",8,\"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢\",8,\"蔭\",9,\"蔾\",4,\"蕄蕅蕆蕇蕋\",10],[\"ca80\",\"蕗蕘蕚蕛蕜蕝蕟\",4,\"蕥蕦蕧蕩\",8,\"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱\"],[\"cb40\",\"薂薃薆薈\",6,\"薐\",10,\"薝\",6,\"薥薦薧薩薫薬薭薱\",5,\"薸薺\",6,\"藂\",6,\"藊\",4,\"藑藒\"],[\"cb80\",\"藔藖\",5,\"藝\",6,\"藥藦藧藨藪\",14,\"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔\"],[\"cc40\",\"藹藺藼藽藾蘀\",4,\"蘆\",10,\"蘒蘓蘔蘕蘗\",15,\"蘨蘪\",13,\"蘹蘺蘻蘽蘾蘿虀\"],[\"cc80\",\"虁\",11,\"虒虓處\",4,\"虛虜虝號虠虡虣\",7,\"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃\"],[\"cd40\",\"虭虯虰虲\",6,\"蚃\",6,\"蚎\",4,\"蚔蚖\",5,\"蚞\",4,\"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻\",4,\"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜\"],[\"cd80\",\"蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威\"],[\"ce40\",\"蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀\",6,\"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚\",5,\"蝡蝢蝦\",7,\"蝯蝱蝲蝳蝵\"],[\"ce80\",\"蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎\",4,\"螔螕螖螘\",6,\"螠\",4,\"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺\"],[\"cf40\",\"螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁\",4,\"蟇蟈蟉蟌\",4,\"蟔\",6,\"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯\",9],[\"cf80\",\"蟺蟻蟼蟽蟿蠀蠁蠂蠄\",5,\"蠋\",7,\"蠔蠗蠘蠙蠚蠜\",4,\"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓\"],[\"d040\",\"蠤\",13,\"蠳\",5,\"蠺蠻蠽蠾蠿衁衂衃衆\",5,\"衎\",5,\"衕衖衘衚\",6,\"衦衧衪衭衯衱衳衴衵衶衸衹衺\"],[\"d080\",\"衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗\",4,\"袝\",4,\"袣袥\",5,\"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄\"],[\"d140\",\"袬袮袯袰袲\",4,\"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚\",4,\"裠裡裦裧裩\",6,\"裲裵裶裷裺裻製裿褀褁褃\",5],[\"d180\",\"褉褋\",4,\"褑褔\",4,\"褜\",4,\"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶\"],[\"d240\",\"褸\",8,\"襂襃襅\",24,\"襠\",5,\"襧\",19,\"襼\"],[\"d280\",\"襽襾覀覂覄覅覇\",26,\"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐\"],[\"d340\",\"覢\",30,\"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴\",6],[\"d380\",\"觻\",4,\"訁\",5,\"計\",21,\"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉\"],[\"d440\",\"訞\",31,\"訿\",8,\"詉\",21],[\"d480\",\"詟\",25,\"詺\",6,\"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧\"],[\"d540\",\"誁\",7,\"誋\",7,\"誔\",46],[\"d580\",\"諃\",32,\"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政\"],[\"d640\",\"諤\",34,\"謈\",27],[\"d680\",\"謤謥謧\",30,\"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑\"],[\"d740\",\"譆\",31,\"譧\",4,\"譭\",25],[\"d780\",\"讇\",24,\"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座\"],[\"d840\",\"谸\",8,\"豂豃豄豅豈豊豋豍\",7,\"豖豗豘豙豛\",5,\"豣\",6,\"豬\",6,\"豴豵豶豷豻\",6,\"貃貄貆貇\"],[\"d880\",\"貈貋貍\",6,\"貕貖貗貙\",20,\"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝\"],[\"d940\",\"貮\",62],[\"d980\",\"賭\",32,\"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼\"],[\"da40\",\"贎\",14,\"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸\",8,\"趂趃趆趇趈趉趌\",4,\"趒趓趕\",9,\"趠趡\"],[\"da80\",\"趢趤\",12,\"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺\"],[\"db40\",\"跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾\",6,\"踆踇踈踋踍踎踐踑踒踓踕\",7,\"踠踡踤\",4,\"踫踭踰踲踳踴踶踷踸踻踼踾\"],[\"db80\",\"踿蹃蹅蹆蹌\",4,\"蹓\",5,\"蹚\",11,\"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝\"],[\"dc40\",\"蹳蹵蹷\",4,\"蹽蹾躀躂躃躄躆躈\",6,\"躑躒躓躕\",6,\"躝躟\",11,\"躭躮躰躱躳\",6,\"躻\",7],[\"dc80\",\"軃\",10,\"軏\",21,\"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥\"],[\"dd40\",\"軥\",62],[\"dd80\",\"輤\",32,\"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺\"],[\"de40\",\"轅\",32,\"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆\"],[\"de80\",\"迉\",4,\"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖\"],[\"df40\",\"這逜連逤逥逧\",5,\"逰\",4,\"逷逹逺逽逿遀遃遅遆遈\",4,\"過達違遖遙遚遜\",5,\"遤遦遧適遪遫遬遯\",4,\"遶\",6,\"遾邁\"],[\"df80\",\"還邅邆邇邉邊邌\",4,\"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼\"],[\"e040\",\"郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅\",19,\"鄚鄛鄜\"],[\"e080\",\"鄝鄟鄠鄡鄤\",10,\"鄰鄲\",6,\"鄺\",8,\"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼\"],[\"e140\",\"酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀\",4,\"醆醈醊醎醏醓\",6,\"醜\",5,\"醤\",5,\"醫醬醰醱醲醳醶醷醸醹醻\"],[\"e180\",\"醼\",10,\"釈釋釐釒\",9,\"針\",8,\"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺\"],[\"e240\",\"釦\",62],[\"e280\",\"鈥\",32,\"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧\",5,\"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂\"],[\"e340\",\"鉆\",45,\"鉵\",16],[\"e380\",\"銆\",7,\"銏\",24,\"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾\"],[\"e440\",\"銨\",5,\"銯\",24,\"鋉\",31],[\"e480\",\"鋩\",32,\"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑\"],[\"e540\",\"錊\",51,\"錿\",10],[\"e580\",\"鍊\",31,\"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣\"],[\"e640\",\"鍬\",34,\"鎐\",27],[\"e680\",\"鎬\",29,\"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩\"],[\"e740\",\"鏎\",7,\"鏗\",54],[\"e780\",\"鐎\",32,\"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡\",6,\"缪缫缬缭缯\",4,\"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬\"],[\"e840\",\"鐯\",14,\"鐿\",43,\"鑬鑭鑮鑯\"],[\"e880\",\"鑰\",20,\"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹\"],[\"e940\",\"锧锳锽镃镈镋镕镚镠镮镴镵長\",7,\"門\",42],[\"e980\",\"閫\",32,\"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋\"],[\"ea40\",\"闌\",27,\"闬闿阇阓阘阛阞阠阣\",6,\"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗\"],[\"ea80\",\"陘陙陚陜陝陞陠陣陥陦陫陭\",4,\"陳陸\",12,\"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰\"],[\"eb40\",\"隌階隑隒隓隕隖隚際隝\",9,\"隨\",7,\"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖\",9,\"雡\",6,\"雫\"],[\"eb80\",\"雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗\",4,\"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻\"],[\"ec40\",\"霡\",8,\"霫霬霮霯霱霳\",4,\"霺霻霼霽霿\",18,\"靔靕靗靘靚靜靝靟靣靤靦靧靨靪\",7],[\"ec80\",\"靲靵靷\",4,\"靽\",7,\"鞆\",4,\"鞌鞎鞏鞐鞓鞕鞖鞗鞙\",4,\"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐\"],[\"ed40\",\"鞞鞟鞡鞢鞤\",6,\"鞬鞮鞰鞱鞳鞵\",46],[\"ed80\",\"韤韥韨韮\",4,\"韴韷\",23,\"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨\"],[\"ee40\",\"頏\",62],[\"ee80\",\"顎\",32,\"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶\",4,\"钼钽钿铄铈\",6,\"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪\"],[\"ef40\",\"顯\",5,\"颋颎颒颕颙颣風\",37,\"飏飐飔飖飗飛飜飝飠\",4],[\"ef80\",\"飥飦飩\",30,\"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒\",4,\"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤\",8,\"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔\"],[\"f040\",\"餈\",4,\"餎餏餑\",28,\"餯\",26],[\"f080\",\"饊\",9,\"饖\",12,\"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨\",4,\"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦\",6,\"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙\"],[\"f140\",\"馌馎馚\",10,\"馦馧馩\",47],[\"f180\",\"駙\",32,\"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃\"],[\"f240\",\"駺\",62],[\"f280\",\"騹\",32,\"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒\"],[\"f340\",\"驚\",17,\"驲骃骉骍骎骔骕骙骦骩\",6,\"骲骳骴骵骹骻骽骾骿髃髄髆\",4,\"髍髎髏髐髒體髕髖髗髙髚髛髜\"],[\"f380\",\"髝髞髠髢髣髤髥髧髨髩髪髬髮髰\",8,\"髺髼\",6,\"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋\"],[\"f440\",\"鬇鬉\",5,\"鬐鬑鬒鬔\",10,\"鬠鬡鬢鬤\",10,\"鬰鬱鬳\",7,\"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕\",5],[\"f480\",\"魛\",32,\"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤\"],[\"f540\",\"魼\",62],[\"f580\",\"鮻\",32,\"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜\"],[\"f640\",\"鯜\",62],[\"f680\",\"鰛\",32,\"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅\",5,\"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞\",5,\"鲥\",4,\"鲫鲭鲮鲰\",7,\"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋\"],[\"f740\",\"鰼\",62],[\"f780\",\"鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾\",4,\"鳈鳉鳑鳒鳚鳛鳠鳡鳌\",4,\"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄\"],[\"f840\",\"鳣\",62],[\"f880\",\"鴢\",32],[\"f940\",\"鵃\",62],[\"f980\",\"鶂\",32],[\"fa40\",\"鶣\",62],[\"fa80\",\"鷢\",32],[\"fb40\",\"鸃\",27,\"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴\",9,\"麀\"],[\"fb80\",\"麁麃麄麅麆麉麊麌\",5,\"麔\",8,\"麞麠\",5,\"麧麨麩麪\"],[\"fc40\",\"麫\",8,\"麵麶麷麹麺麼麿\",4,\"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰\",8,\"黺黽黿\",6],[\"fc80\",\"鼆\",4,\"鼌鼏鼑鼒鼔鼕鼖鼘鼚\",5,\"鼡鼣\",8,\"鼭鼮鼰鼱\"],[\"fd40\",\"鼲\",4,\"鼸鼺鼼鼿\",4,\"齅\",10,\"齒\",38],[\"fd80\",\"齹\",5,\"龁龂龍\",11,\"龜龝龞龡\",4,\"郎凉秊裏隣\"],[\"fe40\",\"兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩\"]]"); - -/***/ }), - -/***/ 7013: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"0\",\"\\u0000\",127],[\"8141\",\"갂갃갅갆갋\",4,\"갘갞갟갡갢갣갥\",6,\"갮갲갳갴\"],[\"8161\",\"갵갶갷갺갻갽갾갿걁\",9,\"걌걎\",5,\"걕\"],[\"8181\",\"걖걗걙걚걛걝\",18,\"걲걳걵걶걹걻\",4,\"겂겇겈겍겎겏겑겒겓겕\",6,\"겞겢\",5,\"겫겭겮겱\",6,\"겺겾겿곀곂곃곅곆곇곉곊곋곍\",7,\"곖곘\",7,\"곢곣곥곦곩곫곭곮곲곴곷\",4,\"곾곿괁괂괃괅괇\",4,\"괎괐괒괓\"],[\"8241\",\"괔괕괖괗괙괚괛괝괞괟괡\",7,\"괪괫괮\",5],[\"8261\",\"괶괷괹괺괻괽\",6,\"굆굈굊\",5,\"굑굒굓굕굖굗\"],[\"8281\",\"굙\",7,\"굢굤\",7,\"굮굯굱굲굷굸굹굺굾궀궃\",4,\"궊궋궍궎궏궑\",10,\"궞\",5,\"궥\",17,\"궸\",7,\"귂귃귅귆귇귉\",6,\"귒귔\",7,\"귝귞귟귡귢귣귥\",18],[\"8341\",\"귺귻귽귾긂\",5,\"긊긌긎\",5,\"긕\",7],[\"8361\",\"긝\",18,\"긲긳긵긶긹긻긼\"],[\"8381\",\"긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗\",4,\"깞깢깣깤깦깧깪깫깭깮깯깱\",6,\"깺깾\",5,\"꺆\",5,\"꺍\",46,\"꺿껁껂껃껅\",6,\"껎껒\",5,\"껚껛껝\",8],[\"8441\",\"껦껧껩껪껬껮\",5,\"껵껶껷껹껺껻껽\",8],[\"8461\",\"꼆꼉꼊꼋꼌꼎꼏꼑\",18],[\"8481\",\"꼤\",7,\"꼮꼯꼱꼳꼵\",6,\"꼾꽀꽄꽅꽆꽇꽊\",5,\"꽑\",10,\"꽞\",5,\"꽦\",18,\"꽺\",5,\"꾁꾂꾃꾅꾆꾇꾉\",6,\"꾒꾓꾔꾖\",5,\"꾝\",26,\"꾺꾻꾽꾾\"],[\"8541\",\"꾿꿁\",5,\"꿊꿌꿏\",4,\"꿕\",6,\"꿝\",4],[\"8561\",\"꿢\",5,\"꿪\",5,\"꿲꿳꿵꿶꿷꿹\",6,\"뀂뀃\"],[\"8581\",\"뀅\",6,\"뀍뀎뀏뀑뀒뀓뀕\",6,\"뀞\",9,\"뀩\",26,\"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞\",29,\"끾끿낁낂낃낅\",6,\"낎낐낒\",5,\"낛낝낞낣낤\"],[\"8641\",\"낥낦낧낪낰낲낶낷낹낺낻낽\",6,\"냆냊\",5,\"냒\"],[\"8661\",\"냓냕냖냗냙\",6,\"냡냢냣냤냦\",10],[\"8681\",\"냱\",22,\"넊넍넎넏넑넔넕넖넗넚넞\",4,\"넦넧넩넪넫넭\",6,\"넶넺\",5,\"녂녃녅녆녇녉\",6,\"녒녓녖녗녙녚녛녝녞녟녡\",22,\"녺녻녽녾녿놁놃\",4,\"놊놌놎놏놐놑놕놖놗놙놚놛놝\"],[\"8741\",\"놞\",9,\"놩\",15],[\"8761\",\"놹\",18,\"뇍뇎뇏뇑뇒뇓뇕\"],[\"8781\",\"뇖\",5,\"뇞뇠\",7,\"뇪뇫뇭뇮뇯뇱\",7,\"뇺뇼뇾\",5,\"눆눇눉눊눍\",6,\"눖눘눚\",5,\"눡\",18,\"눵\",6,\"눽\",26,\"뉙뉚뉛뉝뉞뉟뉡\",6,\"뉪\",4],[\"8841\",\"뉯\",4,\"뉶\",5,\"뉽\",6,\"늆늇늈늊\",4],[\"8861\",\"늏늒늓늕늖늗늛\",4,\"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷\"],[\"8881\",\"늸\",15,\"닊닋닍닎닏닑닓\",4,\"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉\",6,\"댒댖\",5,\"댝\",54,\"덗덙덚덝덠덡덢덣\"],[\"8941\",\"덦덨덪덬덭덯덲덳덵덶덷덹\",6,\"뎂뎆\",5,\"뎍\"],[\"8961\",\"뎎뎏뎑뎒뎓뎕\",10,\"뎢\",5,\"뎩뎪뎫뎭\"],[\"8981\",\"뎮\",21,\"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩\",18,\"돽\",18,\"됑\",6,\"됙됚됛됝됞됟됡\",6,\"됪됬\",7,\"됵\",15],[\"8a41\",\"둅\",10,\"둒둓둕둖둗둙\",6,\"둢둤둦\"],[\"8a61\",\"둧\",4,\"둭\",18,\"뒁뒂\"],[\"8a81\",\"뒃\",4,\"뒉\",19,\"뒞\",5,\"뒥뒦뒧뒩뒪뒫뒭\",7,\"뒶뒸뒺\",5,\"듁듂듃듅듆듇듉\",6,\"듑듒듓듔듖\",5,\"듞듟듡듢듥듧\",4,\"듮듰듲\",5,\"듹\",26,\"딖딗딙딚딝\"],[\"8b41\",\"딞\",5,\"딦딫\",4,\"딲딳딵딶딷딹\",6,\"땂땆\"],[\"8b61\",\"땇땈땉땊땎땏땑땒땓땕\",6,\"땞땢\",8],[\"8b81\",\"땫\",52,\"떢떣떥떦떧떩떬떭떮떯떲떶\",4,\"떾떿뗁뗂뗃뗅\",6,\"뗎뗒\",5,\"뗙\",18,\"뗭\",18],[\"8c41\",\"똀\",15,\"똒똓똕똖똗똙\",4],[\"8c61\",\"똞\",6,\"똦\",5,\"똭\",6,\"똵\",5],[\"8c81\",\"똻\",12,\"뙉\",26,\"뙥뙦뙧뙩\",50,\"뚞뚟뚡뚢뚣뚥\",5,\"뚭뚮뚯뚰뚲\",16],[\"8d41\",\"뛃\",16,\"뛕\",8],[\"8d61\",\"뛞\",17,\"뛱뛲뛳뛵뛶뛷뛹뛺\"],[\"8d81\",\"뛻\",4,\"뜂뜃뜄뜆\",33,\"뜪뜫뜭뜮뜱\",6,\"뜺뜼\",7,\"띅띆띇띉띊띋띍\",6,\"띖\",9,\"띡띢띣띥띦띧띩\",6,\"띲띴띶\",5,\"띾띿랁랂랃랅\",6,\"랎랓랔랕랚랛랝랞\"],[\"8e41\",\"랟랡\",6,\"랪랮\",5,\"랶랷랹\",8],[\"8e61\",\"럂\",4,\"럈럊\",19],[\"8e81\",\"럞\",13,\"럮럯럱럲럳럵\",6,\"럾렂\",4,\"렊렋렍렎렏렑\",6,\"렚렜렞\",5,\"렦렧렩렪렫렭\",6,\"렶렺\",5,\"롁롂롃롅\",11,\"롒롔\",7,\"롞롟롡롢롣롥\",6,\"롮롰롲\",5,\"롹롺롻롽\",7],[\"8f41\",\"뢅\",7,\"뢎\",17],[\"8f61\",\"뢠\",7,\"뢩\",6,\"뢱뢲뢳뢵뢶뢷뢹\",4],[\"8f81\",\"뢾뢿룂룄룆\",5,\"룍룎룏룑룒룓룕\",7,\"룞룠룢\",5,\"룪룫룭룮룯룱\",6,\"룺룼룾\",5,\"뤅\",18,\"뤙\",6,\"뤡\",26,\"뤾뤿륁륂륃륅\",6,\"륍륎륐륒\",5],[\"9041\",\"륚륛륝륞륟륡\",6,\"륪륬륮\",5,\"륶륷륹륺륻륽\"],[\"9061\",\"륾\",5,\"릆릈릋릌릏\",15],[\"9081\",\"릟\",12,\"릮릯릱릲릳릵\",6,\"릾맀맂\",5,\"맊맋맍맓\",4,\"맚맜맟맠맢맦맧맩맪맫맭\",6,\"맶맻\",4,\"먂\",5,\"먉\",11,\"먖\",33,\"먺먻먽먾먿멁멃멄멅멆\"],[\"9141\",\"멇멊멌멏멐멑멒멖멗멙멚멛멝\",6,\"멦멪\",5],[\"9161\",\"멲멳멵멶멷멹\",9,\"몆몈몉몊몋몍\",5],[\"9181\",\"몓\",20,\"몪몭몮몯몱몳\",4,\"몺몼몾\",5,\"뫅뫆뫇뫉\",14,\"뫚\",33,\"뫽뫾뫿묁묂묃묅\",7,\"묎묐묒\",5,\"묙묚묛묝묞묟묡\",6],[\"9241\",\"묨묪묬\",7,\"묷묹묺묿\",4,\"뭆뭈뭊뭋뭌뭎뭑뭒\"],[\"9261\",\"뭓뭕뭖뭗뭙\",7,\"뭢뭤\",7,\"뭭\",4],[\"9281\",\"뭲\",21,\"뮉뮊뮋뮍뮎뮏뮑\",18,\"뮥뮦뮧뮩뮪뮫뮭\",6,\"뮵뮶뮸\",7,\"믁믂믃믅믆믇믉\",6,\"믑믒믔\",35,\"믺믻믽믾밁\"],[\"9341\",\"밃\",4,\"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵\"],[\"9361\",\"밶밷밹\",6,\"뱂뱆뱇뱈뱊뱋뱎뱏뱑\",8],[\"9381\",\"뱚뱛뱜뱞\",37,\"벆벇벉벊벍벏\",4,\"벖벘벛\",4,\"벢벣벥벦벩\",6,\"벲벶\",5,\"벾벿볁볂볃볅\",7,\"볎볒볓볔볖볗볙볚볛볝\",22,\"볷볹볺볻볽\"],[\"9441\",\"볾\",5,\"봆봈봊\",5,\"봑봒봓봕\",8],[\"9461\",\"봞\",5,\"봥\",6,\"봭\",12],[\"9481\",\"봺\",5,\"뵁\",6,\"뵊뵋뵍뵎뵏뵑\",6,\"뵚\",9,\"뵥뵦뵧뵩\",22,\"붂붃붅붆붋\",4,\"붒붔붖붗붘붛붝\",6,\"붥\",10,\"붱\",6,\"붹\",24],[\"9541\",\"뷒뷓뷖뷗뷙뷚뷛뷝\",11,\"뷪\",5,\"뷱\"],[\"9561\",\"뷲뷳뷵뷶뷷뷹\",6,\"븁븂븄븆\",5,\"븎븏븑븒븓\"],[\"9581\",\"븕\",6,\"븞븠\",35,\"빆빇빉빊빋빍빏\",4,\"빖빘빜빝빞빟빢빣빥빦빧빩빫\",4,\"빲빶\",4,\"빾빿뺁뺂뺃뺅\",6,\"뺎뺒\",5,\"뺚\",13,\"뺩\",14],[\"9641\",\"뺸\",23,\"뻒뻓\"],[\"9661\",\"뻕뻖뻙\",6,\"뻡뻢뻦\",5,\"뻭\",8],[\"9681\",\"뻶\",10,\"뼂\",5,\"뼊\",13,\"뼚뼞\",33,\"뽂뽃뽅뽆뽇뽉\",6,\"뽒뽓뽔뽖\",44],[\"9741\",\"뾃\",16,\"뾕\",8],[\"9761\",\"뾞\",17,\"뾱\",7],[\"9781\",\"뾹\",11,\"뿆\",5,\"뿎뿏뿑뿒뿓뿕\",6,\"뿝뿞뿠뿢\",89,\"쀽쀾쀿\"],[\"9841\",\"쁀\",16,\"쁒\",5,\"쁙쁚쁛\"],[\"9861\",\"쁝쁞쁟쁡\",6,\"쁪\",15],[\"9881\",\"쁺\",21,\"삒삓삕삖삗삙\",6,\"삢삤삦\",5,\"삮삱삲삷\",4,\"삾샂샃샄샆샇샊샋샍샎샏샑\",6,\"샚샞\",5,\"샦샧샩샪샫샭\",6,\"샶샸샺\",5,\"섁섂섃섅섆섇섉\",6,\"섑섒섓섔섖\",5,\"섡섢섥섨섩섪섫섮\"],[\"9941\",\"섲섳섴섵섷섺섻섽섾섿셁\",6,\"셊셎\",5,\"셖셗\"],[\"9961\",\"셙셚셛셝\",6,\"셦셪\",5,\"셱셲셳셵셶셷셹셺셻\"],[\"9981\",\"셼\",8,\"솆\",5,\"솏솑솒솓솕솗\",4,\"솞솠솢솣솤솦솧솪솫솭솮솯솱\",11,\"솾\",5,\"쇅쇆쇇쇉쇊쇋쇍\",6,\"쇕쇖쇙\",6,\"쇡쇢쇣쇥쇦쇧쇩\",6,\"쇲쇴\",7,\"쇾쇿숁숂숃숅\",6,\"숎숐숒\",5,\"숚숛숝숞숡숢숣\"],[\"9a41\",\"숤숥숦숧숪숬숮숰숳숵\",16],[\"9a61\",\"쉆쉇쉉\",6,\"쉒쉓쉕쉖쉗쉙\",6,\"쉡쉢쉣쉤쉦\"],[\"9a81\",\"쉧\",4,\"쉮쉯쉱쉲쉳쉵\",6,\"쉾슀슂\",5,\"슊\",5,\"슑\",6,\"슙슚슜슞\",5,\"슦슧슩슪슫슮\",5,\"슶슸슺\",33,\"싞싟싡싢싥\",5,\"싮싰싲싳싴싵싷싺싽싾싿쌁\",6,\"쌊쌋쌎쌏\"],[\"9b41\",\"쌐쌑쌒쌖쌗쌙쌚쌛쌝\",6,\"쌦쌧쌪\",8],[\"9b61\",\"쌳\",17,\"썆\",7],[\"9b81\",\"썎\",25,\"썪썫썭썮썯썱썳\",4,\"썺썻썾\",5,\"쎅쎆쎇쎉쎊쎋쎍\",50,\"쏁\",22,\"쏚\"],[\"9c41\",\"쏛쏝쏞쏡쏣\",4,\"쏪쏫쏬쏮\",5,\"쏶쏷쏹\",5],[\"9c61\",\"쏿\",8,\"쐉\",6,\"쐑\",9],[\"9c81\",\"쐛\",8,\"쐥\",6,\"쐭쐮쐯쐱쐲쐳쐵\",6,\"쐾\",9,\"쑉\",26,\"쑦쑧쑩쑪쑫쑭\",6,\"쑶쑷쑸쑺\",5,\"쒁\",18,\"쒕\",6,\"쒝\",12],[\"9d41\",\"쒪\",13,\"쒹쒺쒻쒽\",8],[\"9d61\",\"쓆\",25],[\"9d81\",\"쓠\",8,\"쓪\",5,\"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂\",9,\"씍씎씏씑씒씓씕\",6,\"씝\",10,\"씪씫씭씮씯씱\",6,\"씺씼씾\",5,\"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩\",6,\"앲앶\",5,\"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔\"],[\"9e41\",\"얖얙얚얛얝얞얟얡\",7,\"얪\",9,\"얶\"],[\"9e61\",\"얷얺얿\",4,\"엋엍엏엒엓엕엖엗엙\",6,\"엢엤엦엧\"],[\"9e81\",\"엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑\",6,\"옚옝\",6,\"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉\",6,\"왒왖\",5,\"왞왟왡\",10,\"왭왮왰왲\",5,\"왺왻왽왾왿욁\",6,\"욊욌욎\",5,\"욖욗욙욚욛욝\",6,\"욦\"],[\"9f41\",\"욨욪\",5,\"욲욳욵욶욷욻\",4,\"웂웄웆\",5,\"웎\"],[\"9f61\",\"웏웑웒웓웕\",6,\"웞웟웢\",5,\"웪웫웭웮웯웱웲\"],[\"9f81\",\"웳\",4,\"웺웻웼웾\",5,\"윆윇윉윊윋윍\",6,\"윖윘윚\",5,\"윢윣윥윦윧윩\",6,\"윲윴윶윸윹윺윻윾윿읁읂읃읅\",4,\"읋읎읐읙읚읛읝읞읟읡\",6,\"읩읪읬\",7,\"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛\",4,\"잢잧\",4,\"잮잯잱잲잳잵잶잷\"],[\"a041\",\"잸잹잺잻잾쟂\",5,\"쟊쟋쟍쟏쟑\",6,\"쟙쟚쟛쟜\"],[\"a061\",\"쟞\",5,\"쟥쟦쟧쟩쟪쟫쟭\",13],[\"a081\",\"쟻\",4,\"젂젃젅젆젇젉젋\",4,\"젒젔젗\",4,\"젞젟젡젢젣젥\",6,\"젮젰젲\",5,\"젹젺젻젽젾젿졁\",6,\"졊졋졎\",5,\"졕\",26,\"졲졳졵졶졷졹졻\",4,\"좂좄좈좉좊좎\",5,\"좕\",7,\"좞좠좢좣좤\"],[\"a141\",\"좥좦좧좩\",18,\"좾좿죀죁\"],[\"a161\",\"죂죃죅죆죇죉죊죋죍\",6,\"죖죘죚\",5,\"죢죣죥\"],[\"a181\",\"죦\",14,\"죶\",5,\"죾죿줁줂줃줇\",4,\"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈\",9,\"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬\"],[\"a241\",\"줐줒\",5,\"줙\",18],[\"a261\",\"줭\",6,\"줵\",18],[\"a281\",\"쥈\",7,\"쥒쥓쥕쥖쥗쥙\",6,\"쥢쥤\",7,\"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®\"],[\"a341\",\"쥱쥲쥳쥵\",6,\"쥽\",10,\"즊즋즍즎즏\"],[\"a361\",\"즑\",6,\"즚즜즞\",16],[\"a381\",\"즯\",16,\"짂짃짅짆짉짋\",4,\"짒짔짗짘짛!\",58,\"₩]\",32,\" ̄\"],[\"a441\",\"짞짟짡짣짥짦짨짩짪짫짮짲\",5,\"짺짻짽짾짿쨁쨂쨃쨄\"],[\"a461\",\"쨅쨆쨇쨊쨎\",5,\"쨕쨖쨗쨙\",12],[\"a481\",\"쨦쨧쨨쨪\",28,\"ㄱ\",93],[\"a541\",\"쩇\",4,\"쩎쩏쩑쩒쩓쩕\",6,\"쩞쩢\",5,\"쩩쩪\"],[\"a561\",\"쩫\",17,\"쩾\",5,\"쪅쪆\"],[\"a581\",\"쪇\",16,\"쪙\",14,\"ⅰ\",9],[\"a5b0\",\"Ⅰ\",9],[\"a5c1\",\"Α\",16,\"Σ\",6],[\"a5e1\",\"α\",16,\"σ\",6],[\"a641\",\"쪨\",19,\"쪾쪿쫁쫂쫃쫅\"],[\"a661\",\"쫆\",5,\"쫎쫐쫒쫔쫕쫖쫗쫚\",5,\"쫡\",6],[\"a681\",\"쫨쫩쫪쫫쫭\",6,\"쫵\",18,\"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃\",7],[\"a741\",\"쬋\",4,\"쬑쬒쬓쬕쬖쬗쬙\",6,\"쬢\",7],[\"a761\",\"쬪\",22,\"쭂쭃쭄\"],[\"a781\",\"쭅쭆쭇쭊쭋쭍쭎쭏쭑\",6,\"쭚쭛쭜쭞\",5,\"쭥\",7,\"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙\",9,\"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰\",9,\"㎀\",4,\"㎺\",5,\"㎐\",4,\"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆\"],[\"a841\",\"쭭\",10,\"쭺\",14],[\"a861\",\"쮉\",18,\"쮝\",6],[\"a881\",\"쮤\",19,\"쮹\",11,\"ÆЪĦ\"],[\"a8a6\",\"IJ\"],[\"a8a8\",\"ĿŁØŒºÞŦŊ\"],[\"a8b1\",\"㉠\",27,\"ⓐ\",25,\"①\",14,\"½⅓⅔¼¾⅛⅜⅝⅞\"],[\"a941\",\"쯅\",14,\"쯕\",10],[\"a961\",\"쯠쯡쯢쯣쯥쯦쯨쯪\",18],[\"a981\",\"쯽\",14,\"찎찏찑찒찓찕\",6,\"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀\",27,\"⒜\",25,\"⑴\",14,\"¹²³⁴ⁿ₁₂₃₄\"],[\"aa41\",\"찥찦찪찫찭찯찱\",6,\"찺찿\",4,\"챆챇챉챊챋챍챎\"],[\"aa61\",\"챏\",4,\"챖챚\",5,\"챡챢챣챥챧챩\",6,\"챱챲\"],[\"aa81\",\"챳챴챶\",29,\"ぁ\",82],[\"ab41\",\"첔첕첖첗첚첛첝첞첟첡\",6,\"첪첮\",5,\"첶첷첹\"],[\"ab61\",\"첺첻첽\",6,\"쳆쳈쳊\",5,\"쳑쳒쳓쳕\",5],[\"ab81\",\"쳛\",8,\"쳥\",6,\"쳭쳮쳯쳱\",12,\"ァ\",85],[\"ac41\",\"쳾쳿촀촂\",5,\"촊촋촍촎촏촑\",6,\"촚촜촞촟촠\"],[\"ac61\",\"촡촢촣촥촦촧촩촪촫촭\",11,\"촺\",4],[\"ac81\",\"촿\",28,\"쵝쵞쵟А\",5,\"ЁЖ\",25],[\"acd1\",\"а\",5,\"ёж\",25],[\"ad41\",\"쵡쵢쵣쵥\",6,\"쵮쵰쵲\",5,\"쵹\",7],[\"ad61\",\"춁\",6,\"춉\",10,\"춖춗춙춚춛춝춞춟\"],[\"ad81\",\"춠춡춢춣춦춨춪\",5,\"춱\",18,\"췅\"],[\"ae41\",\"췆\",5,\"췍췎췏췑\",16],[\"ae61\",\"췢\",5,\"췩췪췫췭췮췯췱\",6,\"췺췼췾\",4],[\"ae81\",\"츃츅츆츇츉츊츋츍\",6,\"츕츖츗츘츚\",5,\"츢츣츥츦츧츩츪츫\"],[\"af41\",\"츬츭츮츯츲츴츶\",19],[\"af61\",\"칊\",13,\"칚칛칝칞칢\",5,\"칪칬\"],[\"af81\",\"칮\",5,\"칶칷칹칺칻칽\",6,\"캆캈캊\",5,\"캒캓캕캖캗캙\"],[\"b041\",\"캚\",5,\"캢캦\",5,\"캮\",12],[\"b061\",\"캻\",5,\"컂\",19],[\"b081\",\"컖\",13,\"컦컧컩컪컭\",6,\"컶컺\",5,\"가각간갇갈갉갊감\",7,\"같\",4,\"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆\"],[\"b141\",\"켂켃켅켆켇켉\",6,\"켒켔켖\",5,\"켝켞켟켡켢켣\"],[\"b161\",\"켥\",6,\"켮켲\",5,\"켹\",11],[\"b181\",\"콅\",14,\"콖콗콙콚콛콝\",6,\"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸\"],[\"b241\",\"콭콮콯콲콳콵콶콷콹\",6,\"쾁쾂쾃쾄쾆\",5,\"쾍\"],[\"b261\",\"쾎\",18,\"쾢\",5,\"쾩\"],[\"b281\",\"쾪\",5,\"쾱\",18,\"쿅\",6,\"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙\"],[\"b341\",\"쿌\",19,\"쿢쿣쿥쿦쿧쿩\"],[\"b361\",\"쿪\",5,\"쿲쿴쿶\",5,\"쿽쿾쿿퀁퀂퀃퀅\",5],[\"b381\",\"퀋\",5,\"퀒\",5,\"퀙\",19,\"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫\",4,\"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝\"],[\"b441\",\"퀮\",5,\"퀶퀷퀹퀺퀻퀽\",6,\"큆큈큊\",5],[\"b461\",\"큑큒큓큕큖큗큙\",6,\"큡\",10,\"큮큯\"],[\"b481\",\"큱큲큳큵\",6,\"큾큿킀킂\",18,\"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫\",4,\"닳담답닷\",4,\"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥\"],[\"b541\",\"킕\",14,\"킦킧킩킪킫킭\",5],[\"b561\",\"킳킶킸킺\",5,\"탂탃탅탆탇탊\",5,\"탒탖\",4],[\"b581\",\"탛탞탟탡탢탣탥\",6,\"탮탲\",5,\"탹\",11,\"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸\"],[\"b641\",\"턅\",7,\"턎\",17],[\"b661\",\"턠\",15,\"턲턳턵턶턷턹턻턼턽턾\"],[\"b681\",\"턿텂텆\",5,\"텎텏텑텒텓텕\",6,\"텞텠텢\",5,\"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗\"],[\"b741\",\"텮\",13,\"텽\",6,\"톅톆톇톉톊\"],[\"b761\",\"톋\",20,\"톢톣톥톦톧\"],[\"b781\",\"톩\",6,\"톲톴톶톷톸톹톻톽톾톿퇁\",14,\"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩\"],[\"b841\",\"퇐\",7,\"퇙\",17],[\"b861\",\"퇫\",8,\"퇵퇶퇷퇹\",13],[\"b881\",\"툈툊\",5,\"툑\",24,\"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많\",4,\"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼\"],[\"b941\",\"툪툫툮툯툱툲툳툵\",6,\"툾퉀퉂\",5,\"퉉퉊퉋퉌\"],[\"b961\",\"퉍\",14,\"퉝\",6,\"퉥퉦퉧퉨\"],[\"b981\",\"퉩\",22,\"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바\",4,\"받\",4,\"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗\"],[\"ba41\",\"튍튎튏튒튓튔튖\",5,\"튝튞튟튡튢튣튥\",6,\"튭\"],[\"ba61\",\"튮튯튰튲\",5,\"튺튻튽튾틁틃\",4,\"틊틌\",5],[\"ba81\",\"틒틓틕틖틗틙틚틛틝\",6,\"틦\",9,\"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤\"],[\"bb41\",\"틻\",4,\"팂팄팆\",5,\"팏팑팒팓팕팗\",4,\"팞팢팣\"],[\"bb61\",\"팤팦팧팪팫팭팮팯팱\",6,\"팺팾\",5,\"퍆퍇퍈퍉\"],[\"bb81\",\"퍊\",31,\"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤\"],[\"bc41\",\"퍪\",17,\"퍾퍿펁펂펃펅펆펇\"],[\"bc61\",\"펈펉펊펋펎펒\",5,\"펚펛펝펞펟펡\",6,\"펪펬펮\"],[\"bc81\",\"펯\",4,\"펵펶펷펹펺펻펽\",6,\"폆폇폊\",5,\"폑\",5,\"샥샨샬샴샵샷샹섀섄섈섐섕서\",4,\"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭\"],[\"bd41\",\"폗폙\",7,\"폢폤\",7,\"폮폯폱폲폳폵폶폷\"],[\"bd61\",\"폸폹폺폻폾퐀퐂\",5,\"퐉\",13],[\"bd81\",\"퐗\",5,\"퐞\",25,\"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰\"],[\"be41\",\"퐸\",7,\"푁푂푃푅\",14],[\"be61\",\"푔\",7,\"푝푞푟푡푢푣푥\",7,\"푮푰푱푲\"],[\"be81\",\"푳\",4,\"푺푻푽푾풁풃\",4,\"풊풌풎\",5,\"풕\",8,\"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄\",6,\"엌엎\"],[\"bf41\",\"풞\",10,\"풪\",14],[\"bf61\",\"풹\",18,\"퓍퓎퓏퓑퓒퓓퓕\"],[\"bf81\",\"퓖\",5,\"퓝퓞퓠\",7,\"퓩퓪퓫퓭퓮퓯퓱\",6,\"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염\",5,\"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨\"],[\"c041\",\"퓾\",5,\"픅픆픇픉픊픋픍\",6,\"픖픘\",5],[\"c061\",\"픞\",25],[\"c081\",\"픸픹픺픻픾픿핁핂핃핅\",6,\"핎핐핒\",5,\"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응\",7,\"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊\"],[\"c141\",\"핤핦핧핪핬핮\",5,\"핶핷핹핺핻핽\",6,\"햆햊햋\"],[\"c161\",\"햌햍햎햏햑\",19,\"햦햧\"],[\"c181\",\"햨\",31,\"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓\"],[\"c241\",\"헊헋헍헎헏헑헓\",4,\"헚헜헞\",5,\"헦헧헩헪헫헭헮\"],[\"c261\",\"헯\",4,\"헶헸헺\",5,\"혂혃혅혆혇혉\",6,\"혒\"],[\"c281\",\"혖\",5,\"혝혞혟혡혢혣혥\",7,\"혮\",9,\"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻\"],[\"c341\",\"혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝\",4],[\"c361\",\"홢\",4,\"홨홪\",5,\"홲홳홵\",11],[\"c381\",\"횁횂횄횆\",5,\"횎횏횑횒횓횕\",7,\"횞횠횢\",5,\"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층\"],[\"c441\",\"횫횭횮횯횱\",7,\"횺횼\",7,\"훆훇훉훊훋\"],[\"c461\",\"훍훎훏훐훒훓훕훖훘훚\",5,\"훡훢훣훥훦훧훩\",4],[\"c481\",\"훮훯훱훲훳훴훶\",5,\"훾훿휁휂휃휅\",11,\"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼\"],[\"c541\",\"휕휖휗휚휛휝휞휟휡\",6,\"휪휬휮\",5,\"휶휷휹\"],[\"c561\",\"휺휻휽\",6,\"흅흆흈흊\",5,\"흒흓흕흚\",4],[\"c581\",\"흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵\",6,\"흾흿힀힂\",5,\"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜\"],[\"c641\",\"힍힎힏힑\",6,\"힚힜힞\",5],[\"c6a1\",\"퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁\"],[\"c7a1\",\"퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠\"],[\"c8a1\",\"혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝\"],[\"caa1\",\"伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕\"],[\"cba1\",\"匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢\"],[\"cca1\",\"瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械\"],[\"cda1\",\"棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜\"],[\"cea1\",\"科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾\"],[\"cfa1\",\"區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴\"],[\"d0a1\",\"鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣\"],[\"d1a1\",\"朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩\",5,\"那樂\",4,\"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉\"],[\"d2a1\",\"納臘蠟衲囊娘廊\",4,\"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧\",5,\"駑魯\",10,\"濃籠聾膿農惱牢磊腦賂雷尿壘\",7,\"嫩訥杻紐勒\",5,\"能菱陵尼泥匿溺多茶\"],[\"d3a1\",\"丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃\"],[\"d4a1\",\"棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅\"],[\"d5a1\",\"蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣\"],[\"d6a1\",\"煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼\"],[\"d7a1\",\"遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬\"],[\"d8a1\",\"立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅\"],[\"d9a1\",\"蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文\"],[\"daa1\",\"汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑\"],[\"dba1\",\"發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖\"],[\"dca1\",\"碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦\"],[\"dda1\",\"孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥\"],[\"dea1\",\"脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索\"],[\"dfa1\",\"傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署\"],[\"e0a1\",\"胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬\"],[\"e1a1\",\"聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁\"],[\"e2a1\",\"戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧\"],[\"e3a1\",\"嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁\"],[\"e4a1\",\"沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額\"],[\"e5a1\",\"櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬\"],[\"e6a1\",\"旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒\"],[\"e7a1\",\"簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳\"],[\"e8a1\",\"烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療\"],[\"e9a1\",\"窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓\"],[\"eaa1\",\"運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜\"],[\"eba1\",\"濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼\"],[\"eca1\",\"議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄\"],[\"eda1\",\"立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長\"],[\"eea1\",\"障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱\"],[\"efa1\",\"煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖\"],[\"f0a1\",\"靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫\"],[\"f1a1\",\"踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只\"],[\"f2a1\",\"咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯\"],[\"f3a1\",\"鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策\"],[\"f4a1\",\"責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢\"],[\"f5a1\",\"椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃\"],[\"f6a1\",\"贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託\"],[\"f7a1\",\"鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑\"],[\"f8a1\",\"阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃\"],[\"f9a1\",\"品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航\"],[\"faa1\",\"行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型\"],[\"fba1\",\"形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵\"],[\"fca1\",\"禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆\"],[\"fda1\",\"爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰\"]]"); - -/***/ }), - -/***/ 3104: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"0\",\"\\u0000\",127],[\"a140\",\" ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚\"],[\"a1a1\",\"﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢\",4,\"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/\"],[\"a240\",\"\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁\",7,\"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭\"],[\"a2a1\",\"╮╰╯═╞╪╡◢◣◥◤╱╲╳0\",9,\"Ⅰ\",9,\"〡\",8,\"十卄卅A\",25,\"a\",21],[\"a340\",\"wxyzΑ\",16,\"Σ\",6,\"α\",16,\"σ\",6,\"ㄅ\",10],[\"a3a1\",\"ㄐ\",25,\"˙ˉˊˇˋ\"],[\"a3e1\",\"€\"],[\"a440\",\"一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才\"],[\"a4a1\",\"丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙\"],[\"a540\",\"世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外\"],[\"a5a1\",\"央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全\"],[\"a640\",\"共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年\"],[\"a6a1\",\"式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣\"],[\"a740\",\"作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍\"],[\"a7a1\",\"均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠\"],[\"a840\",\"杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒\"],[\"a8a1\",\"芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵\"],[\"a940\",\"咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居\"],[\"a9a1\",\"屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊\"],[\"aa40\",\"昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠\"],[\"aaa1\",\"炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附\"],[\"ab40\",\"陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品\"],[\"aba1\",\"哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷\"],[\"ac40\",\"拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗\"],[\"aca1\",\"活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄\"],[\"ad40\",\"耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥\"],[\"ada1\",\"迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪\"],[\"ae40\",\"哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙\"],[\"aea1\",\"恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓\"],[\"af40\",\"浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷\"],[\"afa1\",\"砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃\"],[\"b040\",\"虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡\"],[\"b0a1\",\"陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀\"],[\"b140\",\"娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽\"],[\"b1a1\",\"情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺\"],[\"b240\",\"毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶\"],[\"b2a1\",\"瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼\"],[\"b340\",\"莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途\"],[\"b3a1\",\"部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠\"],[\"b440\",\"婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍\"],[\"b4a1\",\"插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋\"],[\"b540\",\"溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘\"],[\"b5a1\",\"窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁\"],[\"b640\",\"詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑\"],[\"b6a1\",\"間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼\"],[\"b740\",\"媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業\"],[\"b7a1\",\"楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督\"],[\"b840\",\"睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫\"],[\"b8a1\",\"腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊\"],[\"b940\",\"辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴\"],[\"b9a1\",\"飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇\"],[\"ba40\",\"愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢\"],[\"baa1\",\"滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬\"],[\"bb40\",\"罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤\"],[\"bba1\",\"說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜\"],[\"bc40\",\"劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂\"],[\"bca1\",\"慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃\"],[\"bd40\",\"瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯\"],[\"bda1\",\"翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞\"],[\"be40\",\"輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉\"],[\"bea1\",\"鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡\"],[\"bf40\",\"濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊\"],[\"bfa1\",\"縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚\"],[\"c040\",\"錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇\"],[\"c0a1\",\"嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬\"],[\"c140\",\"瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪\"],[\"c1a1\",\"薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁\"],[\"c240\",\"駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘\"],[\"c2a1\",\"癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦\"],[\"c340\",\"鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸\"],[\"c3a1\",\"獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類\"],[\"c440\",\"願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼\"],[\"c4a1\",\"纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴\"],[\"c540\",\"護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬\"],[\"c5a1\",\"禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒\"],[\"c640\",\"讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲\"],[\"c940\",\"乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕\"],[\"c9a1\",\"氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋\"],[\"ca40\",\"汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘\"],[\"caa1\",\"吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇\"],[\"cb40\",\"杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓\"],[\"cba1\",\"芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢\"],[\"cc40\",\"坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋\"],[\"cca1\",\"怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲\"],[\"cd40\",\"泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺\"],[\"cda1\",\"矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏\"],[\"ce40\",\"哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛\"],[\"cea1\",\"峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺\"],[\"cf40\",\"柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂\"],[\"cfa1\",\"洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀\"],[\"d040\",\"穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪\"],[\"d0a1\",\"苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱\"],[\"d140\",\"唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧\"],[\"d1a1\",\"恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤\"],[\"d240\",\"毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸\"],[\"d2a1\",\"牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐\"],[\"d340\",\"笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢\"],[\"d3a1\",\"荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐\"],[\"d440\",\"酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅\"],[\"d4a1\",\"唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏\"],[\"d540\",\"崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟\"],[\"d5a1\",\"捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉\"],[\"d640\",\"淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏\"],[\"d6a1\",\"痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟\"],[\"d740\",\"耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷\"],[\"d7a1\",\"蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪\"],[\"d840\",\"釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷\"],[\"d8a1\",\"堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔\"],[\"d940\",\"惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒\"],[\"d9a1\",\"晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞\"],[\"da40\",\"湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖\"],[\"daa1\",\"琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥\"],[\"db40\",\"罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳\"],[\"dba1\",\"菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺\"],[\"dc40\",\"軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈\"],[\"dca1\",\"隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆\"],[\"dd40\",\"媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤\"],[\"dda1\",\"搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼\"],[\"de40\",\"毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓\"],[\"dea1\",\"煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓\"],[\"df40\",\"稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯\"],[\"dfa1\",\"腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤\"],[\"e040\",\"觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿\"],[\"e0a1\",\"遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠\"],[\"e140\",\"凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠\"],[\"e1a1\",\"寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉\"],[\"e240\",\"榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊\"],[\"e2a1\",\"漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓\"],[\"e340\",\"禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞\"],[\"e3a1\",\"耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻\"],[\"e440\",\"裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍\"],[\"e4a1\",\"銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘\"],[\"e540\",\"噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉\"],[\"e5a1\",\"憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒\"],[\"e640\",\"澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙\"],[\"e6a1\",\"獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟\"],[\"e740\",\"膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢\"],[\"e7a1\",\"蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧\"],[\"e840\",\"踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓\"],[\"e8a1\",\"銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮\"],[\"e940\",\"噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺\"],[\"e9a1\",\"憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸\"],[\"ea40\",\"澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙\"],[\"eaa1\",\"瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘\"],[\"eb40\",\"蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠\"],[\"eba1\",\"諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌\"],[\"ec40\",\"錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕\"],[\"eca1\",\"魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎\"],[\"ed40\",\"檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶\"],[\"eda1\",\"瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞\"],[\"ee40\",\"蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞\"],[\"eea1\",\"謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜\"],[\"ef40\",\"鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰\"],[\"efa1\",\"鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶\"],[\"f040\",\"璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒\"],[\"f0a1\",\"臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧\"],[\"f140\",\"蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪\"],[\"f1a1\",\"鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰\"],[\"f240\",\"徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛\"],[\"f2a1\",\"礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕\"],[\"f340\",\"譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦\"],[\"f3a1\",\"鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲\"],[\"f440\",\"嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩\"],[\"f4a1\",\"禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿\"],[\"f540\",\"鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛\"],[\"f5a1\",\"鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥\"],[\"f640\",\"蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺\"],[\"f6a1\",\"騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚\"],[\"f740\",\"糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊\"],[\"f7a1\",\"驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾\"],[\"f840\",\"讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏\"],[\"f8a1\",\"齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚\"],[\"f940\",\"纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊\"],[\"f9a1\",\"龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓\"]]"); - -/***/ }), - -/***/ 2417: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"0\",\"\\u0000\",127],[\"8ea1\",\"。\",62],[\"a1a1\",\" 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈\",9,\"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇\"],[\"a2a1\",\"◆□■△▲▽▼※〒→←↑↓〓\"],[\"a2ba\",\"∈∋⊆⊇⊂⊃∪∩\"],[\"a2ca\",\"∧∨¬⇒⇔∀∃\"],[\"a2dc\",\"∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬\"],[\"a2f2\",\"ʼn♯♭♪†‡¶\"],[\"a2fe\",\"◯\"],[\"a3b0\",\"0\",9],[\"a3c1\",\"A\",25],[\"a3e1\",\"a\",25],[\"a4a1\",\"ぁ\",82],[\"a5a1\",\"ァ\",85],[\"a6a1\",\"Α\",16,\"Σ\",6],[\"a6c1\",\"α\",16,\"σ\",6],[\"a7a1\",\"А\",5,\"ЁЖ\",25],[\"a7d1\",\"а\",5,\"ёж\",25],[\"a8a1\",\"─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂\"],[\"ada1\",\"①\",19,\"Ⅰ\",9],[\"adc0\",\"㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡\"],[\"addf\",\"㍻〝〟№㏍℡㊤\",4,\"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪\"],[\"b0a1\",\"亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭\"],[\"b1a1\",\"院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応\"],[\"b2a1\",\"押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改\"],[\"b3a1\",\"魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱\"],[\"b4a1\",\"粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄\"],[\"b5a1\",\"機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京\"],[\"b6a1\",\"供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈\"],[\"b7a1\",\"掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲\"],[\"b8a1\",\"検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向\"],[\"b9a1\",\"后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込\"],[\"baa1\",\"此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷\"],[\"bba1\",\"察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時\"],[\"bca1\",\"次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周\"],[\"bda1\",\"宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償\"],[\"bea1\",\"勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾\"],[\"bfa1\",\"拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾\"],[\"c0a1\",\"澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線\"],[\"c1a1\",\"繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎\"],[\"c2a1\",\"臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只\"],[\"c3a1\",\"叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵\"],[\"c4a1\",\"帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓\"],[\"c5a1\",\"邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到\"],[\"c6a1\",\"董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入\"],[\"c7a1\",\"如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦\"],[\"c8a1\",\"函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美\"],[\"c9a1\",\"鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服\"],[\"caa1\",\"福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋\"],[\"cba1\",\"法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満\"],[\"cca1\",\"漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒\"],[\"cda1\",\"諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃\"],[\"cea1\",\"痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯\"],[\"cfa1\",\"蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕\"],[\"d0a1\",\"弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲\"],[\"d1a1\",\"僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨\"],[\"d2a1\",\"辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨\"],[\"d3a1\",\"咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉\"],[\"d4a1\",\"圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩\"],[\"d5a1\",\"奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓\"],[\"d6a1\",\"屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏\"],[\"d7a1\",\"廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚\"],[\"d8a1\",\"悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛\"],[\"d9a1\",\"戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼\"],[\"daa1\",\"據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼\"],[\"dba1\",\"曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍\"],[\"dca1\",\"棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣\"],[\"dda1\",\"檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾\"],[\"dea1\",\"沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌\"],[\"dfa1\",\"漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼\"],[\"e0a1\",\"燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱\"],[\"e1a1\",\"瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰\"],[\"e2a1\",\"癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬\"],[\"e3a1\",\"磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐\"],[\"e4a1\",\"筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆\"],[\"e5a1\",\"紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺\"],[\"e6a1\",\"罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋\"],[\"e7a1\",\"隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙\"],[\"e8a1\",\"茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈\"],[\"e9a1\",\"蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙\"],[\"eaa1\",\"蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞\"],[\"eba1\",\"襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫\"],[\"eca1\",\"譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊\"],[\"eda1\",\"蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸\"],[\"eea1\",\"遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮\"],[\"efa1\",\"錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞\"],[\"f0a1\",\"陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰\"],[\"f1a1\",\"顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷\"],[\"f2a1\",\"髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈\"],[\"f3a1\",\"鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠\"],[\"f4a1\",\"堯槇遙瑤凜熙\"],[\"f9a1\",\"纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德\"],[\"faa1\",\"忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱\"],[\"fba1\",\"犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚\"],[\"fca1\",\"釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑\"],[\"fcf1\",\"ⅰ\",9,\"¬¦'"\"],[\"8fa2af\",\"˘ˇ¸˙˝¯˛˚~΄΅\"],[\"8fa2c2\",\"¡¦¿\"],[\"8fa2eb\",\"ºª©®™¤№\"],[\"8fa6e1\",\"ΆΈΉΊΪ\"],[\"8fa6e7\",\"Ό\"],[\"8fa6e9\",\"ΎΫ\"],[\"8fa6ec\",\"Ώ\"],[\"8fa6f1\",\"άέήίϊΐόςύϋΰώ\"],[\"8fa7c2\",\"Ђ\",10,\"ЎЏ\"],[\"8fa7f2\",\"ђ\",10,\"ўџ\"],[\"8fa9a1\",\"ÆĐ\"],[\"8fa9a4\",\"Ħ\"],[\"8fa9a6\",\"IJ\"],[\"8fa9a8\",\"ŁĿ\"],[\"8fa9ab\",\"ŊØŒ\"],[\"8fa9af\",\"ŦÞ\"],[\"8fa9c1\",\"æđðħıijĸłŀʼnŋøœßŧþ\"],[\"8faaa1\",\"ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ\"],[\"8faaba\",\"ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ\"],[\"8faba1\",\"áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ\"],[\"8fabbd\",\"ġĥíìïîǐ\"],[\"8fabc5\",\"īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż\"],[\"8fb0a1\",\"丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄\"],[\"8fb1a1\",\"侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐\"],[\"8fb2a1\",\"傒傓傔傖傛傜傞\",4,\"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂\"],[\"8fb3a1\",\"凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋\"],[\"8fb4a1\",\"匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿\"],[\"8fb5a1\",\"咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒\"],[\"8fb6a1\",\"嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍\",5,\"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤\",4,\"囱囫园\"],[\"8fb7a1\",\"囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭\",4,\"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡\"],[\"8fb8a1\",\"堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭\"],[\"8fb9a1\",\"奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿\"],[\"8fbaa1\",\"嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖\",4,\"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩\"],[\"8fbba1\",\"屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤\"],[\"8fbca1\",\"巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪\",4,\"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧\"],[\"8fbda1\",\"彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐\",4,\"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷\"],[\"8fbea1\",\"悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐\",4,\"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥\"],[\"8fbfa1\",\"懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵\"],[\"8fc0a1\",\"捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿\"],[\"8fc1a1\",\"擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝\"],[\"8fc2a1\",\"昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝\"],[\"8fc3a1\",\"杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮\",4,\"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏\"],[\"8fc4a1\",\"棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲\"],[\"8fc5a1\",\"樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽\"],[\"8fc6a1\",\"歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖\"],[\"8fc7a1\",\"泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞\"],[\"8fc8a1\",\"湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊\"],[\"8fc9a1\",\"濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔\",4,\"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃\",4,\"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠\"],[\"8fcaa1\",\"煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻\"],[\"8fcba1\",\"狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽\"],[\"8fcca1\",\"珿琀琁琄琇琊琑琚琛琤琦琨\",9,\"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆\"],[\"8fcda1\",\"甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹\",5,\"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹\"],[\"8fcea1\",\"瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢\",6,\"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢\"],[\"8fcfa1\",\"睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳\"],[\"8fd0a1\",\"碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞\"],[\"8fd1a1\",\"秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰\"],[\"8fd2a1\",\"笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙\",5],[\"8fd3a1\",\"籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝\"],[\"8fd4a1\",\"綞綦綧綪綳綶綷綹緂\",4,\"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭\"],[\"8fd5a1\",\"罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮\"],[\"8fd6a1\",\"胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆\"],[\"8fd7a1\",\"艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸\"],[\"8fd8a1\",\"荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓\"],[\"8fd9a1\",\"蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏\",4,\"蕖蕙蕜\",6,\"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼\"],[\"8fdaa1\",\"藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠\",4,\"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣\"],[\"8fdba1\",\"蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃\",6,\"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵\"],[\"8fdca1\",\"蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊\",4,\"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺\"],[\"8fdda1\",\"襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔\",4,\"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳\"],[\"8fdea1\",\"誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂\",4,\"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆\"],[\"8fdfa1\",\"貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢\"],[\"8fe0a1\",\"踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁\"],[\"8fe1a1\",\"轃轇轏轑\",4,\"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃\"],[\"8fe2a1\",\"郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿\"],[\"8fe3a1\",\"釂釃釅釓釔釗釙釚釞釤釥釩釪釬\",5,\"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵\",4,\"鉻鉼鉽鉿銈銉銊銍銎銒銗\"],[\"8fe4a1\",\"銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿\",4,\"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶\"],[\"8fe5a1\",\"鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉\",4,\"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹\"],[\"8fe6a1\",\"镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂\"],[\"8fe7a1\",\"霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦\"],[\"8fe8a1\",\"頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱\",4,\"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵\"],[\"8fe9a1\",\"馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿\",4],[\"8feaa1\",\"鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪\",4,\"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸\"],[\"8feba1\",\"鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦\",4,\"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻\"],[\"8feca1\",\"鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵\"],[\"8feda1\",\"黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃\",4,\"齓齕齖齗齘齚齝齞齨齩齭\",4,\"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥\"]]"); - -/***/ }), - -/***/ 6351: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("{\"uChars\":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],\"gbChars\":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}"); - -/***/ }), - -/***/ 7419: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"a140\",\"\",62],[\"a180\",\"\",32],[\"a240\",\"\",62],[\"a280\",\"\",32],[\"a2ab\",\"\",5],[\"a2e3\",\"€\"],[\"a2ef\",\"\"],[\"a2fd\",\"\"],[\"a340\",\"\",62],[\"a380\",\"\",31,\" \"],[\"a440\",\"\",62],[\"a480\",\"\",32],[\"a4f4\",\"\",10],[\"a540\",\"\",62],[\"a580\",\"\",32],[\"a5f7\",\"\",7],[\"a640\",\"\",62],[\"a680\",\"\",32],[\"a6b9\",\"\",7],[\"a6d9\",\"\",6],[\"a6ec\",\"\"],[\"a6f3\",\"\"],[\"a6f6\",\"\",8],[\"a740\",\"\",62],[\"a780\",\"\",32],[\"a7c2\",\"\",14],[\"a7f2\",\"\",12],[\"a896\",\"\",10],[\"a8bc\",\"ḿ\"],[\"a8bf\",\"ǹ\"],[\"a8c1\",\"\"],[\"a8ea\",\"\",20],[\"a958\",\"\"],[\"a95b\",\"\"],[\"a95d\",\"\"],[\"a989\",\"〾⿰\",11],[\"a997\",\"\",12],[\"a9f0\",\"\",14],[\"aaa1\",\"\",93],[\"aba1\",\"\",93],[\"aca1\",\"\",93],[\"ada1\",\"\",93],[\"aea1\",\"\",93],[\"afa1\",\"\",93],[\"d7fa\",\"\",4],[\"f8a1\",\"\",93],[\"f9a1\",\"\",93],[\"faa1\",\"\",93],[\"fba1\",\"\",93],[\"fca1\",\"\",93],[\"fda1\",\"\",93],[\"fe50\",\"⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌\"],[\"fe80\",\"䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓\",6,\"䶮\",93],[\"8135f437\",\"\"]]"); - -/***/ }), - -/***/ 4108: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[\"0\",\"\\u0000\",128],[\"a1\",\"。\",62],[\"8140\",\" 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈\",9,\"+-±×\"],[\"8180\",\"÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓\"],[\"81b8\",\"∈∋⊆⊇⊂⊃∪∩\"],[\"81c8\",\"∧∨¬⇒⇔∀∃\"],[\"81da\",\"∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬\"],[\"81f0\",\"ʼn♯♭♪†‡¶\"],[\"81fc\",\"◯\"],[\"824f\",\"0\",9],[\"8260\",\"A\",25],[\"8281\",\"a\",25],[\"829f\",\"ぁ\",82],[\"8340\",\"ァ\",62],[\"8380\",\"ム\",22],[\"839f\",\"Α\",16,\"Σ\",6],[\"83bf\",\"α\",16,\"σ\",6],[\"8440\",\"А\",5,\"ЁЖ\",25],[\"8470\",\"а\",5,\"ёж\",7],[\"8480\",\"о\",17],[\"849f\",\"─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂\"],[\"8740\",\"①\",19,\"Ⅰ\",9],[\"875f\",\"㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡\"],[\"877e\",\"㍻\"],[\"8780\",\"〝〟№㏍℡㊤\",4,\"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪\"],[\"889f\",\"亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭\"],[\"8940\",\"院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円\"],[\"8980\",\"園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改\"],[\"8a40\",\"魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫\"],[\"8a80\",\"橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄\"],[\"8b40\",\"機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救\"],[\"8b80\",\"朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈\"],[\"8c40\",\"掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨\"],[\"8c80\",\"劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向\"],[\"8d40\",\"后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降\"],[\"8d80\",\"項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷\"],[\"8e40\",\"察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止\"],[\"8e80\",\"死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周\"],[\"8f40\",\"宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳\"],[\"8f80\",\"準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾\"],[\"9040\",\"拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨\"],[\"9080\",\"逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線\"],[\"9140\",\"繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻\"],[\"9180\",\"操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只\"],[\"9240\",\"叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄\"],[\"9280\",\"逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓\"],[\"9340\",\"邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬\"],[\"9380\",\"凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入\"],[\"9440\",\"如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅\"],[\"9480\",\"楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美\"],[\"9540\",\"鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷\"],[\"9580\",\"斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋\"],[\"9640\",\"法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆\"],[\"9680\",\"摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒\"],[\"9740\",\"諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲\"],[\"9780\",\"沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯\"],[\"9840\",\"蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕\"],[\"989f\",\"弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲\"],[\"9940\",\"僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭\"],[\"9980\",\"凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨\"],[\"9a40\",\"咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸\"],[\"9a80\",\"噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩\"],[\"9b40\",\"奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀\"],[\"9b80\",\"它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏\"],[\"9c40\",\"廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠\"],[\"9c80\",\"怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛\"],[\"9d40\",\"戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫\"],[\"9d80\",\"捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼\"],[\"9e40\",\"曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎\"],[\"9e80\",\"梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣\"],[\"9f40\",\"檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯\"],[\"9f80\",\"麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌\"],[\"e040\",\"漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝\"],[\"e080\",\"烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱\"],[\"e140\",\"瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿\"],[\"e180\",\"痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬\"],[\"e240\",\"磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰\"],[\"e280\",\"窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆\"],[\"e340\",\"紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷\"],[\"e380\",\"縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋\"],[\"e440\",\"隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤\"],[\"e480\",\"艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈\"],[\"e540\",\"蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬\"],[\"e580\",\"蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞\"],[\"e640\",\"襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧\"],[\"e680\",\"諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊\"],[\"e740\",\"蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜\"],[\"e780\",\"轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮\"],[\"e840\",\"錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙\"],[\"e880\",\"閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰\"],[\"e940\",\"顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃\"],[\"e980\",\"騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈\"],[\"ea40\",\"鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯\"],[\"ea80\",\"黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙\"],[\"ed40\",\"纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏\"],[\"ed80\",\"塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱\"],[\"ee40\",\"犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙\"],[\"ee80\",\"蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑\"],[\"eeef\",\"ⅰ\",9,\"¬¦'"\"],[\"f040\",\"\",62],[\"f080\",\"\",124],[\"f140\",\"\",62],[\"f180\",\"\",124],[\"f240\",\"\",62],[\"f280\",\"\",124],[\"f340\",\"\",62],[\"f380\",\"\",124],[\"f440\",\"\",62],[\"f480\",\"\",124],[\"f540\",\"\",62],[\"f580\",\"\",124],[\"f640\",\"\",62],[\"f680\",\"\",124],[\"f740\",\"\",62],[\"f780\",\"\",124],[\"f840\",\"\",62],[\"f880\",\"\",124],[\"f940\",\"\"],[\"fa40\",\"ⅰ\",9,\"Ⅰ\",9,\"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊\"],[\"fa80\",\"兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯\"],[\"fb40\",\"涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神\"],[\"fb80\",\"祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙\"],[\"fc40\",\"髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑\"]]"); - -/***/ }), - -/***/ 8661: -/***/ ((module) => { - -"use strict"; -module.exports = JSON.parse("[[[0,44],\"disallowed_STD3_valid\"],[[45,46],\"valid\"],[[47,47],\"disallowed_STD3_valid\"],[[48,57],\"valid\"],[[58,64],\"disallowed_STD3_valid\"],[[65,65],\"mapped\",[97]],[[66,66],\"mapped\",[98]],[[67,67],\"mapped\",[99]],[[68,68],\"mapped\",[100]],[[69,69],\"mapped\",[101]],[[70,70],\"mapped\",[102]],[[71,71],\"mapped\",[103]],[[72,72],\"mapped\",[104]],[[73,73],\"mapped\",[105]],[[74,74],\"mapped\",[106]],[[75,75],\"mapped\",[107]],[[76,76],\"mapped\",[108]],[[77,77],\"mapped\",[109]],[[78,78],\"mapped\",[110]],[[79,79],\"mapped\",[111]],[[80,80],\"mapped\",[112]],[[81,81],\"mapped\",[113]],[[82,82],\"mapped\",[114]],[[83,83],\"mapped\",[115]],[[84,84],\"mapped\",[116]],[[85,85],\"mapped\",[117]],[[86,86],\"mapped\",[118]],[[87,87],\"mapped\",[119]],[[88,88],\"mapped\",[120]],[[89,89],\"mapped\",[121]],[[90,90],\"mapped\",[122]],[[91,96],\"disallowed_STD3_valid\"],[[97,122],\"valid\"],[[123,127],\"disallowed_STD3_valid\"],[[128,159],\"disallowed\"],[[160,160],\"disallowed_STD3_mapped\",[32]],[[161,167],\"valid\",[],\"NV8\"],[[168,168],\"disallowed_STD3_mapped\",[32,776]],[[169,169],\"valid\",[],\"NV8\"],[[170,170],\"mapped\",[97]],[[171,172],\"valid\",[],\"NV8\"],[[173,173],\"ignored\"],[[174,174],\"valid\",[],\"NV8\"],[[175,175],\"disallowed_STD3_mapped\",[32,772]],[[176,177],\"valid\",[],\"NV8\"],[[178,178],\"mapped\",[50]],[[179,179],\"mapped\",[51]],[[180,180],\"disallowed_STD3_mapped\",[32,769]],[[181,181],\"mapped\",[956]],[[182,182],\"valid\",[],\"NV8\"],[[183,183],\"valid\"],[[184,184],\"disallowed_STD3_mapped\",[32,807]],[[185,185],\"mapped\",[49]],[[186,186],\"mapped\",[111]],[[187,187],\"valid\",[],\"NV8\"],[[188,188],\"mapped\",[49,8260,52]],[[189,189],\"mapped\",[49,8260,50]],[[190,190],\"mapped\",[51,8260,52]],[[191,191],\"valid\",[],\"NV8\"],[[192,192],\"mapped\",[224]],[[193,193],\"mapped\",[225]],[[194,194],\"mapped\",[226]],[[195,195],\"mapped\",[227]],[[196,196],\"mapped\",[228]],[[197,197],\"mapped\",[229]],[[198,198],\"mapped\",[230]],[[199,199],\"mapped\",[231]],[[200,200],\"mapped\",[232]],[[201,201],\"mapped\",[233]],[[202,202],\"mapped\",[234]],[[203,203],\"mapped\",[235]],[[204,204],\"mapped\",[236]],[[205,205],\"mapped\",[237]],[[206,206],\"mapped\",[238]],[[207,207],\"mapped\",[239]],[[208,208],\"mapped\",[240]],[[209,209],\"mapped\",[241]],[[210,210],\"mapped\",[242]],[[211,211],\"mapped\",[243]],[[212,212],\"mapped\",[244]],[[213,213],\"mapped\",[245]],[[214,214],\"mapped\",[246]],[[215,215],\"valid\",[],\"NV8\"],[[216,216],\"mapped\",[248]],[[217,217],\"mapped\",[249]],[[218,218],\"mapped\",[250]],[[219,219],\"mapped\",[251]],[[220,220],\"mapped\",[252]],[[221,221],\"mapped\",[253]],[[222,222],\"mapped\",[254]],[[223,223],\"deviation\",[115,115]],[[224,246],\"valid\"],[[247,247],\"valid\",[],\"NV8\"],[[248,255],\"valid\"],[[256,256],\"mapped\",[257]],[[257,257],\"valid\"],[[258,258],\"mapped\",[259]],[[259,259],\"valid\"],[[260,260],\"mapped\",[261]],[[261,261],\"valid\"],[[262,262],\"mapped\",[263]],[[263,263],\"valid\"],[[264,264],\"mapped\",[265]],[[265,265],\"valid\"],[[266,266],\"mapped\",[267]],[[267,267],\"valid\"],[[268,268],\"mapped\",[269]],[[269,269],\"valid\"],[[270,270],\"mapped\",[271]],[[271,271],\"valid\"],[[272,272],\"mapped\",[273]],[[273,273],\"valid\"],[[274,274],\"mapped\",[275]],[[275,275],\"valid\"],[[276,276],\"mapped\",[277]],[[277,277],\"valid\"],[[278,278],\"mapped\",[279]],[[279,279],\"valid\"],[[280,280],\"mapped\",[281]],[[281,281],\"valid\"],[[282,282],\"mapped\",[283]],[[283,283],\"valid\"],[[284,284],\"mapped\",[285]],[[285,285],\"valid\"],[[286,286],\"mapped\",[287]],[[287,287],\"valid\"],[[288,288],\"mapped\",[289]],[[289,289],\"valid\"],[[290,290],\"mapped\",[291]],[[291,291],\"valid\"],[[292,292],\"mapped\",[293]],[[293,293],\"valid\"],[[294,294],\"mapped\",[295]],[[295,295],\"valid\"],[[296,296],\"mapped\",[297]],[[297,297],\"valid\"],[[298,298],\"mapped\",[299]],[[299,299],\"valid\"],[[300,300],\"mapped\",[301]],[[301,301],\"valid\"],[[302,302],\"mapped\",[303]],[[303,303],\"valid\"],[[304,304],\"mapped\",[105,775]],[[305,305],\"valid\"],[[306,307],\"mapped\",[105,106]],[[308,308],\"mapped\",[309]],[[309,309],\"valid\"],[[310,310],\"mapped\",[311]],[[311,312],\"valid\"],[[313,313],\"mapped\",[314]],[[314,314],\"valid\"],[[315,315],\"mapped\",[316]],[[316,316],\"valid\"],[[317,317],\"mapped\",[318]],[[318,318],\"valid\"],[[319,320],\"mapped\",[108,183]],[[321,321],\"mapped\",[322]],[[322,322],\"valid\"],[[323,323],\"mapped\",[324]],[[324,324],\"valid\"],[[325,325],\"mapped\",[326]],[[326,326],\"valid\"],[[327,327],\"mapped\",[328]],[[328,328],\"valid\"],[[329,329],\"mapped\",[700,110]],[[330,330],\"mapped\",[331]],[[331,331],\"valid\"],[[332,332],\"mapped\",[333]],[[333,333],\"valid\"],[[334,334],\"mapped\",[335]],[[335,335],\"valid\"],[[336,336],\"mapped\",[337]],[[337,337],\"valid\"],[[338,338],\"mapped\",[339]],[[339,339],\"valid\"],[[340,340],\"mapped\",[341]],[[341,341],\"valid\"],[[342,342],\"mapped\",[343]],[[343,343],\"valid\"],[[344,344],\"mapped\",[345]],[[345,345],\"valid\"],[[346,346],\"mapped\",[347]],[[347,347],\"valid\"],[[348,348],\"mapped\",[349]],[[349,349],\"valid\"],[[350,350],\"mapped\",[351]],[[351,351],\"valid\"],[[352,352],\"mapped\",[353]],[[353,353],\"valid\"],[[354,354],\"mapped\",[355]],[[355,355],\"valid\"],[[356,356],\"mapped\",[357]],[[357,357],\"valid\"],[[358,358],\"mapped\",[359]],[[359,359],\"valid\"],[[360,360],\"mapped\",[361]],[[361,361],\"valid\"],[[362,362],\"mapped\",[363]],[[363,363],\"valid\"],[[364,364],\"mapped\",[365]],[[365,365],\"valid\"],[[366,366],\"mapped\",[367]],[[367,367],\"valid\"],[[368,368],\"mapped\",[369]],[[369,369],\"valid\"],[[370,370],\"mapped\",[371]],[[371,371],\"valid\"],[[372,372],\"mapped\",[373]],[[373,373],\"valid\"],[[374,374],\"mapped\",[375]],[[375,375],\"valid\"],[[376,376],\"mapped\",[255]],[[377,377],\"mapped\",[378]],[[378,378],\"valid\"],[[379,379],\"mapped\",[380]],[[380,380],\"valid\"],[[381,381],\"mapped\",[382]],[[382,382],\"valid\"],[[383,383],\"mapped\",[115]],[[384,384],\"valid\"],[[385,385],\"mapped\",[595]],[[386,386],\"mapped\",[387]],[[387,387],\"valid\"],[[388,388],\"mapped\",[389]],[[389,389],\"valid\"],[[390,390],\"mapped\",[596]],[[391,391],\"mapped\",[392]],[[392,392],\"valid\"],[[393,393],\"mapped\",[598]],[[394,394],\"mapped\",[599]],[[395,395],\"mapped\",[396]],[[396,397],\"valid\"],[[398,398],\"mapped\",[477]],[[399,399],\"mapped\",[601]],[[400,400],\"mapped\",[603]],[[401,401],\"mapped\",[402]],[[402,402],\"valid\"],[[403,403],\"mapped\",[608]],[[404,404],\"mapped\",[611]],[[405,405],\"valid\"],[[406,406],\"mapped\",[617]],[[407,407],\"mapped\",[616]],[[408,408],\"mapped\",[409]],[[409,411],\"valid\"],[[412,412],\"mapped\",[623]],[[413,413],\"mapped\",[626]],[[414,414],\"valid\"],[[415,415],\"mapped\",[629]],[[416,416],\"mapped\",[417]],[[417,417],\"valid\"],[[418,418],\"mapped\",[419]],[[419,419],\"valid\"],[[420,420],\"mapped\",[421]],[[421,421],\"valid\"],[[422,422],\"mapped\",[640]],[[423,423],\"mapped\",[424]],[[424,424],\"valid\"],[[425,425],\"mapped\",[643]],[[426,427],\"valid\"],[[428,428],\"mapped\",[429]],[[429,429],\"valid\"],[[430,430],\"mapped\",[648]],[[431,431],\"mapped\",[432]],[[432,432],\"valid\"],[[433,433],\"mapped\",[650]],[[434,434],\"mapped\",[651]],[[435,435],\"mapped\",[436]],[[436,436],\"valid\"],[[437,437],\"mapped\",[438]],[[438,438],\"valid\"],[[439,439],\"mapped\",[658]],[[440,440],\"mapped\",[441]],[[441,443],\"valid\"],[[444,444],\"mapped\",[445]],[[445,451],\"valid\"],[[452,454],\"mapped\",[100,382]],[[455,457],\"mapped\",[108,106]],[[458,460],\"mapped\",[110,106]],[[461,461],\"mapped\",[462]],[[462,462],\"valid\"],[[463,463],\"mapped\",[464]],[[464,464],\"valid\"],[[465,465],\"mapped\",[466]],[[466,466],\"valid\"],[[467,467],\"mapped\",[468]],[[468,468],\"valid\"],[[469,469],\"mapped\",[470]],[[470,470],\"valid\"],[[471,471],\"mapped\",[472]],[[472,472],\"valid\"],[[473,473],\"mapped\",[474]],[[474,474],\"valid\"],[[475,475],\"mapped\",[476]],[[476,477],\"valid\"],[[478,478],\"mapped\",[479]],[[479,479],\"valid\"],[[480,480],\"mapped\",[481]],[[481,481],\"valid\"],[[482,482],\"mapped\",[483]],[[483,483],\"valid\"],[[484,484],\"mapped\",[485]],[[485,485],\"valid\"],[[486,486],\"mapped\",[487]],[[487,487],\"valid\"],[[488,488],\"mapped\",[489]],[[489,489],\"valid\"],[[490,490],\"mapped\",[491]],[[491,491],\"valid\"],[[492,492],\"mapped\",[493]],[[493,493],\"valid\"],[[494,494],\"mapped\",[495]],[[495,496],\"valid\"],[[497,499],\"mapped\",[100,122]],[[500,500],\"mapped\",[501]],[[501,501],\"valid\"],[[502,502],\"mapped\",[405]],[[503,503],\"mapped\",[447]],[[504,504],\"mapped\",[505]],[[505,505],\"valid\"],[[506,506],\"mapped\",[507]],[[507,507],\"valid\"],[[508,508],\"mapped\",[509]],[[509,509],\"valid\"],[[510,510],\"mapped\",[511]],[[511,511],\"valid\"],[[512,512],\"mapped\",[513]],[[513,513],\"valid\"],[[514,514],\"mapped\",[515]],[[515,515],\"valid\"],[[516,516],\"mapped\",[517]],[[517,517],\"valid\"],[[518,518],\"mapped\",[519]],[[519,519],\"valid\"],[[520,520],\"mapped\",[521]],[[521,521],\"valid\"],[[522,522],\"mapped\",[523]],[[523,523],\"valid\"],[[524,524],\"mapped\",[525]],[[525,525],\"valid\"],[[526,526],\"mapped\",[527]],[[527,527],\"valid\"],[[528,528],\"mapped\",[529]],[[529,529],\"valid\"],[[530,530],\"mapped\",[531]],[[531,531],\"valid\"],[[532,532],\"mapped\",[533]],[[533,533],\"valid\"],[[534,534],\"mapped\",[535]],[[535,535],\"valid\"],[[536,536],\"mapped\",[537]],[[537,537],\"valid\"],[[538,538],\"mapped\",[539]],[[539,539],\"valid\"],[[540,540],\"mapped\",[541]],[[541,541],\"valid\"],[[542,542],\"mapped\",[543]],[[543,543],\"valid\"],[[544,544],\"mapped\",[414]],[[545,545],\"valid\"],[[546,546],\"mapped\",[547]],[[547,547],\"valid\"],[[548,548],\"mapped\",[549]],[[549,549],\"valid\"],[[550,550],\"mapped\",[551]],[[551,551],\"valid\"],[[552,552],\"mapped\",[553]],[[553,553],\"valid\"],[[554,554],\"mapped\",[555]],[[555,555],\"valid\"],[[556,556],\"mapped\",[557]],[[557,557],\"valid\"],[[558,558],\"mapped\",[559]],[[559,559],\"valid\"],[[560,560],\"mapped\",[561]],[[561,561],\"valid\"],[[562,562],\"mapped\",[563]],[[563,563],\"valid\"],[[564,566],\"valid\"],[[567,569],\"valid\"],[[570,570],\"mapped\",[11365]],[[571,571],\"mapped\",[572]],[[572,572],\"valid\"],[[573,573],\"mapped\",[410]],[[574,574],\"mapped\",[11366]],[[575,576],\"valid\"],[[577,577],\"mapped\",[578]],[[578,578],\"valid\"],[[579,579],\"mapped\",[384]],[[580,580],\"mapped\",[649]],[[581,581],\"mapped\",[652]],[[582,582],\"mapped\",[583]],[[583,583],\"valid\"],[[584,584],\"mapped\",[585]],[[585,585],\"valid\"],[[586,586],\"mapped\",[587]],[[587,587],\"valid\"],[[588,588],\"mapped\",[589]],[[589,589],\"valid\"],[[590,590],\"mapped\",[591]],[[591,591],\"valid\"],[[592,680],\"valid\"],[[681,685],\"valid\"],[[686,687],\"valid\"],[[688,688],\"mapped\",[104]],[[689,689],\"mapped\",[614]],[[690,690],\"mapped\",[106]],[[691,691],\"mapped\",[114]],[[692,692],\"mapped\",[633]],[[693,693],\"mapped\",[635]],[[694,694],\"mapped\",[641]],[[695,695],\"mapped\",[119]],[[696,696],\"mapped\",[121]],[[697,705],\"valid\"],[[706,709],\"valid\",[],\"NV8\"],[[710,721],\"valid\"],[[722,727],\"valid\",[],\"NV8\"],[[728,728],\"disallowed_STD3_mapped\",[32,774]],[[729,729],\"disallowed_STD3_mapped\",[32,775]],[[730,730],\"disallowed_STD3_mapped\",[32,778]],[[731,731],\"disallowed_STD3_mapped\",[32,808]],[[732,732],\"disallowed_STD3_mapped\",[32,771]],[[733,733],\"disallowed_STD3_mapped\",[32,779]],[[734,734],\"valid\",[],\"NV8\"],[[735,735],\"valid\",[],\"NV8\"],[[736,736],\"mapped\",[611]],[[737,737],\"mapped\",[108]],[[738,738],\"mapped\",[115]],[[739,739],\"mapped\",[120]],[[740,740],\"mapped\",[661]],[[741,745],\"valid\",[],\"NV8\"],[[746,747],\"valid\",[],\"NV8\"],[[748,748],\"valid\"],[[749,749],\"valid\",[],\"NV8\"],[[750,750],\"valid\"],[[751,767],\"valid\",[],\"NV8\"],[[768,831],\"valid\"],[[832,832],\"mapped\",[768]],[[833,833],\"mapped\",[769]],[[834,834],\"valid\"],[[835,835],\"mapped\",[787]],[[836,836],\"mapped\",[776,769]],[[837,837],\"mapped\",[953]],[[838,846],\"valid\"],[[847,847],\"ignored\"],[[848,855],\"valid\"],[[856,860],\"valid\"],[[861,863],\"valid\"],[[864,865],\"valid\"],[[866,866],\"valid\"],[[867,879],\"valid\"],[[880,880],\"mapped\",[881]],[[881,881],\"valid\"],[[882,882],\"mapped\",[883]],[[883,883],\"valid\"],[[884,884],\"mapped\",[697]],[[885,885],\"valid\"],[[886,886],\"mapped\",[887]],[[887,887],\"valid\"],[[888,889],\"disallowed\"],[[890,890],\"disallowed_STD3_mapped\",[32,953]],[[891,893],\"valid\"],[[894,894],\"disallowed_STD3_mapped\",[59]],[[895,895],\"mapped\",[1011]],[[896,899],\"disallowed\"],[[900,900],\"disallowed_STD3_mapped\",[32,769]],[[901,901],\"disallowed_STD3_mapped\",[32,776,769]],[[902,902],\"mapped\",[940]],[[903,903],\"mapped\",[183]],[[904,904],\"mapped\",[941]],[[905,905],\"mapped\",[942]],[[906,906],\"mapped\",[943]],[[907,907],\"disallowed\"],[[908,908],\"mapped\",[972]],[[909,909],\"disallowed\"],[[910,910],\"mapped\",[973]],[[911,911],\"mapped\",[974]],[[912,912],\"valid\"],[[913,913],\"mapped\",[945]],[[914,914],\"mapped\",[946]],[[915,915],\"mapped\",[947]],[[916,916],\"mapped\",[948]],[[917,917],\"mapped\",[949]],[[918,918],\"mapped\",[950]],[[919,919],\"mapped\",[951]],[[920,920],\"mapped\",[952]],[[921,921],\"mapped\",[953]],[[922,922],\"mapped\",[954]],[[923,923],\"mapped\",[955]],[[924,924],\"mapped\",[956]],[[925,925],\"mapped\",[957]],[[926,926],\"mapped\",[958]],[[927,927],\"mapped\",[959]],[[928,928],\"mapped\",[960]],[[929,929],\"mapped\",[961]],[[930,930],\"disallowed\"],[[931,931],\"mapped\",[963]],[[932,932],\"mapped\",[964]],[[933,933],\"mapped\",[965]],[[934,934],\"mapped\",[966]],[[935,935],\"mapped\",[967]],[[936,936],\"mapped\",[968]],[[937,937],\"mapped\",[969]],[[938,938],\"mapped\",[970]],[[939,939],\"mapped\",[971]],[[940,961],\"valid\"],[[962,962],\"deviation\",[963]],[[963,974],\"valid\"],[[975,975],\"mapped\",[983]],[[976,976],\"mapped\",[946]],[[977,977],\"mapped\",[952]],[[978,978],\"mapped\",[965]],[[979,979],\"mapped\",[973]],[[980,980],\"mapped\",[971]],[[981,981],\"mapped\",[966]],[[982,982],\"mapped\",[960]],[[983,983],\"valid\"],[[984,984],\"mapped\",[985]],[[985,985],\"valid\"],[[986,986],\"mapped\",[987]],[[987,987],\"valid\"],[[988,988],\"mapped\",[989]],[[989,989],\"valid\"],[[990,990],\"mapped\",[991]],[[991,991],\"valid\"],[[992,992],\"mapped\",[993]],[[993,993],\"valid\"],[[994,994],\"mapped\",[995]],[[995,995],\"valid\"],[[996,996],\"mapped\",[997]],[[997,997],\"valid\"],[[998,998],\"mapped\",[999]],[[999,999],\"valid\"],[[1000,1000],\"mapped\",[1001]],[[1001,1001],\"valid\"],[[1002,1002],\"mapped\",[1003]],[[1003,1003],\"valid\"],[[1004,1004],\"mapped\",[1005]],[[1005,1005],\"valid\"],[[1006,1006],\"mapped\",[1007]],[[1007,1007],\"valid\"],[[1008,1008],\"mapped\",[954]],[[1009,1009],\"mapped\",[961]],[[1010,1010],\"mapped\",[963]],[[1011,1011],\"valid\"],[[1012,1012],\"mapped\",[952]],[[1013,1013],\"mapped\",[949]],[[1014,1014],\"valid\",[],\"NV8\"],[[1015,1015],\"mapped\",[1016]],[[1016,1016],\"valid\"],[[1017,1017],\"mapped\",[963]],[[1018,1018],\"mapped\",[1019]],[[1019,1019],\"valid\"],[[1020,1020],\"valid\"],[[1021,1021],\"mapped\",[891]],[[1022,1022],\"mapped\",[892]],[[1023,1023],\"mapped\",[893]],[[1024,1024],\"mapped\",[1104]],[[1025,1025],\"mapped\",[1105]],[[1026,1026],\"mapped\",[1106]],[[1027,1027],\"mapped\",[1107]],[[1028,1028],\"mapped\",[1108]],[[1029,1029],\"mapped\",[1109]],[[1030,1030],\"mapped\",[1110]],[[1031,1031],\"mapped\",[1111]],[[1032,1032],\"mapped\",[1112]],[[1033,1033],\"mapped\",[1113]],[[1034,1034],\"mapped\",[1114]],[[1035,1035],\"mapped\",[1115]],[[1036,1036],\"mapped\",[1116]],[[1037,1037],\"mapped\",[1117]],[[1038,1038],\"mapped\",[1118]],[[1039,1039],\"mapped\",[1119]],[[1040,1040],\"mapped\",[1072]],[[1041,1041],\"mapped\",[1073]],[[1042,1042],\"mapped\",[1074]],[[1043,1043],\"mapped\",[1075]],[[1044,1044],\"mapped\",[1076]],[[1045,1045],\"mapped\",[1077]],[[1046,1046],\"mapped\",[1078]],[[1047,1047],\"mapped\",[1079]],[[1048,1048],\"mapped\",[1080]],[[1049,1049],\"mapped\",[1081]],[[1050,1050],\"mapped\",[1082]],[[1051,1051],\"mapped\",[1083]],[[1052,1052],\"mapped\",[1084]],[[1053,1053],\"mapped\",[1085]],[[1054,1054],\"mapped\",[1086]],[[1055,1055],\"mapped\",[1087]],[[1056,1056],\"mapped\",[1088]],[[1057,1057],\"mapped\",[1089]],[[1058,1058],\"mapped\",[1090]],[[1059,1059],\"mapped\",[1091]],[[1060,1060],\"mapped\",[1092]],[[1061,1061],\"mapped\",[1093]],[[1062,1062],\"mapped\",[1094]],[[1063,1063],\"mapped\",[1095]],[[1064,1064],\"mapped\",[1096]],[[1065,1065],\"mapped\",[1097]],[[1066,1066],\"mapped\",[1098]],[[1067,1067],\"mapped\",[1099]],[[1068,1068],\"mapped\",[1100]],[[1069,1069],\"mapped\",[1101]],[[1070,1070],\"mapped\",[1102]],[[1071,1071],\"mapped\",[1103]],[[1072,1103],\"valid\"],[[1104,1104],\"valid\"],[[1105,1116],\"valid\"],[[1117,1117],\"valid\"],[[1118,1119],\"valid\"],[[1120,1120],\"mapped\",[1121]],[[1121,1121],\"valid\"],[[1122,1122],\"mapped\",[1123]],[[1123,1123],\"valid\"],[[1124,1124],\"mapped\",[1125]],[[1125,1125],\"valid\"],[[1126,1126],\"mapped\",[1127]],[[1127,1127],\"valid\"],[[1128,1128],\"mapped\",[1129]],[[1129,1129],\"valid\"],[[1130,1130],\"mapped\",[1131]],[[1131,1131],\"valid\"],[[1132,1132],\"mapped\",[1133]],[[1133,1133],\"valid\"],[[1134,1134],\"mapped\",[1135]],[[1135,1135],\"valid\"],[[1136,1136],\"mapped\",[1137]],[[1137,1137],\"valid\"],[[1138,1138],\"mapped\",[1139]],[[1139,1139],\"valid\"],[[1140,1140],\"mapped\",[1141]],[[1141,1141],\"valid\"],[[1142,1142],\"mapped\",[1143]],[[1143,1143],\"valid\"],[[1144,1144],\"mapped\",[1145]],[[1145,1145],\"valid\"],[[1146,1146],\"mapped\",[1147]],[[1147,1147],\"valid\"],[[1148,1148],\"mapped\",[1149]],[[1149,1149],\"valid\"],[[1150,1150],\"mapped\",[1151]],[[1151,1151],\"valid\"],[[1152,1152],\"mapped\",[1153]],[[1153,1153],\"valid\"],[[1154,1154],\"valid\",[],\"NV8\"],[[1155,1158],\"valid\"],[[1159,1159],\"valid\"],[[1160,1161],\"valid\",[],\"NV8\"],[[1162,1162],\"mapped\",[1163]],[[1163,1163],\"valid\"],[[1164,1164],\"mapped\",[1165]],[[1165,1165],\"valid\"],[[1166,1166],\"mapped\",[1167]],[[1167,1167],\"valid\"],[[1168,1168],\"mapped\",[1169]],[[1169,1169],\"valid\"],[[1170,1170],\"mapped\",[1171]],[[1171,1171],\"valid\"],[[1172,1172],\"mapped\",[1173]],[[1173,1173],\"valid\"],[[1174,1174],\"mapped\",[1175]],[[1175,1175],\"valid\"],[[1176,1176],\"mapped\",[1177]],[[1177,1177],\"valid\"],[[1178,1178],\"mapped\",[1179]],[[1179,1179],\"valid\"],[[1180,1180],\"mapped\",[1181]],[[1181,1181],\"valid\"],[[1182,1182],\"mapped\",[1183]],[[1183,1183],\"valid\"],[[1184,1184],\"mapped\",[1185]],[[1185,1185],\"valid\"],[[1186,1186],\"mapped\",[1187]],[[1187,1187],\"valid\"],[[1188,1188],\"mapped\",[1189]],[[1189,1189],\"valid\"],[[1190,1190],\"mapped\",[1191]],[[1191,1191],\"valid\"],[[1192,1192],\"mapped\",[1193]],[[1193,1193],\"valid\"],[[1194,1194],\"mapped\",[1195]],[[1195,1195],\"valid\"],[[1196,1196],\"mapped\",[1197]],[[1197,1197],\"valid\"],[[1198,1198],\"mapped\",[1199]],[[1199,1199],\"valid\"],[[1200,1200],\"mapped\",[1201]],[[1201,1201],\"valid\"],[[1202,1202],\"mapped\",[1203]],[[1203,1203],\"valid\"],[[1204,1204],\"mapped\",[1205]],[[1205,1205],\"valid\"],[[1206,1206],\"mapped\",[1207]],[[1207,1207],\"valid\"],[[1208,1208],\"mapped\",[1209]],[[1209,1209],\"valid\"],[[1210,1210],\"mapped\",[1211]],[[1211,1211],\"valid\"],[[1212,1212],\"mapped\",[1213]],[[1213,1213],\"valid\"],[[1214,1214],\"mapped\",[1215]],[[1215,1215],\"valid\"],[[1216,1216],\"disallowed\"],[[1217,1217],\"mapped\",[1218]],[[1218,1218],\"valid\"],[[1219,1219],\"mapped\",[1220]],[[1220,1220],\"valid\"],[[1221,1221],\"mapped\",[1222]],[[1222,1222],\"valid\"],[[1223,1223],\"mapped\",[1224]],[[1224,1224],\"valid\"],[[1225,1225],\"mapped\",[1226]],[[1226,1226],\"valid\"],[[1227,1227],\"mapped\",[1228]],[[1228,1228],\"valid\"],[[1229,1229],\"mapped\",[1230]],[[1230,1230],\"valid\"],[[1231,1231],\"valid\"],[[1232,1232],\"mapped\",[1233]],[[1233,1233],\"valid\"],[[1234,1234],\"mapped\",[1235]],[[1235,1235],\"valid\"],[[1236,1236],\"mapped\",[1237]],[[1237,1237],\"valid\"],[[1238,1238],\"mapped\",[1239]],[[1239,1239],\"valid\"],[[1240,1240],\"mapped\",[1241]],[[1241,1241],\"valid\"],[[1242,1242],\"mapped\",[1243]],[[1243,1243],\"valid\"],[[1244,1244],\"mapped\",[1245]],[[1245,1245],\"valid\"],[[1246,1246],\"mapped\",[1247]],[[1247,1247],\"valid\"],[[1248,1248],\"mapped\",[1249]],[[1249,1249],\"valid\"],[[1250,1250],\"mapped\",[1251]],[[1251,1251],\"valid\"],[[1252,1252],\"mapped\",[1253]],[[1253,1253],\"valid\"],[[1254,1254],\"mapped\",[1255]],[[1255,1255],\"valid\"],[[1256,1256],\"mapped\",[1257]],[[1257,1257],\"valid\"],[[1258,1258],\"mapped\",[1259]],[[1259,1259],\"valid\"],[[1260,1260],\"mapped\",[1261]],[[1261,1261],\"valid\"],[[1262,1262],\"mapped\",[1263]],[[1263,1263],\"valid\"],[[1264,1264],\"mapped\",[1265]],[[1265,1265],\"valid\"],[[1266,1266],\"mapped\",[1267]],[[1267,1267],\"valid\"],[[1268,1268],\"mapped\",[1269]],[[1269,1269],\"valid\"],[[1270,1270],\"mapped\",[1271]],[[1271,1271],\"valid\"],[[1272,1272],\"mapped\",[1273]],[[1273,1273],\"valid\"],[[1274,1274],\"mapped\",[1275]],[[1275,1275],\"valid\"],[[1276,1276],\"mapped\",[1277]],[[1277,1277],\"valid\"],[[1278,1278],\"mapped\",[1279]],[[1279,1279],\"valid\"],[[1280,1280],\"mapped\",[1281]],[[1281,1281],\"valid\"],[[1282,1282],\"mapped\",[1283]],[[1283,1283],\"valid\"],[[1284,1284],\"mapped\",[1285]],[[1285,1285],\"valid\"],[[1286,1286],\"mapped\",[1287]],[[1287,1287],\"valid\"],[[1288,1288],\"mapped\",[1289]],[[1289,1289],\"valid\"],[[1290,1290],\"mapped\",[1291]],[[1291,1291],\"valid\"],[[1292,1292],\"mapped\",[1293]],[[1293,1293],\"valid\"],[[1294,1294],\"mapped\",[1295]],[[1295,1295],\"valid\"],[[1296,1296],\"mapped\",[1297]],[[1297,1297],\"valid\"],[[1298,1298],\"mapped\",[1299]],[[1299,1299],\"valid\"],[[1300,1300],\"mapped\",[1301]],[[1301,1301],\"valid\"],[[1302,1302],\"mapped\",[1303]],[[1303,1303],\"valid\"],[[1304,1304],\"mapped\",[1305]],[[1305,1305],\"valid\"],[[1306,1306],\"mapped\",[1307]],[[1307,1307],\"valid\"],[[1308,1308],\"mapped\",[1309]],[[1309,1309],\"valid\"],[[1310,1310],\"mapped\",[1311]],[[1311,1311],\"valid\"],[[1312,1312],\"mapped\",[1313]],[[1313,1313],\"valid\"],[[1314,1314],\"mapped\",[1315]],[[1315,1315],\"valid\"],[[1316,1316],\"mapped\",[1317]],[[1317,1317],\"valid\"],[[1318,1318],\"mapped\",[1319]],[[1319,1319],\"valid\"],[[1320,1320],\"mapped\",[1321]],[[1321,1321],\"valid\"],[[1322,1322],\"mapped\",[1323]],[[1323,1323],\"valid\"],[[1324,1324],\"mapped\",[1325]],[[1325,1325],\"valid\"],[[1326,1326],\"mapped\",[1327]],[[1327,1327],\"valid\"],[[1328,1328],\"disallowed\"],[[1329,1329],\"mapped\",[1377]],[[1330,1330],\"mapped\",[1378]],[[1331,1331],\"mapped\",[1379]],[[1332,1332],\"mapped\",[1380]],[[1333,1333],\"mapped\",[1381]],[[1334,1334],\"mapped\",[1382]],[[1335,1335],\"mapped\",[1383]],[[1336,1336],\"mapped\",[1384]],[[1337,1337],\"mapped\",[1385]],[[1338,1338],\"mapped\",[1386]],[[1339,1339],\"mapped\",[1387]],[[1340,1340],\"mapped\",[1388]],[[1341,1341],\"mapped\",[1389]],[[1342,1342],\"mapped\",[1390]],[[1343,1343],\"mapped\",[1391]],[[1344,1344],\"mapped\",[1392]],[[1345,1345],\"mapped\",[1393]],[[1346,1346],\"mapped\",[1394]],[[1347,1347],\"mapped\",[1395]],[[1348,1348],\"mapped\",[1396]],[[1349,1349],\"mapped\",[1397]],[[1350,1350],\"mapped\",[1398]],[[1351,1351],\"mapped\",[1399]],[[1352,1352],\"mapped\",[1400]],[[1353,1353],\"mapped\",[1401]],[[1354,1354],\"mapped\",[1402]],[[1355,1355],\"mapped\",[1403]],[[1356,1356],\"mapped\",[1404]],[[1357,1357],\"mapped\",[1405]],[[1358,1358],\"mapped\",[1406]],[[1359,1359],\"mapped\",[1407]],[[1360,1360],\"mapped\",[1408]],[[1361,1361],\"mapped\",[1409]],[[1362,1362],\"mapped\",[1410]],[[1363,1363],\"mapped\",[1411]],[[1364,1364],\"mapped\",[1412]],[[1365,1365],\"mapped\",[1413]],[[1366,1366],\"mapped\",[1414]],[[1367,1368],\"disallowed\"],[[1369,1369],\"valid\"],[[1370,1375],\"valid\",[],\"NV8\"],[[1376,1376],\"disallowed\"],[[1377,1414],\"valid\"],[[1415,1415],\"mapped\",[1381,1410]],[[1416,1416],\"disallowed\"],[[1417,1417],\"valid\",[],\"NV8\"],[[1418,1418],\"valid\",[],\"NV8\"],[[1419,1420],\"disallowed\"],[[1421,1422],\"valid\",[],\"NV8\"],[[1423,1423],\"valid\",[],\"NV8\"],[[1424,1424],\"disallowed\"],[[1425,1441],\"valid\"],[[1442,1442],\"valid\"],[[1443,1455],\"valid\"],[[1456,1465],\"valid\"],[[1466,1466],\"valid\"],[[1467,1469],\"valid\"],[[1470,1470],\"valid\",[],\"NV8\"],[[1471,1471],\"valid\"],[[1472,1472],\"valid\",[],\"NV8\"],[[1473,1474],\"valid\"],[[1475,1475],\"valid\",[],\"NV8\"],[[1476,1476],\"valid\"],[[1477,1477],\"valid\"],[[1478,1478],\"valid\",[],\"NV8\"],[[1479,1479],\"valid\"],[[1480,1487],\"disallowed\"],[[1488,1514],\"valid\"],[[1515,1519],\"disallowed\"],[[1520,1524],\"valid\"],[[1525,1535],\"disallowed\"],[[1536,1539],\"disallowed\"],[[1540,1540],\"disallowed\"],[[1541,1541],\"disallowed\"],[[1542,1546],\"valid\",[],\"NV8\"],[[1547,1547],\"valid\",[],\"NV8\"],[[1548,1548],\"valid\",[],\"NV8\"],[[1549,1551],\"valid\",[],\"NV8\"],[[1552,1557],\"valid\"],[[1558,1562],\"valid\"],[[1563,1563],\"valid\",[],\"NV8\"],[[1564,1564],\"disallowed\"],[[1565,1565],\"disallowed\"],[[1566,1566],\"valid\",[],\"NV8\"],[[1567,1567],\"valid\",[],\"NV8\"],[[1568,1568],\"valid\"],[[1569,1594],\"valid\"],[[1595,1599],\"valid\"],[[1600,1600],\"valid\",[],\"NV8\"],[[1601,1618],\"valid\"],[[1619,1621],\"valid\"],[[1622,1624],\"valid\"],[[1625,1630],\"valid\"],[[1631,1631],\"valid\"],[[1632,1641],\"valid\"],[[1642,1645],\"valid\",[],\"NV8\"],[[1646,1647],\"valid\"],[[1648,1652],\"valid\"],[[1653,1653],\"mapped\",[1575,1652]],[[1654,1654],\"mapped\",[1608,1652]],[[1655,1655],\"mapped\",[1735,1652]],[[1656,1656],\"mapped\",[1610,1652]],[[1657,1719],\"valid\"],[[1720,1721],\"valid\"],[[1722,1726],\"valid\"],[[1727,1727],\"valid\"],[[1728,1742],\"valid\"],[[1743,1743],\"valid\"],[[1744,1747],\"valid\"],[[1748,1748],\"valid\",[],\"NV8\"],[[1749,1756],\"valid\"],[[1757,1757],\"disallowed\"],[[1758,1758],\"valid\",[],\"NV8\"],[[1759,1768],\"valid\"],[[1769,1769],\"valid\",[],\"NV8\"],[[1770,1773],\"valid\"],[[1774,1775],\"valid\"],[[1776,1785],\"valid\"],[[1786,1790],\"valid\"],[[1791,1791],\"valid\"],[[1792,1805],\"valid\",[],\"NV8\"],[[1806,1806],\"disallowed\"],[[1807,1807],\"disallowed\"],[[1808,1836],\"valid\"],[[1837,1839],\"valid\"],[[1840,1866],\"valid\"],[[1867,1868],\"disallowed\"],[[1869,1871],\"valid\"],[[1872,1901],\"valid\"],[[1902,1919],\"valid\"],[[1920,1968],\"valid\"],[[1969,1969],\"valid\"],[[1970,1983],\"disallowed\"],[[1984,2037],\"valid\"],[[2038,2042],\"valid\",[],\"NV8\"],[[2043,2047],\"disallowed\"],[[2048,2093],\"valid\"],[[2094,2095],\"disallowed\"],[[2096,2110],\"valid\",[],\"NV8\"],[[2111,2111],\"disallowed\"],[[2112,2139],\"valid\"],[[2140,2141],\"disallowed\"],[[2142,2142],\"valid\",[],\"NV8\"],[[2143,2207],\"disallowed\"],[[2208,2208],\"valid\"],[[2209,2209],\"valid\"],[[2210,2220],\"valid\"],[[2221,2226],\"valid\"],[[2227,2228],\"valid\"],[[2229,2274],\"disallowed\"],[[2275,2275],\"valid\"],[[2276,2302],\"valid\"],[[2303,2303],\"valid\"],[[2304,2304],\"valid\"],[[2305,2307],\"valid\"],[[2308,2308],\"valid\"],[[2309,2361],\"valid\"],[[2362,2363],\"valid\"],[[2364,2381],\"valid\"],[[2382,2382],\"valid\"],[[2383,2383],\"valid\"],[[2384,2388],\"valid\"],[[2389,2389],\"valid\"],[[2390,2391],\"valid\"],[[2392,2392],\"mapped\",[2325,2364]],[[2393,2393],\"mapped\",[2326,2364]],[[2394,2394],\"mapped\",[2327,2364]],[[2395,2395],\"mapped\",[2332,2364]],[[2396,2396],\"mapped\",[2337,2364]],[[2397,2397],\"mapped\",[2338,2364]],[[2398,2398],\"mapped\",[2347,2364]],[[2399,2399],\"mapped\",[2351,2364]],[[2400,2403],\"valid\"],[[2404,2405],\"valid\",[],\"NV8\"],[[2406,2415],\"valid\"],[[2416,2416],\"valid\",[],\"NV8\"],[[2417,2418],\"valid\"],[[2419,2423],\"valid\"],[[2424,2424],\"valid\"],[[2425,2426],\"valid\"],[[2427,2428],\"valid\"],[[2429,2429],\"valid\"],[[2430,2431],\"valid\"],[[2432,2432],\"valid\"],[[2433,2435],\"valid\"],[[2436,2436],\"disallowed\"],[[2437,2444],\"valid\"],[[2445,2446],\"disallowed\"],[[2447,2448],\"valid\"],[[2449,2450],\"disallowed\"],[[2451,2472],\"valid\"],[[2473,2473],\"disallowed\"],[[2474,2480],\"valid\"],[[2481,2481],\"disallowed\"],[[2482,2482],\"valid\"],[[2483,2485],\"disallowed\"],[[2486,2489],\"valid\"],[[2490,2491],\"disallowed\"],[[2492,2492],\"valid\"],[[2493,2493],\"valid\"],[[2494,2500],\"valid\"],[[2501,2502],\"disallowed\"],[[2503,2504],\"valid\"],[[2505,2506],\"disallowed\"],[[2507,2509],\"valid\"],[[2510,2510],\"valid\"],[[2511,2518],\"disallowed\"],[[2519,2519],\"valid\"],[[2520,2523],\"disallowed\"],[[2524,2524],\"mapped\",[2465,2492]],[[2525,2525],\"mapped\",[2466,2492]],[[2526,2526],\"disallowed\"],[[2527,2527],\"mapped\",[2479,2492]],[[2528,2531],\"valid\"],[[2532,2533],\"disallowed\"],[[2534,2545],\"valid\"],[[2546,2554],\"valid\",[],\"NV8\"],[[2555,2555],\"valid\",[],\"NV8\"],[[2556,2560],\"disallowed\"],[[2561,2561],\"valid\"],[[2562,2562],\"valid\"],[[2563,2563],\"valid\"],[[2564,2564],\"disallowed\"],[[2565,2570],\"valid\"],[[2571,2574],\"disallowed\"],[[2575,2576],\"valid\"],[[2577,2578],\"disallowed\"],[[2579,2600],\"valid\"],[[2601,2601],\"disallowed\"],[[2602,2608],\"valid\"],[[2609,2609],\"disallowed\"],[[2610,2610],\"valid\"],[[2611,2611],\"mapped\",[2610,2620]],[[2612,2612],\"disallowed\"],[[2613,2613],\"valid\"],[[2614,2614],\"mapped\",[2616,2620]],[[2615,2615],\"disallowed\"],[[2616,2617],\"valid\"],[[2618,2619],\"disallowed\"],[[2620,2620],\"valid\"],[[2621,2621],\"disallowed\"],[[2622,2626],\"valid\"],[[2627,2630],\"disallowed\"],[[2631,2632],\"valid\"],[[2633,2634],\"disallowed\"],[[2635,2637],\"valid\"],[[2638,2640],\"disallowed\"],[[2641,2641],\"valid\"],[[2642,2648],\"disallowed\"],[[2649,2649],\"mapped\",[2582,2620]],[[2650,2650],\"mapped\",[2583,2620]],[[2651,2651],\"mapped\",[2588,2620]],[[2652,2652],\"valid\"],[[2653,2653],\"disallowed\"],[[2654,2654],\"mapped\",[2603,2620]],[[2655,2661],\"disallowed\"],[[2662,2676],\"valid\"],[[2677,2677],\"valid\"],[[2678,2688],\"disallowed\"],[[2689,2691],\"valid\"],[[2692,2692],\"disallowed\"],[[2693,2699],\"valid\"],[[2700,2700],\"valid\"],[[2701,2701],\"valid\"],[[2702,2702],\"disallowed\"],[[2703,2705],\"valid\"],[[2706,2706],\"disallowed\"],[[2707,2728],\"valid\"],[[2729,2729],\"disallowed\"],[[2730,2736],\"valid\"],[[2737,2737],\"disallowed\"],[[2738,2739],\"valid\"],[[2740,2740],\"disallowed\"],[[2741,2745],\"valid\"],[[2746,2747],\"disallowed\"],[[2748,2757],\"valid\"],[[2758,2758],\"disallowed\"],[[2759,2761],\"valid\"],[[2762,2762],\"disallowed\"],[[2763,2765],\"valid\"],[[2766,2767],\"disallowed\"],[[2768,2768],\"valid\"],[[2769,2783],\"disallowed\"],[[2784,2784],\"valid\"],[[2785,2787],\"valid\"],[[2788,2789],\"disallowed\"],[[2790,2799],\"valid\"],[[2800,2800],\"valid\",[],\"NV8\"],[[2801,2801],\"valid\",[],\"NV8\"],[[2802,2808],\"disallowed\"],[[2809,2809],\"valid\"],[[2810,2816],\"disallowed\"],[[2817,2819],\"valid\"],[[2820,2820],\"disallowed\"],[[2821,2828],\"valid\"],[[2829,2830],\"disallowed\"],[[2831,2832],\"valid\"],[[2833,2834],\"disallowed\"],[[2835,2856],\"valid\"],[[2857,2857],\"disallowed\"],[[2858,2864],\"valid\"],[[2865,2865],\"disallowed\"],[[2866,2867],\"valid\"],[[2868,2868],\"disallowed\"],[[2869,2869],\"valid\"],[[2870,2873],\"valid\"],[[2874,2875],\"disallowed\"],[[2876,2883],\"valid\"],[[2884,2884],\"valid\"],[[2885,2886],\"disallowed\"],[[2887,2888],\"valid\"],[[2889,2890],\"disallowed\"],[[2891,2893],\"valid\"],[[2894,2901],\"disallowed\"],[[2902,2903],\"valid\"],[[2904,2907],\"disallowed\"],[[2908,2908],\"mapped\",[2849,2876]],[[2909,2909],\"mapped\",[2850,2876]],[[2910,2910],\"disallowed\"],[[2911,2913],\"valid\"],[[2914,2915],\"valid\"],[[2916,2917],\"disallowed\"],[[2918,2927],\"valid\"],[[2928,2928],\"valid\",[],\"NV8\"],[[2929,2929],\"valid\"],[[2930,2935],\"valid\",[],\"NV8\"],[[2936,2945],\"disallowed\"],[[2946,2947],\"valid\"],[[2948,2948],\"disallowed\"],[[2949,2954],\"valid\"],[[2955,2957],\"disallowed\"],[[2958,2960],\"valid\"],[[2961,2961],\"disallowed\"],[[2962,2965],\"valid\"],[[2966,2968],\"disallowed\"],[[2969,2970],\"valid\"],[[2971,2971],\"disallowed\"],[[2972,2972],\"valid\"],[[2973,2973],\"disallowed\"],[[2974,2975],\"valid\"],[[2976,2978],\"disallowed\"],[[2979,2980],\"valid\"],[[2981,2983],\"disallowed\"],[[2984,2986],\"valid\"],[[2987,2989],\"disallowed\"],[[2990,2997],\"valid\"],[[2998,2998],\"valid\"],[[2999,3001],\"valid\"],[[3002,3005],\"disallowed\"],[[3006,3010],\"valid\"],[[3011,3013],\"disallowed\"],[[3014,3016],\"valid\"],[[3017,3017],\"disallowed\"],[[3018,3021],\"valid\"],[[3022,3023],\"disallowed\"],[[3024,3024],\"valid\"],[[3025,3030],\"disallowed\"],[[3031,3031],\"valid\"],[[3032,3045],\"disallowed\"],[[3046,3046],\"valid\"],[[3047,3055],\"valid\"],[[3056,3058],\"valid\",[],\"NV8\"],[[3059,3066],\"valid\",[],\"NV8\"],[[3067,3071],\"disallowed\"],[[3072,3072],\"valid\"],[[3073,3075],\"valid\"],[[3076,3076],\"disallowed\"],[[3077,3084],\"valid\"],[[3085,3085],\"disallowed\"],[[3086,3088],\"valid\"],[[3089,3089],\"disallowed\"],[[3090,3112],\"valid\"],[[3113,3113],\"disallowed\"],[[3114,3123],\"valid\"],[[3124,3124],\"valid\"],[[3125,3129],\"valid\"],[[3130,3132],\"disallowed\"],[[3133,3133],\"valid\"],[[3134,3140],\"valid\"],[[3141,3141],\"disallowed\"],[[3142,3144],\"valid\"],[[3145,3145],\"disallowed\"],[[3146,3149],\"valid\"],[[3150,3156],\"disallowed\"],[[3157,3158],\"valid\"],[[3159,3159],\"disallowed\"],[[3160,3161],\"valid\"],[[3162,3162],\"valid\"],[[3163,3167],\"disallowed\"],[[3168,3169],\"valid\"],[[3170,3171],\"valid\"],[[3172,3173],\"disallowed\"],[[3174,3183],\"valid\"],[[3184,3191],\"disallowed\"],[[3192,3199],\"valid\",[],\"NV8\"],[[3200,3200],\"disallowed\"],[[3201,3201],\"valid\"],[[3202,3203],\"valid\"],[[3204,3204],\"disallowed\"],[[3205,3212],\"valid\"],[[3213,3213],\"disallowed\"],[[3214,3216],\"valid\"],[[3217,3217],\"disallowed\"],[[3218,3240],\"valid\"],[[3241,3241],\"disallowed\"],[[3242,3251],\"valid\"],[[3252,3252],\"disallowed\"],[[3253,3257],\"valid\"],[[3258,3259],\"disallowed\"],[[3260,3261],\"valid\"],[[3262,3268],\"valid\"],[[3269,3269],\"disallowed\"],[[3270,3272],\"valid\"],[[3273,3273],\"disallowed\"],[[3274,3277],\"valid\"],[[3278,3284],\"disallowed\"],[[3285,3286],\"valid\"],[[3287,3293],\"disallowed\"],[[3294,3294],\"valid\"],[[3295,3295],\"disallowed\"],[[3296,3297],\"valid\"],[[3298,3299],\"valid\"],[[3300,3301],\"disallowed\"],[[3302,3311],\"valid\"],[[3312,3312],\"disallowed\"],[[3313,3314],\"valid\"],[[3315,3328],\"disallowed\"],[[3329,3329],\"valid\"],[[3330,3331],\"valid\"],[[3332,3332],\"disallowed\"],[[3333,3340],\"valid\"],[[3341,3341],\"disallowed\"],[[3342,3344],\"valid\"],[[3345,3345],\"disallowed\"],[[3346,3368],\"valid\"],[[3369,3369],\"valid\"],[[3370,3385],\"valid\"],[[3386,3386],\"valid\"],[[3387,3388],\"disallowed\"],[[3389,3389],\"valid\"],[[3390,3395],\"valid\"],[[3396,3396],\"valid\"],[[3397,3397],\"disallowed\"],[[3398,3400],\"valid\"],[[3401,3401],\"disallowed\"],[[3402,3405],\"valid\"],[[3406,3406],\"valid\"],[[3407,3414],\"disallowed\"],[[3415,3415],\"valid\"],[[3416,3422],\"disallowed\"],[[3423,3423],\"valid\"],[[3424,3425],\"valid\"],[[3426,3427],\"valid\"],[[3428,3429],\"disallowed\"],[[3430,3439],\"valid\"],[[3440,3445],\"valid\",[],\"NV8\"],[[3446,3448],\"disallowed\"],[[3449,3449],\"valid\",[],\"NV8\"],[[3450,3455],\"valid\"],[[3456,3457],\"disallowed\"],[[3458,3459],\"valid\"],[[3460,3460],\"disallowed\"],[[3461,3478],\"valid\"],[[3479,3481],\"disallowed\"],[[3482,3505],\"valid\"],[[3506,3506],\"disallowed\"],[[3507,3515],\"valid\"],[[3516,3516],\"disallowed\"],[[3517,3517],\"valid\"],[[3518,3519],\"disallowed\"],[[3520,3526],\"valid\"],[[3527,3529],\"disallowed\"],[[3530,3530],\"valid\"],[[3531,3534],\"disallowed\"],[[3535,3540],\"valid\"],[[3541,3541],\"disallowed\"],[[3542,3542],\"valid\"],[[3543,3543],\"disallowed\"],[[3544,3551],\"valid\"],[[3552,3557],\"disallowed\"],[[3558,3567],\"valid\"],[[3568,3569],\"disallowed\"],[[3570,3571],\"valid\"],[[3572,3572],\"valid\",[],\"NV8\"],[[3573,3584],\"disallowed\"],[[3585,3634],\"valid\"],[[3635,3635],\"mapped\",[3661,3634]],[[3636,3642],\"valid\"],[[3643,3646],\"disallowed\"],[[3647,3647],\"valid\",[],\"NV8\"],[[3648,3662],\"valid\"],[[3663,3663],\"valid\",[],\"NV8\"],[[3664,3673],\"valid\"],[[3674,3675],\"valid\",[],\"NV8\"],[[3676,3712],\"disallowed\"],[[3713,3714],\"valid\"],[[3715,3715],\"disallowed\"],[[3716,3716],\"valid\"],[[3717,3718],\"disallowed\"],[[3719,3720],\"valid\"],[[3721,3721],\"disallowed\"],[[3722,3722],\"valid\"],[[3723,3724],\"disallowed\"],[[3725,3725],\"valid\"],[[3726,3731],\"disallowed\"],[[3732,3735],\"valid\"],[[3736,3736],\"disallowed\"],[[3737,3743],\"valid\"],[[3744,3744],\"disallowed\"],[[3745,3747],\"valid\"],[[3748,3748],\"disallowed\"],[[3749,3749],\"valid\"],[[3750,3750],\"disallowed\"],[[3751,3751],\"valid\"],[[3752,3753],\"disallowed\"],[[3754,3755],\"valid\"],[[3756,3756],\"disallowed\"],[[3757,3762],\"valid\"],[[3763,3763],\"mapped\",[3789,3762]],[[3764,3769],\"valid\"],[[3770,3770],\"disallowed\"],[[3771,3773],\"valid\"],[[3774,3775],\"disallowed\"],[[3776,3780],\"valid\"],[[3781,3781],\"disallowed\"],[[3782,3782],\"valid\"],[[3783,3783],\"disallowed\"],[[3784,3789],\"valid\"],[[3790,3791],\"disallowed\"],[[3792,3801],\"valid\"],[[3802,3803],\"disallowed\"],[[3804,3804],\"mapped\",[3755,3737]],[[3805,3805],\"mapped\",[3755,3745]],[[3806,3807],\"valid\"],[[3808,3839],\"disallowed\"],[[3840,3840],\"valid\"],[[3841,3850],\"valid\",[],\"NV8\"],[[3851,3851],\"valid\"],[[3852,3852],\"mapped\",[3851]],[[3853,3863],\"valid\",[],\"NV8\"],[[3864,3865],\"valid\"],[[3866,3871],\"valid\",[],\"NV8\"],[[3872,3881],\"valid\"],[[3882,3892],\"valid\",[],\"NV8\"],[[3893,3893],\"valid\"],[[3894,3894],\"valid\",[],\"NV8\"],[[3895,3895],\"valid\"],[[3896,3896],\"valid\",[],\"NV8\"],[[3897,3897],\"valid\"],[[3898,3901],\"valid\",[],\"NV8\"],[[3902,3906],\"valid\"],[[3907,3907],\"mapped\",[3906,4023]],[[3908,3911],\"valid\"],[[3912,3912],\"disallowed\"],[[3913,3916],\"valid\"],[[3917,3917],\"mapped\",[3916,4023]],[[3918,3921],\"valid\"],[[3922,3922],\"mapped\",[3921,4023]],[[3923,3926],\"valid\"],[[3927,3927],\"mapped\",[3926,4023]],[[3928,3931],\"valid\"],[[3932,3932],\"mapped\",[3931,4023]],[[3933,3944],\"valid\"],[[3945,3945],\"mapped\",[3904,4021]],[[3946,3946],\"valid\"],[[3947,3948],\"valid\"],[[3949,3952],\"disallowed\"],[[3953,3954],\"valid\"],[[3955,3955],\"mapped\",[3953,3954]],[[3956,3956],\"valid\"],[[3957,3957],\"mapped\",[3953,3956]],[[3958,3958],\"mapped\",[4018,3968]],[[3959,3959],\"mapped\",[4018,3953,3968]],[[3960,3960],\"mapped\",[4019,3968]],[[3961,3961],\"mapped\",[4019,3953,3968]],[[3962,3968],\"valid\"],[[3969,3969],\"mapped\",[3953,3968]],[[3970,3972],\"valid\"],[[3973,3973],\"valid\",[],\"NV8\"],[[3974,3979],\"valid\"],[[3980,3983],\"valid\"],[[3984,3986],\"valid\"],[[3987,3987],\"mapped\",[3986,4023]],[[3988,3989],\"valid\"],[[3990,3990],\"valid\"],[[3991,3991],\"valid\"],[[3992,3992],\"disallowed\"],[[3993,3996],\"valid\"],[[3997,3997],\"mapped\",[3996,4023]],[[3998,4001],\"valid\"],[[4002,4002],\"mapped\",[4001,4023]],[[4003,4006],\"valid\"],[[4007,4007],\"mapped\",[4006,4023]],[[4008,4011],\"valid\"],[[4012,4012],\"mapped\",[4011,4023]],[[4013,4013],\"valid\"],[[4014,4016],\"valid\"],[[4017,4023],\"valid\"],[[4024,4024],\"valid\"],[[4025,4025],\"mapped\",[3984,4021]],[[4026,4028],\"valid\"],[[4029,4029],\"disallowed\"],[[4030,4037],\"valid\",[],\"NV8\"],[[4038,4038],\"valid\"],[[4039,4044],\"valid\",[],\"NV8\"],[[4045,4045],\"disallowed\"],[[4046,4046],\"valid\",[],\"NV8\"],[[4047,4047],\"valid\",[],\"NV8\"],[[4048,4049],\"valid\",[],\"NV8\"],[[4050,4052],\"valid\",[],\"NV8\"],[[4053,4056],\"valid\",[],\"NV8\"],[[4057,4058],\"valid\",[],\"NV8\"],[[4059,4095],\"disallowed\"],[[4096,4129],\"valid\"],[[4130,4130],\"valid\"],[[4131,4135],\"valid\"],[[4136,4136],\"valid\"],[[4137,4138],\"valid\"],[[4139,4139],\"valid\"],[[4140,4146],\"valid\"],[[4147,4149],\"valid\"],[[4150,4153],\"valid\"],[[4154,4159],\"valid\"],[[4160,4169],\"valid\"],[[4170,4175],\"valid\",[],\"NV8\"],[[4176,4185],\"valid\"],[[4186,4249],\"valid\"],[[4250,4253],\"valid\"],[[4254,4255],\"valid\",[],\"NV8\"],[[4256,4293],\"disallowed\"],[[4294,4294],\"disallowed\"],[[4295,4295],\"mapped\",[11559]],[[4296,4300],\"disallowed\"],[[4301,4301],\"mapped\",[11565]],[[4302,4303],\"disallowed\"],[[4304,4342],\"valid\"],[[4343,4344],\"valid\"],[[4345,4346],\"valid\"],[[4347,4347],\"valid\",[],\"NV8\"],[[4348,4348],\"mapped\",[4316]],[[4349,4351],\"valid\"],[[4352,4441],\"valid\",[],\"NV8\"],[[4442,4446],\"valid\",[],\"NV8\"],[[4447,4448],\"disallowed\"],[[4449,4514],\"valid\",[],\"NV8\"],[[4515,4519],\"valid\",[],\"NV8\"],[[4520,4601],\"valid\",[],\"NV8\"],[[4602,4607],\"valid\",[],\"NV8\"],[[4608,4614],\"valid\"],[[4615,4615],\"valid\"],[[4616,4678],\"valid\"],[[4679,4679],\"valid\"],[[4680,4680],\"valid\"],[[4681,4681],\"disallowed\"],[[4682,4685],\"valid\"],[[4686,4687],\"disallowed\"],[[4688,4694],\"valid\"],[[4695,4695],\"disallowed\"],[[4696,4696],\"valid\"],[[4697,4697],\"disallowed\"],[[4698,4701],\"valid\"],[[4702,4703],\"disallowed\"],[[4704,4742],\"valid\"],[[4743,4743],\"valid\"],[[4744,4744],\"valid\"],[[4745,4745],\"disallowed\"],[[4746,4749],\"valid\"],[[4750,4751],\"disallowed\"],[[4752,4782],\"valid\"],[[4783,4783],\"valid\"],[[4784,4784],\"valid\"],[[4785,4785],\"disallowed\"],[[4786,4789],\"valid\"],[[4790,4791],\"disallowed\"],[[4792,4798],\"valid\"],[[4799,4799],\"disallowed\"],[[4800,4800],\"valid\"],[[4801,4801],\"disallowed\"],[[4802,4805],\"valid\"],[[4806,4807],\"disallowed\"],[[4808,4814],\"valid\"],[[4815,4815],\"valid\"],[[4816,4822],\"valid\"],[[4823,4823],\"disallowed\"],[[4824,4846],\"valid\"],[[4847,4847],\"valid\"],[[4848,4878],\"valid\"],[[4879,4879],\"valid\"],[[4880,4880],\"valid\"],[[4881,4881],\"disallowed\"],[[4882,4885],\"valid\"],[[4886,4887],\"disallowed\"],[[4888,4894],\"valid\"],[[4895,4895],\"valid\"],[[4896,4934],\"valid\"],[[4935,4935],\"valid\"],[[4936,4954],\"valid\"],[[4955,4956],\"disallowed\"],[[4957,4958],\"valid\"],[[4959,4959],\"valid\"],[[4960,4960],\"valid\",[],\"NV8\"],[[4961,4988],\"valid\",[],\"NV8\"],[[4989,4991],\"disallowed\"],[[4992,5007],\"valid\"],[[5008,5017],\"valid\",[],\"NV8\"],[[5018,5023],\"disallowed\"],[[5024,5108],\"valid\"],[[5109,5109],\"valid\"],[[5110,5111],\"disallowed\"],[[5112,5112],\"mapped\",[5104]],[[5113,5113],\"mapped\",[5105]],[[5114,5114],\"mapped\",[5106]],[[5115,5115],\"mapped\",[5107]],[[5116,5116],\"mapped\",[5108]],[[5117,5117],\"mapped\",[5109]],[[5118,5119],\"disallowed\"],[[5120,5120],\"valid\",[],\"NV8\"],[[5121,5740],\"valid\"],[[5741,5742],\"valid\",[],\"NV8\"],[[5743,5750],\"valid\"],[[5751,5759],\"valid\"],[[5760,5760],\"disallowed\"],[[5761,5786],\"valid\"],[[5787,5788],\"valid\",[],\"NV8\"],[[5789,5791],\"disallowed\"],[[5792,5866],\"valid\"],[[5867,5872],\"valid\",[],\"NV8\"],[[5873,5880],\"valid\"],[[5881,5887],\"disallowed\"],[[5888,5900],\"valid\"],[[5901,5901],\"disallowed\"],[[5902,5908],\"valid\"],[[5909,5919],\"disallowed\"],[[5920,5940],\"valid\"],[[5941,5942],\"valid\",[],\"NV8\"],[[5943,5951],\"disallowed\"],[[5952,5971],\"valid\"],[[5972,5983],\"disallowed\"],[[5984,5996],\"valid\"],[[5997,5997],\"disallowed\"],[[5998,6000],\"valid\"],[[6001,6001],\"disallowed\"],[[6002,6003],\"valid\"],[[6004,6015],\"disallowed\"],[[6016,6067],\"valid\"],[[6068,6069],\"disallowed\"],[[6070,6099],\"valid\"],[[6100,6102],\"valid\",[],\"NV8\"],[[6103,6103],\"valid\"],[[6104,6107],\"valid\",[],\"NV8\"],[[6108,6108],\"valid\"],[[6109,6109],\"valid\"],[[6110,6111],\"disallowed\"],[[6112,6121],\"valid\"],[[6122,6127],\"disallowed\"],[[6128,6137],\"valid\",[],\"NV8\"],[[6138,6143],\"disallowed\"],[[6144,6149],\"valid\",[],\"NV8\"],[[6150,6150],\"disallowed\"],[[6151,6154],\"valid\",[],\"NV8\"],[[6155,6157],\"ignored\"],[[6158,6158],\"disallowed\"],[[6159,6159],\"disallowed\"],[[6160,6169],\"valid\"],[[6170,6175],\"disallowed\"],[[6176,6263],\"valid\"],[[6264,6271],\"disallowed\"],[[6272,6313],\"valid\"],[[6314,6314],\"valid\"],[[6315,6319],\"disallowed\"],[[6320,6389],\"valid\"],[[6390,6399],\"disallowed\"],[[6400,6428],\"valid\"],[[6429,6430],\"valid\"],[[6431,6431],\"disallowed\"],[[6432,6443],\"valid\"],[[6444,6447],\"disallowed\"],[[6448,6459],\"valid\"],[[6460,6463],\"disallowed\"],[[6464,6464],\"valid\",[],\"NV8\"],[[6465,6467],\"disallowed\"],[[6468,6469],\"valid\",[],\"NV8\"],[[6470,6509],\"valid\"],[[6510,6511],\"disallowed\"],[[6512,6516],\"valid\"],[[6517,6527],\"disallowed\"],[[6528,6569],\"valid\"],[[6570,6571],\"valid\"],[[6572,6575],\"disallowed\"],[[6576,6601],\"valid\"],[[6602,6607],\"disallowed\"],[[6608,6617],\"valid\"],[[6618,6618],\"valid\",[],\"XV8\"],[[6619,6621],\"disallowed\"],[[6622,6623],\"valid\",[],\"NV8\"],[[6624,6655],\"valid\",[],\"NV8\"],[[6656,6683],\"valid\"],[[6684,6685],\"disallowed\"],[[6686,6687],\"valid\",[],\"NV8\"],[[6688,6750],\"valid\"],[[6751,6751],\"disallowed\"],[[6752,6780],\"valid\"],[[6781,6782],\"disallowed\"],[[6783,6793],\"valid\"],[[6794,6799],\"disallowed\"],[[6800,6809],\"valid\"],[[6810,6815],\"disallowed\"],[[6816,6822],\"valid\",[],\"NV8\"],[[6823,6823],\"valid\"],[[6824,6829],\"valid\",[],\"NV8\"],[[6830,6831],\"disallowed\"],[[6832,6845],\"valid\"],[[6846,6846],\"valid\",[],\"NV8\"],[[6847,6911],\"disallowed\"],[[6912,6987],\"valid\"],[[6988,6991],\"disallowed\"],[[6992,7001],\"valid\"],[[7002,7018],\"valid\",[],\"NV8\"],[[7019,7027],\"valid\"],[[7028,7036],\"valid\",[],\"NV8\"],[[7037,7039],\"disallowed\"],[[7040,7082],\"valid\"],[[7083,7085],\"valid\"],[[7086,7097],\"valid\"],[[7098,7103],\"valid\"],[[7104,7155],\"valid\"],[[7156,7163],\"disallowed\"],[[7164,7167],\"valid\",[],\"NV8\"],[[7168,7223],\"valid\"],[[7224,7226],\"disallowed\"],[[7227,7231],\"valid\",[],\"NV8\"],[[7232,7241],\"valid\"],[[7242,7244],\"disallowed\"],[[7245,7293],\"valid\"],[[7294,7295],\"valid\",[],\"NV8\"],[[7296,7359],\"disallowed\"],[[7360,7367],\"valid\",[],\"NV8\"],[[7368,7375],\"disallowed\"],[[7376,7378],\"valid\"],[[7379,7379],\"valid\",[],\"NV8\"],[[7380,7410],\"valid\"],[[7411,7414],\"valid\"],[[7415,7415],\"disallowed\"],[[7416,7417],\"valid\"],[[7418,7423],\"disallowed\"],[[7424,7467],\"valid\"],[[7468,7468],\"mapped\",[97]],[[7469,7469],\"mapped\",[230]],[[7470,7470],\"mapped\",[98]],[[7471,7471],\"valid\"],[[7472,7472],\"mapped\",[100]],[[7473,7473],\"mapped\",[101]],[[7474,7474],\"mapped\",[477]],[[7475,7475],\"mapped\",[103]],[[7476,7476],\"mapped\",[104]],[[7477,7477],\"mapped\",[105]],[[7478,7478],\"mapped\",[106]],[[7479,7479],\"mapped\",[107]],[[7480,7480],\"mapped\",[108]],[[7481,7481],\"mapped\",[109]],[[7482,7482],\"mapped\",[110]],[[7483,7483],\"valid\"],[[7484,7484],\"mapped\",[111]],[[7485,7485],\"mapped\",[547]],[[7486,7486],\"mapped\",[112]],[[7487,7487],\"mapped\",[114]],[[7488,7488],\"mapped\",[116]],[[7489,7489],\"mapped\",[117]],[[7490,7490],\"mapped\",[119]],[[7491,7491],\"mapped\",[97]],[[7492,7492],\"mapped\",[592]],[[7493,7493],\"mapped\",[593]],[[7494,7494],\"mapped\",[7426]],[[7495,7495],\"mapped\",[98]],[[7496,7496],\"mapped\",[100]],[[7497,7497],\"mapped\",[101]],[[7498,7498],\"mapped\",[601]],[[7499,7499],\"mapped\",[603]],[[7500,7500],\"mapped\",[604]],[[7501,7501],\"mapped\",[103]],[[7502,7502],\"valid\"],[[7503,7503],\"mapped\",[107]],[[7504,7504],\"mapped\",[109]],[[7505,7505],\"mapped\",[331]],[[7506,7506],\"mapped\",[111]],[[7507,7507],\"mapped\",[596]],[[7508,7508],\"mapped\",[7446]],[[7509,7509],\"mapped\",[7447]],[[7510,7510],\"mapped\",[112]],[[7511,7511],\"mapped\",[116]],[[7512,7512],\"mapped\",[117]],[[7513,7513],\"mapped\",[7453]],[[7514,7514],\"mapped\",[623]],[[7515,7515],\"mapped\",[118]],[[7516,7516],\"mapped\",[7461]],[[7517,7517],\"mapped\",[946]],[[7518,7518],\"mapped\",[947]],[[7519,7519],\"mapped\",[948]],[[7520,7520],\"mapped\",[966]],[[7521,7521],\"mapped\",[967]],[[7522,7522],\"mapped\",[105]],[[7523,7523],\"mapped\",[114]],[[7524,7524],\"mapped\",[117]],[[7525,7525],\"mapped\",[118]],[[7526,7526],\"mapped\",[946]],[[7527,7527],\"mapped\",[947]],[[7528,7528],\"mapped\",[961]],[[7529,7529],\"mapped\",[966]],[[7530,7530],\"mapped\",[967]],[[7531,7531],\"valid\"],[[7532,7543],\"valid\"],[[7544,7544],\"mapped\",[1085]],[[7545,7578],\"valid\"],[[7579,7579],\"mapped\",[594]],[[7580,7580],\"mapped\",[99]],[[7581,7581],\"mapped\",[597]],[[7582,7582],\"mapped\",[240]],[[7583,7583],\"mapped\",[604]],[[7584,7584],\"mapped\",[102]],[[7585,7585],\"mapped\",[607]],[[7586,7586],\"mapped\",[609]],[[7587,7587],\"mapped\",[613]],[[7588,7588],\"mapped\",[616]],[[7589,7589],\"mapped\",[617]],[[7590,7590],\"mapped\",[618]],[[7591,7591],\"mapped\",[7547]],[[7592,7592],\"mapped\",[669]],[[7593,7593],\"mapped\",[621]],[[7594,7594],\"mapped\",[7557]],[[7595,7595],\"mapped\",[671]],[[7596,7596],\"mapped\",[625]],[[7597,7597],\"mapped\",[624]],[[7598,7598],\"mapped\",[626]],[[7599,7599],\"mapped\",[627]],[[7600,7600],\"mapped\",[628]],[[7601,7601],\"mapped\",[629]],[[7602,7602],\"mapped\",[632]],[[7603,7603],\"mapped\",[642]],[[7604,7604],\"mapped\",[643]],[[7605,7605],\"mapped\",[427]],[[7606,7606],\"mapped\",[649]],[[7607,7607],\"mapped\",[650]],[[7608,7608],\"mapped\",[7452]],[[7609,7609],\"mapped\",[651]],[[7610,7610],\"mapped\",[652]],[[7611,7611],\"mapped\",[122]],[[7612,7612],\"mapped\",[656]],[[7613,7613],\"mapped\",[657]],[[7614,7614],\"mapped\",[658]],[[7615,7615],\"mapped\",[952]],[[7616,7619],\"valid\"],[[7620,7626],\"valid\"],[[7627,7654],\"valid\"],[[7655,7669],\"valid\"],[[7670,7675],\"disallowed\"],[[7676,7676],\"valid\"],[[7677,7677],\"valid\"],[[7678,7679],\"valid\"],[[7680,7680],\"mapped\",[7681]],[[7681,7681],\"valid\"],[[7682,7682],\"mapped\",[7683]],[[7683,7683],\"valid\"],[[7684,7684],\"mapped\",[7685]],[[7685,7685],\"valid\"],[[7686,7686],\"mapped\",[7687]],[[7687,7687],\"valid\"],[[7688,7688],\"mapped\",[7689]],[[7689,7689],\"valid\"],[[7690,7690],\"mapped\",[7691]],[[7691,7691],\"valid\"],[[7692,7692],\"mapped\",[7693]],[[7693,7693],\"valid\"],[[7694,7694],\"mapped\",[7695]],[[7695,7695],\"valid\"],[[7696,7696],\"mapped\",[7697]],[[7697,7697],\"valid\"],[[7698,7698],\"mapped\",[7699]],[[7699,7699],\"valid\"],[[7700,7700],\"mapped\",[7701]],[[7701,7701],\"valid\"],[[7702,7702],\"mapped\",[7703]],[[7703,7703],\"valid\"],[[7704,7704],\"mapped\",[7705]],[[7705,7705],\"valid\"],[[7706,7706],\"mapped\",[7707]],[[7707,7707],\"valid\"],[[7708,7708],\"mapped\",[7709]],[[7709,7709],\"valid\"],[[7710,7710],\"mapped\",[7711]],[[7711,7711],\"valid\"],[[7712,7712],\"mapped\",[7713]],[[7713,7713],\"valid\"],[[7714,7714],\"mapped\",[7715]],[[7715,7715],\"valid\"],[[7716,7716],\"mapped\",[7717]],[[7717,7717],\"valid\"],[[7718,7718],\"mapped\",[7719]],[[7719,7719],\"valid\"],[[7720,7720],\"mapped\",[7721]],[[7721,7721],\"valid\"],[[7722,7722],\"mapped\",[7723]],[[7723,7723],\"valid\"],[[7724,7724],\"mapped\",[7725]],[[7725,7725],\"valid\"],[[7726,7726],\"mapped\",[7727]],[[7727,7727],\"valid\"],[[7728,7728],\"mapped\",[7729]],[[7729,7729],\"valid\"],[[7730,7730],\"mapped\",[7731]],[[7731,7731],\"valid\"],[[7732,7732],\"mapped\",[7733]],[[7733,7733],\"valid\"],[[7734,7734],\"mapped\",[7735]],[[7735,7735],\"valid\"],[[7736,7736],\"mapped\",[7737]],[[7737,7737],\"valid\"],[[7738,7738],\"mapped\",[7739]],[[7739,7739],\"valid\"],[[7740,7740],\"mapped\",[7741]],[[7741,7741],\"valid\"],[[7742,7742],\"mapped\",[7743]],[[7743,7743],\"valid\"],[[7744,7744],\"mapped\",[7745]],[[7745,7745],\"valid\"],[[7746,7746],\"mapped\",[7747]],[[7747,7747],\"valid\"],[[7748,7748],\"mapped\",[7749]],[[7749,7749],\"valid\"],[[7750,7750],\"mapped\",[7751]],[[7751,7751],\"valid\"],[[7752,7752],\"mapped\",[7753]],[[7753,7753],\"valid\"],[[7754,7754],\"mapped\",[7755]],[[7755,7755],\"valid\"],[[7756,7756],\"mapped\",[7757]],[[7757,7757],\"valid\"],[[7758,7758],\"mapped\",[7759]],[[7759,7759],\"valid\"],[[7760,7760],\"mapped\",[7761]],[[7761,7761],\"valid\"],[[7762,7762],\"mapped\",[7763]],[[7763,7763],\"valid\"],[[7764,7764],\"mapped\",[7765]],[[7765,7765],\"valid\"],[[7766,7766],\"mapped\",[7767]],[[7767,7767],\"valid\"],[[7768,7768],\"mapped\",[7769]],[[7769,7769],\"valid\"],[[7770,7770],\"mapped\",[7771]],[[7771,7771],\"valid\"],[[7772,7772],\"mapped\",[7773]],[[7773,7773],\"valid\"],[[7774,7774],\"mapped\",[7775]],[[7775,7775],\"valid\"],[[7776,7776],\"mapped\",[7777]],[[7777,7777],\"valid\"],[[7778,7778],\"mapped\",[7779]],[[7779,7779],\"valid\"],[[7780,7780],\"mapped\",[7781]],[[7781,7781],\"valid\"],[[7782,7782],\"mapped\",[7783]],[[7783,7783],\"valid\"],[[7784,7784],\"mapped\",[7785]],[[7785,7785],\"valid\"],[[7786,7786],\"mapped\",[7787]],[[7787,7787],\"valid\"],[[7788,7788],\"mapped\",[7789]],[[7789,7789],\"valid\"],[[7790,7790],\"mapped\",[7791]],[[7791,7791],\"valid\"],[[7792,7792],\"mapped\",[7793]],[[7793,7793],\"valid\"],[[7794,7794],\"mapped\",[7795]],[[7795,7795],\"valid\"],[[7796,7796],\"mapped\",[7797]],[[7797,7797],\"valid\"],[[7798,7798],\"mapped\",[7799]],[[7799,7799],\"valid\"],[[7800,7800],\"mapped\",[7801]],[[7801,7801],\"valid\"],[[7802,7802],\"mapped\",[7803]],[[7803,7803],\"valid\"],[[7804,7804],\"mapped\",[7805]],[[7805,7805],\"valid\"],[[7806,7806],\"mapped\",[7807]],[[7807,7807],\"valid\"],[[7808,7808],\"mapped\",[7809]],[[7809,7809],\"valid\"],[[7810,7810],\"mapped\",[7811]],[[7811,7811],\"valid\"],[[7812,7812],\"mapped\",[7813]],[[7813,7813],\"valid\"],[[7814,7814],\"mapped\",[7815]],[[7815,7815],\"valid\"],[[7816,7816],\"mapped\",[7817]],[[7817,7817],\"valid\"],[[7818,7818],\"mapped\",[7819]],[[7819,7819],\"valid\"],[[7820,7820],\"mapped\",[7821]],[[7821,7821],\"valid\"],[[7822,7822],\"mapped\",[7823]],[[7823,7823],\"valid\"],[[7824,7824],\"mapped\",[7825]],[[7825,7825],\"valid\"],[[7826,7826],\"mapped\",[7827]],[[7827,7827],\"valid\"],[[7828,7828],\"mapped\",[7829]],[[7829,7833],\"valid\"],[[7834,7834],\"mapped\",[97,702]],[[7835,7835],\"mapped\",[7777]],[[7836,7837],\"valid\"],[[7838,7838],\"mapped\",[115,115]],[[7839,7839],\"valid\"],[[7840,7840],\"mapped\",[7841]],[[7841,7841],\"valid\"],[[7842,7842],\"mapped\",[7843]],[[7843,7843],\"valid\"],[[7844,7844],\"mapped\",[7845]],[[7845,7845],\"valid\"],[[7846,7846],\"mapped\",[7847]],[[7847,7847],\"valid\"],[[7848,7848],\"mapped\",[7849]],[[7849,7849],\"valid\"],[[7850,7850],\"mapped\",[7851]],[[7851,7851],\"valid\"],[[7852,7852],\"mapped\",[7853]],[[7853,7853],\"valid\"],[[7854,7854],\"mapped\",[7855]],[[7855,7855],\"valid\"],[[7856,7856],\"mapped\",[7857]],[[7857,7857],\"valid\"],[[7858,7858],\"mapped\",[7859]],[[7859,7859],\"valid\"],[[7860,7860],\"mapped\",[7861]],[[7861,7861],\"valid\"],[[7862,7862],\"mapped\",[7863]],[[7863,7863],\"valid\"],[[7864,7864],\"mapped\",[7865]],[[7865,7865],\"valid\"],[[7866,7866],\"mapped\",[7867]],[[7867,7867],\"valid\"],[[7868,7868],\"mapped\",[7869]],[[7869,7869],\"valid\"],[[7870,7870],\"mapped\",[7871]],[[7871,7871],\"valid\"],[[7872,7872],\"mapped\",[7873]],[[7873,7873],\"valid\"],[[7874,7874],\"mapped\",[7875]],[[7875,7875],\"valid\"],[[7876,7876],\"mapped\",[7877]],[[7877,7877],\"valid\"],[[7878,7878],\"mapped\",[7879]],[[7879,7879],\"valid\"],[[7880,7880],\"mapped\",[7881]],[[7881,7881],\"valid\"],[[7882,7882],\"mapped\",[7883]],[[7883,7883],\"valid\"],[[7884,7884],\"mapped\",[7885]],[[7885,7885],\"valid\"],[[7886,7886],\"mapped\",[7887]],[[7887,7887],\"valid\"],[[7888,7888],\"mapped\",[7889]],[[7889,7889],\"valid\"],[[7890,7890],\"mapped\",[7891]],[[7891,7891],\"valid\"],[[7892,7892],\"mapped\",[7893]],[[7893,7893],\"valid\"],[[7894,7894],\"mapped\",[7895]],[[7895,7895],\"valid\"],[[7896,7896],\"mapped\",[7897]],[[7897,7897],\"valid\"],[[7898,7898],\"mapped\",[7899]],[[7899,7899],\"valid\"],[[7900,7900],\"mapped\",[7901]],[[7901,7901],\"valid\"],[[7902,7902],\"mapped\",[7903]],[[7903,7903],\"valid\"],[[7904,7904],\"mapped\",[7905]],[[7905,7905],\"valid\"],[[7906,7906],\"mapped\",[7907]],[[7907,7907],\"valid\"],[[7908,7908],\"mapped\",[7909]],[[7909,7909],\"valid\"],[[7910,7910],\"mapped\",[7911]],[[7911,7911],\"valid\"],[[7912,7912],\"mapped\",[7913]],[[7913,7913],\"valid\"],[[7914,7914],\"mapped\",[7915]],[[7915,7915],\"valid\"],[[7916,7916],\"mapped\",[7917]],[[7917,7917],\"valid\"],[[7918,7918],\"mapped\",[7919]],[[7919,7919],\"valid\"],[[7920,7920],\"mapped\",[7921]],[[7921,7921],\"valid\"],[[7922,7922],\"mapped\",[7923]],[[7923,7923],\"valid\"],[[7924,7924],\"mapped\",[7925]],[[7925,7925],\"valid\"],[[7926,7926],\"mapped\",[7927]],[[7927,7927],\"valid\"],[[7928,7928],\"mapped\",[7929]],[[7929,7929],\"valid\"],[[7930,7930],\"mapped\",[7931]],[[7931,7931],\"valid\"],[[7932,7932],\"mapped\",[7933]],[[7933,7933],\"valid\"],[[7934,7934],\"mapped\",[7935]],[[7935,7935],\"valid\"],[[7936,7943],\"valid\"],[[7944,7944],\"mapped\",[7936]],[[7945,7945],\"mapped\",[7937]],[[7946,7946],\"mapped\",[7938]],[[7947,7947],\"mapped\",[7939]],[[7948,7948],\"mapped\",[7940]],[[7949,7949],\"mapped\",[7941]],[[7950,7950],\"mapped\",[7942]],[[7951,7951],\"mapped\",[7943]],[[7952,7957],\"valid\"],[[7958,7959],\"disallowed\"],[[7960,7960],\"mapped\",[7952]],[[7961,7961],\"mapped\",[7953]],[[7962,7962],\"mapped\",[7954]],[[7963,7963],\"mapped\",[7955]],[[7964,7964],\"mapped\",[7956]],[[7965,7965],\"mapped\",[7957]],[[7966,7967],\"disallowed\"],[[7968,7975],\"valid\"],[[7976,7976],\"mapped\",[7968]],[[7977,7977],\"mapped\",[7969]],[[7978,7978],\"mapped\",[7970]],[[7979,7979],\"mapped\",[7971]],[[7980,7980],\"mapped\",[7972]],[[7981,7981],\"mapped\",[7973]],[[7982,7982],\"mapped\",[7974]],[[7983,7983],\"mapped\",[7975]],[[7984,7991],\"valid\"],[[7992,7992],\"mapped\",[7984]],[[7993,7993],\"mapped\",[7985]],[[7994,7994],\"mapped\",[7986]],[[7995,7995],\"mapped\",[7987]],[[7996,7996],\"mapped\",[7988]],[[7997,7997],\"mapped\",[7989]],[[7998,7998],\"mapped\",[7990]],[[7999,7999],\"mapped\",[7991]],[[8000,8005],\"valid\"],[[8006,8007],\"disallowed\"],[[8008,8008],\"mapped\",[8000]],[[8009,8009],\"mapped\",[8001]],[[8010,8010],\"mapped\",[8002]],[[8011,8011],\"mapped\",[8003]],[[8012,8012],\"mapped\",[8004]],[[8013,8013],\"mapped\",[8005]],[[8014,8015],\"disallowed\"],[[8016,8023],\"valid\"],[[8024,8024],\"disallowed\"],[[8025,8025],\"mapped\",[8017]],[[8026,8026],\"disallowed\"],[[8027,8027],\"mapped\",[8019]],[[8028,8028],\"disallowed\"],[[8029,8029],\"mapped\",[8021]],[[8030,8030],\"disallowed\"],[[8031,8031],\"mapped\",[8023]],[[8032,8039],\"valid\"],[[8040,8040],\"mapped\",[8032]],[[8041,8041],\"mapped\",[8033]],[[8042,8042],\"mapped\",[8034]],[[8043,8043],\"mapped\",[8035]],[[8044,8044],\"mapped\",[8036]],[[8045,8045],\"mapped\",[8037]],[[8046,8046],\"mapped\",[8038]],[[8047,8047],\"mapped\",[8039]],[[8048,8048],\"valid\"],[[8049,8049],\"mapped\",[940]],[[8050,8050],\"valid\"],[[8051,8051],\"mapped\",[941]],[[8052,8052],\"valid\"],[[8053,8053],\"mapped\",[942]],[[8054,8054],\"valid\"],[[8055,8055],\"mapped\",[943]],[[8056,8056],\"valid\"],[[8057,8057],\"mapped\",[972]],[[8058,8058],\"valid\"],[[8059,8059],\"mapped\",[973]],[[8060,8060],\"valid\"],[[8061,8061],\"mapped\",[974]],[[8062,8063],\"disallowed\"],[[8064,8064],\"mapped\",[7936,953]],[[8065,8065],\"mapped\",[7937,953]],[[8066,8066],\"mapped\",[7938,953]],[[8067,8067],\"mapped\",[7939,953]],[[8068,8068],\"mapped\",[7940,953]],[[8069,8069],\"mapped\",[7941,953]],[[8070,8070],\"mapped\",[7942,953]],[[8071,8071],\"mapped\",[7943,953]],[[8072,8072],\"mapped\",[7936,953]],[[8073,8073],\"mapped\",[7937,953]],[[8074,8074],\"mapped\",[7938,953]],[[8075,8075],\"mapped\",[7939,953]],[[8076,8076],\"mapped\",[7940,953]],[[8077,8077],\"mapped\",[7941,953]],[[8078,8078],\"mapped\",[7942,953]],[[8079,8079],\"mapped\",[7943,953]],[[8080,8080],\"mapped\",[7968,953]],[[8081,8081],\"mapped\",[7969,953]],[[8082,8082],\"mapped\",[7970,953]],[[8083,8083],\"mapped\",[7971,953]],[[8084,8084],\"mapped\",[7972,953]],[[8085,8085],\"mapped\",[7973,953]],[[8086,8086],\"mapped\",[7974,953]],[[8087,8087],\"mapped\",[7975,953]],[[8088,8088],\"mapped\",[7968,953]],[[8089,8089],\"mapped\",[7969,953]],[[8090,8090],\"mapped\",[7970,953]],[[8091,8091],\"mapped\",[7971,953]],[[8092,8092],\"mapped\",[7972,953]],[[8093,8093],\"mapped\",[7973,953]],[[8094,8094],\"mapped\",[7974,953]],[[8095,8095],\"mapped\",[7975,953]],[[8096,8096],\"mapped\",[8032,953]],[[8097,8097],\"mapped\",[8033,953]],[[8098,8098],\"mapped\",[8034,953]],[[8099,8099],\"mapped\",[8035,953]],[[8100,8100],\"mapped\",[8036,953]],[[8101,8101],\"mapped\",[8037,953]],[[8102,8102],\"mapped\",[8038,953]],[[8103,8103],\"mapped\",[8039,953]],[[8104,8104],\"mapped\",[8032,953]],[[8105,8105],\"mapped\",[8033,953]],[[8106,8106],\"mapped\",[8034,953]],[[8107,8107],\"mapped\",[8035,953]],[[8108,8108],\"mapped\",[8036,953]],[[8109,8109],\"mapped\",[8037,953]],[[8110,8110],\"mapped\",[8038,953]],[[8111,8111],\"mapped\",[8039,953]],[[8112,8113],\"valid\"],[[8114,8114],\"mapped\",[8048,953]],[[8115,8115],\"mapped\",[945,953]],[[8116,8116],\"mapped\",[940,953]],[[8117,8117],\"disallowed\"],[[8118,8118],\"valid\"],[[8119,8119],\"mapped\",[8118,953]],[[8120,8120],\"mapped\",[8112]],[[8121,8121],\"mapped\",[8113]],[[8122,8122],\"mapped\",[8048]],[[8123,8123],\"mapped\",[940]],[[8124,8124],\"mapped\",[945,953]],[[8125,8125],\"disallowed_STD3_mapped\",[32,787]],[[8126,8126],\"mapped\",[953]],[[8127,8127],\"disallowed_STD3_mapped\",[32,787]],[[8128,8128],\"disallowed_STD3_mapped\",[32,834]],[[8129,8129],\"disallowed_STD3_mapped\",[32,776,834]],[[8130,8130],\"mapped\",[8052,953]],[[8131,8131],\"mapped\",[951,953]],[[8132,8132],\"mapped\",[942,953]],[[8133,8133],\"disallowed\"],[[8134,8134],\"valid\"],[[8135,8135],\"mapped\",[8134,953]],[[8136,8136],\"mapped\",[8050]],[[8137,8137],\"mapped\",[941]],[[8138,8138],\"mapped\",[8052]],[[8139,8139],\"mapped\",[942]],[[8140,8140],\"mapped\",[951,953]],[[8141,8141],\"disallowed_STD3_mapped\",[32,787,768]],[[8142,8142],\"disallowed_STD3_mapped\",[32,787,769]],[[8143,8143],\"disallowed_STD3_mapped\",[32,787,834]],[[8144,8146],\"valid\"],[[8147,8147],\"mapped\",[912]],[[8148,8149],\"disallowed\"],[[8150,8151],\"valid\"],[[8152,8152],\"mapped\",[8144]],[[8153,8153],\"mapped\",[8145]],[[8154,8154],\"mapped\",[8054]],[[8155,8155],\"mapped\",[943]],[[8156,8156],\"disallowed\"],[[8157,8157],\"disallowed_STD3_mapped\",[32,788,768]],[[8158,8158],\"disallowed_STD3_mapped\",[32,788,769]],[[8159,8159],\"disallowed_STD3_mapped\",[32,788,834]],[[8160,8162],\"valid\"],[[8163,8163],\"mapped\",[944]],[[8164,8167],\"valid\"],[[8168,8168],\"mapped\",[8160]],[[8169,8169],\"mapped\",[8161]],[[8170,8170],\"mapped\",[8058]],[[8171,8171],\"mapped\",[973]],[[8172,8172],\"mapped\",[8165]],[[8173,8173],\"disallowed_STD3_mapped\",[32,776,768]],[[8174,8174],\"disallowed_STD3_mapped\",[32,776,769]],[[8175,8175],\"disallowed_STD3_mapped\",[96]],[[8176,8177],\"disallowed\"],[[8178,8178],\"mapped\",[8060,953]],[[8179,8179],\"mapped\",[969,953]],[[8180,8180],\"mapped\",[974,953]],[[8181,8181],\"disallowed\"],[[8182,8182],\"valid\"],[[8183,8183],\"mapped\",[8182,953]],[[8184,8184],\"mapped\",[8056]],[[8185,8185],\"mapped\",[972]],[[8186,8186],\"mapped\",[8060]],[[8187,8187],\"mapped\",[974]],[[8188,8188],\"mapped\",[969,953]],[[8189,8189],\"disallowed_STD3_mapped\",[32,769]],[[8190,8190],\"disallowed_STD3_mapped\",[32,788]],[[8191,8191],\"disallowed\"],[[8192,8202],\"disallowed_STD3_mapped\",[32]],[[8203,8203],\"ignored\"],[[8204,8205],\"deviation\",[]],[[8206,8207],\"disallowed\"],[[8208,8208],\"valid\",[],\"NV8\"],[[8209,8209],\"mapped\",[8208]],[[8210,8214],\"valid\",[],\"NV8\"],[[8215,8215],\"disallowed_STD3_mapped\",[32,819]],[[8216,8227],\"valid\",[],\"NV8\"],[[8228,8230],\"disallowed\"],[[8231,8231],\"valid\",[],\"NV8\"],[[8232,8238],\"disallowed\"],[[8239,8239],\"disallowed_STD3_mapped\",[32]],[[8240,8242],\"valid\",[],\"NV8\"],[[8243,8243],\"mapped\",[8242,8242]],[[8244,8244],\"mapped\",[8242,8242,8242]],[[8245,8245],\"valid\",[],\"NV8\"],[[8246,8246],\"mapped\",[8245,8245]],[[8247,8247],\"mapped\",[8245,8245,8245]],[[8248,8251],\"valid\",[],\"NV8\"],[[8252,8252],\"disallowed_STD3_mapped\",[33,33]],[[8253,8253],\"valid\",[],\"NV8\"],[[8254,8254],\"disallowed_STD3_mapped\",[32,773]],[[8255,8262],\"valid\",[],\"NV8\"],[[8263,8263],\"disallowed_STD3_mapped\",[63,63]],[[8264,8264],\"disallowed_STD3_mapped\",[63,33]],[[8265,8265],\"disallowed_STD3_mapped\",[33,63]],[[8266,8269],\"valid\",[],\"NV8\"],[[8270,8274],\"valid\",[],\"NV8\"],[[8275,8276],\"valid\",[],\"NV8\"],[[8277,8278],\"valid\",[],\"NV8\"],[[8279,8279],\"mapped\",[8242,8242,8242,8242]],[[8280,8286],\"valid\",[],\"NV8\"],[[8287,8287],\"disallowed_STD3_mapped\",[32]],[[8288,8288],\"ignored\"],[[8289,8291],\"disallowed\"],[[8292,8292],\"ignored\"],[[8293,8293],\"disallowed\"],[[8294,8297],\"disallowed\"],[[8298,8303],\"disallowed\"],[[8304,8304],\"mapped\",[48]],[[8305,8305],\"mapped\",[105]],[[8306,8307],\"disallowed\"],[[8308,8308],\"mapped\",[52]],[[8309,8309],\"mapped\",[53]],[[8310,8310],\"mapped\",[54]],[[8311,8311],\"mapped\",[55]],[[8312,8312],\"mapped\",[56]],[[8313,8313],\"mapped\",[57]],[[8314,8314],\"disallowed_STD3_mapped\",[43]],[[8315,8315],\"mapped\",[8722]],[[8316,8316],\"disallowed_STD3_mapped\",[61]],[[8317,8317],\"disallowed_STD3_mapped\",[40]],[[8318,8318],\"disallowed_STD3_mapped\",[41]],[[8319,8319],\"mapped\",[110]],[[8320,8320],\"mapped\",[48]],[[8321,8321],\"mapped\",[49]],[[8322,8322],\"mapped\",[50]],[[8323,8323],\"mapped\",[51]],[[8324,8324],\"mapped\",[52]],[[8325,8325],\"mapped\",[53]],[[8326,8326],\"mapped\",[54]],[[8327,8327],\"mapped\",[55]],[[8328,8328],\"mapped\",[56]],[[8329,8329],\"mapped\",[57]],[[8330,8330],\"disallowed_STD3_mapped\",[43]],[[8331,8331],\"mapped\",[8722]],[[8332,8332],\"disallowed_STD3_mapped\",[61]],[[8333,8333],\"disallowed_STD3_mapped\",[40]],[[8334,8334],\"disallowed_STD3_mapped\",[41]],[[8335,8335],\"disallowed\"],[[8336,8336],\"mapped\",[97]],[[8337,8337],\"mapped\",[101]],[[8338,8338],\"mapped\",[111]],[[8339,8339],\"mapped\",[120]],[[8340,8340],\"mapped\",[601]],[[8341,8341],\"mapped\",[104]],[[8342,8342],\"mapped\",[107]],[[8343,8343],\"mapped\",[108]],[[8344,8344],\"mapped\",[109]],[[8345,8345],\"mapped\",[110]],[[8346,8346],\"mapped\",[112]],[[8347,8347],\"mapped\",[115]],[[8348,8348],\"mapped\",[116]],[[8349,8351],\"disallowed\"],[[8352,8359],\"valid\",[],\"NV8\"],[[8360,8360],\"mapped\",[114,115]],[[8361,8362],\"valid\",[],\"NV8\"],[[8363,8363],\"valid\",[],\"NV8\"],[[8364,8364],\"valid\",[],\"NV8\"],[[8365,8367],\"valid\",[],\"NV8\"],[[8368,8369],\"valid\",[],\"NV8\"],[[8370,8373],\"valid\",[],\"NV8\"],[[8374,8376],\"valid\",[],\"NV8\"],[[8377,8377],\"valid\",[],\"NV8\"],[[8378,8378],\"valid\",[],\"NV8\"],[[8379,8381],\"valid\",[],\"NV8\"],[[8382,8382],\"valid\",[],\"NV8\"],[[8383,8399],\"disallowed\"],[[8400,8417],\"valid\",[],\"NV8\"],[[8418,8419],\"valid\",[],\"NV8\"],[[8420,8426],\"valid\",[],\"NV8\"],[[8427,8427],\"valid\",[],\"NV8\"],[[8428,8431],\"valid\",[],\"NV8\"],[[8432,8432],\"valid\",[],\"NV8\"],[[8433,8447],\"disallowed\"],[[8448,8448],\"disallowed_STD3_mapped\",[97,47,99]],[[8449,8449],\"disallowed_STD3_mapped\",[97,47,115]],[[8450,8450],\"mapped\",[99]],[[8451,8451],\"mapped\",[176,99]],[[8452,8452],\"valid\",[],\"NV8\"],[[8453,8453],\"disallowed_STD3_mapped\",[99,47,111]],[[8454,8454],\"disallowed_STD3_mapped\",[99,47,117]],[[8455,8455],\"mapped\",[603]],[[8456,8456],\"valid\",[],\"NV8\"],[[8457,8457],\"mapped\",[176,102]],[[8458,8458],\"mapped\",[103]],[[8459,8462],\"mapped\",[104]],[[8463,8463],\"mapped\",[295]],[[8464,8465],\"mapped\",[105]],[[8466,8467],\"mapped\",[108]],[[8468,8468],\"valid\",[],\"NV8\"],[[8469,8469],\"mapped\",[110]],[[8470,8470],\"mapped\",[110,111]],[[8471,8472],\"valid\",[],\"NV8\"],[[8473,8473],\"mapped\",[112]],[[8474,8474],\"mapped\",[113]],[[8475,8477],\"mapped\",[114]],[[8478,8479],\"valid\",[],\"NV8\"],[[8480,8480],\"mapped\",[115,109]],[[8481,8481],\"mapped\",[116,101,108]],[[8482,8482],\"mapped\",[116,109]],[[8483,8483],\"valid\",[],\"NV8\"],[[8484,8484],\"mapped\",[122]],[[8485,8485],\"valid\",[],\"NV8\"],[[8486,8486],\"mapped\",[969]],[[8487,8487],\"valid\",[],\"NV8\"],[[8488,8488],\"mapped\",[122]],[[8489,8489],\"valid\",[],\"NV8\"],[[8490,8490],\"mapped\",[107]],[[8491,8491],\"mapped\",[229]],[[8492,8492],\"mapped\",[98]],[[8493,8493],\"mapped\",[99]],[[8494,8494],\"valid\",[],\"NV8\"],[[8495,8496],\"mapped\",[101]],[[8497,8497],\"mapped\",[102]],[[8498,8498],\"disallowed\"],[[8499,8499],\"mapped\",[109]],[[8500,8500],\"mapped\",[111]],[[8501,8501],\"mapped\",[1488]],[[8502,8502],\"mapped\",[1489]],[[8503,8503],\"mapped\",[1490]],[[8504,8504],\"mapped\",[1491]],[[8505,8505],\"mapped\",[105]],[[8506,8506],\"valid\",[],\"NV8\"],[[8507,8507],\"mapped\",[102,97,120]],[[8508,8508],\"mapped\",[960]],[[8509,8510],\"mapped\",[947]],[[8511,8511],\"mapped\",[960]],[[8512,8512],\"mapped\",[8721]],[[8513,8516],\"valid\",[],\"NV8\"],[[8517,8518],\"mapped\",[100]],[[8519,8519],\"mapped\",[101]],[[8520,8520],\"mapped\",[105]],[[8521,8521],\"mapped\",[106]],[[8522,8523],\"valid\",[],\"NV8\"],[[8524,8524],\"valid\",[],\"NV8\"],[[8525,8525],\"valid\",[],\"NV8\"],[[8526,8526],\"valid\"],[[8527,8527],\"valid\",[],\"NV8\"],[[8528,8528],\"mapped\",[49,8260,55]],[[8529,8529],\"mapped\",[49,8260,57]],[[8530,8530],\"mapped\",[49,8260,49,48]],[[8531,8531],\"mapped\",[49,8260,51]],[[8532,8532],\"mapped\",[50,8260,51]],[[8533,8533],\"mapped\",[49,8260,53]],[[8534,8534],\"mapped\",[50,8260,53]],[[8535,8535],\"mapped\",[51,8260,53]],[[8536,8536],\"mapped\",[52,8260,53]],[[8537,8537],\"mapped\",[49,8260,54]],[[8538,8538],\"mapped\",[53,8260,54]],[[8539,8539],\"mapped\",[49,8260,56]],[[8540,8540],\"mapped\",[51,8260,56]],[[8541,8541],\"mapped\",[53,8260,56]],[[8542,8542],\"mapped\",[55,8260,56]],[[8543,8543],\"mapped\",[49,8260]],[[8544,8544],\"mapped\",[105]],[[8545,8545],\"mapped\",[105,105]],[[8546,8546],\"mapped\",[105,105,105]],[[8547,8547],\"mapped\",[105,118]],[[8548,8548],\"mapped\",[118]],[[8549,8549],\"mapped\",[118,105]],[[8550,8550],\"mapped\",[118,105,105]],[[8551,8551],\"mapped\",[118,105,105,105]],[[8552,8552],\"mapped\",[105,120]],[[8553,8553],\"mapped\",[120]],[[8554,8554],\"mapped\",[120,105]],[[8555,8555],\"mapped\",[120,105,105]],[[8556,8556],\"mapped\",[108]],[[8557,8557],\"mapped\",[99]],[[8558,8558],\"mapped\",[100]],[[8559,8559],\"mapped\",[109]],[[8560,8560],\"mapped\",[105]],[[8561,8561],\"mapped\",[105,105]],[[8562,8562],\"mapped\",[105,105,105]],[[8563,8563],\"mapped\",[105,118]],[[8564,8564],\"mapped\",[118]],[[8565,8565],\"mapped\",[118,105]],[[8566,8566],\"mapped\",[118,105,105]],[[8567,8567],\"mapped\",[118,105,105,105]],[[8568,8568],\"mapped\",[105,120]],[[8569,8569],\"mapped\",[120]],[[8570,8570],\"mapped\",[120,105]],[[8571,8571],\"mapped\",[120,105,105]],[[8572,8572],\"mapped\",[108]],[[8573,8573],\"mapped\",[99]],[[8574,8574],\"mapped\",[100]],[[8575,8575],\"mapped\",[109]],[[8576,8578],\"valid\",[],\"NV8\"],[[8579,8579],\"disallowed\"],[[8580,8580],\"valid\"],[[8581,8584],\"valid\",[],\"NV8\"],[[8585,8585],\"mapped\",[48,8260,51]],[[8586,8587],\"valid\",[],\"NV8\"],[[8588,8591],\"disallowed\"],[[8592,8682],\"valid\",[],\"NV8\"],[[8683,8691],\"valid\",[],\"NV8\"],[[8692,8703],\"valid\",[],\"NV8\"],[[8704,8747],\"valid\",[],\"NV8\"],[[8748,8748],\"mapped\",[8747,8747]],[[8749,8749],\"mapped\",[8747,8747,8747]],[[8750,8750],\"valid\",[],\"NV8\"],[[8751,8751],\"mapped\",[8750,8750]],[[8752,8752],\"mapped\",[8750,8750,8750]],[[8753,8799],\"valid\",[],\"NV8\"],[[8800,8800],\"disallowed_STD3_valid\"],[[8801,8813],\"valid\",[],\"NV8\"],[[8814,8815],\"disallowed_STD3_valid\"],[[8816,8945],\"valid\",[],\"NV8\"],[[8946,8959],\"valid\",[],\"NV8\"],[[8960,8960],\"valid\",[],\"NV8\"],[[8961,8961],\"valid\",[],\"NV8\"],[[8962,9000],\"valid\",[],\"NV8\"],[[9001,9001],\"mapped\",[12296]],[[9002,9002],\"mapped\",[12297]],[[9003,9082],\"valid\",[],\"NV8\"],[[9083,9083],\"valid\",[],\"NV8\"],[[9084,9084],\"valid\",[],\"NV8\"],[[9085,9114],\"valid\",[],\"NV8\"],[[9115,9166],\"valid\",[],\"NV8\"],[[9167,9168],\"valid\",[],\"NV8\"],[[9169,9179],\"valid\",[],\"NV8\"],[[9180,9191],\"valid\",[],\"NV8\"],[[9192,9192],\"valid\",[],\"NV8\"],[[9193,9203],\"valid\",[],\"NV8\"],[[9204,9210],\"valid\",[],\"NV8\"],[[9211,9215],\"disallowed\"],[[9216,9252],\"valid\",[],\"NV8\"],[[9253,9254],\"valid\",[],\"NV8\"],[[9255,9279],\"disallowed\"],[[9280,9290],\"valid\",[],\"NV8\"],[[9291,9311],\"disallowed\"],[[9312,9312],\"mapped\",[49]],[[9313,9313],\"mapped\",[50]],[[9314,9314],\"mapped\",[51]],[[9315,9315],\"mapped\",[52]],[[9316,9316],\"mapped\",[53]],[[9317,9317],\"mapped\",[54]],[[9318,9318],\"mapped\",[55]],[[9319,9319],\"mapped\",[56]],[[9320,9320],\"mapped\",[57]],[[9321,9321],\"mapped\",[49,48]],[[9322,9322],\"mapped\",[49,49]],[[9323,9323],\"mapped\",[49,50]],[[9324,9324],\"mapped\",[49,51]],[[9325,9325],\"mapped\",[49,52]],[[9326,9326],\"mapped\",[49,53]],[[9327,9327],\"mapped\",[49,54]],[[9328,9328],\"mapped\",[49,55]],[[9329,9329],\"mapped\",[49,56]],[[9330,9330],\"mapped\",[49,57]],[[9331,9331],\"mapped\",[50,48]],[[9332,9332],\"disallowed_STD3_mapped\",[40,49,41]],[[9333,9333],\"disallowed_STD3_mapped\",[40,50,41]],[[9334,9334],\"disallowed_STD3_mapped\",[40,51,41]],[[9335,9335],\"disallowed_STD3_mapped\",[40,52,41]],[[9336,9336],\"disallowed_STD3_mapped\",[40,53,41]],[[9337,9337],\"disallowed_STD3_mapped\",[40,54,41]],[[9338,9338],\"disallowed_STD3_mapped\",[40,55,41]],[[9339,9339],\"disallowed_STD3_mapped\",[40,56,41]],[[9340,9340],\"disallowed_STD3_mapped\",[40,57,41]],[[9341,9341],\"disallowed_STD3_mapped\",[40,49,48,41]],[[9342,9342],\"disallowed_STD3_mapped\",[40,49,49,41]],[[9343,9343],\"disallowed_STD3_mapped\",[40,49,50,41]],[[9344,9344],\"disallowed_STD3_mapped\",[40,49,51,41]],[[9345,9345],\"disallowed_STD3_mapped\",[40,49,52,41]],[[9346,9346],\"disallowed_STD3_mapped\",[40,49,53,41]],[[9347,9347],\"disallowed_STD3_mapped\",[40,49,54,41]],[[9348,9348],\"disallowed_STD3_mapped\",[40,49,55,41]],[[9349,9349],\"disallowed_STD3_mapped\",[40,49,56,41]],[[9350,9350],\"disallowed_STD3_mapped\",[40,49,57,41]],[[9351,9351],\"disallowed_STD3_mapped\",[40,50,48,41]],[[9352,9371],\"disallowed\"],[[9372,9372],\"disallowed_STD3_mapped\",[40,97,41]],[[9373,9373],\"disallowed_STD3_mapped\",[40,98,41]],[[9374,9374],\"disallowed_STD3_mapped\",[40,99,41]],[[9375,9375],\"disallowed_STD3_mapped\",[40,100,41]],[[9376,9376],\"disallowed_STD3_mapped\",[40,101,41]],[[9377,9377],\"disallowed_STD3_mapped\",[40,102,41]],[[9378,9378],\"disallowed_STD3_mapped\",[40,103,41]],[[9379,9379],\"disallowed_STD3_mapped\",[40,104,41]],[[9380,9380],\"disallowed_STD3_mapped\",[40,105,41]],[[9381,9381],\"disallowed_STD3_mapped\",[40,106,41]],[[9382,9382],\"disallowed_STD3_mapped\",[40,107,41]],[[9383,9383],\"disallowed_STD3_mapped\",[40,108,41]],[[9384,9384],\"disallowed_STD3_mapped\",[40,109,41]],[[9385,9385],\"disallowed_STD3_mapped\",[40,110,41]],[[9386,9386],\"disallowed_STD3_mapped\",[40,111,41]],[[9387,9387],\"disallowed_STD3_mapped\",[40,112,41]],[[9388,9388],\"disallowed_STD3_mapped\",[40,113,41]],[[9389,9389],\"disallowed_STD3_mapped\",[40,114,41]],[[9390,9390],\"disallowed_STD3_mapped\",[40,115,41]],[[9391,9391],\"disallowed_STD3_mapped\",[40,116,41]],[[9392,9392],\"disallowed_STD3_mapped\",[40,117,41]],[[9393,9393],\"disallowed_STD3_mapped\",[40,118,41]],[[9394,9394],\"disallowed_STD3_mapped\",[40,119,41]],[[9395,9395],\"disallowed_STD3_mapped\",[40,120,41]],[[9396,9396],\"disallowed_STD3_mapped\",[40,121,41]],[[9397,9397],\"disallowed_STD3_mapped\",[40,122,41]],[[9398,9398],\"mapped\",[97]],[[9399,9399],\"mapped\",[98]],[[9400,9400],\"mapped\",[99]],[[9401,9401],\"mapped\",[100]],[[9402,9402],\"mapped\",[101]],[[9403,9403],\"mapped\",[102]],[[9404,9404],\"mapped\",[103]],[[9405,9405],\"mapped\",[104]],[[9406,9406],\"mapped\",[105]],[[9407,9407],\"mapped\",[106]],[[9408,9408],\"mapped\",[107]],[[9409,9409],\"mapped\",[108]],[[9410,9410],\"mapped\",[109]],[[9411,9411],\"mapped\",[110]],[[9412,9412],\"mapped\",[111]],[[9413,9413],\"mapped\",[112]],[[9414,9414],\"mapped\",[113]],[[9415,9415],\"mapped\",[114]],[[9416,9416],\"mapped\",[115]],[[9417,9417],\"mapped\",[116]],[[9418,9418],\"mapped\",[117]],[[9419,9419],\"mapped\",[118]],[[9420,9420],\"mapped\",[119]],[[9421,9421],\"mapped\",[120]],[[9422,9422],\"mapped\",[121]],[[9423,9423],\"mapped\",[122]],[[9424,9424],\"mapped\",[97]],[[9425,9425],\"mapped\",[98]],[[9426,9426],\"mapped\",[99]],[[9427,9427],\"mapped\",[100]],[[9428,9428],\"mapped\",[101]],[[9429,9429],\"mapped\",[102]],[[9430,9430],\"mapped\",[103]],[[9431,9431],\"mapped\",[104]],[[9432,9432],\"mapped\",[105]],[[9433,9433],\"mapped\",[106]],[[9434,9434],\"mapped\",[107]],[[9435,9435],\"mapped\",[108]],[[9436,9436],\"mapped\",[109]],[[9437,9437],\"mapped\",[110]],[[9438,9438],\"mapped\",[111]],[[9439,9439],\"mapped\",[112]],[[9440,9440],\"mapped\",[113]],[[9441,9441],\"mapped\",[114]],[[9442,9442],\"mapped\",[115]],[[9443,9443],\"mapped\",[116]],[[9444,9444],\"mapped\",[117]],[[9445,9445],\"mapped\",[118]],[[9446,9446],\"mapped\",[119]],[[9447,9447],\"mapped\",[120]],[[9448,9448],\"mapped\",[121]],[[9449,9449],\"mapped\",[122]],[[9450,9450],\"mapped\",[48]],[[9451,9470],\"valid\",[],\"NV8\"],[[9471,9471],\"valid\",[],\"NV8\"],[[9472,9621],\"valid\",[],\"NV8\"],[[9622,9631],\"valid\",[],\"NV8\"],[[9632,9711],\"valid\",[],\"NV8\"],[[9712,9719],\"valid\",[],\"NV8\"],[[9720,9727],\"valid\",[],\"NV8\"],[[9728,9747],\"valid\",[],\"NV8\"],[[9748,9749],\"valid\",[],\"NV8\"],[[9750,9751],\"valid\",[],\"NV8\"],[[9752,9752],\"valid\",[],\"NV8\"],[[9753,9753],\"valid\",[],\"NV8\"],[[9754,9839],\"valid\",[],\"NV8\"],[[9840,9841],\"valid\",[],\"NV8\"],[[9842,9853],\"valid\",[],\"NV8\"],[[9854,9855],\"valid\",[],\"NV8\"],[[9856,9865],\"valid\",[],\"NV8\"],[[9866,9873],\"valid\",[],\"NV8\"],[[9874,9884],\"valid\",[],\"NV8\"],[[9885,9885],\"valid\",[],\"NV8\"],[[9886,9887],\"valid\",[],\"NV8\"],[[9888,9889],\"valid\",[],\"NV8\"],[[9890,9905],\"valid\",[],\"NV8\"],[[9906,9906],\"valid\",[],\"NV8\"],[[9907,9916],\"valid\",[],\"NV8\"],[[9917,9919],\"valid\",[],\"NV8\"],[[9920,9923],\"valid\",[],\"NV8\"],[[9924,9933],\"valid\",[],\"NV8\"],[[9934,9934],\"valid\",[],\"NV8\"],[[9935,9953],\"valid\",[],\"NV8\"],[[9954,9954],\"valid\",[],\"NV8\"],[[9955,9955],\"valid\",[],\"NV8\"],[[9956,9959],\"valid\",[],\"NV8\"],[[9960,9983],\"valid\",[],\"NV8\"],[[9984,9984],\"valid\",[],\"NV8\"],[[9985,9988],\"valid\",[],\"NV8\"],[[9989,9989],\"valid\",[],\"NV8\"],[[9990,9993],\"valid\",[],\"NV8\"],[[9994,9995],\"valid\",[],\"NV8\"],[[9996,10023],\"valid\",[],\"NV8\"],[[10024,10024],\"valid\",[],\"NV8\"],[[10025,10059],\"valid\",[],\"NV8\"],[[10060,10060],\"valid\",[],\"NV8\"],[[10061,10061],\"valid\",[],\"NV8\"],[[10062,10062],\"valid\",[],\"NV8\"],[[10063,10066],\"valid\",[],\"NV8\"],[[10067,10069],\"valid\",[],\"NV8\"],[[10070,10070],\"valid\",[],\"NV8\"],[[10071,10071],\"valid\",[],\"NV8\"],[[10072,10078],\"valid\",[],\"NV8\"],[[10079,10080],\"valid\",[],\"NV8\"],[[10081,10087],\"valid\",[],\"NV8\"],[[10088,10101],\"valid\",[],\"NV8\"],[[10102,10132],\"valid\",[],\"NV8\"],[[10133,10135],\"valid\",[],\"NV8\"],[[10136,10159],\"valid\",[],\"NV8\"],[[10160,10160],\"valid\",[],\"NV8\"],[[10161,10174],\"valid\",[],\"NV8\"],[[10175,10175],\"valid\",[],\"NV8\"],[[10176,10182],\"valid\",[],\"NV8\"],[[10183,10186],\"valid\",[],\"NV8\"],[[10187,10187],\"valid\",[],\"NV8\"],[[10188,10188],\"valid\",[],\"NV8\"],[[10189,10189],\"valid\",[],\"NV8\"],[[10190,10191],\"valid\",[],\"NV8\"],[[10192,10219],\"valid\",[],\"NV8\"],[[10220,10223],\"valid\",[],\"NV8\"],[[10224,10239],\"valid\",[],\"NV8\"],[[10240,10495],\"valid\",[],\"NV8\"],[[10496,10763],\"valid\",[],\"NV8\"],[[10764,10764],\"mapped\",[8747,8747,8747,8747]],[[10765,10867],\"valid\",[],\"NV8\"],[[10868,10868],\"disallowed_STD3_mapped\",[58,58,61]],[[10869,10869],\"disallowed_STD3_mapped\",[61,61]],[[10870,10870],\"disallowed_STD3_mapped\",[61,61,61]],[[10871,10971],\"valid\",[],\"NV8\"],[[10972,10972],\"mapped\",[10973,824]],[[10973,11007],\"valid\",[],\"NV8\"],[[11008,11021],\"valid\",[],\"NV8\"],[[11022,11027],\"valid\",[],\"NV8\"],[[11028,11034],\"valid\",[],\"NV8\"],[[11035,11039],\"valid\",[],\"NV8\"],[[11040,11043],\"valid\",[],\"NV8\"],[[11044,11084],\"valid\",[],\"NV8\"],[[11085,11087],\"valid\",[],\"NV8\"],[[11088,11092],\"valid\",[],\"NV8\"],[[11093,11097],\"valid\",[],\"NV8\"],[[11098,11123],\"valid\",[],\"NV8\"],[[11124,11125],\"disallowed\"],[[11126,11157],\"valid\",[],\"NV8\"],[[11158,11159],\"disallowed\"],[[11160,11193],\"valid\",[],\"NV8\"],[[11194,11196],\"disallowed\"],[[11197,11208],\"valid\",[],\"NV8\"],[[11209,11209],\"disallowed\"],[[11210,11217],\"valid\",[],\"NV8\"],[[11218,11243],\"disallowed\"],[[11244,11247],\"valid\",[],\"NV8\"],[[11248,11263],\"disallowed\"],[[11264,11264],\"mapped\",[11312]],[[11265,11265],\"mapped\",[11313]],[[11266,11266],\"mapped\",[11314]],[[11267,11267],\"mapped\",[11315]],[[11268,11268],\"mapped\",[11316]],[[11269,11269],\"mapped\",[11317]],[[11270,11270],\"mapped\",[11318]],[[11271,11271],\"mapped\",[11319]],[[11272,11272],\"mapped\",[11320]],[[11273,11273],\"mapped\",[11321]],[[11274,11274],\"mapped\",[11322]],[[11275,11275],\"mapped\",[11323]],[[11276,11276],\"mapped\",[11324]],[[11277,11277],\"mapped\",[11325]],[[11278,11278],\"mapped\",[11326]],[[11279,11279],\"mapped\",[11327]],[[11280,11280],\"mapped\",[11328]],[[11281,11281],\"mapped\",[11329]],[[11282,11282],\"mapped\",[11330]],[[11283,11283],\"mapped\",[11331]],[[11284,11284],\"mapped\",[11332]],[[11285,11285],\"mapped\",[11333]],[[11286,11286],\"mapped\",[11334]],[[11287,11287],\"mapped\",[11335]],[[11288,11288],\"mapped\",[11336]],[[11289,11289],\"mapped\",[11337]],[[11290,11290],\"mapped\",[11338]],[[11291,11291],\"mapped\",[11339]],[[11292,11292],\"mapped\",[11340]],[[11293,11293],\"mapped\",[11341]],[[11294,11294],\"mapped\",[11342]],[[11295,11295],\"mapped\",[11343]],[[11296,11296],\"mapped\",[11344]],[[11297,11297],\"mapped\",[11345]],[[11298,11298],\"mapped\",[11346]],[[11299,11299],\"mapped\",[11347]],[[11300,11300],\"mapped\",[11348]],[[11301,11301],\"mapped\",[11349]],[[11302,11302],\"mapped\",[11350]],[[11303,11303],\"mapped\",[11351]],[[11304,11304],\"mapped\",[11352]],[[11305,11305],\"mapped\",[11353]],[[11306,11306],\"mapped\",[11354]],[[11307,11307],\"mapped\",[11355]],[[11308,11308],\"mapped\",[11356]],[[11309,11309],\"mapped\",[11357]],[[11310,11310],\"mapped\",[11358]],[[11311,11311],\"disallowed\"],[[11312,11358],\"valid\"],[[11359,11359],\"disallowed\"],[[11360,11360],\"mapped\",[11361]],[[11361,11361],\"valid\"],[[11362,11362],\"mapped\",[619]],[[11363,11363],\"mapped\",[7549]],[[11364,11364],\"mapped\",[637]],[[11365,11366],\"valid\"],[[11367,11367],\"mapped\",[11368]],[[11368,11368],\"valid\"],[[11369,11369],\"mapped\",[11370]],[[11370,11370],\"valid\"],[[11371,11371],\"mapped\",[11372]],[[11372,11372],\"valid\"],[[11373,11373],\"mapped\",[593]],[[11374,11374],\"mapped\",[625]],[[11375,11375],\"mapped\",[592]],[[11376,11376],\"mapped\",[594]],[[11377,11377],\"valid\"],[[11378,11378],\"mapped\",[11379]],[[11379,11379],\"valid\"],[[11380,11380],\"valid\"],[[11381,11381],\"mapped\",[11382]],[[11382,11383],\"valid\"],[[11384,11387],\"valid\"],[[11388,11388],\"mapped\",[106]],[[11389,11389],\"mapped\",[118]],[[11390,11390],\"mapped\",[575]],[[11391,11391],\"mapped\",[576]],[[11392,11392],\"mapped\",[11393]],[[11393,11393],\"valid\"],[[11394,11394],\"mapped\",[11395]],[[11395,11395],\"valid\"],[[11396,11396],\"mapped\",[11397]],[[11397,11397],\"valid\"],[[11398,11398],\"mapped\",[11399]],[[11399,11399],\"valid\"],[[11400,11400],\"mapped\",[11401]],[[11401,11401],\"valid\"],[[11402,11402],\"mapped\",[11403]],[[11403,11403],\"valid\"],[[11404,11404],\"mapped\",[11405]],[[11405,11405],\"valid\"],[[11406,11406],\"mapped\",[11407]],[[11407,11407],\"valid\"],[[11408,11408],\"mapped\",[11409]],[[11409,11409],\"valid\"],[[11410,11410],\"mapped\",[11411]],[[11411,11411],\"valid\"],[[11412,11412],\"mapped\",[11413]],[[11413,11413],\"valid\"],[[11414,11414],\"mapped\",[11415]],[[11415,11415],\"valid\"],[[11416,11416],\"mapped\",[11417]],[[11417,11417],\"valid\"],[[11418,11418],\"mapped\",[11419]],[[11419,11419],\"valid\"],[[11420,11420],\"mapped\",[11421]],[[11421,11421],\"valid\"],[[11422,11422],\"mapped\",[11423]],[[11423,11423],\"valid\"],[[11424,11424],\"mapped\",[11425]],[[11425,11425],\"valid\"],[[11426,11426],\"mapped\",[11427]],[[11427,11427],\"valid\"],[[11428,11428],\"mapped\",[11429]],[[11429,11429],\"valid\"],[[11430,11430],\"mapped\",[11431]],[[11431,11431],\"valid\"],[[11432,11432],\"mapped\",[11433]],[[11433,11433],\"valid\"],[[11434,11434],\"mapped\",[11435]],[[11435,11435],\"valid\"],[[11436,11436],\"mapped\",[11437]],[[11437,11437],\"valid\"],[[11438,11438],\"mapped\",[11439]],[[11439,11439],\"valid\"],[[11440,11440],\"mapped\",[11441]],[[11441,11441],\"valid\"],[[11442,11442],\"mapped\",[11443]],[[11443,11443],\"valid\"],[[11444,11444],\"mapped\",[11445]],[[11445,11445],\"valid\"],[[11446,11446],\"mapped\",[11447]],[[11447,11447],\"valid\"],[[11448,11448],\"mapped\",[11449]],[[11449,11449],\"valid\"],[[11450,11450],\"mapped\",[11451]],[[11451,11451],\"valid\"],[[11452,11452],\"mapped\",[11453]],[[11453,11453],\"valid\"],[[11454,11454],\"mapped\",[11455]],[[11455,11455],\"valid\"],[[11456,11456],\"mapped\",[11457]],[[11457,11457],\"valid\"],[[11458,11458],\"mapped\",[11459]],[[11459,11459],\"valid\"],[[11460,11460],\"mapped\",[11461]],[[11461,11461],\"valid\"],[[11462,11462],\"mapped\",[11463]],[[11463,11463],\"valid\"],[[11464,11464],\"mapped\",[11465]],[[11465,11465],\"valid\"],[[11466,11466],\"mapped\",[11467]],[[11467,11467],\"valid\"],[[11468,11468],\"mapped\",[11469]],[[11469,11469],\"valid\"],[[11470,11470],\"mapped\",[11471]],[[11471,11471],\"valid\"],[[11472,11472],\"mapped\",[11473]],[[11473,11473],\"valid\"],[[11474,11474],\"mapped\",[11475]],[[11475,11475],\"valid\"],[[11476,11476],\"mapped\",[11477]],[[11477,11477],\"valid\"],[[11478,11478],\"mapped\",[11479]],[[11479,11479],\"valid\"],[[11480,11480],\"mapped\",[11481]],[[11481,11481],\"valid\"],[[11482,11482],\"mapped\",[11483]],[[11483,11483],\"valid\"],[[11484,11484],\"mapped\",[11485]],[[11485,11485],\"valid\"],[[11486,11486],\"mapped\",[11487]],[[11487,11487],\"valid\"],[[11488,11488],\"mapped\",[11489]],[[11489,11489],\"valid\"],[[11490,11490],\"mapped\",[11491]],[[11491,11492],\"valid\"],[[11493,11498],\"valid\",[],\"NV8\"],[[11499,11499],\"mapped\",[11500]],[[11500,11500],\"valid\"],[[11501,11501],\"mapped\",[11502]],[[11502,11505],\"valid\"],[[11506,11506],\"mapped\",[11507]],[[11507,11507],\"valid\"],[[11508,11512],\"disallowed\"],[[11513,11519],\"valid\",[],\"NV8\"],[[11520,11557],\"valid\"],[[11558,11558],\"disallowed\"],[[11559,11559],\"valid\"],[[11560,11564],\"disallowed\"],[[11565,11565],\"valid\"],[[11566,11567],\"disallowed\"],[[11568,11621],\"valid\"],[[11622,11623],\"valid\"],[[11624,11630],\"disallowed\"],[[11631,11631],\"mapped\",[11617]],[[11632,11632],\"valid\",[],\"NV8\"],[[11633,11646],\"disallowed\"],[[11647,11647],\"valid\"],[[11648,11670],\"valid\"],[[11671,11679],\"disallowed\"],[[11680,11686],\"valid\"],[[11687,11687],\"disallowed\"],[[11688,11694],\"valid\"],[[11695,11695],\"disallowed\"],[[11696,11702],\"valid\"],[[11703,11703],\"disallowed\"],[[11704,11710],\"valid\"],[[11711,11711],\"disallowed\"],[[11712,11718],\"valid\"],[[11719,11719],\"disallowed\"],[[11720,11726],\"valid\"],[[11727,11727],\"disallowed\"],[[11728,11734],\"valid\"],[[11735,11735],\"disallowed\"],[[11736,11742],\"valid\"],[[11743,11743],\"disallowed\"],[[11744,11775],\"valid\"],[[11776,11799],\"valid\",[],\"NV8\"],[[11800,11803],\"valid\",[],\"NV8\"],[[11804,11805],\"valid\",[],\"NV8\"],[[11806,11822],\"valid\",[],\"NV8\"],[[11823,11823],\"valid\"],[[11824,11824],\"valid\",[],\"NV8\"],[[11825,11825],\"valid\",[],\"NV8\"],[[11826,11835],\"valid\",[],\"NV8\"],[[11836,11842],\"valid\",[],\"NV8\"],[[11843,11903],\"disallowed\"],[[11904,11929],\"valid\",[],\"NV8\"],[[11930,11930],\"disallowed\"],[[11931,11934],\"valid\",[],\"NV8\"],[[11935,11935],\"mapped\",[27597]],[[11936,12018],\"valid\",[],\"NV8\"],[[12019,12019],\"mapped\",[40863]],[[12020,12031],\"disallowed\"],[[12032,12032],\"mapped\",[19968]],[[12033,12033],\"mapped\",[20008]],[[12034,12034],\"mapped\",[20022]],[[12035,12035],\"mapped\",[20031]],[[12036,12036],\"mapped\",[20057]],[[12037,12037],\"mapped\",[20101]],[[12038,12038],\"mapped\",[20108]],[[12039,12039],\"mapped\",[20128]],[[12040,12040],\"mapped\",[20154]],[[12041,12041],\"mapped\",[20799]],[[12042,12042],\"mapped\",[20837]],[[12043,12043],\"mapped\",[20843]],[[12044,12044],\"mapped\",[20866]],[[12045,12045],\"mapped\",[20886]],[[12046,12046],\"mapped\",[20907]],[[12047,12047],\"mapped\",[20960]],[[12048,12048],\"mapped\",[20981]],[[12049,12049],\"mapped\",[20992]],[[12050,12050],\"mapped\",[21147]],[[12051,12051],\"mapped\",[21241]],[[12052,12052],\"mapped\",[21269]],[[12053,12053],\"mapped\",[21274]],[[12054,12054],\"mapped\",[21304]],[[12055,12055],\"mapped\",[21313]],[[12056,12056],\"mapped\",[21340]],[[12057,12057],\"mapped\",[21353]],[[12058,12058],\"mapped\",[21378]],[[12059,12059],\"mapped\",[21430]],[[12060,12060],\"mapped\",[21448]],[[12061,12061],\"mapped\",[21475]],[[12062,12062],\"mapped\",[22231]],[[12063,12063],\"mapped\",[22303]],[[12064,12064],\"mapped\",[22763]],[[12065,12065],\"mapped\",[22786]],[[12066,12066],\"mapped\",[22794]],[[12067,12067],\"mapped\",[22805]],[[12068,12068],\"mapped\",[22823]],[[12069,12069],\"mapped\",[22899]],[[12070,12070],\"mapped\",[23376]],[[12071,12071],\"mapped\",[23424]],[[12072,12072],\"mapped\",[23544]],[[12073,12073],\"mapped\",[23567]],[[12074,12074],\"mapped\",[23586]],[[12075,12075],\"mapped\",[23608]],[[12076,12076],\"mapped\",[23662]],[[12077,12077],\"mapped\",[23665]],[[12078,12078],\"mapped\",[24027]],[[12079,12079],\"mapped\",[24037]],[[12080,12080],\"mapped\",[24049]],[[12081,12081],\"mapped\",[24062]],[[12082,12082],\"mapped\",[24178]],[[12083,12083],\"mapped\",[24186]],[[12084,12084],\"mapped\",[24191]],[[12085,12085],\"mapped\",[24308]],[[12086,12086],\"mapped\",[24318]],[[12087,12087],\"mapped\",[24331]],[[12088,12088],\"mapped\",[24339]],[[12089,12089],\"mapped\",[24400]],[[12090,12090],\"mapped\",[24417]],[[12091,12091],\"mapped\",[24435]],[[12092,12092],\"mapped\",[24515]],[[12093,12093],\"mapped\",[25096]],[[12094,12094],\"mapped\",[25142]],[[12095,12095],\"mapped\",[25163]],[[12096,12096],\"mapped\",[25903]],[[12097,12097],\"mapped\",[25908]],[[12098,12098],\"mapped\",[25991]],[[12099,12099],\"mapped\",[26007]],[[12100,12100],\"mapped\",[26020]],[[12101,12101],\"mapped\",[26041]],[[12102,12102],\"mapped\",[26080]],[[12103,12103],\"mapped\",[26085]],[[12104,12104],\"mapped\",[26352]],[[12105,12105],\"mapped\",[26376]],[[12106,12106],\"mapped\",[26408]],[[12107,12107],\"mapped\",[27424]],[[12108,12108],\"mapped\",[27490]],[[12109,12109],\"mapped\",[27513]],[[12110,12110],\"mapped\",[27571]],[[12111,12111],\"mapped\",[27595]],[[12112,12112],\"mapped\",[27604]],[[12113,12113],\"mapped\",[27611]],[[12114,12114],\"mapped\",[27663]],[[12115,12115],\"mapped\",[27668]],[[12116,12116],\"mapped\",[27700]],[[12117,12117],\"mapped\",[28779]],[[12118,12118],\"mapped\",[29226]],[[12119,12119],\"mapped\",[29238]],[[12120,12120],\"mapped\",[29243]],[[12121,12121],\"mapped\",[29247]],[[12122,12122],\"mapped\",[29255]],[[12123,12123],\"mapped\",[29273]],[[12124,12124],\"mapped\",[29275]],[[12125,12125],\"mapped\",[29356]],[[12126,12126],\"mapped\",[29572]],[[12127,12127],\"mapped\",[29577]],[[12128,12128],\"mapped\",[29916]],[[12129,12129],\"mapped\",[29926]],[[12130,12130],\"mapped\",[29976]],[[12131,12131],\"mapped\",[29983]],[[12132,12132],\"mapped\",[29992]],[[12133,12133],\"mapped\",[30000]],[[12134,12134],\"mapped\",[30091]],[[12135,12135],\"mapped\",[30098]],[[12136,12136],\"mapped\",[30326]],[[12137,12137],\"mapped\",[30333]],[[12138,12138],\"mapped\",[30382]],[[12139,12139],\"mapped\",[30399]],[[12140,12140],\"mapped\",[30446]],[[12141,12141],\"mapped\",[30683]],[[12142,12142],\"mapped\",[30690]],[[12143,12143],\"mapped\",[30707]],[[12144,12144],\"mapped\",[31034]],[[12145,12145],\"mapped\",[31160]],[[12146,12146],\"mapped\",[31166]],[[12147,12147],\"mapped\",[31348]],[[12148,12148],\"mapped\",[31435]],[[12149,12149],\"mapped\",[31481]],[[12150,12150],\"mapped\",[31859]],[[12151,12151],\"mapped\",[31992]],[[12152,12152],\"mapped\",[32566]],[[12153,12153],\"mapped\",[32593]],[[12154,12154],\"mapped\",[32650]],[[12155,12155],\"mapped\",[32701]],[[12156,12156],\"mapped\",[32769]],[[12157,12157],\"mapped\",[32780]],[[12158,12158],\"mapped\",[32786]],[[12159,12159],\"mapped\",[32819]],[[12160,12160],\"mapped\",[32895]],[[12161,12161],\"mapped\",[32905]],[[12162,12162],\"mapped\",[33251]],[[12163,12163],\"mapped\",[33258]],[[12164,12164],\"mapped\",[33267]],[[12165,12165],\"mapped\",[33276]],[[12166,12166],\"mapped\",[33292]],[[12167,12167],\"mapped\",[33307]],[[12168,12168],\"mapped\",[33311]],[[12169,12169],\"mapped\",[33390]],[[12170,12170],\"mapped\",[33394]],[[12171,12171],\"mapped\",[33400]],[[12172,12172],\"mapped\",[34381]],[[12173,12173],\"mapped\",[34411]],[[12174,12174],\"mapped\",[34880]],[[12175,12175],\"mapped\",[34892]],[[12176,12176],\"mapped\",[34915]],[[12177,12177],\"mapped\",[35198]],[[12178,12178],\"mapped\",[35211]],[[12179,12179],\"mapped\",[35282]],[[12180,12180],\"mapped\",[35328]],[[12181,12181],\"mapped\",[35895]],[[12182,12182],\"mapped\",[35910]],[[12183,12183],\"mapped\",[35925]],[[12184,12184],\"mapped\",[35960]],[[12185,12185],\"mapped\",[35997]],[[12186,12186],\"mapped\",[36196]],[[12187,12187],\"mapped\",[36208]],[[12188,12188],\"mapped\",[36275]],[[12189,12189],\"mapped\",[36523]],[[12190,12190],\"mapped\",[36554]],[[12191,12191],\"mapped\",[36763]],[[12192,12192],\"mapped\",[36784]],[[12193,12193],\"mapped\",[36789]],[[12194,12194],\"mapped\",[37009]],[[12195,12195],\"mapped\",[37193]],[[12196,12196],\"mapped\",[37318]],[[12197,12197],\"mapped\",[37324]],[[12198,12198],\"mapped\",[37329]],[[12199,12199],\"mapped\",[38263]],[[12200,12200],\"mapped\",[38272]],[[12201,12201],\"mapped\",[38428]],[[12202,12202],\"mapped\",[38582]],[[12203,12203],\"mapped\",[38585]],[[12204,12204],\"mapped\",[38632]],[[12205,12205],\"mapped\",[38737]],[[12206,12206],\"mapped\",[38750]],[[12207,12207],\"mapped\",[38754]],[[12208,12208],\"mapped\",[38761]],[[12209,12209],\"mapped\",[38859]],[[12210,12210],\"mapped\",[38893]],[[12211,12211],\"mapped\",[38899]],[[12212,12212],\"mapped\",[38913]],[[12213,12213],\"mapped\",[39080]],[[12214,12214],\"mapped\",[39131]],[[12215,12215],\"mapped\",[39135]],[[12216,12216],\"mapped\",[39318]],[[12217,12217],\"mapped\",[39321]],[[12218,12218],\"mapped\",[39340]],[[12219,12219],\"mapped\",[39592]],[[12220,12220],\"mapped\",[39640]],[[12221,12221],\"mapped\",[39647]],[[12222,12222],\"mapped\",[39717]],[[12223,12223],\"mapped\",[39727]],[[12224,12224],\"mapped\",[39730]],[[12225,12225],\"mapped\",[39740]],[[12226,12226],\"mapped\",[39770]],[[12227,12227],\"mapped\",[40165]],[[12228,12228],\"mapped\",[40565]],[[12229,12229],\"mapped\",[40575]],[[12230,12230],\"mapped\",[40613]],[[12231,12231],\"mapped\",[40635]],[[12232,12232],\"mapped\",[40643]],[[12233,12233],\"mapped\",[40653]],[[12234,12234],\"mapped\",[40657]],[[12235,12235],\"mapped\",[40697]],[[12236,12236],\"mapped\",[40701]],[[12237,12237],\"mapped\",[40718]],[[12238,12238],\"mapped\",[40723]],[[12239,12239],\"mapped\",[40736]],[[12240,12240],\"mapped\",[40763]],[[12241,12241],\"mapped\",[40778]],[[12242,12242],\"mapped\",[40786]],[[12243,12243],\"mapped\",[40845]],[[12244,12244],\"mapped\",[40860]],[[12245,12245],\"mapped\",[40864]],[[12246,12271],\"disallowed\"],[[12272,12283],\"disallowed\"],[[12284,12287],\"disallowed\"],[[12288,12288],\"disallowed_STD3_mapped\",[32]],[[12289,12289],\"valid\",[],\"NV8\"],[[12290,12290],\"mapped\",[46]],[[12291,12292],\"valid\",[],\"NV8\"],[[12293,12295],\"valid\"],[[12296,12329],\"valid\",[],\"NV8\"],[[12330,12333],\"valid\"],[[12334,12341],\"valid\",[],\"NV8\"],[[12342,12342],\"mapped\",[12306]],[[12343,12343],\"valid\",[],\"NV8\"],[[12344,12344],\"mapped\",[21313]],[[12345,12345],\"mapped\",[21316]],[[12346,12346],\"mapped\",[21317]],[[12347,12347],\"valid\",[],\"NV8\"],[[12348,12348],\"valid\"],[[12349,12349],\"valid\",[],\"NV8\"],[[12350,12350],\"valid\",[],\"NV8\"],[[12351,12351],\"valid\",[],\"NV8\"],[[12352,12352],\"disallowed\"],[[12353,12436],\"valid\"],[[12437,12438],\"valid\"],[[12439,12440],\"disallowed\"],[[12441,12442],\"valid\"],[[12443,12443],\"disallowed_STD3_mapped\",[32,12441]],[[12444,12444],\"disallowed_STD3_mapped\",[32,12442]],[[12445,12446],\"valid\"],[[12447,12447],\"mapped\",[12424,12426]],[[12448,12448],\"valid\",[],\"NV8\"],[[12449,12542],\"valid\"],[[12543,12543],\"mapped\",[12467,12488]],[[12544,12548],\"disallowed\"],[[12549,12588],\"valid\"],[[12589,12589],\"valid\"],[[12590,12592],\"disallowed\"],[[12593,12593],\"mapped\",[4352]],[[12594,12594],\"mapped\",[4353]],[[12595,12595],\"mapped\",[4522]],[[12596,12596],\"mapped\",[4354]],[[12597,12597],\"mapped\",[4524]],[[12598,12598],\"mapped\",[4525]],[[12599,12599],\"mapped\",[4355]],[[12600,12600],\"mapped\",[4356]],[[12601,12601],\"mapped\",[4357]],[[12602,12602],\"mapped\",[4528]],[[12603,12603],\"mapped\",[4529]],[[12604,12604],\"mapped\",[4530]],[[12605,12605],\"mapped\",[4531]],[[12606,12606],\"mapped\",[4532]],[[12607,12607],\"mapped\",[4533]],[[12608,12608],\"mapped\",[4378]],[[12609,12609],\"mapped\",[4358]],[[12610,12610],\"mapped\",[4359]],[[12611,12611],\"mapped\",[4360]],[[12612,12612],\"mapped\",[4385]],[[12613,12613],\"mapped\",[4361]],[[12614,12614],\"mapped\",[4362]],[[12615,12615],\"mapped\",[4363]],[[12616,12616],\"mapped\",[4364]],[[12617,12617],\"mapped\",[4365]],[[12618,12618],\"mapped\",[4366]],[[12619,12619],\"mapped\",[4367]],[[12620,12620],\"mapped\",[4368]],[[12621,12621],\"mapped\",[4369]],[[12622,12622],\"mapped\",[4370]],[[12623,12623],\"mapped\",[4449]],[[12624,12624],\"mapped\",[4450]],[[12625,12625],\"mapped\",[4451]],[[12626,12626],\"mapped\",[4452]],[[12627,12627],\"mapped\",[4453]],[[12628,12628],\"mapped\",[4454]],[[12629,12629],\"mapped\",[4455]],[[12630,12630],\"mapped\",[4456]],[[12631,12631],\"mapped\",[4457]],[[12632,12632],\"mapped\",[4458]],[[12633,12633],\"mapped\",[4459]],[[12634,12634],\"mapped\",[4460]],[[12635,12635],\"mapped\",[4461]],[[12636,12636],\"mapped\",[4462]],[[12637,12637],\"mapped\",[4463]],[[12638,12638],\"mapped\",[4464]],[[12639,12639],\"mapped\",[4465]],[[12640,12640],\"mapped\",[4466]],[[12641,12641],\"mapped\",[4467]],[[12642,12642],\"mapped\",[4468]],[[12643,12643],\"mapped\",[4469]],[[12644,12644],\"disallowed\"],[[12645,12645],\"mapped\",[4372]],[[12646,12646],\"mapped\",[4373]],[[12647,12647],\"mapped\",[4551]],[[12648,12648],\"mapped\",[4552]],[[12649,12649],\"mapped\",[4556]],[[12650,12650],\"mapped\",[4558]],[[12651,12651],\"mapped\",[4563]],[[12652,12652],\"mapped\",[4567]],[[12653,12653],\"mapped\",[4569]],[[12654,12654],\"mapped\",[4380]],[[12655,12655],\"mapped\",[4573]],[[12656,12656],\"mapped\",[4575]],[[12657,12657],\"mapped\",[4381]],[[12658,12658],\"mapped\",[4382]],[[12659,12659],\"mapped\",[4384]],[[12660,12660],\"mapped\",[4386]],[[12661,12661],\"mapped\",[4387]],[[12662,12662],\"mapped\",[4391]],[[12663,12663],\"mapped\",[4393]],[[12664,12664],\"mapped\",[4395]],[[12665,12665],\"mapped\",[4396]],[[12666,12666],\"mapped\",[4397]],[[12667,12667],\"mapped\",[4398]],[[12668,12668],\"mapped\",[4399]],[[12669,12669],\"mapped\",[4402]],[[12670,12670],\"mapped\",[4406]],[[12671,12671],\"mapped\",[4416]],[[12672,12672],\"mapped\",[4423]],[[12673,12673],\"mapped\",[4428]],[[12674,12674],\"mapped\",[4593]],[[12675,12675],\"mapped\",[4594]],[[12676,12676],\"mapped\",[4439]],[[12677,12677],\"mapped\",[4440]],[[12678,12678],\"mapped\",[4441]],[[12679,12679],\"mapped\",[4484]],[[12680,12680],\"mapped\",[4485]],[[12681,12681],\"mapped\",[4488]],[[12682,12682],\"mapped\",[4497]],[[12683,12683],\"mapped\",[4498]],[[12684,12684],\"mapped\",[4500]],[[12685,12685],\"mapped\",[4510]],[[12686,12686],\"mapped\",[4513]],[[12687,12687],\"disallowed\"],[[12688,12689],\"valid\",[],\"NV8\"],[[12690,12690],\"mapped\",[19968]],[[12691,12691],\"mapped\",[20108]],[[12692,12692],\"mapped\",[19977]],[[12693,12693],\"mapped\",[22235]],[[12694,12694],\"mapped\",[19978]],[[12695,12695],\"mapped\",[20013]],[[12696,12696],\"mapped\",[19979]],[[12697,12697],\"mapped\",[30002]],[[12698,12698],\"mapped\",[20057]],[[12699,12699],\"mapped\",[19993]],[[12700,12700],\"mapped\",[19969]],[[12701,12701],\"mapped\",[22825]],[[12702,12702],\"mapped\",[22320]],[[12703,12703],\"mapped\",[20154]],[[12704,12727],\"valid\"],[[12728,12730],\"valid\"],[[12731,12735],\"disallowed\"],[[12736,12751],\"valid\",[],\"NV8\"],[[12752,12771],\"valid\",[],\"NV8\"],[[12772,12783],\"disallowed\"],[[12784,12799],\"valid\"],[[12800,12800],\"disallowed_STD3_mapped\",[40,4352,41]],[[12801,12801],\"disallowed_STD3_mapped\",[40,4354,41]],[[12802,12802],\"disallowed_STD3_mapped\",[40,4355,41]],[[12803,12803],\"disallowed_STD3_mapped\",[40,4357,41]],[[12804,12804],\"disallowed_STD3_mapped\",[40,4358,41]],[[12805,12805],\"disallowed_STD3_mapped\",[40,4359,41]],[[12806,12806],\"disallowed_STD3_mapped\",[40,4361,41]],[[12807,12807],\"disallowed_STD3_mapped\",[40,4363,41]],[[12808,12808],\"disallowed_STD3_mapped\",[40,4364,41]],[[12809,12809],\"disallowed_STD3_mapped\",[40,4366,41]],[[12810,12810],\"disallowed_STD3_mapped\",[40,4367,41]],[[12811,12811],\"disallowed_STD3_mapped\",[40,4368,41]],[[12812,12812],\"disallowed_STD3_mapped\",[40,4369,41]],[[12813,12813],\"disallowed_STD3_mapped\",[40,4370,41]],[[12814,12814],\"disallowed_STD3_mapped\",[40,44032,41]],[[12815,12815],\"disallowed_STD3_mapped\",[40,45208,41]],[[12816,12816],\"disallowed_STD3_mapped\",[40,45796,41]],[[12817,12817],\"disallowed_STD3_mapped\",[40,46972,41]],[[12818,12818],\"disallowed_STD3_mapped\",[40,47560,41]],[[12819,12819],\"disallowed_STD3_mapped\",[40,48148,41]],[[12820,12820],\"disallowed_STD3_mapped\",[40,49324,41]],[[12821,12821],\"disallowed_STD3_mapped\",[40,50500,41]],[[12822,12822],\"disallowed_STD3_mapped\",[40,51088,41]],[[12823,12823],\"disallowed_STD3_mapped\",[40,52264,41]],[[12824,12824],\"disallowed_STD3_mapped\",[40,52852,41]],[[12825,12825],\"disallowed_STD3_mapped\",[40,53440,41]],[[12826,12826],\"disallowed_STD3_mapped\",[40,54028,41]],[[12827,12827],\"disallowed_STD3_mapped\",[40,54616,41]],[[12828,12828],\"disallowed_STD3_mapped\",[40,51452,41]],[[12829,12829],\"disallowed_STD3_mapped\",[40,50724,51204,41]],[[12830,12830],\"disallowed_STD3_mapped\",[40,50724,54980,41]],[[12831,12831],\"disallowed\"],[[12832,12832],\"disallowed_STD3_mapped\",[40,19968,41]],[[12833,12833],\"disallowed_STD3_mapped\",[40,20108,41]],[[12834,12834],\"disallowed_STD3_mapped\",[40,19977,41]],[[12835,12835],\"disallowed_STD3_mapped\",[40,22235,41]],[[12836,12836],\"disallowed_STD3_mapped\",[40,20116,41]],[[12837,12837],\"disallowed_STD3_mapped\",[40,20845,41]],[[12838,12838],\"disallowed_STD3_mapped\",[40,19971,41]],[[12839,12839],\"disallowed_STD3_mapped\",[40,20843,41]],[[12840,12840],\"disallowed_STD3_mapped\",[40,20061,41]],[[12841,12841],\"disallowed_STD3_mapped\",[40,21313,41]],[[12842,12842],\"disallowed_STD3_mapped\",[40,26376,41]],[[12843,12843],\"disallowed_STD3_mapped\",[40,28779,41]],[[12844,12844],\"disallowed_STD3_mapped\",[40,27700,41]],[[12845,12845],\"disallowed_STD3_mapped\",[40,26408,41]],[[12846,12846],\"disallowed_STD3_mapped\",[40,37329,41]],[[12847,12847],\"disallowed_STD3_mapped\",[40,22303,41]],[[12848,12848],\"disallowed_STD3_mapped\",[40,26085,41]],[[12849,12849],\"disallowed_STD3_mapped\",[40,26666,41]],[[12850,12850],\"disallowed_STD3_mapped\",[40,26377,41]],[[12851,12851],\"disallowed_STD3_mapped\",[40,31038,41]],[[12852,12852],\"disallowed_STD3_mapped\",[40,21517,41]],[[12853,12853],\"disallowed_STD3_mapped\",[40,29305,41]],[[12854,12854],\"disallowed_STD3_mapped\",[40,36001,41]],[[12855,12855],\"disallowed_STD3_mapped\",[40,31069,41]],[[12856,12856],\"disallowed_STD3_mapped\",[40,21172,41]],[[12857,12857],\"disallowed_STD3_mapped\",[40,20195,41]],[[12858,12858],\"disallowed_STD3_mapped\",[40,21628,41]],[[12859,12859],\"disallowed_STD3_mapped\",[40,23398,41]],[[12860,12860],\"disallowed_STD3_mapped\",[40,30435,41]],[[12861,12861],\"disallowed_STD3_mapped\",[40,20225,41]],[[12862,12862],\"disallowed_STD3_mapped\",[40,36039,41]],[[12863,12863],\"disallowed_STD3_mapped\",[40,21332,41]],[[12864,12864],\"disallowed_STD3_mapped\",[40,31085,41]],[[12865,12865],\"disallowed_STD3_mapped\",[40,20241,41]],[[12866,12866],\"disallowed_STD3_mapped\",[40,33258,41]],[[12867,12867],\"disallowed_STD3_mapped\",[40,33267,41]],[[12868,12868],\"mapped\",[21839]],[[12869,12869],\"mapped\",[24188]],[[12870,12870],\"mapped\",[25991]],[[12871,12871],\"mapped\",[31631]],[[12872,12879],\"valid\",[],\"NV8\"],[[12880,12880],\"mapped\",[112,116,101]],[[12881,12881],\"mapped\",[50,49]],[[12882,12882],\"mapped\",[50,50]],[[12883,12883],\"mapped\",[50,51]],[[12884,12884],\"mapped\",[50,52]],[[12885,12885],\"mapped\",[50,53]],[[12886,12886],\"mapped\",[50,54]],[[12887,12887],\"mapped\",[50,55]],[[12888,12888],\"mapped\",[50,56]],[[12889,12889],\"mapped\",[50,57]],[[12890,12890],\"mapped\",[51,48]],[[12891,12891],\"mapped\",[51,49]],[[12892,12892],\"mapped\",[51,50]],[[12893,12893],\"mapped\",[51,51]],[[12894,12894],\"mapped\",[51,52]],[[12895,12895],\"mapped\",[51,53]],[[12896,12896],\"mapped\",[4352]],[[12897,12897],\"mapped\",[4354]],[[12898,12898],\"mapped\",[4355]],[[12899,12899],\"mapped\",[4357]],[[12900,12900],\"mapped\",[4358]],[[12901,12901],\"mapped\",[4359]],[[12902,12902],\"mapped\",[4361]],[[12903,12903],\"mapped\",[4363]],[[12904,12904],\"mapped\",[4364]],[[12905,12905],\"mapped\",[4366]],[[12906,12906],\"mapped\",[4367]],[[12907,12907],\"mapped\",[4368]],[[12908,12908],\"mapped\",[4369]],[[12909,12909],\"mapped\",[4370]],[[12910,12910],\"mapped\",[44032]],[[12911,12911],\"mapped\",[45208]],[[12912,12912],\"mapped\",[45796]],[[12913,12913],\"mapped\",[46972]],[[12914,12914],\"mapped\",[47560]],[[12915,12915],\"mapped\",[48148]],[[12916,12916],\"mapped\",[49324]],[[12917,12917],\"mapped\",[50500]],[[12918,12918],\"mapped\",[51088]],[[12919,12919],\"mapped\",[52264]],[[12920,12920],\"mapped\",[52852]],[[12921,12921],\"mapped\",[53440]],[[12922,12922],\"mapped\",[54028]],[[12923,12923],\"mapped\",[54616]],[[12924,12924],\"mapped\",[52280,44256]],[[12925,12925],\"mapped\",[51452,51032]],[[12926,12926],\"mapped\",[50864]],[[12927,12927],\"valid\",[],\"NV8\"],[[12928,12928],\"mapped\",[19968]],[[12929,12929],\"mapped\",[20108]],[[12930,12930],\"mapped\",[19977]],[[12931,12931],\"mapped\",[22235]],[[12932,12932],\"mapped\",[20116]],[[12933,12933],\"mapped\",[20845]],[[12934,12934],\"mapped\",[19971]],[[12935,12935],\"mapped\",[20843]],[[12936,12936],\"mapped\",[20061]],[[12937,12937],\"mapped\",[21313]],[[12938,12938],\"mapped\",[26376]],[[12939,12939],\"mapped\",[28779]],[[12940,12940],\"mapped\",[27700]],[[12941,12941],\"mapped\",[26408]],[[12942,12942],\"mapped\",[37329]],[[12943,12943],\"mapped\",[22303]],[[12944,12944],\"mapped\",[26085]],[[12945,12945],\"mapped\",[26666]],[[12946,12946],\"mapped\",[26377]],[[12947,12947],\"mapped\",[31038]],[[12948,12948],\"mapped\",[21517]],[[12949,12949],\"mapped\",[29305]],[[12950,12950],\"mapped\",[36001]],[[12951,12951],\"mapped\",[31069]],[[12952,12952],\"mapped\",[21172]],[[12953,12953],\"mapped\",[31192]],[[12954,12954],\"mapped\",[30007]],[[12955,12955],\"mapped\",[22899]],[[12956,12956],\"mapped\",[36969]],[[12957,12957],\"mapped\",[20778]],[[12958,12958],\"mapped\",[21360]],[[12959,12959],\"mapped\",[27880]],[[12960,12960],\"mapped\",[38917]],[[12961,12961],\"mapped\",[20241]],[[12962,12962],\"mapped\",[20889]],[[12963,12963],\"mapped\",[27491]],[[12964,12964],\"mapped\",[19978]],[[12965,12965],\"mapped\",[20013]],[[12966,12966],\"mapped\",[19979]],[[12967,12967],\"mapped\",[24038]],[[12968,12968],\"mapped\",[21491]],[[12969,12969],\"mapped\",[21307]],[[12970,12970],\"mapped\",[23447]],[[12971,12971],\"mapped\",[23398]],[[12972,12972],\"mapped\",[30435]],[[12973,12973],\"mapped\",[20225]],[[12974,12974],\"mapped\",[36039]],[[12975,12975],\"mapped\",[21332]],[[12976,12976],\"mapped\",[22812]],[[12977,12977],\"mapped\",[51,54]],[[12978,12978],\"mapped\",[51,55]],[[12979,12979],\"mapped\",[51,56]],[[12980,12980],\"mapped\",[51,57]],[[12981,12981],\"mapped\",[52,48]],[[12982,12982],\"mapped\",[52,49]],[[12983,12983],\"mapped\",[52,50]],[[12984,12984],\"mapped\",[52,51]],[[12985,12985],\"mapped\",[52,52]],[[12986,12986],\"mapped\",[52,53]],[[12987,12987],\"mapped\",[52,54]],[[12988,12988],\"mapped\",[52,55]],[[12989,12989],\"mapped\",[52,56]],[[12990,12990],\"mapped\",[52,57]],[[12991,12991],\"mapped\",[53,48]],[[12992,12992],\"mapped\",[49,26376]],[[12993,12993],\"mapped\",[50,26376]],[[12994,12994],\"mapped\",[51,26376]],[[12995,12995],\"mapped\",[52,26376]],[[12996,12996],\"mapped\",[53,26376]],[[12997,12997],\"mapped\",[54,26376]],[[12998,12998],\"mapped\",[55,26376]],[[12999,12999],\"mapped\",[56,26376]],[[13000,13000],\"mapped\",[57,26376]],[[13001,13001],\"mapped\",[49,48,26376]],[[13002,13002],\"mapped\",[49,49,26376]],[[13003,13003],\"mapped\",[49,50,26376]],[[13004,13004],\"mapped\",[104,103]],[[13005,13005],\"mapped\",[101,114,103]],[[13006,13006],\"mapped\",[101,118]],[[13007,13007],\"mapped\",[108,116,100]],[[13008,13008],\"mapped\",[12450]],[[13009,13009],\"mapped\",[12452]],[[13010,13010],\"mapped\",[12454]],[[13011,13011],\"mapped\",[12456]],[[13012,13012],\"mapped\",[12458]],[[13013,13013],\"mapped\",[12459]],[[13014,13014],\"mapped\",[12461]],[[13015,13015],\"mapped\",[12463]],[[13016,13016],\"mapped\",[12465]],[[13017,13017],\"mapped\",[12467]],[[13018,13018],\"mapped\",[12469]],[[13019,13019],\"mapped\",[12471]],[[13020,13020],\"mapped\",[12473]],[[13021,13021],\"mapped\",[12475]],[[13022,13022],\"mapped\",[12477]],[[13023,13023],\"mapped\",[12479]],[[13024,13024],\"mapped\",[12481]],[[13025,13025],\"mapped\",[12484]],[[13026,13026],\"mapped\",[12486]],[[13027,13027],\"mapped\",[12488]],[[13028,13028],\"mapped\",[12490]],[[13029,13029],\"mapped\",[12491]],[[13030,13030],\"mapped\",[12492]],[[13031,13031],\"mapped\",[12493]],[[13032,13032],\"mapped\",[12494]],[[13033,13033],\"mapped\",[12495]],[[13034,13034],\"mapped\",[12498]],[[13035,13035],\"mapped\",[12501]],[[13036,13036],\"mapped\",[12504]],[[13037,13037],\"mapped\",[12507]],[[13038,13038],\"mapped\",[12510]],[[13039,13039],\"mapped\",[12511]],[[13040,13040],\"mapped\",[12512]],[[13041,13041],\"mapped\",[12513]],[[13042,13042],\"mapped\",[12514]],[[13043,13043],\"mapped\",[12516]],[[13044,13044],\"mapped\",[12518]],[[13045,13045],\"mapped\",[12520]],[[13046,13046],\"mapped\",[12521]],[[13047,13047],\"mapped\",[12522]],[[13048,13048],\"mapped\",[12523]],[[13049,13049],\"mapped\",[12524]],[[13050,13050],\"mapped\",[12525]],[[13051,13051],\"mapped\",[12527]],[[13052,13052],\"mapped\",[12528]],[[13053,13053],\"mapped\",[12529]],[[13054,13054],\"mapped\",[12530]],[[13055,13055],\"disallowed\"],[[13056,13056],\"mapped\",[12450,12497,12540,12488]],[[13057,13057],\"mapped\",[12450,12523,12501,12449]],[[13058,13058],\"mapped\",[12450,12531,12506,12450]],[[13059,13059],\"mapped\",[12450,12540,12523]],[[13060,13060],\"mapped\",[12452,12491,12531,12464]],[[13061,13061],\"mapped\",[12452,12531,12481]],[[13062,13062],\"mapped\",[12454,12457,12531]],[[13063,13063],\"mapped\",[12456,12473,12463,12540,12489]],[[13064,13064],\"mapped\",[12456,12540,12459,12540]],[[13065,13065],\"mapped\",[12458,12531,12473]],[[13066,13066],\"mapped\",[12458,12540,12512]],[[13067,13067],\"mapped\",[12459,12452,12522]],[[13068,13068],\"mapped\",[12459,12521,12483,12488]],[[13069,13069],\"mapped\",[12459,12525,12522,12540]],[[13070,13070],\"mapped\",[12460,12525,12531]],[[13071,13071],\"mapped\",[12460,12531,12510]],[[13072,13072],\"mapped\",[12462,12460]],[[13073,13073],\"mapped\",[12462,12491,12540]],[[13074,13074],\"mapped\",[12461,12517,12522,12540]],[[13075,13075],\"mapped\",[12462,12523,12480,12540]],[[13076,13076],\"mapped\",[12461,12525]],[[13077,13077],\"mapped\",[12461,12525,12464,12521,12512]],[[13078,13078],\"mapped\",[12461,12525,12513,12540,12488,12523]],[[13079,13079],\"mapped\",[12461,12525,12527,12483,12488]],[[13080,13080],\"mapped\",[12464,12521,12512]],[[13081,13081],\"mapped\",[12464,12521,12512,12488,12531]],[[13082,13082],\"mapped\",[12463,12523,12476,12452,12525]],[[13083,13083],\"mapped\",[12463,12525,12540,12493]],[[13084,13084],\"mapped\",[12465,12540,12473]],[[13085,13085],\"mapped\",[12467,12523,12490]],[[13086,13086],\"mapped\",[12467,12540,12509]],[[13087,13087],\"mapped\",[12469,12452,12463,12523]],[[13088,13088],\"mapped\",[12469,12531,12481,12540,12512]],[[13089,13089],\"mapped\",[12471,12522,12531,12464]],[[13090,13090],\"mapped\",[12475,12531,12481]],[[13091,13091],\"mapped\",[12475,12531,12488]],[[13092,13092],\"mapped\",[12480,12540,12473]],[[13093,13093],\"mapped\",[12487,12471]],[[13094,13094],\"mapped\",[12489,12523]],[[13095,13095],\"mapped\",[12488,12531]],[[13096,13096],\"mapped\",[12490,12494]],[[13097,13097],\"mapped\",[12494,12483,12488]],[[13098,13098],\"mapped\",[12495,12452,12484]],[[13099,13099],\"mapped\",[12497,12540,12475,12531,12488]],[[13100,13100],\"mapped\",[12497,12540,12484]],[[13101,13101],\"mapped\",[12496,12540,12524,12523]],[[13102,13102],\"mapped\",[12500,12450,12473,12488,12523]],[[13103,13103],\"mapped\",[12500,12463,12523]],[[13104,13104],\"mapped\",[12500,12467]],[[13105,13105],\"mapped\",[12499,12523]],[[13106,13106],\"mapped\",[12501,12449,12521,12483,12489]],[[13107,13107],\"mapped\",[12501,12451,12540,12488]],[[13108,13108],\"mapped\",[12502,12483,12471,12455,12523]],[[13109,13109],\"mapped\",[12501,12521,12531]],[[13110,13110],\"mapped\",[12504,12463,12479,12540,12523]],[[13111,13111],\"mapped\",[12506,12477]],[[13112,13112],\"mapped\",[12506,12491,12498]],[[13113,13113],\"mapped\",[12504,12523,12484]],[[13114,13114],\"mapped\",[12506,12531,12473]],[[13115,13115],\"mapped\",[12506,12540,12472]],[[13116,13116],\"mapped\",[12505,12540,12479]],[[13117,13117],\"mapped\",[12509,12452,12531,12488]],[[13118,13118],\"mapped\",[12508,12523,12488]],[[13119,13119],\"mapped\",[12507,12531]],[[13120,13120],\"mapped\",[12509,12531,12489]],[[13121,13121],\"mapped\",[12507,12540,12523]],[[13122,13122],\"mapped\",[12507,12540,12531]],[[13123,13123],\"mapped\",[12510,12452,12463,12525]],[[13124,13124],\"mapped\",[12510,12452,12523]],[[13125,13125],\"mapped\",[12510,12483,12495]],[[13126,13126],\"mapped\",[12510,12523,12463]],[[13127,13127],\"mapped\",[12510,12531,12471,12519,12531]],[[13128,13128],\"mapped\",[12511,12463,12525,12531]],[[13129,13129],\"mapped\",[12511,12522]],[[13130,13130],\"mapped\",[12511,12522,12496,12540,12523]],[[13131,13131],\"mapped\",[12513,12460]],[[13132,13132],\"mapped\",[12513,12460,12488,12531]],[[13133,13133],\"mapped\",[12513,12540,12488,12523]],[[13134,13134],\"mapped\",[12516,12540,12489]],[[13135,13135],\"mapped\",[12516,12540,12523]],[[13136,13136],\"mapped\",[12518,12450,12531]],[[13137,13137],\"mapped\",[12522,12483,12488,12523]],[[13138,13138],\"mapped\",[12522,12521]],[[13139,13139],\"mapped\",[12523,12500,12540]],[[13140,13140],\"mapped\",[12523,12540,12502,12523]],[[13141,13141],\"mapped\",[12524,12512]],[[13142,13142],\"mapped\",[12524,12531,12488,12466,12531]],[[13143,13143],\"mapped\",[12527,12483,12488]],[[13144,13144],\"mapped\",[48,28857]],[[13145,13145],\"mapped\",[49,28857]],[[13146,13146],\"mapped\",[50,28857]],[[13147,13147],\"mapped\",[51,28857]],[[13148,13148],\"mapped\",[52,28857]],[[13149,13149],\"mapped\",[53,28857]],[[13150,13150],\"mapped\",[54,28857]],[[13151,13151],\"mapped\",[55,28857]],[[13152,13152],\"mapped\",[56,28857]],[[13153,13153],\"mapped\",[57,28857]],[[13154,13154],\"mapped\",[49,48,28857]],[[13155,13155],\"mapped\",[49,49,28857]],[[13156,13156],\"mapped\",[49,50,28857]],[[13157,13157],\"mapped\",[49,51,28857]],[[13158,13158],\"mapped\",[49,52,28857]],[[13159,13159],\"mapped\",[49,53,28857]],[[13160,13160],\"mapped\",[49,54,28857]],[[13161,13161],\"mapped\",[49,55,28857]],[[13162,13162],\"mapped\",[49,56,28857]],[[13163,13163],\"mapped\",[49,57,28857]],[[13164,13164],\"mapped\",[50,48,28857]],[[13165,13165],\"mapped\",[50,49,28857]],[[13166,13166],\"mapped\",[50,50,28857]],[[13167,13167],\"mapped\",[50,51,28857]],[[13168,13168],\"mapped\",[50,52,28857]],[[13169,13169],\"mapped\",[104,112,97]],[[13170,13170],\"mapped\",[100,97]],[[13171,13171],\"mapped\",[97,117]],[[13172,13172],\"mapped\",[98,97,114]],[[13173,13173],\"mapped\",[111,118]],[[13174,13174],\"mapped\",[112,99]],[[13175,13175],\"mapped\",[100,109]],[[13176,13176],\"mapped\",[100,109,50]],[[13177,13177],\"mapped\",[100,109,51]],[[13178,13178],\"mapped\",[105,117]],[[13179,13179],\"mapped\",[24179,25104]],[[13180,13180],\"mapped\",[26157,21644]],[[13181,13181],\"mapped\",[22823,27491]],[[13182,13182],\"mapped\",[26126,27835]],[[13183,13183],\"mapped\",[26666,24335,20250,31038]],[[13184,13184],\"mapped\",[112,97]],[[13185,13185],\"mapped\",[110,97]],[[13186,13186],\"mapped\",[956,97]],[[13187,13187],\"mapped\",[109,97]],[[13188,13188],\"mapped\",[107,97]],[[13189,13189],\"mapped\",[107,98]],[[13190,13190],\"mapped\",[109,98]],[[13191,13191],\"mapped\",[103,98]],[[13192,13192],\"mapped\",[99,97,108]],[[13193,13193],\"mapped\",[107,99,97,108]],[[13194,13194],\"mapped\",[112,102]],[[13195,13195],\"mapped\",[110,102]],[[13196,13196],\"mapped\",[956,102]],[[13197,13197],\"mapped\",[956,103]],[[13198,13198],\"mapped\",[109,103]],[[13199,13199],\"mapped\",[107,103]],[[13200,13200],\"mapped\",[104,122]],[[13201,13201],\"mapped\",[107,104,122]],[[13202,13202],\"mapped\",[109,104,122]],[[13203,13203],\"mapped\",[103,104,122]],[[13204,13204],\"mapped\",[116,104,122]],[[13205,13205],\"mapped\",[956,108]],[[13206,13206],\"mapped\",[109,108]],[[13207,13207],\"mapped\",[100,108]],[[13208,13208],\"mapped\",[107,108]],[[13209,13209],\"mapped\",[102,109]],[[13210,13210],\"mapped\",[110,109]],[[13211,13211],\"mapped\",[956,109]],[[13212,13212],\"mapped\",[109,109]],[[13213,13213],\"mapped\",[99,109]],[[13214,13214],\"mapped\",[107,109]],[[13215,13215],\"mapped\",[109,109,50]],[[13216,13216],\"mapped\",[99,109,50]],[[13217,13217],\"mapped\",[109,50]],[[13218,13218],\"mapped\",[107,109,50]],[[13219,13219],\"mapped\",[109,109,51]],[[13220,13220],\"mapped\",[99,109,51]],[[13221,13221],\"mapped\",[109,51]],[[13222,13222],\"mapped\",[107,109,51]],[[13223,13223],\"mapped\",[109,8725,115]],[[13224,13224],\"mapped\",[109,8725,115,50]],[[13225,13225],\"mapped\",[112,97]],[[13226,13226],\"mapped\",[107,112,97]],[[13227,13227],\"mapped\",[109,112,97]],[[13228,13228],\"mapped\",[103,112,97]],[[13229,13229],\"mapped\",[114,97,100]],[[13230,13230],\"mapped\",[114,97,100,8725,115]],[[13231,13231],\"mapped\",[114,97,100,8725,115,50]],[[13232,13232],\"mapped\",[112,115]],[[13233,13233],\"mapped\",[110,115]],[[13234,13234],\"mapped\",[956,115]],[[13235,13235],\"mapped\",[109,115]],[[13236,13236],\"mapped\",[112,118]],[[13237,13237],\"mapped\",[110,118]],[[13238,13238],\"mapped\",[956,118]],[[13239,13239],\"mapped\",[109,118]],[[13240,13240],\"mapped\",[107,118]],[[13241,13241],\"mapped\",[109,118]],[[13242,13242],\"mapped\",[112,119]],[[13243,13243],\"mapped\",[110,119]],[[13244,13244],\"mapped\",[956,119]],[[13245,13245],\"mapped\",[109,119]],[[13246,13246],\"mapped\",[107,119]],[[13247,13247],\"mapped\",[109,119]],[[13248,13248],\"mapped\",[107,969]],[[13249,13249],\"mapped\",[109,969]],[[13250,13250],\"disallowed\"],[[13251,13251],\"mapped\",[98,113]],[[13252,13252],\"mapped\",[99,99]],[[13253,13253],\"mapped\",[99,100]],[[13254,13254],\"mapped\",[99,8725,107,103]],[[13255,13255],\"disallowed\"],[[13256,13256],\"mapped\",[100,98]],[[13257,13257],\"mapped\",[103,121]],[[13258,13258],\"mapped\",[104,97]],[[13259,13259],\"mapped\",[104,112]],[[13260,13260],\"mapped\",[105,110]],[[13261,13261],\"mapped\",[107,107]],[[13262,13262],\"mapped\",[107,109]],[[13263,13263],\"mapped\",[107,116]],[[13264,13264],\"mapped\",[108,109]],[[13265,13265],\"mapped\",[108,110]],[[13266,13266],\"mapped\",[108,111,103]],[[13267,13267],\"mapped\",[108,120]],[[13268,13268],\"mapped\",[109,98]],[[13269,13269],\"mapped\",[109,105,108]],[[13270,13270],\"mapped\",[109,111,108]],[[13271,13271],\"mapped\",[112,104]],[[13272,13272],\"disallowed\"],[[13273,13273],\"mapped\",[112,112,109]],[[13274,13274],\"mapped\",[112,114]],[[13275,13275],\"mapped\",[115,114]],[[13276,13276],\"mapped\",[115,118]],[[13277,13277],\"mapped\",[119,98]],[[13278,13278],\"mapped\",[118,8725,109]],[[13279,13279],\"mapped\",[97,8725,109]],[[13280,13280],\"mapped\",[49,26085]],[[13281,13281],\"mapped\",[50,26085]],[[13282,13282],\"mapped\",[51,26085]],[[13283,13283],\"mapped\",[52,26085]],[[13284,13284],\"mapped\",[53,26085]],[[13285,13285],\"mapped\",[54,26085]],[[13286,13286],\"mapped\",[55,26085]],[[13287,13287],\"mapped\",[56,26085]],[[13288,13288],\"mapped\",[57,26085]],[[13289,13289],\"mapped\",[49,48,26085]],[[13290,13290],\"mapped\",[49,49,26085]],[[13291,13291],\"mapped\",[49,50,26085]],[[13292,13292],\"mapped\",[49,51,26085]],[[13293,13293],\"mapped\",[49,52,26085]],[[13294,13294],\"mapped\",[49,53,26085]],[[13295,13295],\"mapped\",[49,54,26085]],[[13296,13296],\"mapped\",[49,55,26085]],[[13297,13297],\"mapped\",[49,56,26085]],[[13298,13298],\"mapped\",[49,57,26085]],[[13299,13299],\"mapped\",[50,48,26085]],[[13300,13300],\"mapped\",[50,49,26085]],[[13301,13301],\"mapped\",[50,50,26085]],[[13302,13302],\"mapped\",[50,51,26085]],[[13303,13303],\"mapped\",[50,52,26085]],[[13304,13304],\"mapped\",[50,53,26085]],[[13305,13305],\"mapped\",[50,54,26085]],[[13306,13306],\"mapped\",[50,55,26085]],[[13307,13307],\"mapped\",[50,56,26085]],[[13308,13308],\"mapped\",[50,57,26085]],[[13309,13309],\"mapped\",[51,48,26085]],[[13310,13310],\"mapped\",[51,49,26085]],[[13311,13311],\"mapped\",[103,97,108]],[[13312,19893],\"valid\"],[[19894,19903],\"disallowed\"],[[19904,19967],\"valid\",[],\"NV8\"],[[19968,40869],\"valid\"],[[40870,40891],\"valid\"],[[40892,40899],\"valid\"],[[40900,40907],\"valid\"],[[40908,40908],\"valid\"],[[40909,40917],\"valid\"],[[40918,40959],\"disallowed\"],[[40960,42124],\"valid\"],[[42125,42127],\"disallowed\"],[[42128,42145],\"valid\",[],\"NV8\"],[[42146,42147],\"valid\",[],\"NV8\"],[[42148,42163],\"valid\",[],\"NV8\"],[[42164,42164],\"valid\",[],\"NV8\"],[[42165,42176],\"valid\",[],\"NV8\"],[[42177,42177],\"valid\",[],\"NV8\"],[[42178,42180],\"valid\",[],\"NV8\"],[[42181,42181],\"valid\",[],\"NV8\"],[[42182,42182],\"valid\",[],\"NV8\"],[[42183,42191],\"disallowed\"],[[42192,42237],\"valid\"],[[42238,42239],\"valid\",[],\"NV8\"],[[42240,42508],\"valid\"],[[42509,42511],\"valid\",[],\"NV8\"],[[42512,42539],\"valid\"],[[42540,42559],\"disallowed\"],[[42560,42560],\"mapped\",[42561]],[[42561,42561],\"valid\"],[[42562,42562],\"mapped\",[42563]],[[42563,42563],\"valid\"],[[42564,42564],\"mapped\",[42565]],[[42565,42565],\"valid\"],[[42566,42566],\"mapped\",[42567]],[[42567,42567],\"valid\"],[[42568,42568],\"mapped\",[42569]],[[42569,42569],\"valid\"],[[42570,42570],\"mapped\",[42571]],[[42571,42571],\"valid\"],[[42572,42572],\"mapped\",[42573]],[[42573,42573],\"valid\"],[[42574,42574],\"mapped\",[42575]],[[42575,42575],\"valid\"],[[42576,42576],\"mapped\",[42577]],[[42577,42577],\"valid\"],[[42578,42578],\"mapped\",[42579]],[[42579,42579],\"valid\"],[[42580,42580],\"mapped\",[42581]],[[42581,42581],\"valid\"],[[42582,42582],\"mapped\",[42583]],[[42583,42583],\"valid\"],[[42584,42584],\"mapped\",[42585]],[[42585,42585],\"valid\"],[[42586,42586],\"mapped\",[42587]],[[42587,42587],\"valid\"],[[42588,42588],\"mapped\",[42589]],[[42589,42589],\"valid\"],[[42590,42590],\"mapped\",[42591]],[[42591,42591],\"valid\"],[[42592,42592],\"mapped\",[42593]],[[42593,42593],\"valid\"],[[42594,42594],\"mapped\",[42595]],[[42595,42595],\"valid\"],[[42596,42596],\"mapped\",[42597]],[[42597,42597],\"valid\"],[[42598,42598],\"mapped\",[42599]],[[42599,42599],\"valid\"],[[42600,42600],\"mapped\",[42601]],[[42601,42601],\"valid\"],[[42602,42602],\"mapped\",[42603]],[[42603,42603],\"valid\"],[[42604,42604],\"mapped\",[42605]],[[42605,42607],\"valid\"],[[42608,42611],\"valid\",[],\"NV8\"],[[42612,42619],\"valid\"],[[42620,42621],\"valid\"],[[42622,42622],\"valid\",[],\"NV8\"],[[42623,42623],\"valid\"],[[42624,42624],\"mapped\",[42625]],[[42625,42625],\"valid\"],[[42626,42626],\"mapped\",[42627]],[[42627,42627],\"valid\"],[[42628,42628],\"mapped\",[42629]],[[42629,42629],\"valid\"],[[42630,42630],\"mapped\",[42631]],[[42631,42631],\"valid\"],[[42632,42632],\"mapped\",[42633]],[[42633,42633],\"valid\"],[[42634,42634],\"mapped\",[42635]],[[42635,42635],\"valid\"],[[42636,42636],\"mapped\",[42637]],[[42637,42637],\"valid\"],[[42638,42638],\"mapped\",[42639]],[[42639,42639],\"valid\"],[[42640,42640],\"mapped\",[42641]],[[42641,42641],\"valid\"],[[42642,42642],\"mapped\",[42643]],[[42643,42643],\"valid\"],[[42644,42644],\"mapped\",[42645]],[[42645,42645],\"valid\"],[[42646,42646],\"mapped\",[42647]],[[42647,42647],\"valid\"],[[42648,42648],\"mapped\",[42649]],[[42649,42649],\"valid\"],[[42650,42650],\"mapped\",[42651]],[[42651,42651],\"valid\"],[[42652,42652],\"mapped\",[1098]],[[42653,42653],\"mapped\",[1100]],[[42654,42654],\"valid\"],[[42655,42655],\"valid\"],[[42656,42725],\"valid\"],[[42726,42735],\"valid\",[],\"NV8\"],[[42736,42737],\"valid\"],[[42738,42743],\"valid\",[],\"NV8\"],[[42744,42751],\"disallowed\"],[[42752,42774],\"valid\",[],\"NV8\"],[[42775,42778],\"valid\"],[[42779,42783],\"valid\"],[[42784,42785],\"valid\",[],\"NV8\"],[[42786,42786],\"mapped\",[42787]],[[42787,42787],\"valid\"],[[42788,42788],\"mapped\",[42789]],[[42789,42789],\"valid\"],[[42790,42790],\"mapped\",[42791]],[[42791,42791],\"valid\"],[[42792,42792],\"mapped\",[42793]],[[42793,42793],\"valid\"],[[42794,42794],\"mapped\",[42795]],[[42795,42795],\"valid\"],[[42796,42796],\"mapped\",[42797]],[[42797,42797],\"valid\"],[[42798,42798],\"mapped\",[42799]],[[42799,42801],\"valid\"],[[42802,42802],\"mapped\",[42803]],[[42803,42803],\"valid\"],[[42804,42804],\"mapped\",[42805]],[[42805,42805],\"valid\"],[[42806,42806],\"mapped\",[42807]],[[42807,42807],\"valid\"],[[42808,42808],\"mapped\",[42809]],[[42809,42809],\"valid\"],[[42810,42810],\"mapped\",[42811]],[[42811,42811],\"valid\"],[[42812,42812],\"mapped\",[42813]],[[42813,42813],\"valid\"],[[42814,42814],\"mapped\",[42815]],[[42815,42815],\"valid\"],[[42816,42816],\"mapped\",[42817]],[[42817,42817],\"valid\"],[[42818,42818],\"mapped\",[42819]],[[42819,42819],\"valid\"],[[42820,42820],\"mapped\",[42821]],[[42821,42821],\"valid\"],[[42822,42822],\"mapped\",[42823]],[[42823,42823],\"valid\"],[[42824,42824],\"mapped\",[42825]],[[42825,42825],\"valid\"],[[42826,42826],\"mapped\",[42827]],[[42827,42827],\"valid\"],[[42828,42828],\"mapped\",[42829]],[[42829,42829],\"valid\"],[[42830,42830],\"mapped\",[42831]],[[42831,42831],\"valid\"],[[42832,42832],\"mapped\",[42833]],[[42833,42833],\"valid\"],[[42834,42834],\"mapped\",[42835]],[[42835,42835],\"valid\"],[[42836,42836],\"mapped\",[42837]],[[42837,42837],\"valid\"],[[42838,42838],\"mapped\",[42839]],[[42839,42839],\"valid\"],[[42840,42840],\"mapped\",[42841]],[[42841,42841],\"valid\"],[[42842,42842],\"mapped\",[42843]],[[42843,42843],\"valid\"],[[42844,42844],\"mapped\",[42845]],[[42845,42845],\"valid\"],[[42846,42846],\"mapped\",[42847]],[[42847,42847],\"valid\"],[[42848,42848],\"mapped\",[42849]],[[42849,42849],\"valid\"],[[42850,42850],\"mapped\",[42851]],[[42851,42851],\"valid\"],[[42852,42852],\"mapped\",[42853]],[[42853,42853],\"valid\"],[[42854,42854],\"mapped\",[42855]],[[42855,42855],\"valid\"],[[42856,42856],\"mapped\",[42857]],[[42857,42857],\"valid\"],[[42858,42858],\"mapped\",[42859]],[[42859,42859],\"valid\"],[[42860,42860],\"mapped\",[42861]],[[42861,42861],\"valid\"],[[42862,42862],\"mapped\",[42863]],[[42863,42863],\"valid\"],[[42864,42864],\"mapped\",[42863]],[[42865,42872],\"valid\"],[[42873,42873],\"mapped\",[42874]],[[42874,42874],\"valid\"],[[42875,42875],\"mapped\",[42876]],[[42876,42876],\"valid\"],[[42877,42877],\"mapped\",[7545]],[[42878,42878],\"mapped\",[42879]],[[42879,42879],\"valid\"],[[42880,42880],\"mapped\",[42881]],[[42881,42881],\"valid\"],[[42882,42882],\"mapped\",[42883]],[[42883,42883],\"valid\"],[[42884,42884],\"mapped\",[42885]],[[42885,42885],\"valid\"],[[42886,42886],\"mapped\",[42887]],[[42887,42888],\"valid\"],[[42889,42890],\"valid\",[],\"NV8\"],[[42891,42891],\"mapped\",[42892]],[[42892,42892],\"valid\"],[[42893,42893],\"mapped\",[613]],[[42894,42894],\"valid\"],[[42895,42895],\"valid\"],[[42896,42896],\"mapped\",[42897]],[[42897,42897],\"valid\"],[[42898,42898],\"mapped\",[42899]],[[42899,42899],\"valid\"],[[42900,42901],\"valid\"],[[42902,42902],\"mapped\",[42903]],[[42903,42903],\"valid\"],[[42904,42904],\"mapped\",[42905]],[[42905,42905],\"valid\"],[[42906,42906],\"mapped\",[42907]],[[42907,42907],\"valid\"],[[42908,42908],\"mapped\",[42909]],[[42909,42909],\"valid\"],[[42910,42910],\"mapped\",[42911]],[[42911,42911],\"valid\"],[[42912,42912],\"mapped\",[42913]],[[42913,42913],\"valid\"],[[42914,42914],\"mapped\",[42915]],[[42915,42915],\"valid\"],[[42916,42916],\"mapped\",[42917]],[[42917,42917],\"valid\"],[[42918,42918],\"mapped\",[42919]],[[42919,42919],\"valid\"],[[42920,42920],\"mapped\",[42921]],[[42921,42921],\"valid\"],[[42922,42922],\"mapped\",[614]],[[42923,42923],\"mapped\",[604]],[[42924,42924],\"mapped\",[609]],[[42925,42925],\"mapped\",[620]],[[42926,42927],\"disallowed\"],[[42928,42928],\"mapped\",[670]],[[42929,42929],\"mapped\",[647]],[[42930,42930],\"mapped\",[669]],[[42931,42931],\"mapped\",[43859]],[[42932,42932],\"mapped\",[42933]],[[42933,42933],\"valid\"],[[42934,42934],\"mapped\",[42935]],[[42935,42935],\"valid\"],[[42936,42998],\"disallowed\"],[[42999,42999],\"valid\"],[[43000,43000],\"mapped\",[295]],[[43001,43001],\"mapped\",[339]],[[43002,43002],\"valid\"],[[43003,43007],\"valid\"],[[43008,43047],\"valid\"],[[43048,43051],\"valid\",[],\"NV8\"],[[43052,43055],\"disallowed\"],[[43056,43065],\"valid\",[],\"NV8\"],[[43066,43071],\"disallowed\"],[[43072,43123],\"valid\"],[[43124,43127],\"valid\",[],\"NV8\"],[[43128,43135],\"disallowed\"],[[43136,43204],\"valid\"],[[43205,43213],\"disallowed\"],[[43214,43215],\"valid\",[],\"NV8\"],[[43216,43225],\"valid\"],[[43226,43231],\"disallowed\"],[[43232,43255],\"valid\"],[[43256,43258],\"valid\",[],\"NV8\"],[[43259,43259],\"valid\"],[[43260,43260],\"valid\",[],\"NV8\"],[[43261,43261],\"valid\"],[[43262,43263],\"disallowed\"],[[43264,43309],\"valid\"],[[43310,43311],\"valid\",[],\"NV8\"],[[43312,43347],\"valid\"],[[43348,43358],\"disallowed\"],[[43359,43359],\"valid\",[],\"NV8\"],[[43360,43388],\"valid\",[],\"NV8\"],[[43389,43391],\"disallowed\"],[[43392,43456],\"valid\"],[[43457,43469],\"valid\",[],\"NV8\"],[[43470,43470],\"disallowed\"],[[43471,43481],\"valid\"],[[43482,43485],\"disallowed\"],[[43486,43487],\"valid\",[],\"NV8\"],[[43488,43518],\"valid\"],[[43519,43519],\"disallowed\"],[[43520,43574],\"valid\"],[[43575,43583],\"disallowed\"],[[43584,43597],\"valid\"],[[43598,43599],\"disallowed\"],[[43600,43609],\"valid\"],[[43610,43611],\"disallowed\"],[[43612,43615],\"valid\",[],\"NV8\"],[[43616,43638],\"valid\"],[[43639,43641],\"valid\",[],\"NV8\"],[[43642,43643],\"valid\"],[[43644,43647],\"valid\"],[[43648,43714],\"valid\"],[[43715,43738],\"disallowed\"],[[43739,43741],\"valid\"],[[43742,43743],\"valid\",[],\"NV8\"],[[43744,43759],\"valid\"],[[43760,43761],\"valid\",[],\"NV8\"],[[43762,43766],\"valid\"],[[43767,43776],\"disallowed\"],[[43777,43782],\"valid\"],[[43783,43784],\"disallowed\"],[[43785,43790],\"valid\"],[[43791,43792],\"disallowed\"],[[43793,43798],\"valid\"],[[43799,43807],\"disallowed\"],[[43808,43814],\"valid\"],[[43815,43815],\"disallowed\"],[[43816,43822],\"valid\"],[[43823,43823],\"disallowed\"],[[43824,43866],\"valid\"],[[43867,43867],\"valid\",[],\"NV8\"],[[43868,43868],\"mapped\",[42791]],[[43869,43869],\"mapped\",[43831]],[[43870,43870],\"mapped\",[619]],[[43871,43871],\"mapped\",[43858]],[[43872,43875],\"valid\"],[[43876,43877],\"valid\"],[[43878,43887],\"disallowed\"],[[43888,43888],\"mapped\",[5024]],[[43889,43889],\"mapped\",[5025]],[[43890,43890],\"mapped\",[5026]],[[43891,43891],\"mapped\",[5027]],[[43892,43892],\"mapped\",[5028]],[[43893,43893],\"mapped\",[5029]],[[43894,43894],\"mapped\",[5030]],[[43895,43895],\"mapped\",[5031]],[[43896,43896],\"mapped\",[5032]],[[43897,43897],\"mapped\",[5033]],[[43898,43898],\"mapped\",[5034]],[[43899,43899],\"mapped\",[5035]],[[43900,43900],\"mapped\",[5036]],[[43901,43901],\"mapped\",[5037]],[[43902,43902],\"mapped\",[5038]],[[43903,43903],\"mapped\",[5039]],[[43904,43904],\"mapped\",[5040]],[[43905,43905],\"mapped\",[5041]],[[43906,43906],\"mapped\",[5042]],[[43907,43907],\"mapped\",[5043]],[[43908,43908],\"mapped\",[5044]],[[43909,43909],\"mapped\",[5045]],[[43910,43910],\"mapped\",[5046]],[[43911,43911],\"mapped\",[5047]],[[43912,43912],\"mapped\",[5048]],[[43913,43913],\"mapped\",[5049]],[[43914,43914],\"mapped\",[5050]],[[43915,43915],\"mapped\",[5051]],[[43916,43916],\"mapped\",[5052]],[[43917,43917],\"mapped\",[5053]],[[43918,43918],\"mapped\",[5054]],[[43919,43919],\"mapped\",[5055]],[[43920,43920],\"mapped\",[5056]],[[43921,43921],\"mapped\",[5057]],[[43922,43922],\"mapped\",[5058]],[[43923,43923],\"mapped\",[5059]],[[43924,43924],\"mapped\",[5060]],[[43925,43925],\"mapped\",[5061]],[[43926,43926],\"mapped\",[5062]],[[43927,43927],\"mapped\",[5063]],[[43928,43928],\"mapped\",[5064]],[[43929,43929],\"mapped\",[5065]],[[43930,43930],\"mapped\",[5066]],[[43931,43931],\"mapped\",[5067]],[[43932,43932],\"mapped\",[5068]],[[43933,43933],\"mapped\",[5069]],[[43934,43934],\"mapped\",[5070]],[[43935,43935],\"mapped\",[5071]],[[43936,43936],\"mapped\",[5072]],[[43937,43937],\"mapped\",[5073]],[[43938,43938],\"mapped\",[5074]],[[43939,43939],\"mapped\",[5075]],[[43940,43940],\"mapped\",[5076]],[[43941,43941],\"mapped\",[5077]],[[43942,43942],\"mapped\",[5078]],[[43943,43943],\"mapped\",[5079]],[[43944,43944],\"mapped\",[5080]],[[43945,43945],\"mapped\",[5081]],[[43946,43946],\"mapped\",[5082]],[[43947,43947],\"mapped\",[5083]],[[43948,43948],\"mapped\",[5084]],[[43949,43949],\"mapped\",[5085]],[[43950,43950],\"mapped\",[5086]],[[43951,43951],\"mapped\",[5087]],[[43952,43952],\"mapped\",[5088]],[[43953,43953],\"mapped\",[5089]],[[43954,43954],\"mapped\",[5090]],[[43955,43955],\"mapped\",[5091]],[[43956,43956],\"mapped\",[5092]],[[43957,43957],\"mapped\",[5093]],[[43958,43958],\"mapped\",[5094]],[[43959,43959],\"mapped\",[5095]],[[43960,43960],\"mapped\",[5096]],[[43961,43961],\"mapped\",[5097]],[[43962,43962],\"mapped\",[5098]],[[43963,43963],\"mapped\",[5099]],[[43964,43964],\"mapped\",[5100]],[[43965,43965],\"mapped\",[5101]],[[43966,43966],\"mapped\",[5102]],[[43967,43967],\"mapped\",[5103]],[[43968,44010],\"valid\"],[[44011,44011],\"valid\",[],\"NV8\"],[[44012,44013],\"valid\"],[[44014,44015],\"disallowed\"],[[44016,44025],\"valid\"],[[44026,44031],\"disallowed\"],[[44032,55203],\"valid\"],[[55204,55215],\"disallowed\"],[[55216,55238],\"valid\",[],\"NV8\"],[[55239,55242],\"disallowed\"],[[55243,55291],\"valid\",[],\"NV8\"],[[55292,55295],\"disallowed\"],[[55296,57343],\"disallowed\"],[[57344,63743],\"disallowed\"],[[63744,63744],\"mapped\",[35912]],[[63745,63745],\"mapped\",[26356]],[[63746,63746],\"mapped\",[36554]],[[63747,63747],\"mapped\",[36040]],[[63748,63748],\"mapped\",[28369]],[[63749,63749],\"mapped\",[20018]],[[63750,63750],\"mapped\",[21477]],[[63751,63752],\"mapped\",[40860]],[[63753,63753],\"mapped\",[22865]],[[63754,63754],\"mapped\",[37329]],[[63755,63755],\"mapped\",[21895]],[[63756,63756],\"mapped\",[22856]],[[63757,63757],\"mapped\",[25078]],[[63758,63758],\"mapped\",[30313]],[[63759,63759],\"mapped\",[32645]],[[63760,63760],\"mapped\",[34367]],[[63761,63761],\"mapped\",[34746]],[[63762,63762],\"mapped\",[35064]],[[63763,63763],\"mapped\",[37007]],[[63764,63764],\"mapped\",[27138]],[[63765,63765],\"mapped\",[27931]],[[63766,63766],\"mapped\",[28889]],[[63767,63767],\"mapped\",[29662]],[[63768,63768],\"mapped\",[33853]],[[63769,63769],\"mapped\",[37226]],[[63770,63770],\"mapped\",[39409]],[[63771,63771],\"mapped\",[20098]],[[63772,63772],\"mapped\",[21365]],[[63773,63773],\"mapped\",[27396]],[[63774,63774],\"mapped\",[29211]],[[63775,63775],\"mapped\",[34349]],[[63776,63776],\"mapped\",[40478]],[[63777,63777],\"mapped\",[23888]],[[63778,63778],\"mapped\",[28651]],[[63779,63779],\"mapped\",[34253]],[[63780,63780],\"mapped\",[35172]],[[63781,63781],\"mapped\",[25289]],[[63782,63782],\"mapped\",[33240]],[[63783,63783],\"mapped\",[34847]],[[63784,63784],\"mapped\",[24266]],[[63785,63785],\"mapped\",[26391]],[[63786,63786],\"mapped\",[28010]],[[63787,63787],\"mapped\",[29436]],[[63788,63788],\"mapped\",[37070]],[[63789,63789],\"mapped\",[20358]],[[63790,63790],\"mapped\",[20919]],[[63791,63791],\"mapped\",[21214]],[[63792,63792],\"mapped\",[25796]],[[63793,63793],\"mapped\",[27347]],[[63794,63794],\"mapped\",[29200]],[[63795,63795],\"mapped\",[30439]],[[63796,63796],\"mapped\",[32769]],[[63797,63797],\"mapped\",[34310]],[[63798,63798],\"mapped\",[34396]],[[63799,63799],\"mapped\",[36335]],[[63800,63800],\"mapped\",[38706]],[[63801,63801],\"mapped\",[39791]],[[63802,63802],\"mapped\",[40442]],[[63803,63803],\"mapped\",[30860]],[[63804,63804],\"mapped\",[31103]],[[63805,63805],\"mapped\",[32160]],[[63806,63806],\"mapped\",[33737]],[[63807,63807],\"mapped\",[37636]],[[63808,63808],\"mapped\",[40575]],[[63809,63809],\"mapped\",[35542]],[[63810,63810],\"mapped\",[22751]],[[63811,63811],\"mapped\",[24324]],[[63812,63812],\"mapped\",[31840]],[[63813,63813],\"mapped\",[32894]],[[63814,63814],\"mapped\",[29282]],[[63815,63815],\"mapped\",[30922]],[[63816,63816],\"mapped\",[36034]],[[63817,63817],\"mapped\",[38647]],[[63818,63818],\"mapped\",[22744]],[[63819,63819],\"mapped\",[23650]],[[63820,63820],\"mapped\",[27155]],[[63821,63821],\"mapped\",[28122]],[[63822,63822],\"mapped\",[28431]],[[63823,63823],\"mapped\",[32047]],[[63824,63824],\"mapped\",[32311]],[[63825,63825],\"mapped\",[38475]],[[63826,63826],\"mapped\",[21202]],[[63827,63827],\"mapped\",[32907]],[[63828,63828],\"mapped\",[20956]],[[63829,63829],\"mapped\",[20940]],[[63830,63830],\"mapped\",[31260]],[[63831,63831],\"mapped\",[32190]],[[63832,63832],\"mapped\",[33777]],[[63833,63833],\"mapped\",[38517]],[[63834,63834],\"mapped\",[35712]],[[63835,63835],\"mapped\",[25295]],[[63836,63836],\"mapped\",[27138]],[[63837,63837],\"mapped\",[35582]],[[63838,63838],\"mapped\",[20025]],[[63839,63839],\"mapped\",[23527]],[[63840,63840],\"mapped\",[24594]],[[63841,63841],\"mapped\",[29575]],[[63842,63842],\"mapped\",[30064]],[[63843,63843],\"mapped\",[21271]],[[63844,63844],\"mapped\",[30971]],[[63845,63845],\"mapped\",[20415]],[[63846,63846],\"mapped\",[24489]],[[63847,63847],\"mapped\",[19981]],[[63848,63848],\"mapped\",[27852]],[[63849,63849],\"mapped\",[25976]],[[63850,63850],\"mapped\",[32034]],[[63851,63851],\"mapped\",[21443]],[[63852,63852],\"mapped\",[22622]],[[63853,63853],\"mapped\",[30465]],[[63854,63854],\"mapped\",[33865]],[[63855,63855],\"mapped\",[35498]],[[63856,63856],\"mapped\",[27578]],[[63857,63857],\"mapped\",[36784]],[[63858,63858],\"mapped\",[27784]],[[63859,63859],\"mapped\",[25342]],[[63860,63860],\"mapped\",[33509]],[[63861,63861],\"mapped\",[25504]],[[63862,63862],\"mapped\",[30053]],[[63863,63863],\"mapped\",[20142]],[[63864,63864],\"mapped\",[20841]],[[63865,63865],\"mapped\",[20937]],[[63866,63866],\"mapped\",[26753]],[[63867,63867],\"mapped\",[31975]],[[63868,63868],\"mapped\",[33391]],[[63869,63869],\"mapped\",[35538]],[[63870,63870],\"mapped\",[37327]],[[63871,63871],\"mapped\",[21237]],[[63872,63872],\"mapped\",[21570]],[[63873,63873],\"mapped\",[22899]],[[63874,63874],\"mapped\",[24300]],[[63875,63875],\"mapped\",[26053]],[[63876,63876],\"mapped\",[28670]],[[63877,63877],\"mapped\",[31018]],[[63878,63878],\"mapped\",[38317]],[[63879,63879],\"mapped\",[39530]],[[63880,63880],\"mapped\",[40599]],[[63881,63881],\"mapped\",[40654]],[[63882,63882],\"mapped\",[21147]],[[63883,63883],\"mapped\",[26310]],[[63884,63884],\"mapped\",[27511]],[[63885,63885],\"mapped\",[36706]],[[63886,63886],\"mapped\",[24180]],[[63887,63887],\"mapped\",[24976]],[[63888,63888],\"mapped\",[25088]],[[63889,63889],\"mapped\",[25754]],[[63890,63890],\"mapped\",[28451]],[[63891,63891],\"mapped\",[29001]],[[63892,63892],\"mapped\",[29833]],[[63893,63893],\"mapped\",[31178]],[[63894,63894],\"mapped\",[32244]],[[63895,63895],\"mapped\",[32879]],[[63896,63896],\"mapped\",[36646]],[[63897,63897],\"mapped\",[34030]],[[63898,63898],\"mapped\",[36899]],[[63899,63899],\"mapped\",[37706]],[[63900,63900],\"mapped\",[21015]],[[63901,63901],\"mapped\",[21155]],[[63902,63902],\"mapped\",[21693]],[[63903,63903],\"mapped\",[28872]],[[63904,63904],\"mapped\",[35010]],[[63905,63905],\"mapped\",[35498]],[[63906,63906],\"mapped\",[24265]],[[63907,63907],\"mapped\",[24565]],[[63908,63908],\"mapped\",[25467]],[[63909,63909],\"mapped\",[27566]],[[63910,63910],\"mapped\",[31806]],[[63911,63911],\"mapped\",[29557]],[[63912,63912],\"mapped\",[20196]],[[63913,63913],\"mapped\",[22265]],[[63914,63914],\"mapped\",[23527]],[[63915,63915],\"mapped\",[23994]],[[63916,63916],\"mapped\",[24604]],[[63917,63917],\"mapped\",[29618]],[[63918,63918],\"mapped\",[29801]],[[63919,63919],\"mapped\",[32666]],[[63920,63920],\"mapped\",[32838]],[[63921,63921],\"mapped\",[37428]],[[63922,63922],\"mapped\",[38646]],[[63923,63923],\"mapped\",[38728]],[[63924,63924],\"mapped\",[38936]],[[63925,63925],\"mapped\",[20363]],[[63926,63926],\"mapped\",[31150]],[[63927,63927],\"mapped\",[37300]],[[63928,63928],\"mapped\",[38584]],[[63929,63929],\"mapped\",[24801]],[[63930,63930],\"mapped\",[20102]],[[63931,63931],\"mapped\",[20698]],[[63932,63932],\"mapped\",[23534]],[[63933,63933],\"mapped\",[23615]],[[63934,63934],\"mapped\",[26009]],[[63935,63935],\"mapped\",[27138]],[[63936,63936],\"mapped\",[29134]],[[63937,63937],\"mapped\",[30274]],[[63938,63938],\"mapped\",[34044]],[[63939,63939],\"mapped\",[36988]],[[63940,63940],\"mapped\",[40845]],[[63941,63941],\"mapped\",[26248]],[[63942,63942],\"mapped\",[38446]],[[63943,63943],\"mapped\",[21129]],[[63944,63944],\"mapped\",[26491]],[[63945,63945],\"mapped\",[26611]],[[63946,63946],\"mapped\",[27969]],[[63947,63947],\"mapped\",[28316]],[[63948,63948],\"mapped\",[29705]],[[63949,63949],\"mapped\",[30041]],[[63950,63950],\"mapped\",[30827]],[[63951,63951],\"mapped\",[32016]],[[63952,63952],\"mapped\",[39006]],[[63953,63953],\"mapped\",[20845]],[[63954,63954],\"mapped\",[25134]],[[63955,63955],\"mapped\",[38520]],[[63956,63956],\"mapped\",[20523]],[[63957,63957],\"mapped\",[23833]],[[63958,63958],\"mapped\",[28138]],[[63959,63959],\"mapped\",[36650]],[[63960,63960],\"mapped\",[24459]],[[63961,63961],\"mapped\",[24900]],[[63962,63962],\"mapped\",[26647]],[[63963,63963],\"mapped\",[29575]],[[63964,63964],\"mapped\",[38534]],[[63965,63965],\"mapped\",[21033]],[[63966,63966],\"mapped\",[21519]],[[63967,63967],\"mapped\",[23653]],[[63968,63968],\"mapped\",[26131]],[[63969,63969],\"mapped\",[26446]],[[63970,63970],\"mapped\",[26792]],[[63971,63971],\"mapped\",[27877]],[[63972,63972],\"mapped\",[29702]],[[63973,63973],\"mapped\",[30178]],[[63974,63974],\"mapped\",[32633]],[[63975,63975],\"mapped\",[35023]],[[63976,63976],\"mapped\",[35041]],[[63977,63977],\"mapped\",[37324]],[[63978,63978],\"mapped\",[38626]],[[63979,63979],\"mapped\",[21311]],[[63980,63980],\"mapped\",[28346]],[[63981,63981],\"mapped\",[21533]],[[63982,63982],\"mapped\",[29136]],[[63983,63983],\"mapped\",[29848]],[[63984,63984],\"mapped\",[34298]],[[63985,63985],\"mapped\",[38563]],[[63986,63986],\"mapped\",[40023]],[[63987,63987],\"mapped\",[40607]],[[63988,63988],\"mapped\",[26519]],[[63989,63989],\"mapped\",[28107]],[[63990,63990],\"mapped\",[33256]],[[63991,63991],\"mapped\",[31435]],[[63992,63992],\"mapped\",[31520]],[[63993,63993],\"mapped\",[31890]],[[63994,63994],\"mapped\",[29376]],[[63995,63995],\"mapped\",[28825]],[[63996,63996],\"mapped\",[35672]],[[63997,63997],\"mapped\",[20160]],[[63998,63998],\"mapped\",[33590]],[[63999,63999],\"mapped\",[21050]],[[64000,64000],\"mapped\",[20999]],[[64001,64001],\"mapped\",[24230]],[[64002,64002],\"mapped\",[25299]],[[64003,64003],\"mapped\",[31958]],[[64004,64004],\"mapped\",[23429]],[[64005,64005],\"mapped\",[27934]],[[64006,64006],\"mapped\",[26292]],[[64007,64007],\"mapped\",[36667]],[[64008,64008],\"mapped\",[34892]],[[64009,64009],\"mapped\",[38477]],[[64010,64010],\"mapped\",[35211]],[[64011,64011],\"mapped\",[24275]],[[64012,64012],\"mapped\",[20800]],[[64013,64013],\"mapped\",[21952]],[[64014,64015],\"valid\"],[[64016,64016],\"mapped\",[22618]],[[64017,64017],\"valid\"],[[64018,64018],\"mapped\",[26228]],[[64019,64020],\"valid\"],[[64021,64021],\"mapped\",[20958]],[[64022,64022],\"mapped\",[29482]],[[64023,64023],\"mapped\",[30410]],[[64024,64024],\"mapped\",[31036]],[[64025,64025],\"mapped\",[31070]],[[64026,64026],\"mapped\",[31077]],[[64027,64027],\"mapped\",[31119]],[[64028,64028],\"mapped\",[38742]],[[64029,64029],\"mapped\",[31934]],[[64030,64030],\"mapped\",[32701]],[[64031,64031],\"valid\"],[[64032,64032],\"mapped\",[34322]],[[64033,64033],\"valid\"],[[64034,64034],\"mapped\",[35576]],[[64035,64036],\"valid\"],[[64037,64037],\"mapped\",[36920]],[[64038,64038],\"mapped\",[37117]],[[64039,64041],\"valid\"],[[64042,64042],\"mapped\",[39151]],[[64043,64043],\"mapped\",[39164]],[[64044,64044],\"mapped\",[39208]],[[64045,64045],\"mapped\",[40372]],[[64046,64046],\"mapped\",[37086]],[[64047,64047],\"mapped\",[38583]],[[64048,64048],\"mapped\",[20398]],[[64049,64049],\"mapped\",[20711]],[[64050,64050],\"mapped\",[20813]],[[64051,64051],\"mapped\",[21193]],[[64052,64052],\"mapped\",[21220]],[[64053,64053],\"mapped\",[21329]],[[64054,64054],\"mapped\",[21917]],[[64055,64055],\"mapped\",[22022]],[[64056,64056],\"mapped\",[22120]],[[64057,64057],\"mapped\",[22592]],[[64058,64058],\"mapped\",[22696]],[[64059,64059],\"mapped\",[23652]],[[64060,64060],\"mapped\",[23662]],[[64061,64061],\"mapped\",[24724]],[[64062,64062],\"mapped\",[24936]],[[64063,64063],\"mapped\",[24974]],[[64064,64064],\"mapped\",[25074]],[[64065,64065],\"mapped\",[25935]],[[64066,64066],\"mapped\",[26082]],[[64067,64067],\"mapped\",[26257]],[[64068,64068],\"mapped\",[26757]],[[64069,64069],\"mapped\",[28023]],[[64070,64070],\"mapped\",[28186]],[[64071,64071],\"mapped\",[28450]],[[64072,64072],\"mapped\",[29038]],[[64073,64073],\"mapped\",[29227]],[[64074,64074],\"mapped\",[29730]],[[64075,64075],\"mapped\",[30865]],[[64076,64076],\"mapped\",[31038]],[[64077,64077],\"mapped\",[31049]],[[64078,64078],\"mapped\",[31048]],[[64079,64079],\"mapped\",[31056]],[[64080,64080],\"mapped\",[31062]],[[64081,64081],\"mapped\",[31069]],[[64082,64082],\"mapped\",[31117]],[[64083,64083],\"mapped\",[31118]],[[64084,64084],\"mapped\",[31296]],[[64085,64085],\"mapped\",[31361]],[[64086,64086],\"mapped\",[31680]],[[64087,64087],\"mapped\",[32244]],[[64088,64088],\"mapped\",[32265]],[[64089,64089],\"mapped\",[32321]],[[64090,64090],\"mapped\",[32626]],[[64091,64091],\"mapped\",[32773]],[[64092,64092],\"mapped\",[33261]],[[64093,64094],\"mapped\",[33401]],[[64095,64095],\"mapped\",[33879]],[[64096,64096],\"mapped\",[35088]],[[64097,64097],\"mapped\",[35222]],[[64098,64098],\"mapped\",[35585]],[[64099,64099],\"mapped\",[35641]],[[64100,64100],\"mapped\",[36051]],[[64101,64101],\"mapped\",[36104]],[[64102,64102],\"mapped\",[36790]],[[64103,64103],\"mapped\",[36920]],[[64104,64104],\"mapped\",[38627]],[[64105,64105],\"mapped\",[38911]],[[64106,64106],\"mapped\",[38971]],[[64107,64107],\"mapped\",[24693]],[[64108,64108],\"mapped\",[148206]],[[64109,64109],\"mapped\",[33304]],[[64110,64111],\"disallowed\"],[[64112,64112],\"mapped\",[20006]],[[64113,64113],\"mapped\",[20917]],[[64114,64114],\"mapped\",[20840]],[[64115,64115],\"mapped\",[20352]],[[64116,64116],\"mapped\",[20805]],[[64117,64117],\"mapped\",[20864]],[[64118,64118],\"mapped\",[21191]],[[64119,64119],\"mapped\",[21242]],[[64120,64120],\"mapped\",[21917]],[[64121,64121],\"mapped\",[21845]],[[64122,64122],\"mapped\",[21913]],[[64123,64123],\"mapped\",[21986]],[[64124,64124],\"mapped\",[22618]],[[64125,64125],\"mapped\",[22707]],[[64126,64126],\"mapped\",[22852]],[[64127,64127],\"mapped\",[22868]],[[64128,64128],\"mapped\",[23138]],[[64129,64129],\"mapped\",[23336]],[[64130,64130],\"mapped\",[24274]],[[64131,64131],\"mapped\",[24281]],[[64132,64132],\"mapped\",[24425]],[[64133,64133],\"mapped\",[24493]],[[64134,64134],\"mapped\",[24792]],[[64135,64135],\"mapped\",[24910]],[[64136,64136],\"mapped\",[24840]],[[64137,64137],\"mapped\",[24974]],[[64138,64138],\"mapped\",[24928]],[[64139,64139],\"mapped\",[25074]],[[64140,64140],\"mapped\",[25140]],[[64141,64141],\"mapped\",[25540]],[[64142,64142],\"mapped\",[25628]],[[64143,64143],\"mapped\",[25682]],[[64144,64144],\"mapped\",[25942]],[[64145,64145],\"mapped\",[26228]],[[64146,64146],\"mapped\",[26391]],[[64147,64147],\"mapped\",[26395]],[[64148,64148],\"mapped\",[26454]],[[64149,64149],\"mapped\",[27513]],[[64150,64150],\"mapped\",[27578]],[[64151,64151],\"mapped\",[27969]],[[64152,64152],\"mapped\",[28379]],[[64153,64153],\"mapped\",[28363]],[[64154,64154],\"mapped\",[28450]],[[64155,64155],\"mapped\",[28702]],[[64156,64156],\"mapped\",[29038]],[[64157,64157],\"mapped\",[30631]],[[64158,64158],\"mapped\",[29237]],[[64159,64159],\"mapped\",[29359]],[[64160,64160],\"mapped\",[29482]],[[64161,64161],\"mapped\",[29809]],[[64162,64162],\"mapped\",[29958]],[[64163,64163],\"mapped\",[30011]],[[64164,64164],\"mapped\",[30237]],[[64165,64165],\"mapped\",[30239]],[[64166,64166],\"mapped\",[30410]],[[64167,64167],\"mapped\",[30427]],[[64168,64168],\"mapped\",[30452]],[[64169,64169],\"mapped\",[30538]],[[64170,64170],\"mapped\",[30528]],[[64171,64171],\"mapped\",[30924]],[[64172,64172],\"mapped\",[31409]],[[64173,64173],\"mapped\",[31680]],[[64174,64174],\"mapped\",[31867]],[[64175,64175],\"mapped\",[32091]],[[64176,64176],\"mapped\",[32244]],[[64177,64177],\"mapped\",[32574]],[[64178,64178],\"mapped\",[32773]],[[64179,64179],\"mapped\",[33618]],[[64180,64180],\"mapped\",[33775]],[[64181,64181],\"mapped\",[34681]],[[64182,64182],\"mapped\",[35137]],[[64183,64183],\"mapped\",[35206]],[[64184,64184],\"mapped\",[35222]],[[64185,64185],\"mapped\",[35519]],[[64186,64186],\"mapped\",[35576]],[[64187,64187],\"mapped\",[35531]],[[64188,64188],\"mapped\",[35585]],[[64189,64189],\"mapped\",[35582]],[[64190,64190],\"mapped\",[35565]],[[64191,64191],\"mapped\",[35641]],[[64192,64192],\"mapped\",[35722]],[[64193,64193],\"mapped\",[36104]],[[64194,64194],\"mapped\",[36664]],[[64195,64195],\"mapped\",[36978]],[[64196,64196],\"mapped\",[37273]],[[64197,64197],\"mapped\",[37494]],[[64198,64198],\"mapped\",[38524]],[[64199,64199],\"mapped\",[38627]],[[64200,64200],\"mapped\",[38742]],[[64201,64201],\"mapped\",[38875]],[[64202,64202],\"mapped\",[38911]],[[64203,64203],\"mapped\",[38923]],[[64204,64204],\"mapped\",[38971]],[[64205,64205],\"mapped\",[39698]],[[64206,64206],\"mapped\",[40860]],[[64207,64207],\"mapped\",[141386]],[[64208,64208],\"mapped\",[141380]],[[64209,64209],\"mapped\",[144341]],[[64210,64210],\"mapped\",[15261]],[[64211,64211],\"mapped\",[16408]],[[64212,64212],\"mapped\",[16441]],[[64213,64213],\"mapped\",[152137]],[[64214,64214],\"mapped\",[154832]],[[64215,64215],\"mapped\",[163539]],[[64216,64216],\"mapped\",[40771]],[[64217,64217],\"mapped\",[40846]],[[64218,64255],\"disallowed\"],[[64256,64256],\"mapped\",[102,102]],[[64257,64257],\"mapped\",[102,105]],[[64258,64258],\"mapped\",[102,108]],[[64259,64259],\"mapped\",[102,102,105]],[[64260,64260],\"mapped\",[102,102,108]],[[64261,64262],\"mapped\",[115,116]],[[64263,64274],\"disallowed\"],[[64275,64275],\"mapped\",[1396,1398]],[[64276,64276],\"mapped\",[1396,1381]],[[64277,64277],\"mapped\",[1396,1387]],[[64278,64278],\"mapped\",[1406,1398]],[[64279,64279],\"mapped\",[1396,1389]],[[64280,64284],\"disallowed\"],[[64285,64285],\"mapped\",[1497,1460]],[[64286,64286],\"valid\"],[[64287,64287],\"mapped\",[1522,1463]],[[64288,64288],\"mapped\",[1506]],[[64289,64289],\"mapped\",[1488]],[[64290,64290],\"mapped\",[1491]],[[64291,64291],\"mapped\",[1492]],[[64292,64292],\"mapped\",[1499]],[[64293,64293],\"mapped\",[1500]],[[64294,64294],\"mapped\",[1501]],[[64295,64295],\"mapped\",[1512]],[[64296,64296],\"mapped\",[1514]],[[64297,64297],\"disallowed_STD3_mapped\",[43]],[[64298,64298],\"mapped\",[1513,1473]],[[64299,64299],\"mapped\",[1513,1474]],[[64300,64300],\"mapped\",[1513,1468,1473]],[[64301,64301],\"mapped\",[1513,1468,1474]],[[64302,64302],\"mapped\",[1488,1463]],[[64303,64303],\"mapped\",[1488,1464]],[[64304,64304],\"mapped\",[1488,1468]],[[64305,64305],\"mapped\",[1489,1468]],[[64306,64306],\"mapped\",[1490,1468]],[[64307,64307],\"mapped\",[1491,1468]],[[64308,64308],\"mapped\",[1492,1468]],[[64309,64309],\"mapped\",[1493,1468]],[[64310,64310],\"mapped\",[1494,1468]],[[64311,64311],\"disallowed\"],[[64312,64312],\"mapped\",[1496,1468]],[[64313,64313],\"mapped\",[1497,1468]],[[64314,64314],\"mapped\",[1498,1468]],[[64315,64315],\"mapped\",[1499,1468]],[[64316,64316],\"mapped\",[1500,1468]],[[64317,64317],\"disallowed\"],[[64318,64318],\"mapped\",[1502,1468]],[[64319,64319],\"disallowed\"],[[64320,64320],\"mapped\",[1504,1468]],[[64321,64321],\"mapped\",[1505,1468]],[[64322,64322],\"disallowed\"],[[64323,64323],\"mapped\",[1507,1468]],[[64324,64324],\"mapped\",[1508,1468]],[[64325,64325],\"disallowed\"],[[64326,64326],\"mapped\",[1510,1468]],[[64327,64327],\"mapped\",[1511,1468]],[[64328,64328],\"mapped\",[1512,1468]],[[64329,64329],\"mapped\",[1513,1468]],[[64330,64330],\"mapped\",[1514,1468]],[[64331,64331],\"mapped\",[1493,1465]],[[64332,64332],\"mapped\",[1489,1471]],[[64333,64333],\"mapped\",[1499,1471]],[[64334,64334],\"mapped\",[1508,1471]],[[64335,64335],\"mapped\",[1488,1500]],[[64336,64337],\"mapped\",[1649]],[[64338,64341],\"mapped\",[1659]],[[64342,64345],\"mapped\",[1662]],[[64346,64349],\"mapped\",[1664]],[[64350,64353],\"mapped\",[1658]],[[64354,64357],\"mapped\",[1663]],[[64358,64361],\"mapped\",[1657]],[[64362,64365],\"mapped\",[1700]],[[64366,64369],\"mapped\",[1702]],[[64370,64373],\"mapped\",[1668]],[[64374,64377],\"mapped\",[1667]],[[64378,64381],\"mapped\",[1670]],[[64382,64385],\"mapped\",[1671]],[[64386,64387],\"mapped\",[1677]],[[64388,64389],\"mapped\",[1676]],[[64390,64391],\"mapped\",[1678]],[[64392,64393],\"mapped\",[1672]],[[64394,64395],\"mapped\",[1688]],[[64396,64397],\"mapped\",[1681]],[[64398,64401],\"mapped\",[1705]],[[64402,64405],\"mapped\",[1711]],[[64406,64409],\"mapped\",[1715]],[[64410,64413],\"mapped\",[1713]],[[64414,64415],\"mapped\",[1722]],[[64416,64419],\"mapped\",[1723]],[[64420,64421],\"mapped\",[1728]],[[64422,64425],\"mapped\",[1729]],[[64426,64429],\"mapped\",[1726]],[[64430,64431],\"mapped\",[1746]],[[64432,64433],\"mapped\",[1747]],[[64434,64449],\"valid\",[],\"NV8\"],[[64450,64466],\"disallowed\"],[[64467,64470],\"mapped\",[1709]],[[64471,64472],\"mapped\",[1735]],[[64473,64474],\"mapped\",[1734]],[[64475,64476],\"mapped\",[1736]],[[64477,64477],\"mapped\",[1735,1652]],[[64478,64479],\"mapped\",[1739]],[[64480,64481],\"mapped\",[1733]],[[64482,64483],\"mapped\",[1737]],[[64484,64487],\"mapped\",[1744]],[[64488,64489],\"mapped\",[1609]],[[64490,64491],\"mapped\",[1574,1575]],[[64492,64493],\"mapped\",[1574,1749]],[[64494,64495],\"mapped\",[1574,1608]],[[64496,64497],\"mapped\",[1574,1735]],[[64498,64499],\"mapped\",[1574,1734]],[[64500,64501],\"mapped\",[1574,1736]],[[64502,64504],\"mapped\",[1574,1744]],[[64505,64507],\"mapped\",[1574,1609]],[[64508,64511],\"mapped\",[1740]],[[64512,64512],\"mapped\",[1574,1580]],[[64513,64513],\"mapped\",[1574,1581]],[[64514,64514],\"mapped\",[1574,1605]],[[64515,64515],\"mapped\",[1574,1609]],[[64516,64516],\"mapped\",[1574,1610]],[[64517,64517],\"mapped\",[1576,1580]],[[64518,64518],\"mapped\",[1576,1581]],[[64519,64519],\"mapped\",[1576,1582]],[[64520,64520],\"mapped\",[1576,1605]],[[64521,64521],\"mapped\",[1576,1609]],[[64522,64522],\"mapped\",[1576,1610]],[[64523,64523],\"mapped\",[1578,1580]],[[64524,64524],\"mapped\",[1578,1581]],[[64525,64525],\"mapped\",[1578,1582]],[[64526,64526],\"mapped\",[1578,1605]],[[64527,64527],\"mapped\",[1578,1609]],[[64528,64528],\"mapped\",[1578,1610]],[[64529,64529],\"mapped\",[1579,1580]],[[64530,64530],\"mapped\",[1579,1605]],[[64531,64531],\"mapped\",[1579,1609]],[[64532,64532],\"mapped\",[1579,1610]],[[64533,64533],\"mapped\",[1580,1581]],[[64534,64534],\"mapped\",[1580,1605]],[[64535,64535],\"mapped\",[1581,1580]],[[64536,64536],\"mapped\",[1581,1605]],[[64537,64537],\"mapped\",[1582,1580]],[[64538,64538],\"mapped\",[1582,1581]],[[64539,64539],\"mapped\",[1582,1605]],[[64540,64540],\"mapped\",[1587,1580]],[[64541,64541],\"mapped\",[1587,1581]],[[64542,64542],\"mapped\",[1587,1582]],[[64543,64543],\"mapped\",[1587,1605]],[[64544,64544],\"mapped\",[1589,1581]],[[64545,64545],\"mapped\",[1589,1605]],[[64546,64546],\"mapped\",[1590,1580]],[[64547,64547],\"mapped\",[1590,1581]],[[64548,64548],\"mapped\",[1590,1582]],[[64549,64549],\"mapped\",[1590,1605]],[[64550,64550],\"mapped\",[1591,1581]],[[64551,64551],\"mapped\",[1591,1605]],[[64552,64552],\"mapped\",[1592,1605]],[[64553,64553],\"mapped\",[1593,1580]],[[64554,64554],\"mapped\",[1593,1605]],[[64555,64555],\"mapped\",[1594,1580]],[[64556,64556],\"mapped\",[1594,1605]],[[64557,64557],\"mapped\",[1601,1580]],[[64558,64558],\"mapped\",[1601,1581]],[[64559,64559],\"mapped\",[1601,1582]],[[64560,64560],\"mapped\",[1601,1605]],[[64561,64561],\"mapped\",[1601,1609]],[[64562,64562],\"mapped\",[1601,1610]],[[64563,64563],\"mapped\",[1602,1581]],[[64564,64564],\"mapped\",[1602,1605]],[[64565,64565],\"mapped\",[1602,1609]],[[64566,64566],\"mapped\",[1602,1610]],[[64567,64567],\"mapped\",[1603,1575]],[[64568,64568],\"mapped\",[1603,1580]],[[64569,64569],\"mapped\",[1603,1581]],[[64570,64570],\"mapped\",[1603,1582]],[[64571,64571],\"mapped\",[1603,1604]],[[64572,64572],\"mapped\",[1603,1605]],[[64573,64573],\"mapped\",[1603,1609]],[[64574,64574],\"mapped\",[1603,1610]],[[64575,64575],\"mapped\",[1604,1580]],[[64576,64576],\"mapped\",[1604,1581]],[[64577,64577],\"mapped\",[1604,1582]],[[64578,64578],\"mapped\",[1604,1605]],[[64579,64579],\"mapped\",[1604,1609]],[[64580,64580],\"mapped\",[1604,1610]],[[64581,64581],\"mapped\",[1605,1580]],[[64582,64582],\"mapped\",[1605,1581]],[[64583,64583],\"mapped\",[1605,1582]],[[64584,64584],\"mapped\",[1605,1605]],[[64585,64585],\"mapped\",[1605,1609]],[[64586,64586],\"mapped\",[1605,1610]],[[64587,64587],\"mapped\",[1606,1580]],[[64588,64588],\"mapped\",[1606,1581]],[[64589,64589],\"mapped\",[1606,1582]],[[64590,64590],\"mapped\",[1606,1605]],[[64591,64591],\"mapped\",[1606,1609]],[[64592,64592],\"mapped\",[1606,1610]],[[64593,64593],\"mapped\",[1607,1580]],[[64594,64594],\"mapped\",[1607,1605]],[[64595,64595],\"mapped\",[1607,1609]],[[64596,64596],\"mapped\",[1607,1610]],[[64597,64597],\"mapped\",[1610,1580]],[[64598,64598],\"mapped\",[1610,1581]],[[64599,64599],\"mapped\",[1610,1582]],[[64600,64600],\"mapped\",[1610,1605]],[[64601,64601],\"mapped\",[1610,1609]],[[64602,64602],\"mapped\",[1610,1610]],[[64603,64603],\"mapped\",[1584,1648]],[[64604,64604],\"mapped\",[1585,1648]],[[64605,64605],\"mapped\",[1609,1648]],[[64606,64606],\"disallowed_STD3_mapped\",[32,1612,1617]],[[64607,64607],\"disallowed_STD3_mapped\",[32,1613,1617]],[[64608,64608],\"disallowed_STD3_mapped\",[32,1614,1617]],[[64609,64609],\"disallowed_STD3_mapped\",[32,1615,1617]],[[64610,64610],\"disallowed_STD3_mapped\",[32,1616,1617]],[[64611,64611],\"disallowed_STD3_mapped\",[32,1617,1648]],[[64612,64612],\"mapped\",[1574,1585]],[[64613,64613],\"mapped\",[1574,1586]],[[64614,64614],\"mapped\",[1574,1605]],[[64615,64615],\"mapped\",[1574,1606]],[[64616,64616],\"mapped\",[1574,1609]],[[64617,64617],\"mapped\",[1574,1610]],[[64618,64618],\"mapped\",[1576,1585]],[[64619,64619],\"mapped\",[1576,1586]],[[64620,64620],\"mapped\",[1576,1605]],[[64621,64621],\"mapped\",[1576,1606]],[[64622,64622],\"mapped\",[1576,1609]],[[64623,64623],\"mapped\",[1576,1610]],[[64624,64624],\"mapped\",[1578,1585]],[[64625,64625],\"mapped\",[1578,1586]],[[64626,64626],\"mapped\",[1578,1605]],[[64627,64627],\"mapped\",[1578,1606]],[[64628,64628],\"mapped\",[1578,1609]],[[64629,64629],\"mapped\",[1578,1610]],[[64630,64630],\"mapped\",[1579,1585]],[[64631,64631],\"mapped\",[1579,1586]],[[64632,64632],\"mapped\",[1579,1605]],[[64633,64633],\"mapped\",[1579,1606]],[[64634,64634],\"mapped\",[1579,1609]],[[64635,64635],\"mapped\",[1579,1610]],[[64636,64636],\"mapped\",[1601,1609]],[[64637,64637],\"mapped\",[1601,1610]],[[64638,64638],\"mapped\",[1602,1609]],[[64639,64639],\"mapped\",[1602,1610]],[[64640,64640],\"mapped\",[1603,1575]],[[64641,64641],\"mapped\",[1603,1604]],[[64642,64642],\"mapped\",[1603,1605]],[[64643,64643],\"mapped\",[1603,1609]],[[64644,64644],\"mapped\",[1603,1610]],[[64645,64645],\"mapped\",[1604,1605]],[[64646,64646],\"mapped\",[1604,1609]],[[64647,64647],\"mapped\",[1604,1610]],[[64648,64648],\"mapped\",[1605,1575]],[[64649,64649],\"mapped\",[1605,1605]],[[64650,64650],\"mapped\",[1606,1585]],[[64651,64651],\"mapped\",[1606,1586]],[[64652,64652],\"mapped\",[1606,1605]],[[64653,64653],\"mapped\",[1606,1606]],[[64654,64654],\"mapped\",[1606,1609]],[[64655,64655],\"mapped\",[1606,1610]],[[64656,64656],\"mapped\",[1609,1648]],[[64657,64657],\"mapped\",[1610,1585]],[[64658,64658],\"mapped\",[1610,1586]],[[64659,64659],\"mapped\",[1610,1605]],[[64660,64660],\"mapped\",[1610,1606]],[[64661,64661],\"mapped\",[1610,1609]],[[64662,64662],\"mapped\",[1610,1610]],[[64663,64663],\"mapped\",[1574,1580]],[[64664,64664],\"mapped\",[1574,1581]],[[64665,64665],\"mapped\",[1574,1582]],[[64666,64666],\"mapped\",[1574,1605]],[[64667,64667],\"mapped\",[1574,1607]],[[64668,64668],\"mapped\",[1576,1580]],[[64669,64669],\"mapped\",[1576,1581]],[[64670,64670],\"mapped\",[1576,1582]],[[64671,64671],\"mapped\",[1576,1605]],[[64672,64672],\"mapped\",[1576,1607]],[[64673,64673],\"mapped\",[1578,1580]],[[64674,64674],\"mapped\",[1578,1581]],[[64675,64675],\"mapped\",[1578,1582]],[[64676,64676],\"mapped\",[1578,1605]],[[64677,64677],\"mapped\",[1578,1607]],[[64678,64678],\"mapped\",[1579,1605]],[[64679,64679],\"mapped\",[1580,1581]],[[64680,64680],\"mapped\",[1580,1605]],[[64681,64681],\"mapped\",[1581,1580]],[[64682,64682],\"mapped\",[1581,1605]],[[64683,64683],\"mapped\",[1582,1580]],[[64684,64684],\"mapped\",[1582,1605]],[[64685,64685],\"mapped\",[1587,1580]],[[64686,64686],\"mapped\",[1587,1581]],[[64687,64687],\"mapped\",[1587,1582]],[[64688,64688],\"mapped\",[1587,1605]],[[64689,64689],\"mapped\",[1589,1581]],[[64690,64690],\"mapped\",[1589,1582]],[[64691,64691],\"mapped\",[1589,1605]],[[64692,64692],\"mapped\",[1590,1580]],[[64693,64693],\"mapped\",[1590,1581]],[[64694,64694],\"mapped\",[1590,1582]],[[64695,64695],\"mapped\",[1590,1605]],[[64696,64696],\"mapped\",[1591,1581]],[[64697,64697],\"mapped\",[1592,1605]],[[64698,64698],\"mapped\",[1593,1580]],[[64699,64699],\"mapped\",[1593,1605]],[[64700,64700],\"mapped\",[1594,1580]],[[64701,64701],\"mapped\",[1594,1605]],[[64702,64702],\"mapped\",[1601,1580]],[[64703,64703],\"mapped\",[1601,1581]],[[64704,64704],\"mapped\",[1601,1582]],[[64705,64705],\"mapped\",[1601,1605]],[[64706,64706],\"mapped\",[1602,1581]],[[64707,64707],\"mapped\",[1602,1605]],[[64708,64708],\"mapped\",[1603,1580]],[[64709,64709],\"mapped\",[1603,1581]],[[64710,64710],\"mapped\",[1603,1582]],[[64711,64711],\"mapped\",[1603,1604]],[[64712,64712],\"mapped\",[1603,1605]],[[64713,64713],\"mapped\",[1604,1580]],[[64714,64714],\"mapped\",[1604,1581]],[[64715,64715],\"mapped\",[1604,1582]],[[64716,64716],\"mapped\",[1604,1605]],[[64717,64717],\"mapped\",[1604,1607]],[[64718,64718],\"mapped\",[1605,1580]],[[64719,64719],\"mapped\",[1605,1581]],[[64720,64720],\"mapped\",[1605,1582]],[[64721,64721],\"mapped\",[1605,1605]],[[64722,64722],\"mapped\",[1606,1580]],[[64723,64723],\"mapped\",[1606,1581]],[[64724,64724],\"mapped\",[1606,1582]],[[64725,64725],\"mapped\",[1606,1605]],[[64726,64726],\"mapped\",[1606,1607]],[[64727,64727],\"mapped\",[1607,1580]],[[64728,64728],\"mapped\",[1607,1605]],[[64729,64729],\"mapped\",[1607,1648]],[[64730,64730],\"mapped\",[1610,1580]],[[64731,64731],\"mapped\",[1610,1581]],[[64732,64732],\"mapped\",[1610,1582]],[[64733,64733],\"mapped\",[1610,1605]],[[64734,64734],\"mapped\",[1610,1607]],[[64735,64735],\"mapped\",[1574,1605]],[[64736,64736],\"mapped\",[1574,1607]],[[64737,64737],\"mapped\",[1576,1605]],[[64738,64738],\"mapped\",[1576,1607]],[[64739,64739],\"mapped\",[1578,1605]],[[64740,64740],\"mapped\",[1578,1607]],[[64741,64741],\"mapped\",[1579,1605]],[[64742,64742],\"mapped\",[1579,1607]],[[64743,64743],\"mapped\",[1587,1605]],[[64744,64744],\"mapped\",[1587,1607]],[[64745,64745],\"mapped\",[1588,1605]],[[64746,64746],\"mapped\",[1588,1607]],[[64747,64747],\"mapped\",[1603,1604]],[[64748,64748],\"mapped\",[1603,1605]],[[64749,64749],\"mapped\",[1604,1605]],[[64750,64750],\"mapped\",[1606,1605]],[[64751,64751],\"mapped\",[1606,1607]],[[64752,64752],\"mapped\",[1610,1605]],[[64753,64753],\"mapped\",[1610,1607]],[[64754,64754],\"mapped\",[1600,1614,1617]],[[64755,64755],\"mapped\",[1600,1615,1617]],[[64756,64756],\"mapped\",[1600,1616,1617]],[[64757,64757],\"mapped\",[1591,1609]],[[64758,64758],\"mapped\",[1591,1610]],[[64759,64759],\"mapped\",[1593,1609]],[[64760,64760],\"mapped\",[1593,1610]],[[64761,64761],\"mapped\",[1594,1609]],[[64762,64762],\"mapped\",[1594,1610]],[[64763,64763],\"mapped\",[1587,1609]],[[64764,64764],\"mapped\",[1587,1610]],[[64765,64765],\"mapped\",[1588,1609]],[[64766,64766],\"mapped\",[1588,1610]],[[64767,64767],\"mapped\",[1581,1609]],[[64768,64768],\"mapped\",[1581,1610]],[[64769,64769],\"mapped\",[1580,1609]],[[64770,64770],\"mapped\",[1580,1610]],[[64771,64771],\"mapped\",[1582,1609]],[[64772,64772],\"mapped\",[1582,1610]],[[64773,64773],\"mapped\",[1589,1609]],[[64774,64774],\"mapped\",[1589,1610]],[[64775,64775],\"mapped\",[1590,1609]],[[64776,64776],\"mapped\",[1590,1610]],[[64777,64777],\"mapped\",[1588,1580]],[[64778,64778],\"mapped\",[1588,1581]],[[64779,64779],\"mapped\",[1588,1582]],[[64780,64780],\"mapped\",[1588,1605]],[[64781,64781],\"mapped\",[1588,1585]],[[64782,64782],\"mapped\",[1587,1585]],[[64783,64783],\"mapped\",[1589,1585]],[[64784,64784],\"mapped\",[1590,1585]],[[64785,64785],\"mapped\",[1591,1609]],[[64786,64786],\"mapped\",[1591,1610]],[[64787,64787],\"mapped\",[1593,1609]],[[64788,64788],\"mapped\",[1593,1610]],[[64789,64789],\"mapped\",[1594,1609]],[[64790,64790],\"mapped\",[1594,1610]],[[64791,64791],\"mapped\",[1587,1609]],[[64792,64792],\"mapped\",[1587,1610]],[[64793,64793],\"mapped\",[1588,1609]],[[64794,64794],\"mapped\",[1588,1610]],[[64795,64795],\"mapped\",[1581,1609]],[[64796,64796],\"mapped\",[1581,1610]],[[64797,64797],\"mapped\",[1580,1609]],[[64798,64798],\"mapped\",[1580,1610]],[[64799,64799],\"mapped\",[1582,1609]],[[64800,64800],\"mapped\",[1582,1610]],[[64801,64801],\"mapped\",[1589,1609]],[[64802,64802],\"mapped\",[1589,1610]],[[64803,64803],\"mapped\",[1590,1609]],[[64804,64804],\"mapped\",[1590,1610]],[[64805,64805],\"mapped\",[1588,1580]],[[64806,64806],\"mapped\",[1588,1581]],[[64807,64807],\"mapped\",[1588,1582]],[[64808,64808],\"mapped\",[1588,1605]],[[64809,64809],\"mapped\",[1588,1585]],[[64810,64810],\"mapped\",[1587,1585]],[[64811,64811],\"mapped\",[1589,1585]],[[64812,64812],\"mapped\",[1590,1585]],[[64813,64813],\"mapped\",[1588,1580]],[[64814,64814],\"mapped\",[1588,1581]],[[64815,64815],\"mapped\",[1588,1582]],[[64816,64816],\"mapped\",[1588,1605]],[[64817,64817],\"mapped\",[1587,1607]],[[64818,64818],\"mapped\",[1588,1607]],[[64819,64819],\"mapped\",[1591,1605]],[[64820,64820],\"mapped\",[1587,1580]],[[64821,64821],\"mapped\",[1587,1581]],[[64822,64822],\"mapped\",[1587,1582]],[[64823,64823],\"mapped\",[1588,1580]],[[64824,64824],\"mapped\",[1588,1581]],[[64825,64825],\"mapped\",[1588,1582]],[[64826,64826],\"mapped\",[1591,1605]],[[64827,64827],\"mapped\",[1592,1605]],[[64828,64829],\"mapped\",[1575,1611]],[[64830,64831],\"valid\",[],\"NV8\"],[[64832,64847],\"disallowed\"],[[64848,64848],\"mapped\",[1578,1580,1605]],[[64849,64850],\"mapped\",[1578,1581,1580]],[[64851,64851],\"mapped\",[1578,1581,1605]],[[64852,64852],\"mapped\",[1578,1582,1605]],[[64853,64853],\"mapped\",[1578,1605,1580]],[[64854,64854],\"mapped\",[1578,1605,1581]],[[64855,64855],\"mapped\",[1578,1605,1582]],[[64856,64857],\"mapped\",[1580,1605,1581]],[[64858,64858],\"mapped\",[1581,1605,1610]],[[64859,64859],\"mapped\",[1581,1605,1609]],[[64860,64860],\"mapped\",[1587,1581,1580]],[[64861,64861],\"mapped\",[1587,1580,1581]],[[64862,64862],\"mapped\",[1587,1580,1609]],[[64863,64864],\"mapped\",[1587,1605,1581]],[[64865,64865],\"mapped\",[1587,1605,1580]],[[64866,64867],\"mapped\",[1587,1605,1605]],[[64868,64869],\"mapped\",[1589,1581,1581]],[[64870,64870],\"mapped\",[1589,1605,1605]],[[64871,64872],\"mapped\",[1588,1581,1605]],[[64873,64873],\"mapped\",[1588,1580,1610]],[[64874,64875],\"mapped\",[1588,1605,1582]],[[64876,64877],\"mapped\",[1588,1605,1605]],[[64878,64878],\"mapped\",[1590,1581,1609]],[[64879,64880],\"mapped\",[1590,1582,1605]],[[64881,64882],\"mapped\",[1591,1605,1581]],[[64883,64883],\"mapped\",[1591,1605,1605]],[[64884,64884],\"mapped\",[1591,1605,1610]],[[64885,64885],\"mapped\",[1593,1580,1605]],[[64886,64887],\"mapped\",[1593,1605,1605]],[[64888,64888],\"mapped\",[1593,1605,1609]],[[64889,64889],\"mapped\",[1594,1605,1605]],[[64890,64890],\"mapped\",[1594,1605,1610]],[[64891,64891],\"mapped\",[1594,1605,1609]],[[64892,64893],\"mapped\",[1601,1582,1605]],[[64894,64894],\"mapped\",[1602,1605,1581]],[[64895,64895],\"mapped\",[1602,1605,1605]],[[64896,64896],\"mapped\",[1604,1581,1605]],[[64897,64897],\"mapped\",[1604,1581,1610]],[[64898,64898],\"mapped\",[1604,1581,1609]],[[64899,64900],\"mapped\",[1604,1580,1580]],[[64901,64902],\"mapped\",[1604,1582,1605]],[[64903,64904],\"mapped\",[1604,1605,1581]],[[64905,64905],\"mapped\",[1605,1581,1580]],[[64906,64906],\"mapped\",[1605,1581,1605]],[[64907,64907],\"mapped\",[1605,1581,1610]],[[64908,64908],\"mapped\",[1605,1580,1581]],[[64909,64909],\"mapped\",[1605,1580,1605]],[[64910,64910],\"mapped\",[1605,1582,1580]],[[64911,64911],\"mapped\",[1605,1582,1605]],[[64912,64913],\"disallowed\"],[[64914,64914],\"mapped\",[1605,1580,1582]],[[64915,64915],\"mapped\",[1607,1605,1580]],[[64916,64916],\"mapped\",[1607,1605,1605]],[[64917,64917],\"mapped\",[1606,1581,1605]],[[64918,64918],\"mapped\",[1606,1581,1609]],[[64919,64920],\"mapped\",[1606,1580,1605]],[[64921,64921],\"mapped\",[1606,1580,1609]],[[64922,64922],\"mapped\",[1606,1605,1610]],[[64923,64923],\"mapped\",[1606,1605,1609]],[[64924,64925],\"mapped\",[1610,1605,1605]],[[64926,64926],\"mapped\",[1576,1582,1610]],[[64927,64927],\"mapped\",[1578,1580,1610]],[[64928,64928],\"mapped\",[1578,1580,1609]],[[64929,64929],\"mapped\",[1578,1582,1610]],[[64930,64930],\"mapped\",[1578,1582,1609]],[[64931,64931],\"mapped\",[1578,1605,1610]],[[64932,64932],\"mapped\",[1578,1605,1609]],[[64933,64933],\"mapped\",[1580,1605,1610]],[[64934,64934],\"mapped\",[1580,1581,1609]],[[64935,64935],\"mapped\",[1580,1605,1609]],[[64936,64936],\"mapped\",[1587,1582,1609]],[[64937,64937],\"mapped\",[1589,1581,1610]],[[64938,64938],\"mapped\",[1588,1581,1610]],[[64939,64939],\"mapped\",[1590,1581,1610]],[[64940,64940],\"mapped\",[1604,1580,1610]],[[64941,64941],\"mapped\",[1604,1605,1610]],[[64942,64942],\"mapped\",[1610,1581,1610]],[[64943,64943],\"mapped\",[1610,1580,1610]],[[64944,64944],\"mapped\",[1610,1605,1610]],[[64945,64945],\"mapped\",[1605,1605,1610]],[[64946,64946],\"mapped\",[1602,1605,1610]],[[64947,64947],\"mapped\",[1606,1581,1610]],[[64948,64948],\"mapped\",[1602,1605,1581]],[[64949,64949],\"mapped\",[1604,1581,1605]],[[64950,64950],\"mapped\",[1593,1605,1610]],[[64951,64951],\"mapped\",[1603,1605,1610]],[[64952,64952],\"mapped\",[1606,1580,1581]],[[64953,64953],\"mapped\",[1605,1582,1610]],[[64954,64954],\"mapped\",[1604,1580,1605]],[[64955,64955],\"mapped\",[1603,1605,1605]],[[64956,64956],\"mapped\",[1604,1580,1605]],[[64957,64957],\"mapped\",[1606,1580,1581]],[[64958,64958],\"mapped\",[1580,1581,1610]],[[64959,64959],\"mapped\",[1581,1580,1610]],[[64960,64960],\"mapped\",[1605,1580,1610]],[[64961,64961],\"mapped\",[1601,1605,1610]],[[64962,64962],\"mapped\",[1576,1581,1610]],[[64963,64963],\"mapped\",[1603,1605,1605]],[[64964,64964],\"mapped\",[1593,1580,1605]],[[64965,64965],\"mapped\",[1589,1605,1605]],[[64966,64966],\"mapped\",[1587,1582,1610]],[[64967,64967],\"mapped\",[1606,1580,1610]],[[64968,64975],\"disallowed\"],[[64976,65007],\"disallowed\"],[[65008,65008],\"mapped\",[1589,1604,1746]],[[65009,65009],\"mapped\",[1602,1604,1746]],[[65010,65010],\"mapped\",[1575,1604,1604,1607]],[[65011,65011],\"mapped\",[1575,1603,1576,1585]],[[65012,65012],\"mapped\",[1605,1581,1605,1583]],[[65013,65013],\"mapped\",[1589,1604,1593,1605]],[[65014,65014],\"mapped\",[1585,1587,1608,1604]],[[65015,65015],\"mapped\",[1593,1604,1610,1607]],[[65016,65016],\"mapped\",[1608,1587,1604,1605]],[[65017,65017],\"mapped\",[1589,1604,1609]],[[65018,65018],\"disallowed_STD3_mapped\",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],\"disallowed_STD3_mapped\",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],\"mapped\",[1585,1740,1575,1604]],[[65021,65021],\"valid\",[],\"NV8\"],[[65022,65023],\"disallowed\"],[[65024,65039],\"ignored\"],[[65040,65040],\"disallowed_STD3_mapped\",[44]],[[65041,65041],\"mapped\",[12289]],[[65042,65042],\"disallowed\"],[[65043,65043],\"disallowed_STD3_mapped\",[58]],[[65044,65044],\"disallowed_STD3_mapped\",[59]],[[65045,65045],\"disallowed_STD3_mapped\",[33]],[[65046,65046],\"disallowed_STD3_mapped\",[63]],[[65047,65047],\"mapped\",[12310]],[[65048,65048],\"mapped\",[12311]],[[65049,65049],\"disallowed\"],[[65050,65055],\"disallowed\"],[[65056,65059],\"valid\"],[[65060,65062],\"valid\"],[[65063,65069],\"valid\"],[[65070,65071],\"valid\"],[[65072,65072],\"disallowed\"],[[65073,65073],\"mapped\",[8212]],[[65074,65074],\"mapped\",[8211]],[[65075,65076],\"disallowed_STD3_mapped\",[95]],[[65077,65077],\"disallowed_STD3_mapped\",[40]],[[65078,65078],\"disallowed_STD3_mapped\",[41]],[[65079,65079],\"disallowed_STD3_mapped\",[123]],[[65080,65080],\"disallowed_STD3_mapped\",[125]],[[65081,65081],\"mapped\",[12308]],[[65082,65082],\"mapped\",[12309]],[[65083,65083],\"mapped\",[12304]],[[65084,65084],\"mapped\",[12305]],[[65085,65085],\"mapped\",[12298]],[[65086,65086],\"mapped\",[12299]],[[65087,65087],\"mapped\",[12296]],[[65088,65088],\"mapped\",[12297]],[[65089,65089],\"mapped\",[12300]],[[65090,65090],\"mapped\",[12301]],[[65091,65091],\"mapped\",[12302]],[[65092,65092],\"mapped\",[12303]],[[65093,65094],\"valid\",[],\"NV8\"],[[65095,65095],\"disallowed_STD3_mapped\",[91]],[[65096,65096],\"disallowed_STD3_mapped\",[93]],[[65097,65100],\"disallowed_STD3_mapped\",[32,773]],[[65101,65103],\"disallowed_STD3_mapped\",[95]],[[65104,65104],\"disallowed_STD3_mapped\",[44]],[[65105,65105],\"mapped\",[12289]],[[65106,65106],\"disallowed\"],[[65107,65107],\"disallowed\"],[[65108,65108],\"disallowed_STD3_mapped\",[59]],[[65109,65109],\"disallowed_STD3_mapped\",[58]],[[65110,65110],\"disallowed_STD3_mapped\",[63]],[[65111,65111],\"disallowed_STD3_mapped\",[33]],[[65112,65112],\"mapped\",[8212]],[[65113,65113],\"disallowed_STD3_mapped\",[40]],[[65114,65114],\"disallowed_STD3_mapped\",[41]],[[65115,65115],\"disallowed_STD3_mapped\",[123]],[[65116,65116],\"disallowed_STD3_mapped\",[125]],[[65117,65117],\"mapped\",[12308]],[[65118,65118],\"mapped\",[12309]],[[65119,65119],\"disallowed_STD3_mapped\",[35]],[[65120,65120],\"disallowed_STD3_mapped\",[38]],[[65121,65121],\"disallowed_STD3_mapped\",[42]],[[65122,65122],\"disallowed_STD3_mapped\",[43]],[[65123,65123],\"mapped\",[45]],[[65124,65124],\"disallowed_STD3_mapped\",[60]],[[65125,65125],\"disallowed_STD3_mapped\",[62]],[[65126,65126],\"disallowed_STD3_mapped\",[61]],[[65127,65127],\"disallowed\"],[[65128,65128],\"disallowed_STD3_mapped\",[92]],[[65129,65129],\"disallowed_STD3_mapped\",[36]],[[65130,65130],\"disallowed_STD3_mapped\",[37]],[[65131,65131],\"disallowed_STD3_mapped\",[64]],[[65132,65135],\"disallowed\"],[[65136,65136],\"disallowed_STD3_mapped\",[32,1611]],[[65137,65137],\"mapped\",[1600,1611]],[[65138,65138],\"disallowed_STD3_mapped\",[32,1612]],[[65139,65139],\"valid\"],[[65140,65140],\"disallowed_STD3_mapped\",[32,1613]],[[65141,65141],\"disallowed\"],[[65142,65142],\"disallowed_STD3_mapped\",[32,1614]],[[65143,65143],\"mapped\",[1600,1614]],[[65144,65144],\"disallowed_STD3_mapped\",[32,1615]],[[65145,65145],\"mapped\",[1600,1615]],[[65146,65146],\"disallowed_STD3_mapped\",[32,1616]],[[65147,65147],\"mapped\",[1600,1616]],[[65148,65148],\"disallowed_STD3_mapped\",[32,1617]],[[65149,65149],\"mapped\",[1600,1617]],[[65150,65150],\"disallowed_STD3_mapped\",[32,1618]],[[65151,65151],\"mapped\",[1600,1618]],[[65152,65152],\"mapped\",[1569]],[[65153,65154],\"mapped\",[1570]],[[65155,65156],\"mapped\",[1571]],[[65157,65158],\"mapped\",[1572]],[[65159,65160],\"mapped\",[1573]],[[65161,65164],\"mapped\",[1574]],[[65165,65166],\"mapped\",[1575]],[[65167,65170],\"mapped\",[1576]],[[65171,65172],\"mapped\",[1577]],[[65173,65176],\"mapped\",[1578]],[[65177,65180],\"mapped\",[1579]],[[65181,65184],\"mapped\",[1580]],[[65185,65188],\"mapped\",[1581]],[[65189,65192],\"mapped\",[1582]],[[65193,65194],\"mapped\",[1583]],[[65195,65196],\"mapped\",[1584]],[[65197,65198],\"mapped\",[1585]],[[65199,65200],\"mapped\",[1586]],[[65201,65204],\"mapped\",[1587]],[[65205,65208],\"mapped\",[1588]],[[65209,65212],\"mapped\",[1589]],[[65213,65216],\"mapped\",[1590]],[[65217,65220],\"mapped\",[1591]],[[65221,65224],\"mapped\",[1592]],[[65225,65228],\"mapped\",[1593]],[[65229,65232],\"mapped\",[1594]],[[65233,65236],\"mapped\",[1601]],[[65237,65240],\"mapped\",[1602]],[[65241,65244],\"mapped\",[1603]],[[65245,65248],\"mapped\",[1604]],[[65249,65252],\"mapped\",[1605]],[[65253,65256],\"mapped\",[1606]],[[65257,65260],\"mapped\",[1607]],[[65261,65262],\"mapped\",[1608]],[[65263,65264],\"mapped\",[1609]],[[65265,65268],\"mapped\",[1610]],[[65269,65270],\"mapped\",[1604,1570]],[[65271,65272],\"mapped\",[1604,1571]],[[65273,65274],\"mapped\",[1604,1573]],[[65275,65276],\"mapped\",[1604,1575]],[[65277,65278],\"disallowed\"],[[65279,65279],\"ignored\"],[[65280,65280],\"disallowed\"],[[65281,65281],\"disallowed_STD3_mapped\",[33]],[[65282,65282],\"disallowed_STD3_mapped\",[34]],[[65283,65283],\"disallowed_STD3_mapped\",[35]],[[65284,65284],\"disallowed_STD3_mapped\",[36]],[[65285,65285],\"disallowed_STD3_mapped\",[37]],[[65286,65286],\"disallowed_STD3_mapped\",[38]],[[65287,65287],\"disallowed_STD3_mapped\",[39]],[[65288,65288],\"disallowed_STD3_mapped\",[40]],[[65289,65289],\"disallowed_STD3_mapped\",[41]],[[65290,65290],\"disallowed_STD3_mapped\",[42]],[[65291,65291],\"disallowed_STD3_mapped\",[43]],[[65292,65292],\"disallowed_STD3_mapped\",[44]],[[65293,65293],\"mapped\",[45]],[[65294,65294],\"mapped\",[46]],[[65295,65295],\"disallowed_STD3_mapped\",[47]],[[65296,65296],\"mapped\",[48]],[[65297,65297],\"mapped\",[49]],[[65298,65298],\"mapped\",[50]],[[65299,65299],\"mapped\",[51]],[[65300,65300],\"mapped\",[52]],[[65301,65301],\"mapped\",[53]],[[65302,65302],\"mapped\",[54]],[[65303,65303],\"mapped\",[55]],[[65304,65304],\"mapped\",[56]],[[65305,65305],\"mapped\",[57]],[[65306,65306],\"disallowed_STD3_mapped\",[58]],[[65307,65307],\"disallowed_STD3_mapped\",[59]],[[65308,65308],\"disallowed_STD3_mapped\",[60]],[[65309,65309],\"disallowed_STD3_mapped\",[61]],[[65310,65310],\"disallowed_STD3_mapped\",[62]],[[65311,65311],\"disallowed_STD3_mapped\",[63]],[[65312,65312],\"disallowed_STD3_mapped\",[64]],[[65313,65313],\"mapped\",[97]],[[65314,65314],\"mapped\",[98]],[[65315,65315],\"mapped\",[99]],[[65316,65316],\"mapped\",[100]],[[65317,65317],\"mapped\",[101]],[[65318,65318],\"mapped\",[102]],[[65319,65319],\"mapped\",[103]],[[65320,65320],\"mapped\",[104]],[[65321,65321],\"mapped\",[105]],[[65322,65322],\"mapped\",[106]],[[65323,65323],\"mapped\",[107]],[[65324,65324],\"mapped\",[108]],[[65325,65325],\"mapped\",[109]],[[65326,65326],\"mapped\",[110]],[[65327,65327],\"mapped\",[111]],[[65328,65328],\"mapped\",[112]],[[65329,65329],\"mapped\",[113]],[[65330,65330],\"mapped\",[114]],[[65331,65331],\"mapped\",[115]],[[65332,65332],\"mapped\",[116]],[[65333,65333],\"mapped\",[117]],[[65334,65334],\"mapped\",[118]],[[65335,65335],\"mapped\",[119]],[[65336,65336],\"mapped\",[120]],[[65337,65337],\"mapped\",[121]],[[65338,65338],\"mapped\",[122]],[[65339,65339],\"disallowed_STD3_mapped\",[91]],[[65340,65340],\"disallowed_STD3_mapped\",[92]],[[65341,65341],\"disallowed_STD3_mapped\",[93]],[[65342,65342],\"disallowed_STD3_mapped\",[94]],[[65343,65343],\"disallowed_STD3_mapped\",[95]],[[65344,65344],\"disallowed_STD3_mapped\",[96]],[[65345,65345],\"mapped\",[97]],[[65346,65346],\"mapped\",[98]],[[65347,65347],\"mapped\",[99]],[[65348,65348],\"mapped\",[100]],[[65349,65349],\"mapped\",[101]],[[65350,65350],\"mapped\",[102]],[[65351,65351],\"mapped\",[103]],[[65352,65352],\"mapped\",[104]],[[65353,65353],\"mapped\",[105]],[[65354,65354],\"mapped\",[106]],[[65355,65355],\"mapped\",[107]],[[65356,65356],\"mapped\",[108]],[[65357,65357],\"mapped\",[109]],[[65358,65358],\"mapped\",[110]],[[65359,65359],\"mapped\",[111]],[[65360,65360],\"mapped\",[112]],[[65361,65361],\"mapped\",[113]],[[65362,65362],\"mapped\",[114]],[[65363,65363],\"mapped\",[115]],[[65364,65364],\"mapped\",[116]],[[65365,65365],\"mapped\",[117]],[[65366,65366],\"mapped\",[118]],[[65367,65367],\"mapped\",[119]],[[65368,65368],\"mapped\",[120]],[[65369,65369],\"mapped\",[121]],[[65370,65370],\"mapped\",[122]],[[65371,65371],\"disallowed_STD3_mapped\",[123]],[[65372,65372],\"disallowed_STD3_mapped\",[124]],[[65373,65373],\"disallowed_STD3_mapped\",[125]],[[65374,65374],\"disallowed_STD3_mapped\",[126]],[[65375,65375],\"mapped\",[10629]],[[65376,65376],\"mapped\",[10630]],[[65377,65377],\"mapped\",[46]],[[65378,65378],\"mapped\",[12300]],[[65379,65379],\"mapped\",[12301]],[[65380,65380],\"mapped\",[12289]],[[65381,65381],\"mapped\",[12539]],[[65382,65382],\"mapped\",[12530]],[[65383,65383],\"mapped\",[12449]],[[65384,65384],\"mapped\",[12451]],[[65385,65385],\"mapped\",[12453]],[[65386,65386],\"mapped\",[12455]],[[65387,65387],\"mapped\",[12457]],[[65388,65388],\"mapped\",[12515]],[[65389,65389],\"mapped\",[12517]],[[65390,65390],\"mapped\",[12519]],[[65391,65391],\"mapped\",[12483]],[[65392,65392],\"mapped\",[12540]],[[65393,65393],\"mapped\",[12450]],[[65394,65394],\"mapped\",[12452]],[[65395,65395],\"mapped\",[12454]],[[65396,65396],\"mapped\",[12456]],[[65397,65397],\"mapped\",[12458]],[[65398,65398],\"mapped\",[12459]],[[65399,65399],\"mapped\",[12461]],[[65400,65400],\"mapped\",[12463]],[[65401,65401],\"mapped\",[12465]],[[65402,65402],\"mapped\",[12467]],[[65403,65403],\"mapped\",[12469]],[[65404,65404],\"mapped\",[12471]],[[65405,65405],\"mapped\",[12473]],[[65406,65406],\"mapped\",[12475]],[[65407,65407],\"mapped\",[12477]],[[65408,65408],\"mapped\",[12479]],[[65409,65409],\"mapped\",[12481]],[[65410,65410],\"mapped\",[12484]],[[65411,65411],\"mapped\",[12486]],[[65412,65412],\"mapped\",[12488]],[[65413,65413],\"mapped\",[12490]],[[65414,65414],\"mapped\",[12491]],[[65415,65415],\"mapped\",[12492]],[[65416,65416],\"mapped\",[12493]],[[65417,65417],\"mapped\",[12494]],[[65418,65418],\"mapped\",[12495]],[[65419,65419],\"mapped\",[12498]],[[65420,65420],\"mapped\",[12501]],[[65421,65421],\"mapped\",[12504]],[[65422,65422],\"mapped\",[12507]],[[65423,65423],\"mapped\",[12510]],[[65424,65424],\"mapped\",[12511]],[[65425,65425],\"mapped\",[12512]],[[65426,65426],\"mapped\",[12513]],[[65427,65427],\"mapped\",[12514]],[[65428,65428],\"mapped\",[12516]],[[65429,65429],\"mapped\",[12518]],[[65430,65430],\"mapped\",[12520]],[[65431,65431],\"mapped\",[12521]],[[65432,65432],\"mapped\",[12522]],[[65433,65433],\"mapped\",[12523]],[[65434,65434],\"mapped\",[12524]],[[65435,65435],\"mapped\",[12525]],[[65436,65436],\"mapped\",[12527]],[[65437,65437],\"mapped\",[12531]],[[65438,65438],\"mapped\",[12441]],[[65439,65439],\"mapped\",[12442]],[[65440,65440],\"disallowed\"],[[65441,65441],\"mapped\",[4352]],[[65442,65442],\"mapped\",[4353]],[[65443,65443],\"mapped\",[4522]],[[65444,65444],\"mapped\",[4354]],[[65445,65445],\"mapped\",[4524]],[[65446,65446],\"mapped\",[4525]],[[65447,65447],\"mapped\",[4355]],[[65448,65448],\"mapped\",[4356]],[[65449,65449],\"mapped\",[4357]],[[65450,65450],\"mapped\",[4528]],[[65451,65451],\"mapped\",[4529]],[[65452,65452],\"mapped\",[4530]],[[65453,65453],\"mapped\",[4531]],[[65454,65454],\"mapped\",[4532]],[[65455,65455],\"mapped\",[4533]],[[65456,65456],\"mapped\",[4378]],[[65457,65457],\"mapped\",[4358]],[[65458,65458],\"mapped\",[4359]],[[65459,65459],\"mapped\",[4360]],[[65460,65460],\"mapped\",[4385]],[[65461,65461],\"mapped\",[4361]],[[65462,65462],\"mapped\",[4362]],[[65463,65463],\"mapped\",[4363]],[[65464,65464],\"mapped\",[4364]],[[65465,65465],\"mapped\",[4365]],[[65466,65466],\"mapped\",[4366]],[[65467,65467],\"mapped\",[4367]],[[65468,65468],\"mapped\",[4368]],[[65469,65469],\"mapped\",[4369]],[[65470,65470],\"mapped\",[4370]],[[65471,65473],\"disallowed\"],[[65474,65474],\"mapped\",[4449]],[[65475,65475],\"mapped\",[4450]],[[65476,65476],\"mapped\",[4451]],[[65477,65477],\"mapped\",[4452]],[[65478,65478],\"mapped\",[4453]],[[65479,65479],\"mapped\",[4454]],[[65480,65481],\"disallowed\"],[[65482,65482],\"mapped\",[4455]],[[65483,65483],\"mapped\",[4456]],[[65484,65484],\"mapped\",[4457]],[[65485,65485],\"mapped\",[4458]],[[65486,65486],\"mapped\",[4459]],[[65487,65487],\"mapped\",[4460]],[[65488,65489],\"disallowed\"],[[65490,65490],\"mapped\",[4461]],[[65491,65491],\"mapped\",[4462]],[[65492,65492],\"mapped\",[4463]],[[65493,65493],\"mapped\",[4464]],[[65494,65494],\"mapped\",[4465]],[[65495,65495],\"mapped\",[4466]],[[65496,65497],\"disallowed\"],[[65498,65498],\"mapped\",[4467]],[[65499,65499],\"mapped\",[4468]],[[65500,65500],\"mapped\",[4469]],[[65501,65503],\"disallowed\"],[[65504,65504],\"mapped\",[162]],[[65505,65505],\"mapped\",[163]],[[65506,65506],\"mapped\",[172]],[[65507,65507],\"disallowed_STD3_mapped\",[32,772]],[[65508,65508],\"mapped\",[166]],[[65509,65509],\"mapped\",[165]],[[65510,65510],\"mapped\",[8361]],[[65511,65511],\"disallowed\"],[[65512,65512],\"mapped\",[9474]],[[65513,65513],\"mapped\",[8592]],[[65514,65514],\"mapped\",[8593]],[[65515,65515],\"mapped\",[8594]],[[65516,65516],\"mapped\",[8595]],[[65517,65517],\"mapped\",[9632]],[[65518,65518],\"mapped\",[9675]],[[65519,65528],\"disallowed\"],[[65529,65531],\"disallowed\"],[[65532,65532],\"disallowed\"],[[65533,65533],\"disallowed\"],[[65534,65535],\"disallowed\"],[[65536,65547],\"valid\"],[[65548,65548],\"disallowed\"],[[65549,65574],\"valid\"],[[65575,65575],\"disallowed\"],[[65576,65594],\"valid\"],[[65595,65595],\"disallowed\"],[[65596,65597],\"valid\"],[[65598,65598],\"disallowed\"],[[65599,65613],\"valid\"],[[65614,65615],\"disallowed\"],[[65616,65629],\"valid\"],[[65630,65663],\"disallowed\"],[[65664,65786],\"valid\"],[[65787,65791],\"disallowed\"],[[65792,65794],\"valid\",[],\"NV8\"],[[65795,65798],\"disallowed\"],[[65799,65843],\"valid\",[],\"NV8\"],[[65844,65846],\"disallowed\"],[[65847,65855],\"valid\",[],\"NV8\"],[[65856,65930],\"valid\",[],\"NV8\"],[[65931,65932],\"valid\",[],\"NV8\"],[[65933,65935],\"disallowed\"],[[65936,65947],\"valid\",[],\"NV8\"],[[65948,65951],\"disallowed\"],[[65952,65952],\"valid\",[],\"NV8\"],[[65953,65999],\"disallowed\"],[[66000,66044],\"valid\",[],\"NV8\"],[[66045,66045],\"valid\"],[[66046,66175],\"disallowed\"],[[66176,66204],\"valid\"],[[66205,66207],\"disallowed\"],[[66208,66256],\"valid\"],[[66257,66271],\"disallowed\"],[[66272,66272],\"valid\"],[[66273,66299],\"valid\",[],\"NV8\"],[[66300,66303],\"disallowed\"],[[66304,66334],\"valid\"],[[66335,66335],\"valid\"],[[66336,66339],\"valid\",[],\"NV8\"],[[66340,66351],\"disallowed\"],[[66352,66368],\"valid\"],[[66369,66369],\"valid\",[],\"NV8\"],[[66370,66377],\"valid\"],[[66378,66378],\"valid\",[],\"NV8\"],[[66379,66383],\"disallowed\"],[[66384,66426],\"valid\"],[[66427,66431],\"disallowed\"],[[66432,66461],\"valid\"],[[66462,66462],\"disallowed\"],[[66463,66463],\"valid\",[],\"NV8\"],[[66464,66499],\"valid\"],[[66500,66503],\"disallowed\"],[[66504,66511],\"valid\"],[[66512,66517],\"valid\",[],\"NV8\"],[[66518,66559],\"disallowed\"],[[66560,66560],\"mapped\",[66600]],[[66561,66561],\"mapped\",[66601]],[[66562,66562],\"mapped\",[66602]],[[66563,66563],\"mapped\",[66603]],[[66564,66564],\"mapped\",[66604]],[[66565,66565],\"mapped\",[66605]],[[66566,66566],\"mapped\",[66606]],[[66567,66567],\"mapped\",[66607]],[[66568,66568],\"mapped\",[66608]],[[66569,66569],\"mapped\",[66609]],[[66570,66570],\"mapped\",[66610]],[[66571,66571],\"mapped\",[66611]],[[66572,66572],\"mapped\",[66612]],[[66573,66573],\"mapped\",[66613]],[[66574,66574],\"mapped\",[66614]],[[66575,66575],\"mapped\",[66615]],[[66576,66576],\"mapped\",[66616]],[[66577,66577],\"mapped\",[66617]],[[66578,66578],\"mapped\",[66618]],[[66579,66579],\"mapped\",[66619]],[[66580,66580],\"mapped\",[66620]],[[66581,66581],\"mapped\",[66621]],[[66582,66582],\"mapped\",[66622]],[[66583,66583],\"mapped\",[66623]],[[66584,66584],\"mapped\",[66624]],[[66585,66585],\"mapped\",[66625]],[[66586,66586],\"mapped\",[66626]],[[66587,66587],\"mapped\",[66627]],[[66588,66588],\"mapped\",[66628]],[[66589,66589],\"mapped\",[66629]],[[66590,66590],\"mapped\",[66630]],[[66591,66591],\"mapped\",[66631]],[[66592,66592],\"mapped\",[66632]],[[66593,66593],\"mapped\",[66633]],[[66594,66594],\"mapped\",[66634]],[[66595,66595],\"mapped\",[66635]],[[66596,66596],\"mapped\",[66636]],[[66597,66597],\"mapped\",[66637]],[[66598,66598],\"mapped\",[66638]],[[66599,66599],\"mapped\",[66639]],[[66600,66637],\"valid\"],[[66638,66717],\"valid\"],[[66718,66719],\"disallowed\"],[[66720,66729],\"valid\"],[[66730,66815],\"disallowed\"],[[66816,66855],\"valid\"],[[66856,66863],\"disallowed\"],[[66864,66915],\"valid\"],[[66916,66926],\"disallowed\"],[[66927,66927],\"valid\",[],\"NV8\"],[[66928,67071],\"disallowed\"],[[67072,67382],\"valid\"],[[67383,67391],\"disallowed\"],[[67392,67413],\"valid\"],[[67414,67423],\"disallowed\"],[[67424,67431],\"valid\"],[[67432,67583],\"disallowed\"],[[67584,67589],\"valid\"],[[67590,67591],\"disallowed\"],[[67592,67592],\"valid\"],[[67593,67593],\"disallowed\"],[[67594,67637],\"valid\"],[[67638,67638],\"disallowed\"],[[67639,67640],\"valid\"],[[67641,67643],\"disallowed\"],[[67644,67644],\"valid\"],[[67645,67646],\"disallowed\"],[[67647,67647],\"valid\"],[[67648,67669],\"valid\"],[[67670,67670],\"disallowed\"],[[67671,67679],\"valid\",[],\"NV8\"],[[67680,67702],\"valid\"],[[67703,67711],\"valid\",[],\"NV8\"],[[67712,67742],\"valid\"],[[67743,67750],\"disallowed\"],[[67751,67759],\"valid\",[],\"NV8\"],[[67760,67807],\"disallowed\"],[[67808,67826],\"valid\"],[[67827,67827],\"disallowed\"],[[67828,67829],\"valid\"],[[67830,67834],\"disallowed\"],[[67835,67839],\"valid\",[],\"NV8\"],[[67840,67861],\"valid\"],[[67862,67865],\"valid\",[],\"NV8\"],[[67866,67867],\"valid\",[],\"NV8\"],[[67868,67870],\"disallowed\"],[[67871,67871],\"valid\",[],\"NV8\"],[[67872,67897],\"valid\"],[[67898,67902],\"disallowed\"],[[67903,67903],\"valid\",[],\"NV8\"],[[67904,67967],\"disallowed\"],[[67968,68023],\"valid\"],[[68024,68027],\"disallowed\"],[[68028,68029],\"valid\",[],\"NV8\"],[[68030,68031],\"valid\"],[[68032,68047],\"valid\",[],\"NV8\"],[[68048,68049],\"disallowed\"],[[68050,68095],\"valid\",[],\"NV8\"],[[68096,68099],\"valid\"],[[68100,68100],\"disallowed\"],[[68101,68102],\"valid\"],[[68103,68107],\"disallowed\"],[[68108,68115],\"valid\"],[[68116,68116],\"disallowed\"],[[68117,68119],\"valid\"],[[68120,68120],\"disallowed\"],[[68121,68147],\"valid\"],[[68148,68151],\"disallowed\"],[[68152,68154],\"valid\"],[[68155,68158],\"disallowed\"],[[68159,68159],\"valid\"],[[68160,68167],\"valid\",[],\"NV8\"],[[68168,68175],\"disallowed\"],[[68176,68184],\"valid\",[],\"NV8\"],[[68185,68191],\"disallowed\"],[[68192,68220],\"valid\"],[[68221,68223],\"valid\",[],\"NV8\"],[[68224,68252],\"valid\"],[[68253,68255],\"valid\",[],\"NV8\"],[[68256,68287],\"disallowed\"],[[68288,68295],\"valid\"],[[68296,68296],\"valid\",[],\"NV8\"],[[68297,68326],\"valid\"],[[68327,68330],\"disallowed\"],[[68331,68342],\"valid\",[],\"NV8\"],[[68343,68351],\"disallowed\"],[[68352,68405],\"valid\"],[[68406,68408],\"disallowed\"],[[68409,68415],\"valid\",[],\"NV8\"],[[68416,68437],\"valid\"],[[68438,68439],\"disallowed\"],[[68440,68447],\"valid\",[],\"NV8\"],[[68448,68466],\"valid\"],[[68467,68471],\"disallowed\"],[[68472,68479],\"valid\",[],\"NV8\"],[[68480,68497],\"valid\"],[[68498,68504],\"disallowed\"],[[68505,68508],\"valid\",[],\"NV8\"],[[68509,68520],\"disallowed\"],[[68521,68527],\"valid\",[],\"NV8\"],[[68528,68607],\"disallowed\"],[[68608,68680],\"valid\"],[[68681,68735],\"disallowed\"],[[68736,68736],\"mapped\",[68800]],[[68737,68737],\"mapped\",[68801]],[[68738,68738],\"mapped\",[68802]],[[68739,68739],\"mapped\",[68803]],[[68740,68740],\"mapped\",[68804]],[[68741,68741],\"mapped\",[68805]],[[68742,68742],\"mapped\",[68806]],[[68743,68743],\"mapped\",[68807]],[[68744,68744],\"mapped\",[68808]],[[68745,68745],\"mapped\",[68809]],[[68746,68746],\"mapped\",[68810]],[[68747,68747],\"mapped\",[68811]],[[68748,68748],\"mapped\",[68812]],[[68749,68749],\"mapped\",[68813]],[[68750,68750],\"mapped\",[68814]],[[68751,68751],\"mapped\",[68815]],[[68752,68752],\"mapped\",[68816]],[[68753,68753],\"mapped\",[68817]],[[68754,68754],\"mapped\",[68818]],[[68755,68755],\"mapped\",[68819]],[[68756,68756],\"mapped\",[68820]],[[68757,68757],\"mapped\",[68821]],[[68758,68758],\"mapped\",[68822]],[[68759,68759],\"mapped\",[68823]],[[68760,68760],\"mapped\",[68824]],[[68761,68761],\"mapped\",[68825]],[[68762,68762],\"mapped\",[68826]],[[68763,68763],\"mapped\",[68827]],[[68764,68764],\"mapped\",[68828]],[[68765,68765],\"mapped\",[68829]],[[68766,68766],\"mapped\",[68830]],[[68767,68767],\"mapped\",[68831]],[[68768,68768],\"mapped\",[68832]],[[68769,68769],\"mapped\",[68833]],[[68770,68770],\"mapped\",[68834]],[[68771,68771],\"mapped\",[68835]],[[68772,68772],\"mapped\",[68836]],[[68773,68773],\"mapped\",[68837]],[[68774,68774],\"mapped\",[68838]],[[68775,68775],\"mapped\",[68839]],[[68776,68776],\"mapped\",[68840]],[[68777,68777],\"mapped\",[68841]],[[68778,68778],\"mapped\",[68842]],[[68779,68779],\"mapped\",[68843]],[[68780,68780],\"mapped\",[68844]],[[68781,68781],\"mapped\",[68845]],[[68782,68782],\"mapped\",[68846]],[[68783,68783],\"mapped\",[68847]],[[68784,68784],\"mapped\",[68848]],[[68785,68785],\"mapped\",[68849]],[[68786,68786],\"mapped\",[68850]],[[68787,68799],\"disallowed\"],[[68800,68850],\"valid\"],[[68851,68857],\"disallowed\"],[[68858,68863],\"valid\",[],\"NV8\"],[[68864,69215],\"disallowed\"],[[69216,69246],\"valid\",[],\"NV8\"],[[69247,69631],\"disallowed\"],[[69632,69702],\"valid\"],[[69703,69709],\"valid\",[],\"NV8\"],[[69710,69713],\"disallowed\"],[[69714,69733],\"valid\",[],\"NV8\"],[[69734,69743],\"valid\"],[[69744,69758],\"disallowed\"],[[69759,69759],\"valid\"],[[69760,69818],\"valid\"],[[69819,69820],\"valid\",[],\"NV8\"],[[69821,69821],\"disallowed\"],[[69822,69825],\"valid\",[],\"NV8\"],[[69826,69839],\"disallowed\"],[[69840,69864],\"valid\"],[[69865,69871],\"disallowed\"],[[69872,69881],\"valid\"],[[69882,69887],\"disallowed\"],[[69888,69940],\"valid\"],[[69941,69941],\"disallowed\"],[[69942,69951],\"valid\"],[[69952,69955],\"valid\",[],\"NV8\"],[[69956,69967],\"disallowed\"],[[69968,70003],\"valid\"],[[70004,70005],\"valid\",[],\"NV8\"],[[70006,70006],\"valid\"],[[70007,70015],\"disallowed\"],[[70016,70084],\"valid\"],[[70085,70088],\"valid\",[],\"NV8\"],[[70089,70089],\"valid\",[],\"NV8\"],[[70090,70092],\"valid\"],[[70093,70093],\"valid\",[],\"NV8\"],[[70094,70095],\"disallowed\"],[[70096,70105],\"valid\"],[[70106,70106],\"valid\"],[[70107,70107],\"valid\",[],\"NV8\"],[[70108,70108],\"valid\"],[[70109,70111],\"valid\",[],\"NV8\"],[[70112,70112],\"disallowed\"],[[70113,70132],\"valid\",[],\"NV8\"],[[70133,70143],\"disallowed\"],[[70144,70161],\"valid\"],[[70162,70162],\"disallowed\"],[[70163,70199],\"valid\"],[[70200,70205],\"valid\",[],\"NV8\"],[[70206,70271],\"disallowed\"],[[70272,70278],\"valid\"],[[70279,70279],\"disallowed\"],[[70280,70280],\"valid\"],[[70281,70281],\"disallowed\"],[[70282,70285],\"valid\"],[[70286,70286],\"disallowed\"],[[70287,70301],\"valid\"],[[70302,70302],\"disallowed\"],[[70303,70312],\"valid\"],[[70313,70313],\"valid\",[],\"NV8\"],[[70314,70319],\"disallowed\"],[[70320,70378],\"valid\"],[[70379,70383],\"disallowed\"],[[70384,70393],\"valid\"],[[70394,70399],\"disallowed\"],[[70400,70400],\"valid\"],[[70401,70403],\"valid\"],[[70404,70404],\"disallowed\"],[[70405,70412],\"valid\"],[[70413,70414],\"disallowed\"],[[70415,70416],\"valid\"],[[70417,70418],\"disallowed\"],[[70419,70440],\"valid\"],[[70441,70441],\"disallowed\"],[[70442,70448],\"valid\"],[[70449,70449],\"disallowed\"],[[70450,70451],\"valid\"],[[70452,70452],\"disallowed\"],[[70453,70457],\"valid\"],[[70458,70459],\"disallowed\"],[[70460,70468],\"valid\"],[[70469,70470],\"disallowed\"],[[70471,70472],\"valid\"],[[70473,70474],\"disallowed\"],[[70475,70477],\"valid\"],[[70478,70479],\"disallowed\"],[[70480,70480],\"valid\"],[[70481,70486],\"disallowed\"],[[70487,70487],\"valid\"],[[70488,70492],\"disallowed\"],[[70493,70499],\"valid\"],[[70500,70501],\"disallowed\"],[[70502,70508],\"valid\"],[[70509,70511],\"disallowed\"],[[70512,70516],\"valid\"],[[70517,70783],\"disallowed\"],[[70784,70853],\"valid\"],[[70854,70854],\"valid\",[],\"NV8\"],[[70855,70855],\"valid\"],[[70856,70863],\"disallowed\"],[[70864,70873],\"valid\"],[[70874,71039],\"disallowed\"],[[71040,71093],\"valid\"],[[71094,71095],\"disallowed\"],[[71096,71104],\"valid\"],[[71105,71113],\"valid\",[],\"NV8\"],[[71114,71127],\"valid\",[],\"NV8\"],[[71128,71133],\"valid\"],[[71134,71167],\"disallowed\"],[[71168,71232],\"valid\"],[[71233,71235],\"valid\",[],\"NV8\"],[[71236,71236],\"valid\"],[[71237,71247],\"disallowed\"],[[71248,71257],\"valid\"],[[71258,71295],\"disallowed\"],[[71296,71351],\"valid\"],[[71352,71359],\"disallowed\"],[[71360,71369],\"valid\"],[[71370,71423],\"disallowed\"],[[71424,71449],\"valid\"],[[71450,71452],\"disallowed\"],[[71453,71467],\"valid\"],[[71468,71471],\"disallowed\"],[[71472,71481],\"valid\"],[[71482,71487],\"valid\",[],\"NV8\"],[[71488,71839],\"disallowed\"],[[71840,71840],\"mapped\",[71872]],[[71841,71841],\"mapped\",[71873]],[[71842,71842],\"mapped\",[71874]],[[71843,71843],\"mapped\",[71875]],[[71844,71844],\"mapped\",[71876]],[[71845,71845],\"mapped\",[71877]],[[71846,71846],\"mapped\",[71878]],[[71847,71847],\"mapped\",[71879]],[[71848,71848],\"mapped\",[71880]],[[71849,71849],\"mapped\",[71881]],[[71850,71850],\"mapped\",[71882]],[[71851,71851],\"mapped\",[71883]],[[71852,71852],\"mapped\",[71884]],[[71853,71853],\"mapped\",[71885]],[[71854,71854],\"mapped\",[71886]],[[71855,71855],\"mapped\",[71887]],[[71856,71856],\"mapped\",[71888]],[[71857,71857],\"mapped\",[71889]],[[71858,71858],\"mapped\",[71890]],[[71859,71859],\"mapped\",[71891]],[[71860,71860],\"mapped\",[71892]],[[71861,71861],\"mapped\",[71893]],[[71862,71862],\"mapped\",[71894]],[[71863,71863],\"mapped\",[71895]],[[71864,71864],\"mapped\",[71896]],[[71865,71865],\"mapped\",[71897]],[[71866,71866],\"mapped\",[71898]],[[71867,71867],\"mapped\",[71899]],[[71868,71868],\"mapped\",[71900]],[[71869,71869],\"mapped\",[71901]],[[71870,71870],\"mapped\",[71902]],[[71871,71871],\"mapped\",[71903]],[[71872,71913],\"valid\"],[[71914,71922],\"valid\",[],\"NV8\"],[[71923,71934],\"disallowed\"],[[71935,71935],\"valid\"],[[71936,72383],\"disallowed\"],[[72384,72440],\"valid\"],[[72441,73727],\"disallowed\"],[[73728,74606],\"valid\"],[[74607,74648],\"valid\"],[[74649,74649],\"valid\"],[[74650,74751],\"disallowed\"],[[74752,74850],\"valid\",[],\"NV8\"],[[74851,74862],\"valid\",[],\"NV8\"],[[74863,74863],\"disallowed\"],[[74864,74867],\"valid\",[],\"NV8\"],[[74868,74868],\"valid\",[],\"NV8\"],[[74869,74879],\"disallowed\"],[[74880,75075],\"valid\"],[[75076,77823],\"disallowed\"],[[77824,78894],\"valid\"],[[78895,82943],\"disallowed\"],[[82944,83526],\"valid\"],[[83527,92159],\"disallowed\"],[[92160,92728],\"valid\"],[[92729,92735],\"disallowed\"],[[92736,92766],\"valid\"],[[92767,92767],\"disallowed\"],[[92768,92777],\"valid\"],[[92778,92781],\"disallowed\"],[[92782,92783],\"valid\",[],\"NV8\"],[[92784,92879],\"disallowed\"],[[92880,92909],\"valid\"],[[92910,92911],\"disallowed\"],[[92912,92916],\"valid\"],[[92917,92917],\"valid\",[],\"NV8\"],[[92918,92927],\"disallowed\"],[[92928,92982],\"valid\"],[[92983,92991],\"valid\",[],\"NV8\"],[[92992,92995],\"valid\"],[[92996,92997],\"valid\",[],\"NV8\"],[[92998,93007],\"disallowed\"],[[93008,93017],\"valid\"],[[93018,93018],\"disallowed\"],[[93019,93025],\"valid\",[],\"NV8\"],[[93026,93026],\"disallowed\"],[[93027,93047],\"valid\"],[[93048,93052],\"disallowed\"],[[93053,93071],\"valid\"],[[93072,93951],\"disallowed\"],[[93952,94020],\"valid\"],[[94021,94031],\"disallowed\"],[[94032,94078],\"valid\"],[[94079,94094],\"disallowed\"],[[94095,94111],\"valid\"],[[94112,110591],\"disallowed\"],[[110592,110593],\"valid\"],[[110594,113663],\"disallowed\"],[[113664,113770],\"valid\"],[[113771,113775],\"disallowed\"],[[113776,113788],\"valid\"],[[113789,113791],\"disallowed\"],[[113792,113800],\"valid\"],[[113801,113807],\"disallowed\"],[[113808,113817],\"valid\"],[[113818,113819],\"disallowed\"],[[113820,113820],\"valid\",[],\"NV8\"],[[113821,113822],\"valid\"],[[113823,113823],\"valid\",[],\"NV8\"],[[113824,113827],\"ignored\"],[[113828,118783],\"disallowed\"],[[118784,119029],\"valid\",[],\"NV8\"],[[119030,119039],\"disallowed\"],[[119040,119078],\"valid\",[],\"NV8\"],[[119079,119080],\"disallowed\"],[[119081,119081],\"valid\",[],\"NV8\"],[[119082,119133],\"valid\",[],\"NV8\"],[[119134,119134],\"mapped\",[119127,119141]],[[119135,119135],\"mapped\",[119128,119141]],[[119136,119136],\"mapped\",[119128,119141,119150]],[[119137,119137],\"mapped\",[119128,119141,119151]],[[119138,119138],\"mapped\",[119128,119141,119152]],[[119139,119139],\"mapped\",[119128,119141,119153]],[[119140,119140],\"mapped\",[119128,119141,119154]],[[119141,119154],\"valid\",[],\"NV8\"],[[119155,119162],\"disallowed\"],[[119163,119226],\"valid\",[],\"NV8\"],[[119227,119227],\"mapped\",[119225,119141]],[[119228,119228],\"mapped\",[119226,119141]],[[119229,119229],\"mapped\",[119225,119141,119150]],[[119230,119230],\"mapped\",[119226,119141,119150]],[[119231,119231],\"mapped\",[119225,119141,119151]],[[119232,119232],\"mapped\",[119226,119141,119151]],[[119233,119261],\"valid\",[],\"NV8\"],[[119262,119272],\"valid\",[],\"NV8\"],[[119273,119295],\"disallowed\"],[[119296,119365],\"valid\",[],\"NV8\"],[[119366,119551],\"disallowed\"],[[119552,119638],\"valid\",[],\"NV8\"],[[119639,119647],\"disallowed\"],[[119648,119665],\"valid\",[],\"NV8\"],[[119666,119807],\"disallowed\"],[[119808,119808],\"mapped\",[97]],[[119809,119809],\"mapped\",[98]],[[119810,119810],\"mapped\",[99]],[[119811,119811],\"mapped\",[100]],[[119812,119812],\"mapped\",[101]],[[119813,119813],\"mapped\",[102]],[[119814,119814],\"mapped\",[103]],[[119815,119815],\"mapped\",[104]],[[119816,119816],\"mapped\",[105]],[[119817,119817],\"mapped\",[106]],[[119818,119818],\"mapped\",[107]],[[119819,119819],\"mapped\",[108]],[[119820,119820],\"mapped\",[109]],[[119821,119821],\"mapped\",[110]],[[119822,119822],\"mapped\",[111]],[[119823,119823],\"mapped\",[112]],[[119824,119824],\"mapped\",[113]],[[119825,119825],\"mapped\",[114]],[[119826,119826],\"mapped\",[115]],[[119827,119827],\"mapped\",[116]],[[119828,119828],\"mapped\",[117]],[[119829,119829],\"mapped\",[118]],[[119830,119830],\"mapped\",[119]],[[119831,119831],\"mapped\",[120]],[[119832,119832],\"mapped\",[121]],[[119833,119833],\"mapped\",[122]],[[119834,119834],\"mapped\",[97]],[[119835,119835],\"mapped\",[98]],[[119836,119836],\"mapped\",[99]],[[119837,119837],\"mapped\",[100]],[[119838,119838],\"mapped\",[101]],[[119839,119839],\"mapped\",[102]],[[119840,119840],\"mapped\",[103]],[[119841,119841],\"mapped\",[104]],[[119842,119842],\"mapped\",[105]],[[119843,119843],\"mapped\",[106]],[[119844,119844],\"mapped\",[107]],[[119845,119845],\"mapped\",[108]],[[119846,119846],\"mapped\",[109]],[[119847,119847],\"mapped\",[110]],[[119848,119848],\"mapped\",[111]],[[119849,119849],\"mapped\",[112]],[[119850,119850],\"mapped\",[113]],[[119851,119851],\"mapped\",[114]],[[119852,119852],\"mapped\",[115]],[[119853,119853],\"mapped\",[116]],[[119854,119854],\"mapped\",[117]],[[119855,119855],\"mapped\",[118]],[[119856,119856],\"mapped\",[119]],[[119857,119857],\"mapped\",[120]],[[119858,119858],\"mapped\",[121]],[[119859,119859],\"mapped\",[122]],[[119860,119860],\"mapped\",[97]],[[119861,119861],\"mapped\",[98]],[[119862,119862],\"mapped\",[99]],[[119863,119863],\"mapped\",[100]],[[119864,119864],\"mapped\",[101]],[[119865,119865],\"mapped\",[102]],[[119866,119866],\"mapped\",[103]],[[119867,119867],\"mapped\",[104]],[[119868,119868],\"mapped\",[105]],[[119869,119869],\"mapped\",[106]],[[119870,119870],\"mapped\",[107]],[[119871,119871],\"mapped\",[108]],[[119872,119872],\"mapped\",[109]],[[119873,119873],\"mapped\",[110]],[[119874,119874],\"mapped\",[111]],[[119875,119875],\"mapped\",[112]],[[119876,119876],\"mapped\",[113]],[[119877,119877],\"mapped\",[114]],[[119878,119878],\"mapped\",[115]],[[119879,119879],\"mapped\",[116]],[[119880,119880],\"mapped\",[117]],[[119881,119881],\"mapped\",[118]],[[119882,119882],\"mapped\",[119]],[[119883,119883],\"mapped\",[120]],[[119884,119884],\"mapped\",[121]],[[119885,119885],\"mapped\",[122]],[[119886,119886],\"mapped\",[97]],[[119887,119887],\"mapped\",[98]],[[119888,119888],\"mapped\",[99]],[[119889,119889],\"mapped\",[100]],[[119890,119890],\"mapped\",[101]],[[119891,119891],\"mapped\",[102]],[[119892,119892],\"mapped\",[103]],[[119893,119893],\"disallowed\"],[[119894,119894],\"mapped\",[105]],[[119895,119895],\"mapped\",[106]],[[119896,119896],\"mapped\",[107]],[[119897,119897],\"mapped\",[108]],[[119898,119898],\"mapped\",[109]],[[119899,119899],\"mapped\",[110]],[[119900,119900],\"mapped\",[111]],[[119901,119901],\"mapped\",[112]],[[119902,119902],\"mapped\",[113]],[[119903,119903],\"mapped\",[114]],[[119904,119904],\"mapped\",[115]],[[119905,119905],\"mapped\",[116]],[[119906,119906],\"mapped\",[117]],[[119907,119907],\"mapped\",[118]],[[119908,119908],\"mapped\",[119]],[[119909,119909],\"mapped\",[120]],[[119910,119910],\"mapped\",[121]],[[119911,119911],\"mapped\",[122]],[[119912,119912],\"mapped\",[97]],[[119913,119913],\"mapped\",[98]],[[119914,119914],\"mapped\",[99]],[[119915,119915],\"mapped\",[100]],[[119916,119916],\"mapped\",[101]],[[119917,119917],\"mapped\",[102]],[[119918,119918],\"mapped\",[103]],[[119919,119919],\"mapped\",[104]],[[119920,119920],\"mapped\",[105]],[[119921,119921],\"mapped\",[106]],[[119922,119922],\"mapped\",[107]],[[119923,119923],\"mapped\",[108]],[[119924,119924],\"mapped\",[109]],[[119925,119925],\"mapped\",[110]],[[119926,119926],\"mapped\",[111]],[[119927,119927],\"mapped\",[112]],[[119928,119928],\"mapped\",[113]],[[119929,119929],\"mapped\",[114]],[[119930,119930],\"mapped\",[115]],[[119931,119931],\"mapped\",[116]],[[119932,119932],\"mapped\",[117]],[[119933,119933],\"mapped\",[118]],[[119934,119934],\"mapped\",[119]],[[119935,119935],\"mapped\",[120]],[[119936,119936],\"mapped\",[121]],[[119937,119937],\"mapped\",[122]],[[119938,119938],\"mapped\",[97]],[[119939,119939],\"mapped\",[98]],[[119940,119940],\"mapped\",[99]],[[119941,119941],\"mapped\",[100]],[[119942,119942],\"mapped\",[101]],[[119943,119943],\"mapped\",[102]],[[119944,119944],\"mapped\",[103]],[[119945,119945],\"mapped\",[104]],[[119946,119946],\"mapped\",[105]],[[119947,119947],\"mapped\",[106]],[[119948,119948],\"mapped\",[107]],[[119949,119949],\"mapped\",[108]],[[119950,119950],\"mapped\",[109]],[[119951,119951],\"mapped\",[110]],[[119952,119952],\"mapped\",[111]],[[119953,119953],\"mapped\",[112]],[[119954,119954],\"mapped\",[113]],[[119955,119955],\"mapped\",[114]],[[119956,119956],\"mapped\",[115]],[[119957,119957],\"mapped\",[116]],[[119958,119958],\"mapped\",[117]],[[119959,119959],\"mapped\",[118]],[[119960,119960],\"mapped\",[119]],[[119961,119961],\"mapped\",[120]],[[119962,119962],\"mapped\",[121]],[[119963,119963],\"mapped\",[122]],[[119964,119964],\"mapped\",[97]],[[119965,119965],\"disallowed\"],[[119966,119966],\"mapped\",[99]],[[119967,119967],\"mapped\",[100]],[[119968,119969],\"disallowed\"],[[119970,119970],\"mapped\",[103]],[[119971,119972],\"disallowed\"],[[119973,119973],\"mapped\",[106]],[[119974,119974],\"mapped\",[107]],[[119975,119976],\"disallowed\"],[[119977,119977],\"mapped\",[110]],[[119978,119978],\"mapped\",[111]],[[119979,119979],\"mapped\",[112]],[[119980,119980],\"mapped\",[113]],[[119981,119981],\"disallowed\"],[[119982,119982],\"mapped\",[115]],[[119983,119983],\"mapped\",[116]],[[119984,119984],\"mapped\",[117]],[[119985,119985],\"mapped\",[118]],[[119986,119986],\"mapped\",[119]],[[119987,119987],\"mapped\",[120]],[[119988,119988],\"mapped\",[121]],[[119989,119989],\"mapped\",[122]],[[119990,119990],\"mapped\",[97]],[[119991,119991],\"mapped\",[98]],[[119992,119992],\"mapped\",[99]],[[119993,119993],\"mapped\",[100]],[[119994,119994],\"disallowed\"],[[119995,119995],\"mapped\",[102]],[[119996,119996],\"disallowed\"],[[119997,119997],\"mapped\",[104]],[[119998,119998],\"mapped\",[105]],[[119999,119999],\"mapped\",[106]],[[120000,120000],\"mapped\",[107]],[[120001,120001],\"mapped\",[108]],[[120002,120002],\"mapped\",[109]],[[120003,120003],\"mapped\",[110]],[[120004,120004],\"disallowed\"],[[120005,120005],\"mapped\",[112]],[[120006,120006],\"mapped\",[113]],[[120007,120007],\"mapped\",[114]],[[120008,120008],\"mapped\",[115]],[[120009,120009],\"mapped\",[116]],[[120010,120010],\"mapped\",[117]],[[120011,120011],\"mapped\",[118]],[[120012,120012],\"mapped\",[119]],[[120013,120013],\"mapped\",[120]],[[120014,120014],\"mapped\",[121]],[[120015,120015],\"mapped\",[122]],[[120016,120016],\"mapped\",[97]],[[120017,120017],\"mapped\",[98]],[[120018,120018],\"mapped\",[99]],[[120019,120019],\"mapped\",[100]],[[120020,120020],\"mapped\",[101]],[[120021,120021],\"mapped\",[102]],[[120022,120022],\"mapped\",[103]],[[120023,120023],\"mapped\",[104]],[[120024,120024],\"mapped\",[105]],[[120025,120025],\"mapped\",[106]],[[120026,120026],\"mapped\",[107]],[[120027,120027],\"mapped\",[108]],[[120028,120028],\"mapped\",[109]],[[120029,120029],\"mapped\",[110]],[[120030,120030],\"mapped\",[111]],[[120031,120031],\"mapped\",[112]],[[120032,120032],\"mapped\",[113]],[[120033,120033],\"mapped\",[114]],[[120034,120034],\"mapped\",[115]],[[120035,120035],\"mapped\",[116]],[[120036,120036],\"mapped\",[117]],[[120037,120037],\"mapped\",[118]],[[120038,120038],\"mapped\",[119]],[[120039,120039],\"mapped\",[120]],[[120040,120040],\"mapped\",[121]],[[120041,120041],\"mapped\",[122]],[[120042,120042],\"mapped\",[97]],[[120043,120043],\"mapped\",[98]],[[120044,120044],\"mapped\",[99]],[[120045,120045],\"mapped\",[100]],[[120046,120046],\"mapped\",[101]],[[120047,120047],\"mapped\",[102]],[[120048,120048],\"mapped\",[103]],[[120049,120049],\"mapped\",[104]],[[120050,120050],\"mapped\",[105]],[[120051,120051],\"mapped\",[106]],[[120052,120052],\"mapped\",[107]],[[120053,120053],\"mapped\",[108]],[[120054,120054],\"mapped\",[109]],[[120055,120055],\"mapped\",[110]],[[120056,120056],\"mapped\",[111]],[[120057,120057],\"mapped\",[112]],[[120058,120058],\"mapped\",[113]],[[120059,120059],\"mapped\",[114]],[[120060,120060],\"mapped\",[115]],[[120061,120061],\"mapped\",[116]],[[120062,120062],\"mapped\",[117]],[[120063,120063],\"mapped\",[118]],[[120064,120064],\"mapped\",[119]],[[120065,120065],\"mapped\",[120]],[[120066,120066],\"mapped\",[121]],[[120067,120067],\"mapped\",[122]],[[120068,120068],\"mapped\",[97]],[[120069,120069],\"mapped\",[98]],[[120070,120070],\"disallowed\"],[[120071,120071],\"mapped\",[100]],[[120072,120072],\"mapped\",[101]],[[120073,120073],\"mapped\",[102]],[[120074,120074],\"mapped\",[103]],[[120075,120076],\"disallowed\"],[[120077,120077],\"mapped\",[106]],[[120078,120078],\"mapped\",[107]],[[120079,120079],\"mapped\",[108]],[[120080,120080],\"mapped\",[109]],[[120081,120081],\"mapped\",[110]],[[120082,120082],\"mapped\",[111]],[[120083,120083],\"mapped\",[112]],[[120084,120084],\"mapped\",[113]],[[120085,120085],\"disallowed\"],[[120086,120086],\"mapped\",[115]],[[120087,120087],\"mapped\",[116]],[[120088,120088],\"mapped\",[117]],[[120089,120089],\"mapped\",[118]],[[120090,120090],\"mapped\",[119]],[[120091,120091],\"mapped\",[120]],[[120092,120092],\"mapped\",[121]],[[120093,120093],\"disallowed\"],[[120094,120094],\"mapped\",[97]],[[120095,120095],\"mapped\",[98]],[[120096,120096],\"mapped\",[99]],[[120097,120097],\"mapped\",[100]],[[120098,120098],\"mapped\",[101]],[[120099,120099],\"mapped\",[102]],[[120100,120100],\"mapped\",[103]],[[120101,120101],\"mapped\",[104]],[[120102,120102],\"mapped\",[105]],[[120103,120103],\"mapped\",[106]],[[120104,120104],\"mapped\",[107]],[[120105,120105],\"mapped\",[108]],[[120106,120106],\"mapped\",[109]],[[120107,120107],\"mapped\",[110]],[[120108,120108],\"mapped\",[111]],[[120109,120109],\"mapped\",[112]],[[120110,120110],\"mapped\",[113]],[[120111,120111],\"mapped\",[114]],[[120112,120112],\"mapped\",[115]],[[120113,120113],\"mapped\",[116]],[[120114,120114],\"mapped\",[117]],[[120115,120115],\"mapped\",[118]],[[120116,120116],\"mapped\",[119]],[[120117,120117],\"mapped\",[120]],[[120118,120118],\"mapped\",[121]],[[120119,120119],\"mapped\",[122]],[[120120,120120],\"mapped\",[97]],[[120121,120121],\"mapped\",[98]],[[120122,120122],\"disallowed\"],[[120123,120123],\"mapped\",[100]],[[120124,120124],\"mapped\",[101]],[[120125,120125],\"mapped\",[102]],[[120126,120126],\"mapped\",[103]],[[120127,120127],\"disallowed\"],[[120128,120128],\"mapped\",[105]],[[120129,120129],\"mapped\",[106]],[[120130,120130],\"mapped\",[107]],[[120131,120131],\"mapped\",[108]],[[120132,120132],\"mapped\",[109]],[[120133,120133],\"disallowed\"],[[120134,120134],\"mapped\",[111]],[[120135,120137],\"disallowed\"],[[120138,120138],\"mapped\",[115]],[[120139,120139],\"mapped\",[116]],[[120140,120140],\"mapped\",[117]],[[120141,120141],\"mapped\",[118]],[[120142,120142],\"mapped\",[119]],[[120143,120143],\"mapped\",[120]],[[120144,120144],\"mapped\",[121]],[[120145,120145],\"disallowed\"],[[120146,120146],\"mapped\",[97]],[[120147,120147],\"mapped\",[98]],[[120148,120148],\"mapped\",[99]],[[120149,120149],\"mapped\",[100]],[[120150,120150],\"mapped\",[101]],[[120151,120151],\"mapped\",[102]],[[120152,120152],\"mapped\",[103]],[[120153,120153],\"mapped\",[104]],[[120154,120154],\"mapped\",[105]],[[120155,120155],\"mapped\",[106]],[[120156,120156],\"mapped\",[107]],[[120157,120157],\"mapped\",[108]],[[120158,120158],\"mapped\",[109]],[[120159,120159],\"mapped\",[110]],[[120160,120160],\"mapped\",[111]],[[120161,120161],\"mapped\",[112]],[[120162,120162],\"mapped\",[113]],[[120163,120163],\"mapped\",[114]],[[120164,120164],\"mapped\",[115]],[[120165,120165],\"mapped\",[116]],[[120166,120166],\"mapped\",[117]],[[120167,120167],\"mapped\",[118]],[[120168,120168],\"mapped\",[119]],[[120169,120169],\"mapped\",[120]],[[120170,120170],\"mapped\",[121]],[[120171,120171],\"mapped\",[122]],[[120172,120172],\"mapped\",[97]],[[120173,120173],\"mapped\",[98]],[[120174,120174],\"mapped\",[99]],[[120175,120175],\"mapped\",[100]],[[120176,120176],\"mapped\",[101]],[[120177,120177],\"mapped\",[102]],[[120178,120178],\"mapped\",[103]],[[120179,120179],\"mapped\",[104]],[[120180,120180],\"mapped\",[105]],[[120181,120181],\"mapped\",[106]],[[120182,120182],\"mapped\",[107]],[[120183,120183],\"mapped\",[108]],[[120184,120184],\"mapped\",[109]],[[120185,120185],\"mapped\",[110]],[[120186,120186],\"mapped\",[111]],[[120187,120187],\"mapped\",[112]],[[120188,120188],\"mapped\",[113]],[[120189,120189],\"mapped\",[114]],[[120190,120190],\"mapped\",[115]],[[120191,120191],\"mapped\",[116]],[[120192,120192],\"mapped\",[117]],[[120193,120193],\"mapped\",[118]],[[120194,120194],\"mapped\",[119]],[[120195,120195],\"mapped\",[120]],[[120196,120196],\"mapped\",[121]],[[120197,120197],\"mapped\",[122]],[[120198,120198],\"mapped\",[97]],[[120199,120199],\"mapped\",[98]],[[120200,120200],\"mapped\",[99]],[[120201,120201],\"mapped\",[100]],[[120202,120202],\"mapped\",[101]],[[120203,120203],\"mapped\",[102]],[[120204,120204],\"mapped\",[103]],[[120205,120205],\"mapped\",[104]],[[120206,120206],\"mapped\",[105]],[[120207,120207],\"mapped\",[106]],[[120208,120208],\"mapped\",[107]],[[120209,120209],\"mapped\",[108]],[[120210,120210],\"mapped\",[109]],[[120211,120211],\"mapped\",[110]],[[120212,120212],\"mapped\",[111]],[[120213,120213],\"mapped\",[112]],[[120214,120214],\"mapped\",[113]],[[120215,120215],\"mapped\",[114]],[[120216,120216],\"mapped\",[115]],[[120217,120217],\"mapped\",[116]],[[120218,120218],\"mapped\",[117]],[[120219,120219],\"mapped\",[118]],[[120220,120220],\"mapped\",[119]],[[120221,120221],\"mapped\",[120]],[[120222,120222],\"mapped\",[121]],[[120223,120223],\"mapped\",[122]],[[120224,120224],\"mapped\",[97]],[[120225,120225],\"mapped\",[98]],[[120226,120226],\"mapped\",[99]],[[120227,120227],\"mapped\",[100]],[[120228,120228],\"mapped\",[101]],[[120229,120229],\"mapped\",[102]],[[120230,120230],\"mapped\",[103]],[[120231,120231],\"mapped\",[104]],[[120232,120232],\"mapped\",[105]],[[120233,120233],\"mapped\",[106]],[[120234,120234],\"mapped\",[107]],[[120235,120235],\"mapped\",[108]],[[120236,120236],\"mapped\",[109]],[[120237,120237],\"mapped\",[110]],[[120238,120238],\"mapped\",[111]],[[120239,120239],\"mapped\",[112]],[[120240,120240],\"mapped\",[113]],[[120241,120241],\"mapped\",[114]],[[120242,120242],\"mapped\",[115]],[[120243,120243],\"mapped\",[116]],[[120244,120244],\"mapped\",[117]],[[120245,120245],\"mapped\",[118]],[[120246,120246],\"mapped\",[119]],[[120247,120247],\"mapped\",[120]],[[120248,120248],\"mapped\",[121]],[[120249,120249],\"mapped\",[122]],[[120250,120250],\"mapped\",[97]],[[120251,120251],\"mapped\",[98]],[[120252,120252],\"mapped\",[99]],[[120253,120253],\"mapped\",[100]],[[120254,120254],\"mapped\",[101]],[[120255,120255],\"mapped\",[102]],[[120256,120256],\"mapped\",[103]],[[120257,120257],\"mapped\",[104]],[[120258,120258],\"mapped\",[105]],[[120259,120259],\"mapped\",[106]],[[120260,120260],\"mapped\",[107]],[[120261,120261],\"mapped\",[108]],[[120262,120262],\"mapped\",[109]],[[120263,120263],\"mapped\",[110]],[[120264,120264],\"mapped\",[111]],[[120265,120265],\"mapped\",[112]],[[120266,120266],\"mapped\",[113]],[[120267,120267],\"mapped\",[114]],[[120268,120268],\"mapped\",[115]],[[120269,120269],\"mapped\",[116]],[[120270,120270],\"mapped\",[117]],[[120271,120271],\"mapped\",[118]],[[120272,120272],\"mapped\",[119]],[[120273,120273],\"mapped\",[120]],[[120274,120274],\"mapped\",[121]],[[120275,120275],\"mapped\",[122]],[[120276,120276],\"mapped\",[97]],[[120277,120277],\"mapped\",[98]],[[120278,120278],\"mapped\",[99]],[[120279,120279],\"mapped\",[100]],[[120280,120280],\"mapped\",[101]],[[120281,120281],\"mapped\",[102]],[[120282,120282],\"mapped\",[103]],[[120283,120283],\"mapped\",[104]],[[120284,120284],\"mapped\",[105]],[[120285,120285],\"mapped\",[106]],[[120286,120286],\"mapped\",[107]],[[120287,120287],\"mapped\",[108]],[[120288,120288],\"mapped\",[109]],[[120289,120289],\"mapped\",[110]],[[120290,120290],\"mapped\",[111]],[[120291,120291],\"mapped\",[112]],[[120292,120292],\"mapped\",[113]],[[120293,120293],\"mapped\",[114]],[[120294,120294],\"mapped\",[115]],[[120295,120295],\"mapped\",[116]],[[120296,120296],\"mapped\",[117]],[[120297,120297],\"mapped\",[118]],[[120298,120298],\"mapped\",[119]],[[120299,120299],\"mapped\",[120]],[[120300,120300],\"mapped\",[121]],[[120301,120301],\"mapped\",[122]],[[120302,120302],\"mapped\",[97]],[[120303,120303],\"mapped\",[98]],[[120304,120304],\"mapped\",[99]],[[120305,120305],\"mapped\",[100]],[[120306,120306],\"mapped\",[101]],[[120307,120307],\"mapped\",[102]],[[120308,120308],\"mapped\",[103]],[[120309,120309],\"mapped\",[104]],[[120310,120310],\"mapped\",[105]],[[120311,120311],\"mapped\",[106]],[[120312,120312],\"mapped\",[107]],[[120313,120313],\"mapped\",[108]],[[120314,120314],\"mapped\",[109]],[[120315,120315],\"mapped\",[110]],[[120316,120316],\"mapped\",[111]],[[120317,120317],\"mapped\",[112]],[[120318,120318],\"mapped\",[113]],[[120319,120319],\"mapped\",[114]],[[120320,120320],\"mapped\",[115]],[[120321,120321],\"mapped\",[116]],[[120322,120322],\"mapped\",[117]],[[120323,120323],\"mapped\",[118]],[[120324,120324],\"mapped\",[119]],[[120325,120325],\"mapped\",[120]],[[120326,120326],\"mapped\",[121]],[[120327,120327],\"mapped\",[122]],[[120328,120328],\"mapped\",[97]],[[120329,120329],\"mapped\",[98]],[[120330,120330],\"mapped\",[99]],[[120331,120331],\"mapped\",[100]],[[120332,120332],\"mapped\",[101]],[[120333,120333],\"mapped\",[102]],[[120334,120334],\"mapped\",[103]],[[120335,120335],\"mapped\",[104]],[[120336,120336],\"mapped\",[105]],[[120337,120337],\"mapped\",[106]],[[120338,120338],\"mapped\",[107]],[[120339,120339],\"mapped\",[108]],[[120340,120340],\"mapped\",[109]],[[120341,120341],\"mapped\",[110]],[[120342,120342],\"mapped\",[111]],[[120343,120343],\"mapped\",[112]],[[120344,120344],\"mapped\",[113]],[[120345,120345],\"mapped\",[114]],[[120346,120346],\"mapped\",[115]],[[120347,120347],\"mapped\",[116]],[[120348,120348],\"mapped\",[117]],[[120349,120349],\"mapped\",[118]],[[120350,120350],\"mapped\",[119]],[[120351,120351],\"mapped\",[120]],[[120352,120352],\"mapped\",[121]],[[120353,120353],\"mapped\",[122]],[[120354,120354],\"mapped\",[97]],[[120355,120355],\"mapped\",[98]],[[120356,120356],\"mapped\",[99]],[[120357,120357],\"mapped\",[100]],[[120358,120358],\"mapped\",[101]],[[120359,120359],\"mapped\",[102]],[[120360,120360],\"mapped\",[103]],[[120361,120361],\"mapped\",[104]],[[120362,120362],\"mapped\",[105]],[[120363,120363],\"mapped\",[106]],[[120364,120364],\"mapped\",[107]],[[120365,120365],\"mapped\",[108]],[[120366,120366],\"mapped\",[109]],[[120367,120367],\"mapped\",[110]],[[120368,120368],\"mapped\",[111]],[[120369,120369],\"mapped\",[112]],[[120370,120370],\"mapped\",[113]],[[120371,120371],\"mapped\",[114]],[[120372,120372],\"mapped\",[115]],[[120373,120373],\"mapped\",[116]],[[120374,120374],\"mapped\",[117]],[[120375,120375],\"mapped\",[118]],[[120376,120376],\"mapped\",[119]],[[120377,120377],\"mapped\",[120]],[[120378,120378],\"mapped\",[121]],[[120379,120379],\"mapped\",[122]],[[120380,120380],\"mapped\",[97]],[[120381,120381],\"mapped\",[98]],[[120382,120382],\"mapped\",[99]],[[120383,120383],\"mapped\",[100]],[[120384,120384],\"mapped\",[101]],[[120385,120385],\"mapped\",[102]],[[120386,120386],\"mapped\",[103]],[[120387,120387],\"mapped\",[104]],[[120388,120388],\"mapped\",[105]],[[120389,120389],\"mapped\",[106]],[[120390,120390],\"mapped\",[107]],[[120391,120391],\"mapped\",[108]],[[120392,120392],\"mapped\",[109]],[[120393,120393],\"mapped\",[110]],[[120394,120394],\"mapped\",[111]],[[120395,120395],\"mapped\",[112]],[[120396,120396],\"mapped\",[113]],[[120397,120397],\"mapped\",[114]],[[120398,120398],\"mapped\",[115]],[[120399,120399],\"mapped\",[116]],[[120400,120400],\"mapped\",[117]],[[120401,120401],\"mapped\",[118]],[[120402,120402],\"mapped\",[119]],[[120403,120403],\"mapped\",[120]],[[120404,120404],\"mapped\",[121]],[[120405,120405],\"mapped\",[122]],[[120406,120406],\"mapped\",[97]],[[120407,120407],\"mapped\",[98]],[[120408,120408],\"mapped\",[99]],[[120409,120409],\"mapped\",[100]],[[120410,120410],\"mapped\",[101]],[[120411,120411],\"mapped\",[102]],[[120412,120412],\"mapped\",[103]],[[120413,120413],\"mapped\",[104]],[[120414,120414],\"mapped\",[105]],[[120415,120415],\"mapped\",[106]],[[120416,120416],\"mapped\",[107]],[[120417,120417],\"mapped\",[108]],[[120418,120418],\"mapped\",[109]],[[120419,120419],\"mapped\",[110]],[[120420,120420],\"mapped\",[111]],[[120421,120421],\"mapped\",[112]],[[120422,120422],\"mapped\",[113]],[[120423,120423],\"mapped\",[114]],[[120424,120424],\"mapped\",[115]],[[120425,120425],\"mapped\",[116]],[[120426,120426],\"mapped\",[117]],[[120427,120427],\"mapped\",[118]],[[120428,120428],\"mapped\",[119]],[[120429,120429],\"mapped\",[120]],[[120430,120430],\"mapped\",[121]],[[120431,120431],\"mapped\",[122]],[[120432,120432],\"mapped\",[97]],[[120433,120433],\"mapped\",[98]],[[120434,120434],\"mapped\",[99]],[[120435,120435],\"mapped\",[100]],[[120436,120436],\"mapped\",[101]],[[120437,120437],\"mapped\",[102]],[[120438,120438],\"mapped\",[103]],[[120439,120439],\"mapped\",[104]],[[120440,120440],\"mapped\",[105]],[[120441,120441],\"mapped\",[106]],[[120442,120442],\"mapped\",[107]],[[120443,120443],\"mapped\",[108]],[[120444,120444],\"mapped\",[109]],[[120445,120445],\"mapped\",[110]],[[120446,120446],\"mapped\",[111]],[[120447,120447],\"mapped\",[112]],[[120448,120448],\"mapped\",[113]],[[120449,120449],\"mapped\",[114]],[[120450,120450],\"mapped\",[115]],[[120451,120451],\"mapped\",[116]],[[120452,120452],\"mapped\",[117]],[[120453,120453],\"mapped\",[118]],[[120454,120454],\"mapped\",[119]],[[120455,120455],\"mapped\",[120]],[[120456,120456],\"mapped\",[121]],[[120457,120457],\"mapped\",[122]],[[120458,120458],\"mapped\",[97]],[[120459,120459],\"mapped\",[98]],[[120460,120460],\"mapped\",[99]],[[120461,120461],\"mapped\",[100]],[[120462,120462],\"mapped\",[101]],[[120463,120463],\"mapped\",[102]],[[120464,120464],\"mapped\",[103]],[[120465,120465],\"mapped\",[104]],[[120466,120466],\"mapped\",[105]],[[120467,120467],\"mapped\",[106]],[[120468,120468],\"mapped\",[107]],[[120469,120469],\"mapped\",[108]],[[120470,120470],\"mapped\",[109]],[[120471,120471],\"mapped\",[110]],[[120472,120472],\"mapped\",[111]],[[120473,120473],\"mapped\",[112]],[[120474,120474],\"mapped\",[113]],[[120475,120475],\"mapped\",[114]],[[120476,120476],\"mapped\",[115]],[[120477,120477],\"mapped\",[116]],[[120478,120478],\"mapped\",[117]],[[120479,120479],\"mapped\",[118]],[[120480,120480],\"mapped\",[119]],[[120481,120481],\"mapped\",[120]],[[120482,120482],\"mapped\",[121]],[[120483,120483],\"mapped\",[122]],[[120484,120484],\"mapped\",[305]],[[120485,120485],\"mapped\",[567]],[[120486,120487],\"disallowed\"],[[120488,120488],\"mapped\",[945]],[[120489,120489],\"mapped\",[946]],[[120490,120490],\"mapped\",[947]],[[120491,120491],\"mapped\",[948]],[[120492,120492],\"mapped\",[949]],[[120493,120493],\"mapped\",[950]],[[120494,120494],\"mapped\",[951]],[[120495,120495],\"mapped\",[952]],[[120496,120496],\"mapped\",[953]],[[120497,120497],\"mapped\",[954]],[[120498,120498],\"mapped\",[955]],[[120499,120499],\"mapped\",[956]],[[120500,120500],\"mapped\",[957]],[[120501,120501],\"mapped\",[958]],[[120502,120502],\"mapped\",[959]],[[120503,120503],\"mapped\",[960]],[[120504,120504],\"mapped\",[961]],[[120505,120505],\"mapped\",[952]],[[120506,120506],\"mapped\",[963]],[[120507,120507],\"mapped\",[964]],[[120508,120508],\"mapped\",[965]],[[120509,120509],\"mapped\",[966]],[[120510,120510],\"mapped\",[967]],[[120511,120511],\"mapped\",[968]],[[120512,120512],\"mapped\",[969]],[[120513,120513],\"mapped\",[8711]],[[120514,120514],\"mapped\",[945]],[[120515,120515],\"mapped\",[946]],[[120516,120516],\"mapped\",[947]],[[120517,120517],\"mapped\",[948]],[[120518,120518],\"mapped\",[949]],[[120519,120519],\"mapped\",[950]],[[120520,120520],\"mapped\",[951]],[[120521,120521],\"mapped\",[952]],[[120522,120522],\"mapped\",[953]],[[120523,120523],\"mapped\",[954]],[[120524,120524],\"mapped\",[955]],[[120525,120525],\"mapped\",[956]],[[120526,120526],\"mapped\",[957]],[[120527,120527],\"mapped\",[958]],[[120528,120528],\"mapped\",[959]],[[120529,120529],\"mapped\",[960]],[[120530,120530],\"mapped\",[961]],[[120531,120532],\"mapped\",[963]],[[120533,120533],\"mapped\",[964]],[[120534,120534],\"mapped\",[965]],[[120535,120535],\"mapped\",[966]],[[120536,120536],\"mapped\",[967]],[[120537,120537],\"mapped\",[968]],[[120538,120538],\"mapped\",[969]],[[120539,120539],\"mapped\",[8706]],[[120540,120540],\"mapped\",[949]],[[120541,120541],\"mapped\",[952]],[[120542,120542],\"mapped\",[954]],[[120543,120543],\"mapped\",[966]],[[120544,120544],\"mapped\",[961]],[[120545,120545],\"mapped\",[960]],[[120546,120546],\"mapped\",[945]],[[120547,120547],\"mapped\",[946]],[[120548,120548],\"mapped\",[947]],[[120549,120549],\"mapped\",[948]],[[120550,120550],\"mapped\",[949]],[[120551,120551],\"mapped\",[950]],[[120552,120552],\"mapped\",[951]],[[120553,120553],\"mapped\",[952]],[[120554,120554],\"mapped\",[953]],[[120555,120555],\"mapped\",[954]],[[120556,120556],\"mapped\",[955]],[[120557,120557],\"mapped\",[956]],[[120558,120558],\"mapped\",[957]],[[120559,120559],\"mapped\",[958]],[[120560,120560],\"mapped\",[959]],[[120561,120561],\"mapped\",[960]],[[120562,120562],\"mapped\",[961]],[[120563,120563],\"mapped\",[952]],[[120564,120564],\"mapped\",[963]],[[120565,120565],\"mapped\",[964]],[[120566,120566],\"mapped\",[965]],[[120567,120567],\"mapped\",[966]],[[120568,120568],\"mapped\",[967]],[[120569,120569],\"mapped\",[968]],[[120570,120570],\"mapped\",[969]],[[120571,120571],\"mapped\",[8711]],[[120572,120572],\"mapped\",[945]],[[120573,120573],\"mapped\",[946]],[[120574,120574],\"mapped\",[947]],[[120575,120575],\"mapped\",[948]],[[120576,120576],\"mapped\",[949]],[[120577,120577],\"mapped\",[950]],[[120578,120578],\"mapped\",[951]],[[120579,120579],\"mapped\",[952]],[[120580,120580],\"mapped\",[953]],[[120581,120581],\"mapped\",[954]],[[120582,120582],\"mapped\",[955]],[[120583,120583],\"mapped\",[956]],[[120584,120584],\"mapped\",[957]],[[120585,120585],\"mapped\",[958]],[[120586,120586],\"mapped\",[959]],[[120587,120587],\"mapped\",[960]],[[120588,120588],\"mapped\",[961]],[[120589,120590],\"mapped\",[963]],[[120591,120591],\"mapped\",[964]],[[120592,120592],\"mapped\",[965]],[[120593,120593],\"mapped\",[966]],[[120594,120594],\"mapped\",[967]],[[120595,120595],\"mapped\",[968]],[[120596,120596],\"mapped\",[969]],[[120597,120597],\"mapped\",[8706]],[[120598,120598],\"mapped\",[949]],[[120599,120599],\"mapped\",[952]],[[120600,120600],\"mapped\",[954]],[[120601,120601],\"mapped\",[966]],[[120602,120602],\"mapped\",[961]],[[120603,120603],\"mapped\",[960]],[[120604,120604],\"mapped\",[945]],[[120605,120605],\"mapped\",[946]],[[120606,120606],\"mapped\",[947]],[[120607,120607],\"mapped\",[948]],[[120608,120608],\"mapped\",[949]],[[120609,120609],\"mapped\",[950]],[[120610,120610],\"mapped\",[951]],[[120611,120611],\"mapped\",[952]],[[120612,120612],\"mapped\",[953]],[[120613,120613],\"mapped\",[954]],[[120614,120614],\"mapped\",[955]],[[120615,120615],\"mapped\",[956]],[[120616,120616],\"mapped\",[957]],[[120617,120617],\"mapped\",[958]],[[120618,120618],\"mapped\",[959]],[[120619,120619],\"mapped\",[960]],[[120620,120620],\"mapped\",[961]],[[120621,120621],\"mapped\",[952]],[[120622,120622],\"mapped\",[963]],[[120623,120623],\"mapped\",[964]],[[120624,120624],\"mapped\",[965]],[[120625,120625],\"mapped\",[966]],[[120626,120626],\"mapped\",[967]],[[120627,120627],\"mapped\",[968]],[[120628,120628],\"mapped\",[969]],[[120629,120629],\"mapped\",[8711]],[[120630,120630],\"mapped\",[945]],[[120631,120631],\"mapped\",[946]],[[120632,120632],\"mapped\",[947]],[[120633,120633],\"mapped\",[948]],[[120634,120634],\"mapped\",[949]],[[120635,120635],\"mapped\",[950]],[[120636,120636],\"mapped\",[951]],[[120637,120637],\"mapped\",[952]],[[120638,120638],\"mapped\",[953]],[[120639,120639],\"mapped\",[954]],[[120640,120640],\"mapped\",[955]],[[120641,120641],\"mapped\",[956]],[[120642,120642],\"mapped\",[957]],[[120643,120643],\"mapped\",[958]],[[120644,120644],\"mapped\",[959]],[[120645,120645],\"mapped\",[960]],[[120646,120646],\"mapped\",[961]],[[120647,120648],\"mapped\",[963]],[[120649,120649],\"mapped\",[964]],[[120650,120650],\"mapped\",[965]],[[120651,120651],\"mapped\",[966]],[[120652,120652],\"mapped\",[967]],[[120653,120653],\"mapped\",[968]],[[120654,120654],\"mapped\",[969]],[[120655,120655],\"mapped\",[8706]],[[120656,120656],\"mapped\",[949]],[[120657,120657],\"mapped\",[952]],[[120658,120658],\"mapped\",[954]],[[120659,120659],\"mapped\",[966]],[[120660,120660],\"mapped\",[961]],[[120661,120661],\"mapped\",[960]],[[120662,120662],\"mapped\",[945]],[[120663,120663],\"mapped\",[946]],[[120664,120664],\"mapped\",[947]],[[120665,120665],\"mapped\",[948]],[[120666,120666],\"mapped\",[949]],[[120667,120667],\"mapped\",[950]],[[120668,120668],\"mapped\",[951]],[[120669,120669],\"mapped\",[952]],[[120670,120670],\"mapped\",[953]],[[120671,120671],\"mapped\",[954]],[[120672,120672],\"mapped\",[955]],[[120673,120673],\"mapped\",[956]],[[120674,120674],\"mapped\",[957]],[[120675,120675],\"mapped\",[958]],[[120676,120676],\"mapped\",[959]],[[120677,120677],\"mapped\",[960]],[[120678,120678],\"mapped\",[961]],[[120679,120679],\"mapped\",[952]],[[120680,120680],\"mapped\",[963]],[[120681,120681],\"mapped\",[964]],[[120682,120682],\"mapped\",[965]],[[120683,120683],\"mapped\",[966]],[[120684,120684],\"mapped\",[967]],[[120685,120685],\"mapped\",[968]],[[120686,120686],\"mapped\",[969]],[[120687,120687],\"mapped\",[8711]],[[120688,120688],\"mapped\",[945]],[[120689,120689],\"mapped\",[946]],[[120690,120690],\"mapped\",[947]],[[120691,120691],\"mapped\",[948]],[[120692,120692],\"mapped\",[949]],[[120693,120693],\"mapped\",[950]],[[120694,120694],\"mapped\",[951]],[[120695,120695],\"mapped\",[952]],[[120696,120696],\"mapped\",[953]],[[120697,120697],\"mapped\",[954]],[[120698,120698],\"mapped\",[955]],[[120699,120699],\"mapped\",[956]],[[120700,120700],\"mapped\",[957]],[[120701,120701],\"mapped\",[958]],[[120702,120702],\"mapped\",[959]],[[120703,120703],\"mapped\",[960]],[[120704,120704],\"mapped\",[961]],[[120705,120706],\"mapped\",[963]],[[120707,120707],\"mapped\",[964]],[[120708,120708],\"mapped\",[965]],[[120709,120709],\"mapped\",[966]],[[120710,120710],\"mapped\",[967]],[[120711,120711],\"mapped\",[968]],[[120712,120712],\"mapped\",[969]],[[120713,120713],\"mapped\",[8706]],[[120714,120714],\"mapped\",[949]],[[120715,120715],\"mapped\",[952]],[[120716,120716],\"mapped\",[954]],[[120717,120717],\"mapped\",[966]],[[120718,120718],\"mapped\",[961]],[[120719,120719],\"mapped\",[960]],[[120720,120720],\"mapped\",[945]],[[120721,120721],\"mapped\",[946]],[[120722,120722],\"mapped\",[947]],[[120723,120723],\"mapped\",[948]],[[120724,120724],\"mapped\",[949]],[[120725,120725],\"mapped\",[950]],[[120726,120726],\"mapped\",[951]],[[120727,120727],\"mapped\",[952]],[[120728,120728],\"mapped\",[953]],[[120729,120729],\"mapped\",[954]],[[120730,120730],\"mapped\",[955]],[[120731,120731],\"mapped\",[956]],[[120732,120732],\"mapped\",[957]],[[120733,120733],\"mapped\",[958]],[[120734,120734],\"mapped\",[959]],[[120735,120735],\"mapped\",[960]],[[120736,120736],\"mapped\",[961]],[[120737,120737],\"mapped\",[952]],[[120738,120738],\"mapped\",[963]],[[120739,120739],\"mapped\",[964]],[[120740,120740],\"mapped\",[965]],[[120741,120741],\"mapped\",[966]],[[120742,120742],\"mapped\",[967]],[[120743,120743],\"mapped\",[968]],[[120744,120744],\"mapped\",[969]],[[120745,120745],\"mapped\",[8711]],[[120746,120746],\"mapped\",[945]],[[120747,120747],\"mapped\",[946]],[[120748,120748],\"mapped\",[947]],[[120749,120749],\"mapped\",[948]],[[120750,120750],\"mapped\",[949]],[[120751,120751],\"mapped\",[950]],[[120752,120752],\"mapped\",[951]],[[120753,120753],\"mapped\",[952]],[[120754,120754],\"mapped\",[953]],[[120755,120755],\"mapped\",[954]],[[120756,120756],\"mapped\",[955]],[[120757,120757],\"mapped\",[956]],[[120758,120758],\"mapped\",[957]],[[120759,120759],\"mapped\",[958]],[[120760,120760],\"mapped\",[959]],[[120761,120761],\"mapped\",[960]],[[120762,120762],\"mapped\",[961]],[[120763,120764],\"mapped\",[963]],[[120765,120765],\"mapped\",[964]],[[120766,120766],\"mapped\",[965]],[[120767,120767],\"mapped\",[966]],[[120768,120768],\"mapped\",[967]],[[120769,120769],\"mapped\",[968]],[[120770,120770],\"mapped\",[969]],[[120771,120771],\"mapped\",[8706]],[[120772,120772],\"mapped\",[949]],[[120773,120773],\"mapped\",[952]],[[120774,120774],\"mapped\",[954]],[[120775,120775],\"mapped\",[966]],[[120776,120776],\"mapped\",[961]],[[120777,120777],\"mapped\",[960]],[[120778,120779],\"mapped\",[989]],[[120780,120781],\"disallowed\"],[[120782,120782],\"mapped\",[48]],[[120783,120783],\"mapped\",[49]],[[120784,120784],\"mapped\",[50]],[[120785,120785],\"mapped\",[51]],[[120786,120786],\"mapped\",[52]],[[120787,120787],\"mapped\",[53]],[[120788,120788],\"mapped\",[54]],[[120789,120789],\"mapped\",[55]],[[120790,120790],\"mapped\",[56]],[[120791,120791],\"mapped\",[57]],[[120792,120792],\"mapped\",[48]],[[120793,120793],\"mapped\",[49]],[[120794,120794],\"mapped\",[50]],[[120795,120795],\"mapped\",[51]],[[120796,120796],\"mapped\",[52]],[[120797,120797],\"mapped\",[53]],[[120798,120798],\"mapped\",[54]],[[120799,120799],\"mapped\",[55]],[[120800,120800],\"mapped\",[56]],[[120801,120801],\"mapped\",[57]],[[120802,120802],\"mapped\",[48]],[[120803,120803],\"mapped\",[49]],[[120804,120804],\"mapped\",[50]],[[120805,120805],\"mapped\",[51]],[[120806,120806],\"mapped\",[52]],[[120807,120807],\"mapped\",[53]],[[120808,120808],\"mapped\",[54]],[[120809,120809],\"mapped\",[55]],[[120810,120810],\"mapped\",[56]],[[120811,120811],\"mapped\",[57]],[[120812,120812],\"mapped\",[48]],[[120813,120813],\"mapped\",[49]],[[120814,120814],\"mapped\",[50]],[[120815,120815],\"mapped\",[51]],[[120816,120816],\"mapped\",[52]],[[120817,120817],\"mapped\",[53]],[[120818,120818],\"mapped\",[54]],[[120819,120819],\"mapped\",[55]],[[120820,120820],\"mapped\",[56]],[[120821,120821],\"mapped\",[57]],[[120822,120822],\"mapped\",[48]],[[120823,120823],\"mapped\",[49]],[[120824,120824],\"mapped\",[50]],[[120825,120825],\"mapped\",[51]],[[120826,120826],\"mapped\",[52]],[[120827,120827],\"mapped\",[53]],[[120828,120828],\"mapped\",[54]],[[120829,120829],\"mapped\",[55]],[[120830,120830],\"mapped\",[56]],[[120831,120831],\"mapped\",[57]],[[120832,121343],\"valid\",[],\"NV8\"],[[121344,121398],\"valid\"],[[121399,121402],\"valid\",[],\"NV8\"],[[121403,121452],\"valid\"],[[121453,121460],\"valid\",[],\"NV8\"],[[121461,121461],\"valid\"],[[121462,121475],\"valid\",[],\"NV8\"],[[121476,121476],\"valid\"],[[121477,121483],\"valid\",[],\"NV8\"],[[121484,121498],\"disallowed\"],[[121499,121503],\"valid\"],[[121504,121504],\"disallowed\"],[[121505,121519],\"valid\"],[[121520,124927],\"disallowed\"],[[124928,125124],\"valid\"],[[125125,125126],\"disallowed\"],[[125127,125135],\"valid\",[],\"NV8\"],[[125136,125142],\"valid\"],[[125143,126463],\"disallowed\"],[[126464,126464],\"mapped\",[1575]],[[126465,126465],\"mapped\",[1576]],[[126466,126466],\"mapped\",[1580]],[[126467,126467],\"mapped\",[1583]],[[126468,126468],\"disallowed\"],[[126469,126469],\"mapped\",[1608]],[[126470,126470],\"mapped\",[1586]],[[126471,126471],\"mapped\",[1581]],[[126472,126472],\"mapped\",[1591]],[[126473,126473],\"mapped\",[1610]],[[126474,126474],\"mapped\",[1603]],[[126475,126475],\"mapped\",[1604]],[[126476,126476],\"mapped\",[1605]],[[126477,126477],\"mapped\",[1606]],[[126478,126478],\"mapped\",[1587]],[[126479,126479],\"mapped\",[1593]],[[126480,126480],\"mapped\",[1601]],[[126481,126481],\"mapped\",[1589]],[[126482,126482],\"mapped\",[1602]],[[126483,126483],\"mapped\",[1585]],[[126484,126484],\"mapped\",[1588]],[[126485,126485],\"mapped\",[1578]],[[126486,126486],\"mapped\",[1579]],[[126487,126487],\"mapped\",[1582]],[[126488,126488],\"mapped\",[1584]],[[126489,126489],\"mapped\",[1590]],[[126490,126490],\"mapped\",[1592]],[[126491,126491],\"mapped\",[1594]],[[126492,126492],\"mapped\",[1646]],[[126493,126493],\"mapped\",[1722]],[[126494,126494],\"mapped\",[1697]],[[126495,126495],\"mapped\",[1647]],[[126496,126496],\"disallowed\"],[[126497,126497],\"mapped\",[1576]],[[126498,126498],\"mapped\",[1580]],[[126499,126499],\"disallowed\"],[[126500,126500],\"mapped\",[1607]],[[126501,126502],\"disallowed\"],[[126503,126503],\"mapped\",[1581]],[[126504,126504],\"disallowed\"],[[126505,126505],\"mapped\",[1610]],[[126506,126506],\"mapped\",[1603]],[[126507,126507],\"mapped\",[1604]],[[126508,126508],\"mapped\",[1605]],[[126509,126509],\"mapped\",[1606]],[[126510,126510],\"mapped\",[1587]],[[126511,126511],\"mapped\",[1593]],[[126512,126512],\"mapped\",[1601]],[[126513,126513],\"mapped\",[1589]],[[126514,126514],\"mapped\",[1602]],[[126515,126515],\"disallowed\"],[[126516,126516],\"mapped\",[1588]],[[126517,126517],\"mapped\",[1578]],[[126518,126518],\"mapped\",[1579]],[[126519,126519],\"mapped\",[1582]],[[126520,126520],\"disallowed\"],[[126521,126521],\"mapped\",[1590]],[[126522,126522],\"disallowed\"],[[126523,126523],\"mapped\",[1594]],[[126524,126529],\"disallowed\"],[[126530,126530],\"mapped\",[1580]],[[126531,126534],\"disallowed\"],[[126535,126535],\"mapped\",[1581]],[[126536,126536],\"disallowed\"],[[126537,126537],\"mapped\",[1610]],[[126538,126538],\"disallowed\"],[[126539,126539],\"mapped\",[1604]],[[126540,126540],\"disallowed\"],[[126541,126541],\"mapped\",[1606]],[[126542,126542],\"mapped\",[1587]],[[126543,126543],\"mapped\",[1593]],[[126544,126544],\"disallowed\"],[[126545,126545],\"mapped\",[1589]],[[126546,126546],\"mapped\",[1602]],[[126547,126547],\"disallowed\"],[[126548,126548],\"mapped\",[1588]],[[126549,126550],\"disallowed\"],[[126551,126551],\"mapped\",[1582]],[[126552,126552],\"disallowed\"],[[126553,126553],\"mapped\",[1590]],[[126554,126554],\"disallowed\"],[[126555,126555],\"mapped\",[1594]],[[126556,126556],\"disallowed\"],[[126557,126557],\"mapped\",[1722]],[[126558,126558],\"disallowed\"],[[126559,126559],\"mapped\",[1647]],[[126560,126560],\"disallowed\"],[[126561,126561],\"mapped\",[1576]],[[126562,126562],\"mapped\",[1580]],[[126563,126563],\"disallowed\"],[[126564,126564],\"mapped\",[1607]],[[126565,126566],\"disallowed\"],[[126567,126567],\"mapped\",[1581]],[[126568,126568],\"mapped\",[1591]],[[126569,126569],\"mapped\",[1610]],[[126570,126570],\"mapped\",[1603]],[[126571,126571],\"disallowed\"],[[126572,126572],\"mapped\",[1605]],[[126573,126573],\"mapped\",[1606]],[[126574,126574],\"mapped\",[1587]],[[126575,126575],\"mapped\",[1593]],[[126576,126576],\"mapped\",[1601]],[[126577,126577],\"mapped\",[1589]],[[126578,126578],\"mapped\",[1602]],[[126579,126579],\"disallowed\"],[[126580,126580],\"mapped\",[1588]],[[126581,126581],\"mapped\",[1578]],[[126582,126582],\"mapped\",[1579]],[[126583,126583],\"mapped\",[1582]],[[126584,126584],\"disallowed\"],[[126585,126585],\"mapped\",[1590]],[[126586,126586],\"mapped\",[1592]],[[126587,126587],\"mapped\",[1594]],[[126588,126588],\"mapped\",[1646]],[[126589,126589],\"disallowed\"],[[126590,126590],\"mapped\",[1697]],[[126591,126591],\"disallowed\"],[[126592,126592],\"mapped\",[1575]],[[126593,126593],\"mapped\",[1576]],[[126594,126594],\"mapped\",[1580]],[[126595,126595],\"mapped\",[1583]],[[126596,126596],\"mapped\",[1607]],[[126597,126597],\"mapped\",[1608]],[[126598,126598],\"mapped\",[1586]],[[126599,126599],\"mapped\",[1581]],[[126600,126600],\"mapped\",[1591]],[[126601,126601],\"mapped\",[1610]],[[126602,126602],\"disallowed\"],[[126603,126603],\"mapped\",[1604]],[[126604,126604],\"mapped\",[1605]],[[126605,126605],\"mapped\",[1606]],[[126606,126606],\"mapped\",[1587]],[[126607,126607],\"mapped\",[1593]],[[126608,126608],\"mapped\",[1601]],[[126609,126609],\"mapped\",[1589]],[[126610,126610],\"mapped\",[1602]],[[126611,126611],\"mapped\",[1585]],[[126612,126612],\"mapped\",[1588]],[[126613,126613],\"mapped\",[1578]],[[126614,126614],\"mapped\",[1579]],[[126615,126615],\"mapped\",[1582]],[[126616,126616],\"mapped\",[1584]],[[126617,126617],\"mapped\",[1590]],[[126618,126618],\"mapped\",[1592]],[[126619,126619],\"mapped\",[1594]],[[126620,126624],\"disallowed\"],[[126625,126625],\"mapped\",[1576]],[[126626,126626],\"mapped\",[1580]],[[126627,126627],\"mapped\",[1583]],[[126628,126628],\"disallowed\"],[[126629,126629],\"mapped\",[1608]],[[126630,126630],\"mapped\",[1586]],[[126631,126631],\"mapped\",[1581]],[[126632,126632],\"mapped\",[1591]],[[126633,126633],\"mapped\",[1610]],[[126634,126634],\"disallowed\"],[[126635,126635],\"mapped\",[1604]],[[126636,126636],\"mapped\",[1605]],[[126637,126637],\"mapped\",[1606]],[[126638,126638],\"mapped\",[1587]],[[126639,126639],\"mapped\",[1593]],[[126640,126640],\"mapped\",[1601]],[[126641,126641],\"mapped\",[1589]],[[126642,126642],\"mapped\",[1602]],[[126643,126643],\"mapped\",[1585]],[[126644,126644],\"mapped\",[1588]],[[126645,126645],\"mapped\",[1578]],[[126646,126646],\"mapped\",[1579]],[[126647,126647],\"mapped\",[1582]],[[126648,126648],\"mapped\",[1584]],[[126649,126649],\"mapped\",[1590]],[[126650,126650],\"mapped\",[1592]],[[126651,126651],\"mapped\",[1594]],[[126652,126703],\"disallowed\"],[[126704,126705],\"valid\",[],\"NV8\"],[[126706,126975],\"disallowed\"],[[126976,127019],\"valid\",[],\"NV8\"],[[127020,127023],\"disallowed\"],[[127024,127123],\"valid\",[],\"NV8\"],[[127124,127135],\"disallowed\"],[[127136,127150],\"valid\",[],\"NV8\"],[[127151,127152],\"disallowed\"],[[127153,127166],\"valid\",[],\"NV8\"],[[127167,127167],\"valid\",[],\"NV8\"],[[127168,127168],\"disallowed\"],[[127169,127183],\"valid\",[],\"NV8\"],[[127184,127184],\"disallowed\"],[[127185,127199],\"valid\",[],\"NV8\"],[[127200,127221],\"valid\",[],\"NV8\"],[[127222,127231],\"disallowed\"],[[127232,127232],\"disallowed\"],[[127233,127233],\"disallowed_STD3_mapped\",[48,44]],[[127234,127234],\"disallowed_STD3_mapped\",[49,44]],[[127235,127235],\"disallowed_STD3_mapped\",[50,44]],[[127236,127236],\"disallowed_STD3_mapped\",[51,44]],[[127237,127237],\"disallowed_STD3_mapped\",[52,44]],[[127238,127238],\"disallowed_STD3_mapped\",[53,44]],[[127239,127239],\"disallowed_STD3_mapped\",[54,44]],[[127240,127240],\"disallowed_STD3_mapped\",[55,44]],[[127241,127241],\"disallowed_STD3_mapped\",[56,44]],[[127242,127242],\"disallowed_STD3_mapped\",[57,44]],[[127243,127244],\"valid\",[],\"NV8\"],[[127245,127247],\"disallowed\"],[[127248,127248],\"disallowed_STD3_mapped\",[40,97,41]],[[127249,127249],\"disallowed_STD3_mapped\",[40,98,41]],[[127250,127250],\"disallowed_STD3_mapped\",[40,99,41]],[[127251,127251],\"disallowed_STD3_mapped\",[40,100,41]],[[127252,127252],\"disallowed_STD3_mapped\",[40,101,41]],[[127253,127253],\"disallowed_STD3_mapped\",[40,102,41]],[[127254,127254],\"disallowed_STD3_mapped\",[40,103,41]],[[127255,127255],\"disallowed_STD3_mapped\",[40,104,41]],[[127256,127256],\"disallowed_STD3_mapped\",[40,105,41]],[[127257,127257],\"disallowed_STD3_mapped\",[40,106,41]],[[127258,127258],\"disallowed_STD3_mapped\",[40,107,41]],[[127259,127259],\"disallowed_STD3_mapped\",[40,108,41]],[[127260,127260],\"disallowed_STD3_mapped\",[40,109,41]],[[127261,127261],\"disallowed_STD3_mapped\",[40,110,41]],[[127262,127262],\"disallowed_STD3_mapped\",[40,111,41]],[[127263,127263],\"disallowed_STD3_mapped\",[40,112,41]],[[127264,127264],\"disallowed_STD3_mapped\",[40,113,41]],[[127265,127265],\"disallowed_STD3_mapped\",[40,114,41]],[[127266,127266],\"disallowed_STD3_mapped\",[40,115,41]],[[127267,127267],\"disallowed_STD3_mapped\",[40,116,41]],[[127268,127268],\"disallowed_STD3_mapped\",[40,117,41]],[[127269,127269],\"disallowed_STD3_mapped\",[40,118,41]],[[127270,127270],\"disallowed_STD3_mapped\",[40,119,41]],[[127271,127271],\"disallowed_STD3_mapped\",[40,120,41]],[[127272,127272],\"disallowed_STD3_mapped\",[40,121,41]],[[127273,127273],\"disallowed_STD3_mapped\",[40,122,41]],[[127274,127274],\"mapped\",[12308,115,12309]],[[127275,127275],\"mapped\",[99]],[[127276,127276],\"mapped\",[114]],[[127277,127277],\"mapped\",[99,100]],[[127278,127278],\"mapped\",[119,122]],[[127279,127279],\"disallowed\"],[[127280,127280],\"mapped\",[97]],[[127281,127281],\"mapped\",[98]],[[127282,127282],\"mapped\",[99]],[[127283,127283],\"mapped\",[100]],[[127284,127284],\"mapped\",[101]],[[127285,127285],\"mapped\",[102]],[[127286,127286],\"mapped\",[103]],[[127287,127287],\"mapped\",[104]],[[127288,127288],\"mapped\",[105]],[[127289,127289],\"mapped\",[106]],[[127290,127290],\"mapped\",[107]],[[127291,127291],\"mapped\",[108]],[[127292,127292],\"mapped\",[109]],[[127293,127293],\"mapped\",[110]],[[127294,127294],\"mapped\",[111]],[[127295,127295],\"mapped\",[112]],[[127296,127296],\"mapped\",[113]],[[127297,127297],\"mapped\",[114]],[[127298,127298],\"mapped\",[115]],[[127299,127299],\"mapped\",[116]],[[127300,127300],\"mapped\",[117]],[[127301,127301],\"mapped\",[118]],[[127302,127302],\"mapped\",[119]],[[127303,127303],\"mapped\",[120]],[[127304,127304],\"mapped\",[121]],[[127305,127305],\"mapped\",[122]],[[127306,127306],\"mapped\",[104,118]],[[127307,127307],\"mapped\",[109,118]],[[127308,127308],\"mapped\",[115,100]],[[127309,127309],\"mapped\",[115,115]],[[127310,127310],\"mapped\",[112,112,118]],[[127311,127311],\"mapped\",[119,99]],[[127312,127318],\"valid\",[],\"NV8\"],[[127319,127319],\"valid\",[],\"NV8\"],[[127320,127326],\"valid\",[],\"NV8\"],[[127327,127327],\"valid\",[],\"NV8\"],[[127328,127337],\"valid\",[],\"NV8\"],[[127338,127338],\"mapped\",[109,99]],[[127339,127339],\"mapped\",[109,100]],[[127340,127343],\"disallowed\"],[[127344,127352],\"valid\",[],\"NV8\"],[[127353,127353],\"valid\",[],\"NV8\"],[[127354,127354],\"valid\",[],\"NV8\"],[[127355,127356],\"valid\",[],\"NV8\"],[[127357,127358],\"valid\",[],\"NV8\"],[[127359,127359],\"valid\",[],\"NV8\"],[[127360,127369],\"valid\",[],\"NV8\"],[[127370,127373],\"valid\",[],\"NV8\"],[[127374,127375],\"valid\",[],\"NV8\"],[[127376,127376],\"mapped\",[100,106]],[[127377,127386],\"valid\",[],\"NV8\"],[[127387,127461],\"disallowed\"],[[127462,127487],\"valid\",[],\"NV8\"],[[127488,127488],\"mapped\",[12411,12363]],[[127489,127489],\"mapped\",[12467,12467]],[[127490,127490],\"mapped\",[12469]],[[127491,127503],\"disallowed\"],[[127504,127504],\"mapped\",[25163]],[[127505,127505],\"mapped\",[23383]],[[127506,127506],\"mapped\",[21452]],[[127507,127507],\"mapped\",[12487]],[[127508,127508],\"mapped\",[20108]],[[127509,127509],\"mapped\",[22810]],[[127510,127510],\"mapped\",[35299]],[[127511,127511],\"mapped\",[22825]],[[127512,127512],\"mapped\",[20132]],[[127513,127513],\"mapped\",[26144]],[[127514,127514],\"mapped\",[28961]],[[127515,127515],\"mapped\",[26009]],[[127516,127516],\"mapped\",[21069]],[[127517,127517],\"mapped\",[24460]],[[127518,127518],\"mapped\",[20877]],[[127519,127519],\"mapped\",[26032]],[[127520,127520],\"mapped\",[21021]],[[127521,127521],\"mapped\",[32066]],[[127522,127522],\"mapped\",[29983]],[[127523,127523],\"mapped\",[36009]],[[127524,127524],\"mapped\",[22768]],[[127525,127525],\"mapped\",[21561]],[[127526,127526],\"mapped\",[28436]],[[127527,127527],\"mapped\",[25237]],[[127528,127528],\"mapped\",[25429]],[[127529,127529],\"mapped\",[19968]],[[127530,127530],\"mapped\",[19977]],[[127531,127531],\"mapped\",[36938]],[[127532,127532],\"mapped\",[24038]],[[127533,127533],\"mapped\",[20013]],[[127534,127534],\"mapped\",[21491]],[[127535,127535],\"mapped\",[25351]],[[127536,127536],\"mapped\",[36208]],[[127537,127537],\"mapped\",[25171]],[[127538,127538],\"mapped\",[31105]],[[127539,127539],\"mapped\",[31354]],[[127540,127540],\"mapped\",[21512]],[[127541,127541],\"mapped\",[28288]],[[127542,127542],\"mapped\",[26377]],[[127543,127543],\"mapped\",[26376]],[[127544,127544],\"mapped\",[30003]],[[127545,127545],\"mapped\",[21106]],[[127546,127546],\"mapped\",[21942]],[[127547,127551],\"disallowed\"],[[127552,127552],\"mapped\",[12308,26412,12309]],[[127553,127553],\"mapped\",[12308,19977,12309]],[[127554,127554],\"mapped\",[12308,20108,12309]],[[127555,127555],\"mapped\",[12308,23433,12309]],[[127556,127556],\"mapped\",[12308,28857,12309]],[[127557,127557],\"mapped\",[12308,25171,12309]],[[127558,127558],\"mapped\",[12308,30423,12309]],[[127559,127559],\"mapped\",[12308,21213,12309]],[[127560,127560],\"mapped\",[12308,25943,12309]],[[127561,127567],\"disallowed\"],[[127568,127568],\"mapped\",[24471]],[[127569,127569],\"mapped\",[21487]],[[127570,127743],\"disallowed\"],[[127744,127776],\"valid\",[],\"NV8\"],[[127777,127788],\"valid\",[],\"NV8\"],[[127789,127791],\"valid\",[],\"NV8\"],[[127792,127797],\"valid\",[],\"NV8\"],[[127798,127798],\"valid\",[],\"NV8\"],[[127799,127868],\"valid\",[],\"NV8\"],[[127869,127869],\"valid\",[],\"NV8\"],[[127870,127871],\"valid\",[],\"NV8\"],[[127872,127891],\"valid\",[],\"NV8\"],[[127892,127903],\"valid\",[],\"NV8\"],[[127904,127940],\"valid\",[],\"NV8\"],[[127941,127941],\"valid\",[],\"NV8\"],[[127942,127946],\"valid\",[],\"NV8\"],[[127947,127950],\"valid\",[],\"NV8\"],[[127951,127955],\"valid\",[],\"NV8\"],[[127956,127967],\"valid\",[],\"NV8\"],[[127968,127984],\"valid\",[],\"NV8\"],[[127985,127991],\"valid\",[],\"NV8\"],[[127992,127999],\"valid\",[],\"NV8\"],[[128000,128062],\"valid\",[],\"NV8\"],[[128063,128063],\"valid\",[],\"NV8\"],[[128064,128064],\"valid\",[],\"NV8\"],[[128065,128065],\"valid\",[],\"NV8\"],[[128066,128247],\"valid\",[],\"NV8\"],[[128248,128248],\"valid\",[],\"NV8\"],[[128249,128252],\"valid\",[],\"NV8\"],[[128253,128254],\"valid\",[],\"NV8\"],[[128255,128255],\"valid\",[],\"NV8\"],[[128256,128317],\"valid\",[],\"NV8\"],[[128318,128319],\"valid\",[],\"NV8\"],[[128320,128323],\"valid\",[],\"NV8\"],[[128324,128330],\"valid\",[],\"NV8\"],[[128331,128335],\"valid\",[],\"NV8\"],[[128336,128359],\"valid\",[],\"NV8\"],[[128360,128377],\"valid\",[],\"NV8\"],[[128378,128378],\"disallowed\"],[[128379,128419],\"valid\",[],\"NV8\"],[[128420,128420],\"disallowed\"],[[128421,128506],\"valid\",[],\"NV8\"],[[128507,128511],\"valid\",[],\"NV8\"],[[128512,128512],\"valid\",[],\"NV8\"],[[128513,128528],\"valid\",[],\"NV8\"],[[128529,128529],\"valid\",[],\"NV8\"],[[128530,128532],\"valid\",[],\"NV8\"],[[128533,128533],\"valid\",[],\"NV8\"],[[128534,128534],\"valid\",[],\"NV8\"],[[128535,128535],\"valid\",[],\"NV8\"],[[128536,128536],\"valid\",[],\"NV8\"],[[128537,128537],\"valid\",[],\"NV8\"],[[128538,128538],\"valid\",[],\"NV8\"],[[128539,128539],\"valid\",[],\"NV8\"],[[128540,128542],\"valid\",[],\"NV8\"],[[128543,128543],\"valid\",[],\"NV8\"],[[128544,128549],\"valid\",[],\"NV8\"],[[128550,128551],\"valid\",[],\"NV8\"],[[128552,128555],\"valid\",[],\"NV8\"],[[128556,128556],\"valid\",[],\"NV8\"],[[128557,128557],\"valid\",[],\"NV8\"],[[128558,128559],\"valid\",[],\"NV8\"],[[128560,128563],\"valid\",[],\"NV8\"],[[128564,128564],\"valid\",[],\"NV8\"],[[128565,128576],\"valid\",[],\"NV8\"],[[128577,128578],\"valid\",[],\"NV8\"],[[128579,128580],\"valid\",[],\"NV8\"],[[128581,128591],\"valid\",[],\"NV8\"],[[128592,128639],\"valid\",[],\"NV8\"],[[128640,128709],\"valid\",[],\"NV8\"],[[128710,128719],\"valid\",[],\"NV8\"],[[128720,128720],\"valid\",[],\"NV8\"],[[128721,128735],\"disallowed\"],[[128736,128748],\"valid\",[],\"NV8\"],[[128749,128751],\"disallowed\"],[[128752,128755],\"valid\",[],\"NV8\"],[[128756,128767],\"disallowed\"],[[128768,128883],\"valid\",[],\"NV8\"],[[128884,128895],\"disallowed\"],[[128896,128980],\"valid\",[],\"NV8\"],[[128981,129023],\"disallowed\"],[[129024,129035],\"valid\",[],\"NV8\"],[[129036,129039],\"disallowed\"],[[129040,129095],\"valid\",[],\"NV8\"],[[129096,129103],\"disallowed\"],[[129104,129113],\"valid\",[],\"NV8\"],[[129114,129119],\"disallowed\"],[[129120,129159],\"valid\",[],\"NV8\"],[[129160,129167],\"disallowed\"],[[129168,129197],\"valid\",[],\"NV8\"],[[129198,129295],\"disallowed\"],[[129296,129304],\"valid\",[],\"NV8\"],[[129305,129407],\"disallowed\"],[[129408,129412],\"valid\",[],\"NV8\"],[[129413,129471],\"disallowed\"],[[129472,129472],\"valid\",[],\"NV8\"],[[129473,131069],\"disallowed\"],[[131070,131071],\"disallowed\"],[[131072,173782],\"valid\"],[[173783,173823],\"disallowed\"],[[173824,177972],\"valid\"],[[177973,177983],\"disallowed\"],[[177984,178205],\"valid\"],[[178206,178207],\"disallowed\"],[[178208,183969],\"valid\"],[[183970,194559],\"disallowed\"],[[194560,194560],\"mapped\",[20029]],[[194561,194561],\"mapped\",[20024]],[[194562,194562],\"mapped\",[20033]],[[194563,194563],\"mapped\",[131362]],[[194564,194564],\"mapped\",[20320]],[[194565,194565],\"mapped\",[20398]],[[194566,194566],\"mapped\",[20411]],[[194567,194567],\"mapped\",[20482]],[[194568,194568],\"mapped\",[20602]],[[194569,194569],\"mapped\",[20633]],[[194570,194570],\"mapped\",[20711]],[[194571,194571],\"mapped\",[20687]],[[194572,194572],\"mapped\",[13470]],[[194573,194573],\"mapped\",[132666]],[[194574,194574],\"mapped\",[20813]],[[194575,194575],\"mapped\",[20820]],[[194576,194576],\"mapped\",[20836]],[[194577,194577],\"mapped\",[20855]],[[194578,194578],\"mapped\",[132380]],[[194579,194579],\"mapped\",[13497]],[[194580,194580],\"mapped\",[20839]],[[194581,194581],\"mapped\",[20877]],[[194582,194582],\"mapped\",[132427]],[[194583,194583],\"mapped\",[20887]],[[194584,194584],\"mapped\",[20900]],[[194585,194585],\"mapped\",[20172]],[[194586,194586],\"mapped\",[20908]],[[194587,194587],\"mapped\",[20917]],[[194588,194588],\"mapped\",[168415]],[[194589,194589],\"mapped\",[20981]],[[194590,194590],\"mapped\",[20995]],[[194591,194591],\"mapped\",[13535]],[[194592,194592],\"mapped\",[21051]],[[194593,194593],\"mapped\",[21062]],[[194594,194594],\"mapped\",[21106]],[[194595,194595],\"mapped\",[21111]],[[194596,194596],\"mapped\",[13589]],[[194597,194597],\"mapped\",[21191]],[[194598,194598],\"mapped\",[21193]],[[194599,194599],\"mapped\",[21220]],[[194600,194600],\"mapped\",[21242]],[[194601,194601],\"mapped\",[21253]],[[194602,194602],\"mapped\",[21254]],[[194603,194603],\"mapped\",[21271]],[[194604,194604],\"mapped\",[21321]],[[194605,194605],\"mapped\",[21329]],[[194606,194606],\"mapped\",[21338]],[[194607,194607],\"mapped\",[21363]],[[194608,194608],\"mapped\",[21373]],[[194609,194611],\"mapped\",[21375]],[[194612,194612],\"mapped\",[133676]],[[194613,194613],\"mapped\",[28784]],[[194614,194614],\"mapped\",[21450]],[[194615,194615],\"mapped\",[21471]],[[194616,194616],\"mapped\",[133987]],[[194617,194617],\"mapped\",[21483]],[[194618,194618],\"mapped\",[21489]],[[194619,194619],\"mapped\",[21510]],[[194620,194620],\"mapped\",[21662]],[[194621,194621],\"mapped\",[21560]],[[194622,194622],\"mapped\",[21576]],[[194623,194623],\"mapped\",[21608]],[[194624,194624],\"mapped\",[21666]],[[194625,194625],\"mapped\",[21750]],[[194626,194626],\"mapped\",[21776]],[[194627,194627],\"mapped\",[21843]],[[194628,194628],\"mapped\",[21859]],[[194629,194630],\"mapped\",[21892]],[[194631,194631],\"mapped\",[21913]],[[194632,194632],\"mapped\",[21931]],[[194633,194633],\"mapped\",[21939]],[[194634,194634],\"mapped\",[21954]],[[194635,194635],\"mapped\",[22294]],[[194636,194636],\"mapped\",[22022]],[[194637,194637],\"mapped\",[22295]],[[194638,194638],\"mapped\",[22097]],[[194639,194639],\"mapped\",[22132]],[[194640,194640],\"mapped\",[20999]],[[194641,194641],\"mapped\",[22766]],[[194642,194642],\"mapped\",[22478]],[[194643,194643],\"mapped\",[22516]],[[194644,194644],\"mapped\",[22541]],[[194645,194645],\"mapped\",[22411]],[[194646,194646],\"mapped\",[22578]],[[194647,194647],\"mapped\",[22577]],[[194648,194648],\"mapped\",[22700]],[[194649,194649],\"mapped\",[136420]],[[194650,194650],\"mapped\",[22770]],[[194651,194651],\"mapped\",[22775]],[[194652,194652],\"mapped\",[22790]],[[194653,194653],\"mapped\",[22810]],[[194654,194654],\"mapped\",[22818]],[[194655,194655],\"mapped\",[22882]],[[194656,194656],\"mapped\",[136872]],[[194657,194657],\"mapped\",[136938]],[[194658,194658],\"mapped\",[23020]],[[194659,194659],\"mapped\",[23067]],[[194660,194660],\"mapped\",[23079]],[[194661,194661],\"mapped\",[23000]],[[194662,194662],\"mapped\",[23142]],[[194663,194663],\"mapped\",[14062]],[[194664,194664],\"disallowed\"],[[194665,194665],\"mapped\",[23304]],[[194666,194667],\"mapped\",[23358]],[[194668,194668],\"mapped\",[137672]],[[194669,194669],\"mapped\",[23491]],[[194670,194670],\"mapped\",[23512]],[[194671,194671],\"mapped\",[23527]],[[194672,194672],\"mapped\",[23539]],[[194673,194673],\"mapped\",[138008]],[[194674,194674],\"mapped\",[23551]],[[194675,194675],\"mapped\",[23558]],[[194676,194676],\"disallowed\"],[[194677,194677],\"mapped\",[23586]],[[194678,194678],\"mapped\",[14209]],[[194679,194679],\"mapped\",[23648]],[[194680,194680],\"mapped\",[23662]],[[194681,194681],\"mapped\",[23744]],[[194682,194682],\"mapped\",[23693]],[[194683,194683],\"mapped\",[138724]],[[194684,194684],\"mapped\",[23875]],[[194685,194685],\"mapped\",[138726]],[[194686,194686],\"mapped\",[23918]],[[194687,194687],\"mapped\",[23915]],[[194688,194688],\"mapped\",[23932]],[[194689,194689],\"mapped\",[24033]],[[194690,194690],\"mapped\",[24034]],[[194691,194691],\"mapped\",[14383]],[[194692,194692],\"mapped\",[24061]],[[194693,194693],\"mapped\",[24104]],[[194694,194694],\"mapped\",[24125]],[[194695,194695],\"mapped\",[24169]],[[194696,194696],\"mapped\",[14434]],[[194697,194697],\"mapped\",[139651]],[[194698,194698],\"mapped\",[14460]],[[194699,194699],\"mapped\",[24240]],[[194700,194700],\"mapped\",[24243]],[[194701,194701],\"mapped\",[24246]],[[194702,194702],\"mapped\",[24266]],[[194703,194703],\"mapped\",[172946]],[[194704,194704],\"mapped\",[24318]],[[194705,194706],\"mapped\",[140081]],[[194707,194707],\"mapped\",[33281]],[[194708,194709],\"mapped\",[24354]],[[194710,194710],\"mapped\",[14535]],[[194711,194711],\"mapped\",[144056]],[[194712,194712],\"mapped\",[156122]],[[194713,194713],\"mapped\",[24418]],[[194714,194714],\"mapped\",[24427]],[[194715,194715],\"mapped\",[14563]],[[194716,194716],\"mapped\",[24474]],[[194717,194717],\"mapped\",[24525]],[[194718,194718],\"mapped\",[24535]],[[194719,194719],\"mapped\",[24569]],[[194720,194720],\"mapped\",[24705]],[[194721,194721],\"mapped\",[14650]],[[194722,194722],\"mapped\",[14620]],[[194723,194723],\"mapped\",[24724]],[[194724,194724],\"mapped\",[141012]],[[194725,194725],\"mapped\",[24775]],[[194726,194726],\"mapped\",[24904]],[[194727,194727],\"mapped\",[24908]],[[194728,194728],\"mapped\",[24910]],[[194729,194729],\"mapped\",[24908]],[[194730,194730],\"mapped\",[24954]],[[194731,194731],\"mapped\",[24974]],[[194732,194732],\"mapped\",[25010]],[[194733,194733],\"mapped\",[24996]],[[194734,194734],\"mapped\",[25007]],[[194735,194735],\"mapped\",[25054]],[[194736,194736],\"mapped\",[25074]],[[194737,194737],\"mapped\",[25078]],[[194738,194738],\"mapped\",[25104]],[[194739,194739],\"mapped\",[25115]],[[194740,194740],\"mapped\",[25181]],[[194741,194741],\"mapped\",[25265]],[[194742,194742],\"mapped\",[25300]],[[194743,194743],\"mapped\",[25424]],[[194744,194744],\"mapped\",[142092]],[[194745,194745],\"mapped\",[25405]],[[194746,194746],\"mapped\",[25340]],[[194747,194747],\"mapped\",[25448]],[[194748,194748],\"mapped\",[25475]],[[194749,194749],\"mapped\",[25572]],[[194750,194750],\"mapped\",[142321]],[[194751,194751],\"mapped\",[25634]],[[194752,194752],\"mapped\",[25541]],[[194753,194753],\"mapped\",[25513]],[[194754,194754],\"mapped\",[14894]],[[194755,194755],\"mapped\",[25705]],[[194756,194756],\"mapped\",[25726]],[[194757,194757],\"mapped\",[25757]],[[194758,194758],\"mapped\",[25719]],[[194759,194759],\"mapped\",[14956]],[[194760,194760],\"mapped\",[25935]],[[194761,194761],\"mapped\",[25964]],[[194762,194762],\"mapped\",[143370]],[[194763,194763],\"mapped\",[26083]],[[194764,194764],\"mapped\",[26360]],[[194765,194765],\"mapped\",[26185]],[[194766,194766],\"mapped\",[15129]],[[194767,194767],\"mapped\",[26257]],[[194768,194768],\"mapped\",[15112]],[[194769,194769],\"mapped\",[15076]],[[194770,194770],\"mapped\",[20882]],[[194771,194771],\"mapped\",[20885]],[[194772,194772],\"mapped\",[26368]],[[194773,194773],\"mapped\",[26268]],[[194774,194774],\"mapped\",[32941]],[[194775,194775],\"mapped\",[17369]],[[194776,194776],\"mapped\",[26391]],[[194777,194777],\"mapped\",[26395]],[[194778,194778],\"mapped\",[26401]],[[194779,194779],\"mapped\",[26462]],[[194780,194780],\"mapped\",[26451]],[[194781,194781],\"mapped\",[144323]],[[194782,194782],\"mapped\",[15177]],[[194783,194783],\"mapped\",[26618]],[[194784,194784],\"mapped\",[26501]],[[194785,194785],\"mapped\",[26706]],[[194786,194786],\"mapped\",[26757]],[[194787,194787],\"mapped\",[144493]],[[194788,194788],\"mapped\",[26766]],[[194789,194789],\"mapped\",[26655]],[[194790,194790],\"mapped\",[26900]],[[194791,194791],\"mapped\",[15261]],[[194792,194792],\"mapped\",[26946]],[[194793,194793],\"mapped\",[27043]],[[194794,194794],\"mapped\",[27114]],[[194795,194795],\"mapped\",[27304]],[[194796,194796],\"mapped\",[145059]],[[194797,194797],\"mapped\",[27355]],[[194798,194798],\"mapped\",[15384]],[[194799,194799],\"mapped\",[27425]],[[194800,194800],\"mapped\",[145575]],[[194801,194801],\"mapped\",[27476]],[[194802,194802],\"mapped\",[15438]],[[194803,194803],\"mapped\",[27506]],[[194804,194804],\"mapped\",[27551]],[[194805,194805],\"mapped\",[27578]],[[194806,194806],\"mapped\",[27579]],[[194807,194807],\"mapped\",[146061]],[[194808,194808],\"mapped\",[138507]],[[194809,194809],\"mapped\",[146170]],[[194810,194810],\"mapped\",[27726]],[[194811,194811],\"mapped\",[146620]],[[194812,194812],\"mapped\",[27839]],[[194813,194813],\"mapped\",[27853]],[[194814,194814],\"mapped\",[27751]],[[194815,194815],\"mapped\",[27926]],[[194816,194816],\"mapped\",[27966]],[[194817,194817],\"mapped\",[28023]],[[194818,194818],\"mapped\",[27969]],[[194819,194819],\"mapped\",[28009]],[[194820,194820],\"mapped\",[28024]],[[194821,194821],\"mapped\",[28037]],[[194822,194822],\"mapped\",[146718]],[[194823,194823],\"mapped\",[27956]],[[194824,194824],\"mapped\",[28207]],[[194825,194825],\"mapped\",[28270]],[[194826,194826],\"mapped\",[15667]],[[194827,194827],\"mapped\",[28363]],[[194828,194828],\"mapped\",[28359]],[[194829,194829],\"mapped\",[147153]],[[194830,194830],\"mapped\",[28153]],[[194831,194831],\"mapped\",[28526]],[[194832,194832],\"mapped\",[147294]],[[194833,194833],\"mapped\",[147342]],[[194834,194834],\"mapped\",[28614]],[[194835,194835],\"mapped\",[28729]],[[194836,194836],\"mapped\",[28702]],[[194837,194837],\"mapped\",[28699]],[[194838,194838],\"mapped\",[15766]],[[194839,194839],\"mapped\",[28746]],[[194840,194840],\"mapped\",[28797]],[[194841,194841],\"mapped\",[28791]],[[194842,194842],\"mapped\",[28845]],[[194843,194843],\"mapped\",[132389]],[[194844,194844],\"mapped\",[28997]],[[194845,194845],\"mapped\",[148067]],[[194846,194846],\"mapped\",[29084]],[[194847,194847],\"disallowed\"],[[194848,194848],\"mapped\",[29224]],[[194849,194849],\"mapped\",[29237]],[[194850,194850],\"mapped\",[29264]],[[194851,194851],\"mapped\",[149000]],[[194852,194852],\"mapped\",[29312]],[[194853,194853],\"mapped\",[29333]],[[194854,194854],\"mapped\",[149301]],[[194855,194855],\"mapped\",[149524]],[[194856,194856],\"mapped\",[29562]],[[194857,194857],\"mapped\",[29579]],[[194858,194858],\"mapped\",[16044]],[[194859,194859],\"mapped\",[29605]],[[194860,194861],\"mapped\",[16056]],[[194862,194862],\"mapped\",[29767]],[[194863,194863],\"mapped\",[29788]],[[194864,194864],\"mapped\",[29809]],[[194865,194865],\"mapped\",[29829]],[[194866,194866],\"mapped\",[29898]],[[194867,194867],\"mapped\",[16155]],[[194868,194868],\"mapped\",[29988]],[[194869,194869],\"mapped\",[150582]],[[194870,194870],\"mapped\",[30014]],[[194871,194871],\"mapped\",[150674]],[[194872,194872],\"mapped\",[30064]],[[194873,194873],\"mapped\",[139679]],[[194874,194874],\"mapped\",[30224]],[[194875,194875],\"mapped\",[151457]],[[194876,194876],\"mapped\",[151480]],[[194877,194877],\"mapped\",[151620]],[[194878,194878],\"mapped\",[16380]],[[194879,194879],\"mapped\",[16392]],[[194880,194880],\"mapped\",[30452]],[[194881,194881],\"mapped\",[151795]],[[194882,194882],\"mapped\",[151794]],[[194883,194883],\"mapped\",[151833]],[[194884,194884],\"mapped\",[151859]],[[194885,194885],\"mapped\",[30494]],[[194886,194887],\"mapped\",[30495]],[[194888,194888],\"mapped\",[30538]],[[194889,194889],\"mapped\",[16441]],[[194890,194890],\"mapped\",[30603]],[[194891,194891],\"mapped\",[16454]],[[194892,194892],\"mapped\",[16534]],[[194893,194893],\"mapped\",[152605]],[[194894,194894],\"mapped\",[30798]],[[194895,194895],\"mapped\",[30860]],[[194896,194896],\"mapped\",[30924]],[[194897,194897],\"mapped\",[16611]],[[194898,194898],\"mapped\",[153126]],[[194899,194899],\"mapped\",[31062]],[[194900,194900],\"mapped\",[153242]],[[194901,194901],\"mapped\",[153285]],[[194902,194902],\"mapped\",[31119]],[[194903,194903],\"mapped\",[31211]],[[194904,194904],\"mapped\",[16687]],[[194905,194905],\"mapped\",[31296]],[[194906,194906],\"mapped\",[31306]],[[194907,194907],\"mapped\",[31311]],[[194908,194908],\"mapped\",[153980]],[[194909,194910],\"mapped\",[154279]],[[194911,194911],\"disallowed\"],[[194912,194912],\"mapped\",[16898]],[[194913,194913],\"mapped\",[154539]],[[194914,194914],\"mapped\",[31686]],[[194915,194915],\"mapped\",[31689]],[[194916,194916],\"mapped\",[16935]],[[194917,194917],\"mapped\",[154752]],[[194918,194918],\"mapped\",[31954]],[[194919,194919],\"mapped\",[17056]],[[194920,194920],\"mapped\",[31976]],[[194921,194921],\"mapped\",[31971]],[[194922,194922],\"mapped\",[32000]],[[194923,194923],\"mapped\",[155526]],[[194924,194924],\"mapped\",[32099]],[[194925,194925],\"mapped\",[17153]],[[194926,194926],\"mapped\",[32199]],[[194927,194927],\"mapped\",[32258]],[[194928,194928],\"mapped\",[32325]],[[194929,194929],\"mapped\",[17204]],[[194930,194930],\"mapped\",[156200]],[[194931,194931],\"mapped\",[156231]],[[194932,194932],\"mapped\",[17241]],[[194933,194933],\"mapped\",[156377]],[[194934,194934],\"mapped\",[32634]],[[194935,194935],\"mapped\",[156478]],[[194936,194936],\"mapped\",[32661]],[[194937,194937],\"mapped\",[32762]],[[194938,194938],\"mapped\",[32773]],[[194939,194939],\"mapped\",[156890]],[[194940,194940],\"mapped\",[156963]],[[194941,194941],\"mapped\",[32864]],[[194942,194942],\"mapped\",[157096]],[[194943,194943],\"mapped\",[32880]],[[194944,194944],\"mapped\",[144223]],[[194945,194945],\"mapped\",[17365]],[[194946,194946],\"mapped\",[32946]],[[194947,194947],\"mapped\",[33027]],[[194948,194948],\"mapped\",[17419]],[[194949,194949],\"mapped\",[33086]],[[194950,194950],\"mapped\",[23221]],[[194951,194951],\"mapped\",[157607]],[[194952,194952],\"mapped\",[157621]],[[194953,194953],\"mapped\",[144275]],[[194954,194954],\"mapped\",[144284]],[[194955,194955],\"mapped\",[33281]],[[194956,194956],\"mapped\",[33284]],[[194957,194957],\"mapped\",[36766]],[[194958,194958],\"mapped\",[17515]],[[194959,194959],\"mapped\",[33425]],[[194960,194960],\"mapped\",[33419]],[[194961,194961],\"mapped\",[33437]],[[194962,194962],\"mapped\",[21171]],[[194963,194963],\"mapped\",[33457]],[[194964,194964],\"mapped\",[33459]],[[194965,194965],\"mapped\",[33469]],[[194966,194966],\"mapped\",[33510]],[[194967,194967],\"mapped\",[158524]],[[194968,194968],\"mapped\",[33509]],[[194969,194969],\"mapped\",[33565]],[[194970,194970],\"mapped\",[33635]],[[194971,194971],\"mapped\",[33709]],[[194972,194972],\"mapped\",[33571]],[[194973,194973],\"mapped\",[33725]],[[194974,194974],\"mapped\",[33767]],[[194975,194975],\"mapped\",[33879]],[[194976,194976],\"mapped\",[33619]],[[194977,194977],\"mapped\",[33738]],[[194978,194978],\"mapped\",[33740]],[[194979,194979],\"mapped\",[33756]],[[194980,194980],\"mapped\",[158774]],[[194981,194981],\"mapped\",[159083]],[[194982,194982],\"mapped\",[158933]],[[194983,194983],\"mapped\",[17707]],[[194984,194984],\"mapped\",[34033]],[[194985,194985],\"mapped\",[34035]],[[194986,194986],\"mapped\",[34070]],[[194987,194987],\"mapped\",[160714]],[[194988,194988],\"mapped\",[34148]],[[194989,194989],\"mapped\",[159532]],[[194990,194990],\"mapped\",[17757]],[[194991,194991],\"mapped\",[17761]],[[194992,194992],\"mapped\",[159665]],[[194993,194993],\"mapped\",[159954]],[[194994,194994],\"mapped\",[17771]],[[194995,194995],\"mapped\",[34384]],[[194996,194996],\"mapped\",[34396]],[[194997,194997],\"mapped\",[34407]],[[194998,194998],\"mapped\",[34409]],[[194999,194999],\"mapped\",[34473]],[[195000,195000],\"mapped\",[34440]],[[195001,195001],\"mapped\",[34574]],[[195002,195002],\"mapped\",[34530]],[[195003,195003],\"mapped\",[34681]],[[195004,195004],\"mapped\",[34600]],[[195005,195005],\"mapped\",[34667]],[[195006,195006],\"mapped\",[34694]],[[195007,195007],\"disallowed\"],[[195008,195008],\"mapped\",[34785]],[[195009,195009],\"mapped\",[34817]],[[195010,195010],\"mapped\",[17913]],[[195011,195011],\"mapped\",[34912]],[[195012,195012],\"mapped\",[34915]],[[195013,195013],\"mapped\",[161383]],[[195014,195014],\"mapped\",[35031]],[[195015,195015],\"mapped\",[35038]],[[195016,195016],\"mapped\",[17973]],[[195017,195017],\"mapped\",[35066]],[[195018,195018],\"mapped\",[13499]],[[195019,195019],\"mapped\",[161966]],[[195020,195020],\"mapped\",[162150]],[[195021,195021],\"mapped\",[18110]],[[195022,195022],\"mapped\",[18119]],[[195023,195023],\"mapped\",[35488]],[[195024,195024],\"mapped\",[35565]],[[195025,195025],\"mapped\",[35722]],[[195026,195026],\"mapped\",[35925]],[[195027,195027],\"mapped\",[162984]],[[195028,195028],\"mapped\",[36011]],[[195029,195029],\"mapped\",[36033]],[[195030,195030],\"mapped\",[36123]],[[195031,195031],\"mapped\",[36215]],[[195032,195032],\"mapped\",[163631]],[[195033,195033],\"mapped\",[133124]],[[195034,195034],\"mapped\",[36299]],[[195035,195035],\"mapped\",[36284]],[[195036,195036],\"mapped\",[36336]],[[195037,195037],\"mapped\",[133342]],[[195038,195038],\"mapped\",[36564]],[[195039,195039],\"mapped\",[36664]],[[195040,195040],\"mapped\",[165330]],[[195041,195041],\"mapped\",[165357]],[[195042,195042],\"mapped\",[37012]],[[195043,195043],\"mapped\",[37105]],[[195044,195044],\"mapped\",[37137]],[[195045,195045],\"mapped\",[165678]],[[195046,195046],\"mapped\",[37147]],[[195047,195047],\"mapped\",[37432]],[[195048,195048],\"mapped\",[37591]],[[195049,195049],\"mapped\",[37592]],[[195050,195050],\"mapped\",[37500]],[[195051,195051],\"mapped\",[37881]],[[195052,195052],\"mapped\",[37909]],[[195053,195053],\"mapped\",[166906]],[[195054,195054],\"mapped\",[38283]],[[195055,195055],\"mapped\",[18837]],[[195056,195056],\"mapped\",[38327]],[[195057,195057],\"mapped\",[167287]],[[195058,195058],\"mapped\",[18918]],[[195059,195059],\"mapped\",[38595]],[[195060,195060],\"mapped\",[23986]],[[195061,195061],\"mapped\",[38691]],[[195062,195062],\"mapped\",[168261]],[[195063,195063],\"mapped\",[168474]],[[195064,195064],\"mapped\",[19054]],[[195065,195065],\"mapped\",[19062]],[[195066,195066],\"mapped\",[38880]],[[195067,195067],\"mapped\",[168970]],[[195068,195068],\"mapped\",[19122]],[[195069,195069],\"mapped\",[169110]],[[195070,195071],\"mapped\",[38923]],[[195072,195072],\"mapped\",[38953]],[[195073,195073],\"mapped\",[169398]],[[195074,195074],\"mapped\",[39138]],[[195075,195075],\"mapped\",[19251]],[[195076,195076],\"mapped\",[39209]],[[195077,195077],\"mapped\",[39335]],[[195078,195078],\"mapped\",[39362]],[[195079,195079],\"mapped\",[39422]],[[195080,195080],\"mapped\",[19406]],[[195081,195081],\"mapped\",[170800]],[[195082,195082],\"mapped\",[39698]],[[195083,195083],\"mapped\",[40000]],[[195084,195084],\"mapped\",[40189]],[[195085,195085],\"mapped\",[19662]],[[195086,195086],\"mapped\",[19693]],[[195087,195087],\"mapped\",[40295]],[[195088,195088],\"mapped\",[172238]],[[195089,195089],\"mapped\",[19704]],[[195090,195090],\"mapped\",[172293]],[[195091,195091],\"mapped\",[172558]],[[195092,195092],\"mapped\",[172689]],[[195093,195093],\"mapped\",[40635]],[[195094,195094],\"mapped\",[19798]],[[195095,195095],\"mapped\",[40697]],[[195096,195096],\"mapped\",[40702]],[[195097,195097],\"mapped\",[40709]],[[195098,195098],\"mapped\",[40719]],[[195099,195099],\"mapped\",[40726]],[[195100,195100],\"mapped\",[40763]],[[195101,195101],\"mapped\",[173568]],[[195102,196605],\"disallowed\"],[[196606,196607],\"disallowed\"],[[196608,262141],\"disallowed\"],[[262142,262143],\"disallowed\"],[[262144,327677],\"disallowed\"],[[327678,327679],\"disallowed\"],[[327680,393213],\"disallowed\"],[[393214,393215],\"disallowed\"],[[393216,458749],\"disallowed\"],[[458750,458751],\"disallowed\"],[[458752,524285],\"disallowed\"],[[524286,524287],\"disallowed\"],[[524288,589821],\"disallowed\"],[[589822,589823],\"disallowed\"],[[589824,655357],\"disallowed\"],[[655358,655359],\"disallowed\"],[[655360,720893],\"disallowed\"],[[720894,720895],\"disallowed\"],[[720896,786429],\"disallowed\"],[[786430,786431],\"disallowed\"],[[786432,851965],\"disallowed\"],[[851966,851967],\"disallowed\"],[[851968,917501],\"disallowed\"],[[917502,917503],\"disallowed\"],[[917504,917504],\"disallowed\"],[[917505,917505],\"disallowed\"],[[917506,917535],\"disallowed\"],[[917536,917631],\"disallowed\"],[[917632,917759],\"disallowed\"],[[917760,917999],\"ignored\"],[[918000,983037],\"disallowed\"],[[983038,983039],\"disallowed\"],[[983040,1048573],\"disallowed\"],[[1048574,1048575],\"disallowed\"],[[1048576,1114109],\"disallowed\"],[[1114110,1114111],\"disallowed\"]]"); - -/***/ }), - -/***/ 2357: -/***/ ((module) => { - -"use strict"; -module.exports = require("assert");; - -/***/ }), - -/***/ 4293: -/***/ ((module) => { - -"use strict"; -module.exports = require("buffer");; - -/***/ }), - -/***/ 8614: -/***/ ((module) => { - -"use strict"; -module.exports = require("events");; - -/***/ }), - -/***/ 5747: -/***/ ((module) => { - -"use strict"; -module.exports = require("fs");; - -/***/ }), - -/***/ 8605: -/***/ ((module) => { - -"use strict"; -module.exports = require("http");; - -/***/ }), - -/***/ 7211: -/***/ ((module) => { - -"use strict"; -module.exports = require("https");; - -/***/ }), - -/***/ 1631: -/***/ ((module) => { - -"use strict"; -module.exports = require("net");; - -/***/ }), - -/***/ 2087: -/***/ ((module) => { - -"use strict"; -module.exports = require("os");; - -/***/ }), - -/***/ 5622: -/***/ ((module) => { - -"use strict"; -module.exports = require("path");; - -/***/ }), - -/***/ 4213: -/***/ ((module) => { - -"use strict"; -module.exports = require("punycode");; - -/***/ }), - -/***/ 2413: -/***/ ((module) => { - -"use strict"; -module.exports = require("stream");; - -/***/ }), - -/***/ 4304: -/***/ ((module) => { - -"use strict"; -module.exports = require("string_decoder");; - -/***/ }), - -/***/ 4016: -/***/ ((module) => { - -"use strict"; -module.exports = require("tls");; - -/***/ }), - -/***/ 8835: -/***/ ((module) => { - -"use strict"; -module.exports = require("url");; - -/***/ }), - -/***/ 1669: -/***/ ((module) => { - -"use strict"; -module.exports = require("util");; - -/***/ }), - -/***/ 8761: -/***/ ((module) => { - -"use strict"; -module.exports = require("zlib");; - -/***/ }) - -/******/ }); -/************************************************************************/ -/******/ // The module cache -/******/ var __webpack_module_cache__ = {}; -/******/ -/******/ // The require function -/******/ function __nccwpck_require__(moduleId) { -/******/ // Check if module is in cache -/******/ if(__webpack_module_cache__[moduleId]) { -/******/ return __webpack_module_cache__[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = __webpack_module_cache__[moduleId] = { -/******/ // no module.id needed -/******/ // no module.loaded needed -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ var threw = true; -/******/ try { -/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__); -/******/ threw = false; -/******/ } finally { -/******/ if(threw) delete __webpack_module_cache__[moduleId]; -/******/ } -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __nccwpck_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => module['default'] : -/******/ () => module; -/******/ __nccwpck_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/compat */ -/******/ -/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/ -/******/ // module exports must be returned from runtime so entry inlining is disabled -/******/ // startup -/******/ // Load entry module and return exports -/******/ return __nccwpck_require__(598); -/******/ })() -; diff --git a/.github/actions/javascript/isPullRequestMergeable/isPullRequestMergeable.js b/.github/actions/javascript/isPullRequestMergeable/isPullRequestMergeable.js deleted file mode 100644 index 4034502aed76..000000000000 --- a/.github/actions/javascript/isPullRequestMergeable/isPullRequestMergeable.js +++ /dev/null @@ -1,95 +0,0 @@ -const _ = require('underscore'); -const core = require('@actions/core'); -const GithubUtils = require('../../../libs/GithubUtils'); -const {promiseWhile} = require('../../../libs/promiseWhile'); - -const MAX_RETRIES = 30; -const THROTTLE_DURATION = process.env.NODE_ENV === 'test' ? 5 : 5000; - -const run = function () { - const pullRequestNumber = Number(core.getInput('PULL_REQUEST_NUMBER', {required: true})); - - let retryCount = 0; - let isMergeable = false; - let mergeabilityResolved = false; - console.log(`Checking the mergeability of PR #${pullRequestNumber}`); - return GithubUtils.octokit.pulls - .get({ - owner: GithubUtils.GITHUB_OWNER, - repo: GithubUtils.APP_REPO, - pull_number: pullRequestNumber, - }) - .then(({data}) => data.head.sha) - .then((headRef) => - promiseWhile( - () => !mergeabilityResolved && retryCount < MAX_RETRIES, - _.throttle( - () => - Promise.all([ - GithubUtils.octokit.pulls.get({ - owner: GithubUtils.GITHUB_OWNER, - repo: GithubUtils.APP_REPO, - pull_number: pullRequestNumber, - }), - GithubUtils.octokit.checks.listForRef({ - owner: GithubUtils.GITHUB_OWNER, - repo: GithubUtils.APP_REPO, - ref: headRef, - }), - ]) - .then(([prResponse, checksResponse]) => { - const mergeable = prResponse.data.mergeable; - const mergeableState = prResponse.data.mergeable_state; - const areChecksComplete = _.every(checksResponse.data.check_runs, (check) => check.status === 'completed'); - - if (_.isNull(mergeable)) { - console.log('Pull request mergeability is not yet resolved...'); - retryCount++; - return; - } - - if (_.isEmpty(mergeableState)) { - console.log('Pull request mergeable_state is not yet resolved...'); - retryCount++; - return; - } - - if (!areChecksComplete) { - console.log('Pull request checks are not yet complete...'); - retryCount++; - return; - } - - mergeabilityResolved = true; - console.log(`Merge information for #${pullRequestNumber} - mergeable: ${mergeable}, mergeable_state: ${mergeableState}`); - isMergeable = mergeable && mergeableState !== 'blocked'; - }) - .catch((githubError) => { - mergeabilityResolved = true; - console.error(`An error occurred fetching the PR from Github: ${JSON.stringify(githubError)}`); - core.setFailed(githubError); - }), - THROTTLE_DURATION, - ), - ), - ) - .then(() => { - if (retryCount >= MAX_RETRIES) { - console.error('Maximum retries reached, mergeability is undetermined, defaulting to false'); - } else { - console.log(`Pull request #${pullRequestNumber} is ${isMergeable ? '' : 'not '}mergeable`); - } - core.setOutput('IS_MERGEABLE', isMergeable); - }) - .catch((githubError) => { - mergeabilityResolved = true; - console.error(`An error occurred fetching the PR from Github: ${JSON.stringify(githubError)}`); - core.setFailed(githubError); - }); -}; - -if (require.main === module) { - run(); -} - -module.exports = run; diff --git a/.github/scripts/buildActions.sh b/.github/scripts/buildActions.sh index df5c86b02ba8..d4fcbeabfdc6 100755 --- a/.github/scripts/buildActions.sh +++ b/.github/scripts/buildActions.sh @@ -16,7 +16,6 @@ declare -r GITHUB_ACTIONS=( "$ACTIONS_DIR/getDeployPullRequestList/getDeployPullRequestList.js" "$ACTIONS_DIR/getPullRequestDetails/getPullRequestDetails.js" "$ACTIONS_DIR/getReleaseBody/getReleaseBody.js" - "$ACTIONS_DIR/isPullRequestMergeable/isPullRequestMergeable.js" "$ACTIONS_DIR/isStagingDeployLocked/isStagingDeployLocked.js" "$ACTIONS_DIR/markPullRequestsAsDeployed/markPullRequestsAsDeployed.js" "$ACTIONS_DIR/postTestBuildComment/postTestBuildComment.js" diff --git a/tests/unit/isPullRequestMergeableTest.js b/tests/unit/isPullRequestMergeableTest.js deleted file mode 100644 index da5caa197314..000000000000 --- a/tests/unit/isPullRequestMergeableTest.js +++ /dev/null @@ -1,125 +0,0 @@ -const core = require('@actions/core'); -const GithubUtils = require('../../.github/libs/GithubUtils'); -const run = require('../../.github/actions/javascript/isPullRequestMergeable/isPullRequestMergeable'); - -// Static mock function for core.getInput -const mockGetInput = jest.fn().mockImplementation((arg) => { - if (arg === 'GITHUB_TOKEN') { - return 'fake_token'; - } - - if (arg === 'PULL_REQUEST_NUMBER') { - return 42; - } -}); - -// Mock functions that we can adjust between each test -const mockSetOutput = jest.fn(); -const mockSetFailed = jest.fn(); -const mockGetPullRequest = jest.fn(); -const mockListChecks = jest.fn(); -const mockError = new Error('Some GitHub error'); - -beforeAll(() => { - // Mock core module - core.getInput = mockGetInput; - core.setFailed = mockSetFailed; - core.setOutput = mockSetOutput; - - // Mock octokit module - const moctokit = { - rest: { - pulls: { - get: mockGetPullRequest, - }, - checks: { - listForRef: mockListChecks, - }, - }, - }; - GithubUtils.internalOctokit = moctokit; -}); - -afterEach(() => { - mockSetOutput.mockClear(); - mockSetFailed.mockClear(); - mockGetPullRequest.mockClear(); - mockListChecks.mockClear(); -}); - -afterAll(() => { - jest.clearAllMocks(); -}); - -describe('isPullRequestMergeable', () => { - test('Pull request immediately mergeable', () => { - mockGetPullRequest.mockResolvedValue({data: {mergeable: true, mergeable_state: 'clean', head: {sha: 'abcd'}}}); - mockListChecks.mockResolvedValue({data: {check_runs: [{status: 'completed'}, {status: 'completed'}]}}); - return run().then(() => { - expect(mockSetOutput).toHaveBeenCalledWith('IS_MERGEABLE', true); - }); - }); - - test('Pull request immediately not mergeable', () => { - mockGetPullRequest.mockResolvedValue({data: {mergeable: false, mergeable_state: 'blocked', head: {sha: 'abcd'}}}); - mockListChecks.mockResolvedValue({data: {check_runs: [{status: 'completed'}, {status: 'completed'}]}}); - return run().then(() => { - expect(mockSetOutput).toHaveBeenCalledWith('IS_MERGEABLE', false); - }); - }); - - test('Pull request mergeable after delay', () => { - mockGetPullRequest - .mockResolvedValue({data: {mergeable: true, mergeable_state: 'clean', head: {sha: 'abcd'}}}) - .mockResolvedValueOnce({data: {mergeable: null, mergeable_state: 'blocked', head: {sha: 'abcd'}}}) // first response - .mockResolvedValueOnce({data: {mergeable: null, mergeable_state: 'blocked', head: {sha: 'abcd'}}}) // second response - .mockResolvedValueOnce({data: {mergeable: true, mergeable_state: 'blocked', head: {sha: 'abcd'}}}); // third response - mockListChecks - .mockResolvedValue({data: {check_runs: [{status: 'completed'}, {status: 'completed'}]}}) - .mockResolvedValueOnce({data: {check_runs: [{status: 'in_progress'}, {status: 'in_progress'}]}}) // first response - .mockResolvedValueOnce({data: {check_runs: [{status: 'completed'}, {status: 'in_progress'}]}}); // second response - return run().then(() => { - expect(mockGetPullRequest).toHaveBeenCalledTimes(4); - expect(mockListChecks).toHaveBeenCalledTimes(3); - expect(mockSetOutput).toHaveBeenCalledWith('IS_MERGEABLE', true); - }); - }); - - test('Pull request not mergeable after delay', () => { - mockGetPullRequest - .mockResolvedValue({data: {mergeable: false, mergeable_state: 'blocked', head: {sha: 'abcd'}}}) - .mockResolvedValueOnce({data: {mergeable: null, head: {sha: 'abcd'}}}) - .mockResolvedValueOnce({data: {mergeable: null, head: {sha: 'abcd'}}}); - mockListChecks.mockResolvedValue({data: {check_runs: [{status: 'completed'}]}}); - return run().then(() => { - expect(mockGetPullRequest).toHaveBeenCalledTimes(3); - expect(mockListChecks).toHaveBeenCalledTimes(2); - expect(mockSetOutput).toHaveBeenCalledWith('IS_MERGEABLE', false); - }); - }); - - test('Pull request mergeability never resolves', () => { - mockGetPullRequest.mockResolvedValue({data: {mergeable: null, head: {sha: 'abcd'}}}); - mockListChecks.mockResolvedValue({data: {check_runs: [{status: 'completed'}]}}); - return run().then(() => { - expect(mockGetPullRequest).toHaveBeenCalledTimes(31); - expect(mockListChecks).toHaveBeenCalledTimes(30); - expect(mockSetOutput).toHaveBeenCalledWith('IS_MERGEABLE', false); - }); - }); - - test('Github API error on first request', () => { - mockGetPullRequest.mockRejectedValue(mockError); - return run().then(() => { - expect(mockSetFailed).toHaveBeenCalledWith(mockError); - }); - }); - - test('GitHub API error on later request', () => { - mockGetPullRequest.mockResolvedValue({data: {mergeable: null, head: {sha: 'abcd'}}}); - mockListChecks.mockRejectedValue(mockError); - return run().then(() => { - expect(mockSetFailed).toHaveBeenCalledWith(mockError); - }); - }); -}); From e01163010f4f91f04a4fd733e7454e10c767d72b Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 15:47:03 -0700 Subject: [PATCH 225/826] Fix typo --- .github/workflows/cherryPick.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 06da3e4ae67a..94ccaf5d932c 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -103,7 +103,7 @@ jobs: fi - name: Create Pull Request to manually finish CP - if: fromJSON(steps.cherryPick.output.hasConflicts) + if: fromJSON(steps.cherryPick.outputs.hasConflicts) id: createPullRequest run: | gh pr create \ From 8dc7639eb1d7c0a1180ca181f039b512296844a8 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 16 Jun 2023 16:57:33 -0700 Subject: [PATCH 226/826] getRootOrExpenseReportName refactor --- src/libs/ReportUtils.js | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index bb8bd8b7c288..d3d15f812372 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1062,10 +1062,13 @@ function getReportName(report) { * @param {Object} report * @returns {String|*} */ -function getRootReportName(report) { +function getRootOrExpenseReportName(report) { if (isThread(report)) { + if (isExpenseReport(report)) { + return lodashGet(report, 'displayName', ''); + } const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - return getRootReportName(parentReport); + return getRootOrExpenseReportName(parentReport); } return getReportName(report); @@ -1102,31 +1105,24 @@ function getChatRoomSubtitle(report) { * @returns {String} */ function getChatRoomSubtitleLink(report) { - if (report.reportID == '3346402972554959') { - debugger; - } - if (isThread(report)) { const from = Localize.translateLocal('threads.from'); + const workspaceName = getPolicyName(report); if (isChatRoom(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - let roomName = ''; - if (parentReport) { - roomName = lodashGet(parentReport, 'displayName', ''); - } else { - roomName = lodashGet(report, 'displayName', ''); - } - - const workspaceName = getPolicyName(report); + const roomName = parentReport + ? lodashGet(parentReport, 'displayName', '') + : lodashGet(report, 'displayName', ''); + return `${from} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } if (isExpenseReport(report)) { const payeeEmail = getDisplayNameForParticipant(report.managerID); - const workspaceName = getPolicyName(report); return `${from} ${workspaceName ? [payeeEmail, workspaceName].join(' in ') : payeeEmail}`; } - return `${from} ${getRootReportName(report)}`; + + return `${from} ${getRootOrExpenseReportName(report)}`; } return ''; } From 8bed0d29b44138947cf45c119660dab557000b1c Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 16 Jun 2023 18:42:44 -0700 Subject: [PATCH 227/826] Use a hook instead of a HOC to fix propTypes --- src/components/withCurrentReportId.js | 2 +- src/hooks/useCurrentReportID.js | 6 ++++++ src/libs/Navigation/NavigationRoot.js | 12 ++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 src/hooks/useCurrentReportID.js diff --git a/src/components/withCurrentReportId.js b/src/components/withCurrentReportId.js index 71f05660d7be..24be401cab26 100644 --- a/src/components/withCurrentReportId.js +++ b/src/components/withCurrentReportId.js @@ -71,4 +71,4 @@ export default function withCurrentReportId(WrappedComponent) { return WithCurrentReportId; } -export {withCurrentReportIdPropTypes, CurrentReportIdContextProvider}; +export {withCurrentReportIdPropTypes, CurrentReportIdContextProvider, CurrentReportIdContext}; diff --git a/src/hooks/useCurrentReportID.js b/src/hooks/useCurrentReportID.js new file mode 100644 index 000000000000..77d8713ce2c4 --- /dev/null +++ b/src/hooks/useCurrentReportID.js @@ -0,0 +1,6 @@ +import {useContext} from 'react'; +import {CurrentReportIdContext} from '../components/withCurrentReportId'; + +export default function useCurrentReportID() { + return useContext(CurrentReportIdContext); +} diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 7a6d3d9e92d6..55823cd3b9d7 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -8,8 +8,8 @@ import linkingConfig from './linkingConfig'; import AppNavigator from './AppNavigator'; import themeColors from '../../styles/themes/default'; import Log from '../Log'; -import withCurrentReportId, {withCurrentReportIdPropTypes} from '../../components/withCurrentReportId'; import StatusBar from '../StatusBar'; +import useCurrentReportID from '../../hooks/useCurrentReportID'; import useWindowDimensions from '../../hooks/useWindowDimensions'; // https://reactnavigation.org/docs/themes @@ -27,8 +27,6 @@ const propTypes = { /** Fired when react-navigation is ready */ onReady: PropTypes.func.isRequired, - - ...withCurrentReportIdPropTypes, }; /** @@ -53,10 +51,12 @@ function parseAndLogRoute(state) { } function NavigationRoot(props) { - const {isSmallScreenWidth} = useWindowDimensions(); useFlipper(navigationRef); const navigationStateRef = useRef(undefined); + const {updateCurrentReportId} = useCurrentReportID(); + const {isSmallScreenWidth} = useWindowDimensions(); + const prevStatusBarBackgroundColor = useRef(themeColors.appBG); const statusBarBackgroundColor = useRef(themeColors.appBG); const statusBarAnimation = useSharedValue(0); @@ -91,7 +91,7 @@ function NavigationRoot(props) { const updateSavedNavigationStateAndLogRoute = (state) => { navigationStateRef.current = state; - props.updateCurrentReportId(state); + updateCurrentReportId(state); parseAndLogRoute(state); animateStatusBarBackgroundColor(); }; @@ -116,4 +116,4 @@ function NavigationRoot(props) { NavigationRoot.displayName = 'NavigationRoot'; NavigationRoot.propTypes = propTypes; -export default withCurrentReportId(NavigationRoot); +export default NavigationRoot; From 511c5b6e8bbad414952e5cd9205863ae97bf97ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Sat, 17 Jun 2023 16:57:53 +0200 Subject: [PATCH 228/826] fix default value --- src/components/TextInput/BaseTextInput.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 724e39c0cdce..6fe66c76f5aa 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -320,6 +320,7 @@ function BaseTextInput(props) { value={props.value} selection={props.selection} editable={isEditable} + defaultValue={props.defaultValue} // FormSubmit Enter key handler does not have access to direct props. // `dataset.submitOnEnter` is used to indicate that pressing Enter on this input should call the submit callback. dataSet={{submitOnEnter: isMultiline && props.submitOnEnter}} From 682ad7e548607b3fc15102676a8694f955ca1acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Sat, 17 Jun 2023 16:58:17 +0200 Subject: [PATCH 229/826] fix stories --- src/stories/TextInput.stories.js | 65 +++++++++++++++++++------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/src/stories/TextInput.stories.js b/src/stories/TextInput.stories.js index 64329ffed715..2a9e862d6876 100644 --- a/src/stories/TextInput.stories.js +++ b/src/stories/TextInput.stories.js @@ -60,32 +60,6 @@ PlaceholderInput.args = { placeholder: 'My placeholder text', }; -const AutoGrowInput = Template.bind({}); -AutoGrowInput.args = { - label: 'Autogrow input', - name: 'AutoGrow', - placeholder: 'My placeholder text', - autoGrow: true, - textInputContainerStyles: [ - { - minWidth: 150, - }, - ], -}; - -const AutoGrowHeightInput = Template.bind({}); -AutoGrowHeightInput.args = { - label: 'Autogrowheight input', - name: 'AutoGrowHeight', - placeholder: 'My placeholder text', - autoGrowHeight: true, - textInputContainerStyles: [ - { - maxHeight: 115, - }, - ], -}; - const PrefixedInput = Template.bind({}); PrefixedInput.args = { label: 'Prefixed input', @@ -126,5 +100,44 @@ HintAndErrorInput.args = { hint: 'Type "Oops!" to see the error', }; +// To use autoGrow we need to control the TextInput's value +function AutoGrowSupportInput(args) { + const [value, setValue] = useState(''); + return ( + + ); +} + +const AutoGrowInput = AutoGrowSupportInput.bind({}); +AutoGrowInput.args = { + label: 'Autogrow input', + name: 'AutoGrow', + placeholder: 'My placeholder text', + autoGrow: true, + textInputContainerStyles: [ + { + minWidth: 150, + }, + ], +}; + +const AutoGrowHeightInput = AutoGrowSupportInput.bind({}); +AutoGrowHeightInput.args = { + label: 'Autogrowheight input', + name: 'AutoGrowHeight', + placeholder: 'My placeholder text', + autoGrowHeight: true, + textInputContainerStyles: [ + { + maxHeight: 115, + }, + ], +}; + export default story; export {AutoFocus, DefaultInput, DefaultValueInput, ErrorInput, ForceActiveLabel, PlaceholderInput, AutoGrowInput, AutoGrowHeightInput, PrefixedInput, MaxLengthInput, HintAndErrorInput}; From 68167d9599303b8775861101eb726d656142ffc8 Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Mon, 19 Jun 2023 02:11:11 +0200 Subject: [PATCH 230/826] Reverted changes in Podfile.lock, updated useEffect in OptionRowLHN --- ios/Podfile.lock | 6 +++--- src/components/LHNOptionsList/OptionRowLHN.js | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 41f6eadb9bd3..048eeca5f76f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1024,7 +1024,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1067,7 +1067,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 + RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1141,4 +1141,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.12.1 +COCOAPODS: 1.12.0 diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index e4b0903b9e2a..ccdf69dedc5d 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -67,17 +67,18 @@ function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); const runUseEffectOnlyOnce = useCallback(() => { - if (!optionItem) { - return null; - } if (!optionItem.hasDraftComment && props.comment && props.comment.length > 0 && !props.isFocused) { Report.setReportWithDraft(props.reportID, true); } + return null; }, [optionItem, props.comment, props.isFocused, props.reportID]); useEffect(() => { + if (!optionItem) { + return null; + } runUseEffectOnlyOnce(); - }, [runUseEffectOnlyOnce]); + }, [runUseEffectOnlyOnce, optionItem]); let popoverAnchor = null; const textStyle = props.isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText; From 32f37b793c57f08649a6050b31806b8a68511bb1 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Mon, 19 Jun 2023 11:07:14 +0100 Subject: [PATCH 231/826] use long for reportID to prevent negative invalid reportID --- .../customairshipextender/CustomNotificationProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index a0ef940368fe..9010f7f03adf 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -76,7 +76,7 @@ public class CustomNotificationProvider extends ReactNotificationProvider { private static final String ONYX_DATA_KEY = "onyxData"; private final ExecutorService executorService = Executors.newCachedThreadPool(); - public final HashMap cache = new HashMap<>(); + public final HashMap cache = new HashMap<>(); public CustomNotificationProvider(@NonNull Context context, @NonNull AirshipConfigOptions configOptions) { super(context, configOptions); @@ -168,7 +168,7 @@ public Bitmap getCroppedBitmap(Bitmap bitmap) { * @param notificationID Current notification ID */ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Builder builder, JsonMap payload, int notificationID) { - int reportID = payload.get("reportID").getInt(-1); + long reportID = payload.get("reportID").getLong(-1); if (reportID == -1) { return; } @@ -271,7 +271,7 @@ private long getMessageTimeInMillis(String createdTime) { * @param reportID Report ID. * @return Notification Cache. */ - private NotificationCache findOrCreateNotificationCache(int reportID) { + private NotificationCache findOrCreateNotificationCache(long reportID) { NotificationCache notificationCache = cache.get(reportID); if (notificationCache == null) { From 305fcc4bdb68212130998eaf4bdfe63be7b8261f Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Mon, 19 Jun 2023 17:43:45 +0300 Subject: [PATCH 232/826] Refactor: ReportAttachments pass `report` prop to `AttachmentModal` --- src/pages/home/report/ReportAttachments.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportAttachments.js b/src/pages/home/report/ReportAttachments.js index 203ba3d8c93e..38e7781aedf5 100644 --- a/src/pages/home/report/ReportAttachments.js +++ b/src/pages/home/report/ReportAttachments.js @@ -3,6 +3,7 @@ import _ from 'underscore'; import PropTypes from 'prop-types'; import AttachmentModal from '../../../components/AttachmentModal'; import Navigation from '../../../libs/Navigation/Navigation'; +import * as ReportUtils from '../../../libs/ReportUtils'; const propTypes = { /** Navigation route context info provided by react navigation */ @@ -19,13 +20,14 @@ const propTypes = { function ReportAttachments(props) { const reportID = _.get(props, ['route', 'params', 'reportID']); + const report = ReportUtils.getReport(reportID); const source = decodeURI(_.get(props, ['route', 'params', 'source'])); return ( Navigation.dismissModal(reportID)} /> From c38908ebf0d01393d2d233ae0bc6b794591136bf Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Mon, 19 Jun 2023 16:35:40 +0100 Subject: [PATCH 233/826] use currentReportID, fix from merge --- src/components/withCurrentReportID.js | 2 +- src/libs/Navigation/NavigationRoot.js | 2 +- src/pages/home/sidebar/SidebarLinks.js | 3 ++- tests/utils/LHNTestUtils.js | 16 ++++++++-------- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/withCurrentReportID.js b/src/components/withCurrentReportID.js index 6113e69ce678..b9b5654f73cd 100644 --- a/src/components/withCurrentReportID.js +++ b/src/components/withCurrentReportID.js @@ -11,7 +11,7 @@ const withCurrentReportIDPropTypes = { updateCurrentReportID: PropTypes.func.isRequired, /** The top most report id */ - D: PropTypes.string, + currentReportID: PropTypes.string, }; function CurrentReportIDContextProvider(props) { diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 6a526040d733..886e7f31cea6 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -28,7 +28,7 @@ const propTypes = { /** Fired when react-navigation is ready */ onReady: PropTypes.func.isRequired, - ...withCurrentReportIdPropTypes, + ...withCurrentReportIDPropTypes, }; /** diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 6fe1672902ec..9af4acb36ec9 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -53,6 +53,7 @@ const propTypes = { chatReports: PropTypes.objectOf(reportPropTypes), /** Current reportID from the route in react navigation state object */ + // eslint-disable-next-line react/no-unused-prop-types reportIDFromRoute: PropTypes.string, /** All report actions for all reports */ @@ -157,7 +158,7 @@ class SidebarLinks extends React.Component { render() { const isLoading = _.isEmpty(this.props.personalDetails) || _.isEmpty(this.props.chatReports); - const optionListItems = SidebarUtils.getOrderedReportIDs(this.props.reportIDFromRoute); + const optionListItems = SidebarUtils.getOrderedReportIDs(this.props.currentReportID); const skeletonPlaceholder = ; return ( diff --git a/tests/utils/LHNTestUtils.js b/tests/utils/LHNTestUtils.js index 9dd195c094b8..74ed87fb642c 100644 --- a/tests/utils/LHNTestUtils.js +++ b/tests/utils/LHNTestUtils.js @@ -165,9 +165,9 @@ function getAdvancedFakeReport(isArchived, isUserCreatedPolicyRoom, hasAddWorksp } /** - * @param {String} [reportIDFromRoute] + * @param {String} [currentReportID] */ -function getDefaultRenderedSidebarLinks(reportIDFromRoute = '') { +function getDefaultRenderedSidebarLinks(currentReportID = '') { // An ErrorBoundary needs to be added to the rendering so that any errors that happen while the component // renders are logged to the console. Without an error boundary, Jest only reports the error like "The above error // occurred in your component", except, there is no "above error". It's just swallowed up by Jest somewhere. @@ -196,16 +196,16 @@ function getDefaultRenderedSidebarLinks(reportIDFromRoute = '') { // our app (App.js) is when the react application is wrapped in the context providers render( - + , ); } /** - * @param {String} [reportIDFromRoute] + * @param {String} [currentReportID] * @returns {JSX.Element} */ -function MockedSidebarLinks({reportIDFromRoute}) { +function MockedSidebarLinks({currentReportID}) { return ( ); } MockedSidebarLinks.propTypes = { - reportIDFromRoute: PropTypes.string, + currentReportID: PropTypes.string, }; MockedSidebarLinks.defaultProps = { - reportIDFromRoute: '', + currentReportID: '', }; export {fakePersonalDetails, getDefaultRenderedSidebarLinks, getAdvancedFakeReport, getFakeReport, getFakeReportAction, MockedSidebarLinks}; From 5c33d73360f00cb87de3a3e2e13fb2e8ac4536e4 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Mon, 19 Jun 2023 16:45:25 +0100 Subject: [PATCH 234/826] add default props to withCurrentReportID and remove reportIDFromRoute from SidebarLinks --- src/components/withCurrentReportID.js | 6 +++++- src/pages/home/sidebar/SidebarLinks.js | 8 ++------ src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/withCurrentReportID.js b/src/components/withCurrentReportID.js index b9b5654f73cd..15abcc054f6b 100644 --- a/src/components/withCurrentReportID.js +++ b/src/components/withCurrentReportID.js @@ -14,6 +14,10 @@ const withCurrentReportIDPropTypes = { currentReportID: PropTypes.string, }; +const withCurrentReportIDDefaultProps = { + currentReportID: '', +}; + function CurrentReportIDContextProvider(props) { const [CurrentReportID, setCurrentReportID] = useState(''); @@ -69,4 +73,4 @@ export default function withCurrentReportID(WrappedComponent) { return WithCurrentReportID; } -export {withCurrentReportIDPropTypes, CurrentReportIDContextProvider}; +export {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps, CurrentReportIDContextProvider}; diff --git a/src/pages/home/sidebar/SidebarLinks.js b/src/pages/home/sidebar/SidebarLinks.js index 9af4acb36ec9..d6be6eeed112 100644 --- a/src/pages/home/sidebar/SidebarLinks.js +++ b/src/pages/home/sidebar/SidebarLinks.js @@ -28,7 +28,7 @@ import SidebarUtils from '../../../libs/SidebarUtils'; import reportPropTypes from '../../reportPropTypes'; import OfflineWithFeedback from '../../../components/OfflineWithFeedback'; import withNavigationFocus from '../../../components/withNavigationFocus'; -import withCurrentReportID, {withCurrentReportIDPropTypes} from '../../../components/withCurrentReportID'; +import withCurrentReportID, {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps} from '../../../components/withCurrentReportID'; import withNavigation, {withNavigationPropTypes} from '../../../components/withNavigation'; import Header from '../../../components/Header'; import defaultTheme from '../../../styles/themes/default'; @@ -52,10 +52,6 @@ const propTypes = { // eslint-disable-next-line react/no-unused-prop-types chatReports: PropTypes.objectOf(reportPropTypes), - /** Current reportID from the route in react navigation state object */ - // eslint-disable-next-line react/no-unused-prop-types - reportIDFromRoute: PropTypes.string, - /** All report actions for all reports */ // eslint-disable-next-line react/no-unused-prop-types reportActions: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.shape(reportActionPropTypes))), @@ -93,11 +89,11 @@ const defaultProps = { chatReports: {}, reportActions: {}, personalDetails: {}, - reportIDFromRoute: '', currentUserPersonalDetails: { avatar: '', }, priorityMode: CONST.PRIORITY_MODE.DEFAULT, + ...withCurrentReportIDDefaultProps, }; class SidebarLinks extends React.Component { diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js index bbe4806deb76..89807877542c 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js @@ -58,7 +58,6 @@ class BaseSidebarScreen extends Component { insets={insets} onAvatarClick={this.navigateToSettings} isSmallScreenWidth={this.props.isSmallScreenWidth} - reportIDFromRoute={this.props.reportIDFromRoute} onLayout={this.props.onLayout} /> From bda9cd06cfbab8f3d637033b81afb7591a46d13f Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Mon, 19 Jun 2023 17:08:11 +0100 Subject: [PATCH 235/826] rename fixes --- src/components/withCurrentReportID.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/withCurrentReportID.js b/src/components/withCurrentReportID.js index 15abcc054f6b..44fbadaca1bd 100644 --- a/src/components/withCurrentReportID.js +++ b/src/components/withCurrentReportID.js @@ -19,10 +19,10 @@ const withCurrentReportIDDefaultProps = { }; function CurrentReportIDContextProvider(props) { - const [CurrentReportID, setCurrentReportID] = useState(''); + const [currentReportID, setCurrentReportID] = useState(''); /** - * This function is used to update the CurrentReportID + * This function is used to update the currentReportID * @param {Object} state root navigation state */ const updateCurrentReportID = useCallback( @@ -34,14 +34,14 @@ function CurrentReportIDContextProvider(props) { /** * The context this component exposes to child components - * @returns {Object} CurrentReportID to share between central pane and LHN + * @returns {Object} currentReportID to share between central pane and LHN */ const contextValue = useMemo( () => ({ updateCurrentReportID, - CurrentReportID, + currentReportID, }), - [updateCurrentReportID, CurrentReportID], + [updateCurrentReportID, currentReportID], ); return {props.children}; @@ -73,4 +73,4 @@ export default function withCurrentReportID(WrappedComponent) { return WithCurrentReportID; } -export {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps, CurrentReportIDContextProvider}; +export {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps, CurrentReportIDContextProvider}; \ No newline at end of file From d1efed0c5dd115d0996e8282f330070127e1aa96 Mon Sep 17 00:00:00 2001 From: Georgia Monahan Date: Mon, 19 Jun 2023 17:18:34 +0100 Subject: [PATCH 236/826] prettier --- src/components/withCurrentReportID.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/withCurrentReportID.js b/src/components/withCurrentReportID.js index 44fbadaca1bd..48924e8ea609 100644 --- a/src/components/withCurrentReportID.js +++ b/src/components/withCurrentReportID.js @@ -73,4 +73,4 @@ export default function withCurrentReportID(WrappedComponent) { return WithCurrentReportID; } -export {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps, CurrentReportIDContextProvider}; \ No newline at end of file +export {withCurrentReportIDPropTypes, withCurrentReportIDDefaultProps, CurrentReportIDContextProvider}; From 102b88bc65ea573aeb4d683e92fd2a4de7a32db2 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 19 Jun 2023 19:34:21 +0200 Subject: [PATCH 237/826] remove animation for replace inside RHPStack --- .../Navigators/RightModalNavigator.js | 25 ++----------------- .../AppNavigator/RHPScreenOptions.js | 12 +++++++++ 2 files changed, 14 insertions(+), 23 deletions(-) create mode 100644 src/libs/Navigation/AppNavigator/RHPScreenOptions.js diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js index cb82795936c2..697aaac4594c 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js @@ -2,116 +2,95 @@ import React from 'react'; import {createStackNavigator} from '@react-navigation/stack'; import * as ModalStackNavigators from '../ModalStackNavigators'; -import defaultModalScreenOptions from '../defaultModalScreenOptions'; +import RHPScreenOptions from '../RHPScreenOptions'; const Stack = createStackNavigator(); function RigthModalNavigator() { return ( - + diff --git a/src/libs/Navigation/AppNavigator/RHPScreenOptions.js b/src/libs/Navigation/AppNavigator/RHPScreenOptions.js new file mode 100644 index 000000000000..9aa984023f4f --- /dev/null +++ b/src/libs/Navigation/AppNavigator/RHPScreenOptions.js @@ -0,0 +1,12 @@ +import {CardStyleInterpolators} from '@react-navigation/stack'; +import styles from '../../../styles/styles'; + +const RHPScreenOptions = { + headerShown: false, + animationEnabled: false, + gestureDirection: 'horizontal', + cardStyle: styles.navigationScreenCardStyle, + cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, +}; + +export default RHPScreenOptions; From 66652df6322eb3e3e56c4ee7246ebdc772c52431 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 19 Jun 2023 19:59:55 +0200 Subject: [PATCH 238/826] add minimalAction utility for linkTo --- src/libs/Navigation/linkTo.js | 54 +++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 1d219c450ecc..076808538f62 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -5,6 +5,43 @@ import linkingConfig from './linkingConfig'; import getTopmostReportId from './getTopmostReportId'; import getStateFromPath from './getStateFromPath'; +/** + * Find minimal action for RHP. + * This is necessary because getActionFromState doesn't take into consideration current navigation state. + * That means that even if we want to open profile screen and the settings flow is currently opend, the target will be RHPNavigator and the payload will include whole structure. + * that causess the issue described here https://github.com/Expensify/App/issues/20620 + * + * To avoid that we are looking for the smallest possible action. In this case it will be push profile screen and the target will be the settings navigator. + * + * @param {Object} action action generated by getActionFromState + * @param {Object} state root state + * @returns {{minimalAction: Object, targetName: String}} minimal action is the action that we should dispatch and targetName is the name of the target navigator. + * targetName name is necessary to determine if we are going to use REPLACE for navigating between RHP flows. + */ +function getMinimalAction(action, state) { + let currentAction = action; + let currentState = state + let currentTargetKey = null; + let targetName = null; + + while (currentState.routes[currentState.index].name === currentAction.payload.name ) { + targetName = currentState.routes[currentState.index].name; + currentState = currentState.routes[currentState.index].state; + + currentTargetKey = currentState.key; + // Creating new smaller action + currentAction = { + type: currentAction.type, + payload: { + name: currentAction.payload.params.screen, + params: currentAction.payload.params.params, + }, + target: currentTargetKey, + }; + } + return { minimalAction: currentAction, targetName }; +} + export default function linkTo(navigation, path, type) { if (navigation === undefined) { throw new Error("Couldn't find a navigation object. Is your component inside a screen in a navigator?"); @@ -29,8 +66,8 @@ export default function linkTo(navigation, path, type) { if (action.payload.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR && getTopmostReportId(root.getState()) !== getTopmostReportId(state)) { action.type = 'PUSH'; - // If this action is navigating to the RightModalNavigator and the last route on the root navigator is also RightModalNavigator - // then we want to replace the current RHP state with new one + // Type is up we deeplinked to the one of RHP flows and we want to replace the current screen with the previous one in the flow + // and at the same time we want the back button to go to the page we were before the deeplink } else if (type === 'UP') { action.type = 'REPLACE'; @@ -39,6 +76,19 @@ export default function linkTo(navigation, path, type) { action.type = 'PUSH'; } } + + // We want to look for minimal action only for RHP screens + if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { + const { minimalAction, targetName } = getMinimalAction(action, navigation.getRootState()); + if (minimalAction) { + // If the target name is RHP that means this action is responsible for changing flow e.g. from settings to search. In that case we want to use REPLACE. + if (targetName === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { + minimalAction.type = "REPLACE"; + } + root.dispatch(minimalAction); + return; + } + } if (action !== undefined) { root.dispatch(action); From ebf4c7432af3c262f489222c1522c99f591340c3 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 19 Jun 2023 20:20:51 +0200 Subject: [PATCH 239/826] add prettier adjustments --- src/libs/Navigation/linkTo.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 076808538f62..99aa35f5e06c 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -10,21 +10,21 @@ import getStateFromPath from './getStateFromPath'; * This is necessary because getActionFromState doesn't take into consideration current navigation state. * That means that even if we want to open profile screen and the settings flow is currently opend, the target will be RHPNavigator and the payload will include whole structure. * that causess the issue described here https://github.com/Expensify/App/issues/20620 - * + * * To avoid that we are looking for the smallest possible action. In this case it will be push profile screen and the target will be the settings navigator. * - * @param {Object} action action generated by getActionFromState + * @param {Object} action action generated by getActionFromState * @param {Object} state root state - * @returns {{minimalAction: Object, targetName: String}} minimal action is the action that we should dispatch and targetName is the name of the target navigator. + * @returns {{minimalAction: Object, targetName: String}} minimal action is the action that we should dispatch and targetName is the name of the target navigator. * targetName name is necessary to determine if we are going to use REPLACE for navigating between RHP flows. */ function getMinimalAction(action, state) { let currentAction = action; - let currentState = state + let currentState = state; let currentTargetKey = null; let targetName = null; - - while (currentState.routes[currentState.index].name === currentAction.payload.name ) { + + while (currentState.routes[currentState.index].name === currentAction.payload.name) { targetName = currentState.routes[currentState.index].name; currentState = currentState.routes[currentState.index].state; @@ -39,7 +39,7 @@ function getMinimalAction(action, state) { target: currentTargetKey, }; } - return { minimalAction: currentAction, targetName }; + return {minimalAction: currentAction, targetName}; } export default function linkTo(navigation, path, type) { @@ -76,14 +76,14 @@ export default function linkTo(navigation, path, type) { action.type = 'PUSH'; } } - + // We want to look for minimal action only for RHP screens if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { - const { minimalAction, targetName } = getMinimalAction(action, navigation.getRootState()); + const {minimalAction, targetName} = getMinimalAction(action, navigation.getRootState()); if (minimalAction) { - // If the target name is RHP that means this action is responsible for changing flow e.g. from settings to search. In that case we want to use REPLACE. + // If the target name is RHP that means this action is responsible for changing flow e.g. from settings to search. In that case we want to use REPLACE. if (targetName === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { - minimalAction.type = "REPLACE"; + minimalAction.type = 'REPLACE'; } root.dispatch(minimalAction); return; From 0c2f8e58ff1c1b8961a177449e784e9bd3d4f65b Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 19 Jun 2023 20:33:46 +0200 Subject: [PATCH 240/826] add prettier adjustments v2 --- .../Navigation/AppNavigator/Navigators/RightModalNavigator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js index 697aaac4594c..0ee2933e3eb5 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js @@ -8,7 +8,7 @@ const Stack = createStackNavigator(); function RigthModalNavigator() { return ( - + Date: Mon, 19 Jun 2023 13:48:53 -0700 Subject: [PATCH 241/826] centralizing logic --- src/components/AvatarWithDisplayName.js | 4 ++ src/components/MoneyRequestHeader.js | 1 - src/pages/home/HeaderView.js | 50 ++++++++++++------------- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index c5a7fcbacc1c..359734b5ba5e 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -54,6 +54,10 @@ const defaultProps = { }; function AvatarWithDisplayName(props) { + if (props.report.reportID == '5154639516299574') { + debugger; + } + const title2 = ReportUtils.getReportName(props.report); const title = props.isAnonymous ? props.report.displayName : ReportUtils.getDisplayNameForParticipant(props.report.ownerAccountID, true); const subtitle = ReportUtils.getChatRoomSubtitle(props.report); const isExpenseReport = ReportUtils.isExpenseReport(props.report); diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index af79fd2b8132..714a41035b75 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -105,7 +105,6 @@ function MoneyRequestHeader(props) { ]} threeDotsAnchorPosition={styles.threeDotsPopoverOffsetNoCloseButton(props.windowWidth)} report={props.report} - parentReport={moneyRequestReport} policies={props.policies} personalDetails={props.personalDetails} shouldShowBackButton={props.isSmallScreenWidth} diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 86eaa10c2311..eae64822aa34 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -178,33 +178,29 @@ function HeaderView(props) { textStyles={[styles.headerText, styles.pre]} shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread || isTaskReport} /> - {(isChatRoom || isPolicyExpenseChat || isThread) && ( - <> - {!_.isEmpty(subtitleLink) && ( - { - Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); - }} - accessibilityLabel={subtitleLink} - accessibilityRole="link" - > - - {subtitleLink} - - - )} - {!_.isEmpty(subtitle) && ( - - {subtitle} - - )} - + {!_.isEmpty(subtitleLink) && ( + { + Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); + }} + accessibilityLabel={subtitleLink} + accessibilityRole="link" + > + + {subtitleLink} + + + )} + {!_.isEmpty(subtitle) && ( + + {subtitle} + )} {brickRoadIndicator === CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR && ( From 0e3f048c7b0ce91ab341c4e45f423f6f58110d95 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 19 Jun 2023 13:57:30 -0700 Subject: [PATCH 242/826] Fix icon margin in menu --- src/pages/settings/LoungeAccessPage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index e7829512b1dd..84c2aff8efae 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -65,6 +65,7 @@ function LoungeAccessPage(props) { icon={item.icon} iconWidth={60} iconHeight={60} + iconStyles={[styles.mr2]} /> ))} From a9ab57e7d766f5ec1ccdcf5b130dff8e566dbf20 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 19 Jun 2023 14:04:10 -0700 Subject: [PATCH 243/826] Simplify styles --- src/pages/settings/LoungeAccessPage.js | 44 ++++++++++++-------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index 84c2aff8efae..dbe25dbc43b3 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -44,31 +44,29 @@ function LoungeAccessPage(props) { title={props.translate('loungeAccessPage.loungeAccess')} onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)} /> - - - - - - - {props.translate('loungeAccessPage.headline')} - - {props.translate('loungeAccessPage.description')} - + + + + + + {props.translate('loungeAccessPage.headline')} + + {props.translate('loungeAccessPage.description')} - {_.map(menuItems, (item) => ( - - ))} + {_.map(menuItems, (item) => ( + + ))} )} From 4285fc2a82341bc22fd0e6f3c6010f77087ee7f0 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Mon, 19 Jun 2023 15:52:03 -0700 Subject: [PATCH 244/826] removing debug code --- src/components/AvatarWithDisplayName.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index 359734b5ba5e..c5a7fcbacc1c 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -54,10 +54,6 @@ const defaultProps = { }; function AvatarWithDisplayName(props) { - if (props.report.reportID == '5154639516299574') { - debugger; - } - const title2 = ReportUtils.getReportName(props.report); const title = props.isAnonymous ? props.report.displayName : ReportUtils.getDisplayNameForParticipant(props.report.ownerAccountID, true); const subtitle = ReportUtils.getChatRoomSubtitle(props.report); const isExpenseReport = ReportUtils.isExpenseReport(props.report); From 5bccf00bd969b243f8d8603d34d0216478b8f12e Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Mon, 19 Jun 2023 15:52:18 -0700 Subject: [PATCH 245/826] correcting props --- src/components/MoneyRequestHeader.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index 714a41035b75..80b2b54bd9a1 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -90,6 +90,11 @@ function MoneyRequestHeader(props) { const shouldShowSettlementButton = !isSettled && !props.isSingleTransactionView && isPayer; const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); const shouldShowPaypal = Boolean(lodashGet(props.personalDetails, [moneyRequestReport.managerID, 'payPalMeAddress'])); + const report = props.report; + if (props.isSingleTransactionView) { + report.ownerAccountID = props.parentReport.ownerAccountID; + report.ownerEmail = props.parentReport.ownerEmail; + } return ( Date: Mon, 19 Jun 2023 15:52:42 -0700 Subject: [PATCH 246/826] updating logic for IOU and expense report children --- src/libs/ReportUtils.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index d3d15f812372..589c653a9662 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -20,6 +20,7 @@ import isReportMessageAttachment from './isReportMessageAttachment'; import * as defaultWorkspaceAvatars from '../components/Icon/WorkspaceDefaultAvatars'; import * as CurrencyUtils from './CurrencyUtils'; import * as UserUtils from './UserUtils'; +import {isMoneyRequestAction} from './ReportActionsUtils'; let sessionEmail; let sessionAccountID; @@ -1064,7 +1065,7 @@ function getReportName(report) { */ function getRootOrExpenseReportName(report) { if (isThread(report)) { - if (isExpenseReport(report)) { + if (isMoneyRequestReport(report)) { return lodashGet(report, 'displayName', ''); } const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); @@ -1105,6 +1106,9 @@ function getChatRoomSubtitle(report) { * @returns {String} */ function getChatRoomSubtitleLink(report) { + if (report.reportID == '3519318573359925') { + debugger; + } if (isThread(report)) { const from = Localize.translateLocal('threads.from'); const workspaceName = getPolicyName(report); @@ -1117,9 +1121,9 @@ function getChatRoomSubtitleLink(report) { return `${from} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; } - if (isExpenseReport(report)) { + if (isMoneyRequestReport(report)) { const payeeEmail = getDisplayNameForParticipant(report.managerID); - return `${from} ${workspaceName ? [payeeEmail, workspaceName].join(' in ') : payeeEmail}`; + return isIOUReport(report) ? `${from} ${payeeEmail}` : `${from} ${payeeEmail} in ${workspaceName}`; } return `${from} ${getRootOrExpenseReportName(report)}`; From 599d489d8aa685c080a249cdb3a7ea8a30bf278d Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Mon, 19 Jun 2023 15:52:57 -0700 Subject: [PATCH 247/826] removing debug --- src/libs/ReportUtils.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 589c653a9662..5e4ebd190440 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1106,9 +1106,6 @@ function getChatRoomSubtitle(report) { * @returns {String} */ function getChatRoomSubtitleLink(report) { - if (report.reportID == '3519318573359925') { - debugger; - } if (isThread(report)) { const from = Localize.translateLocal('threads.from'); const workspaceName = getPolicyName(report); From 687fff96fb398ced0ea359eaba023fe24902febc Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Mon, 19 Jun 2023 17:22:50 -0700 Subject: [PATCH 248/826] code improvements --- src/libs/ReportUtils.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 1e3ccdce0360..68fea3726ec6 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1058,13 +1058,18 @@ function getReportName(report) { * @param {Object} report * @returns {String|*} */ -function getRootOrExpenseReportName(report) { +function getRootOrExpenseReportNameWithWorkspace(report) { if (isThread(report)) { - if (isMoneyRequestReport(report)) { + if (isIOUReport(report)) { return lodashGet(report, 'displayName', ''); } + if (isExpenseReport(report)) { + const workspaceName = getPolicyName(report); + return `${lodashGet(report, 'displayName', '')} in ${workspaceName}`; + } + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - return getRootOrExpenseReportName(parentReport); + return getRootOrExpenseReportNameWithWorkspace(parentReport); } return getReportName(report); @@ -1118,7 +1123,7 @@ function getChatRoomSubtitleLink(report) { return isIOUReport(report) ? `${from} ${payeeEmail}` : `${from} ${payeeEmail} in ${workspaceName}`; } - return `${from} ${getRootOrExpenseReportName(report)}`; + return `${from} ${getRootOrExpenseReportNameWithWorkspace(report)}`; } return ''; } From a0765633253b843a703bd13097f5282ef270240e Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Mon, 19 Jun 2023 17:36:13 -0700 Subject: [PATCH 249/826] task logic improvements --- src/libs/ReportUtils.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 68fea3726ec6..2660c6751c92 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1068,6 +1068,12 @@ function getRootOrExpenseReportNameWithWorkspace(report) { return `${lodashGet(report, 'displayName', '')} in ${workspaceName}`; } + if (isTaskReport(report)) { + const workspaceName = report.policyID === CONST.POLICY.OWNER_EMAIL_FAKE ? '' : getPolicyName(report); + const displayName = getDisplayNameForParticipant(report.ownerAccountID); + return `${workspaceName ? [displayName, workspaceName].join(' in ') : displayName}`; + } + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); return getRootOrExpenseReportNameWithWorkspace(parentReport); } From dc5a7f005392f9e6b2c5b39f1bb37bb51f7df711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Tue, 20 Jun 2023 09:27:42 +0200 Subject: [PATCH 250/826] fix update label --- src/components/TextInput/BaseTextInput.js | 22 ++++++++++++++++++---- src/stories/TextInput.stories.js | 7 ++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 6fe66c76f5aa..2c4f5a983e6e 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -167,17 +167,26 @@ function BaseTextInput(props) { [props.autoGrowHeight, props.multiline], ); + const hasValueRef = useRef(inputValue.length > 0); useEffect(() => { - // Activate or deactivate the label when value is changed programmatically from outside + // Handle side effects when the value gets changed programatically from the outside // In some cases, When the value prop is empty, it is not properly updated on the TextInput due to its uncontrolled nature, thus manually clearing the TextInput. if (inputValue === '') { input.current.clear(); } - if (inputValue || isFocused) { + if (inputValue) { + activateLabel() + } + }, [activateLabel, inputValue]) + + useEffect(() => { + // Activate or deactivate the label when the focus changes + + if (hasValueRef.current || isFocused) { activateLabel(); - } else if (!isFocused) { + } else if (!hasValueRef.current && !isFocused) { deactivateLabel(); } }, [activateLabel, deactivateLabel, inputValue, isFocused]); @@ -194,7 +203,12 @@ function BaseTextInput(props) { } Str.result(props.onChangeText, value); - activateLabel(); + if (value && value.length > 0) { + hasValueRef.current = true + activateLabel(); + } else { + hasValueRef.current = false + } }; const togglePasswordVisibility = useCallback(() => { diff --git a/src/stories/TextInput.stories.js b/src/stories/TextInput.stories.js index 2a9e862d6876..4c24e5b7904e 100644 --- a/src/stories/TextInput.stories.js +++ b/src/stories/TextInput.stories.js @@ -102,7 +102,11 @@ HintAndErrorInput.args = { // To use autoGrow we need to control the TextInput's value function AutoGrowSupportInput(args) { - const [value, setValue] = useState(''); + const [value, setValue] = useState(args.value || ''); + React.useEffect(() => { + setValue(args.value || '') + }, [args.value]) + return ( Date: Tue, 20 Jun 2023 09:28:33 +0200 Subject: [PATCH 251/826] add max width --- src/stories/TextInput.stories.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stories/TextInput.stories.js b/src/stories/TextInput.stories.js index 4c24e5b7904e..72467f0535bf 100644 --- a/src/stories/TextInput.stories.js +++ b/src/stories/TextInput.stories.js @@ -123,12 +123,13 @@ AutoGrowInput.args = { name: 'AutoGrow', placeholder: 'My placeholder text', autoGrow: true, - value: '', textInputContainerStyles: [ { minWidth: 150, + maxWidth: 500, }, ], + value: '', }; const AutoGrowHeightInput = AutoGrowSupportInput.bind({}); From 7c52921b1e1e0ec6f2ade41dbf88ea949115efa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Tue, 20 Jun 2023 09:51:57 +0200 Subject: [PATCH 252/826] prettier --- src/components/TextInput/BaseTextInput.js | 8 ++++---- src/stories/TextInput.stories.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 2c4f5a983e6e..b3fe23f99511 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -177,9 +177,9 @@ function BaseTextInput(props) { } if (inputValue) { - activateLabel() + activateLabel(); } - }, [activateLabel, inputValue]) + }, [activateLabel, inputValue]); useEffect(() => { // Activate or deactivate the label when the focus changes @@ -204,10 +204,10 @@ function BaseTextInput(props) { Str.result(props.onChangeText, value); if (value && value.length > 0) { - hasValueRef.current = true + hasValueRef.current = true; activateLabel(); } else { - hasValueRef.current = false + hasValueRef.current = false; } }; diff --git a/src/stories/TextInput.stories.js b/src/stories/TextInput.stories.js index 72467f0535bf..098828c65198 100644 --- a/src/stories/TextInput.stories.js +++ b/src/stories/TextInput.stories.js @@ -104,8 +104,8 @@ HintAndErrorInput.args = { function AutoGrowSupportInput(args) { const [value, setValue] = useState(args.value || ''); React.useEffect(() => { - setValue(args.value || '') - }, [args.value]) + setValue(args.value || ''); + }, [args.value]); return ( Date: Tue, 20 Jun 2023 15:04:50 +0200 Subject: [PATCH 253/826] Update src/libs/Navigation/linkTo.js Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- src/libs/Navigation/linkTo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 99aa35f5e06c..d5e22a8e3e28 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -81,7 +81,7 @@ export default function linkTo(navigation, path, type) { if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { const {minimalAction, targetName} = getMinimalAction(action, navigation.getRootState()); if (minimalAction) { - // If the target name is RHP that means this action is responsible for changing flow e.g. from settings to search. In that case we want to use REPLACE. + // If the target name is RHP that means this action is responsible for changing flow within the RHP e.g. from settings to search. In that case we want to use REPLACE. if (targetName === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { minimalAction.type = 'REPLACE'; } From 7765be311f8327305442d15f72f511be311f4e1e Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:05:21 +0200 Subject: [PATCH 254/826] Update src/libs/Navigation/linkTo.js Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- src/libs/Navigation/linkTo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index d5e22a8e3e28..06a317698590 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -66,7 +66,7 @@ export default function linkTo(navigation, path, type) { if (action.payload.name === NAVIGATORS.CENTRAL_PANE_NAVIGATOR && getTopmostReportId(root.getState()) !== getTopmostReportId(state)) { action.type = 'PUSH'; - // Type is up we deeplinked to the one of RHP flows and we want to replace the current screen with the previous one in the flow + // If the type is UP, we deeplinked into one of the RHP flows and we want to replace the current screen with the previous one in the flow // and at the same time we want the back button to go to the page we were before the deeplink } else if (type === 'UP') { action.type = 'REPLACE'; From b9c5e9b2a3482c759742181f788614082a4924c2 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:08:01 +0200 Subject: [PATCH 255/826] Update src/libs/Navigation/linkTo.js Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- src/libs/Navigation/linkTo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 06a317698590..7879ef6daa8d 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -8,7 +8,7 @@ import getStateFromPath from './getStateFromPath'; /** * Find minimal action for RHP. * This is necessary because getActionFromState doesn't take into consideration current navigation state. - * That means that even if we want to open profile screen and the settings flow is currently opend, the target will be RHPNavigator and the payload will include whole structure. + * That means that even if we want to open profile screen and the settings flow is currently opened, the target will be RHPNavigator and the payload will include whole structure. * that causess the issue described here https://github.com/Expensify/App/issues/20620 * * To avoid that we are looking for the smallest possible action. In this case it will be push profile screen and the target will be the settings navigator. From fc1abd56143aea4b20c08beb8ced0a1458062c3f Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:08:11 +0200 Subject: [PATCH 256/826] Update src/libs/Navigation/linkTo.js Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- src/libs/Navigation/linkTo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 7879ef6daa8d..a96b496a7200 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -9,7 +9,7 @@ import getStateFromPath from './getStateFromPath'; * Find minimal action for RHP. * This is necessary because getActionFromState doesn't take into consideration current navigation state. * That means that even if we want to open profile screen and the settings flow is currently opened, the target will be RHPNavigator and the payload will include whole structure. - * that causess the issue described here https://github.com/Expensify/App/issues/20620 + * That causes unexpected behaviour when clicking browser back in some of the RHP flows. * * To avoid that we are looking for the smallest possible action. In this case it will be push profile screen and the target will be the settings navigator. * From 89701cae2a59dcd929eedfda8cd4016a2ea2bac6 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Tue, 20 Jun 2023 15:08:19 +0200 Subject: [PATCH 257/826] Update src/libs/Navigation/linkTo.js Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- src/libs/Navigation/linkTo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index a96b496a7200..735eaf040e66 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -14,7 +14,7 @@ import getStateFromPath from './getStateFromPath'; * To avoid that we are looking for the smallest possible action. In this case it will be push profile screen and the target will be the settings navigator. * * @param {Object} action action generated by getActionFromState - * @param {Object} state root state + * @param {Object} state The root state * @returns {{minimalAction: Object, targetName: String}} minimal action is the action that we should dispatch and targetName is the name of the target navigator. * targetName name is necessary to determine if we are going to use REPLACE for navigating between RHP flows. */ From ce8d15c04d8b6d4e5fd7d70fa13be101b55ea417 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Tue, 20 Jun 2023 16:18:42 +0200 Subject: [PATCH 258/826] disable KeyboardAvoidingView for the BaseSidebarScreen --- src/components/ScreenWrapper/index.js | 1 + src/components/ScreenWrapper/propTypes.js | 4 ++++ src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js | 1 + 3 files changed, 6 insertions(+) diff --git a/src/components/ScreenWrapper/index.js b/src/components/ScreenWrapper/index.js index 95677a49570d..22cbd9441106 100644 --- a/src/components/ScreenWrapper/index.js +++ b/src/components/ScreenWrapper/index.js @@ -126,6 +126,7 @@ class ScreenWrapper extends React.Component { {}, modal: {}, keyboardAvoidingViewBehavior: 'padding', + shouldEnableKeyboardAvodingView: true, shouldEnableMaxHeight: false, shouldEnablePickerAvoiding: true, }; diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js index bbe4806deb76..d871dd64ce6b 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js @@ -49,6 +49,7 @@ class BaseSidebarScreen extends Component { {({insets}) => ( <> From f213e8f1d01097fe66fbdc59cb9c18b13a7f951d Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Tue, 20 Jun 2023 19:55:14 +0530 Subject: [PATCH 259/826] Fix wrongly merged code --- src/pages/NewChatPage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 159500a22367..ed8ddf69b18f 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -14,6 +14,7 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../components/wit import HeaderWithBackButton from '../components/HeaderWithBackButton'; import ScreenWrapper from '../components/ScreenWrapper'; import withLocalize, {withLocalizePropTypes} from '../components/withLocalize'; +import * as Browser from '../libs/Browser'; import compose from '../libs/compose'; import personalDetailsPropType from './personalDetailsPropType'; import reportPropTypes from './reportPropTypes'; @@ -203,7 +204,7 @@ function NewChatPage(props) { onChangeText={updateOptionsWithSearchTerm} headerMessage={headerMessage} boldStyle - shouldFocusOnSelectRow={props.isGroupChat} + shouldFocusOnSelectRow={props.isGroupChat && !Browser.isMobile()} shouldShowConfirmButton={props.isGroupChat} shouldShowOptions={didScreenTransitionEnd && isOptionsDataReady} confirmButtonText={props.translate('newChatPage.createGroup')} From 80a9a9b0c44e9ddf79611f36c1c4a4b6fba23905 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Tue, 20 Jun 2023 20:01:38 +0530 Subject: [PATCH 260/826] fix lint --- src/pages/NewChatPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index ed8ddf69b18f..7585c979b2b4 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -174,7 +174,7 @@ function NewChatPage(props) { return; } Report.navigateToAndOpenReport(logins); - } + }; useEffect(() => { updateOptionsWithSearchTerm(searchTerm); From 4c07cac031eac42b9af03fb303a184abed9a8caa Mon Sep 17 00:00:00 2001 From: Daraksha Date: Tue, 20 Jun 2023 20:07:23 +0530 Subject: [PATCH 261/826] add new var --- src/styles/variables.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles/variables.js b/src/styles/variables.js index e0a9b78e60cb..96231e1b24ff 100644 --- a/src/styles/variables.js +++ b/src/styles/variables.js @@ -18,6 +18,7 @@ export default { contentHeaderHeight: getValueUsingPixelRatio(65, 100), componentSizeSmall: getValueUsingPixelRatio(28, 32), componentSizeNormal: 40, + componentSizeMedium: 48, inputComponentSizeNormal: 40, componentSizeLarge: 52, componentBorderRadius: 8, From 214a1906b7e74d36f6b2b8fc5fcb562aabc4f247 Mon Sep 17 00:00:00 2001 From: Daraksha Date: Tue, 20 Jun 2023 20:08:40 +0530 Subject: [PATCH 262/826] updat heights of composer and its buttons --- src/styles/styles.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 874205afa219..0dfe6edce787 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1274,7 +1274,7 @@ const styles = { createMenuPositionReportActionCompose: (windowHeight) => ({ horizontal: 18 + variables.sideBarWidth, - vertical: windowHeight - 75, + vertical: windowHeight - 83, }), createMenuPositionRightSidepane: { @@ -1550,7 +1550,7 @@ const styles = { backgroundColor: themeColors.componentBG, borderWidth: 1, borderRadius: variables.componentBorderRadiusRounded, - minHeight: variables.componentSizeNormal, + minHeight: variables.componentSizeMedium, }, chatItemFullComposeBox: { @@ -1636,8 +1636,8 @@ const styles = { alignSelf: 'flex-end', borderRadius: variables.componentBorderRadiusRounded, backgroundColor: themeColors.transparent, - height: 32, - padding: 6, + height: 40, + padding: 10, margin: 3, justifyContent: 'center', }, @@ -1704,9 +1704,9 @@ const styles = { chatItemEmojiButton: { alignSelf: 'flex-end', borderRadius: variables.buttonBorderRadius, - height: 32, + height: 40, marginVertical: 3, - paddingHorizontal: 6, + paddingHorizontal: 10, justifyContent: 'center', }, @@ -1721,12 +1721,13 @@ const styles = { composerSizeButton: { alignSelf: 'center', - height: 32, + height: 40, width: 32, padding: 6, margin: 3, borderRadius: variables.componentBorderRadiusRounded, backgroundColor: themeColors.transparent, + justifyContent: 'center', }, chatItemAttachmentPlaceholder: { From 4dd5f0a66e81cbe66d7a5f420f17c45b102bc7e7 Mon Sep 17 00:00:00 2001 From: oleh Date: Tue, 20 Jun 2023 17:58:01 +0300 Subject: [PATCH 263/826] restore function orders per reviewer's request --- .../MoneyRequestParticipantsSplitSelector.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 6f01444b1f04..fd32e2737574 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -134,6 +134,8 @@ function MoneyRequestParticipantsSplitSelector(props) { } else { newSelectedOptions = [...props.participants, option]; } + + props.onAddParticipants(newSelectedOptions); const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( props.reports, @@ -149,14 +151,6 @@ function MoneyRequestParticipantsSplitSelector(props) { personalDetails, userToInvite, }); - props.onAddParticipants(newSelectedOptions); - }; - - /** - * Once a single or more users are selected, navigates to next step - */ - const finalizeParticipants = () => { - props.onStepComplete(); }; const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; @@ -199,7 +193,7 @@ function MoneyRequestParticipantsSplitSelector(props) { boldStyle shouldShowConfirmButton confirmButtonText={props.translate('common.next')} - onConfirmSelection={finalizeParticipants} + onConfirmSelection={props.onStepComplete()} textInputLabel={props.translate('optionsSelector.nameEmailOrPhoneNumber')} safeAreaPaddingBottomStyle={props.safeAreaPaddingBottomStyle} shouldShowOptions={isOptionsDataReady} From 4ea026a6c7f66b7ec3a43a8ccd1321386d6e73a8 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 20 Jun 2023 16:00:09 +0100 Subject: [PATCH 264/826] fix issue where notification cache wasn't dismissed --- .../chat/customairshipextender/CustomNotificationProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index 9010f7f03adf..f1432fc730e3 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -290,7 +290,7 @@ private NotificationCache findOrCreateNotificationCache(long reportID) { public void onDismissNotification(PushMessage message) { try { JsonMap payload = JsonValue.parseString(message.getExtra(PAYLOAD_KEY)).optMap(); - int reportID = payload.get("reportID").getInt(-1); + long reportID = payload.get("reportID").getLong(-1); if (reportID == -1) { return; From bb6bc2993fe451e92ad3a31d7a4b92c0e2b7fe3c Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Tue, 20 Jun 2023 16:17:19 +0100 Subject: [PATCH 265/826] prevent peek notification from being expanded, and refactor roomName variable --- .../customairshipextender/CustomNotificationProvider.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index f1432fc730e3..a22b47de0948 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -1,7 +1,7 @@ package com.expensify.chat.customairshipextender; import static androidx.core.app.NotificationCompat.CATEGORY_MESSAGE; -import static androidx.core.app.NotificationCompat.PRIORITY_MAX; +import static androidx.core.app.NotificationCompat.PRIORITY_HIGH; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; @@ -99,7 +99,7 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { builder.setChannelId(CHANNEL_MESSAGES_ID); } else { - builder.setPriority(PRIORITY_MAX); + builder.setPriority(PRIORITY_HIGH); } // Attempt to parse data and apply custom notification styling @@ -189,7 +189,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil String avatar = messageData.get("avatar").getString(); String accountID = Integer.toString(messageData.get("actorAccountID").getInt(-1)); String message = messageData.get("message").getList().get(0).getMap().get("text").getString(); - String roomName = payload.get("roomName") == null ? "" : payload.get("roomName").getString(""); + String conversationName = payload.get("roomName") == null ? "" : payload.get("roomName").getString(""); // Retrieve or create the Person object who sent the latest report comment Person person = notificationCache.people.get(accountID); @@ -219,7 +219,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil // notification with the person who sent the report comment. NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) .setGroupConversation(true) - .setConversationTitle(roomName); + .setConversationTitle(conversationName); // Add all conversation messages to the notification, including the last one we just received. for (NotificationCache.Message cachedMessage : notificationCache.messages) { From ffd6fadc1592092fd8c0db6ee3b2e0d968f291af Mon Sep 17 00:00:00 2001 From: oleh Date: Tue, 20 Jun 2023 18:18:21 +0300 Subject: [PATCH 266/826] fixed prettier issue --- .../MoneyRequestParticipantsSplitSelector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index fd32e2737574..cb61d59a903c 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -134,7 +134,7 @@ function MoneyRequestParticipantsSplitSelector(props) { } else { newSelectedOptions = [...props.participants, option]; } - + props.onAddParticipants(newSelectedOptions); const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( From c0d85905b9dd59824b416cecdb3c0d5dabe8deb0 Mon Sep 17 00:00:00 2001 From: Daraksha Date: Tue, 20 Jun 2023 21:55:51 +0530 Subject: [PATCH 267/826] make composeBox rounded --- src/styles/variables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/variables.js b/src/styles/variables.js index 96231e1b24ff..c4b96fda8cac 100644 --- a/src/styles/variables.js +++ b/src/styles/variables.js @@ -27,7 +27,7 @@ export default { componentBorderRadiusNormal: 8, componentBorderRadiusLarge: 16, componentBorderRadiusCard: 12, - componentBorderRadiusRounded: 20, + componentBorderRadiusRounded: 100, buttonBorderRadius: 100, avatarSizeLarge: 80, avatarSizeHeader: 40, From b9efb662d3386a2fd4a654dd8e65e787f7b0b559 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 10:02:57 -0700 Subject: [PATCH 268/826] Expose hideEmojiPicker as well --- src/components/EmojiPicker/EmojiPicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 96bf7c64d849..378fbae1c695 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -130,7 +130,7 @@ function EmojiPicker(props, ref) { */ const isActiveReportAction = (actionID) => Boolean(actionID) && reportAction.reportActionID === actionID; - useImperativeHandle(ref, () => ({showEmojiPicker, isActiveReportAction})); + useImperativeHandle(ref, () => ({showEmojiPicker, isActiveReportAction, hideEmojiPicker})); // There is no way to disable animations, and they are really laggy, because there are so many // emojis. The best alternative is to set it to 1ms so it just "pops" in and out From f1aecb0086d3fea7582081a2947c8f96e61e8ba4 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Tue, 20 Jun 2023 20:02:00 +0200 Subject: [PATCH 269/826] fix typo --- src/components/ScreenWrapper/index.js | 2 +- src/components/ScreenWrapper/propTypes.js | 4 ++-- src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ScreenWrapper/index.js b/src/components/ScreenWrapper/index.js index 22cbd9441106..337a36779a24 100644 --- a/src/components/ScreenWrapper/index.js +++ b/src/components/ScreenWrapper/index.js @@ -126,7 +126,7 @@ class ScreenWrapper extends React.Component { {}, modal: {}, keyboardAvoidingViewBehavior: 'padding', - shouldEnableKeyboardAvodingView: true, + shouldEnableKeyboardAvoidingView: true, shouldEnableMaxHeight: false, shouldEnablePickerAvoiding: true, }; diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js index d871dd64ce6b..47699f5cff74 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js @@ -49,7 +49,7 @@ class BaseSidebarScreen extends Component { {({insets}) => ( <> From 198cb8c51e5b2e8cf0c18dc919ad1e2181e5efd8 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 13:46:28 -0700 Subject: [PATCH 270/826] Fix styling --- src/pages/settings/LoungeAccessPage.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index dbe25dbc43b3..d9208fba7171 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -47,15 +47,13 @@ function LoungeAccessPage(props) { - - - {props.translate('loungeAccessPage.headline')} - - {props.translate('loungeAccessPage.description')} - + + {props.translate('loungeAccessPage.headline')} + + {props.translate('loungeAccessPage.description')} {_.map(menuItems, (item) => ( ))} From 9dd6f61484903a196c3ee6c08653ae435385845e Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 14:43:27 -0700 Subject: [PATCH 271/826] Final styling updates --- src/pages/settings/LoungeAccessPage.js | 12 ++++++++---- src/styles/styles.js | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index d9208fba7171..76262f079882 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -12,8 +12,6 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/ import MenuItem from '../../components/MenuItem'; import compose from '../../libs/compose'; import * as Illustrations from '../../components/Icon/Illustrations'; -import * as StyleUtils from '../../styles/StyleUtils'; -import Icon from '../../components/Icon'; const propTypes = { ...withLocalizePropTypes, @@ -35,6 +33,10 @@ function LoungeAccessPage(props) { icon: Illustrations.SanFrancisco, }, ]; + const illustrationStyle = props.isSmallScreenWidth ? { + width: props.windowWidth, + height: .64 * props.windowWidth, + } : {}; return ( @@ -45,8 +47,10 @@ function LoungeAccessPage(props) { onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)} /> - - + + + + Date: Tue, 20 Jun 2023 14:52:44 -0700 Subject: [PATCH 272/826] logic corrections --- src/libs/ReportUtils.js | 63 +++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 34 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 2660c6751c92..2b8283e81c7a 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1056,29 +1056,30 @@ function getReportName(report) { /** * Recursively navigates through thread parents to get the root reports name. * @param {Object} report - * @returns {String|*} + * @returns {Object} */ -function getRootOrExpenseReportNameWithWorkspace(report) { - if (isThread(report)) { - if (isIOUReport(report)) { - return lodashGet(report, 'displayName', ''); - } - if (isExpenseReport(report)) { - const workspaceName = getPolicyName(report); - return `${lodashGet(report, 'displayName', '')} in ${workspaceName}`; - } - - if (isTaskReport(report)) { - const workspaceName = report.policyID === CONST.POLICY.OWNER_EMAIL_FAKE ? '' : getPolicyName(report); - const displayName = getDisplayNameForParticipant(report.ownerAccountID); - return `${workspaceName ? [displayName, workspaceName].join(' in ') : displayName}`; - } - +function getRootReportAndWorkspaceName(report) { + if (isThread(report) && !isMoneyRequestReport(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - return getRootOrExpenseReportNameWithWorkspace(parentReport); + return getRootReportAndWorkspaceName(parentReport); } - return getReportName(report); + if (isIOUReport(report)) { + return { + rootReportName: lodashGet(report, 'displayName', ''), + }; + } + if (isMoneyRequestReport(report)) { + return { + rootReportName: lodashGet(report, 'displayName', ''), + workspaceName: isIOUReport(report) ? CONST.POLICY.OWNER_EMAIL_FAKE : getPolicyName(report), + }; + } + + return { + rootReportName: getReportName(report), + workspaceName: getPolicyName(report), + }; } /** @@ -1113,23 +1114,17 @@ function getChatRoomSubtitle(report) { */ function getChatRoomSubtitleLink(report) { if (isThread(report)) { - const from = Localize.translateLocal('threads.from'); - const workspaceName = getPolicyName(report); - if (isChatRoom(report)) { - const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); - const roomName = parentReport - ? lodashGet(parentReport, 'displayName', '') - : lodashGet(report, 'displayName', ''); - - return `${from} ${roomName ? [roomName, workspaceName].join(' in ') : workspaceName}`; + if (report.reportID == '280084830934340') { + debugger; } - - if (isMoneyRequestReport(report)) { - const payeeEmail = getDisplayNameForParticipant(report.managerID); - return isIOUReport(report) ? `${from} ${payeeEmail}` : `${from} ${payeeEmail} in ${workspaceName}`; + const from = Localize.translateLocal('threads.from'); + const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); + const {rootReportName, workspaceName} = getRootReportAndWorkspaceName(parentReport); + let subtitleLink = `${from} ${rootReportName}`; + if (workspaceName && workspaceName !== rootReportName) { + subtitleLink += ` in ${workspaceName}`; } - - return `${from} ${getRootOrExpenseReportNameWithWorkspace(report)}`; + return subtitleLink; } return ''; } From a3954a7ddd37e3b1b90ca95de1a5589a5a42a56c Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 15:00:28 -0700 Subject: [PATCH 273/826] ignore unavailable workspace --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 2b8283e81c7a..d676f8ea3364 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1121,7 +1121,7 @@ function getChatRoomSubtitleLink(report) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); const {rootReportName, workspaceName} = getRootReportAndWorkspaceName(parentReport); let subtitleLink = `${from} ${rootReportName}`; - if (workspaceName && workspaceName !== rootReportName) { + if (workspaceName && workspaceName !== rootReportName && workspaceName !== Localize.translateLocal('workspace.common.unavailable')) { subtitleLink += ` in ${workspaceName}`; } return subtitleLink; From e7cc616e5924154329b3588323d499b0315be868 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 15:08:29 -0700 Subject: [PATCH 274/826] translation for in --- src/languages/en.js | 3 ++- src/languages/es.js | 3 ++- src/libs/ReportUtils.js | 10 +++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index fac5a6c82db1..1293041f9d1e 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -146,6 +146,8 @@ export default { km: 'kilometer', copied: 'Copied!', someone: 'Someone', + from: 'From', + conjunctionIn: 'in', }, anonymousReportFooter: { logoTagline: 'Join in on the discussion.', @@ -1412,7 +1414,6 @@ export default { lastReply: 'Last reply', replies: 'Replies', reply: 'Reply', - from: 'From', }, qrCodes: { copyUrlToClipboard: 'Copy URL to clipboard', diff --git a/src/languages/es.js b/src/languages/es.js index 28b98f18e25b..a0a3995ea9e6 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -145,6 +145,8 @@ export default { km: 'kilómetro', copied: '¡Copiado!', someone: 'Alguien', + from: 'De', + conjunctionIn: 'en', }, anonymousReportFooter: { logoTagline: 'Únete a la discussion.', @@ -1880,7 +1882,6 @@ export default { lastReply: 'Última respuesta', replies: 'Respuestas', reply: 'Respuesta', - from: 'De', }, qrCodes: { copyUrlToClipboard: 'Copiar URL al portapapeles', diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index d676f8ea3364..eba7aa9843dc 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1108,21 +1108,17 @@ function getChatRoomSubtitle(report) { } /** - * Get either the policyName or domainName the chat is tied to + * Get the subtitleLink for the report * @param {Object} report * @returns {String} */ function getChatRoomSubtitleLink(report) { if (isThread(report)) { - if (report.reportID == '280084830934340') { - debugger; - } - const from = Localize.translateLocal('threads.from'); const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); const {rootReportName, workspaceName} = getRootReportAndWorkspaceName(parentReport); - let subtitleLink = `${from} ${rootReportName}`; + let subtitleLink = `${Localize.translateLocal('common.from')} ${rootReportName}`; if (workspaceName && workspaceName !== rootReportName && workspaceName !== Localize.translateLocal('workspace.common.unavailable')) { - subtitleLink += ` in ${workspaceName}`; + subtitleLink += ` ${Localize.translateLocal('common.conjunctionIn')} ${workspaceName}`; } return subtitleLink; } From 1ceff1ead32c6da093b89fd9851934ec41a0b59e Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 15:10:45 -0700 Subject: [PATCH 275/826] comment update --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index eba7aa9843dc..e3ec3767a4c7 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1054,7 +1054,7 @@ function getReportName(report) { } /** - * Recursively navigates through thread parents to get the root reports name. + * Recursively navigates through thread parents to get the root report and workspace name. * @param {Object} report * @returns {Object} */ From f10878fd12b5b47861a91d8684e9d76eebe0fee7 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 15:13:39 -0700 Subject: [PATCH 276/826] lint fixes --- src/components/AvatarWithDisplayName.js | 1 - src/libs/ReportUtils.js | 1 - 2 files changed, 2 deletions(-) diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index c5a7fcbacc1c..b5de99514b42 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -17,7 +17,6 @@ import compose from '../libs/compose'; import * as OptionsListUtils from '../libs/OptionsListUtils'; import Text from './Text'; import * as StyleUtils from '../styles/StyleUtils'; -import {getChatRoomSubtitleLink} from '../libs/ReportUtils'; import Navigation from '../libs/Navigation/Navigation'; import ROUTES from '../ROUTES'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index e3ec3767a4c7..14adf3be5461 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -20,7 +20,6 @@ import isReportMessageAttachment from './isReportMessageAttachment'; import * as defaultWorkspaceAvatars from '../components/Icon/WorkspaceDefaultAvatars'; import * as CurrencyUtils from './CurrencyUtils'; import * as UserUtils from './UserUtils'; -import {isMoneyRequestAction} from './ReportActionsUtils'; let sessionEmail; let sessionAccountID; From 931f9a1352b53e42a1322c683eb49674588c4bdd Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 15:20:38 -0700 Subject: [PATCH 277/826] Remove unneccerssary translateion --- src/languages/en.js | 1 - tests/unit/TranslateTest.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 83cb3c2fc771..f817b7bfe159 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -407,7 +407,6 @@ export default { online: 'Online', offline: 'Offline', syncing: 'Syncing', - loungeAccess: 'Lounge access', }, loungeAccessPage: { loungeAccess: 'Lounge access', diff --git a/tests/unit/TranslateTest.js b/tests/unit/TranslateTest.js index 4b6533d01de1..9ac23d6b81b0 100644 --- a/tests/unit/TranslateTest.js +++ b/tests/unit/TranslateTest.js @@ -78,7 +78,7 @@ describe('Translation Keys', () => { _.each(languages, (ln) => { const languageKeys = traverseKeyPath(originalTranslations.default[ln]); - it(`Does ${ln} locale has all the keys`, () => { + it(`Does ${ln} locale have all the keys`, () => { const hasAllKeys = _.difference(mainLanguageKeys, languageKeys); if (hasAllKeys.length) { console.debug(`🏹 [ ${hasAllKeys.join(', ')} ] are missing from ${ln}.js`); @@ -87,7 +87,7 @@ describe('Translation Keys', () => { expect(hasAllKeys).toEqual([]); }); - it(`Does ${ln} locale has unused keys`, () => { + it(`Does ${ln} locale have unused keys`, () => { const hasAllKeys = _.difference(languageKeys, mainLanguageKeys); if (hasAllKeys.length) { console.debug(`🏹 [ ${hasAllKeys.join(', ')} ] are unused keys in ${ln}.js`); From 928e644b847cd2bc507f93bb61334951a3cd78f0 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 15:26:18 -0700 Subject: [PATCH 278/826] pretttier --- src/pages/settings/LoungeAccessPage.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index 76262f079882..5b49507cf8fc 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -33,10 +33,12 @@ function LoungeAccessPage(props) { icon: Illustrations.SanFrancisco, }, ]; - const illustrationStyle = props.isSmallScreenWidth ? { - width: props.windowWidth, - height: .64 * props.windowWidth, - } : {}; + const illustrationStyle = props.isSmallScreenWidth + ? { + width: props.windowWidth, + height: 0.64 * props.windowWidth, + } + : {}; return ( From 82be71e43a1bb8a0c83732b74b7f2f3505bad0aa Mon Sep 17 00:00:00 2001 From: oleh Date: Wed, 21 Jun 2023 01:29:09 +0300 Subject: [PATCH 279/826] Updated per reviewer's requests --- .../MoneyRequestParticipantsSplitSelector.js | 75 ++++++++++--------- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index cb61d59a903c..14fca3dfdfcd 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -1,4 +1,4 @@ -import React, {useEffect, useState} from 'react'; +import React, {useCallback, useEffect, useMemo, useState} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import _ from 'underscore'; @@ -68,13 +68,15 @@ function MoneyRequestParticipantsSplitSelector(props) { userToInvite: null, }); + const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; + /** * Returns the sections needed for the OptionsSelector * * @param {Boolean} maxParticipantsReached * @returns {Array} */ - const getSections = (maxParticipantsReached) => { + const sections = useMemo(() => { const newSections = []; let indexOffset = 0; @@ -118,42 +120,47 @@ function MoneyRequestParticipantsSplitSelector(props) { } return newSections; - }; + }, [maxParticipantsReached, newChatOptions, props.participants, props.translate]); /** * Removes a selected option from list if already selected. If not already selected add this option to the list. * @param {Object} option */ - const toggleOption = (option) => { - const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); - - let newSelectedOptions; - - if (isOptionInList) { - newSelectedOptions = _.reject(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); - } else { - newSelectedOptions = [...props.participants, option]; - } - - props.onAddParticipants(newSelectedOptions); - - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - props.reports, - props.personalDetails, - props.betas, - isOptionInList ? searchTerm : '', - newSelectedOptions, - CONST.EXPENSIFY_EMAILS, - ); - - setNewChatOptions({ - recentReports, - personalDetails, - userToInvite, - }); - }; + const toggleOption = useCallback( + (option) => { + const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); + + let newSelectedOptions; + + if (isOptionInList) { + newSelectedOptions = _.reject(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); + } else { + newSelectedOptions = [...props.participants, option]; + } + + props.onAddParticipants(newSelectedOptions); + + const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( + props.reports, + props.personalDetails, + props.betas, + isOptionInList ? searchTerm : '', + newSelectedOptions, + CONST.EXPENSIFY_EMAILS, + ); + + setNewChatOptions({ + recentReports, + personalDetails, + userToInvite, + }); + if (!isOptionInList) { + setSearchTerm(''); + } + }, + [searchTerm, props.participants, props.onAddParticipants, props.reports, props.personalDetails, props.betas, setNewChatOptions, setSearchTerm], + ); - const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; const headerMessage = OptionsListUtils.getHeaderMessage( newChatOptions.personalDetails.length + newChatOptions.recentReports.length !== 0, Boolean(newChatOptions.userToInvite), @@ -162,8 +169,6 @@ function MoneyRequestParticipantsSplitSelector(props) { ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); - const sections = getSections(maxParticipantsReached); - useEffect(() => { const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( props.reports, @@ -193,7 +198,7 @@ function MoneyRequestParticipantsSplitSelector(props) { boldStyle shouldShowConfirmButton confirmButtonText={props.translate('common.next')} - onConfirmSelection={props.onStepComplete()} + onConfirmSelection={props.onStepComplete} textInputLabel={props.translate('optionsSelector.nameEmailOrPhoneNumber')} safeAreaPaddingBottomStyle={props.safeAreaPaddingBottomStyle} shouldShowOptions={isOptionsDataReady} From a96154590e4cefa722da4e174f85ffbf6ff4bc99 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 16:04:05 -0700 Subject: [PATCH 280/826] prettier fixes --- src/libs/ReportUtils.js | 4 ++++ src/pages/ReportParticipantsPage.js | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 14adf3be5461..9526247cd1c6 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -470,6 +470,10 @@ function isArchivedRoom(report) { * @returns {String} */ function getPolicyName(report) { + if (report === undefined) { + return ''; + } + // Public rooms send back the policy name with the reportSummary, // since they can also be accessed by people who aren't in the workspace if (report.policyName) { diff --git a/src/pages/ReportParticipantsPage.js b/src/pages/ReportParticipantsPage.js index b0c2f2e38954..6d9bdbffba54 100755 --- a/src/pages/ReportParticipantsPage.js +++ b/src/pages/ReportParticipantsPage.js @@ -93,7 +93,9 @@ function ReportParticipantsPage(props) { Date: Wed, 21 Jun 2023 02:13:14 +0300 Subject: [PATCH 281/826] fixed lint issue --- .../MoneyRequestParticipantsSplitSelector.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 14fca3dfdfcd..b1a68cb13c7f 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -120,6 +120,7 @@ function MoneyRequestParticipantsSplitSelector(props) { } return newSections; + // eslint-disable-next-line react-hooks/exhaustive-deps -- props does not need to be a dependency as it will always exist }, [maxParticipantsReached, newChatOptions, props.participants, props.translate]); /** @@ -158,6 +159,7 @@ function MoneyRequestParticipantsSplitSelector(props) { setSearchTerm(''); } }, + // eslint-disable-next-line react-hooks/exhaustive-deps -- props does not need to be a dependency as it will always exist [searchTerm, props.participants, props.onAddParticipants, props.reports, props.personalDetails, props.betas, setNewChatOptions, setSearchTerm], ); From daf4e6f7b976383692eaf4d758b08b615d23aed9 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Tue, 20 Jun 2023 13:54:37 -1000 Subject: [PATCH 282/826] Log an alert if we exceed max execution time --- src/CONST.js | 1 + src/libs/ReportActionsUtils.js | 4 ++++ src/libs/actions/Timing.js | 8 +++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/CONST.js b/src/CONST.js index 8b954a010da6..e158f8efe38c 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -652,6 +652,7 @@ const CONST = { }, }, TIMING: { + CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION: 'calc_most_recent_last_modified_action', SEARCH_RENDER: 'search_render', HOMEPAGE_INITIAL_RENDER: 'homepage_initial_render', REPORT_INITIAL_RENDER: 'report_initial_render', diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index 3b9bf2ce79e0..16855ef799e9 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -10,6 +10,7 @@ import ONYXKEYS from '../ONYXKEYS'; import Log from './Log'; import * as CurrencyUtils from './CurrencyUtils'; import isReportMessageAttachment from './isReportMessageAttachment'; +import Timing from './actions/Timing'; const allReports = {}; Onyx.connect({ @@ -426,6 +427,8 @@ function getLinkedTransactionID(reportID, reportActionID) { * @returns {string} */ function getMostRecentReportActionLastModified() { + Timing.start(CONST.TIMING.CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION); + // Start with the oldest date possible let mostRecentReportActionLastModified = new Date(0).toISOString(); @@ -462,6 +465,7 @@ function getMostRecentReportActionLastModified() { mostRecentReportActionLastModified = reportLastVisibleActionLastModified; }); + Timing.end(CONST.TIMING.CALCULATE_MOST_RECENT_LAST_MODIFIED_ACTION, 500); return mostRecentReportActionLastModified; } diff --git a/src/libs/actions/Timing.js b/src/libs/actions/Timing.js index 0f6a67d0879e..928cac51d960 100644 --- a/src/libs/actions/Timing.js +++ b/src/libs/actions/Timing.js @@ -2,6 +2,7 @@ import getPlatform from '../getPlatform'; import * as Environment from '../Environment/Environment'; import Firebase from '../Firebase'; import * as API from '../API'; +import Log from '../Log'; let timestampData = {}; @@ -26,8 +27,9 @@ function start(eventName, shouldUseFirebase = false) { * * @param {String} eventName - event name used as timestamp key * @param {String} [secondaryName] - optional secondary event name, passed to grafana + * @param {number} [maxExecutionTime] - optional amount of time to wait before logging an alert */ -function end(eventName, secondaryName = '') { +function end(eventName, secondaryName = '', maxExecutionTime = 0) { if (!timestampData[eventName]) { return; } @@ -51,6 +53,10 @@ function end(eventName, secondaryName = '') { return; } + if (maxExecutionTime && eventTime > maxExecutionTime) { + Log.alert(`${eventName} exceeded max execution time of ${maxExecutionTime}.`, {eventTime, eventName}); + } + API.write('SendPerformanceTiming', { name: grafanaEventName, value: eventTime, From eb2d74195f074d539394c59d94c85f3fc9520301 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 17:09:50 -0700 Subject: [PATCH 283/826] Get final copy in english --- src/languages/en.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.js b/src/languages/en.js index f817b7bfe159..4d765ad98048 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -411,7 +411,7 @@ export default { loungeAccessPage: { loungeAccess: 'Lounge access', headline: 'You qualify for access to our exclusive lounges.', - description: 'Talk to trees, look at the birds. Whatever it takes. Life is too short to be alone, too precious. Share it with a friend.', + description: 'The Expensify Lounge is where a "high-end airport lounge" meets a vibrant "co-working space" optimized for like-minded individuals.', coffeePromo: 'Great coffee and cocktails', networkingPromo: 'Network with other members', viewsPromo: 'Incredible views of San Francisco', From 545efe19a64bb229688882bea62937e50386f353 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 17:17:00 -0700 Subject: [PATCH 284/826] code correction to not show anything if data is missing --- src/libs/ReportUtils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index f64b6feece21..ae415ba61f12 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1108,6 +1108,10 @@ function getChatRoomSubtitleLink(report) { if (isThread(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); const {rootReportName, workspaceName} = getRootReportAndWorkspaceName(parentReport); + if (_.isEmpty(rootReportName)) { + return ''; + } + let subtitleLink = `${Localize.translateLocal('common.from')} ${rootReportName}`; if (workspaceName && workspaceName !== rootReportName && workspaceName !== Localize.translateLocal('workspace.common.unavailable')) { subtitleLink += ` ${Localize.translateLocal('common.conjunctionIn')} ${workspaceName}`; From f2f010c8431be20358dda5f342616a823e890de9 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 17:19:35 -0700 Subject: [PATCH 285/826] removing parentReport --- src/components/HeaderWithBackButton.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/HeaderWithBackButton.js b/src/components/HeaderWithBackButton.js index c612b82851f9..bb707b8f8873 100755 --- a/src/components/HeaderWithBackButton.js +++ b/src/components/HeaderWithBackButton.js @@ -96,9 +96,6 @@ const propTypes = { /** Whether we should show an avatar */ shouldShowAvatarWithDisplay: PropTypes.bool, - /** Parent report, if provided it will override props.report for AvatarWithDisplay */ - parentReport: iouReportPropTypes, - /** Report, if we're showing the details for one and using AvatarWithDisplay */ report: iouReportPropTypes, @@ -133,7 +130,6 @@ const defaultProps = { shouldShowBackButton: true, shouldShowAvatarWithDisplay: false, report: null, - parentReport: null, policies: {}, personalDetails: {}, guidesCallTaskID: '', @@ -192,7 +188,7 @@ class HeaderWithBackButton extends Component { )} {this.props.shouldShowAvatarWithDisplay && ( From 325935c9126e472a3d41649bdbbc452b124af5ea Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Tue, 20 Jun 2023 17:24:53 -0700 Subject: [PATCH 286/826] cleanup --- src/libs/ReportUtils.js | 3 ++- src/pages/home/HeaderView.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index ae415ba61f12..8274ef1eb12c 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1047,6 +1047,7 @@ function getReportName(report) { /** * Recursively navigates through thread parents to get the root report and workspace name. + * The recursion stops when we find a non thread or money request report, whichever comes first. * @param {Object} report * @returns {Object} */ @@ -1100,7 +1101,7 @@ function getChatRoomSubtitle(report) { } /** - * Get the subtitleLink for the report + * Get the subtitle link for the report * @param {Object} report * @returns {String} */ diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 30c46a7389af..685bd21c2ad6 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -83,11 +83,11 @@ function HeaderView(props) { const participantPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs(participants, props.personalDetails); const isMultipleParticipant = participants.length > 1; const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(participantPersonalDetails, isMultipleParticipant); - const isThread = ReportUtils.isChatThread(props.report); + const isChatThread = ReportUtils.isChatThread(props.report); const isChatRoom = ReportUtils.isChatRoom(props.report); const isPolicyExpenseChat = ReportUtils.isPolicyExpenseChat(props.report); const isTaskReport = ReportUtils.isTaskReport(props.report); - const reportHeaderData = !isTaskReport && !isThread && props.report.parentReportID ? props.parentReport : props.report; + const reportHeaderData = !isTaskReport && !isChatThread && props.report.parentReportID ? props.parentReport : props.report; const title = ReportUtils.getReportName(reportHeaderData); const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData); const subtitleLink = ReportUtils.getChatRoomSubtitleLink(reportHeaderData); @@ -175,7 +175,7 @@ function HeaderView(props) { ) : ( )} @@ -185,7 +185,7 @@ function HeaderView(props) { tooltipEnabled numberOfLines={1} textStyles={[styles.headerText, styles.pre]} - shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isThread || isTaskReport} + shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isChatThread || isTaskReport} /> {!_.isEmpty(subtitleLink) && ( Date: Tue, 20 Jun 2023 17:29:40 -0700 Subject: [PATCH 287/826] using lodash --- src/components/MoneyRequestHeader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index 87f7c6e1cf87..ad199210fbf2 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -92,8 +92,8 @@ function MoneyRequestHeader(props) { const shouldShowPaypal = Boolean(lodashGet(props.personalDetails, [moneyRequestReport.managerID, 'payPalMeAddress'])); const report = props.report; if (props.isSingleTransactionView) { - report.ownerAccountID = props.parentReport.ownerAccountID; - report.ownerEmail = props.parentReport.ownerEmail; + report.ownerAccountID = lodashGet(props, ['parentReport', 'ownerAccountID'], null); + report.ownerEmail = lodashGet(props, ['parentReport', 'ownerEmail'], ''); } return ( From cad43f320db8b346e577a1e51aed4c71075ea273 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Tue, 20 Jun 2023 18:50:01 -0700 Subject: [PATCH 288/826] Spanish copy --- src/languages/es.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/languages/es.js b/src/languages/es.js index 802c3071debe..43574e744557 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -409,11 +409,11 @@ export default { }, loungeAccessPage: { loungeAccess: 'Acceso al lounge', - headline: 'You qualify for access to our exclusive lounges.', - description: 'Talk to trees, look at the birds. Whatever it takes. Life is too short to be alone, too precious. Share it with a friend.', - coffeePromo: 'Great coffee and cocktails', - networkingPromo: 'Network with other members', - viewsPromo: 'Incredible views of San Francisco', + headline: 'Podrás acceder a nuestras salas vip exclusivas.', + description: 'La sala vip Expensify es el punto de encuentro entre una “sala vip de aeropuerto de alta gama” y un vibrante “espacio de co-working” optimizado para personas con ideas afines.', + coffeePromo: 'Buen café y buenos cócteles', + networkingPromo: 'Conecta con otros miembros', + viewsPromo: 'Increíbles vistas de San Francisco', }, pronounsPage: { pronouns: 'Pronombres', From 4392dc1cc21dc8239b8b051be598c3b30c8fafed Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 21 Jun 2023 10:39:02 +0700 Subject: [PATCH 289/826] Fix navigate wrong route when submiting in new task title page --- src/pages/tasks/NewTaskTitlePage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/tasks/NewTaskTitlePage.js b/src/pages/tasks/NewTaskTitlePage.js index b1e7b689f85d..d0eed9c25156 100644 --- a/src/pages/tasks/NewTaskTitlePage.js +++ b/src/pages/tasks/NewTaskTitlePage.js @@ -58,7 +58,7 @@ function NewTaskTitlePage(props) { // the response function onSubmit(values) { TaskUtils.setTitleValue(values.taskTitle); - Navigation.navigate(ROUTES.getNewTaskRoute()); + Navigation.navigate(ROUTES.NEW_TASK); } if (!Permissions.canUseTasks(props.betas)) { From 20b7a1ae73c25487d1258484cca83e4283fb7a68 Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 11:08:12 +0700 Subject: [PATCH 290/826] Show report review action message in LHN --- src/libs/OptionsListUtils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index af2309c3eda8..cb281149c119 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -375,9 +375,14 @@ function getAllReportErrors(report, reportActions) { * @returns {String} */ function getLastMessageTextForReport(report) { + const lastReportAction = lastReportActions[report.reportID]; let lastMessageTextFromReport = ''; + if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; + } else if (ReportActionUtils.isReportPreviewAction(lastReportAction)) { + const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportID(lastReportAction)); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportAction); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; From e59d39fe3b4456ce1cded965ef64e6621d55ad46 Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 11:11:32 +0700 Subject: [PATCH 291/826] Remove map action.message --- .../ReportActionItem/ReportPreview.js | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index d1bbae50fe8d..53e72b6988a5 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -100,28 +100,25 @@ function ReportPreview(props) { const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport, props.action); return ( - {_.map(props.action.message, (message, index) => ( - { - Navigation.navigate(ROUTES.getReportRoute(props.iouReportID)); - }} - onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} - onPressOut={() => ControlSelection.unblock()} - onLongPress={(event) => showContextMenuForReport(event, props.contextMenuAnchor, props.chatReportID, props.action, props.checkIfContextMenuActive)} - style={[styles.flexRow, styles.justifyContentBetween]} - accessibilityRole="button" - accessibilityLabel={props.translate('iou.viewDetails')} - > - - {displayingMessage} - - - - ))} + { + Navigation.navigate(ROUTES.getReportRoute(props.iouReportID)); + }} + onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} + onPressOut={() => ControlSelection.unblock()} + onLongPress={(event) => showContextMenuForReport(event, props.contextMenuAnchor, props.chatReportID, props.action, props.checkIfContextMenuActive)} + style={[styles.flexRow, styles.justifyContentBetween]} + accessibilityRole="button" + accessibilityLabel={props.translate('iou.viewDetails')} + > + + {displayingMessage} + + + {isCurrentUserManager && !ReportUtils.isSettled(props.iouReport.reportID) && ( Date: Wed, 21 Jun 2023 11:14:19 +0700 Subject: [PATCH 292/826] Rename method to scope it only for reportAction preview --- src/libs/OptionsListUtils.js | 2 +- src/libs/ReportActionsUtils.js | 4 ++-- src/pages/home/report/ReportActionItem.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index cb281149c119..e39ec33da68b 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -381,7 +381,7 @@ function getLastMessageTextForReport(report) { if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; } else if (ReportActionUtils.isReportPreviewAction(lastReportAction)) { - const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportID(lastReportAction)); + const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportIDFromReportActionPreview(lastReportAction)); lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportAction); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index d86123f48989..1b4536a348bc 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -435,7 +435,7 @@ function getReportPreviewAction(chatReportID, iouReportID) { * @param {Object} reportAction * @returns {String} */ -function getIOUReportID(reportAction) { +function getIOUReportIDFromReportActionPreview(reportAction) { return lodashGet(reportAction, 'originalMessage.linkedReportID', ''); } @@ -480,7 +480,7 @@ export { getFormattedAmount, isSentMoneyReportAction, isReportPreviewAction, - getIOUReportID, + getIOUReportIDFromReportActionPreview, isMessageDeleted, isWhisperAction, }; diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index ab94be13a0dd..f5818f6fc91f 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -248,7 +248,7 @@ function ReportActionItem(props) { } else if (props.action.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW) { children = ( Date: Tue, 20 Jun 2023 21:30:14 -0700 Subject: [PATCH 293/826] Apply forwardRef before attaching displayName and defaultProps --- src/components/EmojiPicker/EmojiPicker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/EmojiPicker/EmojiPicker.js b/src/components/EmojiPicker/EmojiPicker.js index 378fbae1c695..35a96eb38477 100644 --- a/src/components/EmojiPicker/EmojiPicker.js +++ b/src/components/EmojiPicker/EmojiPicker.js @@ -21,7 +21,7 @@ const propTypes = { ...viewportOffsetTopPropTypes, }; -function EmojiPicker(props, ref) { +const EmojiPicker = forwardRef((props, ref) => { const [isEmojiPickerVisible, setIsEmojiPickerVisible] = useState(false); const [emojiPopoverAnchorPosition, setEmojiPopoverAnchorPosition] = useState({ horizontal: 0, @@ -163,8 +163,8 @@ function EmojiPicker(props, ref) { /> ); -} +}); EmojiPicker.propTypes = propTypes; EmojiPicker.displayName = 'EmojiPicker'; -export default compose(withViewportOffsetTop, withWindowDimensions)(forwardRef(EmojiPicker)); +export default compose(withViewportOffsetTop, withWindowDimensions)(EmojiPicker); From 117c9f0980ff686cb2d9037f3c91843449f24ec8 Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 14:14:38 +0700 Subject: [PATCH 294/826] Fix eslint --- src/components/ReportActionItem/ReportPreview.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 53e72b6988a5..99ba312281a5 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -3,7 +3,6 @@ import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import lodashGet from 'lodash/get'; -import _ from 'underscore'; import Text from '../Text'; import Icon from '../Icon'; import * as Expensicons from '../Icon/Expensicons'; From a5d0633b1681110137cdf904dacd277a7ef29b30 Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 14:14:54 +0700 Subject: [PATCH 295/826] Fix get payerName --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 295f50fb24d8..82643b36c28d 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -997,7 +997,7 @@ function getMoneyRequestReportActionMessage(report, reportAction) { let formattedAmount = null; let reportHasOutstandingIOU = null; const totalAmount = getMoneyRequestTotal(report); - const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerEmail, true); + const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerID, true); if (totalAmount > 0) { formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency); From e0189135afd00d4e1c87efbfe4a2b101bf421728 Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 14:15:28 +0700 Subject: [PATCH 296/826] Use last visible action instead of last action --- src/libs/OptionsListUtils.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index e39ec33da68b..89a9bba93212 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -375,14 +375,15 @@ function getAllReportErrors(report, reportActions) { * @returns {String} */ function getLastMessageTextForReport(report) { - const lastReportAction = lastReportActions[report.reportID]; + const lastVisibleReportAction = ReportActionUtils.getLastVisibleAction(report.reportID); + let lastMessageTextFromReport = ''; if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; - } else if (ReportActionUtils.isReportPreviewAction(lastReportAction)) { - const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportIDFromReportActionPreview(lastReportAction)); - lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportAction); + } else if (ReportActionUtils.isReportPreviewAction(lastVisibleReportAction)) { + const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportIDFromReportActionPreview(lastVisibleReportAction)); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastVisibleReportAction); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; From 894253613fde3bd6486a18e132db95414a604eaf Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 14:17:04 +0700 Subject: [PATCH 297/826] Remove redundant empty line --- src/libs/OptionsListUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 89a9bba93212..fe3444590ef0 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -376,7 +376,6 @@ function getAllReportErrors(report, reportActions) { */ function getLastMessageTextForReport(report) { const lastVisibleReportAction = ReportActionUtils.getLastVisibleAction(report.reportID); - let lastMessageTextFromReport = ''; if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { From ba57e73e436b2b3e5add4442d60d698349767b49 Mon Sep 17 00:00:00 2001 From: VH Date: Wed, 21 Jun 2023 15:35:41 +0700 Subject: [PATCH 298/826] Revert back to lastReportAction because new reportActionView is optimistic empty string --- src/libs/OptionsListUtils.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index fe3444590ef0..e39ec33da68b 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -375,14 +375,14 @@ function getAllReportErrors(report, reportActions) { * @returns {String} */ function getLastMessageTextForReport(report) { - const lastVisibleReportAction = ReportActionUtils.getLastVisibleAction(report.reportID); + const lastReportAction = lastReportActions[report.reportID]; let lastMessageTextFromReport = ''; if (ReportUtils.isReportMessageAttachment({text: report.lastMessageText, html: report.lastMessageHtml})) { lastMessageTextFromReport = `[${Localize.translateLocal('common.attachment')}]`; - } else if (ReportActionUtils.isReportPreviewAction(lastVisibleReportAction)) { - const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportIDFromReportActionPreview(lastVisibleReportAction)); - lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastVisibleReportAction); + } else if (ReportActionUtils.isReportPreviewAction(lastReportAction)) { + const iouReport = ReportUtils.getReport(ReportActionUtils.getIOUReportIDFromReportActionPreview(lastReportAction)); + lastMessageTextFromReport = ReportUtils.getMoneyRequestReportActionMessage(iouReport, lastReportAction); } else { lastMessageTextFromReport = report ? report.lastMessageText || '' : ''; From 4917bf7f333cd9e2c0728981192977273c1ef434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Wed, 21 Jun 2023 10:38:16 +0200 Subject: [PATCH 299/826] fixed bug with password text input eye icon --- src/components/TextInput/BaseTextInput.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 91ab2162674f..d687e38d975d 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -343,7 +343,7 @@ class BaseTextInput extends Component { /> {Boolean(this.props.secureTextEntry) && ( e.preventDefault()} > From 25ca03bbb74afff3f8a8b0643f75c33688215d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Wed, 21 Jun 2023 12:06:09 +0200 Subject: [PATCH 300/826] make ref usage more explanatory --- src/components/TextInput/BaseTextInput.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index b3fe23f99511..63fa036d57f9 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -167,7 +167,6 @@ function BaseTextInput(props) { [props.autoGrowHeight, props.multiline], ); - const hasValueRef = useRef(inputValue.length > 0); useEffect(() => { // Handle side effects when the value gets changed programatically from the outside @@ -181,9 +180,15 @@ function BaseTextInput(props) { } }, [activateLabel, inputValue]); - useEffect(() => { - // Activate or deactivate the label when the focus changes + // We capture whether the input has a value or not in a ref. + // It gets updated when the text gets changed. + const hasValueRef = useRef(inputValue.length > 0); + // Activate or deactivate the label when the focus changes: + useEffect(() => { + // We can't use inputValue here directly, as it might contain + // the defaultValue, which doesn't get updated when the text changes. + // We can't use props.value either, as it might be undefined. if (hasValueRef.current || isFocused) { activateLabel(); } else if (!hasValueRef.current && !isFocused) { From 9933d9ff94daf5dfb19780d9b7400ab90b587844 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Wed, 21 Jun 2023 16:12:10 +0530 Subject: [PATCH 301/826] Feature: Make the mentions auto-complete menu scrollable --- src/CONST.js | 4 ++++ .../AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js | 6 +++++- src/pages/home/report/ReportActionCompose.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index 50bfb5675bd8..858afc02fca8 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -847,7 +847,11 @@ const CONST = { ITEM_HEIGHT: 40, SMALL_CONTAINER_HEIGHT_FACTOR: 2.5, MIN_AMOUNT_OF_ITEMS: 3, + // used for max emoji suggestions and for limiting the height of mention suggestions, + // we show a scrollable list with max height equal to MAX_AMOUNT_OF_ITEMS (5) * ITEM_HEIGHT. MAX_AMOUNT_OF_ITEMS: 5, + // used for max mention suggestions + MAX_AMOUNT_OF_MENTIONS: 20, HERE_TEXT: '@here', }, COMPOSER_MAX_HEIGHT: 125, diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index 65ac1dc3edfe..7f254bcd5ab5 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -15,6 +15,10 @@ import PressableWithFeedback from '../Pressable/PressableWithFeedback'; */ const measureHeightOfSuggestionRows = (numRows, isSuggestionPickerLarge) => { if (isSuggestionPickerLarge) { + if (numRows > CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) { + // On large screens, if there are more than 5 suggestions, we display a scrollable window with a height of 5 items, indicating that there are more items available + return CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; + } return numRows * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; } if (numRows > 2) { @@ -68,7 +72,7 @@ function BaseAutoCompleteSuggestions(props) { renderItem={renderSuggestionMenuItem} keyExtractor={props.keyExtractor} removeClippedSubviews={false} - showsVerticalScrollIndicator={innerHeight > rowHeight} + showsVerticalScrollIndicator={innerHeight > rowHeight.value} style={{flex: 1}} /> diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 35e33bb5170a..b4cbc1baff6b 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -463,7 +463,7 @@ class ReportActionCompose extends React.Component { }); const sortedPersonalDetails = _.sortBy(filteredPersonalDetails, (detail) => detail.displayName || detail.login); - _.each(_.first(sortedPersonalDetails, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS - suggestions.length), (detail) => { + _.each(_.first(sortedPersonalDetails, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_MENTIONS - suggestions.length), (detail) => { suggestions.push({ text: detail.displayName, alternateText: detail.login, From 4d85b2bada89e21efec2617010e5ed1dbd1e602f Mon Sep 17 00:00:00 2001 From: Daraksha Date: Wed, 21 Jun 2023 16:37:03 +0530 Subject: [PATCH 302/826] reduced composer buttons' height and centered it --- src/pages/home/report/ReportActionCompose.js | 2 +- src/styles/styles.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 35e33bb5170a..8399ab039ba1 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -953,7 +953,7 @@ class ReportActionCompose extends React.Component { style={[ styles.dFlex, styles.flexColumn, - isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentEnd, + isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentCenter, ]} > {this.props.isComposerFullSize && ( diff --git a/src/styles/styles.js b/src/styles/styles.js index 0dfe6edce787..01d50fc54df7 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1721,7 +1721,7 @@ const styles = { composerSizeButton: { alignSelf: 'center', - height: 40, + height: 32, width: 32, padding: 6, margin: 3, From bd305095e97c5a452608a2540b4a0fb9d5081f9f Mon Sep 17 00:00:00 2001 From: Daraksha Date: Wed, 21 Jun 2023 16:38:01 +0530 Subject: [PATCH 303/826] fix border radius --- src/styles/variables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/variables.js b/src/styles/variables.js index c4b96fda8cac..e18062beb2e5 100644 --- a/src/styles/variables.js +++ b/src/styles/variables.js @@ -27,7 +27,7 @@ export default { componentBorderRadiusNormal: 8, componentBorderRadiusLarge: 16, componentBorderRadiusCard: 12, - componentBorderRadiusRounded: 100, + componentBorderRadiusRounded: 24, buttonBorderRadius: 100, avatarSizeLarge: 80, avatarSizeHeader: 40, From b462463781027a233b5aba8f88b63e33ecf70e32 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Wed, 21 Jun 2023 16:00:17 +0100 Subject: [PATCH 304/826] revert to max priority notifications, to ensure they peek above other apps --- .../customairshipextender/CustomNotificationProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index a22b47de0948..ea51337042c5 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -1,7 +1,7 @@ package com.expensify.chat.customairshipextender; import static androidx.core.app.NotificationCompat.CATEGORY_MESSAGE; -import static androidx.core.app.NotificationCompat.PRIORITY_HIGH; +import static androidx.core.app.NotificationCompat.PRIORITY_MAX; import android.app.NotificationChannel; import android.app.NotificationChannelGroup; @@ -99,7 +99,7 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { builder.setChannelId(CHANNEL_MESSAGES_ID); } else { - builder.setPriority(PRIORITY_HIGH); + builder.setPriority(PRIORITY_MAX); } // Attempt to parse data and apply custom notification styling From 135b8a03ee1a9f903f3899a06ce5530508c3611e Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Wed, 21 Jun 2023 17:21:13 +0200 Subject: [PATCH 305/826] Refactored useEffect in OptionRowLHN --- src/components/LHNOptionsList/OptionRowLHN.js | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index ccdf69dedc5d..accf0b2b79b1 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useEffect, useCallback} from 'react'; +import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; import lodashGet from 'lodash/get'; @@ -66,19 +66,20 @@ const defaultProps = { function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); - const runUseEffectOnlyOnce = useCallback(() => { - if (!optionItem.hasDraftComment && props.comment && props.comment.length > 0 && !props.isFocused) { + useEffect(() => { + const updateReportDraft = () => { + if (!optionItem || optionItem.hasDraftComment || !props.comment || props.comment.length <= 0 || props.isFocused) { + return; + } Report.setReportWithDraft(props.reportID, true); - } - return null; + }; + + updateReportDraft(); }, [optionItem, props.comment, props.isFocused, props.reportID]); - useEffect(() => { - if (!optionItem) { - return null; - } - runUseEffectOnlyOnce(); - }, [runUseEffectOnlyOnce, optionItem]); + if (!optionItem) { + return null; + } let popoverAnchor = null; const textStyle = props.isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText; From 1b1ad4885098ad8124e0839996e5657815eb0887 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Wed, 21 Jun 2023 17:01:05 +0100 Subject: [PATCH 306/826] clean up unused imports --- .../customairshipextender/CustomNotificationProvider.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index ea51337042c5..94e781efe90e 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -9,13 +9,11 @@ import android.content.Context; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; -import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.PorterDuff.Mode; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; -import android.graphics.drawable.Icon; import android.os.Build; import android.util.DisplayMetrics; import android.util.Log; @@ -29,9 +27,7 @@ import androidx.core.app.Person; import androidx.core.graphics.drawable.IconCompat; -import com.expensify.chat.R; import com.urbanairship.AirshipConfigOptions; -import com.urbanairship.json.JsonList; import com.urbanairship.json.JsonMap; import com.urbanairship.json.JsonValue; import com.urbanairship.push.PushMessage; From 4ba3da945d1e3a1dfc63ee0287d1d52da8d6ad71 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 22 Jun 2023 00:31:46 +0800 Subject: [PATCH 307/826] replace global ref with local ref --- .../Reactions/ReportActionItemReactions.js | 4 +- src/hooks/useReportScrollManager/index.js | 32 +++ .../useReportScrollManager/index.native.js | 26 +++ src/libs/ReportScrollManager/index.js | 20 +- src/libs/ReportScrollManager/index.native.js | 20 +- src/libs/actions/IOU.js | 7 + src/libs/actions/Report.js | 30 +-- src/pages/home/ReportScreen.js | 204 +++++++++--------- src/pages/home/ReportScreenContext.js | 4 + .../ReactionList/ReactionListRefContext.js | 4 - .../report/ReportActionItemMessageEdit.js | 9 +- src/pages/home/report/ReportActionsList.js | 7 +- src/pages/home/report/ReportActionsView.js | 31 ++- src/pages/iou/MoneyRequestModal.js | 11 +- 14 files changed, 238 insertions(+), 171 deletions(-) create mode 100644 src/hooks/useReportScrollManager/index.js create mode 100644 src/hooks/useReportScrollManager/index.native.js create mode 100644 src/pages/home/ReportScreenContext.js delete mode 100644 src/pages/home/report/ReactionList/ReactionListRefContext.js diff --git a/src/components/Reactions/ReportActionItemReactions.js b/src/components/Reactions/ReportActionItemReactions.js index 8a818e1c7bff..d5da41c9f648 100644 --- a/src/components/Reactions/ReportActionItemReactions.js +++ b/src/components/Reactions/ReportActionItemReactions.js @@ -11,7 +11,7 @@ import * as Report from '../../libs/actions/Report'; import Tooltip from '../Tooltip'; import ReactionTooltipContent from './ReactionTooltipContent'; import * as EmojiUtils from '../../libs/EmojiUtils'; -import ReactionListRefContext from '../../pages/home/report/ReactionList/ReactionListRefContext'; +import ReportScreenContext from '../../pages/home/ReportScreenContext'; const propTypes = { /** @@ -47,7 +47,7 @@ const defaultProps = { }; function ReportActionItemReactions(props) { - const reactionListRef = useContext(ReactionListRefContext); + const {reactionListRef} = useContext(ReportScreenContext); const popoverReactionListAnchor = useRef(null); const reactionsWithCount = _.filter(props.reactions, (reaction) => reaction.users.length > 0); diff --git a/src/hooks/useReportScrollManager/index.js b/src/hooks/useReportScrollManager/index.js new file mode 100644 index 000000000000..419599cb7d54 --- /dev/null +++ b/src/hooks/useReportScrollManager/index.js @@ -0,0 +1,32 @@ +import {useContext} from 'react'; +import ReportScreenContext from '../../pages/home/ReportScreenContext'; + +function useReportScrollManager() { + const {flatListRef} = useContext(ReportScreenContext); + + /** + * Scroll to the provided index. On non-native implementations we do not want to scroll when we are scrolling because + * we are editing a comment. + * + * @param {Object} index + * @param {Boolean} isEditing + */ + const scrollToIndex = (index, isEditing) => { + if (isEditing) { + return; + } + + flatListRef.current.scrollToIndex(index); + }; + + /** + * Scroll to the bottom of the flatlist. + */ + const scrollToBottom = () => { + flatListRef.current.scrollToOffset({animated: false, offset: 0}); + }; + + return {scrollToIndex, scrollToBottom}; +} + +export default useReportScrollManager; diff --git a/src/hooks/useReportScrollManager/index.native.js b/src/hooks/useReportScrollManager/index.native.js new file mode 100644 index 000000000000..2206cd5104d4 --- /dev/null +++ b/src/hooks/useReportScrollManager/index.native.js @@ -0,0 +1,26 @@ +import {useContext} from 'react'; +import ReportScreenContext from '../../pages/home/ReportScreenContext'; + +function useReportScrollManager() { + const {flatListRef} = useContext(ReportScreenContext); + + /** + * Scroll to the provided index. + * + * @param {Object} index + */ + const scrollToIndex = (index) => { + flatListRef.current.scrollToIndex(index); + }; + + /** + * Scroll to the bottom of the flatlist. + */ + const scrollToBottom = () => { + flatListRef.current.scrollToOffset({animated: false, offset: 0}); + }; + + return {scrollToIndex, scrollToBottom}; +} + +export default useReportScrollManager; diff --git a/src/libs/ReportScrollManager/index.js b/src/libs/ReportScrollManager/index.js index f35abb74020a..dd3ca0aa9532 100644 --- a/src/libs/ReportScrollManager/index.js +++ b/src/libs/ReportScrollManager/index.js @@ -1,34 +1,30 @@ -import React from 'react'; - -// This ref is created using React.createRef here because this function is used by a component that doesn't have access -// to the original ref. -const flatListRef = React.createRef(); - /** * Scroll to the provided index. On non-native implementations we do not want to scroll when we are scrolling because * we are editing a comment. * + * @param {Object} ref * @param {Object} index * @param {Boolean} isEditing */ -function scrollToIndex(index, isEditing) { +function scrollToIndex(ref, index, isEditing) { if (isEditing) { return; } - flatListRef.current.scrollToIndex(index); + ref.current.scrollToIndex(index); } /** * Scroll to the bottom of the flatlist. * + * @param {Object} ref */ -function scrollToBottom() { - if (!flatListRef.current) { +function scrollToBottom(ref) { + if (!ref.current) { return; } - flatListRef.current.scrollToOffset({animated: false, offset: 0}); + ref.current.scrollToOffset({animated: false, offset: 0}); } -export {flatListRef, scrollToIndex, scrollToBottom}; +export {scrollToIndex, scrollToBottom}; diff --git a/src/libs/ReportScrollManager/index.native.js b/src/libs/ReportScrollManager/index.native.js index 85a67f51e559..d3eaa422cbc5 100644 --- a/src/libs/ReportScrollManager/index.native.js +++ b/src/libs/ReportScrollManager/index.native.js @@ -1,28 +1,24 @@ -import React from 'react'; - -// This ref is created using React.createRef here because this function is used by a component that doesn't have access -// to the original ref. -const flatListRef = React.createRef(); - /** * Scroll to the provided index. * + * @param {Object} ref * @param {Object} index */ -function scrollToIndex(index) { - flatListRef.current.scrollToIndex(index); +function scrollToIndex(ref, index) { + ref.current.scrollToIndex(index); } /** * Scroll to the bottom of the flatlist. * + * @param {Object} ref */ -function scrollToBottom() { - if (!flatListRef.current) { +function scrollToBottom(ref) { + if (!ref.current) { return; } - flatListRef.current.scrollToOffset({animated: false, offset: 0}); + ref.current.scrollToOffset({animated: false, offset: 0}); } -export {flatListRef, scrollToIndex, scrollToBottom}; +export {scrollToIndex, scrollToBottom}; diff --git a/src/libs/actions/IOU.js b/src/libs/actions/IOU.js index eecd26069724..437e0f06d647 100644 --- a/src/libs/actions/IOU.js +++ b/src/libs/actions/IOU.js @@ -16,6 +16,7 @@ import DateUtils from '../DateUtils'; import TransactionUtils from '../TransactionUtils'; import * as ErrorUtils from '../ErrorUtils'; import * as UserUtils from '../UserUtils'; +import * as Report from './Report'; const chatReports = {}; const iouReports = {}; @@ -395,6 +396,7 @@ function requestMoney(report, amount, currency, payeeEmail, payeeAccountID, part {optimisticData, successData, failureData}, ); Navigation.dismissModal(chatReport.reportID); + Report.notifyNewAction(chatReport.reportID, payeeAccountID); } /** @@ -700,6 +702,7 @@ function splitBill(participants, currentUserLogin, currentUserAccountID, amount, ); Navigation.dismissModal(); + Report.notifyNewAction(groupData.chatReportID, currentUserAccountID); } /** @@ -729,6 +732,7 @@ function splitBillAndOpenReport(participants, currentUserLogin, currentUserAccou ); Navigation.dismissModal(groupData.chatReportID); + Report.notifyNewAction(groupData.chatReportID, currentUserAccountID); } /** @@ -1210,6 +1214,7 @@ function sendMoneyElsewhere(report, amount, currency, comment, managerID, recipi API.write('SendMoneyElsewhere', params, {optimisticData, successData, failureData}); Navigation.dismissModal(params.chatReportID); + Report.notifyNewAction(params.chatReportID, managerID); } /** @@ -1226,6 +1231,7 @@ function sendMoneyWithWallet(report, amount, currency, comment, managerID, recip API.write('SendMoneyWithWallet', params, {optimisticData, successData, failureData}); Navigation.dismissModal(params.chatReportID); + Report.notifyNewAction(params.chatReportID, managerID); } /** @@ -1242,6 +1248,7 @@ function sendMoneyViaPaypal(report, amount, currency, comment, managerID, recipi API.write('SendMoneyViaPaypal', params, {optimisticData, successData, failureData}); Navigation.dismissModal(params.chatReportID); + Report.notifyNewAction(params.chatReportID, managerID); asyncOpenURL(Promise.resolve(), buildPayPalPaymentUrl(amount, recipient.payPalMeAddress, currency)); } diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 4cf90dbcb1ab..a30507b60ce1 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -193,6 +193,21 @@ function subscribeToNewActionEvent(reportID, callback) { }; } +/** + * Notify the ReportActionsView that a new comment has arrived + * + * @param {String} reportID + * @param {Number} accountID + * @param {String} reportActionID + */ +function notifyNewAction(reportID, accountID, reportActionID) { + if (reportID !== newActionSubscriber.reportID) { + return; + } + const isFromCurrentUser = accountID === currentUserAccountID; + newActionSubscriber.callback(isFromCurrentUser, reportActionID); +} + /** * Add up to two report actions to a report. This method can be called for the following situations: * @@ -306,12 +321,7 @@ function addActions(reportID, text = '', file) { successData, failureData, }); - - // Notify the ReportActionsView that a new comment has arrived - if (reportID === newActionSubscriber.reportID) { - const isFromCurrentUser = lastAction.actorAccountID === currentUserAccountID; - newActionSubscriber.callback(isFromCurrentUser, lastAction.reportActionID); - } + notifyNewAction(reportID, lastAction.actorAccountID, lastAction.reportActionID); } /** @@ -1436,12 +1446,7 @@ function showReportActionNotification(reportID, action) { Navigation.navigate(ROUTES.getReportRoute(reportID)); }, }); - - // Notify the ReportActionsView that a new comment has arrived - if (reportID === newActionSubscriber.reportID) { - const isFromCurrentUser = action.actorAccountID === currentUserAccountID; - newActionSubscriber.callback(isFromCurrentUser, action.reportActionID); - } + notifyNewAction(reportID, action.actorAccountID, action.reportActionID); } /** @@ -1830,6 +1835,7 @@ export { clearPolicyRoomNameErrors, clearIOUError, subscribeToNewActionEvent, + notifyNewAction, showReportActionNotification, addEmojiReaction, removeEmojiReaction, diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index d3fb665ecb48..e9229698d3d2 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -39,6 +39,7 @@ import TaskHeader from '../../components/TaskHeader'; import MoneyRequestHeader from '../../components/MoneyRequestHeader'; import withNavigation, {withNavigationPropTypes} from '../../components/withNavigation'; import * as ComposerActions from '../../libs/actions/Composer'; +import ReportScreenContext from './ReportScreenContext'; const propTypes = { /** Navigation route context info provided by react navigation */ @@ -134,6 +135,8 @@ class ReportScreen extends React.Component { isBannerVisible: true, }; this.firstRenderRef = React.createRef(); + this.flatListRef = React.createRef(); + this.reactionListRef = React.createRef(); } componentDidMount() { @@ -248,111 +251,118 @@ class ReportScreen extends React.Component { const policy = this.props.policies[`${ONYXKEYS.COLLECTION.POLICY}${this.props.report.policyID}`]; return ( - - - + + - {ReportUtils.isMoneyRequestReport(this.props.report) || isSingleTransactionView ? ( - - ) : ( - Navigation.goBack(ROUTES.HOME)} - personalDetails={this.props.personalDetails} - report={this.props.report} - /> - )} + + {ReportUtils.isMoneyRequestReport(this.props.report) || isSingleTransactionView ? ( + + ) : ( + Navigation.goBack(ROUTES.HOME)} + personalDetails={this.props.personalDetails} + report={this.props.report} + /> + )} - {ReportUtils.isTaskReport(this.props.report) && ( - - )} - - {Boolean(this.props.accountManagerReportID) && ReportUtils.isConciergeChatReport(this.props.report) && this.state.isBannerVisible && ( - - )} - { - const skeletonViewContainerHeight = event.nativeEvent.layout.height; - - // The height can be 0 if the component unmounts - we are not interested in this value and want to know how much space it - // takes up so we can set the skeleton view container height. - if (skeletonViewContainerHeight === 0) { - return; - } - reportActionsListViewHeight = skeletonViewContainerHeight; - this.setState({skeletonViewContainerHeight}); - }} - > - {this.isReportReadyForDisplay() && !isLoadingInitialReportActions && !isLoading && ( - + )} + + {Boolean(this.props.accountManagerReportID) && ReportUtils.isConciergeChatReport(this.props.report) && this.state.isBannerVisible && ( + )} - - {/* Note: The report should be allowed to mount even if the initial report actions are not loaded. If we prevent rendering the report while they are loading then - we'll unnecessarily unmount the ReportActionsView which will clear the new marker lines initial state. */} - {(!this.isReportReadyForDisplay() || isLoadingInitialReportActions || isLoading) && ( - - )} - - {this.isReportReadyForDisplay() && ( - <> - { + const skeletonViewContainerHeight = event.nativeEvent.layout.height; + + // The height can be 0 if the component unmounts - we are not interested in this value and want to know how much space it + // takes up so we can set the skeleton view container height. + if (skeletonViewContainerHeight === 0) { + return; + } + reportActionsListViewHeight = skeletonViewContainerHeight; + this.setState({skeletonViewContainerHeight}); + }} + > + {this.isReportReadyForDisplay() && !isLoadingInitialReportActions && !isLoading && ( + - - )} - - {!this.isReportReadyForDisplay() && ( - - )} - - - - - - + )} + + {/* Note: The report should be allowed to mount even if the initial report actions are not loaded. If we prevent rendering the report while they are loading then + we'll unnecessarily unmount the ReportActionsView which will clear the new marker lines initial state. */} + {(!this.isReportReadyForDisplay() || isLoadingInitialReportActions || isLoading) && ( + + )} + + {this.isReportReadyForDisplay() && ( + <> + + + )} + + {!this.isReportReadyForDisplay() && ( + + )} + + + + + + + ); } } diff --git a/src/pages/home/ReportScreenContext.js b/src/pages/home/ReportScreenContext.js new file mode 100644 index 000000000000..2f79d6ae9432 --- /dev/null +++ b/src/pages/home/ReportScreenContext.js @@ -0,0 +1,4 @@ +import {createContext} from 'react'; + +const ReportScreenContext = createContext(); +export default ReportScreenContext; diff --git a/src/pages/home/report/ReactionList/ReactionListRefContext.js b/src/pages/home/report/ReactionList/ReactionListRefContext.js deleted file mode 100644 index 12417b03bb15..000000000000 --- a/src/pages/home/report/ReactionList/ReactionListRefContext.js +++ /dev/null @@ -1,4 +0,0 @@ -import React from 'react'; - -const ReactionListRefContext = React.createContext(); -export default ReactionListRefContext; diff --git a/src/pages/home/report/ReportActionItemMessageEdit.js b/src/pages/home/report/ReportActionItemMessageEdit.js index 56b78a73ae50..7d4535abc2c8 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.js +++ b/src/pages/home/report/ReportActionItemMessageEdit.js @@ -11,7 +11,6 @@ import themeColors from '../../../styles/themes/default'; import * as StyleUtils from '../../../styles/StyleUtils'; import Composer from '../../../components/Composer'; import * as Report from '../../../libs/actions/Report'; -import * as ReportScrollManager from '../../../libs/ReportScrollManager'; import openReportActionComposeViewWhenClosingMessageEdit from '../../../libs/openReportActionComposeViewWhenClosingMessageEdit'; import ReportActionComposeFocusManager from '../../../libs/ReportActionComposeFocusManager'; import EmojiPickerButton from '../../../components/EmojiPicker/EmojiPickerButton'; @@ -33,6 +32,7 @@ import Hoverable from '../../../components/Hoverable'; import useLocalize from '../../../hooks/useLocalize'; import useKeyboardState from '../../../hooks/useKeyboardState'; import useWindowDimensions from '../../../hooks/useWindowDimensions'; +import useReportScrollManager from '../../../hooks/useReportScrollManager'; const propTypes = { /** All the data of the action */ @@ -75,6 +75,7 @@ const emojiButtonID = 'emojiButton'; const messageEditInput = 'messageEditInput'; function ReportActionItemMessageEdit(props) { + const reportScrollManager = useReportScrollManager(); const {translate} = useLocalize(); const {isKeyboardShown} = useKeyboardState(); const {isSmallScreenWidth} = useWindowDimensions(); @@ -186,11 +187,11 @@ function ReportActionItemMessageEdit(props) { // Scroll to the last comment after editing to make sure the whole comment is clearly visible in the report. if (props.index === 0) { const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', () => { - ReportScrollManager.scrollToIndex({animated: true, index: props.index}, false); + reportScrollManager.scrollToIndex({animated: true, index: props.index}, false); keyboardDidHideListener.remove(); }); } - }, [props.action.reportActionID, debouncedSaveDraft, props.index, props.reportID]); + }, [props.action.reportActionID, debouncedSaveDraft, props.index, props.reportID, reportScrollManager]); /** * Save the draft of the comment to be the new comment message. This will take the comment out of "edit mode" with @@ -306,7 +307,7 @@ function ReportActionItemMessageEdit(props) { style={[styles.textInputCompose, styles.flex1, styles.bgTransparent]} onFocus={() => { setIsFocused(true); - ReportScrollManager.scrollToIndex({animated: true, index: props.index}, true); + reportScrollManager.scrollToIndex({animated: true, index: props.index}, true); ComposerActions.setShouldShowComposeInput(false); }} onBlur={(event) => { diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index c3288c3eeb6a..a6f517fd8043 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -1,10 +1,9 @@ import PropTypes from 'prop-types'; -import React, {useCallback, useEffect, useState} from 'react'; +import React, {useCallback, useEffect, useState, useContext} from 'react'; import Animated, {useSharedValue, useAnimatedStyle, withTiming} from 'react-native-reanimated'; import _ from 'underscore'; import InvertedFlatList from '../../../components/InvertedFlatList'; import compose from '../../../libs/compose'; -import * as ReportScrollManager from '../../../libs/ReportScrollManager'; import styles from '../../../styles/styles'; import * as ReportUtils from '../../../libs/ReportUtils'; import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; @@ -21,6 +20,7 @@ import CONST from '../../../CONST'; import reportPropTypes from '../../reportPropTypes'; import networkPropTypes from '../../../components/networkPropTypes'; import withLocalize from '../../../components/withLocalize'; +import ReportScreenContext from '../ReportScreenContext'; const propTypes = { /** Position of the "New" line marker */ @@ -78,6 +78,7 @@ function keyExtractor(item) { } function ReportActionsList(props) { + const {flatListRef} = useContext(ReportScreenContext); const opacity = useSharedValue(0); const animatedStyles = useAnimatedStyle(() => ({ opacity: opacity.value, @@ -152,7 +153,7 @@ function ReportActionsList(props) { - - - + @@ -368,5 +366,6 @@ class ReportActionsView extends React.Component { ReportActionsView.propTypes = propTypes; ReportActionsView.defaultProps = defaultProps; +ReportActionsView.contextType = ReportScreenContext; export default compose(Performance.withRenderTrace({id: ' rendering'}), withWindowDimensions, withNavigationFocus, withLocalize, withNetwork())(ReportActionsView); diff --git a/src/pages/iou/MoneyRequestModal.js b/src/pages/iou/MoneyRequestModal.js index 9c3f9b878b50..860ca6acd075 100644 --- a/src/pages/iou/MoneyRequestModal.js +++ b/src/pages/iou/MoneyRequestModal.js @@ -21,7 +21,6 @@ import * as PersonalDetails from '../../libs/actions/PersonalDetails'; import withCurrentUserPersonalDetails from '../../components/withCurrentUserPersonalDetails'; import reportPropTypes from '../reportPropTypes'; import * as ReportUtils from '../../libs/ReportUtils'; -import * as ReportScrollManager from '../../libs/ReportScrollManager'; import useOnNetworkReconnect from '../../hooks/useOnNetworkReconnect'; import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; import HeaderWithBackButton from '../../components/HeaderWithBackButton'; @@ -395,14 +394,8 @@ function MoneyRequestModal(props) { > {modalHeader} { - createTransaction(selectedParticipants); - ReportScrollManager.scrollToBottom(); - }} - onSendMoney={(paymentMethodType) => { - sendMoney(paymentMethodType); - ReportScrollManager.scrollToBottom(); - }} + onConfirm={createTransaction} + onSendMoney={sendMoney} hasMultipleParticipants={props.hasMultipleParticipants} participants={_.filter(selectedOptions, (option) => props.currentUserPersonalDetails.accountID !== option.accountID)} iouAmount={amount} From 4c0a531250e1fe4c3484b7bce965ae69a57ae56c Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 22 Jun 2023 00:53:22 +0800 Subject: [PATCH 308/826] prettier --- src/libs/actions/Report.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index a30507b60ce1..b49af54ad075 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -195,10 +195,10 @@ function subscribeToNewActionEvent(reportID, callback) { /** * Notify the ReportActionsView that a new comment has arrived - * - * @param {String} reportID - * @param {Number} accountID - * @param {String} reportActionID + * + * @param {String} reportID + * @param {Number} accountID + * @param {String} reportActionID */ function notifyNewAction(reportID, accountID, reportActionID) { if (reportID !== newActionSubscriber.reportID) { From 4cfa95389282973d691ead72d353b58294f40e5e Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Wed, 21 Jun 2023 10:06:28 -0700 Subject: [PATCH 309/826] Fix warning for forwardedRef type --- src/components/withViewportOffsetTop.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/withViewportOffsetTop.js b/src/components/withViewportOffsetTop.js index e25e5db9c5fa..0a8ed24cade2 100644 --- a/src/components/withViewportOffsetTop.js +++ b/src/components/withViewportOffsetTop.js @@ -53,7 +53,9 @@ export default function (WrappedComponent) { WithViewportOffsetTop.displayName = `WithViewportOffsetTop(${getComponentDisplayName(WrappedComponent)})`; WithViewportOffsetTop.propTypes = { - forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]), + // eslint-disable-next-line react/forbid-prop-types + forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.any})]), + }; WithViewportOffsetTop.defaultProps = { forwardedRef: undefined, From 189ceebc78c40eaf751eb8f8ac0f4441b82dc3d8 Mon Sep 17 00:00:00 2001 From: Daraksha Date: Wed, 21 Jun 2023 22:39:48 +0530 Subject: [PATCH 310/826] upgrade onfido --- package-lock.json | 407 +++++++++++++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 274 insertions(+), 135 deletions(-) diff --git a/package-lock.json b/package-lock.json index 327a78c3dbcb..b289a9f74183 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ "metro-config": "^0.71.3", "moment": "^2.29.4", "moment-timezone": "^0.5.31", - "onfido-sdk-ui": "12.2.1", + "onfido-sdk-ui": "^12.4.0", "process": "^0.11.10", "prop-types": "^15.7.2", "pusher-js": "7.4.0", @@ -5221,9 +5221,9 @@ "license": "MIT" }, "node_modules/@onfido/active-video-capture": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.25.2.tgz", - "integrity": "sha512-lBxd3JakrrDpldhjGCwEoO0jALOCDKZwsRyXZFxrxXXEvmFUNQRUTNDwgnEHSn8l6JPzxNd2fAKFqoryD/6F4w==", + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.27.3.tgz", + "integrity": "sha512-t6NKJ4P2Yjm46yiUyd5ehjLqRT9qwnOU3g9nQjHw7xdW6p1EIWDzYtE2gWCfWUmwygJaBGv+diDGFXHtJ/kkjA==", "hasInstallScript": true, "dependencies": { "@mediapipe/face_detection": "^0.4.1646425229", @@ -5238,13 +5238,105 @@ "@tensorflow/tfjs-core": "^3.20.0", "patch-package": "^6.4.7", "postinstall-postinstall": "^2.1.0", - "preact": "^10.10.6", - "react-webcam": "^7.0.0" + "preact": "10.11.3", + "react-webcam": "^7.1.1" }, "engines": { "node": ">=16" } }, + "node_modules/@onfido/active-video-capture/node_modules/@tensorflow-models/face-landmarks-detection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.2.tgz", + "integrity": "sha512-e10xKlBssv2nYg8hV93rNg7ne8NIJVT9Y1d/bpUCcBpPLJpykLw2DQ3nfPnoBpqhKDykFtKDGQVmeXvqc7H+KA==", + "dependencies": { + "rimraf": "^3.0.2" + }, + "peerDependencies": { + "@mediapipe/face_mesh": "~0.4.0", + "@tensorflow-models/face-detection": "~1.0.0", + "@tensorflow/tfjs-backend-webgl": "^3.12.0", + "@tensorflow/tfjs-converter": "^3.12.0", + "@tensorflow/tfjs-core": "^3.12.0" + } + }, + "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-cpu": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz", + "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==", + "dependencies": { + "@types/seedrandom": "^2.4.28", + "seedrandom": "^3.0.5" + }, + "engines": { + "yarn": ">= 1.3.2" + }, + "peerDependencies": { + "@tensorflow/tfjs-core": "3.21.0" + } + }, + "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-wasm": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz", + "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==", + "dependencies": { + "@tensorflow/tfjs-backend-cpu": "3.21.0", + "@types/emscripten": "~0.0.34" + }, + "peerDependencies": { + "@tensorflow/tfjs-core": "3.21.0" + } + }, + "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-backend-webgl": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz", + "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==", + "dependencies": { + "@tensorflow/tfjs-backend-cpu": "3.21.0", + "@types/offscreencanvas": "~2019.3.0", + "@types/seedrandom": "^2.4.28", + "@types/webgl-ext": "0.0.30", + "@types/webgl2": "0.0.6", + "seedrandom": "^3.0.5" + }, + "engines": { + "yarn": ">= 1.3.2" + }, + "peerDependencies": { + "@tensorflow/tfjs-core": "3.21.0" + } + }, + "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-converter": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz", + "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==", + "peerDependencies": { + "@tensorflow/tfjs-core": "3.21.0" + } + }, + "node_modules/@onfido/active-video-capture/node_modules/@tensorflow/tfjs-core": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz", + "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==", + "dependencies": { + "@types/long": "^4.0.1", + "@types/offscreencanvas": "~2019.3.0", + "@types/seedrandom": "^2.4.28", + "@types/webgl-ext": "0.0.30", + "@webgpu/types": "0.1.16", + "long": "4.0.0", + "node-fetch": "~2.6.1", + "seedrandom": "^3.0.5" + }, + "engines": { + "yarn": ">= 1.3.2" + } + }, + "node_modules/@onfido/active-video-capture/node_modules/@webgpu/types": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz", + "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==" + }, "node_modules/@onfido/castor": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@onfido/castor/-/castor-2.2.5.tgz", @@ -5258,9 +5350,9 @@ } }, "node_modules/@onfido/castor-icons": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.17.0.tgz", - "integrity": "sha512-dY2QNOFrIEqwCXcjNmH7hqz35CDWtBDlPkwbLYfnhK9ZAV7qUs2wcAxGi/FD4Yvi7MNsRBsFKSoT379hBSQcCw==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.19.0.tgz", + "integrity": "sha512-LUQDQztjvElC8xu7fINbmmxsS92S/aVNPJyY9AlNlHPTO/Xino71iK+gE8Zbptgcm8++pkqKb+FrZUd83khqHw==", "peerDependencies": { "react": ">=17 || ^16.14 || ^15.7 || ^0.14.10" } @@ -15128,38 +15220,25 @@ } }, "node_modules/@tensorflow-models/face-detection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.1.tgz", - "integrity": "sha512-oIEEqHy4qbkGn5xT1ldzwxK5s948+t7ts0+WoIfTPKwScpNa8YY4GJf+fpyhtOxUGGAZymXx25jrvF9YlAt9dg==", - "dependencies": { - "rimraf": "^3.0.2" - }, - "peerDependencies": { - "@mediapipe/face_detection": "~0.4.0", - "@tensorflow/tfjs-backend-webgl": "^3.14.0", - "@tensorflow/tfjs-converter": "^3.14.0", - "@tensorflow/tfjs-core": "^3.14.0" - } - }, - "node_modules/@tensorflow-models/face-landmarks-detection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.2.tgz", - "integrity": "sha512-e10xKlBssv2nYg8hV93rNg7ne8NIJVT9Y1d/bpUCcBpPLJpykLw2DQ3nfPnoBpqhKDykFtKDGQVmeXvqc7H+KA==", + "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.2.tgz", + "integrity": "sha512-anjSxy3MnZdTiVluOEQZeaFWM30IPswFM+SltX6wseXKja/AbrHYqamGNZKUylAs2JAyudq+xqTRPS+nA2ourg==", "dependencies": { - "rimraf": "^3.0.2" + "rimraf": "^3.0.2", + "tslib": "2.4.0" }, "peerDependencies": { - "@mediapipe/face_mesh": "~0.4.0", - "@tensorflow-models/face-detection": "~1.0.0", - "@tensorflow/tfjs-backend-webgl": "^3.12.0", - "@tensorflow/tfjs-converter": "^3.12.0", - "@tensorflow/tfjs-core": "^3.12.0" + "@mediapipe/face_detection": "~0.4.0", + "@tensorflow/tfjs-backend-webgl": "^4.4.0", + "@tensorflow/tfjs-converter": "^4.4.0", + "@tensorflow/tfjs-core": "^4.4.0" } }, "node_modules/@tensorflow/tfjs-backend-cpu": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz", - "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.8.0.tgz", + "integrity": "sha512-kT4WZeM4cuuZ+dSCMatrC9YiqV4dxpFzjxKOKwdS41gdg5QKQGW7caScCe55thO/Xpp7VOJXncDYeaMH7GcxCA==", + "peer": true, "dependencies": { "@types/seedrandom": "^2.4.28", "seedrandom": "^3.0.5" @@ -15168,58 +15247,48 @@ "yarn": ">= 1.3.2" }, "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" - } - }, - "node_modules/@tensorflow/tfjs-backend-wasm": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz", - "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==", - "dependencies": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", - "@types/emscripten": "~0.0.34" - }, - "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" + "@tensorflow/tfjs-core": "4.8.0" } }, "node_modules/@tensorflow/tfjs-backend-webgl": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz", - "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.8.0.tgz", + "integrity": "sha512-iAJzQbndBtarV+OWk9Ukur5U0Xk/4t7j7O5WhPQO/q9yuRyWjAT6MPaCEW/+Ew4XC8yJGuvlfL0Oqi1X0drvfA==", + "peer": true, "dependencies": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", + "@tensorflow/tfjs-backend-cpu": "4.8.0", "@types/offscreencanvas": "~2019.3.0", "@types/seedrandom": "^2.4.28", "@types/webgl-ext": "0.0.30", - "@types/webgl2": "0.0.6", "seedrandom": "^3.0.5" }, "engines": { "yarn": ">= 1.3.2" }, "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" + "@tensorflow/tfjs-core": "4.8.0" } }, "node_modules/@tensorflow/tfjs-converter": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz", - "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.8.0.tgz", + "integrity": "sha512-tBYsCdhdFNlFFn4FO49gr1yLX4h8xDxpoFI70lFECxDu9UfwaHNVuBLcocMx4XIFqQx12h6/Y3pD93HFvoum3A==", + "peer": true, "peerDependencies": { - "@tensorflow/tfjs-core": "3.21.0" + "@tensorflow/tfjs-core": "4.8.0" } }, "node_modules/@tensorflow/tfjs-core": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz", - "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.8.0.tgz", + "integrity": "sha512-EkgGOAsPQSlpEdiG938c92pdC5i8GHeBVk6xO1AKKX8NiMSIruKtKqIQvX2aOkarwHy/5nhrJebAAvIL4dJlbw==", + "peer": true, "dependencies": { "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.3.0", + "@types/offscreencanvas": "~2019.7.0", "@types/seedrandom": "^2.4.28", "@types/webgl-ext": "0.0.30", - "@webgpu/types": "0.1.16", + "@webgpu/types": "0.1.30", "long": "4.0.0", "node-fetch": "~2.6.1", "seedrandom": "^3.0.5" @@ -15228,6 +15297,12 @@ "yarn": ">= 1.3.2" } }, + "node_modules/@tensorflow/tfjs-core/node_modules/@types/offscreencanvas": { + "version": "2019.7.0", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz", + "integrity": "sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==", + "peer": true + }, "node_modules/@testing-library/jest-native": { "version": "5.4.1", "dev": true, @@ -16394,9 +16469,10 @@ } }, "node_modules/@webgpu/types": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz", - "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==" + "version": "0.1.30", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.30.tgz", + "integrity": "sha512-9AXJSmL3MzY8ZL//JjudA//q+2kBRGhLBFpkdGksWIuxrMy81nFrCzj2Am+mbh8WoU6rXmv7cY5E3rdlyru2Qg==", + "peer": true }, "node_modules/@webpack-cli/configtest": { "version": "1.2.0", @@ -34160,11 +34236,11 @@ } }, "node_modules/onfido-sdk-ui": { - "version": "12.2.1", - "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-12.2.1.tgz", - "integrity": "sha512-KRLOHXp4HHLw9IEPPPnG2iLSQfRjfmABFAB5fmfXawBgqdfoGuzrL6jm/nWggsi+gUMGhxlBQZzAmLLMuPL5LA==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-12.4.0.tgz", + "integrity": "sha512-saal/2UueJJnbJkvZlT+st83LjMUK8fsUHmwDuz96f/ZSXT/KxtALgMMdJKZmwmqmfHQtc8F4SVqhluMswiDhQ==", "dependencies": { - "@onfido/active-video-capture": "^0.25.1", + "@onfido/active-video-capture": "^0.27.3", "@onfido/opencv": "^1.0.0", "@sentry/browser": "^7.2.0", "blueimp-load-image": "~2.29.0", @@ -34178,7 +34254,7 @@ "hoist-non-react-statics": "^3.3.2", "js-cookie": "^3.0.1", "pdfobject": "^2.2.7", - "preact": "^10.5.13", + "preact": "10.11.3", "redux": "^4.0.5", "socket.io-client": "^4.2.0", "supports-webp": "~1.0.3", @@ -35285,9 +35361,9 @@ "hasInstallScript": true }, "node_modules/preact": { - "version": "10.13.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.2.tgz", - "integrity": "sha512-q44QFLhOhty2Bd0Y46fnYW0gD/cbVM9dUVtNTDKPcdXSMA7jfY+Jpd6rk3GB0lcQss0z5s/6CmVP0Z/hV+g6pw==", + "version": "10.11.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.3.tgz", + "integrity": "sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==", "funding": { "type": "opencollective", "url": "https://opencollective.com/preact" @@ -37282,9 +37358,9 @@ } }, "node_modules/react-webcam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.0.1.tgz", - "integrity": "sha512-8E/Eb/7ksKwn5QdLn67tOR7+TdP9BZdu6E5/DSt20v8yfW/s0VGBigE6VA7R4278mBuBUowovAB3DkCfVmSPvA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.1.1.tgz", + "integrity": "sha512-2W5WN8wmEv8ZlxvyAlOxVuw6new8Bi7+KSPqoq5oa7z1KSKZ72ucaKqCFRtHSuFjZ5sh5ioS9lp4BGwnaZ6lDg==", "peerDependencies": { "react": ">=16.2.0", "react-dom": ">=16.2.0" @@ -46472,9 +46548,9 @@ "from": "@oguzhnatly/react-native-image-manipulator@github:Expensify/react-native-image-manipulator#5cdae3d4455b03a04c57f50be3863e2fe6c92c52" }, "@onfido/active-video-capture": { - "version": "0.25.2", - "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.25.2.tgz", - "integrity": "sha512-lBxd3JakrrDpldhjGCwEoO0jALOCDKZwsRyXZFxrxXXEvmFUNQRUTNDwgnEHSn8l6JPzxNd2fAKFqoryD/6F4w==", + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@onfido/active-video-capture/-/active-video-capture-0.27.3.tgz", + "integrity": "sha512-t6NKJ4P2Yjm46yiUyd5ehjLqRT9qwnOU3g9nQjHw7xdW6p1EIWDzYtE2gWCfWUmwygJaBGv+diDGFXHtJ/kkjA==", "requires": { "@mediapipe/face_detection": "^0.4.1646425229", "@mediapipe/face_mesh": "^0.4.1633559619", @@ -46488,8 +46564,75 @@ "@tensorflow/tfjs-core": "^3.20.0", "patch-package": "^6.4.7", "postinstall-postinstall": "^2.1.0", - "preact": "^10.10.6", - "react-webcam": "^7.0.0" + "preact": "10.11.3", + "react-webcam": "^7.1.1" + }, + "dependencies": { + "@tensorflow-models/face-landmarks-detection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.2.tgz", + "integrity": "sha512-e10xKlBssv2nYg8hV93rNg7ne8NIJVT9Y1d/bpUCcBpPLJpykLw2DQ3nfPnoBpqhKDykFtKDGQVmeXvqc7H+KA==", + "requires": { + "rimraf": "^3.0.2" + } + }, + "@tensorflow/tfjs-backend-cpu": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz", + "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==", + "requires": { + "@types/seedrandom": "^2.4.28", + "seedrandom": "^3.0.5" + } + }, + "@tensorflow/tfjs-backend-wasm": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz", + "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==", + "requires": { + "@tensorflow/tfjs-backend-cpu": "3.21.0", + "@types/emscripten": "~0.0.34" + } + }, + "@tensorflow/tfjs-backend-webgl": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz", + "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==", + "requires": { + "@tensorflow/tfjs-backend-cpu": "3.21.0", + "@types/offscreencanvas": "~2019.3.0", + "@types/seedrandom": "^2.4.28", + "@types/webgl-ext": "0.0.30", + "@types/webgl2": "0.0.6", + "seedrandom": "^3.0.5" + } + }, + "@tensorflow/tfjs-converter": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz", + "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==", + "requires": {} + }, + "@tensorflow/tfjs-core": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz", + "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==", + "requires": { + "@types/long": "^4.0.1", + "@types/offscreencanvas": "~2019.3.0", + "@types/seedrandom": "^2.4.28", + "@types/webgl-ext": "0.0.30", + "@webgpu/types": "0.1.16", + "long": "4.0.0", + "node-fetch": "~2.6.1", + "seedrandom": "^3.0.5" + } + }, + "@webgpu/types": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz", + "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==" + } } }, "@onfido/castor": { @@ -46502,9 +46645,9 @@ } }, "@onfido/castor-icons": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.17.0.tgz", - "integrity": "sha512-dY2QNOFrIEqwCXcjNmH7hqz35CDWtBDlPkwbLYfnhK9ZAV7qUs2wcAxGi/FD4Yvi7MNsRBsFKSoT379hBSQcCw==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/@onfido/castor-icons/-/castor-icons-2.19.0.tgz", + "integrity": "sha512-LUQDQztjvElC8xu7fINbmmxsS92S/aVNPJyY9AlNlHPTO/Xino71iK+gE8Zbptgcm8++pkqKb+FrZUd83khqHw==", "requires": {} }, "@onfido/castor-tokens": { @@ -53181,71 +53324,66 @@ } }, "@tensorflow-models/face-detection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.1.tgz", - "integrity": "sha512-oIEEqHy4qbkGn5xT1ldzwxK5s948+t7ts0+WoIfTPKwScpNa8YY4GJf+fpyhtOxUGGAZymXx25jrvF9YlAt9dg==", - "requires": { - "rimraf": "^3.0.2" - } - }, - "@tensorflow-models/face-landmarks-detection": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tensorflow-models/face-landmarks-detection/-/face-landmarks-detection-1.0.2.tgz", - "integrity": "sha512-e10xKlBssv2nYg8hV93rNg7ne8NIJVT9Y1d/bpUCcBpPLJpykLw2DQ3nfPnoBpqhKDykFtKDGQVmeXvqc7H+KA==", + "resolved": "https://registry.npmjs.org/@tensorflow-models/face-detection/-/face-detection-1.0.2.tgz", + "integrity": "sha512-anjSxy3MnZdTiVluOEQZeaFWM30IPswFM+SltX6wseXKja/AbrHYqamGNZKUylAs2JAyudq+xqTRPS+nA2ourg==", "requires": { - "rimraf": "^3.0.2" + "rimraf": "^3.0.2", + "tslib": "2.4.0" } }, "@tensorflow/tfjs-backend-cpu": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-3.21.0.tgz", - "integrity": "sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-cpu/-/tfjs-backend-cpu-4.8.0.tgz", + "integrity": "sha512-kT4WZeM4cuuZ+dSCMatrC9YiqV4dxpFzjxKOKwdS41gdg5QKQGW7caScCe55thO/Xpp7VOJXncDYeaMH7GcxCA==", + "peer": true, "requires": { "@types/seedrandom": "^2.4.28", "seedrandom": "^3.0.5" } }, - "@tensorflow/tfjs-backend-wasm": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-wasm/-/tfjs-backend-wasm-3.21.0.tgz", - "integrity": "sha512-TVkJWrqukdxvIaQn9jZvtXR+7fmT7sti6NQH5OKVcBmFYIW7I3RiRRE66inVrHjEEvIVTUuW9yo9Ialn31EFIw==", - "requires": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", - "@types/emscripten": "~0.0.34" - } - }, "@tensorflow/tfjs-backend-webgl": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-3.21.0.tgz", - "integrity": "sha512-N4zitIAT9IX8B8oe489qM3f3VcESxGZIZvHmVP8varOQakTvTX859aaPo1s8hK1qCy4BjSGbweooZe4U8D4kTQ==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-backend-webgl/-/tfjs-backend-webgl-4.8.0.tgz", + "integrity": "sha512-iAJzQbndBtarV+OWk9Ukur5U0Xk/4t7j7O5WhPQO/q9yuRyWjAT6MPaCEW/+Ew4XC8yJGuvlfL0Oqi1X0drvfA==", + "peer": true, "requires": { - "@tensorflow/tfjs-backend-cpu": "3.21.0", + "@tensorflow/tfjs-backend-cpu": "4.8.0", "@types/offscreencanvas": "~2019.3.0", "@types/seedrandom": "^2.4.28", "@types/webgl-ext": "0.0.30", - "@types/webgl2": "0.0.6", "seedrandom": "^3.0.5" } }, "@tensorflow/tfjs-converter": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-3.21.0.tgz", - "integrity": "sha512-12Y4zVDq3yW+wSjSDpSv4HnpL2sDZrNiGSg8XNiDE4HQBdjdA+a+Q3sZF/8NV9y2yoBhL5L7V4mMLDdbZBd9/Q==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-converter/-/tfjs-converter-4.8.0.tgz", + "integrity": "sha512-tBYsCdhdFNlFFn4FO49gr1yLX4h8xDxpoFI70lFECxDu9UfwaHNVuBLcocMx4XIFqQx12h6/Y3pD93HFvoum3A==", + "peer": true, "requires": {} }, "@tensorflow/tfjs-core": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-3.21.0.tgz", - "integrity": "sha512-YSfsswOqWfd+M4bXIhT3hwtAb+IV8+ODwIxwdFR/7jTAPZP1wMVnSlpKnXHAN64HFOiP+Tm3HmKusEZ0+09A0w==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@tensorflow/tfjs-core/-/tfjs-core-4.8.0.tgz", + "integrity": "sha512-EkgGOAsPQSlpEdiG938c92pdC5i8GHeBVk6xO1AKKX8NiMSIruKtKqIQvX2aOkarwHy/5nhrJebAAvIL4dJlbw==", + "peer": true, "requires": { "@types/long": "^4.0.1", - "@types/offscreencanvas": "~2019.3.0", + "@types/offscreencanvas": "~2019.7.0", "@types/seedrandom": "^2.4.28", "@types/webgl-ext": "0.0.30", - "@webgpu/types": "0.1.16", + "@webgpu/types": "0.1.30", "long": "4.0.0", "node-fetch": "~2.6.1", "seedrandom": "^3.0.5" + }, + "dependencies": { + "@types/offscreencanvas": { + "version": "2019.7.0", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz", + "integrity": "sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==", + "peer": true + } } }, "@testing-library/jest-native": { @@ -54123,9 +54261,10 @@ } }, "@webgpu/types": { - "version": "0.1.16", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.16.tgz", - "integrity": "sha512-9E61voMP4+Rze02jlTXud++Htpjyyk8vw5Hyw9FGRrmhHQg2GqbuOfwf5Klrb8vTxc2XWI3EfO7RUHMpxTj26A==" + "version": "0.1.30", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.30.tgz", + "integrity": "sha512-9AXJSmL3MzY8ZL//JjudA//q+2kBRGhLBFpkdGksWIuxrMy81nFrCzj2Am+mbh8WoU6rXmv7cY5E3rdlyru2Qg==", + "peer": true }, "@webpack-cli/configtest": { "version": "1.2.0", @@ -66032,11 +66171,11 @@ } }, "onfido-sdk-ui": { - "version": "12.2.1", - "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-12.2.1.tgz", - "integrity": "sha512-KRLOHXp4HHLw9IEPPPnG2iLSQfRjfmABFAB5fmfXawBgqdfoGuzrL6jm/nWggsi+gUMGhxlBQZzAmLLMuPL5LA==", + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/onfido-sdk-ui/-/onfido-sdk-ui-12.4.0.tgz", + "integrity": "sha512-saal/2UueJJnbJkvZlT+st83LjMUK8fsUHmwDuz96f/ZSXT/KxtALgMMdJKZmwmqmfHQtc8F4SVqhluMswiDhQ==", "requires": { - "@onfido/active-video-capture": "^0.25.1", + "@onfido/active-video-capture": "^0.27.3", "@onfido/opencv": "^1.0.0", "@sentry/browser": "^7.2.0", "blueimp-load-image": "~2.29.0", @@ -66050,7 +66189,7 @@ "hoist-non-react-statics": "^3.3.2", "js-cookie": "^3.0.1", "pdfobject": "^2.2.7", - "preact": "^10.5.13", + "preact": "10.11.3", "redux": "^4.0.5", "socket.io-client": "^4.2.0", "supports-webp": "~1.0.3", @@ -66776,9 +66915,9 @@ "integrity": "sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ==" }, "preact": { - "version": "10.13.2", - "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.2.tgz", - "integrity": "sha512-q44QFLhOhty2Bd0Y46fnYW0gD/cbVM9dUVtNTDKPcdXSMA7jfY+Jpd6rk3GB0lcQss0z5s/6CmVP0Z/hV+g6pw==" + "version": "10.11.3", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.11.3.tgz", + "integrity": "sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==" }, "prelude-ls": { "version": "1.2.1", @@ -68093,9 +68232,9 @@ } }, "react-webcam": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.0.1.tgz", - "integrity": "sha512-8E/Eb/7ksKwn5QdLn67tOR7+TdP9BZdu6E5/DSt20v8yfW/s0VGBigE6VA7R4278mBuBUowovAB3DkCfVmSPvA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/react-webcam/-/react-webcam-7.1.1.tgz", + "integrity": "sha512-2W5WN8wmEv8ZlxvyAlOxVuw6new8Bi7+KSPqoq5oa7z1KSKZ72ucaKqCFRtHSuFjZ5sh5ioS9lp4BGwnaZ6lDg==", "requires": {} }, "read-config-file": { diff --git a/package.json b/package.json index 1868a6f75f83..39de60fed5c5 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "metro-config": "^0.71.3", "moment": "^2.29.4", "moment-timezone": "^0.5.31", - "onfido-sdk-ui": "12.2.1", + "onfido-sdk-ui": "^12.4.0", "process": "^0.11.10", "prop-types": "^15.7.2", "pusher-js": "7.4.0", From a4a3e09356340faec10a5236b07645eed8fdbc40 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Wed, 21 Jun 2023 10:19:28 -0700 Subject: [PATCH 311/826] prettier --- src/components/withViewportOffsetTop.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/withViewportOffsetTop.js b/src/components/withViewportOffsetTop.js index 0a8ed24cade2..538071a948fa 100644 --- a/src/components/withViewportOffsetTop.js +++ b/src/components/withViewportOffsetTop.js @@ -55,7 +55,6 @@ export default function (WrappedComponent) { WithViewportOffsetTop.propTypes = { // eslint-disable-next-line react/forbid-prop-types forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.any})]), - }; WithViewportOffsetTop.defaultProps = { forwardedRef: undefined, From 737f60607906b734ef45f2d4b8244e9bebab988e Mon Sep 17 00:00:00 2001 From: Daraksha Date: Wed, 21 Jun 2023 22:49:33 +0530 Subject: [PATCH 312/826] remove ^ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 39de60fed5c5..8e1a49374f87 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "metro-config": "^0.71.3", "moment": "^2.29.4", "moment-timezone": "^0.5.31", - "onfido-sdk-ui": "^12.4.0", + "onfido-sdk-ui": "12.4.0", "process": "^0.11.10", "prop-types": "^15.7.2", "pusher-js": "7.4.0", From 3d91b47c57593cdd895b2239137a25494e6072d1 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Wed, 21 Jun 2023 19:27:03 +0200 Subject: [PATCH 313/826] add informations about minimal action in docs --- contributingGuides/NAVIGATION.md | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index 6e2b5b779606..7ccd60bc2d82 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -70,3 +70,74 @@ Using [react-freeze](https://github.com/software-mansion/react-freeze) allows us - To keep the navigation state that was present before changing the layout, we save the state on every change and use it for the `initialState` prop. Changing the layout means that every component inside `NavigationContainer` is mounted anew. + +## Why we need to use minimal action in the `linkTo` function + +### The problem +Let's assume that the user wants to navigate like this: + +``` +1. Settings_root - navigate > Profile +2. Profile - UP > Settings_root +3. Settings_root - navigate > About +4. About - browser back button > Settings_root +``` + +Without minimal action, expected behavior won't be achieved and the final screen will be `Profile`. + +Broken behavior is the outcome of two things: +1. Back button in the browser resets the navigation state with the state saved in step two. + +2. `Navigation.navigate` creates action with `getActionFromState` dispatched high in the hierarchy. + +The reason why `getActionFromState` provided by `react-navigation` is dispatched high in hierarchy is that it doesn't know about current navigation state, only about desired one. + +In this example it doesn't know if the `RightModalNavigator` and `Settings` are already mounted. + + +The action for the first step looks like that: +```json +{ + "type": "NAVIGATE", + "payload": { + "name": "RightModalNavigator", + "params": { + "initial": true, + "screen": "Settings", + "params": { + "initial": true, + "screen": "Profile", + "path": "/settings/profile" + } + } + } +} +``` + + +That means, the params for the `RightModalNavigator` and `Settings` (also a navigator) will be filled with the information that we want to navigate to the `Profile` screen. + +This information will stay here even if we pop the `Profile` screen and navigate to `About` screen. + +Later on, when the user presses the browser back button expecting that the `Settings_root` screen will appear, the navigation state will be reset with information about the `Profile` screen in the params and this will be used as a source of truth for the navigation. + +### The solution + +If we can create simple action that will only push one screen to the existing navigator, we won't fill any params of the navigators. + +The `getMinimalAction` compares action generated by the `getActionFromState` with the current navigation state and tries to find a simpler action. + +The action for the first step created with `getMinimalAction` looks like this: + +```json +{ + "type": "NAVIGATE", + "payload": { + "name": "Settings_Profile" + }, + "target": "Settings-stack-key-xyz" +} +``` + +### Deeplinking +There is no minimal action for deeplinking directly to the `Profile` screen. But because the `Settings_root` is not on the stack, pressing UP will reset the params for navigators to the correct ones. \ No newline at end of file From 7fe01d4d417c32d54d31417904c297606944bff6 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Wed, 21 Jun 2023 19:32:44 +0200 Subject: [PATCH 314/826] make adjustments to the linkTo --- src/libs/Navigation/linkTo.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 735eaf040e66..3bf226a229c9 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -6,12 +6,7 @@ import getTopmostReportId from './getTopmostReportId'; import getStateFromPath from './getStateFromPath'; /** - * Find minimal action for RHP. - * This is necessary because getActionFromState doesn't take into consideration current navigation state. - * That means that even if we want to open profile screen and the settings flow is currently opened, the target will be RHPNavigator and the payload will include whole structure. - * That causes unexpected behaviour when clicking browser back in some of the RHP flows. - * - * To avoid that we are looking for the smallest possible action. In this case it will be push profile screen and the target will be the settings navigator. + * Motivation for this function is described in NAVIGATION.md * * @param {Object} action action generated by getActionFromState * @param {Object} state The root state @@ -29,6 +24,7 @@ function getMinimalAction(action, state) { currentState = currentState.routes[currentState.index].state; currentTargetKey = currentState.key; + // Creating new smaller action currentAction = { type: currentAction.type, @@ -77,7 +73,6 @@ export default function linkTo(navigation, path, type) { } } - // We want to look for minimal action only for RHP screens if (action.payload.name === NAVIGATORS.RIGHT_MODAL_NAVIGATOR) { const {minimalAction, targetName} = getMinimalAction(action, navigation.getRootState()); if (minimalAction) { From 0057e5a37e5065236389a274deb7fad43d7a38cd Mon Sep 17 00:00:00 2001 From: tienifr Date: Thu, 22 Jun 2023 00:33:06 +0700 Subject: [PATCH 315/826] resolve review --- src/pages/home/report/ContextMenu/ContextMenuActions.js | 2 +- src/pages/home/report/ReportActionItem.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 099248df1b5f..115c2ac1e8e1 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -112,7 +112,7 @@ export default [ icon: Expensicons.ChatBubble, successTextTranslateKey: '', successIcon: null, - shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isParentReport) => + shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, isParentReport) => type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !isParentReport, onPress: (closePopover, {reportAction, reportID}) => { Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index c7ea21e78ba8..b96bc67bc292 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -187,7 +187,8 @@ function ReportActionItem(props) { toggleContextMenuFromActiveReportAction, ReportUtils.isArchivedRoom(props.report), ReportUtils.chatIncludesChronos(props.report), - null, + undefined, + undefined, props.isParentReport, ); }, From 1a96834c81ad0897ec2cd852a6317a9f3d06b150 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Wed, 21 Jun 2023 17:40:09 +0200 Subject: [PATCH 316/826] disable KeyboardAvoidingView for not focused ReportScreens --- src/pages/home/ReportScreen.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index d3fb665ecb48..6eae3ff66503 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -248,7 +248,10 @@ class ReportScreen extends React.Component { const policy = this.props.policies[`${ONYXKEYS.COLLECTION.POLICY}${this.props.report.policyID}`]; return ( - + Date: Wed, 21 Jun 2023 23:23:13 +0530 Subject: [PATCH 317/826] Use useMemo hook --- src/pages/NewChatPage.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pages/NewChatPage.js b/src/pages/NewChatPage.js index 7585c979b2b4..e6f0472241dc 100755 --- a/src/pages/NewChatPage.js +++ b/src/pages/NewChatPage.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useState, useEffect} from 'react'; +import React, {useState, useEffect, useMemo} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; @@ -61,7 +61,7 @@ function NewChatPage(props) { ); const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); - function getSections() { + const sections = useMemo(() => { const sectionsList = []; let indexOffset = 0; @@ -111,7 +111,8 @@ function NewChatPage(props) { } return sectionsList; - } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [filteredPersonalDetails, filteredRecentReports, filteredUserToInvite, maxParticipantsReached, props.isGroupChat, selectedOptions]); const updateOptionsWithSearchTerm = (newSearchTerm = '') => { const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( @@ -184,8 +185,6 @@ function NewChatPage(props) { // eslint-disable-next-line react-hooks/exhaustive-deps }, [props.reports, props.personalDetails]); - const sections = getSections(); - return ( Date: Wed, 21 Jun 2023 20:53:35 +0300 Subject: [PATCH 318/826] migrate to functional component --- src/components/ImageWithSizeCalculation.js | 88 +++++++++------------- 1 file changed, 37 insertions(+), 51 deletions(-) diff --git a/src/components/ImageWithSizeCalculation.js b/src/components/ImageWithSizeCalculation.js index 0f5cbf3d1e51..1e7838d1c8ce 100644 --- a/src/components/ImageWithSizeCalculation.js +++ b/src/components/ImageWithSizeCalculation.js @@ -1,4 +1,4 @@ -import React, {PureComponent} from 'react'; +import React, {useState, useRef} from 'react'; import {View} from 'react-native'; import PropTypes from 'prop-types'; import Log from '../libs/Log'; @@ -32,64 +32,50 @@ const defaultProps = { * Image size must be provided by parent via width and height props. Useful for * performing some calculation on a network image after fetching dimensions so * it can be appropriately resized. + * + * @param {Object} props + * @returns {React.Component} + * */ -class ImageWithSizeCalculation extends PureComponent { - constructor(props) { - super(props); +function ImageWithSizeCalculation(props) { + const [isLoading, setIsLoading] = useState(false); + const isLoadedRef = useRef(null); - this.state = { - isLoading: false, - }; + const onError = () => { + Log.hmmm('Unable to fetch image to calculate size', {url: props.url}); + }; - this.imageLoadingStart = this.imageLoadingStart.bind(this); - this.imageLoadingEnd = this.imageLoadingEnd.bind(this); - this.onError = this.onError.bind(this); - this.imageLoadedSuccessfully = this.imageLoadedSuccessfully.bind(this); - } - - onError() { - Log.hmmm('Unable to fetch image to calculate size', {url: this.props.url}); - } - - imageLoadingStart() { - // Return early if the image has already loaded (this can happen when uploading the same image twice on Android) - if (this.isLoaded) { - return; - } - this.setState({isLoading: true}); - } - - imageLoadingEnd() { - this.setState({isLoading: false}); - } - - imageLoadedSuccessfully(event) { - this.isLoaded = true; - this.props.onMeasure({ + const imageLoadedSuccessfully = (event) => { + isLoadedRef.current = true; + props.onMeasure({ width: event.nativeEvent.width, height: event.nativeEvent.height, }); - } + }; - render() { - return ( - - - {this.state.isLoading && } - - ); - } + return ( + + { + if (isLoadedRef.current || isLoading) { + return; + } + setIsLoading(true); + }} + onLoadEnd={() => setIsLoading(false)} + onError={onError} + onLoad={imageLoadedSuccessfully} + /> + {isLoading && } + + ); } ImageWithSizeCalculation.propTypes = propTypes; ImageWithSizeCalculation.defaultProps = defaultProps; -export default ImageWithSizeCalculation; +ImageWithSizeCalculation.displayName = 'ImageWithSizeCalculation'; +export default React.memo(ImageWithSizeCalculation); From 93b51b03c34647ac3052b14c5499e40aa8b06816 Mon Sep 17 00:00:00 2001 From: Matt Moore <46995600+muttmuure@users.noreply.github.com> Date: Wed, 21 Jun 2023 19:11:09 +0100 Subject: [PATCH 319/826] Update Referral-Program.md to show better preview and clarify the steps --- docs/articles/other/Referral-Program.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/articles/other/Referral-Program.md b/docs/articles/other/Referral-Program.md index 1ba3a4b5650b..4a0c6cb98fbc 100644 --- a/docs/articles/other/Referral-Program.md +++ b/docs/articles/other/Referral-Program.md @@ -1,12 +1,12 @@ --- title: Expensify Referral Program -description: using joining links to track them, we'll pay referrers if their referral adopts Expensify. +description: Send your joining link, submit a receipt or invoice and we'll pay you if your referral adopts Expensify. --- # About -Expensify has grown thanks to our users who love Expensify so much that they tell their friends, colleagues, managers, and fellow business founders to use it, too. This is how we’ve acquired more customers than all other expense management companies combined. +Expensify has grown thanks to our users who love Expensify so much that they tell their friends, colleagues, managers, and fellow business founders to use it, too. As a thank you, every time you bring a new user into the platform who directly or indirectly leads to the adoption of a paid annual plan on Expensify, you will earn $250. @@ -14,7 +14,7 @@ As a thank you, every time you bring a new user into the platform who directly o 1. Submit a report or invoice, or share your referral link with anyone you know who is spending too much time on expenses, or works at a company that could benefit from using Expensify. -2. You’ll get $250 for any referred business that commits to an annual subscription, has 2 or more active users, and makes two monthly payments. +2. You will get $250 for any referred business with that person as a paid member that commits to an annual subscription, has 2 or more active users, and makes two monthly payments. That’s right! You can refer anyone working at any company you know. @@ -50,4 +50,4 @@ Please send a message to concierge@expensify.com with the billing owner of the c Expensify members who are opted-in for our newsletters will have received an email containing their unique referral link. -On the mobile app, go to Settings > Invite a Friend > Share Invite Link to retrieve your referral link. +On the mobile app, go to **Settings** > **Invite a Friend** > **Share Invite Link** to retrieve your referral link. From b36f102f95f1727426339a7001590b9f794c3dd2 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Wed, 21 Jun 2023 20:12:26 +0200 Subject: [PATCH 320/826] create patch for the KeyboardAvoidingView --- patches/react-native+0.71.2-alpha.3.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/react-native+0.71.2-alpha.3.patch diff --git a/patches/react-native+0.71.2-alpha.3.patch b/patches/react-native+0.71.2-alpha.3.patch new file mode 100644 index 000000000000..90112ee8f023 --- /dev/null +++ b/patches/react-native+0.71.2-alpha.3.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js +index 2f48f9e..f59beee 100644 +--- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js ++++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js +@@ -128,6 +128,10 @@ class KeyboardAvoidingView extends React.Component { + }; + + _updateBottomIfNecessary = async () => { ++ if (!this.props.enabled) { ++ return; ++ } ++ + if (this._keyboardEvent == null) { + this.setState({bottom: 0}); + return; From 4382c2344463a0d96476d194c288641d664167b8 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Wed, 21 Jun 2023 11:50:37 -0700 Subject: [PATCH 321/826] Revert "[NoQA] Revert "Show the Copilot details if a delegate is set in a report action"" --- src/components/UserDetailsTooltip/index.js | 43 +++++++++++++------ .../userDetailsTooltipPropTypes.js | 8 ++++ src/languages/en.js | 3 ++ src/languages/es.js | 3 ++ .../home/report/ReportActionItemFragment.js | 9 +++- .../home/report/ReportActionItemSingle.js | 25 ++++++++--- 6 files changed, 73 insertions(+), 18 deletions(-) diff --git a/src/components/UserDetailsTooltip/index.js b/src/components/UserDetailsTooltip/index.js index 786531801837..16fdacd8964a 100644 --- a/src/components/UserDetailsTooltip/index.js +++ b/src/components/UserDetailsTooltip/index.js @@ -9,33 +9,49 @@ import Tooltip from '../Tooltip'; import {propTypes, defaultProps} from './userDetailsTooltipPropTypes'; import styles from '../../styles/styles'; import ONYXKEYS from '../../ONYXKEYS'; +import withLocalize from '../withLocalize'; +import compose from '../../libs/compose'; import * as UserUtils from '../../libs/UserUtils'; function UserDetailsTooltip(props) { const userDetails = lodashGet(props.personalDetailsList, props.accountID, props.fallbackUserDetails); + let userDisplayName = userDetails.displayName ? userDetails.displayName.trim() : ''; + let userLogin = (userDetails.login || '').trim() && !_.isEqual(userDetails.login, userDetails.displayName) ? Str.removeSMSDomain(userDetails.login) : ''; + let userAvatar = userDetails.avatar; + let userAccountID = props.accountID; + + // We replace the actor's email, name, and avatar with the Copilot manually for now. This will be improved upon when + // the Copilot feature is implemented. + if (props.delegateAccountID) { + const delegateUserDetails = lodashGet(props.personalDetailsList, props.delegateAccountID, {}); + const delegateUserDisplayName = delegateUserDetails.displayName ? delegateUserDetails.displayName.trim() : ''; + userDisplayName = `${delegateUserDisplayName} (${props.translate('reportAction.asCopilot')} ${userDisplayName})`; + userLogin = delegateUserDetails.login; + userAvatar = delegateUserDetails.avatar; + userAccountID = props.delegateAccountID; + } + const renderTooltipContent = useCallback( () => ( - - {String(userDetails.displayName).trim() ? userDetails.displayName : ''} - + {userDisplayName} - {String(userDetails.login || '').trim() && !_.isEqual(userDetails.login, userDetails.displayName) ? Str.removeSMSDomain(userDetails.login) : ''} + {(userLogin || '').trim() && !_.isEqual(userLogin, userDisplayName) ? Str.removeSMSDomain(userLogin) : ''} ), - [userDetails.avatar, userDetails.displayName, userDetails.login, userDetails.accountID], + [userAvatar, userDisplayName, userLogin, userAccountID], ); - if (!userDetails.displayName && !userDetails.login) { + if (!userDisplayName && !userLogin) { return props.children; } @@ -46,8 +62,11 @@ UserDetailsTooltip.propTypes = propTypes; UserDetailsTooltip.defaultProps = defaultProps; UserDetailsTooltip.displayName = 'UserDetailsTooltip'; -export default withOnyx({ - personalDetailsList: { - key: ONYXKEYS.PERSONAL_DETAILS_LIST, - }, -})(UserDetailsTooltip); +export default compose( + withLocalize, + withOnyx({ + personalDetailsList: { + key: ONYXKEYS.PERSONAL_DETAILS_LIST, + }, + }), +)(UserDetailsTooltip); diff --git a/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js b/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js index 4d34c73ef1ba..0bf0f5f9b7cb 100644 --- a/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js +++ b/src/components/UserDetailsTooltip/userDetailsTooltipPropTypes.js @@ -1,5 +1,6 @@ import PropTypes from 'prop-types'; import personalDetailsPropType from '../../pages/personalDetailsPropType'; +import {withLocalizePropTypes} from '../withLocalize'; const propTypes = { /** User's Account ID */ @@ -17,12 +18,19 @@ const propTypes = { children: PropTypes.node.isRequired, /** List of personalDetails (keyed by accountID) */ personalDetailsList: PropTypes.objectOf(personalDetailsPropType), + + /** The accountID of the copilot who took this action on behalf of the user */ + delegateAccountID: PropTypes.number, + + /** Localization props */ + ...withLocalizePropTypes, }; const defaultProps = { accountID: '', fallbackUserDetails: {displayName: '', login: '', avatar: ''}, personalDetailsList: {}, + delegateAccountID: 0, }; export {propTypes, defaultProps}; diff --git a/src/languages/en.js b/src/languages/en.js index 192d9954e5ff..cfc11029fbec 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -299,6 +299,9 @@ export default { sayHello: 'Say hello!', usePlusButton: '\n\nYou can also use the + button below to send or request money!', }, + reportAction: { + asCopilot: 'as copilot for', + }, mentionSuggestions: { hereAlternateText: 'Notify everyone online in this room', }, diff --git a/src/languages/es.js b/src/languages/es.js index d54fa5110117..f1104899d3d7 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -298,6 +298,9 @@ export default { sayHello: '¡Saluda!', usePlusButton: '\n\n¡También puedes usar el botón + de abajo para enviar o pedir dinero!', }, + reportAction: { + asCopilot: 'como copiloto de', + }, mentionSuggestions: { hereAlternateText: 'Notificar a todos los que estén en linea de esta sala', }, diff --git a/src/pages/home/report/ReportActionItemFragment.js b/src/pages/home/report/ReportActionItemFragment.js index 65558110ba45..010295c0b0d3 100644 --- a/src/pages/home/report/ReportActionItemFragment.js +++ b/src/pages/home/report/ReportActionItemFragment.js @@ -57,6 +57,9 @@ const propTypes = { // Additional styles to add after local styles style: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.object), PropTypes.object]), + /** The accountID of the copilot who took this action on behalf of the user */ + delegateAccountID: PropTypes.number, + ...windowDimensionsPropTypes, /** localization props */ @@ -75,6 +78,7 @@ const defaultProps = { isSingleLine: false, source: '', style: [], + delegateAccountID: 0, }; function ReportActionItemFragment(props) { @@ -145,7 +149,10 @@ function ReportActionItemFragment(props) { } case 'TEXT': return ( - + { function ReportActionItemSingle(props) { const actorEmail = lodashGet(props.action, 'actorEmail', '').replace(CONST.REGEX.MERGED_ACCOUNT_PREFIX, ''); const actorAccountID = props.action.actorAccountID; - const {avatar, displayName, pendingFields} = props.personalDetailsList[actorAccountID] || {}; - const avatarSource = UserUtils.getAvatar(avatar, actorAccountID); + let {avatar, displayName} = props.personalDetailsList[actorAccountID] || {}; + const {pendingFields} = props.personalDetailsList[actorAccountID] || {}; + + // We replace the actor's email, name, and avatar with the Copilot manually for now. This will be improved upon when + // the Copilot feature is implemented. + if (props.action.delegateAccountID) { + const delegateDetails = props.personalDetailsList[props.action.delegateAccountID]; + const delegateDisplayName = delegateDetails.displayName; + displayName = `${delegateDisplayName} (${props.translate('reportAction.asCopilot')} ${displayName})`; + avatar = delegateDetails.avatar; + } + + const avatarSource = UserUtils.getAvatar(avatar, props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID); // Since the display name for a report action message is delivered with the report history as an array of fragments // we'll need to take the displayName from personal details and have it be in the same format for now. Eventually, @@ -90,7 +101,7 @@ function ReportActionItemSingle(props) { style={[styles.alignSelfStart, styles.mr3]} onPressIn={ControlSelection.block} onPressOut={ControlSelection.unblock} - onPress={() => showUserDetails(actorAccountID)} + onPress={() => showUserDetails(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID)} accessibilityLabel={actorEmail} accessibilityRole="button" > @@ -104,7 +115,10 @@ function ReportActionItemSingle(props) { noMargin /> ) : ( - + showUserDetails(actorAccountID)} + onPress={() => showUserDetails(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID)} accessibilityLabel={actorEmail} accessibilityRole="button" > @@ -133,6 +147,7 @@ function ReportActionItemSingle(props) { fragment={fragment} isAttachment={props.action.isAttachment} isLoading={props.action.isLoading} + delegateAccountID={props.action.delegateAccountID} isSingleLine /> ))} From 7e82c8a2aee63bb908c759c49b4c8ba0d7bda5a0 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 11:57:04 -0700 Subject: [PATCH 322/826] Remove unnecessary safety check --- .../javascript/createOrUpdateStagingDeploy/index.js | 7 +------ .../actions/javascript/getDeployPullRequestList/index.js | 7 +------ .github/libs/GitUtils.js | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 21384504a841..cc9fc6acfa6f 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -249,12 +249,7 @@ function getValidMergedPRs(commits) { return; } - const message = commit.subject; - if (!_.isString(message)) { - return; - } - - const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + const match = commit.subject.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); if (!_.isArray(match) || match.length < 2) { return; } diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 17a7b2cff381..ec9d401a56db 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -184,12 +184,7 @@ function getValidMergedPRs(commits) { return; } - const message = commit.subject; - if (!_.isString(message)) { - return; - } - - const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + const match = commit.subject.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); if (!_.isArray(match) || match.length < 2) { return; } diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index c5a343a97b3b..b97855041dec 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -59,12 +59,7 @@ function getValidMergedPRs(commits) { return; } - const message = commit.subject; - if (!_.isString(message)) { - return; - } - - const match = message.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); + const match = commit.subject.match(/Merge pull request #(\d+) from (?!Expensify\/.*-cherry-pick-staging)/); if (!_.isArray(match) || match.length < 2) { return; } From 13ac67c1dce3d5426bf8bed6a39ecf79b35da612 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Wed, 21 Jun 2023 12:04:56 -0700 Subject: [PATCH 323/826] PR comments --- src/pages/settings/LoungeAccessPage.js | 37 +++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index 5b49507cf8fc..9361902d6170 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -18,21 +18,22 @@ const propTypes = { ...windowDimensionsPropTypes, }; +const menuItems = [ + { + translationKey: 'loungeAccessPage.coffeePromo', + icon: Illustrations.CoffeeMug, + }, + { + translationKey: 'loungeAccessPage.networkingPromo', + icon: Illustrations.ChatBubbles, + }, + { + translationKey: 'loungeAccessPage.viewsPromo', + icon: Illustrations.SanFrancisco, + }, +]; + function LoungeAccessPage(props) { - const menuItems = [ - { - translationKey: 'loungeAccessPage.coffeePromo', - icon: Illustrations.CoffeeMug, - }, - { - translationKey: 'loungeAccessPage.networkingPromo', - icon: Illustrations.ChatBubbles, - }, - { - translationKey: 'loungeAccessPage.viewsPromo', - icon: Illustrations.SanFrancisco, - }, - ]; const illustrationStyle = props.isSmallScreenWidth ? { width: props.windowWidth, @@ -48,18 +49,18 @@ function LoungeAccessPage(props) { title={props.translate('loungeAccessPage.loungeAccess')} onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)} /> - - + + - + {props.translate('loungeAccessPage.headline')} - {props.translate('loungeAccessPage.description')} + {props.translate('loungeAccessPage.description')} {_.map(menuItems, (item) => ( Date: Wed, 21 Jun 2023 12:05:59 -0700 Subject: [PATCH 324/826] prettier --- src/languages/es.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/languages/es.js b/src/languages/es.js index 0ffb11ac1301..97f3a9e3c88b 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -411,7 +411,8 @@ export default { loungeAccessPage: { loungeAccess: 'Acceso al lounge', headline: 'Podrás acceder a nuestras salas vip exclusivas.', - description: 'La sala vip Expensify es el punto de encuentro entre una “sala vip de aeropuerto de alta gama” y un vibrante “espacio de co-working” optimizado para personas con ideas afines.', + description: + 'La sala vip Expensify es el punto de encuentro entre una “sala vip de aeropuerto de alta gama” y un vibrante “espacio de co-working” optimizado para personas con ideas afines.', coffeePromo: 'Buen café y buenos cócteles', networkingPromo: 'Conecta con otros miembros', viewsPromo: 'Increíbles vistas de San Francisco', From 8a4ffcf2074bd85dcb2ad723b1a1b795efdeef23 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 12:06:03 -0700 Subject: [PATCH 325/826] Update comments for branch dance --- .github/workflows/finishReleaseCycle.yml | 10 ++++++++++ .github/workflows/preDeploy.yml | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index e5bb97fc086f..4655707806ee 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -67,10 +67,15 @@ jobs: - name: Update production branch run: | + # Get the production branch locally git switch production + + # Delete the production branch and re-create it from staging git switch staging git branch -D production git switch -c production + + # Force-update push the new production branch. git push --force origin production # Create a new patch version to prep for next release cycle @@ -98,10 +103,15 @@ jobs: - name: Update staging branch to trigger staging deploy run: | + # Get the staging branch locally git switch staging + + # Delete the staging branch and re-create it from main git switch main git branch -D staging git switch -c staging + + # Force-update the updated staging branch git push --force origin staging # Create a local git tag so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 8814c593afbf..094c7215764e 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -99,10 +99,15 @@ jobs: - name: Update staging branch from main run: | + # Get the staging branch locally git switch staging + + # Delete the staging branch and re-create it from main git switch main git branch -D staging git switch -c staging + + # Force-update the remote staging branch git push --force origin staging - name: Cherry-pick PR to staging From d84db7bc0f8bc147f75932993324e3994047c956 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 12:16:37 -0700 Subject: [PATCH 326/826] Eliminate race condition in finishReleaseCycle --- .github/workflows/finishReleaseCycle.yml | 33 ++++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index 4655707806ee..129a135e0050 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -9,10 +9,8 @@ jobs: validate: runs-on: ubuntu-latest if: contains(github.event.issue.labels.*.name, 'StagingDeployCash') - outputs: isValid: ${{ fromJSON(steps.validateActor.outputs.isTeamMember) && !fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }} - steps: - name: Validate actor is deployer id: validateActor @@ -50,6 +48,11 @@ jobs: This issue either has unchecked items or has not yet been marked with the `:shipit:` emoji of approval. Reopening! + - if: ${{ failure() }} + uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main + with: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + # Update the production branch to trigger the production deploy. updateProduction: runs-on: ubuntu-latest @@ -78,6 +81,11 @@ jobs: # Force-update push the new production branch. git push --force origin production + - if: ${{ failure() }} + uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main + with: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + # Create a new patch version to prep for next release cycle createNewPatchVersion: needs: validate @@ -87,10 +95,10 @@ jobs: with: SEMVER_LEVEL: PATCH - # Deploy deferred PRs to staging and create a new StagingDeployCash for the next release cycle. - createNewStagingDeployCash: + # Update the staging branch to trigger a staging deploy + updateStaging: runs-on: ubuntu-latest - needs: createNewPatchVersion + needs: [updateProduction, createNewPatchVersion] steps: - uses: actions/checkout@v3 with: @@ -114,6 +122,21 @@ jobs: # Force-update the updated staging branch git push --force origin staging + - if: ${{ failure() }} + uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main + with: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + + # Deploy deferred PRs to staging and create a new StagingDeployCash for the next release cycle. + createNewStagingDeployCash: + runs-on: ubuntu-latest + needs: updateStaging + steps: + - uses: actions/checkout@v3 + with: + ref: staging + token: ${{ secrets.OS_BOTIFY_TOKEN }} + # Create a local git tag so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a # list of pull requests that were merged between this version tag and another. # NOTE: This tag is only used locally and shouldn't be pushed to the remote. From 10d42834b60c2e42b3d5d855151ca0c4f65f9ebf Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Wed, 21 Jun 2023 21:17:56 +0200 Subject: [PATCH 327/826] Add isMounted state to OptionRowLHN and updated useEffect logic --- src/components/LHNOptionsList/OptionRowLHN.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index accf0b2b79b1..24179a03a59e 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useEffect} from 'react'; +import React, {useEffect, useState} from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; import lodashGet from 'lodash/get'; @@ -66,16 +66,16 @@ const defaultProps = { function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); + const [isMounted, setIsMounted] = useState(false); + useEffect(() => { - const updateReportDraft = () => { - if (!optionItem || optionItem.hasDraftComment || !props.comment || props.comment.length <= 0 || props.isFocused) { - return; - } - Report.setReportWithDraft(props.reportID, true); - }; + if (isMounted || !optionItem) return; + setIsMounted(true); - updateReportDraft(); - }, [optionItem, props.comment, props.isFocused, props.reportID]); + if (!optionItem.hasDraftComment && props.comment && props.comment.length > 0 && !props.isFocused) { + Report.setReportWithDraft(props.reportID, true); + } + }, [optionItem, props.comment, props.isFocused, props.reportID, isMounted]); if (!optionItem) { return null; From f1313cb982b70bd76bb0907d0f7f10a217d20932 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Wed, 21 Jun 2023 15:26:29 -0400 Subject: [PATCH 328/826] wait for the navigation container to be ready before navigating --- .../subscribeToReportCommentPushNotifications.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js index 905397da1738..7c8caeb87466 100644 --- a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js +++ b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js @@ -1,6 +1,4 @@ -import {Linking} from 'react-native'; import Onyx from 'react-native-onyx'; -import CONST from '../../../CONST'; import PushNotification from '.'; import ROUTES from '../../../ROUTES'; import Log from '../../Log'; @@ -17,16 +15,13 @@ export default function subscribeToReportCommentPushNotifications() { // Open correct report when push notification is clicked PushNotification.onSelected(PushNotification.TYPE.REPORT_COMMENT, ({reportID}) => { - if (Navigation.canNavigate('navigate')) { + Navigation.isNavigationReady().then(() => { // If a chat is visible other than the one we are trying to navigate to, then we need to navigate back if (Navigation.getActiveRoute().slice(1, 2) === ROUTES.REPORT && !Navigation.isActiveRoute(`r/${reportID}`)) { Navigation.goBack(); } + Navigation.navigate(ROUTES.getReportRoute(reportID)); - } else { - // Navigation container is not yet ready, use deeplinking to open to correct report instead - Navigation.setDidTapNotification(); - Linking.openURL(`${CONST.DEEPLINK_BASE_URL}${ROUTES.getReportRoute(reportID)}`); - } + }); }); } From 9e7036a3d696d352230cf183e510b741e3fcbbc3 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Wed, 21 Jun 2023 15:32:49 -0400 Subject: [PATCH 329/826] fix navigation ready callback by using onStateChange --- src/Expensify.js | 8 +------- src/libs/Navigation/NavigationRoot.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Expensify.js b/src/Expensify.js index e7c830ff2029..c774371dfcfd 100644 --- a/src/Expensify.js +++ b/src/Expensify.js @@ -23,7 +23,6 @@ import compose from './libs/compose'; import withLocalize, {withLocalizePropTypes} from './components/withLocalize'; import * as User from './libs/actions/User'; import NetworkConnection from './libs/NetworkConnection'; -import Navigation from './libs/Navigation/Navigation'; import DeeplinkWrapper from './components/DeeplinkWrapper'; import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu'; import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu'; @@ -111,12 +110,7 @@ function Expensify(props) { ActiveClientManager.init(); }; - const setNavigationReady = useCallback(() => { - setIsNavigationReady(true); - - // Navigate to any pending routes now that the NavigationContainer is ready - Navigation.setIsNavigationReady(); - }, []); + const setNavigationReady = useCallback(() => setIsNavigationReady(true), []); const onSplashHide = useCallback(() => { setIsSplashHidden(true); diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 4f32178ba5bd..b8b82706a4c4 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -48,18 +48,25 @@ function parseAndLogRoute(state) { } else { Log.info('Navigating to route', false, {path: currentPath}); } - - Navigation.setIsNavigationReady(); } function NavigationRoot(props) { useFlipper(navigationRef); const navigationStateRef = useRef(undefined); + const onReadyCalled = useRef(false); const updateSavedNavigationStateAndLogRoute = (state) => { navigationStateRef.current = state; props.updateCurrentReportId(state); parseAndLogRoute(state); + + // NavigationContainer's onReady callback is unreliable (it will fire but navigationRef.isReady() will still be false) + // So we use this onStateChange callback instead + if (!onReadyCalled.current) { + Navigation.setIsNavigationReady(); + props.onReady(); + onReadyCalled.current = true; + } }; return ( @@ -67,7 +74,6 @@ function NavigationRoot(props) { key={props.isSmallScreenWidth ? 'small' : 'big'} onStateChange={updateSavedNavigationStateAndLogRoute} initialState={navigationStateRef.current} - onReady={props.onReady} theme={navigationTheme} ref={navigationRef} linking={linkingConfig} From 73005a44e47449b1026e4b28fb33fe71780dd6a9 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Wed, 21 Jun 2023 15:53:26 -0400 Subject: [PATCH 330/826] improve logging for notification handling --- .../subscribeToReportCommentPushNotifications.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js index 7c8caeb87466..d6ba39095ce7 100644 --- a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js +++ b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js @@ -8,19 +8,25 @@ import Navigation from '../../Navigation/Navigation'; * Setup reportComment push notification callbacks. */ export default function subscribeToReportCommentPushNotifications() { - PushNotification.onReceived(PushNotification.TYPE.REPORT_COMMENT, ({reportID, onyxData}) => { - Log.info('[Report] Handled event sent by Airship', false, {reportID}); + PushNotification.onReceived(PushNotification.TYPE.REPORT_COMMENT, ({reportID, reportActionID, onyxData}) => { + Log.info('[PushNotification] Handled event sent by Airship', false, {reportID, reportActionID}); Onyx.update(onyxData); }); // Open correct report when push notification is clicked - PushNotification.onSelected(PushNotification.TYPE.REPORT_COMMENT, ({reportID}) => { + PushNotification.onSelected(PushNotification.TYPE.REPORT_COMMENT, ({reportID, reportActionID}) => { + if (!reportID) { + Log.warn('[PushNotification] This push notification has no reportID'); + } + + Log.info('[PushNotification] onSelected() - called', false, {reportID, reportActionID}); Navigation.isNavigationReady().then(() => { // If a chat is visible other than the one we are trying to navigate to, then we need to navigate back if (Navigation.getActiveRoute().slice(1, 2) === ROUTES.REPORT && !Navigation.isActiveRoute(`r/${reportID}`)) { Navigation.goBack(); } + Log.info('[PushNotification] onSelected() - Navigation is ready. Navigating...', false, {reportID, reportActionID}); Navigation.navigate(ROUTES.getReportRoute(reportID)); }); }); From d6bb512c1ed6b58c90d744011a1599645bc0833b Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 13:52:38 -0700 Subject: [PATCH 331/826] Add CONST for OSBotify --- .github/libs/GitUtils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index b97855041dec..3ad50a02f5e9 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -1,5 +1,6 @@ const _ = require('underscore'); const {spawn} = require('child_process'); +const CONST = require('./CONST'); const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); /** @@ -55,7 +56,7 @@ function getValidMergedPRs(commits) { const mergedPRs = new Set(); _.each(commits, (commit) => { const author = commit.authorName; - if (author === 'OSBotify') { + if (author === CONST.OS_BOTIFY) { return; } From 21407608681eb4a3639e437ebfa59258b028cbf6 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 14:04:00 -0700 Subject: [PATCH 332/826] Fetch refs if needed from GitUtils so fetch-depth: 0 is not needed --- .../createOrUpdateStagingDeploy/index.js | 25 +++++++++++++++++-- .../getDeployPullRequestList/index.js | 25 +++++++++++++++++-- .github/libs/GitUtils.js | 22 +++++++++++++++- 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index b785ad96b369..737e5b1fd0fc 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -213,9 +213,27 @@ module.exports = CONST; /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const _ = __nccwpck_require__(3571); -const {spawn} = __nccwpck_require__(3129); +const {spawn, execSync} = __nccwpck_require__(3129); +const CONST = __nccwpck_require__(4097); const sanitizeStringForJSONParse = __nccwpck_require__(9338); +/** + * @param {String} ref + */ +function fetchRefIfNeeded(ref) { + try { + console.log(`Checking if ref ${ref} exists locally`); + const command = `git rev-parse --verify ${ref}`; + console.log(`Running command: ${command}`); + execSync(command); + } catch (e) { + console.log(`Ref ${ref} not found locally, attempting to fetch it.`); + const command = `git fetch ${ref}`; + console.log(`Running command: ${command}`); + execSync(command); + } +} + /** * Get merge logs between two refs (inclusive) as a JavaScript object. * @@ -224,6 +242,9 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { + fetchRefIfNeeded(fromRef); + fetchRefIfNeeded(toRef); + console.log('Getting pull requests merged between the following refs:', fromRef, toRef); return new Promise((resolve, reject) => { let stdout = ''; @@ -269,7 +290,7 @@ function getValidMergedPRs(commits) { const mergedPRs = new Set(); _.each(commits, (commit) => { const author = commit.authorName; - if (author === 'OSBotify') { + if (author === CONST.OS_BOTIFY) { return; } diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index c376362fb6f9..166bcaa4e7b4 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -147,9 +147,27 @@ module.exports = CONST; /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const _ = __nccwpck_require__(3571); -const {spawn} = __nccwpck_require__(3129); +const {spawn, execSync} = __nccwpck_require__(3129); +const CONST = __nccwpck_require__(4097); const sanitizeStringForJSONParse = __nccwpck_require__(9338); +/** + * @param {String} ref + */ +function fetchRefIfNeeded(ref) { + try { + console.log(`Checking if ref ${ref} exists locally`); + const command = `git rev-parse --verify ${ref}`; + console.log(`Running command: ${command}`); + execSync(command); + } catch (e) { + console.log(`Ref ${ref} not found locally, attempting to fetch it.`); + const command = `git fetch ${ref}`; + console.log(`Running command: ${command}`); + execSync(command); + } +} + /** * Get merge logs between two refs (inclusive) as a JavaScript object. * @@ -158,6 +176,9 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { + fetchRefIfNeeded(fromRef); + fetchRefIfNeeded(toRef); + console.log('Getting pull requests merged between the following refs:', fromRef, toRef); return new Promise((resolve, reject) => { let stdout = ''; @@ -203,7 +224,7 @@ function getValidMergedPRs(commits) { const mergedPRs = new Set(); _.each(commits, (commit) => { const author = commit.authorName; - if (author === 'OSBotify') { + if (author === CONST.OS_BOTIFY) { return; } diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 3ad50a02f5e9..9937e2dc6db4 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -1,8 +1,25 @@ const _ = require('underscore'); -const {spawn} = require('child_process'); +const {spawn, execSync} = require('child_process'); const CONST = require('./CONST'); const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); +/** + * @param {String} ref + */ +function fetchRefIfNeeded(ref) { + try { + console.log(`Checking if ref ${ref} exists locally`); + const command = `git rev-parse --verify ${ref}`; + console.log(`Running command: ${command}`); + execSync(command); + } catch (e) { + console.log(`Ref ${ref} not found locally, attempting to fetch it.`); + const command = `git fetch ${ref}`; + console.log(`Running command: ${command}`); + execSync(command); + } +} + /** * Get merge logs between two refs (inclusive) as a JavaScript object. * @@ -11,6 +28,9 @@ const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromRef, toRef) { + fetchRefIfNeeded(fromRef); + fetchRefIfNeeded(toRef); + console.log('Getting pull requests merged between the following refs:', fromRef, toRef); return new Promise((resolve, reject) => { let stdout = ''; From e68034366cac8573650babc6f453d09972406852 Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 14:09:32 -0700 Subject: [PATCH 333/826] Add dependency for createNewStagingDeployCash --- .github/workflows/finishReleaseCycle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index 129a135e0050..9e748d5983e9 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -130,7 +130,7 @@ jobs: # Deploy deferred PRs to staging and create a new StagingDeployCash for the next release cycle. createNewStagingDeployCash: runs-on: ubuntu-latest - needs: updateStaging + needs: [updateStaging, createNewPatchVersion] steps: - uses: actions/checkout@v3 with: From 93b0bd536745b0b4e7b4f293312b73bd92b65ddb Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 21 Jun 2023 14:31:39 -0700 Subject: [PATCH 334/826] Update confusing comment --- .github/workflows/finishReleaseCycle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index 9e748d5983e9..bd7a4eea8ab6 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -127,7 +127,7 @@ jobs: with: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - # Deploy deferred PRs to staging and create a new StagingDeployCash for the next release cycle. + # Create a new StagingDeployCash for the next release cycle. createNewStagingDeployCash: runs-on: ubuntu-latest needs: [updateStaging, createNewPatchVersion] From 9eaac3a4593953d44297d21742872cf3eda7b9df Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Wed, 21 Jun 2023 16:01:44 -0700 Subject: [PATCH 335/826] using isThread --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 8274ef1eb12c..67a495c7248f 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -540,7 +540,7 @@ function isThread(report) { * @returns {Boolean} */ function isChatThread(report) { - return Boolean(report && report.parentReportID && report.parentReportActionID && report.type === CONST.REPORT.TYPE.CHAT); + return isThread && report.type === CONST.REPORT.TYPE.CHAT; } /** From 0fd20ae2d72066667550e2ba02b06db230fbb55d Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Thu, 22 Jun 2023 04:08:17 +0500 Subject: [PATCH 336/826] feat: wrap contact method validate function inside a callback --- src/pages/settings/Profile/Contacts/NewContactMethodPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index af339132d192..7d8ffdcade53 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -75,7 +75,7 @@ function NewContactMethodPage(props) { return ''; }; - const validate = (values) => { + const validate = React.useCallback((values) => { const phoneLogin = getPhoneLogin(values.phoneOrEmail); const validateIfnumber = validateNumber(phoneLogin); @@ -98,7 +98,7 @@ function NewContactMethodPage(props) { } return errors; - }; + }, [props.betas, props.loginList]); const addNewContactMethod = (values) => { const phoneLogin = getPhoneLogin(values.phoneOrEmail); From edb7a486f15fb4ad14269829e29ed2d29bc78827 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Wed, 21 Jun 2023 16:19:06 -0700 Subject: [PATCH 337/826] rename to parentNavigationSubtitle --- src/components/AvatarWithDisplayName.js | 6 +++--- src/libs/ReportUtils.js | 6 +++--- src/pages/home/HeaderView.js | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/AvatarWithDisplayName.js b/src/components/AvatarWithDisplayName.js index b5de99514b42..152eaadcf709 100644 --- a/src/components/AvatarWithDisplayName.js +++ b/src/components/AvatarWithDisplayName.js @@ -55,12 +55,12 @@ const defaultProps = { function AvatarWithDisplayName(props) { const title = props.isAnonymous ? props.report.displayName : ReportUtils.getDisplayNameForParticipant(props.report.ownerAccountID, true); const subtitle = ReportUtils.getChatRoomSubtitle(props.report); + const parentNavigationSubtitle = ReportUtils.getParentNavigationSubtitle(props.report); const isExpenseReport = ReportUtils.isExpenseReport(props.report); const icons = ReportUtils.getIcons(props.report, props.personalDetails, props.policies); const ownerPersonalDetails = OptionsListUtils.getPersonalDetailsForAccountIDs([props.report.ownerAccountID], props.personalDetails); const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips(_.values(ownerPersonalDetails), false); const avatarContainerStyle = StyleUtils.getEmptyAvatarStyle(props.size) || styles.emptyAvatar; - const subtitleLink = ReportUtils.getChatRoomSubtitleLink(props.report); return ( {Boolean(props.report && title) && ( @@ -92,7 +92,7 @@ function AvatarWithDisplayName(props) { textStyles={[props.isAnonymous ? styles.headerAnonymousFooter : styles.headerText, styles.pre]} shouldUseFullTitle={isExpenseReport || props.isAnonymous} /> - {!_.isEmpty(subtitleLink) && ( + {!_.isEmpty(parentNavigationSubtitle) && ( { Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); @@ -104,7 +104,7 @@ function AvatarWithDisplayName(props) { style={[styles.optionAlternateText, styles.textLabelSupporting, styles.link]} numberOfLines={1} > - {subtitleLink} + {parentNavigationSubtitle} )} diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 67a495c7248f..4a816731d4aa 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1101,11 +1101,11 @@ function getChatRoomSubtitle(report) { } /** - * Get the subtitle link for the report + * Gets the parent navigation subtitle for the report * @param {Object} report * @returns {String} */ -function getChatRoomSubtitleLink(report) { +function getParentNavigationSubtitle(report) { if (isThread(report)) { const parentReport = lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`]); const {rootReportName, workspaceName} = getRootReportAndWorkspaceName(parentReport); @@ -2283,7 +2283,7 @@ export { isUserCreatedPolicyRoom, isChatRoom, getChatRoomSubtitle, - getChatRoomSubtitleLink, + getParentNavigationSubtitle, getPolicyName, getPolicyType, isArchivedRoom, diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 685bd21c2ad6..030f4eef5e18 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -90,7 +90,7 @@ function HeaderView(props) { const reportHeaderData = !isTaskReport && !isChatThread && props.report.parentReportID ? props.parentReport : props.report; const title = ReportUtils.getReportName(reportHeaderData); const subtitle = ReportUtils.getChatRoomSubtitle(reportHeaderData); - const subtitleLink = ReportUtils.getChatRoomSubtitleLink(reportHeaderData); + const parentNavigationSubtitle = ReportUtils.getParentNavigationSubtitle(reportHeaderData); const isConcierge = participants.length === 1 && _.contains(participants, CONST.ACCOUNT_ID.CONCIERGE); const isAutomatedExpensifyAccount = participants.length === 1 && ReportUtils.hasAutomatedExpensifyAccountIDs(participants); const guideCalendarLink = lodashGet(props.account, 'guideCalendarLink'); @@ -187,19 +187,19 @@ function HeaderView(props) { textStyles={[styles.headerText, styles.pre]} shouldUseFullTitle={isChatRoom || isPolicyExpenseChat || isChatThread || isTaskReport} /> - {!_.isEmpty(subtitleLink) && ( + {!_.isEmpty(parentNavigationSubtitle) && ( { Navigation.navigate(ROUTES.getReportRoute(props.report.parentReportID)); }} - accessibilityLabel={subtitleLink} + accessibilityLabel={parentNavigationSubtitle} accessibilityRole="link" > - {subtitleLink} + {parentNavigationSubtitle} )} From f09d106fa5fc85d022e226d03c3bb993f65515ea Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Wed, 21 Jun 2023 16:39:24 -0700 Subject: [PATCH 338/826] logic correction --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index e93804e8eb18..97559e520940 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -540,7 +540,7 @@ function isThread(report) { * @returns {Boolean} */ function isChatThread(report) { - return isThread && report.type === CONST.REPORT.TYPE.CHAT; + return isThread(report) && report.type === CONST.REPORT.TYPE.CHAT; } /** From 5013992a892477b298f845bcb7e54e0e7e80bed2 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Thu, 22 Jun 2023 04:42:26 +0500 Subject: [PATCH 339/826] feat: fix lint errors --- .../Profile/Contacts/NewContactMethodPage.js | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index 7d8ffdcade53..f9776ebd1111 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -75,30 +75,33 @@ function NewContactMethodPage(props) { return ''; }; - const validate = React.useCallback((values) => { - const phoneLogin = getPhoneLogin(values.phoneOrEmail); - const validateIfnumber = validateNumber(phoneLogin); + const validate = React.useCallback( + (values) => { + const phoneLogin = getPhoneLogin(values.phoneOrEmail); + const validateIfnumber = validateNumber(phoneLogin); - const errors = {}; + const errors = {}; - if (_.isEmpty(values.phoneOrEmail)) { - ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.contactMethodRequired'); - } + if (_.isEmpty(values.phoneOrEmail)) { + ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.contactMethodRequired'); + } - if (!_.isEmpty(values.phoneOrEmail) && !(parsePhoneNumber(phoneLogin).possible || Str.isValidEmail(values.phoneOrEmail))) { - ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.invalidContactMethod'); - } + if (!_.isEmpty(values.phoneOrEmail) && !(parsePhoneNumber(phoneLogin).possible || Str.isValidEmail(values.phoneOrEmail))) { + ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.invalidContactMethod'); + } - if (!_.isEmpty(values.phoneOrEmail) && lodashGet(props.loginList, validateIfnumber || values.phoneOrEmail.toLowerCase())) { - ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.enteredMethodIsAlreadySubmited'); - } + if (!_.isEmpty(values.phoneOrEmail) && lodashGet(props.loginList, validateIfnumber || values.phoneOrEmail.toLowerCase())) { + ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.enteredMethodIsAlreadySubmited'); + } - if (!Permissions.canUsePasswordlessLogins(props.betas) && _.isEmpty(values.password)) { - errors.password = 'contacts.genericFailureMessages.passwordRequired'; - } + if (!Permissions.canUsePasswordlessLogins(props.betas) && _.isEmpty(values.password)) { + errors.password = 'contacts.genericFailureMessages.passwordRequired'; + } - return errors; - }, [props.betas, props.loginList]); + return errors; + }, + [props.betas, props.loginList], + ); const addNewContactMethod = (values) => { const phoneLogin = getPhoneLogin(values.phoneOrEmail); From b5a67763bc70ae89efcb20c6ee44b84be0b88c71 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Wed, 21 Jun 2023 16:56:43 -0700 Subject: [PATCH 340/826] setting parentActionID for task optimistically --- src/libs/actions/Task.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 5e27d7db764d..a03b0e32b856 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -57,6 +57,7 @@ function createTaskAndNavigate(currentUserEmail, currentUserAccountID, parentRep // Create the CreatedReportAction on the task const optimisticTaskCreatedAction = ReportUtils.buildOptimisticCreatedReportAction(optimisticTaskReport.reportID); const optimisticAddCommentReport = ReportUtils.buildOptimisticTaskCommentReportAction(taskReportID, title, assignee, assigneeAccountID, `Created a task: ${title}`, parentReportID); + optimisticTaskReport.parentReportActionID = optimisticAddCommentReport.reportAction.reportActionID; const currentTime = DateUtils.getDBTime(); From 8f64519803db26d10915d3b5649ba0cccc12c266 Mon Sep 17 00:00:00 2001 From: Hans Date: Thu, 22 Jun 2023 07:04:12 +0700 Subject: [PATCH 341/826] dismiss keyboard when sending workspace invitation --- src/pages/workspace/WorkspaceInviteMessagePage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspaceInviteMessagePage.js b/src/pages/workspace/WorkspaceInviteMessagePage.js index 92cb38171c64..2a310c33a641 100644 --- a/src/pages/workspace/WorkspaceInviteMessagePage.js +++ b/src/pages/workspace/WorkspaceInviteMessagePage.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {View} from 'react-native'; +import {View, Keyboard} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; import lodashGet from 'lodash/get'; @@ -114,6 +114,7 @@ class WorkspaceInviteMessagePage extends React.Component { } sendInvitation() { + Keyboard.dismiss(); Policy.addMembersToWorkspace(this.props.invitedEmailsToAccountIDsDraft, this.state.welcomeNote, this.props.route.params.policyID, this.props.betas); Policy.setWorkspaceInviteMembersDraft(this.props.route.params.policyID, {}); Navigation.navigate(ROUTES.getWorkspaceMembersRoute(this.props.route.params.policyID)); From 5a860722da7f0523deb005db5b9b90f599135143 Mon Sep 17 00:00:00 2001 From: tienifr Date: Thu, 22 Jun 2023 11:18:21 +0700 Subject: [PATCH 342/826] fix: 19932 qr code should show for all rooms --- src/pages/ReportDetailsPage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/ReportDetailsPage.js b/src/pages/ReportDetailsPage.js index 19f78e08c604..26588481f53a 100644 --- a/src/pages/ReportDetailsPage.js +++ b/src/pages/ReportDetailsPage.js @@ -73,10 +73,6 @@ function ReportDetailsPage(props) { const participants = useMemo(() => lodashGet(props.report, 'participantAccountIDs', []), [props.report]); const menuItems = useMemo(() => { - if (isArchivedRoom) { - return []; - } - const items = [ { key: CONST.REPORT_DETAILS_MENU_ITEM.SHARE_CODE, @@ -86,6 +82,10 @@ function ReportDetailsPage(props) { }, ]; + if (isArchivedRoom) { + return items; + } + if (participants.length) { items.push({ key: CONST.REPORT_DETAILS_MENU_ITEM.MEMBERS, From 257e006efa8e3d5c887887297a5c738322fae086 Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 22 Jun 2023 15:56:23 +0700 Subject: [PATCH 343/826] Fix focus is lost if message deletion confirmation is made from keyboard --- src/components/Modal/BaseModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js index 431137e75b55..6d5bd5390416 100644 --- a/src/components/Modal/BaseModal.js +++ b/src/components/Modal/BaseModal.js @@ -101,7 +101,7 @@ class BaseModal extends PureComponent { return ( { - if (e && e.type === 'keydown' && e.key === 'Enter') { + if (e && e.key === 'Enter') { return; } this.props.onClose(); From 2c4cff0a6af3b0c90c7b565486fae6d4f767d86d Mon Sep 17 00:00:00 2001 From: Matt Moore <46995600+muttmuure@users.noreply.github.com> Date: Thu, 22 Jun 2023 11:35:08 +0100 Subject: [PATCH 344/826] Update docs/articles/other/Referral-Program.md Co-authored-by: Monil Bhavsar --- docs/articles/other/Referral-Program.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/articles/other/Referral-Program.md b/docs/articles/other/Referral-Program.md index 4a0c6cb98fbc..3ec14e282358 100644 --- a/docs/articles/other/Referral-Program.md +++ b/docs/articles/other/Referral-Program.md @@ -1,6 +1,6 @@ --- title: Expensify Referral Program -description: Send your joining link, submit a receipt or invoice and we'll pay you if your referral adopts Expensify. +description: Send your joining link, submit a receipt or invoice, and we'll pay you if your referral adopts Expensify. --- From 66f1c15105fdf63cbd5ab7a529ecec0c0dd33297 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Thu, 22 Jun 2023 16:51:53 +0500 Subject: [PATCH 345/826] feat: add comment for excluding loginList --- src/pages/settings/Profile/Contacts/NewContactMethodPage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index f9776ebd1111..0436064766a8 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -100,7 +100,11 @@ function NewContactMethodPage(props) { return errors; }, - [props.betas, props.loginList], + // We don't need `props.loginList` because when submitting this form + // the props.loginList gets updated, causing this function to run again. + // https://github.com/Expensify/App/issues/20610 + // eslint-disable-next-line react-hooks/exhaustive-deps + [], ); const addNewContactMethod = (values) => { From 51fa88d340cd30d5c9581ecfb73a40da7ddbc50f Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Thu, 22 Jun 2023 17:29:21 +0530 Subject: [PATCH 346/826] fix arrow key behaviour --- .../BaseAutoCompleteSuggestions.js | 11 ++++++++++- src/pages/home/report/ReportActionCompose.js | 15 ++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index 7f254bcd5ab5..38dba5eabaab 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -1,4 +1,4 @@ -import React, {useEffect} from 'react'; +import React, {useEffect, useRef} from 'react'; import Animated, {Easing, FadeOutDown, useAnimatedStyle, useSharedValue, withTiming} from 'react-native-reanimated'; // We take FlatList from this package to properly handle the scrolling of AutoCompleteSuggestions in chats since one scroll is nested inside another import {FlatList} from 'react-native-gesture-handler'; @@ -30,6 +30,7 @@ const measureHeightOfSuggestionRows = (numRows, isSuggestionPickerLarge) => { function BaseAutoCompleteSuggestions(props) { const rowHeight = useSharedValue(0); + const scrollRef = useRef(null); /** * Render a suggestion menu item component. * @param {Object} params @@ -60,6 +61,13 @@ function BaseAutoCompleteSuggestions(props) { }); }, [props.suggestions.length, props.isSuggestionPickerLarge, rowHeight]); + useEffect(() => { + if (!scrollRef.current) { + return; + } + scrollRef.current.scrollToIndex({index: props.highlightedSuggestionIndex, animated: true}); + }, [props.highlightedSuggestionIndex]); + return ( { - // EmojiRowCount is number of emoji suggestions. For small screen we can fit 3 items and for large we show up to 5 items - const emojiRowCount = isAutoSuggestionPickerLarge - ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) - : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); +const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge, isMentionSuggestion = false) => { + // rowCount is number of emoji/mention suggestions. For small screen we can fit 3 items + // and for large we show up to 5 items for emojis and 20 items for mentions + const MAX_SUGGESTIONS = isMentionSuggestion ? CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_MENTIONS : CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS; + const rowCount = isAutoSuggestionPickerLarge ? Math.min(numRows, MAX_SUGGESTIONS) : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); // -1 because we start at 0 - return emojiRowCount - 1; + return rowCount - 1; }; class ReportActionCompose extends React.Component { @@ -1190,7 +1191,7 @@ class ReportActionCompose extends React.Component { {!_.isEmpty(this.state.suggestedMentions) && this.state.shouldShowMentionSuggestionMenu && ( this.setState({highlightedMentionIndex: index})} > From 55ac5c7231de8b067693e632af384953a33d5e1b Mon Sep 17 00:00:00 2001 From: Matt Moore <46995600+muttmuure@users.noreply.github.com> Date: Thu, 22 Jun 2023 13:34:57 +0100 Subject: [PATCH 347/826] Update 2 Referral-Program.md Fixing the requested edits from Monil! --- docs/articles/other/Referral-Program.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/articles/other/Referral-Program.md b/docs/articles/other/Referral-Program.md index 3ec14e282358..1faff1c9ec4f 100644 --- a/docs/articles/other/Referral-Program.md +++ b/docs/articles/other/Referral-Program.md @@ -10,11 +10,11 @@ Expensify has grown thanks to our users who love Expensify so much that they tel As a thank you, every time you bring a new user into the platform who directly or indirectly leads to the adoption of a paid annual plan on Expensify, you will earn $250. -# How-to get paid for referring people to Expensify +# How to get paid for referring people to Expensify 1. Submit a report or invoice, or share your referral link with anyone you know who is spending too much time on expenses, or works at a company that could benefit from using Expensify. -2. You will get $250 for any referred business with that person as a paid member that commits to an annual subscription, has 2 or more active users, and makes two monthly payments. +2. You will get $250 for any referred business that commits to an annual subscription, has 2 or more active users, and makes two monthly payments. That’s right! You can refer anyone working at any company you know. From 9ec9d6b67867bb05dee9712a66f33a51f02a64c3 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 22 Jun 2023 13:41:56 +0100 Subject: [PATCH 348/826] only use conversation notifications when multiple have been received for the specific chat --- .../CustomNotificationProvider.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index 94e781efe90e..a5262ed17855 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -176,6 +176,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil }); } + boolean hasExistingNotification = notificationCache.messages.size() >= 1; try { JsonMap reportMap = payload.get(ONYX_DATA_KEY).getList().get(1).getMap().get("value").getMap(); String reportId = reportMap.keySet().iterator().next(); @@ -207,19 +208,22 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil notificationCache.bitmapIcons.put(accountID, personIcon); } - // Store the latest report comment in the local conversation history + // Despite not using conversation style for the initial notification from each chat, we need to cache it to enable conversation style for future notifications long createdTimeInMillis = getMessageTimeInMillis(messageData.get("created").getString("")); notificationCache.messages.add(new NotificationCache.Message(person, message, createdTimeInMillis)); - // Create the messaging style notification builder for this notification, associating the - // notification with the person who sent the report comment. - NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) - .setGroupConversation(true) - .setConversationTitle(conversationName); + // The initial notification for each conversation should use default styling. Once multiple messages are being displayed we should switch to conversation styling. + if (hasExistingNotification) { + // Create the messaging style notification builder for this notification, associating it with the person who sent the report comment + NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) + .setGroupConversation(true) + .setConversationTitle(conversationName); - // Add all conversation messages to the notification, including the last one we just received. - for (NotificationCache.Message cachedMessage : notificationCache.messages) { - messagingStyle.addMessage(cachedMessage.text, cachedMessage.time, cachedMessage.person); + // Add all conversation messages to the notification, including the last one we just received. + for (NotificationCache.Message cachedMessage : notificationCache.messages) { + messagingStyle.addMessage(cachedMessage.text, cachedMessage.time, cachedMessage.person); + } + builder.setStyle(messagingStyle); } // Clear the previous notification associated to this conversation so it looks like we are @@ -228,9 +232,6 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil NotificationManagerCompat.from(context).cancel(notificationCache.prevNotificationID); } - // Apply the messaging style to the notification builder - builder.setStyle(messagingStyle); - // Set notification icon builder.setLargeIcon(personIcon); From 97d7f0cfb4ce811b6aa975fcc1895cbd74803233 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Thu, 22 Jun 2023 18:16:33 +0530 Subject: [PATCH 349/826] Change getMaxIndex function definition --- src/pages/home/report/ReportActionCompose.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index b9d31b850a4f..b900b7981b9a 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -143,14 +143,13 @@ const {RNTextInputReset} = NativeModules; * Return the max available index for arrow manager. * @param {Number} numRows * @param {Boolean} isAutoSuggestionPickerLarge - * @param {Boolean} [isMentionSuggestion] + * @param {Number} [maxAmountOfItems] * @returns {Number} */ -const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge, isMentionSuggestion = false) => { +const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge, maxAmountOfItems = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) => { // rowCount is number of emoji/mention suggestions. For small screen we can fit 3 items // and for large we show up to 5 items for emojis and 20 items for mentions - const MAX_SUGGESTIONS = isMentionSuggestion ? CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_MENTIONS : CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS; - const rowCount = isAutoSuggestionPickerLarge ? Math.min(numRows, MAX_SUGGESTIONS) : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); + const rowCount = isAutoSuggestionPickerLarge ? Math.min(numRows, maxAmountOfItems) : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); // -1 because we start at 0 return rowCount - 1; @@ -1191,7 +1190,7 @@ class ReportActionCompose extends React.Component { {!_.isEmpty(this.state.suggestedMentions) && this.state.shouldShowMentionSuggestionMenu && ( this.setState({highlightedMentionIndex: index})} > From 0075ef2adec841b2a19a4bf0422959b5dc7d9840 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Thu, 22 Jun 2023 14:56:35 +0200 Subject: [PATCH 350/826] fix: pop all reports after screen resize --- src/libs/Navigation/Navigation.js | 21 ++++++++++++++++++--- src/libs/Navigation/NavigationRoot.js | 10 +++++++++- src/pages/ValidateLoginPage/index.js | 2 +- src/pages/home/ReportScreen.js | 2 +- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index 167f2d9eea96..9c8939d6da6c 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -19,6 +19,12 @@ const navigationIsReadyPromise = new Promise((resolve) => { let pendingRoute = null; +let shouldPopAllStateOnUP = false; + +function setShouldPopAllStateOnUP() { + shouldPopAllStateOnUP = true; +} + /** * @param {String} methodName * @param {Object} params @@ -83,19 +89,27 @@ function navigate(route = ROUTES.HOME, type) { /** * @param {String} fallbackRoute - Fallback route if pop/goBack action should, but is not possible within RHP - * @param {Bool} shouldEnforceFallback - Enforces navigation to fallback route + * @param {Bool} shouldPopToTop - Should we navigate to LHN on back press */ -function goBack(fallbackRoute = ROUTES.HOME, shouldEnforceFallback = false) { +function goBack(fallbackRoute = ROUTES.HOME, shouldPopToTop = false) { if (!canNavigate('goBack')) { return; } + if (shouldPopToTop) { + if (shouldPopAllStateOnUP) { + shouldPopAllStateOnUP = false; + navigationRef.current.dispatch(StackActions.popToTop()); + return; + } + } + if (!navigationRef.current.canGoBack()) { Log.hmmm('[Navigation] Unable to go back'); return; } - if (shouldEnforceFallback || (!getActiveRouteIndex(navigationRef.current.getState()) && fallbackRoute)) { + if (!getActiveRouteIndex(navigationRef.current.getState()) && fallbackRoute) { navigate(fallbackRoute, 'UP'); return; } @@ -215,6 +229,7 @@ function setIsNavigationReady() { } export default { + setShouldPopAllStateOnUP, canNavigate, navigate, setParams, diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index ee389e530d0f..2a4b418a4fa6 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import React, {useRef, useEffect} from 'react'; import PropTypes from 'prop-types'; import {NavigationContainer, DefaultTheme, getPathFromState} from '@react-navigation/native'; import {useFlipper} from '@react-navigation/devtools'; @@ -56,6 +56,14 @@ function NavigationRoot(props) { useFlipper(navigationRef); const navigationStateRef = useRef(undefined); + + useEffect(() => { + if (!props.isSmallScreenWidth) { + return; + } + Navigation.setShouldPopAllStateOnUP(); + }, [props.isSmallScreenWidth]); + const updateSavedNavigationStateAndLogRoute = (state) => { if (!state) { return; diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index 7d4bbfc89e85..e51d47f58344 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -58,7 +58,7 @@ class ValidateLoginPage extends Component { if (lodashGet(this.props, 'session.authToken')) { // If already signed in, do not show the validate code if not on web, // because we don't want to block the user with the interstitial page. - Navigation.goBack(false); + Navigation.goBack(); } else { Session.signInWithValidateCodeAndNavigate(accountID, validateCode, this.props.preferredLocale); } diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index d3fb665ecb48..a8225dd72911 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -272,7 +272,7 @@ class ReportScreen extends React.Component { ) : ( Navigation.goBack(ROUTES.HOME)} + onNavigationMenuButtonClicked={() => Navigation.goBack(ROUTES.HOME, true)} personalDetails={this.props.personalDetails} report={this.props.report} /> From 327d88ad6bb851306c54ac1d41ea61e36b5d7979 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 22 Jun 2023 13:58:05 +0100 Subject: [PATCH 351/826] improve logging and documentation of Android notification logic --- .../customairshipextender/CustomNotificationProvider.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index a5262ed17855..655189b1a238 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -176,7 +176,9 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil }); } + // Do other cached notifications exist for this chat already? boolean hasExistingNotification = notificationCache.messages.size() >= 1; + try { JsonMap reportMap = payload.get(ONYX_DATA_KEY).getList().get(1).getMap().get("value").getMap(); String reportId = reportMap.keySet().iterator().next(); @@ -195,7 +197,9 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil if (personIcon == null) { personIcon = fetchIcon(context, avatar); } + builder.setLargeIcon(personIcon); + // Persist the person and icon to the notification cache if (person == null) { IconCompat iconCompat = IconCompat.createWithBitmap(personIcon); person = new Person.Builder() @@ -232,9 +236,6 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil NotificationManagerCompat.from(context).cancel(notificationCache.prevNotificationID); } - // Set notification icon - builder.setLargeIcon(personIcon); - } catch (Exception e) { e.printStackTrace(); } From 51f5c61b03ad588803aed0b0244f7e5c3c4b03d2 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Thu, 22 Jun 2023 15:05:18 +0200 Subject: [PATCH 352/826] add break condition inside getMinimalAction --- src/libs/Navigation/linkTo.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libs/Navigation/linkTo.js b/src/libs/Navigation/linkTo.js index 3bf226a229c9..ad6052ca4d09 100644 --- a/src/libs/Navigation/linkTo.js +++ b/src/libs/Navigation/linkTo.js @@ -20,6 +20,10 @@ function getMinimalAction(action, state) { let targetName = null; while (currentState.routes[currentState.index].name === currentAction.payload.name) { + if (!currentState.routes[currentState.index].state) { + break; + } + targetName = currentState.routes[currentState.index].name; currentState = currentState.routes[currentState.index].state; From 7f92d0ab86595fb515ac21f426addc67c1df835b Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Thu, 22 Jun 2023 15:19:31 +0200 Subject: [PATCH 353/826] fix: dont set it on first render --- src/libs/Navigation/NavigationRoot.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 2a4b418a4fa6..ee4affa81a36 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -55,9 +55,16 @@ function parseAndLogRoute(state) { function NavigationRoot(props) { useFlipper(navigationRef); const navigationStateRef = useRef(undefined); - + const firstRenderRef = useRef(true); useEffect(() => { + if (firstRenderRef.current) { + // we don't want to make the report back button go back to LHN if the user + // started on the small screen so we don't set it on the first render + // making it only work on consecutive changes of the screen size + firstRenderRef.current = false; + return; + } if (!props.isSmallScreenWidth) { return; } From 6bb600d60c4e2f3363e660c430f8d8d28852c9b9 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Thu, 22 Jun 2023 15:40:17 +0200 Subject: [PATCH 354/826] feat: add one more comment --- src/libs/Navigation/Navigation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index 9c8939d6da6c..6146e5e0345c 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -21,6 +21,9 @@ let pendingRoute = null; let shouldPopAllStateOnUP = false; +/** + * Inform the navigation that next time user presses UP we should pop all the state back to LHN. + */ function setShouldPopAllStateOnUP() { shouldPopAllStateOnUP = true; } From 7060a2a378439b915506537f3d913c5a518350f8 Mon Sep 17 00:00:00 2001 From: Ana Margarida Silva Date: Thu, 22 Jun 2023 15:21:09 +0100 Subject: [PATCH 355/826] fix: remove arm64 from Excluded Archs for IOS --- ios/NewExpensify.xcodeproj/project.pbxproj | 2 -- ios/Podfile | 4 ---- 2 files changed, 6 deletions(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index f34f8959aab0..675569aa7d27 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -652,7 +652,6 @@ CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; ENABLE_BITCODE = NO; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -683,7 +682,6 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = NewExpensify/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/ios/Podfile b/ios/Podfile index 6eb84320a77c..3af9366d3ef5 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -82,10 +82,6 @@ target 'NewExpensify' do __apply_Xcode_12_5_M1_post_install_workaround(installer) __apply_Xcode_14_3_RC_post_install_workaround(installer) - installer.pods_project.build_configurations.each do |config| - config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" - end - installer.pods_project.targets.each do |target| if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle" target.build_configurations.each do |config| From 8dc40773f6b3d8b317ca4b43646e8ce815c6a51d Mon Sep 17 00:00:00 2001 From: Ana Margarida Silva Date: Thu, 22 Jun 2023 15:48:08 +0100 Subject: [PATCH 356/826] chore: updated podfile --- ios/Podfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 048eeca5f76f..91afa68eb54a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1024,7 +1024,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1067,7 +1067,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1139,6 +1139,6 @@ SPEC CHECKSUMS: Yoga: f87bd008d34c18bf990d4371200802f2866ce18c YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 +PODFILE CHECKSUM: 69f576e475be6d130ee96103b131f71bfdbf8a6e COCOAPODS: 1.12.0 From 515b35f59b644894e58b174ab71810d2a7d4cf6e Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 22 Jun 2023 15:59:26 +0100 Subject: [PATCH 357/826] update iOS pods --- ios/NewExpensify.xcodeproj/project.pbxproj | 15 +++++++++------ ios/Podfile.lock | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index f34f8959aab0..0933ddbd436d 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -66,24 +66,24 @@ 37F6DD6E91B4C55BD8DDC895 /* Pods-NewExpensify.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify.debug.xcconfig"; path = "Target Support Files/Pods-NewExpensify/Pods-NewExpensify.debug.xcconfig"; sourceTree = ""; }; 391B5D1DB6CFBAC16FD11DC4 /* Pods-NewExpensify.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify.release.xcconfig"; path = "Target Support Files/Pods-NewExpensify/Pods-NewExpensify.release.xcconfig"; sourceTree = ""; }; 44BF435285B94E5B95F90994 /* ExpensifyNewKansas-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNewKansas-Medium.otf"; path = "../assets/fonts/native/ExpensifyNewKansas-Medium.otf"; sourceTree = ""; }; - 52796131E6554494B2DDB056 /* ExpensifyNeue-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Bold.otf"; path = "../assets/fonts/native/ExpensifyNeue-Bold.otf"; sourceTree = ""; }; + 52796131E6554494B2DDB056 /* ExpensifyNeue-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Bold.otf"; path = "../assets/fonts/native/ExpensifyNeue-Bold.otf"; sourceTree = ""; }; 7041848326A8E40900E09F4D /* RCTStartupTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RCTStartupTimer.h; path = NewExpensify/RCTStartupTimer.h; sourceTree = ""; }; 7041848426A8E47D00E09F4D /* RCTStartupTimer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RCTStartupTimer.m; path = NewExpensify/RCTStartupTimer.m; sourceTree = ""; }; 70CF6E81262E297300711ADC /* BootSplash.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = BootSplash.storyboard; path = NewExpensify/BootSplash.storyboard; sourceTree = ""; }; - 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-BoldItalic.otf"; path = "../assets/fonts/native/ExpensifyNeue-BoldItalic.otf"; sourceTree = ""; }; + 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-BoldItalic.otf"; path = "../assets/fonts/native/ExpensifyNeue-BoldItalic.otf"; sourceTree = ""; }; B37C757CE02B734BFED38097 /* Pods-NewExpensify-NewExpensifyTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify-NewExpensifyTests.debug.xcconfig"; path = "Target Support Files/Pods-NewExpensify-NewExpensifyTests/Pods-NewExpensify-NewExpensifyTests.debug.xcconfig"; sourceTree = ""; }; - BF6A4C5167244B9FB8E4D4E3 /* ExpensifyNeue-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Italic.otf"; path = "../assets/fonts/native/ExpensifyNeue-Italic.otf"; sourceTree = ""; }; + BF6A4C5167244B9FB8E4D4E3 /* ExpensifyNeue-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Italic.otf"; path = "../assets/fonts/native/ExpensifyNeue-Italic.otf"; sourceTree = ""; }; CA3A3642AEED7CF2D4CD3716 /* Pods-NewExpensify-NewExpensifyTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify-NewExpensifyTests.release.xcconfig"; path = "Target Support Files/Pods-NewExpensify-NewExpensifyTests/Pods-NewExpensify-NewExpensifyTests.release.xcconfig"; sourceTree = ""; }; D2AFB39EC1D44BF9B91D3227 /* ExpensifyNewKansas-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNewKansas-MediumItalic.otf"; path = "../assets/fonts/native/ExpensifyNewKansas-MediumItalic.otf"; sourceTree = ""; }; - DCF33E34FFEC48128CDD41D4 /* ExpensifyMono-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Bold.otf"; path = "../assets/fonts/native/ExpensifyMono-Bold.otf"; sourceTree = ""; }; + DCF33E34FFEC48128CDD41D4 /* ExpensifyMono-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Bold.otf"; path = "../assets/fonts/native/ExpensifyMono-Bold.otf"; sourceTree = ""; }; DD7904292792E76D004484B4 /* RCTBootSplash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTBootSplash.h; path = NewExpensify/RCTBootSplash.h; sourceTree = ""; }; DD79042A2792E76D004484B4 /* RCTBootSplash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTBootSplash.m; path = NewExpensify/RCTBootSplash.m; sourceTree = ""; }; - E704648954784DDFBAADF568 /* ExpensifyMono-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Regular.otf"; path = "../assets/fonts/native/ExpensifyMono-Regular.otf"; sourceTree = ""; }; + E704648954784DDFBAADF568 /* ExpensifyMono-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Regular.otf"; path = "../assets/fonts/native/ExpensifyMono-Regular.otf"; sourceTree = ""; }; E9DF872C2525201700607FDC /* AirshipConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AirshipConfig.plist; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; F0C450E92705020500FD2970 /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = colors.json; path = ../colors.json; sourceTree = ""; }; - F4F8A052A22040339996324B /* ExpensifyNeue-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Regular.otf"; path = "../assets/fonts/native/ExpensifyNeue-Regular.otf"; sourceTree = ""; }; + F4F8A052A22040339996324B /* ExpensifyNeue-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Regular.otf"; path = "../assets/fonts/native/ExpensifyNeue-Regular.otf"; sourceTree = ""; }; F679A86058F8C4B331D239C3 /* libPods-NewExpensify-NewExpensifyTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NewExpensify-NewExpensifyTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -648,9 +648,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = NewExpensify/Chat.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; @@ -665,6 +667,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat; PRODUCT_NAME = "New Expensify"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = chat_expensify_development; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 048eeca5f76f..7ca12edb2b68 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1024,7 +1024,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1067,7 +1067,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d From 505b002ada8b072988615405526aab66034bac69 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Thu, 22 Jun 2023 15:59:48 +0100 Subject: [PATCH 358/826] add iOS communication notification entitlement --- ios/NewExpensify/Chat.entitlements | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/NewExpensify/Chat.entitlements b/ios/NewExpensify/Chat.entitlements index 33bb7f9feff8..1d9bc86a21de 100644 --- a/ios/NewExpensify/Chat.entitlements +++ b/ios/NewExpensify/Chat.entitlements @@ -10,5 +10,7 @@ applinks:staging.new.expensify.com webcredentials:new.expensify.com + com.apple.developer.usernotifications.communication + From 77e1f43a8990b42db58906070142a70ba17c6b39 Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Thu, 22 Jun 2023 18:32:00 +0200 Subject: [PATCH 359/826] Removed isMounted state --- src/components/LHNOptionsList/OptionRowLHN.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 24179a03a59e..02f89c6d8997 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React, {useEffect, useState} from 'react'; +import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; import lodashGet from 'lodash/get'; @@ -66,16 +66,13 @@ const defaultProps = { function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); - const [isMounted, setIsMounted] = useState(false); - useEffect(() => { - if (isMounted || !optionItem) return; - setIsMounted(true); - + if (!optionItem) return; if (!optionItem.hasDraftComment && props.comment && props.comment.length > 0 && !props.isFocused) { Report.setReportWithDraft(props.reportID, true); } - }, [optionItem, props.comment, props.isFocused, props.reportID, isMounted]); + // eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want this effect to run again + }, []); if (!optionItem) { return null; From a443cda5d5eee9a333c723b269f1236f90d187b2 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Thu, 22 Jun 2023 22:04:48 +0530 Subject: [PATCH 360/826] Use getItemLayout to handle offscreen indices and avoid failures --- .../BaseAutoCompleteSuggestions.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index 38dba5eabaab..7a5cb650c415 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -51,6 +51,24 @@ function BaseAutoCompleteSuggestions(props) { ); + /** + * This function is used to compute the layout of any given item in our list. Since we know that each item will have the exact same height, this is a performance optimization + * so that the heights can be determined before the options are rendered. Otherwise, the heights are determined when each option is rendering and it causes a lot of overhead on large + * lists. + * + * Also, `scrollToIndex` should be used in conjunction with `getItemLayout`, otherwise there is no way to know the location of offscreen indices or handle failures. + * + * @param {Array} data - This is the same as the data we pass into the component + * @param {Number} index the current item's index in the set of data + * + * @returns {Object} + */ + const getItemLayout = (data, index) => ({ + length: CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT, + offset: index * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT, + index, + }); + const innerHeight = CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT * props.suggestions.length; const animatedStyles = useAnimatedStyle(() => StyleUtils.getAutoCompleteSuggestionContainerStyle(rowHeight.value, props.shouldIncludeReportRecipientLocalTimeHeight)); @@ -83,6 +101,7 @@ function BaseAutoCompleteSuggestions(props) { removeClippedSubviews={false} showsVerticalScrollIndicator={innerHeight > rowHeight.value} style={{flex: 1}} + getItemLayout={getItemLayout} /> ); From e50a27b81c524014e6a9a7a9a7e847f167e7bf2a Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Thu, 22 Jun 2023 22:06:12 +0530 Subject: [PATCH 361/826] fix lint --- .../AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index 7a5cb650c415..d053a3c4390c 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -55,7 +55,7 @@ function BaseAutoCompleteSuggestions(props) { * This function is used to compute the layout of any given item in our list. Since we know that each item will have the exact same height, this is a performance optimization * so that the heights can be determined before the options are rendered. Otherwise, the heights are determined when each option is rendering and it causes a lot of overhead on large * lists. - * + * * Also, `scrollToIndex` should be used in conjunction with `getItemLayout`, otherwise there is no way to know the location of offscreen indices or handle failures. * * @param {Array} data - This is the same as the data we pass into the component From 2ffa6fa32c5062cfe3baf0208d6797188e276d09 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 22 Jun 2023 09:51:18 -0700 Subject: [PATCH 362/826] Add back exported context --- src/components/withCurrentReportId.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/withCurrentReportId.js b/src/components/withCurrentReportId.js index 4611187ed404..f782750e3668 100644 --- a/src/components/withCurrentReportId.js +++ b/src/components/withCurrentReportId.js @@ -69,4 +69,4 @@ export default function withCurrentReportId(WrappedComponent) { return WithCurrentReportId; } -export {withCurrentReportIdPropTypes, CurrentReportIdContextProvider}; +export {withCurrentReportIdPropTypes, CurrentReportIdContextProvider, CurrentReportIdContext}; From e4457929a6433307a82a310e405bc32db5126960 Mon Sep 17 00:00:00 2001 From: someone-here Date: Thu, 22 Jun 2023 22:31:31 +0530 Subject: [PATCH 363/826] Hightlight Option on secondary click --- src/components/LHNOptionsList/OptionRowLHN.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 4492d891e1e5..a41ffaeba26f 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -1,5 +1,5 @@ import _ from 'underscore'; -import React from 'react'; +import React, {useState} from 'react'; import PropTypes from 'prop-types'; import {View, StyleSheet} from 'react-native'; import * as optionRowStyles from '../../styles/optionRowStyles'; @@ -56,6 +56,7 @@ const defaultProps = { function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); + const [isContextMenuActive, setIsContextMenuActive] = useState(false); if (!optionItem) { return null; @@ -95,6 +96,7 @@ function OptionRowLHN(props) { * @param {Object} [event] - A press event. */ const showPopover = (event) => { + setIsContextMenuActive(true); ReportActionContextMenu.showContextMenu( ContextMenuActions.CONTEXT_MENU_TYPES.REPORT, event, @@ -104,7 +106,7 @@ function OptionRowLHN(props) { {}, '', () => {}, - () => {}, + () => setIsContextMenuActive(false), false, false, optionItem.isPinned, @@ -140,7 +142,7 @@ function OptionRowLHN(props) { styles.sidebarLinkInner, StyleUtils.getBackgroundColorStyle(themeColors.sidebar), props.isFocused ? styles.sidebarLinkActive : null, - hovered && !props.isFocused ? props.hoverStyle : null, + (hovered || isContextMenuActive) && !props.isFocused ? props.hoverStyle : null, ]} accessibilityRole={CONST.ACCESSIBILITY_ROLE.BUTTON} accessibilityLabel={props.translate('accessibilityHints.navigatesToChat')} From a9dcf2dc6d80af25761b8ef1b1f90ffdf83a78eb Mon Sep 17 00:00:00 2001 From: Mikhail Karkachov Date: Thu, 22 Jun 2023 19:48:40 +0200 Subject: [PATCH 364/826] Refactored useEffect in OptionRowLHN --- src/components/LHNOptionsList/OptionRowLHN.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 02f89c6d8997..797b5ae469de 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -67,11 +67,11 @@ function OptionRowLHN(props) { const optionItem = SidebarUtils.getOptionData(props.reportID); useEffect(() => { - if (!optionItem) return; - if (!optionItem.hasDraftComment && props.comment && props.comment.length > 0 && !props.isFocused) { - Report.setReportWithDraft(props.reportID, true); + if (!optionItem || optionItem.hasDraftComment || !props.comment || props.comment.length <= 0 || props.isFocused) { + return; } - // eslint-disable-next-line react-hooks/exhaustive-deps -- we don't want this effect to run again + Report.setReportWithDraft(props.reportID, true); + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); if (!optionItem) { From 5000ec33708ec4fe9c92ac2da2c852bba6111e20 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Fri, 23 Jun 2023 00:16:00 +0530 Subject: [PATCH 365/826] Consistent emoji and mention suggestions --- src/CONST.js | 10 +++++----- .../BaseAutoCompleteSuggestions.js | 4 ++-- src/libs/EmojiUtils.js | 2 +- src/pages/home/report/ReportActionCompose.js | 11 +++++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index 858afc02fca8..5692b0a64602 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -847,11 +847,11 @@ const CONST = { ITEM_HEIGHT: 40, SMALL_CONTAINER_HEIGHT_FACTOR: 2.5, MIN_AMOUNT_OF_ITEMS: 3, - // used for max emoji suggestions and for limiting the height of mention suggestions, - // we show a scrollable list with max height equal to MAX_AMOUNT_OF_ITEMS (5) * ITEM_HEIGHT. - MAX_AMOUNT_OF_ITEMS: 5, - // used for max mention suggestions - MAX_AMOUNT_OF_MENTIONS: 20, + // max number of suggestions + MAX_AMOUNT_OF_ITEMS: 20, + // used for limiting the height of suggestions container, we show a scrollable list + // with max height equal to MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW (5) * ITEM_HEIGHT. + MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW: 5, HERE_TEXT: '@here', }, COMPOSER_MAX_HEIGHT: 125, diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index d053a3c4390c..5ab0ff9e90c3 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -15,9 +15,9 @@ import PressableWithFeedback from '../Pressable/PressableWithFeedback'; */ const measureHeightOfSuggestionRows = (numRows, isSuggestionPickerLarge) => { if (isSuggestionPickerLarge) { - if (numRows > CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) { + if (numRows > CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW) { // On large screens, if there are more than 5 suggestions, we display a scrollable window with a height of 5 items, indicating that there are more items available - return CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; + return CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; } return numRows * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; } diff --git a/src/libs/EmojiUtils.js b/src/libs/EmojiUtils.js index a4325af27c9c..d305e670b813 100644 --- a/src/libs/EmojiUtils.js +++ b/src/libs/EmojiUtils.js @@ -260,7 +260,7 @@ function replaceEmojis(text, isSmallScreenWidth = false, preferredSkinTone = CON * @param {Number} [limit] - matching emojis limit * @returns {Array} */ -function suggestEmojis(text, limit = 5) { +function suggestEmojis(text, limit = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) { const emojiData = text.match(CONST.REGEX.EMOJI_SUGGESTIONS); if (emojiData) { const matching = []; diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index b900b7981b9a..0f09585a4c15 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -143,13 +143,12 @@ const {RNTextInputReset} = NativeModules; * Return the max available index for arrow manager. * @param {Number} numRows * @param {Boolean} isAutoSuggestionPickerLarge - * @param {Number} [maxAmountOfItems] * @returns {Number} */ -const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge, maxAmountOfItems = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) => { +const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge) => { // rowCount is number of emoji/mention suggestions. For small screen we can fit 3 items - // and for large we show up to 5 items for emojis and 20 items for mentions - const rowCount = isAutoSuggestionPickerLarge ? Math.min(numRows, maxAmountOfItems) : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); + // and for large we show up to 20 items for mentions/emojis + const rowCount = isAutoSuggestionPickerLarge ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); // -1 because we start at 0 return rowCount - 1; @@ -463,7 +462,7 @@ class ReportActionCompose extends React.Component { }); const sortedPersonalDetails = _.sortBy(filteredPersonalDetails, (detail) => detail.displayName || detail.login); - _.each(_.first(sortedPersonalDetails, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_MENTIONS - suggestions.length), (detail) => { + _.each(_.first(sortedPersonalDetails, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS - suggestions.length), (detail) => { suggestions.push({ text: detail.displayName, alternateText: detail.login, @@ -1190,7 +1189,7 @@ class ReportActionCompose extends React.Component { {!_.isEmpty(this.state.suggestedMentions) && this.state.shouldShowMentionSuggestionMenu && ( this.setState({highlightedMentionIndex: index})} > From 010a66ca562bda814274be2218921d583f2d5365 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Fri, 23 Jun 2023 00:19:23 +0530 Subject: [PATCH 366/826] fix lint --- src/pages/home/report/ReportActionCompose.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 0f09585a4c15..1ae0daf6a738 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -148,7 +148,9 @@ const {RNTextInputReset} = NativeModules; const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge) => { // rowCount is number of emoji/mention suggestions. For small screen we can fit 3 items // and for large we show up to 20 items for mentions/emojis - const rowCount = isAutoSuggestionPickerLarge ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); + const rowCount = isAutoSuggestionPickerLarge + ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) + : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); // -1 because we start at 0 return rowCount - 1; From c023725c3b7e3572a6ddaae974ae3c56f159b901 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 22 Jun 2023 14:08:07 -0700 Subject: [PATCH 367/826] parentNavigationSummary translation --- src/languages/en.js | 1 + src/languages/es.js | 1 + src/libs/ReportUtils.js | 15 ++++++--------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index bdaa0786b627..274bded36110 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1415,6 +1415,7 @@ export default { lastReply: 'Last reply', replies: 'Replies', reply: 'Reply', + parentNavigationSummary: ({rootReportName, workspaceName}) => `From ${rootReportName} ${workspaceName ? `in ${workspaceName}` : ''}`, }, qrCodes: { copyUrlToClipboard: 'Copy URL to clipboard', diff --git a/src/languages/es.js b/src/languages/es.js index 2bd602694f68..4de7e60a9db4 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1883,6 +1883,7 @@ export default { lastReply: 'Última respuesta', replies: 'Respuestas', reply: 'Respuesta', + parentNavigationSummary: ({rootReportName, workspaceName}) => `De ${rootReportName} ${workspaceName ? `en ${workspaceName}` : ''}`, }, qrCodes: { copyUrlToClipboard: 'Copiar URL al portapapeles', diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 97559e520940..f847d4332f1d 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -467,9 +467,10 @@ function isArchivedRoom(report) { * @param {String} report.policyID * @param {String} report.oldPolicyName * @param {String} report.policyName + * @param {Boolean} [returnEmptyIfNotFound] * @returns {String} */ -function getPolicyName(report) { +function getPolicyName(report, returnEmptyIfNotFound = false) { if ((!allPolicies || _.size(allPolicies) === 0) && !report.policyName) { return Localize.translateLocal('workspace.common.unavailable'); } @@ -478,7 +479,7 @@ function getPolicyName(report) { // // Public rooms send back the policy name with the reportSummary, // // since they can also be accessed by people who aren't in the workspace - return lodashGet(policy, 'name') || report.policyName || report.oldPolicyName || Localize.translateLocal('workspace.common.unavailable'); + return lodashGet(policy, 'name') || report.policyName || report.oldPolicyName || (returnEmptyIfNotFound ? '' : Localize.translateLocal('workspace.common.unavailable')); } /** @@ -1065,13 +1066,13 @@ function getRootReportAndWorkspaceName(report) { if (isMoneyRequestReport(report)) { return { rootReportName: lodashGet(report, 'displayName', ''), - workspaceName: isIOUReport(report) ? CONST.POLICY.OWNER_EMAIL_FAKE : getPolicyName(report), + workspaceName: isIOUReport(report) ? CONST.POLICY.OWNER_EMAIL_FAKE : getPolicyName(report, true), }; } return { rootReportName: getReportName(report), - workspaceName: getPolicyName(report), + workspaceName: getPolicyName(report, true), }; } @@ -1113,11 +1114,7 @@ function getParentNavigationSubtitle(report) { return ''; } - let subtitleLink = `${Localize.translateLocal('common.from')} ${rootReportName}`; - if (workspaceName && workspaceName !== rootReportName && workspaceName !== Localize.translateLocal('workspace.common.unavailable')) { - subtitleLink += ` ${Localize.translateLocal('common.conjunctionIn')} ${workspaceName}`; - } - return subtitleLink; + return Localize.translateLocal('threads.parentNavigationSummary', {rootReportName, workspaceName}); } return ''; } From 2a5d48d4d176432bb94f89c40b6d5f9a63893efc Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 22 Jun 2023 14:08:48 -0700 Subject: [PATCH 368/826] removing unused translation --- src/languages/en.js | 2 -- src/languages/es.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 274bded36110..8ef4c08ace1f 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -146,8 +146,6 @@ export default { km: 'kilometer', copied: 'Copied!', someone: 'Someone', - from: 'From', - conjunctionIn: 'in', }, anonymousReportFooter: { logoTagline: 'Join in on the discussion.', diff --git a/src/languages/es.js b/src/languages/es.js index 4de7e60a9db4..4af03ce4de03 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -145,8 +145,6 @@ export default { km: 'kilómetro', copied: '¡Copiado!', someone: 'Alguien', - from: 'De', - conjunctionIn: 'en', }, anonymousReportFooter: { logoTagline: 'Únete a la discussion.', From d423244e13d1afef51263b2dfaf10b100b27c1b6 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Thu, 22 Jun 2023 14:17:33 -0700 Subject: [PATCH 369/826] moving space into the condition --- src/languages/en.js | 2 +- src/languages/es.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 8ef4c08ace1f..a58223458350 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -1413,7 +1413,7 @@ export default { lastReply: 'Last reply', replies: 'Replies', reply: 'Reply', - parentNavigationSummary: ({rootReportName, workspaceName}) => `From ${rootReportName} ${workspaceName ? `in ${workspaceName}` : ''}`, + parentNavigationSummary: ({rootReportName, workspaceName}) => `From ${rootReportName}${workspaceName ? ` in ${workspaceName}` : ''}`, }, qrCodes: { copyUrlToClipboard: 'Copy URL to clipboard', diff --git a/src/languages/es.js b/src/languages/es.js index 4af03ce4de03..4729e7a93896 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -1881,7 +1881,7 @@ export default { lastReply: 'Última respuesta', replies: 'Respuestas', reply: 'Respuesta', - parentNavigationSummary: ({rootReportName, workspaceName}) => `De ${rootReportName} ${workspaceName ? `en ${workspaceName}` : ''}`, + parentNavigationSummary: ({rootReportName, workspaceName}) => `De ${rootReportName}${workspaceName ? ` en ${workspaceName}` : ''}`, }, qrCodes: { copyUrlToClipboard: 'Copiar URL al portapapeles', From 2dcce6ecacb0823dbd0e0176c3743c8beaed5d79 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Thu, 22 Jun 2023 14:58:34 -0700 Subject: [PATCH 370/826] Improvements from PR review --- .../{lounge-top-bg.svg => lounge.svg} | 0 src/CONST.js | 3 ++ src/components/Icon/Illustrations.js | 2 +- src/languages/es.js | 4 +-- src/pages/settings/LoungeAccessPage.js | 30 ++++++++++++++++--- src/pages/settings/userPropTypes.js | 3 ++ 6 files changed, 35 insertions(+), 7 deletions(-) rename assets/images/product-illustrations/{lounge-top-bg.svg => lounge.svg} (100%) diff --git a/assets/images/product-illustrations/lounge-top-bg.svg b/assets/images/product-illustrations/lounge.svg similarity index 100% rename from assets/images/product-illustrations/lounge-top-bg.svg rename to assets/images/product-illustrations/lounge.svg diff --git a/src/CONST.js b/src/CONST.js index f8ac136e720a..3adb32204649 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -2513,6 +2513,9 @@ const CONST = { TEXT: 'text', RADIO: 'radio', }, + SETTINGS_LOUNGE_ACCESS: { + HEADER_IMAGE_ASPECT_RATIO: 0.64, + }, }; export default CONST; diff --git a/src/components/Icon/Illustrations.js b/src/components/Icon/Illustrations.js index 07a04c3e8d39..f13b13cba03c 100644 --- a/src/components/Icon/Illustrations.js +++ b/src/components/Icon/Illustrations.js @@ -31,7 +31,7 @@ import PinkBill from '../../../assets/images/simple-illustrations/simple-illustr import CreditCardsNew from '../../../assets/images/simple-illustrations/simple-illustration__credit-cards.svg'; import InvoiceBlue from '../../../assets/images/simple-illustrations/simple-illustration__invoice.svg'; import LockOpen from '../../../assets/images/simple-illustrations/simple-illustration__lockopen.svg'; -import Lounge from '../../../assets/images/product-illustrations/lounge-top-bg.svg'; +import Lounge from '../../../assets/images/product-illustrations/lounge.svg'; import Luggage from '../../../assets/images/simple-illustrations/simple-illustration__luggage.svg'; import MoneyIntoWallet from '../../../assets/images/simple-illustrations/simple-illustration__moneyintowallet.svg'; import MoneyWings from '../../../assets/images/simple-illustrations/simple-illustration__moneywings.svg'; diff --git a/src/languages/es.js b/src/languages/es.js index 8c07f68211c7..2a8af5628045 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -409,10 +409,10 @@ export default { syncing: 'Sincronizando', }, loungeAccessPage: { - loungeAccess: 'Acceso al lounge', + loungeAccess: 'Acceso a la sala vip', headline: 'Podrás acceder a nuestras salas vip exclusivas.', description: - 'La sala vip Expensify es el punto de encuentro entre una “sala vip de aeropuerto de alta gama” y un vibrante “espacio de co-working” optimizado para personas con ideas afines.', + 'La sala vip Expensify es el punto de encuentro entre una "sala vip de aeropuerto de alta gama" y un vibrante "espacio de co-working" optimizado para personas con ideas afines.', coffeePromo: 'Buen café y buenos cócteles', networkingPromo: 'Conecta con otros miembros', viewsPromo: 'Increíbles vistas de San Francisco', diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/LoungeAccessPage.js index 9361902d6170..89db90e558cd 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/LoungeAccessPage.js @@ -1,6 +1,7 @@ import _ from 'underscore'; import React from 'react'; import {View, ScrollView} from 'react-native'; +import {withOnyx} from 'react-native-onyx'; import HeaderWithBackButton from '../../components/HeaderWithBackButton'; import Navigation from '../../libs/Navigation/Navigation'; import ROUTES from '../../ROUTES'; @@ -12,10 +13,21 @@ import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/ import MenuItem from '../../components/MenuItem'; import compose from '../../libs/compose'; import * as Illustrations from '../../components/Icon/Illustrations'; +import CONST from '../../CONST'; +import ONYXKEYS from '../../ONYXKEYS'; +import userPropTypes from './userPropTypes'; +import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; const propTypes = { ...withLocalizePropTypes, ...windowDimensionsPropTypes, + + /** Current user details, which will hold whether or not they have Lounge Access */ + user: userPropTypes, +}; + +const defaultProps = { + user: {}, }; const menuItems = [ @@ -37,14 +49,14 @@ function LoungeAccessPage(props) { const illustrationStyle = props.isSmallScreenWidth ? { width: props.windowWidth, - height: 0.64 * props.windowWidth, + height: CONST.SETTINGS_LOUNGE_ACCESS.HEADER_IMAGE_ASPECT_RATIO * props.windowWidth, } : {}; return ( {({safeAreaPaddingBottomStyle}) => ( - <> + Navigation.goBack(ROUTES.SETTINGS)} @@ -70,16 +82,26 @@ function LoungeAccessPage(props) { iconWidth={60} iconHeight={60} iconStyles={[styles.mr3, styles.ml3]} + interactive={false} /> ))} - + )} ); } LoungeAccessPage.propTypes = propTypes; +LoungeAccessPage.defaultProps = defaultProps; LoungeAccessPage.displayName = 'LoungeAccessPage'; -export default compose(withLocalize, withWindowDimensions)(LoungeAccessPage); +export default compose( + withLocalize, + withWindowDimensions, + withOnyx({ + user: { + key: ONYXKEYS.USER, + }, + }), +)(LoungeAccessPage); diff --git a/src/pages/settings/userPropTypes.js b/src/pages/settings/userPropTypes.js index 7b1461df9623..370171101e36 100644 --- a/src/pages/settings/userPropTypes.js +++ b/src/pages/settings/userPropTypes.js @@ -12,4 +12,7 @@ export default PropTypes.shape({ /** Whether the form is being submitted */ loading: PropTypes.bool, + + /** Whether or not the user has lounge access */ + hasLoungeAccess: PropTypes.bool, }); From b0c4b69b28d1840442dc5327e5254141ba4b5723 Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Thu, 22 Jun 2023 16:51:18 -0700 Subject: [PATCH 371/826] Move Lounge Access Page --- .../AppNavigator/ModalStackNavigators.js | 2 +- .../{ => Profile}/LoungeAccessPage.js | 30 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) rename src/pages/settings/{ => Profile}/LoungeAccessPage.js (79%) diff --git a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js index 7f5b1a22d8df..518ff33b0ad4 100644 --- a/src/libs/Navigation/AppNavigator/ModalStackNavigators.js +++ b/src/libs/Navigation/AppNavigator/ModalStackNavigators.js @@ -466,7 +466,7 @@ const SettingsModalStackNavigator = createModalStackNavigator([ }, { getComponent: () => { - const SettingsLoungeAccessPage = require('../../../pages/settings/LoungeAccessPage').default; + const SettingsLoungeAccessPage = require('../../../pages/settings/Profile/LoungeAccessPage').default; return SettingsLoungeAccessPage; }, name: 'Settings_Lounge_Access', diff --git a/src/pages/settings/LoungeAccessPage.js b/src/pages/settings/Profile/LoungeAccessPage.js similarity index 79% rename from src/pages/settings/LoungeAccessPage.js rename to src/pages/settings/Profile/LoungeAccessPage.js index 89db90e558cd..cc6a369cf9c4 100644 --- a/src/pages/settings/LoungeAccessPage.js +++ b/src/pages/settings/Profile/LoungeAccessPage.js @@ -2,21 +2,21 @@ import _ from 'underscore'; import React from 'react'; import {View, ScrollView} from 'react-native'; import {withOnyx} from 'react-native-onyx'; -import HeaderWithBackButton from '../../components/HeaderWithBackButton'; -import Navigation from '../../libs/Navigation/Navigation'; -import ROUTES from '../../ROUTES'; -import styles from '../../styles/styles'; -import Text from '../../components/Text'; -import ScreenWrapper from '../../components/ScreenWrapper'; -import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../components/withWindowDimensions'; -import MenuItem from '../../components/MenuItem'; -import compose from '../../libs/compose'; -import * as Illustrations from '../../components/Icon/Illustrations'; -import CONST from '../../CONST'; -import ONYXKEYS from '../../ONYXKEYS'; -import userPropTypes from './userPropTypes'; -import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; +import HeaderWithBackButton from '../../../components/HeaderWithBackButton'; +import Navigation from '../../../libs/Navigation/Navigation'; +import ROUTES from '../../../ROUTES'; +import styles from '../../../styles/styles'; +import Text from '../../../components/Text'; +import ScreenWrapper from '../../../components/ScreenWrapper'; +import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize'; +import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; +import MenuItem from '../../../components/MenuItem'; +import compose from '../../../libs/compose'; +import * as Illustrations from '../../../components/Icon/Illustrations'; +import CONST from '../../../CONST'; +import ONYXKEYS from '../../../ONYXKEYS'; +import userPropTypes from '../userPropTypes'; +import FullPageNotFoundView from '../../../components/BlockingViews/FullPageNotFoundView'; const propTypes = { ...withLocalizePropTypes, From 905fce562d0aa5b9f37b9c575aa98273710ad007 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 22 Jun 2023 18:04:33 -0700 Subject: [PATCH 372/826] Release pending versions before submitting a new version for review --- fastlane/Fastfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 60d60934c2ba..80d1fa5ee6a7 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -243,6 +243,25 @@ platform :ios do desc "Move app to App Store Review" lane :production do + # Login to Spaceship + fastlane_require 'spaceship' + teamID = "368M544MTT" + Spaceship::ConnectAPI.login( + use_portal: false, + tunes_team_id: teamID, + ) + + # Find our app + app = Spaceship::ConnectAPI::App.find("com.chat.expensify.chat") + if app.nil? + UI.important "not found in team #{teamID} on ASC!" + next + end + + # If there's an app that's Pending Developer Release, release it before continuing with the new version + pendingReviewVersion = app.get_pending_release_app_store_version + version.create_app_store_version_release_request unless version.nil? + deliver( api_key_path: "./ios/ios-fastlane-json-key.json", From 48125e26ad0b6badffcc672c6466600217a8f622 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 22 Jun 2023 18:10:04 -0700 Subject: [PATCH 373/826] Add code in null safety check --- fastlane/Fastfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 80d1fa5ee6a7..994a6d7d9bfd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -256,12 +256,12 @@ platform :ios do if app.nil? UI.important "not found in team #{teamID} on ASC!" next + else + # If there's an app that's Pending Developer Release, release it before continuing with the new version + pendingReviewVersion = app.get_pending_release_app_store_version + version.create_app_store_version_release_request unless version.nil? end - # If there's an app that's Pending Developer Release, release it before continuing with the new version - pendingReviewVersion = app.get_pending_release_app_store_version - version.create_app_store_version_release_request unless version.nil? - deliver( api_key_path: "./ios/ios-fastlane-json-key.json", From 308e450c3b848912a83643648d8d2dfb00d2342d Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 08:19:04 +0700 Subject: [PATCH 374/826] remove redundant --- ios/Podfile.lock | 6 +++--- src/libs/Permissions.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 80ba0e0b5b79..048eeca5f76f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1024,7 +1024,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1067,7 +1067,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 + RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1141,4 +1141,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index cf4904cce6e5..d3e407260e20 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -99,7 +99,7 @@ function canUsePasswordlessLogins(betas) { * @returns {Boolean} */ function canUseTasks(betas) { - return true + return _.contains(betas, CONST.BETAS.TASKS) || _.contains(betas, CONST.BETAS.ALL); } export default { From d19b94313b40f92cb5cb4cb6b0f48fd3871eedff Mon Sep 17 00:00:00 2001 From: Ionatan Wiznia Date: Thu, 22 Jun 2023 22:20:23 -0300 Subject: [PATCH 375/826] Fix extractLinksFromMessageHtml so ExpandURLPreview is not called needlessly --- src/libs/ReportActionsUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportActionsUtils.js b/src/libs/ReportActionsUtils.js index f57084c9f0e0..5c9b62ca47d9 100644 --- a/src/libs/ReportActionsUtils.js +++ b/src/libs/ReportActionsUtils.js @@ -182,7 +182,7 @@ function getMostRecentIOURequestActionID(reportActions) { * Returns array of links inside a given report action * * @param {Object} reportAction - * @returns {Boolean} + * @returns {Array} */ function extractLinksFromMessageHtml(reportAction) { const htmlContent = lodashGet(reportAction, ['message', 0, 'html']); @@ -191,7 +191,7 @@ function extractLinksFromMessageHtml(reportAction) { const regex = /]*?\s+)?href="([^"]*)"/gi; if (!htmlContent) { - return; + return []; } return _.map([...htmlContent.matchAll(regex)], (match) => match[1]); From 86f29aab7cd21b71e9944a7716c1a1ccc8facb97 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 08:21:18 +0700 Subject: [PATCH 376/826] remove redundant --- src/components/AttachmentCarousel/index.js | 6 ++---- src/components/AttachmentView.js | 3 +-- src/components/PDFView/PDFPasswordForm.js | 6 ------ src/components/PDFView/index.js | 2 +- src/components/PDFView/pdfViewPropTypes.js | 2 +- 5 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index 71dec1a56342..d25d87a3ba49 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -195,7 +195,7 @@ class AttachmentCarousel extends React.Component { shouldShowArrow: this.canUseTouchScreen, containerWidth: 0, isZoomed: false, - activeSource: null + activeSource: null, }; } @@ -227,15 +227,13 @@ class AttachmentCarousel extends React.Component { */ updatePage({viewableItems}) { Keyboard.dismiss(); - console.log("updatePage", viewableItems) // Since we can have only one item in view at a time, we can use the first item in the array // to get the index of the current page const entry = _.first(viewableItems); if (!entry) { - this.setState({ activeSource: null }); + this.setState({activeSource: null}); return; } - console.log('entry.item', entry.item); const page = entry.index; this.props.onNavigate(entry.item); diff --git a/src/components/AttachmentView.js b/src/components/AttachmentView.js index 28ff43a46cff..6ce10e364194 100755 --- a/src/components/AttachmentView.js +++ b/src/components/AttachmentView.js @@ -63,7 +63,7 @@ const defaultProps = { onScaleChanged: () => {}, onToggleKeyboard: () => {}, containerStyles: [], - isFocused: false + isFocused: false, }; function AttachmentView(props) { @@ -85,7 +85,6 @@ function AttachmentView(props) { // will appear with a source that is a blob if (Str.isPDF(props.source) || (props.file && Str.isPDF(props.file.name || props.translate('attachmentView.unknownFilename')))) { const sourceURL = props.isAuthTokenRequired ? addEncryptedAuthTokenToURL(props.source) : props.source; - console.log("AttachmentView: ", props.isFocused) const children = ( {this.state.shouldRequestPassword && ( this.setState({isPasswordInvalid: false})} isPasswordInvalid={this.state.isPasswordInvalid} diff --git a/src/components/PDFView/pdfViewPropTypes.js b/src/components/PDFView/pdfViewPropTypes.js index 0b1cb1ca7ad2..d965234b799a 100644 --- a/src/components/PDFView/pdfViewPropTypes.js +++ b/src/components/PDFView/pdfViewPropTypes.js @@ -33,7 +33,7 @@ const defaultProps = { onToggleKeyboard: () => {}, onScaleChanged: () => {}, onLoadComplete: () => {}, - isFocused: false + isFocused: false, }; export {propTypes, defaultProps}; From d9395caa63398fd667d5dedea1c5a2d14ebef287 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Fri, 23 Jun 2023 04:31:53 +0100 Subject: [PATCH 377/826] remove the selection prop from the task description input fields --- src/libs/actions/Task.js | 20 ++++++++++++++++++ src/pages/tasks/NewTaskDescriptionPage.js | 25 ++--------------------- src/pages/tasks/TaskDescriptionPage.js | 19 ++--------------- 3 files changed, 24 insertions(+), 40 deletions(-) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 5e27d7db764d..37d37e69e5eb 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -672,6 +672,25 @@ function isTaskAssigneeOrTaskOwner(taskReport, sessionAccountID) { return sessionAccountID === getTaskOwnerAccountID(taskReport) || sessionAccountID === getTaskAssigneeAccountID(taskReport); } +/** + * Focus the task description text input and place the cursor at the end of the value (if there is a value in the input). + * + * @param {Object} input the input element + */ +function focusAndUpdateTaskDescriptionInputRange(input) { + if (!input) { + return; + } + + input.focus(); + if (input.value && input.setSelectionRange) { + const length = input.value.length; + input.setSelectionRange(length, length); + // eslint-disable-next-line no-param-reassign + input.scrollTop = input.scrollHeight; + } +} + export { createTaskAndNavigate, editTaskAndNavigate, @@ -693,4 +712,5 @@ export { dismissModalAndClearOutTaskInfo, getTaskAssigneeAccountID, isTaskAssigneeOrTaskOwner, + focusAndUpdateTaskDescriptionInputRange, }; diff --git a/src/pages/tasks/NewTaskDescriptionPage.js b/src/pages/tasks/NewTaskDescriptionPage.js index e18615a34ffe..771559d8bb53 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.js +++ b/src/pages/tasks/NewTaskDescriptionPage.js @@ -1,4 +1,4 @@ -import React, {useEffect, useRef, useState} from 'react'; +import React, {useRef} from 'react'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; @@ -38,17 +38,6 @@ const defaultProps = { function NewTaskDescriptionPage(props) { const inputRef = useRef(null); - // The selection will be used to place the cursor at the end if there is prior text in the text input area - const [selection, setSelection] = useState({start: 0, end: 0}); - - // eslint-disable-next-line rulesdir/prefer-early-return - useEffect(() => { - if (props.task.description) { - const length = props.task.description.length; - setSelection({start: length, end: length}); - } - }, [props.task.description]); - // On submit, we want to call the assignTask function and wait to validate // the response const onSubmit = (values) => { @@ -63,13 +52,7 @@ function NewTaskDescriptionPage(props) { return ( { - if (!inputRef.current) { - return; - } - - inputRef.current.focus(); - }} + onEntryTransitionEnd={() => TaskUtils.focusAndUpdateTaskDescriptionInputRange(inputRef.current)} > { - setSelection(e.nativeEvent.selection); - }} /> diff --git a/src/pages/tasks/TaskDescriptionPage.js b/src/pages/tasks/TaskDescriptionPage.js index 2791358a912d..fced5a5ac306 100644 --- a/src/pages/tasks/TaskDescriptionPage.js +++ b/src/pages/tasks/TaskDescriptionPage.js @@ -1,4 +1,4 @@ -import React, {useCallback, useEffect, useRef, useState} from 'react'; +import React, {useCallback, useRef} from 'react'; import PropTypes from 'prop-types'; import {View} from 'react-native'; import {withOnyx} from 'react-native-onyx'; @@ -48,21 +48,10 @@ function TaskDescriptionPage(props) { const inputRef = useRef(null); - // Same as NewtaskDescriptionPage, use the selection to place the cursor correctly if there is prior text - const [selection, setSelection] = useState({start: 0, end: 0}); - - // eslint-disable-next-line rulesdir/prefer-early-return - useEffect(() => { - if (props.task.report && props.task.report.description) { - const length = props.task.report.description.length; - setSelection({start: length, end: length}); - } - }, [props.task.report]); - return ( inputRef.current && inputRef.current.focus()} + onEntryTransitionEnd={() => TaskUtils.focusAndUpdateTaskDescriptionInputRange(inputRef.current)} >
{ - setSelection(e.nativeEvent.selection); - }} />
From ca3b987f8910818b42c0a6e3c9055b7df70f4d1f Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 23 Jun 2023 11:00:36 +0700 Subject: [PATCH 378/826] revert isParentReport solution --- src/components/ShowContextMenuContext.js | 4 +--- src/libs/ReportUtils.js | 1 - .../ContextMenu/BaseReportActionContextMenu.js | 2 -- .../home/report/ContextMenu/ContextMenuActions.js | 14 ++++++-------- .../ContextMenu/PopoverReportActionContextMenu.js | 6 ------ .../report/ContextMenu/ReportActionContextMenu.js | 3 --- .../genericReportActionContextMenuPropTypes.js | 4 ---- src/pages/home/report/ReportActionItem.js | 15 +++------------ .../home/report/ReportActionItemParentAction.js | 10 +--------- 9 files changed, 11 insertions(+), 48 deletions(-) diff --git a/src/components/ShowContextMenuContext.js b/src/components/ShowContextMenuContext.js index f7c38f74a3f2..df522dec8f10 100644 --- a/src/components/ShowContextMenuContext.js +++ b/src/components/ShowContextMenuContext.js @@ -21,9 +21,8 @@ ShowContextMenuContext.displayName = 'ShowContextMenuContext'; * @param {Object} action - ReportAction for ContextMenu * @param {Function} checkIfContextMenuActive Callback to update context menu active state * @param {Boolean} [isArchivedRoom=false] - Is the report an archived room - * @param {Boolean} [isParentReport=false] - Is the report action from parent report */ -function showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive, isArchivedRoom = false, isParentReport = false) { +function showContextMenuForReport(event, anchor, reportID, action, checkIfContextMenuActive, isArchivedRoom = false) { if (!DeviceCapabilities.canUseTouchScreen()) { return; } @@ -38,7 +37,6 @@ function showContextMenuForReport(event, anchor, reportID, action, checkIfContex checkIfContextMenuActive, checkIfContextMenuActive, isArchivedRoom, - isParentReport, ); } diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index d0fb7ba1a6e1..64c52c37f2d7 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -553,7 +553,6 @@ function isThreadParent(reportAction) { /** * Returns true if reportAction is the first chat preview of a Thread * - * @deprecated * @param {Object} reportAction * @param {String} reportID * @returns {Boolean} diff --git a/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js index 1410867de180..0a1846cfb324 100755 --- a/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js @@ -63,7 +63,6 @@ class BaseReportActionContextMenu extends React.Component { this.props.reportID, this.props.isPinnedChat, this.props.isUnreadChat, - this.props.isParentReport, ); /** @@ -95,7 +94,6 @@ class BaseReportActionContextMenu extends React.Component { const payload = { reportAction: this.props.reportAction, reportID: this.props.reportID, - isParentReport: this.props.isParentReport, draftMessage: this.props.draftMessage, selection: this.props.selection, close: () => this.setState({shouldKeepOpen: false}), diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 115c2ac1e8e1..9f01db925abb 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -112,8 +112,8 @@ export default [ icon: Expensicons.ChatBubble, successTextTranslateKey: '', successIcon: null, - shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat, isParentReport) => - type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !isParentReport, + shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => + type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID), onPress: (closePopover, {reportAction, reportID}) => { Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); if (closePopover) { @@ -203,11 +203,10 @@ export default [ const isAttachmentTarget = lodashGet(menuTarget, 'tagName') === 'IMG' && isAttachment; return Permissions.canUseCommentLinking(betas) && type === CONTEXT_MENU_TYPES.REPORT_ACTION && !isAttachmentTarget && !ReportActionUtils.isMessageDeleted(reportAction); }, - onPress: (closePopover, {reportID, reportAction, isParentReport}) => { + onPress: (closePopover, {reportAction, reportID}) => { Environment.getEnvironmentURL().then((environmentURL) => { const reportActionID = parseInt(lodashGet(reportAction, 'reportActionID'), 10); - const activeReportID = isParentReport ? reportAction.childReportID : reportID; - Clipboard.setString(`${environmentURL}/r/${activeReportID}/${reportActionID}`); + Clipboard.setString(`${environmentURL}/r/${reportID}/${reportActionID}`); }); hideContextMenu(true, ReportActionComposeFocusManager.focus); }, @@ -220,9 +219,8 @@ export default [ successIcon: Expensicons.Checkmark, shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat, isUnreadChat) => type === CONTEXT_MENU_TYPES.REPORT_ACTION || (type === CONTEXT_MENU_TYPES.REPORT && !isUnreadChat), - onPress: (closePopover, {reportAction, reportID, isParentReport}) => { - const activeReportID = isParentReport ? reportAction.childReportID : reportID; - Report.markCommentAsUnread(activeReportID, reportAction.created); + onPress: (closePopover, {reportAction, reportID}) => { + Report.markCommentAsUnread(reportID, reportAction.created); if (closePopover) { hideContextMenu(true, ReportActionComposeFocusManager.focus); } diff --git a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js index bce6ab1dc123..40aef91e8d45 100644 --- a/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/PopoverReportActionContextMenu.js @@ -41,7 +41,6 @@ class PopoverReportActionContextMenu extends React.Component { isChronosReport: false, isPinnedChat: false, isUnreadChat: false, - isParentReport: false, }; this.onPopoverShow = () => {}; this.onPopoverHide = () => {}; @@ -131,7 +130,6 @@ class PopoverReportActionContextMenu extends React.Component { * @param {Boolean} isChronosReport - Flag to check if the chat participant is Chronos * @param {Boolean} isPinnedChat - Flag to check if the chat is pinned in the LHN. Used for the Pin/Unpin action * @param {Boolean} isUnreadChat - Flag to check if the chat is unread in the LHN. Used for the Mark as Read/Unread action - * @param {Boolean} [isParentReport] - Is the report action from parent report */ showContextMenu( type, @@ -147,7 +145,6 @@ class PopoverReportActionContextMenu extends React.Component { isChronosReport = false, isPinnedChat = false, isUnreadChat = false, - isParentReport = false, ) { const nativeEvent = event.nativeEvent || {}; this.contextMenuAnchor = contextMenuAnchor; @@ -180,7 +177,6 @@ class PopoverReportActionContextMenu extends React.Component { isChronosReport, isPinnedChat, isUnreadChat, - isParentReport, }); }); } @@ -270,7 +266,6 @@ class PopoverReportActionContextMenu extends React.Component { isChronosReport: false, isPinnedChat: false, isUnreadChat: false, - isParentReport: false, }); } @@ -319,7 +314,6 @@ class PopoverReportActionContextMenu extends React.Component { isChronosReport={this.state.isChronosReport} isPinnedChat={this.state.isPinnedChat} isUnreadChat={this.state.isUnreadChat} - isParentReport={this.state.isParentReport} anchor={this.contextMenuTargetNode} contentRef={this.contentRef} /> diff --git a/src/pages/home/report/ContextMenu/ReportActionContextMenu.js b/src/pages/home/report/ContextMenu/ReportActionContextMenu.js index 1c395429c8ae..711a3be109d7 100644 --- a/src/pages/home/report/ContextMenu/ReportActionContextMenu.js +++ b/src/pages/home/report/ContextMenu/ReportActionContextMenu.js @@ -18,7 +18,6 @@ const contextMenuRef = React.createRef(); * @param {Boolean} isChronosReport - Flag to check if the chat participant is Chronos * @param {Boolean} isPinnedChat - Flag to check if the chat is pinned in the LHN. Used for the Pin/Unpin action * @param {Boolean} isUnreadChat - Flag to check if the chat has unread messages in the LHN. Used for the Mark as Read/Unread action - * @param {Boolean} [isParentReport] - Is the report action from parent report */ function showContextMenu( type, @@ -34,7 +33,6 @@ function showContextMenu( isChronosReport = false, isPinnedChat = false, isUnreadChat = false, - isParentReport = false, ) { if (!contextMenuRef.current) { return; @@ -53,7 +51,6 @@ function showContextMenu( isChronosReport, isPinnedChat, isUnreadChat, - isParentReport, ); } diff --git a/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js b/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js index 596d5bd907f2..f62873031c54 100644 --- a/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js +++ b/src/pages/home/report/ContextMenu/genericReportActionContextMenuPropTypes.js @@ -8,9 +8,6 @@ const propTypes = { /** The report action this context menu is attached to. */ reportAction: PropTypes.shape(reportActionPropTypes).isRequired, - /** Is the report action from parent report */ - isParentReport: PropTypes.bool, - /** If true, this component will be a small, row-oriented menu that displays icons but not text. If false, this component will be a larger, column-oriented menu that displays icons alongside text in each row. */ isMini: PropTypes.bool, @@ -26,7 +23,6 @@ const propTypes = { }; const defaultProps = { - isParentReport: false, isMini: false, isVisible: false, selection: '', diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index b96bc67bc292..d17a12cbc7d6 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -71,9 +71,6 @@ const propTypes = { /** Is this the most recent IOU Action? */ isMostRecentIOUReportAction: PropTypes.bool.isRequired, - /** Is this the action from parent report */ - isParentReport: PropTypes.bool, - /** Should we display the new marker on top of the comment? */ shouldDisplayNewMarker: PropTypes.bool.isRequired, @@ -103,7 +100,6 @@ const defaultProps = { personalDetails: {}, shouldShowSubscriptAvatar: false, hasOutstandingIOU: false, - isParentReport: false, }; function ReportActionItem(props) { @@ -187,12 +183,9 @@ function ReportActionItem(props) { toggleContextMenuFromActiveReportAction, ReportUtils.isArchivedRoom(props.report), ReportUtils.chatIncludesChronos(props.report), - undefined, - undefined, - props.isParentReport, ); }, - [props.draftMessage, props.action, props.report, props.isParentReport, toggleContextMenuFromActiveReportAction], + [props.draftMessage, props.action, props.report, toggleContextMenuFromActiveReportAction], ); const toggleReaction = useCallback( @@ -329,7 +322,7 @@ function ReportActionItem(props) { const numberOfThreadReplies = _.get(props, ['action', 'childVisibleActionCount'], 0); const hasReplies = numberOfThreadReplies > 0; - const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !props.isParentReport; + const shouldDisplayThreadReplies = hasReplies && props.action.childCommenterCount && !ReportUtils.isThreadFirstChat(props.action, props.report.reportID); const oldestFourAccountIDs = lodashGet(props.action, 'childOldestFourAccountIDs', '').split(','); const draftMessageRightAlign = props.draftMessage ? styles.chatItemReactionsDraftRight : {}; @@ -450,7 +443,6 @@ function ReportActionItem(props) { isVisible={hovered && !props.draftMessage && !hasErrors} draftMessage={props.draftMessage} isChronosReport={ReportUtils.chatIncludesChronos(props.report)} - isParentReport={props.isParentReport} /> {parentReportAction && ( `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, }, - parentReport: { - key: ({parentReportID}) => `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`, - }, parentReportActions: { key: ({parentReportID}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${parentReportID}`, canEvict: false, From 05a9634b3542955de53512ac2d46961194c50eef Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 12:07:08 +0800 Subject: [PATCH 379/826] don't strikethorugh the text --- src/pages/ReimbursementAccount/ContinueBankAccountSetup.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js index 4eca196d328a..592ae2b9a24a 100644 --- a/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js +++ b/src/pages/ReimbursementAccount/ContinueBankAccountSetup.js @@ -60,7 +60,6 @@ function ContinueBankAccountSetup(props) { icon={Illustrations.BankArrow} > Date: Fri, 23 Jun 2023 12:07:37 +0800 Subject: [PATCH 380/826] reduce the opacity when disabled --- src/components/MenuItem.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index eae6069783f3..c96bfaea3f31 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -79,7 +79,7 @@ function MenuItem(props) { props.icon && !_.isArray(props.icon) ? styles.ml3 : undefined, props.shouldShowBasicTitle ? undefined : styles.textStrong, props.shouldShowHeaderTitle ? styles.textHeadlineH1 : undefined, - props.interactive && props.disabled ? {...styles.disabledText, ...styles.userSelectNone} : undefined, + props.interactive && props.disabled ? {...styles.userSelectNone} : undefined, styles.pre, styles.ltr, isDeleted ? styles.offlineFeedback.deleted : undefined, @@ -119,6 +119,7 @@ function MenuItem(props) { StyleUtils.getButtonBackgroundColorStyle(getButtonState(props.focused || hovered, pressed, props.success, props.disabled, props.interactive), true), (hovered || pressed) && props.hoverAndPressStyle, ...(_.isArray(props.wrapperStyle) ? props.wrapperStyle : [props.wrapperStyle]), + props.disabled && styles.buttonOpacityDisabled, ]} disabled={props.disabled} ref={props.forwardedRef} From b552d39f8633f38482fd7fce941a67db117cde1b Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 12:37:08 +0800 Subject: [PATCH 381/826] handle the disable state correctly --- .../Pressable/PressableWithFeedback.js | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/components/Pressable/PressableWithFeedback.js b/src/components/Pressable/PressableWithFeedback.js index 7596c9bf8945..737017b4b3d4 100644 --- a/src/components/Pressable/PressableWithFeedback.js +++ b/src/components/Pressable/PressableWithFeedback.js @@ -1,4 +1,4 @@ -import React, {forwardRef, useEffect, useState} from 'react'; +import React, {forwardRef, useMemo, useState} from 'react'; import _ from 'underscore'; import propTypes from 'prop-types'; import {InteractionManager} from 'react-native'; @@ -39,25 +39,22 @@ const PressableWithFeedbackDefaultProps = { const PressableWithFeedback = forwardRef((props, ref) => { const propsWithoutWrapperStyles = _.omit(props, omittedProps); - const [disabled, setDisabled] = useState(props.disabled); - const [isPressed, setIsPressed] = useState(false); + const [isPressed, setPressed] = useState(false); + const [isPressedIn, setPressedIn] = useState(false); const [isHovered, setIsHovered] = useState(false); - - useEffect(() => { - setDisabled(props.disabled); - }, [props.disabled]); + const isDisabled = useMemo(() => props.disabled || isPressed, [props.disabled, isPressed]); return ( { setIsHovered(true); if (props.onHoverIn) props.onHoverIn(); @@ -67,23 +64,23 @@ const PressableWithFeedback = forwardRef((props, ref) => { if (props.onHoverOut) props.onHoverOut(); }} onPressIn={() => { - setIsPressed(true); + setPressedIn(true); if (props.onPressIn) props.onPressIn(); }} onPressOut={() => { - setIsPressed(false); + setPressedIn(false); if (props.onPressOut) props.onPressOut(); }} onPress={(e) => { - setDisabled(true); + setPressed(true); const onPress = props.onPress(e); InteractionManager.runAfterInteractions(() => { if (!(onPress instanceof Promise)) { - setDisabled(props.disabled); + setPressed(false); return; } onPress.finally(() => { - setDisabled(props.disabled); + setPressed(false); }); }); }} From 3cd5d8091ccdd88d2ce41df4db7229f8f954af24 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 12:28:13 +0700 Subject: [PATCH 382/826] update regex --- src/CONST.js | 4 ++-- src/libs/Permissions.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index f8ac136e720a..74ef2b2052d8 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -1151,7 +1151,7 @@ const CONST = { SPECIAL_CHAR_OR_EMOJI: // eslint-disable-next-line no-misleading-character-class - /[\n\s,/?"{}[\]()&^%$#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, + /[\n\s,/?"{}[\]()&^%\\;`$#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, SPACE_OR_EMOJI: // eslint-disable-next-line no-misleading-character-class @@ -1160,7 +1160,7 @@ const CONST = { // Define the regular expression pattern to match a string starting with an at sign and ending with a space or newline character MENTION_REPLACER: // eslint-disable-next-line no-misleading-character-class - /^@[^\n\r]*?(?=$|[\s,/?"{}[\]()&^%$#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3)/u, + /^@[^\n\r]*?(?=$|[\s,/?"{}[\]()&^%\\;`$#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3)/u, MERGED_ACCOUNT_PREFIX: /^(MERGED_\d+@)/, diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index d3e407260e20..cf4904cce6e5 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -99,7 +99,7 @@ function canUsePasswordlessLogins(betas) { * @returns {Boolean} */ function canUseTasks(betas) { - return _.contains(betas, CONST.BETAS.TASKS) || _.contains(betas, CONST.BETAS.ALL); + return true } export default { From 86231ef02b2db01c8e266e0c9fc8259af42477b7 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 12:32:49 +0700 Subject: [PATCH 383/826] update the condition to display attachment on LHN --- src/libs/ReportUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 64a07113cb51..75476f3c36a5 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1002,10 +1002,10 @@ function getReportName(report) { } const isAttachment = _.has(parentReportAction, 'isAttachment') ? parentReportAction.isAttachment : isReportMessageAttachment(_.last(lodashGet(parentReportAction, 'message', [{}]))); - if (isAttachment) { + const parentReportActionMessage = lodashGet(parentReportAction, ['message', 0, 'text'], '').replace(/(\r\n|\n|\r)/gm, ' '); + if (isAttachment && parentReportActionMessage) { return `[${Localize.translateLocal('common.attachment')}]`; } - const parentReportActionMessage = lodashGet(parentReportAction, ['message', 0, 'text'], '').replace(/(\r\n|\n|\r)/gm, ' '); return parentReportActionMessage || Localize.translateLocal('parentReportAction.deletedMessage'); } if (isChatRoom(report) || isTaskReport(report)) { From 1a35e4a590d06fca1cea954696fc2c55c52be205 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 23 Jun 2023 13:43:25 +0700 Subject: [PATCH 384/826] use original report id --- src/libs/ReportUtils.js | 13 ++++++++++ src/libs/actions/Report.js | 49 +++++++++++++++++++++----------------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index c2e793411ed8..14e89bcd7e59 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2258,6 +2258,18 @@ function getParentReport(report) { return lodashGet(allReports, `${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`, {}); } +/** + * Returns the parentReportID if the given report is a thread else returns the current reportID. + * + * @param {String} reportID + * @param {Object} reportAction + * @returns {String} + */ +function getOriginalReportID(reportID, reportAction) { + return isThreadFirstChat(reportAction, reportID) ? + lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, 'parentReportID']) : reportID; +} + export { getReportParticipantsTitle, isReportMessageAttachment, @@ -2350,4 +2362,5 @@ export { getMoneyRequestAction, getBankAccountRoute, getParentReport, + getOriginalReportID, }; diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index c5c5aa2250c3..8b9eb44ef91b 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -821,6 +821,7 @@ Onyx.connect({ * @param {Object} reportAction */ function deleteReportComment(reportID, reportAction) { + const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction); const reportActionID = reportAction.reportActionID; const deletedMessage = [ { @@ -846,9 +847,9 @@ function deleteReportComment(reportID, reportAction) { lastMessageText: '', lastVisibleActionCreated: '', }; - const lastMessageText = ReportActionsUtils.getLastVisibleMessageText(reportID, optimisticReportActions); + const lastMessageText = ReportActionsUtils.getLastVisibleMessageText(originalReportID, optimisticReportActions); if (lastMessageText.length > 0) { - const lastVisibleActionCreated = ReportActionsUtils.getLastVisibleAction(reportID, optimisticReportActions).created; + const lastVisibleActionCreated = ReportActionsUtils.getLastVisibleAction(originalReportID, optimisticReportActions).created; optimisticReport = { lastMessageText, lastVisibleActionCreated, @@ -860,7 +861,7 @@ function deleteReportComment(reportID, reportAction) { const failureData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { message: reportAction.message, @@ -874,7 +875,7 @@ function deleteReportComment(reportID, reportAction) { const successData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { pendingAction: null, @@ -887,19 +888,19 @@ function deleteReportComment(reportID, reportAction) { const optimisticData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: optimisticReportActions, }, { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT}${originalReportID}`, value: optimisticReport, }, ]; const parameters = { - reportID, - reportActionID: reportAction.reportActionID, + reportID: originalReportID, + reportActionID, }; API.write('DeleteComment', parameters, {optimisticData, successData, failureData}); } @@ -952,6 +953,7 @@ const handleUserDeletedLinksInHtml = (newCommentText, originalHtml) => { */ function editReportComment(reportID, originalReportAction, textForNewComment) { const parser = new ExpensiMark(); + const originalReportID = ReportUtils.getOriginalReportID(reportID, originalReportAction); // Do not autolink if someone explicitly tries to remove a link from message. // https://github.com/Expensify/App/issues/9090 @@ -970,7 +972,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) { // Delete the comment if it's empty if (_.isEmpty(htmlForNewComment)) { - deleteReportComment(reportID, originalReportAction); + deleteReportComment(originalReportID, originalReportAction); return; } @@ -999,12 +1001,12 @@ function editReportComment(reportID, originalReportAction, textForNewComment) { const optimisticData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: optimisticReportActions, }, ]; - const lastVisibleAction = ReportActionsUtils.getLastVisibleAction(reportID, optimisticReportActions); + const lastVisibleAction = ReportActionsUtils.getLastVisibleAction(originalReportID, optimisticReportActions); if (reportActionID === lastVisibleAction.reportActionID) { const lastMessageText = ReportUtils.formatReportLastMessageText(reportComment); const optimisticReport = { @@ -1012,7 +1014,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) { }; optimisticData.push({ onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT}${originalReportID}`, value: optimisticReport, }); } @@ -1020,7 +1022,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) { const failureData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { ...originalReportAction, @@ -1033,7 +1035,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) { const successData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { pendingAction: null, @@ -1043,7 +1045,7 @@ function editReportComment(reportID, originalReportAction, textForNewComment) { ]; const parameters = { - reportID, + reportID: originalReportID, reportComment: htmlForNewComment, reportActionID, }; @@ -1528,6 +1530,7 @@ function hasAccountIDReacted(accountID, users, skinTone) { * @param {number} [skinTone] Optional. */ function addEmojiReaction(reportID, originalReportAction, emoji, skinTone = preferredSkinTone) { + const originalReportID = ReportUtils.getOriginalReportID(reportID, originalReportAction); const message = originalReportAction.message[0]; let reactionObject = message.reactions && _.find(message.reactions, (reaction) => reaction.emoji === emoji.name); const needToInsertReactionObject = !reactionObject; @@ -1559,10 +1562,10 @@ function addEmojiReaction(reportID, originalReportAction, emoji, skinTone = pref }; // Optimistically update the reportAction with the reaction - const optimisticData = getOptimisticDataForReportActionUpdate(originalReportAction, updatedMessage, reportID); + const optimisticData = getOptimisticDataForReportActionUpdate(originalReportAction, updatedMessage, originalReportID); const parameters = { - reportID, + reportID: originalReportID, skinTone, emojiCode: emoji.name, sequenceNumber: originalReportAction.sequenceNumber, @@ -1578,6 +1581,7 @@ function addEmojiReaction(reportID, originalReportAction, emoji, skinTone = pref * @param {{ name: string, code: string, types: string[] }} emoji */ function removeEmojiReaction(reportID, originalReportAction, emoji) { + const originalReportID = ReportUtils.getOriginalReportID(reportID, originalReportAction); const message = originalReportAction.message[0]; const reactionObject = message.reactions && _.find(message.reactions, (reaction) => reaction.emoji === emoji.name); if (!reactionObject) { @@ -1610,10 +1614,10 @@ function removeEmojiReaction(reportID, originalReportAction, emoji) { }; // Optimistically update the reportAction with the reaction - const optimisticData = getOptimisticDataForReportActionUpdate(originalReportAction, updatedMessage, reportID); + const optimisticData = getOptimisticDataForReportActionUpdate(originalReportAction, updatedMessage, originalReportID); const parameters = { - reportID, + reportID: originalReportID, sequenceNumber: originalReportAction.sequenceNumber, reportActionID: originalReportAction.reportActionID, emojiCode: emoji.name, @@ -1739,6 +1743,7 @@ function openLastOpenedPublicRoom(lastOpenedPublicRoomID) { * @param {String} severity */ function flagComment(reportID, reportAction, severity) { + const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction); const message = reportAction.message[0]; let updatedDecision; if (severity === CONST.MODERATION.FLAG_SEVERITY_SPAM || severity === CONST.MODERATION.FLAG_SEVERITY_INCONSIDERATE) { @@ -1773,7 +1778,7 @@ function flagComment(reportID, reportAction, severity) { const optimisticData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, @@ -1786,7 +1791,7 @@ function flagComment(reportID, reportAction, severity) { const failureData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { ...reportAction, @@ -1799,7 +1804,7 @@ function flagComment(reportID, reportAction, severity) { const successData = [ { onyxMethod: Onyx.METHOD.MERGE, - key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${reportID}`, + key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${originalReportID}`, value: { [reportActionID]: { pendingAction: null, From 15ffd44026ecc370f4164ff311d78f316480fc17 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 23 Jun 2023 13:46:43 +0700 Subject: [PATCH 385/826] remove unnecessary changes --- src/pages/home/report/ReportActionItemMessageEdit.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pages/home/report/ReportActionItemMessageEdit.js b/src/pages/home/report/ReportActionItemMessageEdit.js index 56b78a73ae50..c5b092487d70 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.js +++ b/src/pages/home/report/ReportActionItemMessageEdit.js @@ -208,18 +208,14 @@ function ReportActionItemMessageEdit(props) { const trimmedNewDraft = draft.trim(); - // If the reportActionID and parentReportActionID are the same then the user is editing the first message of a - // thread and we should pass the parentReportID instead of the reportID of the thread - const reportID = props.report.parentReportActionID === props.action.reportActionID ? props.report.parentReportID : props.reportID; - // When user tries to save the empty message, it will delete it. Prompt the user to confirm deleting. if (!trimmedNewDraft) { - ReportActionContextMenu.showDeleteModal(reportID, props.action, false, deleteDraft, () => InteractionManager.runAfterInteractions(() => textInputRef.current.focus())); + ReportActionContextMenu.showDeleteModal(props.reportID, props.action, false, deleteDraft, () => InteractionManager.runAfterInteractions(() => textInputRef.current.focus())); return; } - Report.editReportComment(reportID, props.action, trimmedNewDraft); + Report.editReportComment(props.reportID, props.action, trimmedNewDraft); deleteDraft(); - }, [props.action, debouncedSaveDraft, deleteDraft, draft, props.reportID, props.report]); + }, [props.action, debouncedSaveDraft, deleteDraft, draft, props.reportID]); /** * @param {String} emoji From 9862d02a66f027bbb7e98124518212f4a7762ae7 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 13:48:07 +0700 Subject: [PATCH 386/826] disable admin checkbox --- src/pages/workspace/WorkspaceMembersPage.js | 23 ++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 4c170deb9ec5..314778e14ff8 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -292,6 +292,7 @@ function WorkspaceMembersPage(props) { */ const renderItem = useCallback( ({item}) => { + const disabled = props.session.email === item.login || item.role === 'admin'; const hasError = !_.isEmpty(item.errors) || errors[item.accountID]; const isChecked = _.contains(selectedEmployees, Number(item.accountID)); return ( @@ -302,6 +303,7 @@ function WorkspaceMembersPage(props) { > toggleUser(item.accountID, item.pendingAction)} accessibilityRole="checkbox" accessibilityState={{ @@ -313,12 +315,14 @@ function WorkspaceMembersPage(props) { pressDimmingValue={0.7} > toggleUser(item.accountID, item.pendingAction)} /> 0 ? ( - _.contains(selectedEmployees, Number(accountID)))} + toggleAllUsers(removableMembers)} - /> + accessibilityRole="checkbox" + accessibilityState={{ + checked: !_.isEmpty(removableMembers) && _.every(_.keys(removableMembers), (accountID) => _.contains(selectedEmployees, Number(accountID))), + }} + // disable hover dimming + hoverDimmingValue={1} + pressDimmingValue={0.7} + > + _.contains(selectedEmployees, Number(accountID)))} + onPress={() => toggleAllUsers(removableMembers)} + /> + {props.translate('workspace.people.selectAll')} From 76b5c9eca38a9bd5ee3d708335ea11128aa13543 Mon Sep 17 00:00:00 2001 From: tienifr Date: Fri, 23 Jun 2023 13:52:21 +0700 Subject: [PATCH 387/826] fix lint --- src/libs/ReportUtils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 14e89bcd7e59..7102fc30bb49 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2266,8 +2266,7 @@ function getParentReport(report) { * @returns {String} */ function getOriginalReportID(reportID, reportAction) { - return isThreadFirstChat(reportAction, reportID) ? - lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, 'parentReportID']) : reportID; + return isThreadFirstChat(reportAction, reportID) ? lodashGet(allReports, [`${ONYXKEYS.COLLECTION.REPORT}${reportID}`, 'parentReportID']) : reportID; } export { From 9cab0d412a22e6caae3e03287d557c0a8763153e Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 14:07:15 +0700 Subject: [PATCH 388/826] hide emojiPicker when composer is hide --- src/libs/ReportUtils.js | 11 +++++++++++ src/pages/home/ReportScreen.js | 3 +++ src/pages/home/report/ReportFooter.js | 4 +--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 64a07113cb51..4c94a1891769 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2258,6 +2258,16 @@ function getParentReport(report) { return lodashGet(allReports, `${ONYXKEYS.COLLECTION.REPORT}${report.parentReportID}`, {}); } +/** + * Whether the composer should be hide + * @param {Object} report + * @param {Object} errors + * @returns {Boolean} + */ +function shouldHideComposer(report, errors) { + return isArchivedRoom(report) || !_.isEmpty(errors) || isAllowedToComment(report); +} + export { getReportParticipantsTitle, isReportMessageAttachment, @@ -2350,4 +2360,5 @@ export { getMoneyRequestAction, getBankAccountRoute, getParentReport, + shouldHideComposer, }; diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index d3fb665ecb48..db991994e5bd 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -152,6 +152,9 @@ class ReportScreen extends React.Component { } componentDidUpdate(prevProps) { + if (ReportUtils.shouldHideComposer(this.props.report, this.props.errors)) { + EmojiPickerAction.hideEmojiPicker(); + } // If you already have a report open and are deeplinking to a new report on native, // the ReportScreen never actually unmounts and the reportID in the route also doesn't change. // Therefore, we need to compare if the existing reportID is the same as the one in the route diff --git a/src/pages/home/report/ReportFooter.js b/src/pages/home/report/ReportFooter.js index 92838ecf9451..50a84c2f2fea 100644 --- a/src/pages/home/report/ReportFooter.js +++ b/src/pages/home/report/ReportFooter.js @@ -1,5 +1,4 @@ import React from 'react'; -import _ from 'underscore'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import {View, Keyboard} from 'react-native'; @@ -60,8 +59,7 @@ const defaultProps = { function ReportFooter(props) { const chatFooterStyles = {...styles.chatFooter, minHeight: !props.isOffline ? CONST.CHAT_FOOTER_MIN_HEIGHT : 0}; const isArchivedRoom = ReportUtils.isArchivedRoom(props.report); - const isAllowedToComment = ReportUtils.isAllowedToComment(props.report); - const hideComposer = isArchivedRoom || !_.isEmpty(props.errors) || !isAllowedToComment; + const hideComposer = ReportUtils.shouldHideComposer(props.report, props.errors); return ( <> From 8fc0bc9503e83d6a7ad330b6e9af06a0b26db700 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 15:39:55 +0700 Subject: [PATCH 389/826] remove utils function --- src/pages/home/ReportScreen.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index db991994e5bd..9306895eacb5 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -152,8 +152,11 @@ class ReportScreen extends React.Component { } componentDidUpdate(prevProps) { - if (ReportUtils.shouldHideComposer(this.props.report, this.props.errors)) { - EmojiPickerAction.hideEmojiPicker(); + const isArchivedRoom = ReportUtils.isArchivedRoom(this.props.report); + const isAllowedToComment = ReportUtils.isAllowedToComment(this.props.report); + const hideEmojiPicker = isArchivedRoom || !_.isEmpty(this.props.errors) || !isAllowedToComment; + if(hideEmojiPicker) { + EmojiPickerAction.hideEmojiPicker() } // If you already have a report open and are deeplinking to a new report on native, // the ReportScreen never actually unmounts and the reportID in the route also doesn't change. From 60674e58ba3f11658f3af57703d7b18de8377502 Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 23 Jun 2023 10:00:46 +0100 Subject: [PATCH 390/826] revert the iOS changes --- ios/NewExpensify.xcodeproj/project.pbxproj | 15 ++++++--------- ios/NewExpensify/Chat.entitlements | 2 -- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ios/NewExpensify.xcodeproj/project.pbxproj b/ios/NewExpensify.xcodeproj/project.pbxproj index 0933ddbd436d..f34f8959aab0 100644 --- a/ios/NewExpensify.xcodeproj/project.pbxproj +++ b/ios/NewExpensify.xcodeproj/project.pbxproj @@ -66,24 +66,24 @@ 37F6DD6E91B4C55BD8DDC895 /* Pods-NewExpensify.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify.debug.xcconfig"; path = "Target Support Files/Pods-NewExpensify/Pods-NewExpensify.debug.xcconfig"; sourceTree = ""; }; 391B5D1DB6CFBAC16FD11DC4 /* Pods-NewExpensify.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify.release.xcconfig"; path = "Target Support Files/Pods-NewExpensify/Pods-NewExpensify.release.xcconfig"; sourceTree = ""; }; 44BF435285B94E5B95F90994 /* ExpensifyNewKansas-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNewKansas-Medium.otf"; path = "../assets/fonts/native/ExpensifyNewKansas-Medium.otf"; sourceTree = ""; }; - 52796131E6554494B2DDB056 /* ExpensifyNeue-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Bold.otf"; path = "../assets/fonts/native/ExpensifyNeue-Bold.otf"; sourceTree = ""; }; + 52796131E6554494B2DDB056 /* ExpensifyNeue-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Bold.otf"; path = "../assets/fonts/native/ExpensifyNeue-Bold.otf"; sourceTree = ""; }; 7041848326A8E40900E09F4D /* RCTStartupTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RCTStartupTimer.h; path = NewExpensify/RCTStartupTimer.h; sourceTree = ""; }; 7041848426A8E47D00E09F4D /* RCTStartupTimer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RCTStartupTimer.m; path = NewExpensify/RCTStartupTimer.m; sourceTree = ""; }; 70CF6E81262E297300711ADC /* BootSplash.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = BootSplash.storyboard; path = NewExpensify/BootSplash.storyboard; sourceTree = ""; }; - 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-BoldItalic.otf"; path = "../assets/fonts/native/ExpensifyNeue-BoldItalic.otf"; sourceTree = ""; }; + 8B28D84EF339436DBD42A203 /* ExpensifyNeue-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-BoldItalic.otf"; path = "../assets/fonts/native/ExpensifyNeue-BoldItalic.otf"; sourceTree = ""; }; B37C757CE02B734BFED38097 /* Pods-NewExpensify-NewExpensifyTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify-NewExpensifyTests.debug.xcconfig"; path = "Target Support Files/Pods-NewExpensify-NewExpensifyTests/Pods-NewExpensify-NewExpensifyTests.debug.xcconfig"; sourceTree = ""; }; - BF6A4C5167244B9FB8E4D4E3 /* ExpensifyNeue-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Italic.otf"; path = "../assets/fonts/native/ExpensifyNeue-Italic.otf"; sourceTree = ""; }; + BF6A4C5167244B9FB8E4D4E3 /* ExpensifyNeue-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Italic.otf"; path = "../assets/fonts/native/ExpensifyNeue-Italic.otf"; sourceTree = ""; }; CA3A3642AEED7CF2D4CD3716 /* Pods-NewExpensify-NewExpensifyTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NewExpensify-NewExpensifyTests.release.xcconfig"; path = "Target Support Files/Pods-NewExpensify-NewExpensifyTests/Pods-NewExpensify-NewExpensifyTests.release.xcconfig"; sourceTree = ""; }; D2AFB39EC1D44BF9B91D3227 /* ExpensifyNewKansas-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNewKansas-MediumItalic.otf"; path = "../assets/fonts/native/ExpensifyNewKansas-MediumItalic.otf"; sourceTree = ""; }; - DCF33E34FFEC48128CDD41D4 /* ExpensifyMono-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Bold.otf"; path = "../assets/fonts/native/ExpensifyMono-Bold.otf"; sourceTree = ""; }; + DCF33E34FFEC48128CDD41D4 /* ExpensifyMono-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Bold.otf"; path = "../assets/fonts/native/ExpensifyMono-Bold.otf"; sourceTree = ""; }; DD7904292792E76D004484B4 /* RCTBootSplash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTBootSplash.h; path = NewExpensify/RCTBootSplash.h; sourceTree = ""; }; DD79042A2792E76D004484B4 /* RCTBootSplash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTBootSplash.m; path = NewExpensify/RCTBootSplash.m; sourceTree = ""; }; - E704648954784DDFBAADF568 /* ExpensifyMono-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Regular.otf"; path = "../assets/fonts/native/ExpensifyMono-Regular.otf"; sourceTree = ""; }; + E704648954784DDFBAADF568 /* ExpensifyMono-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyMono-Regular.otf"; path = "../assets/fonts/native/ExpensifyMono-Regular.otf"; sourceTree = ""; }; E9DF872C2525201700607FDC /* AirshipConfig.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AirshipConfig.plist; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; F0C450E92705020500FD2970 /* colors.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = colors.json; path = ../colors.json; sourceTree = ""; }; - F4F8A052A22040339996324B /* ExpensifyNeue-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Regular.otf"; path = "../assets/fonts/native/ExpensifyNeue-Regular.otf"; sourceTree = ""; }; + F4F8A052A22040339996324B /* ExpensifyNeue-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "ExpensifyNeue-Regular.otf"; path = "../assets/fonts/native/ExpensifyNeue-Regular.otf"; sourceTree = ""; }; F679A86058F8C4B331D239C3 /* libPods-NewExpensify-NewExpensifyTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NewExpensify-NewExpensifyTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -648,11 +648,9 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = NewExpensify/Chat.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = 368M544MTT; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 368M544MTT; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = "$(SRCROOT)/NewExpensify/Info.plist"; @@ -667,7 +665,6 @@ PRODUCT_BUNDLE_IDENTIFIER = com.chat.expensify.chat; PRODUCT_NAME = "New Expensify"; PROVISIONING_PROFILE_SPECIFIER = chat_expensify_appstore; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = chat_expensify_development; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/ios/NewExpensify/Chat.entitlements b/ios/NewExpensify/Chat.entitlements index 1d9bc86a21de..33bb7f9feff8 100644 --- a/ios/NewExpensify/Chat.entitlements +++ b/ios/NewExpensify/Chat.entitlements @@ -10,7 +10,5 @@ applinks:staging.new.expensify.com webcredentials:new.expensify.com - com.apple.developer.usernotifications.communication - From 32e43d81d9fd52db9882ee0cf3ef45a7575cf3ba Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 23 Jun 2023 10:09:29 +0100 Subject: [PATCH 391/826] remove debug config, logs, and remove unecessary newlines --- .../CustomNotificationProvider.java | 10 +--------- .../app/src/release/assets/airshipconfig.properties | 7 +++---- ios/AirshipConfig.plist | 4 ++-- ios/Podfile.lock | 4 ++-- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index 655189b1a238..a06695c836d5 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -68,7 +68,6 @@ public class CustomNotificationProvider extends ReactNotificationProvider { // Conversation JSON keys private static final String PAYLOAD_KEY = "payload"; - private static final String ONYX_DATA_KEY = "onyxData"; private final ExecutorService executorService = Executors.newCachedThreadPool(); @@ -102,7 +101,6 @@ protected NotificationCompat.Builder onExtendBuilder(@NonNull Context context, @ if (message.containsKey(PAYLOAD_KEY)) { try { JsonMap payload = JsonValue.parseString(message.getExtra(PAYLOAD_KEY)).optMap(); - Log.d(TAG, "message contains payload: " + payload); if (payload.containsKey(ONYX_DATA_KEY)) { Objects.requireNonNull(payload.get(ONYX_DATA_KEY)).isNull(); Log.d(TAG, "payload contains onxyData"); @@ -169,14 +167,8 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil return; } + // Retrieve and check for cached notifications NotificationCache notificationCache = findOrCreateNotificationCache(reportID); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { - notificationCache.messages.forEach(message -> { - Log.d(TAG, "messageCache: " + message.toString()); - }); - } - - // Do other cached notifications exist for this chat already? boolean hasExistingNotification = notificationCache.messages.size() >= 1; try { diff --git a/android/app/src/release/assets/airshipconfig.properties b/android/app/src/release/assets/airshipconfig.properties index 490f74552f11..194c4577de8b 100644 --- a/android/app/src/release/assets/airshipconfig.properties +++ b/android/app/src/release/assets/airshipconfig.properties @@ -1,7 +1,6 @@ -appKey = uulSSfTDQJ2r0PMpjRrhmQ -appSecret = D4Bhf0HrQEehrPua74Tyiw -inProduction = false -developmentLogLevel = VERBOSE +appKey = 55vypj0ARc6cN09MX7ogtQ +appSecret = EsSaqbdLSvmyC6kSBFJCtQ +inProduction = true # Notification Customization notificationIcon = ic_notification diff --git a/ios/AirshipConfig.plist b/ios/AirshipConfig.plist index 8bd4702fac10..3502dc33584f 100644 --- a/ios/AirshipConfig.plist +++ b/ios/AirshipConfig.plist @@ -9,8 +9,8 @@ developmentAppSecret D4Bhf0HrQEehrPua74Tyiw productionAppKey - uulSSfTDQJ2r0PMpjRrhmQ + 55vypj0ARc6cN09MX7ogtQ productionAppSecret - D4Bhf0HrQEehrPua74Tyiw + EsSaqbdLSvmyC6kSBFJCtQ diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7ca12edb2b68..048eeca5f76f 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1024,7 +1024,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1067,7 +1067,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 + RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d From 33afa6322c4cce6f0e5a3c343a6270750532a21e Mon Sep 17 00:00:00 2001 From: Jules Rosser Date: Fri, 23 Jun 2023 10:20:41 +0100 Subject: [PATCH 392/826] rooms and group chats should always use conversational styling --- android/app/build.gradle | 1 - .../customairshipextender/CustomNotificationProvider.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index c3e05b3403b0..be725a09e9a2 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -139,7 +139,6 @@ android { signingConfig signingConfigs.debug } release { - debuggable true signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" diff --git a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java index a06695c836d5..d7dff0ffcf0f 100644 --- a/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java +++ b/android/app/src/main/java/com/expensify/chat/customairshipextender/CustomNotificationProvider.java @@ -208,8 +208,9 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil long createdTimeInMillis = getMessageTimeInMillis(messageData.get("created").getString("")); notificationCache.messages.add(new NotificationCache.Message(person, message, createdTimeInMillis)); - // The initial notification for each conversation should use default styling. Once multiple messages are being displayed we should switch to conversation styling. - if (hasExistingNotification) { + + // Conversational styling should be applied to groups chats, rooms, and any 1:1 chats with more than one notification (ensuring the large profile image is always shown) + if (!conversationName.isEmpty() || hasExistingNotification) { // Create the messaging style notification builder for this notification, associating it with the person who sent the report comment NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person) .setGroupConversation(true) From 2e7501a422b740bcd1c3c2e9c38585f8901ce552 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 16:28:14 +0700 Subject: [PATCH 393/826] use utils function --- src/libs/ReportUtils.js | 2 +- src/pages/home/ReportScreen.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 4c94a1891769..c59c45e01e67 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2265,7 +2265,7 @@ function getParentReport(report) { * @returns {Boolean} */ function shouldHideComposer(report, errors) { - return isArchivedRoom(report) || !_.isEmpty(errors) || isAllowedToComment(report); + return isArchivedRoom(report) || !_.isEmpty(errors) || !isAllowedToComment(report); } export { diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 9306895eacb5..db991994e5bd 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -152,11 +152,8 @@ class ReportScreen extends React.Component { } componentDidUpdate(prevProps) { - const isArchivedRoom = ReportUtils.isArchivedRoom(this.props.report); - const isAllowedToComment = ReportUtils.isAllowedToComment(this.props.report); - const hideEmojiPicker = isArchivedRoom || !_.isEmpty(this.props.errors) || !isAllowedToComment; - if(hideEmojiPicker) { - EmojiPickerAction.hideEmojiPicker() + if (ReportUtils.shouldHideComposer(this.props.report, this.props.errors)) { + EmojiPickerAction.hideEmojiPicker(); } // If you already have a report open and are deeplinking to a new report on native, // the ReportScreen never actually unmounts and the reportID in the route also doesn't change. From 0e0b0d5413f871b81597dfafe43daa5b04300250 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 16:30:33 +0700 Subject: [PATCH 394/826] update comment --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index c59c45e01e67..6565a7f5fd86 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2259,7 +2259,7 @@ function getParentReport(report) { } /** - * Whether the composer should be hide + * Return true if the composer should be hide * @param {Object} report * @param {Object} errors * @returns {Boolean} From 89be97c7d92344f438cc61a5cc75db9c59baaa7b Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 16:58:11 +0700 Subject: [PATCH 395/826] add param to hide function --- src/pages/home/ReportScreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index db991994e5bd..f5bf30767057 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -153,7 +153,7 @@ class ReportScreen extends React.Component { componentDidUpdate(prevProps) { if (ReportUtils.shouldHideComposer(this.props.report, this.props.errors)) { - EmojiPickerAction.hideEmojiPicker(); + EmojiPickerAction.hideEmojiPicker(true); } // If you already have a report open and are deeplinking to a new report on native, // the ReportScreen never actually unmounts and the reportID in the route also doesn't change. From fe19af28a368acad9c110baaa5339e5800b98c8f Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 18:33:20 +0800 Subject: [PATCH 396/826] add null check --- src/libs/ReportScrollManager/index.js | 4 ++++ src/libs/ReportScrollManager/index.native.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/libs/ReportScrollManager/index.js b/src/libs/ReportScrollManager/index.js index dd3ca0aa9532..6a65e82372f8 100644 --- a/src/libs/ReportScrollManager/index.js +++ b/src/libs/ReportScrollManager/index.js @@ -7,6 +7,10 @@ * @param {Boolean} isEditing */ function scrollToIndex(ref, index, isEditing) { + if (!ref.current) { + return; + } + if (isEditing) { return; } diff --git a/src/libs/ReportScrollManager/index.native.js b/src/libs/ReportScrollManager/index.native.js index d3eaa422cbc5..570d3a72acac 100644 --- a/src/libs/ReportScrollManager/index.native.js +++ b/src/libs/ReportScrollManager/index.native.js @@ -5,6 +5,10 @@ * @param {Object} index */ function scrollToIndex(ref, index) { + if (!ref.current) { + return; + } + ref.current.scrollToIndex(index); } From c6fa8b6cbe55f6f7b1fbc51859b559d12dab52c1 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 18:33:51 +0800 Subject: [PATCH 397/826] export the ref --- src/hooks/useReportScrollManager/index.js | 2 +- src/pages/home/report/ReportActionsList.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hooks/useReportScrollManager/index.js b/src/hooks/useReportScrollManager/index.js index 419599cb7d54..6956fdfe2bfd 100644 --- a/src/hooks/useReportScrollManager/index.js +++ b/src/hooks/useReportScrollManager/index.js @@ -26,7 +26,7 @@ function useReportScrollManager() { flatListRef.current.scrollToOffset({animated: false, offset: 0}); }; - return {scrollToIndex, scrollToBottom}; + return {ref: flatListRef, scrollToIndex, scrollToBottom}; } export default useReportScrollManager; diff --git a/src/pages/home/report/ReportActionsList.js b/src/pages/home/report/ReportActionsList.js index a6f517fd8043..8e48f06c3528 100644 --- a/src/pages/home/report/ReportActionsList.js +++ b/src/pages/home/report/ReportActionsList.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import React, {useCallback, useEffect, useState, useContext} from 'react'; +import React, {useCallback, useEffect, useState} from 'react'; import Animated, {useSharedValue, useAnimatedStyle, withTiming} from 'react-native-reanimated'; import _ from 'underscore'; import InvertedFlatList from '../../../components/InvertedFlatList'; @@ -20,7 +20,7 @@ import CONST from '../../../CONST'; import reportPropTypes from '../../reportPropTypes'; import networkPropTypes from '../../../components/networkPropTypes'; import withLocalize from '../../../components/withLocalize'; -import ReportScreenContext from '../ReportScreenContext'; +import useReportScrollManager from '../../../hooks/useReportScrollManager'; const propTypes = { /** Position of the "New" line marker */ @@ -78,7 +78,7 @@ function keyExtractor(item) { } function ReportActionsList(props) { - const {flatListRef} = useContext(ReportScreenContext); + const reportScrollManager = useReportScrollManager(); const opacity = useSharedValue(0); const animatedStyles = useAnimatedStyle(() => ({ opacity: opacity.value, @@ -153,7 +153,7 @@ function ReportActionsList(props) { Date: Fri, 23 Jun 2023 17:45:16 +0700 Subject: [PATCH 398/826] update comment --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 7102fc30bb49..d0ee8800cb2b 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2259,7 +2259,7 @@ function getParentReport(report) { } /** - * Returns the parentReportID if the given report is a thread else returns the current reportID. + * Returns ID of the original report from which the given reportAction is first created. * * @param {String} reportID * @param {Object} reportAction From f20e7d01a40007358fa21f2b2ab4ef82d91b7948 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 18:58:41 +0800 Subject: [PATCH 399/826] remove memoization --- src/components/Pressable/PressableWithFeedback.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Pressable/PressableWithFeedback.js b/src/components/Pressable/PressableWithFeedback.js index 737017b4b3d4..5682cf0760ba 100644 --- a/src/components/Pressable/PressableWithFeedback.js +++ b/src/components/Pressable/PressableWithFeedback.js @@ -1,4 +1,4 @@ -import React, {forwardRef, useMemo, useState} from 'react'; +import React, {forwardRef, useState} from 'react'; import _ from 'underscore'; import propTypes from 'prop-types'; import {InteractionManager} from 'react-native'; @@ -42,7 +42,7 @@ const PressableWithFeedback = forwardRef((props, ref) => { const [isPressed, setPressed] = useState(false); const [isPressedIn, setPressedIn] = useState(false); const [isHovered, setIsHovered] = useState(false); - const isDisabled = useMemo(() => props.disabled || isPressed, [props.disabled, isPressed]); + const isDisabled = props.disabled || isPressed; return ( Date: Fri, 23 Jun 2023 12:05:03 +0100 Subject: [PATCH 400/826] add acronym to contributing guide and fix typos --- contributingGuides/CONTRIBUTING.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/contributingGuides/CONTRIBUTING.md b/contributingGuides/CONTRIBUTING.md index 8d608e7a0d02..1d972499b3fc 100644 --- a/contributingGuides/CONTRIBUTING.md +++ b/contributingGuides/CONTRIBUTING.md @@ -176,23 +176,24 @@ Additionally if you want to discuss an idea with the open source community witho Follow all the above above steps and processes. When you find a job you'd like to work on: - Post “I’m from [agency], I’d like to work on this job” - If no proposals have been submitted by other contributors, BugZero (BZ) team member or an internal engineer will assign the issue to you. - - If there are existing proposals, BZ will put the issue on hold. Contributor+ (C+) will review the existing proposals. If a contributor’s proposal is accepted then contributor will be assigned to the issue. If not the issue will be assigned to the agency-employee. + - If there are existing proposals, BZ will put the issue on hold. Contributor+ (C+) will review the existing proposals. If a contributor’s proposal is accepted then the contributor will be assigned to the issue. If not the issue will be assigned to the agency-employee. - Once assigned follow the steps [here](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#propose-a-solution-for-the-job) to submit your proposal #### Guide on Acronyms used within Expensify Communication -During communication with Expensify, you will come across a variety of acronyms used by our team. While acronyms can be useful, they cease to be the moment they are not known to the receiver. As such, we wanted to create a list here of our most commonly used acronyms and what they're referring to. Lastly, please never hesitate to ask in slack or the GH issue if there are any that are not understood/known! +During communication with Expensify, you will come across a variety of acronyms used by our team. While acronyms can be useful, they cease to be the moment they are not known to the receiver. As such, we wanted to create a list here of our most commonly used acronyms and what they're referring to. Lastly, please never hesitate to ask in Slack or the GH issue if there are any that are not understood/known! - **ND/NewDot:** new.expensify.com - **OD/OldDot:** expensify.com - **BZ:** Bug Zero (Expensify internal team in charge of managing the GH issues related to our open-source project) -- **LHN:** Left Hand Navigation (Primary navigation modal in Expensify Chat, docked on the left hand side) +- **LHN:** Left Hand Navigation (Primary navigation modal in Expensify Chat, docked on the left-hand side) - **OP:** Original Post (Most commonly the post in E/App GH issues that reports the bug) -- **GBR:** Green Brick Road (UX Design Principle that utlizes green indicators on action items to encourage the user down the optimal path for a given process or task) -- **RBR:** Red Brick Road (UX Design Principle that utlizes red indicators on action items to encourage the user down the optimal path for handling and discovering errors) +- **FAB** Floating Action Button (the + Button that is used to launch flows like 'New Chat', 'Request Money') +- **GBR:** Green Brick Road (UX Design Principle that utilizes green indicators on action items to encourage the user down the optimal path for a given process or task) +- **RBR:** Red Brick Road (UX Design Principle that utilizes red indicators on action items to encourage the user down the optimal path for handling and discovering errors) - **VBA:** Verified Bank Account (Bank account that has been verified as real and belonging to the correct business/individual) - **NAB:** Not a Blocker (An issue that doesn't block progress, but would be nice to not have) - **LHN:** Left Hand Navigation - **IOU:** I owe you (used to describe payment requests between users) -- **OTP:** One time password, or magic sign-in +- **OTP:** One-time password, or magic sign-in - **RHP:** Right Hand Panel (on larger screens, pages are often displayed docked to the right side of the screen) - **QA:** Quality Assurance - **GH:** GitHub From 7416f4d128812b846dc2028a2a152d97db9ac2c5 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Fri, 23 Jun 2023 17:12:53 +0500 Subject: [PATCH 401/826] fix: add outline to checkbox when focused via button --- web/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/index.html b/web/index.html index 90011c87e7a9..ec1250b23b08 100644 --- a/web/index.html +++ b/web/index.html @@ -60,6 +60,10 @@ outline: 0; box-shadow: inset 0px 0px 0px 1px #5AB0FF; } + div[role="checkbox"]:focus { + outline: 0; + box-shadow: inset 0px 0px 0px 1px #5AB0FF; + } input:focus-visible, input:focus[data-focusvisible-polyfill], select:focus-visible, select:focus[data-focusvisible-polyfill] { box-shadow: none; From cba1d0246a8e99aa9764b5024915f00264cbe5ca Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 20:45:45 +0800 Subject: [PATCH 402/826] add more null checks --- src/hooks/useReportScrollManager/index.js | 6 +++++- src/hooks/useReportScrollManager/index.native.js | 8 ++++++++ src/libs/ReportScrollManager/index.js | 6 +----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/hooks/useReportScrollManager/index.js b/src/hooks/useReportScrollManager/index.js index 6956fdfe2bfd..13e7471f6eb1 100644 --- a/src/hooks/useReportScrollManager/index.js +++ b/src/hooks/useReportScrollManager/index.js @@ -12,7 +12,7 @@ function useReportScrollManager() { * @param {Boolean} isEditing */ const scrollToIndex = (index, isEditing) => { - if (isEditing) { + if (!flatListRef.current || isEditing) { return; } @@ -23,6 +23,10 @@ function useReportScrollManager() { * Scroll to the bottom of the flatlist. */ const scrollToBottom = () => { + if (!flatListRef.current) { + return; + } + flatListRef.current.scrollToOffset({animated: false, offset: 0}); }; diff --git a/src/hooks/useReportScrollManager/index.native.js b/src/hooks/useReportScrollManager/index.native.js index 2206cd5104d4..91930a4e6cea 100644 --- a/src/hooks/useReportScrollManager/index.native.js +++ b/src/hooks/useReportScrollManager/index.native.js @@ -10,6 +10,10 @@ function useReportScrollManager() { * @param {Object} index */ const scrollToIndex = (index) => { + if (!flatListRef.current) { + return; + } + flatListRef.current.scrollToIndex(index); }; @@ -17,6 +21,10 @@ function useReportScrollManager() { * Scroll to the bottom of the flatlist. */ const scrollToBottom = () => { + if (!flatListRef.current) { + return; + } + flatListRef.current.scrollToOffset({animated: false, offset: 0}); }; diff --git a/src/libs/ReportScrollManager/index.js b/src/libs/ReportScrollManager/index.js index 6a65e82372f8..1dd9922b33b8 100644 --- a/src/libs/ReportScrollManager/index.js +++ b/src/libs/ReportScrollManager/index.js @@ -7,11 +7,7 @@ * @param {Boolean} isEditing */ function scrollToIndex(ref, index, isEditing) { - if (!ref.current) { - return; - } - - if (isEditing) { + if (!ref.current || isEditing) { return; } From 3b3e4ad5d5cd6c25dda370b1ee8e2d156ce70a8a Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 21:00:20 +0800 Subject: [PATCH 403/826] rename state --- .../Pressable/PressableWithFeedback.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/Pressable/PressableWithFeedback.js b/src/components/Pressable/PressableWithFeedback.js index 5682cf0760ba..e77848c7c326 100644 --- a/src/components/Pressable/PressableWithFeedback.js +++ b/src/components/Pressable/PressableWithFeedback.js @@ -39,15 +39,15 @@ const PressableWithFeedbackDefaultProps = { const PressableWithFeedback = forwardRef((props, ref) => { const propsWithoutWrapperStyles = _.omit(props, omittedProps); + const [isExecuting, setExecuting] = useState(false); const [isPressed, setPressed] = useState(false); - const [isPressedIn, setPressedIn] = useState(false); const [isHovered, setIsHovered] = useState(false); - const isDisabled = props.disabled || isPressed; + const isDisabled = props.disabled || isExecuting; return ( { if (props.onHoverOut) props.onHoverOut(); }} onPressIn={() => { - setPressedIn(true); + setPressed(true); if (props.onPressIn) props.onPressIn(); }} onPressOut={() => { - setPressedIn(false); + setPressed(false); if (props.onPressOut) props.onPressOut(); }} onPress={(e) => { - setPressed(true); + setExecuting(true); const onPress = props.onPress(e); InteractionManager.runAfterInteractions(() => { if (!(onPress instanceof Promise)) { - setPressed(false); + setExecuting(false); return; } onPress.finally(() => { - setPressed(false); + setExecuting(false); }); }); }} From b019b361da05fed8640311ad0654f15c0ab3c269 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Fri, 23 Jun 2023 21:19:57 +0800 Subject: [PATCH 404/826] rename state callback --- src/components/Pressable/PressableWithFeedback.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Pressable/PressableWithFeedback.js b/src/components/Pressable/PressableWithFeedback.js index e77848c7c326..5119bb0898cd 100644 --- a/src/components/Pressable/PressableWithFeedback.js +++ b/src/components/Pressable/PressableWithFeedback.js @@ -39,8 +39,8 @@ const PressableWithFeedbackDefaultProps = { const PressableWithFeedback = forwardRef((props, ref) => { const propsWithoutWrapperStyles = _.omit(props, omittedProps); - const [isExecuting, setExecuting] = useState(false); - const [isPressed, setPressed] = useState(false); + const [isExecuting, setIsExecuting] = useState(false); + const [isPressed, setIsPressed] = useState(false); const [isHovered, setIsHovered] = useState(false); const isDisabled = props.disabled || isExecuting; @@ -64,23 +64,23 @@ const PressableWithFeedback = forwardRef((props, ref) => { if (props.onHoverOut) props.onHoverOut(); }} onPressIn={() => { - setPressed(true); + setIsPressed(true); if (props.onPressIn) props.onPressIn(); }} onPressOut={() => { - setPressed(false); + setIsPressed(false); if (props.onPressOut) props.onPressOut(); }} onPress={(e) => { - setExecuting(true); + setIsExecuting(true); const onPress = props.onPress(e); InteractionManager.runAfterInteractions(() => { if (!(onPress instanceof Promise)) { - setExecuting(false); + setIsExecuting(false); return; } onPress.finally(() => { - setExecuting(false); + setIsExecuting(false); }); }); }} From 93b1938d291108e08d39e177126e9ac2621aa047 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Fri, 23 Jun 2023 15:37:26 +0200 Subject: [PATCH 405/826] remove defaultModalScreenOptions --- .../AppNavigator/defaultModalScreenOptions.js | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/libs/Navigation/AppNavigator/defaultModalScreenOptions.js diff --git a/src/libs/Navigation/AppNavigator/defaultModalScreenOptions.js b/src/libs/Navigation/AppNavigator/defaultModalScreenOptions.js deleted file mode 100644 index 03f5b1ba75e3..000000000000 --- a/src/libs/Navigation/AppNavigator/defaultModalScreenOptions.js +++ /dev/null @@ -1,12 +0,0 @@ -import {CardStyleInterpolators} from '@react-navigation/stack'; -import styles from '../../../styles/styles'; - -const defaultModalScreenOptions = { - headerShown: false, - animationEnabled: true, - gestureDirection: 'horizontal', - cardStyle: styles.navigationScreenCardStyle, - cardStyleInterpolator: CardStyleInterpolators.forHorizontalIOS, -}; - -export default defaultModalScreenOptions; From 56b01f4e4e576752a01108d55c395394d4fe1d0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Fri, 23 Jun 2023 15:51:20 +0200 Subject: [PATCH 406/826] updated comment --- src/components/Checkbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index ee64ac90ecbf..7090abe319d6 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -36,7 +36,7 @@ const propTypes = { /** A ref to forward to the Pressable */ forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]), - /** A ref to forward to the Pressable */ + /** An accessibility label for the checkbox */ accessibilityLabel: PropTypes.string, }; From bd1a105a4f25cc0d5ff7f91a411f89bc4e569538 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 23 Jun 2023 21:02:16 +0700 Subject: [PATCH 407/826] Fix inconsistent welcome message between optimistic data and backend --- src/libs/actions/Report.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index c5c5aa2250c3..759b35c196fa 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1116,7 +1116,7 @@ function updateWelcomeMessage(reportID, previousValue, newValue) { { onyxMethod: Onyx.METHOD.MERGE, key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`, - value: {welcomeMessage: newValue}, + value: {welcomeMessage: parsedWelcomeMessage}, }, ]; const failureData = [ From fcc4ecf8d23476fb0154ef364c60a1081ecae37d Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Fri, 23 Jun 2023 16:47:29 +0200 Subject: [PATCH 408/826] fix: apply changes from review --- src/libs/Navigation/Navigation.js | 5 +++-- src/pages/home/ReportScreen.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index 6146e5e0345c..c6719e29632e 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -92,9 +92,10 @@ function navigate(route = ROUTES.HOME, type) { /** * @param {String} fallbackRoute - Fallback route if pop/goBack action should, but is not possible within RHP + * @param {Bool} shouldEnforceFallback - Enforces navigation to fallback route * @param {Bool} shouldPopToTop - Should we navigate to LHN on back press */ -function goBack(fallbackRoute = ROUTES.HOME, shouldPopToTop = false) { +function goBack(fallbackRoute = ROUTES.HOME, shouldEnforceFallback = false, shouldPopToTop = false) { if (!canNavigate('goBack')) { return; } @@ -112,7 +113,7 @@ function goBack(fallbackRoute = ROUTES.HOME, shouldPopToTop = false) { return; } - if (!getActiveRouteIndex(navigationRef.current.getState()) && fallbackRoute) { + if (shouldEnforceFallback || (!getActiveRouteIndex(navigationRef.current.getState()) && fallbackRoute)) { navigate(fallbackRoute, 'UP'); return; } diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index a8225dd72911..8781f646c8e7 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -272,7 +272,7 @@ class ReportScreen extends React.Component { ) : ( Navigation.goBack(ROUTES.HOME, true)} + onNavigationMenuButtonClicked={() => Navigation.goBack(ROUTES.HOME, false, true)} personalDetails={this.props.personalDetails} report={this.props.report} /> From bf5a593bb3e8d99d9cc55ecc7717424d11539d18 Mon Sep 17 00:00:00 2001 From: Nikhil Vats Date: Fri, 23 Jun 2023 20:47:26 +0530 Subject: [PATCH 409/826] change constant names --- src/CONST.js | 11 ++++------- .../BaseAutoCompleteSuggestions.js | 18 +++++++++--------- src/libs/EmojiUtils.js | 2 +- src/pages/home/report/ReportActionCompose.js | 6 +++--- 4 files changed, 17 insertions(+), 20 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index 5692b0a64602..b5b842ec606a 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -844,14 +844,11 @@ const CONST = { AUTO_COMPLETE_SUGGESTER: { SUGGESTER_PADDING: 6, SUGGESTER_INNER_PADDING: 8, - ITEM_HEIGHT: 40, + SUGGESTION_ROW_HEIGHT: 40, SMALL_CONTAINER_HEIGHT_FACTOR: 2.5, - MIN_AMOUNT_OF_ITEMS: 3, - // max number of suggestions - MAX_AMOUNT_OF_ITEMS: 20, - // used for limiting the height of suggestions container, we show a scrollable list - // with max height equal to MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW (5) * ITEM_HEIGHT. - MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW: 5, + MIN_AMOUNT_OF_SUGGESTIONS: 3, + MAX_AMOUNT_OF_SUGGESTIONS: 20, + MAX_AMOUNT_OF_VISIBLE_SUGGESTIONS_IN_CONTAINER: 5, HERE_TEXT: '@here', }, COMPOSER_MAX_HEIGHT: 125, diff --git a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js index 5ab0ff9e90c3..b4710f1f343e 100644 --- a/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js +++ b/src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js @@ -15,17 +15,17 @@ import PressableWithFeedback from '../Pressable/PressableWithFeedback'; */ const measureHeightOfSuggestionRows = (numRows, isSuggestionPickerLarge) => { if (isSuggestionPickerLarge) { - if (numRows > CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW) { + if (numRows > CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_SUGGESTIONS_IN_CONTAINER) { // On large screens, if there are more than 5 suggestions, we display a scrollable window with a height of 5 items, indicating that there are more items available - return CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_ITEMS_IN_WINDOW * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; + return CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_VISIBLE_SUGGESTIONS_IN_CONTAINER * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT; } - return numRows * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; + return numRows * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT; } if (numRows > 2) { // On small screens, we display a scrollable window with a height of 2.5 items, indicating that there are more items available beyond what is currently visible - return CONST.AUTO_COMPLETE_SUGGESTER.SMALL_CONTAINER_HEIGHT_FACTOR * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; + return CONST.AUTO_COMPLETE_SUGGESTER.SMALL_CONTAINER_HEIGHT_FACTOR * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT; } - return numRows * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT; + return numRows * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT; }; function BaseAutoCompleteSuggestions(props) { @@ -40,7 +40,7 @@ function BaseAutoCompleteSuggestions(props) { */ const renderSuggestionMenuItem = ({item, index}) => ( StyleUtils.getAutoCompleteSuggestionItemStyle(props.highlightedSuggestionIndex, CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT, hovered, index)} + style={({hovered}) => StyleUtils.getAutoCompleteSuggestionItemStyle(props.highlightedSuggestionIndex, CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT, hovered, index)} hoverDimmingValue={1} onMouseDown={(e) => e.preventDefault()} onPress={() => props.onSelect(index)} @@ -64,12 +64,12 @@ function BaseAutoCompleteSuggestions(props) { * @returns {Object} */ const getItemLayout = (data, index) => ({ - length: CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT, - offset: index * CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT, + length: CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT, + offset: index * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT, index, }); - const innerHeight = CONST.AUTO_COMPLETE_SUGGESTER.ITEM_HEIGHT * props.suggestions.length; + const innerHeight = CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT * props.suggestions.length; const animatedStyles = useAnimatedStyle(() => StyleUtils.getAutoCompleteSuggestionContainerStyle(rowHeight.value, props.shouldIncludeReportRecipientLocalTimeHeight)); useEffect(() => { diff --git a/src/libs/EmojiUtils.js b/src/libs/EmojiUtils.js index d305e670b813..3e9b1c9f118b 100644 --- a/src/libs/EmojiUtils.js +++ b/src/libs/EmojiUtils.js @@ -260,7 +260,7 @@ function replaceEmojis(text, isSmallScreenWidth = false, preferredSkinTone = CON * @param {Number} [limit] - matching emojis limit * @returns {Array} */ -function suggestEmojis(text, limit = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) { +function suggestEmojis(text, limit = CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_SUGGESTIONS) { const emojiData = text.match(CONST.REGEX.EMOJI_SUGGESTIONS); if (emojiData) { const matching = []; diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 1ae0daf6a738..855a9bbb8c9f 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -149,8 +149,8 @@ const getMaxArrowIndex = (numRows, isAutoSuggestionPickerLarge) => { // rowCount is number of emoji/mention suggestions. For small screen we can fit 3 items // and for large we show up to 20 items for mentions/emojis const rowCount = isAutoSuggestionPickerLarge - ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS) - : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_ITEMS); + ? Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_SUGGESTIONS) + : Math.min(numRows, CONST.AUTO_COMPLETE_SUGGESTER.MIN_AMOUNT_OF_SUGGESTIONS); // -1 because we start at 0 return rowCount - 1; @@ -464,7 +464,7 @@ class ReportActionCompose extends React.Component { }); const sortedPersonalDetails = _.sortBy(filteredPersonalDetails, (detail) => detail.displayName || detail.login); - _.each(_.first(sortedPersonalDetails, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_ITEMS - suggestions.length), (detail) => { + _.each(_.first(sortedPersonalDetails, CONST.AUTO_COMPLETE_SUGGESTER.MAX_AMOUNT_OF_SUGGESTIONS - suggestions.length), (detail) => { suggestions.push({ text: detail.displayName, alternateText: detail.login, From b568b82e8ca8c59ac906c856c9d4cfff33e83e38 Mon Sep 17 00:00:00 2001 From: Robert Kozik Date: Tue, 6 Jun 2023 13:39:39 +0200 Subject: [PATCH 410/826] remove unused SignInPageGraphics component --- .../SignInPageLayout/SignInPageGraphics.js | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/pages/signin/SignInPageLayout/SignInPageGraphics.js diff --git a/src/pages/signin/SignInPageLayout/SignInPageGraphics.js b/src/pages/signin/SignInPageLayout/SignInPageGraphics.js deleted file mode 100644 index 67f9dd62f7ec..000000000000 --- a/src/pages/signin/SignInPageLayout/SignInPageGraphics.js +++ /dev/null @@ -1,37 +0,0 @@ -import {Pressable} from 'react-native'; -import React from 'react'; -import _ from 'underscore'; -import * as StyleUtils from '../../../styles/StyleUtils'; -import * as Link from '../../../libs/actions/Link'; -import SVGImage from '../../../components/SVGImage'; -import withWindowDimensions, {windowDimensionsPropTypes} from '../../../components/withWindowDimensions'; - -const backgroundStyle = StyleUtils.getLoginPagePromoStyle(); - -const propTypes = { - ...windowDimensionsPropTypes, -}; - -function SignInPageGraphics(props) { - return ( - { - Link.openExternalLink(backgroundStyle.redirectUri); - }} - disabled={_.isEmpty(backgroundStyle.redirectUri)} - > - - - ); -} - -SignInPageGraphics.displayName = 'SignInPageGraphics'; -SignInPageGraphics.propTypes = propTypes; - -export default withWindowDimensions(SignInPageGraphics); From 2627b01b945bd16d0e2b26d610d581a02d639a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Fri, 23 Jun 2023 09:52:40 -0600 Subject: [PATCH 411/826] add step to generate the file that contains the routes for the articles --- docs/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 1e54ad58393f..5fb3c2883c52 100644 --- a/docs/README.md +++ b/docs/README.md @@ -36,6 +36,7 @@ ln -sf universal-darwin22 universal-darwin21 ## Steps 1. Open the Terminal command line in macOS. +1. In the root folder of the repository, execute `npm run createDocsRoutes` to generate the file which contains the routes for the articles (without this, the site will appear empty). 1. Navigate to the `docs` folder in the command line. 1. Run `bundle exec jekyll serve --livereload`. - _Note: If you see an error like `Unable to load the EventMachine C Extension...`, try running `gem uninstall eventmachine && bundle install`. If that doesn't work just removing the `--livereload` flag should work._ @@ -46,7 +47,7 @@ ln -sf universal-darwin22 universal-darwin21 ### Android Chrome emulator To visit the site on the Android emulator, go to `10.0.2.2:4000`. -If you're getting an error page that says "Refused to connect", try running `adb reverse tcp:4000 tcp:4000` with your emulator open. +If you're getting an error page that says "Refused to connect", try running `adb reverse tcp:4000 tcp:4000` with your emulator open. # How the project is structured From 6cb3a9a0aab72a5e85423424020831baccf2ddcb Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 16:06:27 +0000 Subject: [PATCH 412/826] Update version to 1.3.31-3 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 15f74e15fb81..8d7a8c3185a4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033102 - versionName "1.3.31-2" + versionCode 1001033103 + versionName "1.3.31-3" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 1ef3cc14622a..671d5a156f32 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.2 + 1.3.31.3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 29c5d14096ac..cd81c30913b9 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.31.2 + 1.3.31.3 diff --git a/package-lock.json b/package-lock.json index b8f968268073..4daa8d75796d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-2", + "version": "1.3.31-3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-2", + "version": "1.3.31-3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index b1eb06a262f7..4d0b9b946ac4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-2", + "version": "1.3.31-3", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 5d2930b3732004166004414af19466cd8307d0ff Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Fri, 23 Jun 2023 12:08:49 -0400 Subject: [PATCH 413/826] Revert "fix navigation ready callback by using onStateChange" This reverts commit 9e7036a3d696d352230cf183e510b741e3fcbbc3. --- src/Expensify.js | 8 +++++++- src/libs/Navigation/NavigationRoot.js | 12 +++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Expensify.js b/src/Expensify.js index c774371dfcfd..e7c830ff2029 100644 --- a/src/Expensify.js +++ b/src/Expensify.js @@ -23,6 +23,7 @@ import compose from './libs/compose'; import withLocalize, {withLocalizePropTypes} from './components/withLocalize'; import * as User from './libs/actions/User'; import NetworkConnection from './libs/NetworkConnection'; +import Navigation from './libs/Navigation/Navigation'; import DeeplinkWrapper from './components/DeeplinkWrapper'; import PopoverReportActionContextMenu from './pages/home/report/ContextMenu/PopoverReportActionContextMenu'; import * as ReportActionContextMenu from './pages/home/report/ContextMenu/ReportActionContextMenu'; @@ -110,7 +111,12 @@ function Expensify(props) { ActiveClientManager.init(); }; - const setNavigationReady = useCallback(() => setIsNavigationReady(true), []); + const setNavigationReady = useCallback(() => { + setIsNavigationReady(true); + + // Navigate to any pending routes now that the NavigationContainer is ready + Navigation.setIsNavigationReady(); + }, []); const onSplashHide = useCallback(() => { setIsSplashHidden(true); diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 98c73564c04c..ee389e530d0f 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -48,12 +48,13 @@ function parseAndLogRoute(state) { } else { Log.info('Navigating to route', false, {path: currentPath}); } + + Navigation.setIsNavigationReady(); } function NavigationRoot(props) { useFlipper(navigationRef); const navigationStateRef = useRef(undefined); - const onReadyCalled = useRef(false); const updateSavedNavigationStateAndLogRoute = (state) => { if (!state) { @@ -62,14 +63,6 @@ function NavigationRoot(props) { navigationStateRef.current = state; props.updateCurrentReportId(state); parseAndLogRoute(state); - - // NavigationContainer's onReady callback is unreliable (it will fire but navigationRef.isReady() will still be false) - // So we use this onStateChange callback instead - if (!onReadyCalled.current) { - Navigation.setIsNavigationReady(); - props.onReady(); - onReadyCalled.current = true; - } }; return ( @@ -77,6 +70,7 @@ function NavigationRoot(props) { key={props.isSmallScreenWidth ? 'small' : 'big'} onStateChange={updateSavedNavigationStateAndLogRoute} initialState={navigationStateRef.current} + onReady={props.onReady} theme={navigationTheme} ref={navigationRef} linking={linkingConfig} From b6e8042c1a8627dce598c17931e9bbac2081c307 Mon Sep 17 00:00:00 2001 From: Daraksha Date: Fri, 23 Jun 2023 21:41:47 +0530 Subject: [PATCH 414/826] use minHeight for single button --- src/pages/home/report/ReportActionCompose.js | 4 ++-- src/styles/utilities/sizing.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 8399ab039ba1..fdbaf108c5dc 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -953,7 +953,7 @@ class ReportActionCompose extends React.Component { style={[ styles.dFlex, styles.flexColumn, - isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentCenter, + isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentEnd, ]} > {this.props.isComposerFullSize && ( @@ -1004,7 +1004,7 @@ class ReportActionCompose extends React.Component { this.actionButton.blur(); this.setMenuVisibility(true); }} - style={styles.composerSizeButton} + style={[styles.composerSizeButton, !this.props.isComposerFullSize && !isFullComposerAvailable ? styles.mnh10 : undefined]} disabled={isBlockedFromConcierge || this.props.disabled} accessibilityRole="button" accessibilityLabel={this.props.translate('reportActionCompose.addAction')} diff --git a/src/styles/utilities/sizing.js b/src/styles/utilities/sizing.js index 5d19b2e09dcc..7f07051f719a 100644 --- a/src/styles/utilities/sizing.js +++ b/src/styles/utilities/sizing.js @@ -20,6 +20,10 @@ export default { width: '25%', }, + mnh10: { + minHeight: 40, + }, + mnh100: { minHeight: '100%', }, From bf127b887704396fcef810245d7f6d9cecd399fb Mon Sep 17 00:00:00 2001 From: Daraksha Date: Fri, 23 Jun 2023 22:02:52 +0530 Subject: [PATCH 415/826] remove minHeight --- src/pages/home/report/ReportActionCompose.js | 2 +- src/styles/styles.js | 2 +- src/styles/utilities/sizing.js | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index fdbaf108c5dc..05a87e68bc38 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -1004,7 +1004,7 @@ class ReportActionCompose extends React.Component { this.actionButton.blur(); this.setMenuVisibility(true); }} - style={[styles.composerSizeButton, !this.props.isComposerFullSize && !isFullComposerAvailable ? styles.mnh10 : undefined]} + style={[styles.composerSizeButton]} disabled={isBlockedFromConcierge || this.props.disabled} accessibilityRole="button" accessibilityLabel={this.props.translate('reportActionCompose.addAction')} diff --git a/src/styles/styles.js b/src/styles/styles.js index 01d50fc54df7..0dfe6edce787 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1721,7 +1721,7 @@ const styles = { composerSizeButton: { alignSelf: 'center', - height: 32, + height: 40, width: 32, padding: 6, margin: 3, diff --git a/src/styles/utilities/sizing.js b/src/styles/utilities/sizing.js index 7f07051f719a..5d19b2e09dcc 100644 --- a/src/styles/utilities/sizing.js +++ b/src/styles/utilities/sizing.js @@ -20,10 +20,6 @@ export default { width: '25%', }, - mnh10: { - minHeight: 40, - }, - mnh100: { minHeight: '100%', }, From bc9fecbd1488631b351d1bf2b7109f5f692971c9 Mon Sep 17 00:00:00 2001 From: Daraksha Date: Fri, 23 Jun 2023 22:07:30 +0530 Subject: [PATCH 416/826] undo --- src/pages/home/report/ReportActionCompose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 05a87e68bc38..35e33bb5170a 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -1004,7 +1004,7 @@ class ReportActionCompose extends React.Component { this.actionButton.blur(); this.setMenuVisibility(true); }} - style={[styles.composerSizeButton]} + style={styles.composerSizeButton} disabled={isBlockedFromConcierge || this.props.disabled} accessibilityRole="button" accessibilityLabel={this.props.translate('reportActionCompose.addAction')} From 86f5f44da889e40b4bb64336a0d0a59387026ef5 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 17:00:30 +0000 Subject: [PATCH 417/826] Update version to 1.3.31-4 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 8d7a8c3185a4..d80a5c85da25 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033103 - versionName "1.3.31-3" + versionCode 1001033104 + versionName "1.3.31-4" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 671d5a156f32..964b63917404 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.3 + 1.3.31.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index cd81c30913b9..aa5cbbb40014 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.31.3 + 1.3.31.4 diff --git a/package-lock.json b/package-lock.json index 4daa8d75796d..62f0730c0e23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-3", + "version": "1.3.31-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-3", + "version": "1.3.31-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 4d0b9b946ac4..ce939e82e2b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-3", + "version": "1.3.31-4", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From e5fa6f907191c48f65cea92b51ee937b1b44351d Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Fri, 23 Jun 2023 19:06:48 +0200 Subject: [PATCH 418/826] fix: revert removing false --- src/pages/ValidateLoginPage/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ValidateLoginPage/index.js b/src/pages/ValidateLoginPage/index.js index e51d47f58344..7d4bbfc89e85 100644 --- a/src/pages/ValidateLoginPage/index.js +++ b/src/pages/ValidateLoginPage/index.js @@ -58,7 +58,7 @@ class ValidateLoginPage extends Component { if (lodashGet(this.props, 'session.authToken')) { // If already signed in, do not show the validate code if not on web, // because we don't want to block the user with the interstitial page. - Navigation.goBack(); + Navigation.goBack(false); } else { Session.signInWithValidateCodeAndNavigate(accountID, validateCode, this.props.preferredLocale); } From b13d207bdaa60cdbddc6a625784bc4bd90385569 Mon Sep 17 00:00:00 2001 From: s-alves10 Date: Fri, 23 Jun 2023 12:09:58 -0500 Subject: [PATCH 419/826] fix: correct dependency of effect hook --- src/pages/home/report/ReportActionItem.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 24be64dc6468..73235deeabca 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -149,25 +149,18 @@ function ReportActionItem(props) { // Hide the message if it is being moderated for a higher offense, or is hidden by a moderator // Removed messages should not be shown anyway and should not need this flow + const latestDecision = _.get(props, ['action', 'message', 0, 'moderationDecisions', 0, 'decision'], ''); useEffect(() => { - if (!props.action.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT || _.isEmpty(props.action.message[0].moderationDecisions)) { + if (!props.action.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT || _.isEmpty(latestDecision)) { return; } - // Right now we are only sending the latest moderationDecision to the frontend even though it is an array - let decisions = props.action.message[0].moderationDecisions; - if (decisions.length > 1) { - decisions = decisions.slice(-1); - } - const latestDecision = decisions[0]; - if (latestDecision.decision === CONST.MODERATION.MODERATOR_DECISION_PENDING_HIDE || latestDecision.decision === CONST.MODERATION.MODERATOR_DECISION_HIDDEN) { + if (latestDecision === CONST.MODERATION.MODERATOR_DECISION_PENDING_HIDE || latestDecision === CONST.MODERATION.MODERATOR_DECISION_HIDDEN) { setIsHidden(true); } - setModerationDecision(latestDecision.decision); + setModerationDecision(latestDecision); - // props.action.message doesn't need to be a dependency, we only need to check the change of props.action.message[0].moderationDecisions - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [props.action.message[0].moderationDecisions, props.action.actionName]); + }, [latestDecision, props.action.actionName]); const toggleContextMenuFromActiveReportAction = useCallback(() => { setIsContextMenuActive(ReportActionContextMenu.isActiveReportAction(props.action.reportActionID)); From aa876bbb3fec4663e71217adecdf0f2fdec1aed8 Mon Sep 17 00:00:00 2001 From: Chirag Arora Date: Fri, 23 Jun 2023 22:52:17 +0530 Subject: [PATCH 420/826] changes in PressableWithDelayToggle to fix tooltip issue --- .../Pressable/PressableWithDelayToggle.js | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/Pressable/PressableWithDelayToggle.js b/src/components/Pressable/PressableWithDelayToggle.js index d482900dfcf9..f4fb77ce7845 100644 --- a/src/components/Pressable/PressableWithDelayToggle.js +++ b/src/components/Pressable/PressableWithDelayToggle.js @@ -94,18 +94,18 @@ function PressableWithDelayToggle(props) { onPress={updatePressState} accessibilityLabel={tooltipText} > - - <> - - {props.isDelayButtonStateComplete && props.textChecked ? props.textChecked : props.text} -   - + <> + + {props.isDelayButtonStateComplete && props.textChecked ? props.textChecked : props.text} +   + + )} - - + + ); } From c3784dcc74220fb25af25e3a7d0bd7fca7ef0d63 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 10:23:39 -0700 Subject: [PATCH 421/826] Add if condition back to updateStagingFromMain --- .github/workflows/preDeploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 094c7215764e..ac5e21ffd94c 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -98,6 +98,7 @@ jobs: GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} - name: Update staging branch from main + if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} run: | # Get the staging branch locally git switch staging From b4ac24d698afcbc0711de57d92965a01e787ef4b Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 10:28:35 -0700 Subject: [PATCH 422/826] Enable verbose git logs when debug logs are enabled --- .github/actions/composite/setupGitForOSBotify/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/composite/setupGitForOSBotify/action.yml b/.github/actions/composite/setupGitForOSBotify/action.yml index 4d6a0a047fb5..0c06e2f4e169 100644 --- a/.github/actions/composite/setupGitForOSBotify/action.yml +++ b/.github/actions/composite/setupGitForOSBotify/action.yml @@ -24,3 +24,8 @@ runs: git config commit.gpgsign true git config user.name OSBotify git config user.email infra+osbotify@expensify.com + + - name: Enable debug logs for git + shell: bash + if: runner.debug == '1' + run: echo "GIT_TRACE=true" >> "$GITHUB_ENV" From 5200aafaf16c7e9ad896096de0bfcd467555ee63 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 17:37:06 +0000 Subject: [PATCH 423/826] Update version to 1.3.31-5 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index d80a5c85da25..2e61623988ee 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033104 - versionName "1.3.31-4" + versionCode 1001033105 + versionName "1.3.31-5" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 964b63917404..545296043e10 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.4 + 1.3.31.5 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index aa5cbbb40014..27229cbcaa9b 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.31.4 + 1.3.31.5 diff --git a/package-lock.json b/package-lock.json index 62f0730c0e23..fcd63137f53c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-4", + "version": "1.3.31-5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-4", + "version": "1.3.31-5", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index ce939e82e2b5..227ef27ed1b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-4", + "version": "1.3.31-5", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 6c86a8bceee714c2092879290bb9b9c3fae22cd8 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sat, 24 Jun 2023 00:46:43 +0700 Subject: [PATCH 424/826] remove redundant --- src/libs/Permissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index cf4904cce6e5..d3e407260e20 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -99,7 +99,7 @@ function canUsePasswordlessLogins(betas) { * @returns {Boolean} */ function canUseTasks(betas) { - return true + return _.contains(betas, CONST.BETAS.TASKS) || _.contains(betas, CONST.BETAS.ALL); } export default { From 119b46c56bd45749f839993b26417245737bbbc7 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 10:48:11 -0700 Subject: [PATCH 425/826] Use git log to get VERSION_BUMP_COMMIT --- .github/workflows/cherryPick.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 94ccaf5d932c..df10fb4aa3fb 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -75,8 +75,13 @@ jobs: - name: Cherry-pick the version-bump to staging run: | - git fetch main - git cherry-pick -S -x --mainline 1 --strategy=recursive -Xtheirs ${{ steps.getVersionBumpMergeCommit.outputs.MERGE_COMMIT_SHA }} + # Find the commit for the version-bump + git switch main + VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ env.NEW_VERSION }}')" + + # Cherry-pick it to staging + git switch staging + git cherry-pick -S -x --mainline 1 --strategy=recursive -Xtheirs "$VERSION_BUMP_COMMIT" - name: Cherry-pick the merge commit of target PR id: cherryPick From 34af1de341448bfcd134281afeecb963437fd184 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 10:49:00 -0700 Subject: [PATCH 426/826] Remove unused getPullRequestDetails --- .github/workflows/cherryPick.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index df10fb4aa3fb..caab22ba2679 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -65,14 +65,6 @@ jobs: echo "New version is ${{ env.NEW_VERSION }}" fi; - - name: Get merge commit for version-bump pull request - id: getVersionBumpMergeCommit - uses: Expensify/App/.github/actions/javascript/getPullRequestDetails@main - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - USER: OSBotify - TITLE_REGEX: Update version to ${{ env.NEW_VERSION }} - - name: Cherry-pick the version-bump to staging run: | # Find the commit for the version-bump From 012ae6f54a6b91d3c0e7f002fea8403386fb1c8a Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 10:52:41 -0700 Subject: [PATCH 427/826] Remove unused TITLE_REGEX input to getPullRequestDetails --- .../getPullRequestDetails/action.yml | 3 -- .../getPullRequestDetails.js | 40 ++++--------------- .../javascript/getPullRequestDetails/index.js | 40 ++++--------------- .github/workflows/e2ePerformanceTests.yml | 10 ++--- 4 files changed, 19 insertions(+), 74 deletions(-) diff --git a/.github/actions/javascript/getPullRequestDetails/action.yml b/.github/actions/javascript/getPullRequestDetails/action.yml index 40b3e4f90a05..a59cf55bdf9f 100644 --- a/.github/actions/javascript/getPullRequestDetails/action.yml +++ b/.github/actions/javascript/getPullRequestDetails/action.yml @@ -7,9 +7,6 @@ inputs: PULL_REQUEST_NUMBER: description: The number of the pull request required: false - TITLE_REGEX: - description: Regex to match PR titles for - required: false USER: description: The creator of the pull request required: true diff --git a/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js b/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js index 4ebf7a749fc9..3768774abe9e 100644 --- a/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js +++ b/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js @@ -11,7 +11,6 @@ const DEFAULT_PAYLOAD = { const pullRequestNumber = ActionUtils.getJSONInput('PULL_REQUEST_NUMBER', {required: false}, null); const user = core.getInput('USER', {required: true}); -let titleRegex = core.getInput('TITLE_REGEX', {required: false}); if (pullRequestNumber) { console.log(`Looking for pull request w/ number: ${pullRequestNumber}`); @@ -21,11 +20,6 @@ if (user) { console.log(`Looking for pull request w/ user: ${user}`); } -if (titleRegex) { - titleRegex = new RegExp(titleRegex); - console.log(`Looking for pull request w/ title matching: ${titleRegex.toString()}`); -} - /** * Output pull request merge actor. * @@ -91,30 +85,10 @@ function handleUnknownError(err) { core.setFailed(err); } -if (pullRequestNumber) { - GithubUtils.octokit.pulls - .get({ - ...DEFAULT_PAYLOAD, - pull_number: pullRequestNumber, - }) - .then(({data}) => { - processPullRequest(data); - }) - .catch(handleUnknownError); -} else { - GithubUtils.octokit.pulls - .list({ - ...DEFAULT_PAYLOAD, - state: 'all', - }) - .then(({data}) => _.find(data, (PR) => PR.user.login === user && titleRegex.test(PR.title)).number) - .then((matchingPRNum) => - GithubUtils.octokit.pulls.get({ - ...DEFAULT_PAYLOAD, - pull_number: matchingPRNum, - }), - ) - .then(({data}) => { - processPullRequest(data); - }); -} +GithubUtils.octokit.pulls + .get({ + ...DEFAULT_PAYLOAD, + pull_number: pullRequestNumber, + }) + .then(({data}) => processPullRequest(data)) + .catch(handleUnknownError); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 7653719c990b..354361f04f6e 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -21,7 +21,6 @@ const DEFAULT_PAYLOAD = { const pullRequestNumber = ActionUtils.getJSONInput('PULL_REQUEST_NUMBER', {required: false}, null); const user = core.getInput('USER', {required: true}); -let titleRegex = core.getInput('TITLE_REGEX', {required: false}); if (pullRequestNumber) { console.log(`Looking for pull request w/ number: ${pullRequestNumber}`); @@ -31,11 +30,6 @@ if (user) { console.log(`Looking for pull request w/ user: ${user}`); } -if (titleRegex) { - titleRegex = new RegExp(titleRegex); - console.log(`Looking for pull request w/ title matching: ${titleRegex.toString()}`); -} - /** * Output pull request merge actor. * @@ -101,33 +95,13 @@ function handleUnknownError(err) { core.setFailed(err); } -if (pullRequestNumber) { - GithubUtils.octokit.pulls - .get({ - ...DEFAULT_PAYLOAD, - pull_number: pullRequestNumber, - }) - .then(({data}) => { - processPullRequest(data); - }) - .catch(handleUnknownError); -} else { - GithubUtils.octokit.pulls - .list({ - ...DEFAULT_PAYLOAD, - state: 'all', - }) - .then(({data}) => _.find(data, (PR) => PR.user.login === user && titleRegex.test(PR.title)).number) - .then((matchingPRNum) => - GithubUtils.octokit.pulls.get({ - ...DEFAULT_PAYLOAD, - pull_number: matchingPRNum, - }), - ) - .then(({data}) => { - processPullRequest(data); - }); -} +GithubUtils.octokit.pulls + .get({ + ...DEFAULT_PAYLOAD, + pull_number: pullRequestNumber, + }) + .then(({data}) => processPullRequest(data)) + .catch(handleUnknownError); /***/ }), diff --git a/.github/workflows/e2ePerformanceTests.yml b/.github/workflows/e2ePerformanceTests.yml index 7661ac18faf7..4e91cd50c94b 100644 --- a/.github/workflows/e2ePerformanceTests.yml +++ b/.github/workflows/e2ePerformanceTests.yml @@ -68,8 +68,8 @@ jobs: with: GITHUB_TOKEN: ${{ github.token }} PULL_REQUEST_NUMBER: ${{ inputs.PR_NUMBER }} - user: ${{ github.actor }} - + USER: ${{ github.actor }} + - name: Merged PR - Get merge commit sha for the pull request if: ${{ fromJSON(steps.getPullRequestDetails.outputs.IS_MERGED) }} id: getMergeCommitShaIfMergedPR @@ -77,7 +77,7 @@ jobs: echo "MERGE_COMMIT_SHA=${{ steps.getPullRequestDetails.outputs.MERGE_COMMIT_SHA }}" >> "$GITHUB_OUTPUT" env: GITHUB_TOKEN: ${{ github.token }} - + - name: Unmerged PR - Fetch changes from forked repository if necessary if: ${{ !fromJSON(steps.getPullRequestDetails.outputs.IS_MERGED) && (steps.getPullRequestDetails.outputs.FORKED_REPO_URL != '') }} run: | @@ -89,7 +89,7 @@ jobs: run: | git config --global user.email "test@test.com" git config --global user.name "Test" - + - name: Unmerged PR - Merge pull request locally and get merge commit sha if: ${{ !fromJSON(steps.getPullRequestDetails.outputs.IS_MERGED) }} id: getMergeCommitShaIfUnmergedPR @@ -197,4 +197,4 @@ jobs: echo '✅ no performance regression detected' fi env: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + GITHUB_TOKEN: ${{ github.token }} From 4f5e8773c4b1b3c836d772c3ff6c87519bc42145 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 11:00:07 -0700 Subject: [PATCH 428/826] Inline some utility functions used only once --- .../getPullRequestDetails.js | 59 ++++++------------- .../javascript/getPullRequestDetails/index.js | 59 ++++++------------- 2 files changed, 36 insertions(+), 82 deletions(-) diff --git a/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js b/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js index 3768774abe9e..495a1ad2c498 100644 --- a/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js +++ b/.github/actions/javascript/getPullRequestDetails/getPullRequestDetails.js @@ -46,49 +46,26 @@ function outputForkedRepoUrl(PR) { } } -/** - * Output pull request data. - * - * @param {Object} PR - */ -function outputPullRequestData(PR) { - core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha); - core.setOutput('HEAD_COMMIT_SHA', PR.head.sha); - core.setOutput('IS_MERGED', PR.merged); - outputMergeActor(PR); - outputForkedRepoUrl(PR); -} - -/** - * Process a pull request and output its data. - * - * @param {Object} PR - */ -function processPullRequest(PR) { - if (!_.isEmpty(PR)) { - console.log(`Found matching pull request: ${PR.html_url}`); - outputPullRequestData(PR); - } else { - const err = new Error('Could not find matching pull request'); - console.error(err); - core.setFailed(err); - } -} - -/** - * Handle an unknown API error. - * - * @param {Error} err - */ -function handleUnknownError(err) { - console.log(`An unknown error occurred with the GitHub API: ${err}`); - core.setFailed(err); -} - GithubUtils.octokit.pulls .get({ ...DEFAULT_PAYLOAD, pull_number: pullRequestNumber, }) - .then(({data}) => processPullRequest(data)) - .catch(handleUnknownError); + .then(({data: PR}) => { + if (!_.isEmpty(PR)) { + console.log(`Found matching pull request: ${PR.html_url}`); + core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha); + core.setOutput('HEAD_COMMIT_SHA', PR.head.sha); + core.setOutput('IS_MERGED', PR.merged); + outputMergeActor(PR); + outputForkedRepoUrl(PR); + } else { + const err = new Error('Could not find matching pull request'); + console.error(err); + core.setFailed(err); + } + }) + .catch((err) => { + console.log(`An unknown error occurred with the GitHub API: ${err}`); + core.setFailed(err); + }); diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index 354361f04f6e..e066260e665f 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -56,52 +56,29 @@ function outputForkedRepoUrl(PR) { } } -/** - * Output pull request data. - * - * @param {Object} PR - */ -function outputPullRequestData(PR) { - core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha); - core.setOutput('HEAD_COMMIT_SHA', PR.head.sha); - core.setOutput('IS_MERGED', PR.merged); - outputMergeActor(PR); - outputForkedRepoUrl(PR); -} - -/** - * Process a pull request and output its data. - * - * @param {Object} PR - */ -function processPullRequest(PR) { - if (!_.isEmpty(PR)) { - console.log(`Found matching pull request: ${PR.html_url}`); - outputPullRequestData(PR); - } else { - const err = new Error('Could not find matching pull request'); - console.error(err); - core.setFailed(err); - } -} - -/** - * Handle an unknown API error. - * - * @param {Error} err - */ -function handleUnknownError(err) { - console.log(`An unknown error occurred with the GitHub API: ${err}`); - core.setFailed(err); -} - GithubUtils.octokit.pulls .get({ ...DEFAULT_PAYLOAD, pull_number: pullRequestNumber, }) - .then(({data}) => processPullRequest(data)) - .catch(handleUnknownError); + .then(({data: PR}) => { + if (!_.isEmpty(PR)) { + console.log(`Found matching pull request: ${PR.html_url}`); + core.setOutput('MERGE_COMMIT_SHA', PR.merge_commit_sha); + core.setOutput('HEAD_COMMIT_SHA', PR.head.sha); + core.setOutput('IS_MERGED', PR.merged); + outputMergeActor(PR); + outputForkedRepoUrl(PR); + } else { + const err = new Error('Could not find matching pull request'); + console.error(err); + core.setFailed(err); + } + }) + .catch((err) => { + console.log(`An unknown error occurred with the GitHub API: ${err}`); + core.setFailed(err); + }); /***/ }), From 66915aca0ba378607298c9d9740e8bfdcb4ea50f Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 18:09:42 +0000 Subject: [PATCH 429/826] Update version to 1.3.31-6 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 2e61623988ee..c98187fafdd8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033105 - versionName "1.3.31-5" + versionCode 1001033106 + versionName "1.3.31-6" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 545296043e10..4472ff157e21 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.5 + 1.3.31.6 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 27229cbcaa9b..1d66ca8d275a 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.31.5 + 1.3.31.6 diff --git a/package-lock.json b/package-lock.json index fcd63137f53c..b37b8ecfaaaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-5", + "version": "1.3.31-6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-5", + "version": "1.3.31-6", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 227ef27ed1b1..421e2ecdd5fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-5", + "version": "1.3.31-6", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From af27f774f1d92cae69a6574347db3f214a936eab Mon Sep 17 00:00:00 2001 From: Fedi Rajhi Date: Thu, 22 Jun 2023 14:53:16 +0100 Subject: [PATCH 430/826] [Fix] Invalid number of arguments [Fix] use accountID instead of login [Fix] test revert changes revert changes [Fix] Invalid number of arguments --- src/libs/OptionsListUtils.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 611f44f751db..b4f63ff2776b 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -618,9 +618,7 @@ function getOptions( const searchValue = parsedPhoneNumber.possible ? parsedPhoneNumber.number.e164 : searchInputValue; // Filter out all the reports that shouldn't be displayed - const filteredReports = _.filter(reports, (report) => - ReportUtils.shouldReportBeInOptionList(report, Navigation.getReportIDFromRoute(), false, currentUserLogin, iouReports, betas, policies), - ); + const filteredReports = _.filter(reports, (report) => ReportUtils.shouldReportBeInOptionList(report, Navigation.getReportIDFromRoute(), false, iouReports, betas, policies)); // Sorting the reports works like this: // - Order everything by the last message timestamp (descending) From 7338aee5e11b180025cb98c9028061132e62f864 Mon Sep 17 00:00:00 2001 From: Getabalew Tesfaye Date: Fri, 23 Jun 2023 21:13:59 +0300 Subject: [PATCH 431/826] Fix error not displayed for invalid phone number --- src/pages/settings/Profile/Contacts/NewContactMethodPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index af339132d192..aab37f9ea1d9 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -85,7 +85,7 @@ function NewContactMethodPage(props) { ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.contactMethodRequired'); } - if (!_.isEmpty(values.phoneOrEmail) && !(parsePhoneNumber(phoneLogin).possible || Str.isValidEmail(values.phoneOrEmail))) { + if (!_.isEmpty(values.phoneOrEmail) && !((parsePhoneNumber(phoneLogin).possible && Str.isValidPhone(phoneLogin.slice(0))) || Str.isValidEmail(values.phoneOrEmail))) { ErrorUtils.addErrorMessage(errors, 'phoneOrEmail', 'contacts.genericFailureMessages.invalidContactMethod'); } From cf7c65e18497c4cadf6e5f36787a34711e9d64e4 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Fri, 23 Jun 2023 20:31:20 +0200 Subject: [PATCH 432/826] Update contributingGuides/NAVIGATION.md Co-authored-by: Wojciech Lewicki --- contributingGuides/NAVIGATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index 7ccd60bc2d82..b5005cfdcf4f 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -125,7 +125,7 @@ Later on, when the user presses the browser back button expecting that the `Sett If we can create simple action that will only push one screen to the existing navigator, we won't fill any params of the navigators. -The `getMinimalAction` compares action generated by the `getActionFromState` with the current navigation state and tries to find a simpler action. +The `getMinimalAction` compares action generated by the `getActionFromState` with the current navigation state and tries to find the smallest action possible. The action for the first step created with `getMinimalAction` looks like this: From fc3d7eeb225b3e3a9e6f2f044e00db18d0601a15 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Fri, 23 Jun 2023 20:31:33 +0200 Subject: [PATCH 433/826] Update contributingGuides/NAVIGATION.md Co-authored-by: Wojciech Lewicki --- contributingGuides/NAVIGATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index b5005cfdcf4f..ca535c29c93c 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -90,7 +90,7 @@ Broken behavior is the outcome of two things: 2. `Navigation.navigate` creates action with `getActionFromState` dispatched high in the hierarchy. -The reason why `getActionFromState` provided by `react-navigation` is dispatched high in hierarchy is that it doesn't know about current navigation state, only about desired one. +The reason why `getActionFromState` provided by `react-navigation` is dispatched at the top level of the navigation hierarchy is that it doesn't know about current navigation state, only about desired one. In this example it doesn't know if the `RightModalNavigator` and `Settings` are already mounted. From 47e5fbc99f5eafe7a0bd71423d223c20592f2cf7 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski <67908363+adamgrzybowski@users.noreply.github.com> Date: Fri, 23 Jun 2023 20:31:40 +0200 Subject: [PATCH 434/826] Update contributingGuides/NAVIGATION.md Co-authored-by: Wojciech Lewicki --- contributingGuides/NAVIGATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index ca535c29c93c..d1eca9f5e724 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -88,7 +88,7 @@ Without minimal action, expected behavior won't be achieved and the final screen Broken behavior is the outcome of two things: 1. Back button in the browser resets the navigation state with the state saved in step two. -2. `Navigation.navigate` creates action with `getActionFromState` dispatched high in the hierarchy. +2. `Navigation.navigate` creates action with `getActionFromState` dispatched at the top level of the navigation hierarchy. The reason why `getActionFromState` provided by `react-navigation` is dispatched at the top level of the navigation hierarchy is that it doesn't know about current navigation state, only about desired one. From d96f44369f6f637ab59fc49e828f2c58c48a0f4e Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 11:58:59 -0700 Subject: [PATCH 435/826] Add git fetch where needed --- .github/workflows/cherryPick.yml | 1 + .github/workflows/finishReleaseCycle.yml | 2 ++ .github/workflows/preDeploy.yml | 1 + 3 files changed, 4 insertions(+) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index caab22ba2679..1c2a15b4b4aa 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -68,6 +68,7 @@ jobs: - name: Cherry-pick the version-bump to staging run: | # Find the commit for the version-bump + git fetch main git switch main VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ env.NEW_VERSION }}')" diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index bd7a4eea8ab6..e957bca819e9 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -71,6 +71,7 @@ jobs: - name: Update production branch run: | # Get the production branch locally + git fetch production git switch production # Delete the production branch and re-create it from staging @@ -112,6 +113,7 @@ jobs: - name: Update staging branch to trigger staging deploy run: | # Get the staging branch locally + git fetch staging git switch staging # Delete the staging branch and re-create it from main diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index ac5e21ffd94c..a1a3e11c3898 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -101,6 +101,7 @@ jobs: if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} run: | # Get the staging branch locally + git fetch staging git switch staging # Delete the staging branch and re-create it from main From 8a3ac9b2e3d6df49eb9f5ed2d5de36b63e9477f9 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:12:19 -0700 Subject: [PATCH 436/826] Just rely on force-push instead of fetch --- .github/workflows/finishReleaseCycle.yml | 18 +++--------------- .github/workflows/preDeploy.yml | 8 +------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index e957bca819e9..f5fda3b4d6c7 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -70,16 +70,10 @@ jobs: - name: Update production branch run: | - # Get the production branch locally - git fetch production - git switch production - - # Delete the production branch and re-create it from staging - git switch staging - git branch -D production + # Re-create the production branch from staging git switch -c production - # Force-update push the new production branch. + # Force-update the remote production branch. git push --force origin production - if: ${{ failure() }} @@ -112,13 +106,7 @@ jobs: - name: Update staging branch to trigger staging deploy run: | - # Get the staging branch locally - git fetch staging - git switch staging - - # Delete the staging branch and re-create it from main - git switch main - git branch -D staging + # Re-create the staging branch from main git switch -c staging # Force-update the updated staging branch diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index a1a3e11c3898..ef97788d3bef 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -100,13 +100,7 @@ jobs: - name: Update staging branch from main if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} run: | - # Get the staging branch locally - git fetch staging - git switch staging - - # Delete the staging branch and re-create it from main - git switch main - git branch -D staging + # Re-create the staging branch from main git switch -c staging # Force-update the remote staging branch From 8bf0293a421aed8495ecc2369aa8c32de4316c9b Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:17:51 -0700 Subject: [PATCH 437/826] Fix typo --- .github/workflows/cherryPick.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 1c2a15b4b4aa..e06b55d3ab66 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -68,7 +68,7 @@ jobs: - name: Cherry-pick the version-bump to staging run: | # Find the commit for the version-bump - git fetch main + git fetch origin main git switch main VERSION_BUMP_COMMIT="$(git log --format='%H' --author='OSBotify' --grep 'Update version to ${{ env.NEW_VERSION }}')" From 826f4779706b62b1a9f041f12afa3d4c25293989 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:19:14 -0700 Subject: [PATCH 438/826] Improve comment --- .github/workflows/finishReleaseCycle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index f5fda3b4d6c7..cbac43564f25 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -109,7 +109,7 @@ jobs: # Re-create the staging branch from main git switch -c staging - # Force-update the updated staging branch + # Force-update the remoteg staging branch git push --force origin staging - if: ${{ failure() }} From 4de2fa30ea63128cf742c4bfac746528fc425ea3 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:21:31 -0700 Subject: [PATCH 439/826] Fix another typo --- .github/workflows/finishReleaseCycle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index cbac43564f25..828f27a483e5 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -109,7 +109,7 @@ jobs: # Re-create the staging branch from main git switch -c staging - # Force-update the remoteg staging branch + # Force-update the remote staging branch git push --force origin staging - if: ${{ failure() }} From 576aac19debf38708a877a1a02a236e06cf7dd42 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 19:29:08 +0000 Subject: [PATCH 440/826] Update version to 1.3.31-7 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index c98187fafdd8..75a204464315 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033106 - versionName "1.3.31-6" + versionCode 1001033107 + versionName "1.3.31-7" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 4472ff157e21..70b6daacbf5b 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.6 + 1.3.31.7 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 1d66ca8d275a..e64ce7e5cec1 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.31.6 + 1.3.31.7 diff --git a/package-lock.json b/package-lock.json index b37b8ecfaaaa..3c4762022505 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-6", + "version": "1.3.31-7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-6", + "version": "1.3.31-7", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 421e2ecdd5fd..65c2bc8b6235 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-6", + "version": "1.3.31-7", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 66aba8da50f449b26c0a3aabce99159bad0301a2 Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Fri, 23 Jun 2023 15:30:01 -0400 Subject: [PATCH 441/826] safely get current route name to fix error --- src/libs/Navigation/Navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/Navigation/Navigation.js b/src/libs/Navigation/Navigation.js index 167f2d9eea96..c4e25b6288c8 100644 --- a/src/libs/Navigation/Navigation.js +++ b/src/libs/Navigation/Navigation.js @@ -148,7 +148,8 @@ function dismissModal(targetReportID) { * @returns {String} */ function getActiveRoute() { - const currentRouteHasName = navigationRef.current && navigationRef.current.getCurrentRoute().name; + const currentRoute = navigationRef.current && navigationRef.current.getCurrentRoute(); + const currentRouteHasName = lodashGet(currentRoute, 'name', false); if (!currentRouteHasName) { return ''; } From 6a283e3c19394e592e480379758f47f9b0d2c1a6 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:35:14 -0700 Subject: [PATCH 442/826] Fix bad fromJSON --- .github/workflows/cherryPick.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index e06b55d3ab66..6af045c01f33 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -101,7 +101,7 @@ jobs: fi - name: Create Pull Request to manually finish CP - if: fromJSON(steps.cherryPick.outputs.hasConflicts) + if: steps.cherryPick.outputs.hasConflicts == 'true' id: createPullRequest run: | gh pr create \ From e1f5cf21b1f266f8c717f3bff0b9cfa8c95822ca Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:41:35 -0700 Subject: [PATCH 443/826] Fix bad outputs name --- .github/workflows/cherryPick.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 6af045c01f33..4bbe850b11ab 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -101,7 +101,7 @@ jobs: fi - name: Create Pull Request to manually finish CP - if: steps.cherryPick.outputs.hasConflicts == 'true' + if: fromJSON(steps.cherryPick.outputs.HAS_CONFLICTS) id: createPullRequest run: | gh pr create \ From b103132e38c0a52e862e3ae51018e38a2c7c067f Mon Sep 17 00:00:00 2001 From: Andrew Rosiclair Date: Fri, 23 Jun 2023 15:42:00 -0400 Subject: [PATCH 444/826] catch and log navigation errors --- .../subscribeToReportCommentPushNotifications.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js index d6ba39095ce7..5c3d37ff9c92 100644 --- a/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js +++ b/src/libs/Notification/PushNotification/subscribeToReportCommentPushNotifications.js @@ -21,13 +21,17 @@ export default function subscribeToReportCommentPushNotifications() { Log.info('[PushNotification] onSelected() - called', false, {reportID, reportActionID}); Navigation.isNavigationReady().then(() => { - // If a chat is visible other than the one we are trying to navigate to, then we need to navigate back - if (Navigation.getActiveRoute().slice(1, 2) === ROUTES.REPORT && !Navigation.isActiveRoute(`r/${reportID}`)) { - Navigation.goBack(); - } + try { + // If a chat is visible other than the one we are trying to navigate to, then we need to navigate back + if (Navigation.getActiveRoute().slice(1, 2) === ROUTES.REPORT && !Navigation.isActiveRoute(`r/${reportID}`)) { + Navigation.goBack(); + } - Log.info('[PushNotification] onSelected() - Navigation is ready. Navigating...', false, {reportID, reportActionID}); - Navigation.navigate(ROUTES.getReportRoute(reportID)); + Log.info('[PushNotification] onSelected() - Navigation is ready. Navigating...', false, {reportID, reportActionID}); + Navigation.navigate(ROUTES.getReportRoute(reportID)); + } catch (error) { + Log.alert('[PushNotification] onSelected() - failed', {reportID, reportActionID, error: error.message}); + } }); }); } From 7278c7319c3bfba967c1830b5f7e4ddf0b28537b Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 19:50:50 +0000 Subject: [PATCH 445/826] Update version to 1.3.31-8 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 75a204464315..55e109e47dfd 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033107 - versionName "1.3.31-7" + versionCode 1001033108 + versionName "1.3.31-8" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 70b6daacbf5b..56a4f17d7eda 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.7 + 1.3.31.8 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index e64ce7e5cec1..2d148bac680f 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.31.7 + 1.3.31.8 diff --git a/package-lock.json b/package-lock.json index 3c4762022505..d518d1ada161 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-7", + "version": "1.3.31-8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-7", + "version": "1.3.31-8", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 65c2bc8b6235..0bb989354a04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-7", + "version": "1.3.31-8", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From af93a8ecc3f1eacf70fa4d894bb958ef77d2b697 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 12:55:46 -0700 Subject: [PATCH 446/826] Fix bad git fetch command --- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 2 +- .github/actions/javascript/getDeployPullRequestList/index.js | 2 +- .github/libs/GitUtils.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 737e5b1fd0fc..058c1f261622 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -228,7 +228,7 @@ function fetchRefIfNeeded(ref) { execSync(command); } catch (e) { console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - const command = `git fetch ${ref}`; + const command = `git fetch origin ${ref}`; console.log(`Running command: ${command}`); execSync(command); } diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 166bcaa4e7b4..649a40504d55 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -162,7 +162,7 @@ function fetchRefIfNeeded(ref) { execSync(command); } catch (e) { console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - const command = `git fetch ${ref}`; + const command = `git fetch origin ${ref}`; console.log(`Running command: ${command}`); execSync(command); } diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 9937e2dc6db4..227fd1bbb538 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -14,7 +14,7 @@ function fetchRefIfNeeded(ref) { execSync(command); } catch (e) { console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - const command = `git fetch ${ref}`; + const command = `git fetch origin ${ref}`; console.log(`Running command: ${command}`); execSync(command); } From 67f627d3d3353bd2fef36c3e11eea628d34324d1 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 20:14:26 +0000 Subject: [PATCH 447/826] Update version to 1.3.32-0 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 4 ++-- ios/NewExpensifyTests/Info.plist | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 55e109e47dfd..ba1d1cae87e1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033108 - versionName "1.3.31-8" + versionCode 1001033200 + versionName "1.3.32-0" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 56a4f17d7eda..dba18487f7ad 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3.31 + 1.3.32 CFBundleSignature ???? CFBundleURLTypes @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.31.8 + 1.3.32.0 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 2d148bac680f..3035f49d7201 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.3.31 + 1.3.32 CFBundleSignature ???? CFBundleVersion - 1.3.31.8 + 1.3.32.0 diff --git a/package-lock.json b/package-lock.json index d518d1ada161..c3048fcb86be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.31-8", + "version": "1.3.32-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.31-8", + "version": "1.3.32-0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 0bb989354a04..22fc0b1bbb39 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.31-8", + "version": "1.3.32-0", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 10d6af04882742d4bf6ac0681ad6c34c25c554e1 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 13:19:57 -0700 Subject: [PATCH 448/826] Remove automated PR checks from deploy.yml --- .github/workflows/deploy.yml | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 606393ca5c12..65942e19a22c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,28 +5,9 @@ on: branches: [staging, production] jobs: - validate: - runs-on: ubuntu-latest - outputs: - isAutomatedPullRequest: ${{ steps.isAutomatedPullRequest.outputs.IS_AUTOMERGE_PR }} - - steps: - - name: Get merged pull request - id: getMergedPullRequest - # TODO: Point back action actions-ecosystem after https://github.com/actions-ecosystem/action-get-merged-pull-request/pull/223 is merged - uses: roryabraham/action-get-merged-pull-request@7a7a194f6ff8f3eef58c822083695a97314ebec1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Check if merged pull request was an automatic version bump PR - id: isAutomatedPullRequest - run: echo "IS_AUTOMERGE_PR=${{ steps.getMergedPullRequest.outputs.author == 'OSBotify' }}" >> "$GITHUB_OUTPUT" - deployStaging: runs-on: ubuntu-latest - needs: validate - if: ${{ fromJSON(needs.validate.outputs.isAutomatedPullRequest) && github.ref == 'refs/heads/staging' }} - + if: github.ref == 'refs/heads/staging' steps: - name: Checkout staging branch uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 @@ -46,8 +27,7 @@ jobs: deployProduction: runs-on: ubuntu-latest - needs: validate - if: ${{ fromJSON(needs.validate.outputs.isAutomatedPullRequest) && github.ref == 'refs/heads/production' }} + if: github.ref == 'refs/heads/production' steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 @@ -84,6 +64,5 @@ jobs: with: tag_name: ${{ env.PRODUCTION_VERSION }} body: ${{ steps.getReleaseBody.outputs.RELEASE_BODY }} - env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} From 9a4c8ae43cc17d3c06be6f38129424314ba796c3 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 13:23:15 -0700 Subject: [PATCH 449/826] Remove IS_AUTOMATED from preDeploy --- .github/workflows/preDeploy.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index ef97788d3bef..5f830a22747f 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -30,7 +30,6 @@ jobs: needs: confirmPassingBuild outputs: MERGED_PR: ${{ steps.getMergedPullRequest.outputs.number }} - IS_AUTOMATED_PR: ${{ steps.isAutomatedPullRequest.outputs.IS_AUTOMATED_PR }} SHOULD_DEPLOY: ${{ steps.shouldDeploy.outputs.SHOULD_DEPLOY }} SHOULD_CP: ${{ steps.isStagingDeployLocked.outputs.IS_LOCKED && steps.hasCherryPickLabel.outputs.HAS_CP_LABEL }} @@ -47,22 +46,18 @@ jobs: with: GITHUB_TOKEN: ${{ github.token }} - - name: Check if merged pull request was an automated PR - id: isAutomatedPullRequest - run: echo "IS_AUTOMATED_PR=${{ github.actor == 'OSBotify' }}" >> "$GITHUB_OUTPUT" - - name: Check if merged pull request has `CP Staging` label id: hasCherryPickLabel run: echo "HAS_CP_LABEL=${{ contains(steps.getMergedPullRequest.outputs.labels, 'CP Staging') }}" >> "$GITHUB_OUTPUT" - name: Check if merged pull request should trigger a deploy id: shouldDeploy - run: echo "SHOULD_DEPLOY=${{ fromJSON(steps.hasCherryPickLabel.outputs.HAS_CP_LABEL) || (!fromJSON(steps.isStagingDeployLocked.outputs.IS_LOCKED) && !fromJSON(steps.isAutomatedPullRequest.outputs.IS_AUTOMATED_PR)) }}" >> "$GITHUB_OUTPUT" + run: echo "SHOULD_DEPLOY=${{ fromJSON(steps.hasCherryPickLabel.outputs.HAS_CP_LABEL) || (!fromJSON(steps.isStagingDeployLocked.outputs.IS_LOCKED) && github.actor != 'OSBotify') }}" >> "$GITHUB_OUTPUT" skipDeploy: runs-on: ubuntu-latest needs: chooseDeployActions - if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_DEPLOY) && !fromJSON(needs.chooseDeployActions.outputs.IS_AUTOMATED_PR) }} + if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_DEPLOY) && github.actor != 'OSBotify' }} steps: - name: Comment on deferred PR uses: actions-ecosystem/action-create-comment@cd098164398331c50e7dfdd0dfa1b564a1873fac From 950f7d1bf352e8d495d38a23b4e40989757657b5 Mon Sep 17 00:00:00 2001 From: chiragsalian Date: Fri, 23 Jun 2023 13:26:58 -0700 Subject: [PATCH 450/826] improved safety check --- src/libs/ReportUtils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index e056a4ec6ce4..73be4623d929 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -472,6 +472,11 @@ function isArchivedRoom(report) { * @returns {String} */ function getPolicyName(report, returnEmptyIfNotFound = false) { + const noPolicyFound = returnEmptyIfNotFound ? '' : Localize.translateLocal('workspace.common.unavailable'); + if (report === undefined) { + return noPolicyFound; + } + if ((!allPolicies || _.size(allPolicies) === 0) && !report.policyName) { return Localize.translateLocal('workspace.common.unavailable'); } @@ -480,7 +485,7 @@ function getPolicyName(report, returnEmptyIfNotFound = false) { // // Public rooms send back the policy name with the reportSummary, // // since they can also be accessed by people who aren't in the workspace - return lodashGet(policy, 'name') || report.policyName || report.oldPolicyName || (returnEmptyIfNotFound ? '' : Localize.translateLocal('workspace.common.unavailable')); + return lodashGet(policy, 'name') || report.policyName || report.oldPolicyName || noPolicyFound; } /** From 2cd9b783f98b0281a3f9812f4501a0fc297483ed Mon Sep 17 00:00:00 2001 From: Ionatan Wiznia Date: Fri, 23 Jun 2023 17:46:30 -0300 Subject: [PATCH 451/826] Change SendPerformanceTiming to be a read so it is not retried and gets stuck in a loop --- src/libs/actions/Timing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Timing.js b/src/libs/actions/Timing.js index 0f6a67d0879e..1bc4decebd4b 100644 --- a/src/libs/actions/Timing.js +++ b/src/libs/actions/Timing.js @@ -51,11 +51,11 @@ function end(eventName, secondaryName = '') { return; } - API.write('SendPerformanceTiming', { + API.read('SendPerformanceTiming', { name: grafanaEventName, value: eventTime, platform: `${getPlatform()}`, - }); + }, {}); }); } From 1728f19c9543f5372291ae33d62e6ddef7369c92 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 14:02:44 -0700 Subject: [PATCH 452/826] Remove automated PR filter from GithubUtils since it already exists in GitUtils --- .../actions/javascript/authorChecklist/index.js | 17 ++--------------- .../javascript/awaitStagingDeploys/index.js | 17 ++--------------- .../javascript/checkDeployBlockers/index.js | 17 ++--------------- .../createOrUpdateStagingDeploy/index.js | 17 ++--------------- .../getDeployPullRequestList/index.js | 17 ++--------------- .../javascript/getPullRequestDetails/index.js | 17 ++--------------- .../actions/javascript/getReleaseBody/index.js | 17 ++--------------- .../javascript/isStagingDeployLocked/index.js | 17 ++--------------- .../markPullRequestsAsDeployed/index.js | 17 ++--------------- .../javascript/postTestBuildComment/index.js | 17 ++--------------- .../javascript/reopenIssueWithComment/index.js | 17 ++--------------- .../javascript/reviewerChecklist/index.js | 17 ++--------------- .../javascript/triggerWorkflowAndWait/index.js | 17 ++--------------- .../javascript/verifySignedCommits/index.js | 17 ++--------------- .github/libs/GithubUtils.js | 17 ++--------------- 15 files changed, 30 insertions(+), 225 deletions(-) diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index f09d586b629c..7f9b05a286c3 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -340,9 +340,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -366,7 +363,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -423,7 +420,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -603,16 +600,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/awaitStagingDeploys/index.js b/.github/actions/javascript/awaitStagingDeploys/index.js index c2948688b83a..4ea17b8b29e5 100644 --- a/.github/actions/javascript/awaitStagingDeploys/index.js +++ b/.github/actions/javascript/awaitStagingDeploys/index.js @@ -378,9 +378,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -404,7 +401,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -461,7 +458,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -641,16 +638,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/checkDeployBlockers/index.js b/.github/actions/javascript/checkDeployBlockers/index.js index 80e39e8d1285..8b8a401ba592 100644 --- a/.github/actions/javascript/checkDeployBlockers/index.js +++ b/.github/actions/javascript/checkDeployBlockers/index.js @@ -345,9 +345,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -371,7 +368,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -428,7 +425,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -608,16 +605,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 058c1f261622..a6524bcf7d17 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -577,9 +577,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -603,7 +600,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -660,7 +657,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -840,16 +837,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 649a40504d55..f46ea055282a 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -511,9 +511,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -537,7 +534,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -594,7 +591,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -774,16 +771,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/getPullRequestDetails/index.js b/.github/actions/javascript/getPullRequestDetails/index.js index e066260e665f..7105946b2c73 100644 --- a/.github/actions/javascript/getPullRequestDetails/index.js +++ b/.github/actions/javascript/getPullRequestDetails/index.js @@ -390,9 +390,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -416,7 +413,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -473,7 +470,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -653,16 +650,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/getReleaseBody/index.js b/.github/actions/javascript/getReleaseBody/index.js index cdf97f3d2818..84ef8fff3685 100644 --- a/.github/actions/javascript/getReleaseBody/index.js +++ b/.github/actions/javascript/getReleaseBody/index.js @@ -332,9 +332,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -358,7 +355,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -415,7 +412,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -595,16 +592,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/isStagingDeployLocked/index.js b/.github/actions/javascript/isStagingDeployLocked/index.js index 650021e3cbb3..9a44f0418d27 100644 --- a/.github/actions/javascript/isStagingDeployLocked/index.js +++ b/.github/actions/javascript/isStagingDeployLocked/index.js @@ -296,9 +296,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -322,7 +319,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -379,7 +376,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -559,16 +556,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/markPullRequestsAsDeployed/index.js b/.github/actions/javascript/markPullRequestsAsDeployed/index.js index 6174a21f629f..22ce69749265 100644 --- a/.github/actions/javascript/markPullRequestsAsDeployed/index.js +++ b/.github/actions/javascript/markPullRequestsAsDeployed/index.js @@ -473,9 +473,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -499,7 +496,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -556,7 +553,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -736,16 +733,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js index c52177037668..2291b2f3cec2 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -340,9 +340,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -366,7 +363,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -423,7 +420,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -603,16 +600,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/reopenIssueWithComment/index.js b/.github/actions/javascript/reopenIssueWithComment/index.js index 4c5167ca3275..536afba4b408 100644 --- a/.github/actions/javascript/reopenIssueWithComment/index.js +++ b/.github/actions/javascript/reopenIssueWithComment/index.js @@ -309,9 +309,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -335,7 +332,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -392,7 +389,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -572,16 +569,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/reviewerChecklist/index.js b/.github/actions/javascript/reviewerChecklist/index.js index 6a7434946447..abb9deb48b92 100644 --- a/.github/actions/javascript/reviewerChecklist/index.js +++ b/.github/actions/javascript/reviewerChecklist/index.js @@ -375,9 +375,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -401,7 +398,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -458,7 +455,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -638,16 +635,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/triggerWorkflowAndWait/index.js b/.github/actions/javascript/triggerWorkflowAndWait/index.js index 091b759a95ce..413dec66a4f4 100644 --- a/.github/actions/javascript/triggerWorkflowAndWait/index.js +++ b/.github/actions/javascript/triggerWorkflowAndWait/index.js @@ -474,9 +474,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -500,7 +497,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -557,7 +554,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -737,16 +734,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/actions/javascript/verifySignedCommits/index.js b/.github/actions/javascript/verifySignedCommits/index.js index 3283ab4f6c9a..664c51fefd61 100644 --- a/.github/actions/javascript/verifySignedCommits/index.js +++ b/.github/actions/javascript/verifySignedCommits/index.js @@ -298,9 +298,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -324,7 +321,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -381,7 +378,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -561,16 +558,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * diff --git a/.github/libs/GithubUtils.js b/.github/libs/GithubUtils.js index 4babce9d769d..2677a8e68fec 100644 --- a/.github/libs/GithubUtils.js +++ b/.github/libs/GithubUtils.js @@ -233,9 +233,6 @@ class GithubUtils { ) { return this.fetchAllPullRequests(_.map(PRList, this.getPullRequestNumberFromURL)) .then((data) => { - const automatedPRs = _.pluck(_.filter(data, GithubUtils.isAutomatedPullRequest), 'html_url'); - console.log('Filtering out the following automated pull requests:', automatedPRs); - // The format of this map is following: // { // 'https://github.com/Expensify/App/pull/9641': [ 'PauloGasparSv', 'kidroca' ], @@ -259,7 +256,7 @@ class GithubUtils { console.log('Found the following NO QA PRs:', noQAPRs); const verifiedOrNoQAPRs = _.union(verifiedPRList, noQAPRs); - const sortedPRList = _.chain(PRList).difference(automatedPRs).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); + const sortedPRList = _.chain(PRList).difference(_.keys(internalQAPRMap)).unique().sortBy(GithubUtils.getPullRequestNumberFromURL).value(); const sortedDeployBlockers = _.sortBy(_.unique(deployBlockers), GithubUtils.getIssueOrPullRequestNumberFromURL); // Tag version and comparison URL @@ -316,7 +313,7 @@ class GithubUtils { issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n'; return issueBody; }) - .catch((err) => console.warn('Error generating StagingDeployCash issue body!', 'Automated PRs may not be properly filtered out. Continuing...', err)); + .catch((err) => console.warn('Error generating StagingDeployCash issue body! Continuing...', err)); } /** @@ -496,16 +493,6 @@ class GithubUtils { return Number.parseInt(matches[1], 10); } - /** - * Determine if a given pull request is an automated PR. - * - * @param {Object} pullRequest - * @returns {Boolean} - */ - static isAutomatedPullRequest(pullRequest) { - return _.isEqual(lodashGet(pullRequest, 'user.login', ''), CONST.OS_BOTIFY); - } - /** * Return the login of the actor who closed an issue or PR. If the issue is not closed, return an empty string. * From f16da2860f160d99181fae4f381677c5e9f3e7a0 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 14:23:28 -0700 Subject: [PATCH 453/826] Fix GitHubUtilsTest --- tests/unit/GithubUtilsTest.js | 39 ++++++++++++++--------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/tests/unit/GithubUtilsTest.js b/tests/unit/GithubUtilsTest.js index 02b051257168..b2b84dfd9d9f 100644 --- a/tests/unit/GithubUtilsTest.js +++ b/tests/unit/GithubUtilsTest.js @@ -2,7 +2,6 @@ * @jest-environment node */ const core = require('@actions/core'); -const CONST = require('../../.github/libs/CONST'); const GithubUtils = require('../../.github/libs/GithubUtils'); const mockGetInput = jest.fn(); @@ -280,29 +279,22 @@ describe('GithubUtils', () => { }, { number: 4, - title: 'Test Automated PR', - html_url: 'https://github.com/Expensify/App/pull/4', - user: {login: CONST.OS_BOTIFY}, - labels: [{name: 'automerge'}], - }, - { - number: 5, title: '[NO QA] Test No QA PR uppercase', - html_url: 'https://github.com/Expensify/App/pull/5', + html_url: 'https://github.com/Expensify/App/pull/4', user: {login: 'testUser'}, labels: [], }, { - number: 6, + number: 5, title: '[NoQa] Test No QA PR Title Case', - html_url: 'https://github.com/Expensify/App/pull/6', + html_url: 'https://github.com/Expensify/App/pull/5', user: {login: 'testUser'}, labels: [], }, { - number: 7, + number: 6, title: '[Internal QA] Test Internal QA PR', - html_url: 'https://github.com/Expensify/App/pull/7', + html_url: 'https://github.com/Expensify/App/pull/6', user: {login: 'testUser'}, labels: [ { @@ -324,9 +316,9 @@ describe('GithubUtils', () => { ], }, { - number: 8, + number: 7, title: '[Internal QA] Another Test Internal QA PR', - html_url: 'https://github.com/Expensify/App/pull/8', + html_url: 'https://github.com/Expensify/App/pull/7', user: {login: 'testUser'}, labels: [ { @@ -370,15 +362,14 @@ describe('GithubUtils', () => { 'https://github.com/Expensify/App/pull/2', 'https://github.com/Expensify/App/pull/3', 'https://github.com/Expensify/App/pull/1', - 'https://github.com/Expensify/App/pull/4', // Automated 'https://github.com/Expensify/App/pull/3', // This is an intentional duplicate for testing duplicates + 'https://github.com/Expensify/App/pull/4', // No QA 'https://github.com/Expensify/App/pull/5', // No QA - 'https://github.com/Expensify/App/pull/6', // No QA ]; const internalQAPRList = [ + 'https://github.com/Expensify/App/pull/6', // Internal QA 'https://github.com/Expensify/App/pull/7', // Internal QA - 'https://github.com/Expensify/App/pull/8', // Internal QA ]; const baseDeployBlockerList = ['https://github.com/Expensify/App/pull/3', 'https://github.com/Expensify/App/issues/4']; @@ -409,8 +400,8 @@ describe('GithubUtils', () => { `${closedCheckbox}${basePRList[2]}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + - `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}`; test('Test no verified PRs', () => @@ -420,8 +411,8 @@ describe('GithubUtils', () => { `${openCheckbox}${basePRList[2]}` + `${lineBreak}${openCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + - `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + @@ -437,8 +428,8 @@ describe('GithubUtils', () => { `${openCheckbox}${basePRList[2]}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + - `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployerVerificationsHeader}` + `${lineBreak}${openCheckbox}${timingDashboardVerification}` + `${lineBreak}${openCheckbox}${firebaseVerification}` + @@ -496,8 +487,8 @@ describe('GithubUtils', () => { `${closedCheckbox}${basePRList[2]}` + `${lineBreak}${closedCheckbox}${basePRList[0]}` + `${lineBreak}${closedCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + - `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreakDouble}${deployBlockerHeader}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[0]}` + `${lineBreak}${closedCheckbox}${baseDeployBlockerList[1]}` + @@ -516,8 +507,8 @@ describe('GithubUtils', () => { `${openCheckbox}${basePRList[2]}` + `${lineBreak}${openCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + - `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${internalQAHeader}` + `${lineBreak}${openCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + @@ -536,8 +527,8 @@ describe('GithubUtils', () => { `${openCheckbox}${basePRList[2]}` + `${lineBreak}${openCheckbox}${basePRList[0]}` + `${lineBreak}${openCheckbox}${basePRList[1]}` + + `${lineBreak}${closedCheckbox}${basePRList[4]}` + `${lineBreak}${closedCheckbox}${basePRList[5]}` + - `${lineBreak}${closedCheckbox}${basePRList[6]}` + `${lineBreak}${internalQAHeader}` + `${lineBreak}${closedCheckbox}${internalQAPRList[0]}${assignOctocatHubot}` + `${lineBreak}${openCheckbox}${internalQAPRList[1]}${assignOctocatHubot}` + From 96e534a5b28cecb7cb221986a2dbca57c6d2fc1e Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 21:39:19 +0000 Subject: [PATCH 454/826] Update version to 1.3.32-1 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index ba1d1cae87e1..9b4c0bd43c15 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033200 - versionName "1.3.32-0" + versionCode 1001033201 + versionName "1.3.32-1" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index dba18487f7ad..1d5579a65f35 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.32.0 + 1.3.32.1 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 3035f49d7201..90780dc131c0 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.32.0 + 1.3.32.1 diff --git a/package-lock.json b/package-lock.json index c3048fcb86be..2f743614ad25 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.32-0", + "version": "1.3.32-1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.32-0", + "version": "1.3.32-1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 22fc0b1bbb39..c90c354fc281 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.32-0", + "version": "1.3.32-1", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From e0d4b4f64835f8dc5688ea6a4422a46ce91e6158 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 14:52:51 -0700 Subject: [PATCH 455/826] Use gh cli to get user teams membership --- .github/workflows/preDeploy.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index ef97788d3bef..c6d78154ff4b 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -170,7 +170,7 @@ jobs: runs-on: ubuntu-latest outputs: - IS_EXPENSIFY_EMPLOYEE: ${{ fromJSON(steps.checkActor.outputs.isTeamMember) }} + IS_EXPENSIFY_EMPLOYEE: ${{ fromJSON(steps.checkAuthor.outputs.IS_EXPENSIFY_EMPLOYEE) }} steps: - name: Get merged pull request @@ -179,13 +179,16 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Check whether the actor is member of Expensify/expensify team - id: checkActor - uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 - with: + - name: Check whether the PR author is member of Expensify/expensify team + id: checkAuthor + run: | + if gh api /orgs/Expensify/teams/infra/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then + echo "IS_EXPENSIFY_EMPLOYEE=true" >> "$GITHUB_OUTPUT" + else + echo "IS_EXPENSIFY_EMPLOYEE=false" >> "$GITHUB_OUTPUT" + fi + env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - username: ${{ steps.getMergedPullRequest.outputs.author }} - team: Expensify/expensify newContributorWelcomeMessage: runs-on: ubuntu-latest From 5a1986d654c7da52981f9f6c1f984c4c354a81bb Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 14:56:53 -0700 Subject: [PATCH 456/826] Update platformDeploy.yml --- .github/workflows/platformDeploy.yml | 13 ++++++++----- .github/workflows/preDeploy.yml | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index f7989092fb0d..f368273c9b1f 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -16,14 +16,17 @@ jobs: validateActor: runs-on: ubuntu-latest outputs: - IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.isTeamMember) || github.actor == 'OSBotify' }} + IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' }} steps: - id: isUserDeployer - uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 - with: + run: | + if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then + echo "IS_DEPLOYER=true" >> "$GITHUB_OUTPUT" + else + echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT" + fi + env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - username: ${{ github.actor }} - team: mobile-deployers android: name: Build and deploy Android diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index c6d78154ff4b..27ab64397f72 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -182,7 +182,7 @@ jobs: - name: Check whether the PR author is member of Expensify/expensify team id: checkAuthor run: | - if gh api /orgs/Expensify/teams/infra/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then + if gh api /orgs/Expensify/teams/expensify-expensify/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then echo "IS_EXPENSIFY_EMPLOYEE=true" >> "$GITHUB_OUTPUT" else echo "IS_EXPENSIFY_EMPLOYEE=false" >> "$GITHUB_OUTPUT" From 4741876f71b92d7e2cac6c81195241644df9b7ce Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 14:58:59 -0700 Subject: [PATCH 457/826] Update testBuild.yml --- .github/workflows/platformDeploy.yml | 2 +- .github/workflows/testBuild.yml | 15 +++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index f368273c9b1f..cc6653aa9aa0 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -20,7 +20,7 @@ jobs: steps: - id: isUserDeployer run: | - if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ steps.getMergedPullRequest.outputs.author }} --silent; then + if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ github.actor }} --silent; then echo "IS_DEPLOYER=true" >> "$GITHUB_OUTPUT" else echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 2b2db82c36b0..246e31178564 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -17,14 +17,17 @@ jobs: validateActor: runs-on: ubuntu-latest outputs: - READY_TO_BUILD: ${{ fromJSON(steps.isUserTeamMember.outputs.isTeamMember) && fromJSON(steps.hasReadyToBuildLabel.outputs.HAS_READY_TO_BUILD_LABEL) }} + READY_TO_BUILD: ${{ fromJSON(steps.isExpensifyEmployee.outputs.IS_EXPENSIFY_EMPLOYEE) && fromJSON(steps.hasReadyToBuildLabel.outputs.HAS_READY_TO_BUILD_LABEL) }} steps: - - id: isUserTeamMember - uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 - with: + - id: isExpensifyEmployee + run: | + if gh api /orgs/Expensify/teams/expensify-expensify/memberships/${{ github.actor }} --silent; then + echo "IS_EXPENSIFY_EMPLOYEE=true" >> "$GITHUB_OUTPUT" + else + echo "IS_EXPENSIFY_EMPLOYEE=false" >> "$GITHUB_OUTPUT" + fi + env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - username: ${{ github.actor }} - team: 'Expensify/expensify' - id: hasReadyToBuildLabel name: Set HAS_READY_TO_BUILD_LABEL flag From d2883ae6d648e15c6a210250550097ba69432f3f Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 15:01:58 -0700 Subject: [PATCH 458/826] Update finishReleaseCycle --- .github/workflows/finishReleaseCycle.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/finishReleaseCycle.yml b/.github/workflows/finishReleaseCycle.yml index 828f27a483e5..b78a5fac4b69 100644 --- a/.github/workflows/finishReleaseCycle.yml +++ b/.github/workflows/finishReleaseCycle.yml @@ -10,18 +10,21 @@ jobs: runs-on: ubuntu-latest if: contains(github.event.issue.labels.*.name, 'StagingDeployCash') outputs: - isValid: ${{ fromJSON(steps.validateActor.outputs.isTeamMember) && !fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }} + isValid: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && !fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }} steps: - name: Validate actor is deployer - id: validateActor - uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 - with: + id: isDeployer + run: | + if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ github.actor }} --silent; then + echo "IS_DEPLOYER=true" >> "$GITHUB_OUTPUT" + else + echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT" + fi + env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - username: ${{ github.actor }} - team: mobile-deployers - name: Reopen and comment on issue - if: ${{ !fromJSON(steps.validateActor.outputs.isTeamMember) }} + if: ${{ !fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) }} uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main with: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} @@ -31,7 +34,7 @@ jobs: Reopening! - name: Check for any deploy blockers - if: ${{ fromJSON(steps.validateActor.outputs.isTeamMember) }} + if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) }} id: checkDeployBlockers uses: Expensify/App/.github/actions/javascript/checkDeployBlockers@main with: @@ -39,7 +42,7 @@ jobs: ISSUE_NUMBER: ${{ github.event.issue.number }} - name: Reopen and comment on issue - if: ${{ fromJSON(steps.validateActor.outputs.isTeamMember) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }} + if: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) && fromJSON(steps.checkDeployBlockers.outputs.HAS_DEPLOY_BLOCKERS) }} uses: Expensify/App/.github/actions/javascript/reopenIssueWithComment@main with: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} From b464fbf71fc2d3a0e3f37596ddabe4c4d47f51df Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 15:03:53 -0700 Subject: [PATCH 459/826] Update cherryPick.yml --- .github/workflows/cherryPick.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cherryPick.yml b/.github/workflows/cherryPick.yml index 4bbe850b11ab..d4e6a59fa757 100644 --- a/.github/workflows/cherryPick.yml +++ b/.github/workflows/cherryPick.yml @@ -15,14 +15,17 @@ jobs: validateActor: runs-on: ubuntu-latest outputs: - IS_DEPLOYER: ${{ fromJSON(steps.isUserDeployer.outputs.isTeamMember) || github.actor == 'OSBotify' }} + IS_DEPLOYER: ${{ fromJSON(steps.isDeployer.outputs.IS_DEPLOYER) || github.actor == 'OSBotify' }} steps: - - id: isUserDeployer - uses: tspascoal/get-user-teams-membership@baf2e6adf4c3b897bd65a7e3184305c165aec872 - with: + - id: isDeployer + run: | + if gh api /orgs/Expensify/teams/mobile-deployers/memberships/${{ github.actor }} --silent; then + echo "IS_DEPLOYER=true" >> "$GITHUB_OUTPUT" + else + echo "IS_DEPLOYER=false" >> "$GITHUB_OUTPUT" + fi + env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - username: ${{ github.actor }} - team: mobile-deployers createNewVersion: needs: validateActor From fa4e24fa71ef9e1901e481a67e638c8e5dcbdf6c Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 15:12:50 -0700 Subject: [PATCH 460/826] Add more verbose logs to fetchRefIfNeeded --- .../javascript/createOrUpdateStagingDeploy/index.js | 13 ++++++++++--- .../javascript/getDeployPullRequestList/index.js | 13 ++++++++++--- .github/libs/GitUtils.js | 13 ++++++++++--- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index a6524bcf7d17..f77f8b345001 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -225,12 +225,19 @@ function fetchRefIfNeeded(ref) { console.log(`Checking if ref ${ref} exists locally`); const command = `git rev-parse --verify ${ref}`; console.log(`Running command: ${command}`); - execSync(command); + const result = execSync(command).toString(); + console.log(result); } catch (e) { console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - const command = `git fetch origin ${ref}`; + let command = `git fetch origin ${ref}`; console.log(`Running command: ${command}`); - execSync(command); + let result = execSync(command).toString(); + console.log(result); + console.log('Verifying that the ref is now available...'); + command = `git rev-parse --verify ${ref}`; + console.log(`Running command: ${command}`); + result = execSync(command).toString(); + console.log(result); } } diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index f46ea055282a..e6a58ecc597c 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -159,12 +159,19 @@ function fetchRefIfNeeded(ref) { console.log(`Checking if ref ${ref} exists locally`); const command = `git rev-parse --verify ${ref}`; console.log(`Running command: ${command}`); - execSync(command); + const result = execSync(command).toString(); + console.log(result); } catch (e) { console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - const command = `git fetch origin ${ref}`; + let command = `git fetch origin ${ref}`; console.log(`Running command: ${command}`); - execSync(command); + let result = execSync(command).toString(); + console.log(result); + console.log('Verifying that the ref is now available...'); + command = `git rev-parse --verify ${ref}`; + console.log(`Running command: ${command}`); + result = execSync(command).toString(); + console.log(result); } } diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 227fd1bbb538..19252d34e1ab 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -11,12 +11,19 @@ function fetchRefIfNeeded(ref) { console.log(`Checking if ref ${ref} exists locally`); const command = `git rev-parse --verify ${ref}`; console.log(`Running command: ${command}`); - execSync(command); + const result = execSync(command).toString(); + console.log(result); } catch (e) { console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - const command = `git fetch origin ${ref}`; + let command = `git fetch origin ${ref}`; console.log(`Running command: ${command}`); - execSync(command); + let result = execSync(command).toString(); + console.log(result); + console.log('Verifying that the ref is now available...'); + command = `git rev-parse --verify ${ref}`; + console.log(`Running command: ${command}`); + result = execSync(command).toString(); + console.log(result); } } From afa0a7d98ff50cc70fce64ffcb155ccd63606a2e Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 22:13:29 +0000 Subject: [PATCH 461/826] Update version to 1.3.32-2 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9b4c0bd43c15..6525d64f9ae6 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033201 - versionName "1.3.32-1" + versionCode 1001033202 + versionName "1.3.32-2" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 1d5579a65f35..cb649c294884 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.32.1 + 1.3.32.2 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 90780dc131c0..7cf180a90cb1 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.32.1 + 1.3.32.2 diff --git a/package-lock.json b/package-lock.json index 2f743614ad25..5a3288e469c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.32-1", + "version": "1.3.32-2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.32-1", + "version": "1.3.32-2", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index c90c354fc281..a58658d48d08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.32-1", + "version": "1.3.32-2", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 02636d8ddbabbc533cf39e63d40e1b7c3dc5b506 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 22:27:10 +0000 Subject: [PATCH 462/826] Update version to 1.3.32-3 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 6525d64f9ae6..49729f75fbaf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033202 - versionName "1.3.32-2" + versionCode 1001033203 + versionName "1.3.32-3" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index cb649c294884..9c7340b17467 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.32.2 + 1.3.32.3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 7cf180a90cb1..bcafeae393fb 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.32.2 + 1.3.32.3 diff --git a/package-lock.json b/package-lock.json index 5a3288e469c2..8282ee92fe70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.32-2", + "version": "1.3.32-3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.32-2", + "version": "1.3.32-3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index a58658d48d08..775e8f85eee1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.32-2", + "version": "1.3.32-3", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From c7b959ff1d9a676b7a46b11a86f5dd1906b9ad1c Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 15:41:13 -0700 Subject: [PATCH 463/826] Correctly fetch tags in GitUtils --- .../createOrUpdateStagingDeploy/index.js | 46 +++++++++---------- .../getDeployPullRequestList/index.js | 46 +++++++++---------- .github/libs/GitUtils.js | 46 +++++++++---------- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index f77f8b345001..c7a84ad922c9 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -218,23 +218,23 @@ const CONST = __nccwpck_require__(4097); const sanitizeStringForJSONParse = __nccwpck_require__(9338); /** - * @param {String} ref + * @param {String} tag */ -function fetchRefIfNeeded(ref) { +function fetchTagIfNeeded(tag) { try { - console.log(`Checking if ref ${ref} exists locally`); - const command = `git rev-parse --verify ${ref}`; + console.log(`Checking if tag ${tag} exists locally`); + const command = `git rev-parse --verify ${tag}`; console.log(`Running command: ${command}`); const result = execSync(command).toString(); console.log(result); } catch (e) { - console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - let command = `git fetch origin ${ref}`; + console.log(`Tag ${tag} not found locally, attempting to fetch it.`); + let command = `git fetch origin refs/tags/${tag}:refs/tags/${tag}`; console.log(`Running command: ${command}`); let result = execSync(command).toString(); console.log(result); - console.log('Verifying that the ref is now available...'); - command = `git rev-parse --verify ${ref}`; + console.log('Verifying that the tag is now available...'); + command = `git rev-parse --verify ${tag}`; console.log(`Running command: ${command}`); result = execSync(command).toString(); console.log(result); @@ -242,21 +242,21 @@ function fetchRefIfNeeded(ref) { } /** - * Get merge logs between two refs (inclusive) as a JavaScript object. + * Get merge logs between two tags (inclusive) as a JavaScript object. * - * @param {String} fromRef - * @param {String} toRef + * @param {String} fromTag + * @param {String} toTag * @returns {Promise>>} */ -function getCommitHistoryAsJSON(fromRef, toRef) { - fetchRefIfNeeded(fromRef); - fetchRefIfNeeded(toRef); +function getCommitHistoryAsJSON(fromTag, toTag) { + fetchTagIfNeeded(fromTag); + fetchTagIfNeeded(toTag); - console.log('Getting pull requests merged between the following refs:', fromRef, toRef); + console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]; + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); @@ -321,19 +321,19 @@ function getValidMergedPRs(commits) { } /** - * Takes in two git refs and returns a list of PR numbers of all PRs merged between those two refs + * Takes in two git tags and returns a list of PR numbers of all PRs merged between those two tags * - * @param {String} fromRef - * @param {String} toRef + * @param {String} fromTag + * @param {String} toTag * @returns {Promise>} – Pull request numbers */ -function getPullRequestsMergedBetween(fromRef, toRef) { - return getCommitHistoryAsJSON(fromRef, toRef).then((commitList) => { - console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); +function getPullRequestsMergedBetween(fromTag, toTag) { + return getCommitHistoryAsJSON(fromTag, toTag).then((commitList) => { + console.log(`Commits made between ${fromTag} and ${toTag}:`, commitList); // Find which commit messages correspond to merged PR's const pullRequestNumbers = getValidMergedPRs(commitList); - console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); + console.log(`List of pull requests merged between ${fromTag} and ${toTag}`, pullRequestNumbers); return pullRequestNumbers; }); } diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index e6a58ecc597c..7339beca6d9a 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -152,23 +152,23 @@ const CONST = __nccwpck_require__(4097); const sanitizeStringForJSONParse = __nccwpck_require__(9338); /** - * @param {String} ref + * @param {String} tag */ -function fetchRefIfNeeded(ref) { +function fetchTagIfNeeded(tag) { try { - console.log(`Checking if ref ${ref} exists locally`); - const command = `git rev-parse --verify ${ref}`; + console.log(`Checking if tag ${tag} exists locally`); + const command = `git rev-parse --verify ${tag}`; console.log(`Running command: ${command}`); const result = execSync(command).toString(); console.log(result); } catch (e) { - console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - let command = `git fetch origin ${ref}`; + console.log(`Tag ${tag} not found locally, attempting to fetch it.`); + let command = `git fetch origin refs/tags/${tag}:refs/tags/${tag}`; console.log(`Running command: ${command}`); let result = execSync(command).toString(); console.log(result); - console.log('Verifying that the ref is now available...'); - command = `git rev-parse --verify ${ref}`; + console.log('Verifying that the tag is now available...'); + command = `git rev-parse --verify ${tag}`; console.log(`Running command: ${command}`); result = execSync(command).toString(); console.log(result); @@ -176,21 +176,21 @@ function fetchRefIfNeeded(ref) { } /** - * Get merge logs between two refs (inclusive) as a JavaScript object. + * Get merge logs between two tags (inclusive) as a JavaScript object. * - * @param {String} fromRef - * @param {String} toRef + * @param {String} fromTag + * @param {String} toTag * @returns {Promise>>} */ -function getCommitHistoryAsJSON(fromRef, toRef) { - fetchRefIfNeeded(fromRef); - fetchRefIfNeeded(toRef); +function getCommitHistoryAsJSON(fromTag, toTag) { + fetchTagIfNeeded(fromTag); + fetchTagIfNeeded(toTag); - console.log('Getting pull requests merged between the following refs:', fromRef, toRef); + console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]; + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); @@ -255,19 +255,19 @@ function getValidMergedPRs(commits) { } /** - * Takes in two git refs and returns a list of PR numbers of all PRs merged between those two refs + * Takes in two git tags and returns a list of PR numbers of all PRs merged between those two tags * - * @param {String} fromRef - * @param {String} toRef + * @param {String} fromTag + * @param {String} toTag * @returns {Promise>} – Pull request numbers */ -function getPullRequestsMergedBetween(fromRef, toRef) { - return getCommitHistoryAsJSON(fromRef, toRef).then((commitList) => { - console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); +function getPullRequestsMergedBetween(fromTag, toTag) { + return getCommitHistoryAsJSON(fromTag, toTag).then((commitList) => { + console.log(`Commits made between ${fromTag} and ${toTag}:`, commitList); // Find which commit messages correspond to merged PR's const pullRequestNumbers = getValidMergedPRs(commitList); - console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); + console.log(`List of pull requests merged between ${fromTag} and ${toTag}`, pullRequestNumbers); return pullRequestNumbers; }); } diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 19252d34e1ab..ebdb08f8a099 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -4,23 +4,23 @@ const CONST = require('./CONST'); const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); /** - * @param {String} ref + * @param {String} tag */ -function fetchRefIfNeeded(ref) { +function fetchTagIfNeeded(tag) { try { - console.log(`Checking if ref ${ref} exists locally`); - const command = `git rev-parse --verify ${ref}`; + console.log(`Checking if tag ${tag} exists locally`); + const command = `git rev-parse --verify ${tag}`; console.log(`Running command: ${command}`); const result = execSync(command).toString(); console.log(result); } catch (e) { - console.log(`Ref ${ref} not found locally, attempting to fetch it.`); - let command = `git fetch origin ${ref}`; + console.log(`Tag ${tag} not found locally, attempting to fetch it.`); + let command = `git fetch origin refs/tags/${tag}:refs/tags/${tag}`; console.log(`Running command: ${command}`); let result = execSync(command).toString(); console.log(result); - console.log('Verifying that the ref is now available...'); - command = `git rev-parse --verify ${ref}`; + console.log('Verifying that the tag is now available...'); + command = `git rev-parse --verify ${tag}`; console.log(`Running command: ${command}`); result = execSync(command).toString(); console.log(result); @@ -28,21 +28,21 @@ function fetchRefIfNeeded(ref) { } /** - * Get merge logs between two refs (inclusive) as a JavaScript object. + * Get merge logs between two tags (inclusive) as a JavaScript object. * - * @param {String} fromRef - * @param {String} toRef + * @param {String} fromTag + * @param {String} toTag * @returns {Promise>>} */ -function getCommitHistoryAsJSON(fromRef, toRef) { - fetchRefIfNeeded(fromRef); - fetchRefIfNeeded(toRef); +function getCommitHistoryAsJSON(fromTag, toTag) { + fetchTagIfNeeded(fromTag); + fetchTagIfNeeded(toTag); - console.log('Getting pull requests merged between the following refs:', fromRef, toRef); + console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromRef}...${toRef}`]; + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); @@ -107,19 +107,19 @@ function getValidMergedPRs(commits) { } /** - * Takes in two git refs and returns a list of PR numbers of all PRs merged between those two refs + * Takes in two git tags and returns a list of PR numbers of all PRs merged between those two tags * - * @param {String} fromRef - * @param {String} toRef + * @param {String} fromTag + * @param {String} toTag * @returns {Promise>} – Pull request numbers */ -function getPullRequestsMergedBetween(fromRef, toRef) { - return getCommitHistoryAsJSON(fromRef, toRef).then((commitList) => { - console.log(`Commits made between ${fromRef} and ${toRef}:`, commitList); +function getPullRequestsMergedBetween(fromTag, toTag) { + return getCommitHistoryAsJSON(fromTag, toTag).then((commitList) => { + console.log(`Commits made between ${fromTag} and ${toTag}:`, commitList); // Find which commit messages correspond to merged PR's const pullRequestNumbers = getValidMergedPRs(commitList); - console.log(`List of pull requests merged between ${fromRef} and ${toRef}`, pullRequestNumbers); + console.log(`List of pull requests merged between ${fromTag} and ${toTag}`, pullRequestNumbers); return pullRequestNumbers; }); } From 3d2dbd7353d4bec0ca9ef6213fd3d35dd5495150 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Fri, 23 Jun 2023 22:52:03 +0000 Subject: [PATCH 464/826] Update version to 1.3.32-4 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 49729f75fbaf..97e843f80768 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033203 - versionName "1.3.32-3" + versionCode 1001033204 + versionName "1.3.32-4" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 9c7340b17467..a6c7de8e23f3 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.32.3 + 1.3.32.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index bcafeae393fb..17a19f91c57f 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.32.3 + 1.3.32.4 diff --git a/package-lock.json b/package-lock.json index 8282ee92fe70..139b5ebc26a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.32-3", + "version": "1.3.32-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.32-3", + "version": "1.3.32-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 775e8f85eee1..7ee5c36bd753 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.32-3", + "version": "1.3.32-4", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From fcb49b21d65b195c8a71392f014bbc844eeecd12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Fri, 23 Jun 2023 17:00:32 -0600 Subject: [PATCH 465/826] avoid calling OpenOldDotLink for anonymous users --- src/components/DeeplinkWrapper/index.website.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/DeeplinkWrapper/index.website.js b/src/components/DeeplinkWrapper/index.website.js index deaac25ba794..653b069b3dfe 100644 --- a/src/components/DeeplinkWrapper/index.website.js +++ b/src/components/DeeplinkWrapper/index.website.js @@ -9,6 +9,7 @@ import * as Browser from '../../libs/Browser'; import ONYXKEYS from '../../ONYXKEYS'; import * as Authentication from '../../libs/Authentication'; import DeeplinkRedirectLoadingIndicator from './DeeplinkRedirectLoadingIndicator'; +import * as Session from '../../libs/actions/Session'; const propTypes = { /** Children to render. */ @@ -61,6 +62,12 @@ class DeeplinkWrapper extends PureComponent { this.openRouteInDesktopApp(expensifyDeeplinkUrl); return; } + + // There's no support for anonymous users on desktop + if (Session.isAnonymousUser()) { + return; + } + Authentication.getShortLivedAuthToken() .then((shortLivedAuthToken) => { params.set('email', this.props.session.email); From ea51581cdcb2399f286031ce956acf2bb5357f6a Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 16:01:11 -0700 Subject: [PATCH 466/826] Fetch only one tag --- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 2 +- .github/actions/javascript/getDeployPullRequestList/index.js | 2 +- .github/libs/GitUtils.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index c7a84ad922c9..a4ebf20428fe 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -229,7 +229,7 @@ function fetchTagIfNeeded(tag) { console.log(result); } catch (e) { console.log(`Tag ${tag} not found locally, attempting to fetch it.`); - let command = `git fetch origin refs/tags/${tag}:refs/tags/${tag}`; + let command = `git fetch origin tag ${tag} --no-tags`; console.log(`Running command: ${command}`); let result = execSync(command).toString(); console.log(result); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 7339beca6d9a..ba7ddfb49054 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -163,7 +163,7 @@ function fetchTagIfNeeded(tag) { console.log(result); } catch (e) { console.log(`Tag ${tag} not found locally, attempting to fetch it.`); - let command = `git fetch origin refs/tags/${tag}:refs/tags/${tag}`; + let command = `git fetch origin tag ${tag} --no-tags`; console.log(`Running command: ${command}`); let result = execSync(command).toString(); console.log(result); diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index ebdb08f8a099..e7b062dd5df6 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -15,7 +15,7 @@ function fetchTagIfNeeded(tag) { console.log(result); } catch (e) { console.log(`Tag ${tag} not found locally, attempting to fetch it.`); - let command = `git fetch origin refs/tags/${tag}:refs/tags/${tag}`; + let command = `git fetch origin tag ${tag} --no-tags`; console.log(`Running command: ${command}`); let result = execSync(command).toString(); console.log(result); From 2cb1eb74d2cbfe149f2e283d3a4e6377e9ade747 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 16:10:14 -0700 Subject: [PATCH 467/826] Wrap format string in single quotes --- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 2 +- .github/actions/javascript/getDeployPullRequestList/index.js | 2 +- .github/libs/GitUtils.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index a4ebf20428fe..f529f8006f9b 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -256,7 +256,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) { return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; + const args = ['log', '--format=\'{"commit": "%H", "authorName": "%an", "subject": "%s"},\'', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index ba7ddfb49054..ed4140bbbee9 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -190,7 +190,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) { return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; + const args = ['log', '--format=\'{"commit": "%H", "authorName": "%an", "subject": "%s"},\'', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index e7b062dd5df6..74a9dc8a9a11 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -42,7 +42,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) { return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; + const args = ['log', '--format=\'{"commit": "%H", "authorName": "%an", "subject": "%s"},\'', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); From 654d5cd5d80ea6a755d81a173f5fb6e091d717b6 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 16:14:33 -0700 Subject: [PATCH 468/826] Revert last commit --- .github/libs/GitUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 74a9dc8a9a11..e7b062dd5df6 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -42,7 +42,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) { return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format=\'{"commit": "%H", "authorName": "%an", "subject": "%s"},\'', `${fromTag}...${toTag}`]; + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); From 2e598afdf654747228e48460a9f0deb51dafd502 Mon Sep 17 00:00:00 2001 From: Ionatan Wiznia Date: Fri, 23 Jun 2023 20:42:53 -0300 Subject: [PATCH 469/826] Prettier --- src/libs/actions/Timing.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libs/actions/Timing.js b/src/libs/actions/Timing.js index 1bc4decebd4b..5360a89d251b 100644 --- a/src/libs/actions/Timing.js +++ b/src/libs/actions/Timing.js @@ -46,16 +46,16 @@ function end(eventName, secondaryName = '') { console.debug(`Timing:${grafanaEventName}`, eventTime); delete timestampData[eventName]; - if (Environment.isDevelopment()) { - // Don't create traces on dev as this will mess up the accuracy of data in release builds of the app - return; - } + // if (Environment.isDevelopment()) { + // // Don't create traces on dev as this will mess up the accuracy of data in release builds of the app + // return; + // } - API.read('SendPerformanceTiming', { + API.write('SendPerformanceTiming', { name: grafanaEventName, value: eventTime, platform: `${getPlatform()}`, - }, {}); + }); }); } From 38756dd2ecd0e3a323043bb9d6f651532296edfc Mon Sep 17 00:00:00 2001 From: Ionatan Wiznia Date: Fri, 23 Jun 2023 20:47:12 -0300 Subject: [PATCH 470/826] Pretttier --- src/libs/actions/Timing.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/libs/actions/Timing.js b/src/libs/actions/Timing.js index 5360a89d251b..baaf666948ff 100644 --- a/src/libs/actions/Timing.js +++ b/src/libs/actions/Timing.js @@ -46,16 +46,20 @@ function end(eventName, secondaryName = '') { console.debug(`Timing:${grafanaEventName}`, eventTime); delete timestampData[eventName]; - // if (Environment.isDevelopment()) { - // // Don't create traces on dev as this will mess up the accuracy of data in release builds of the app - // return; - // } + if (Environment.isDevelopment()) { + // Don't create traces on dev as this will mess up the accuracy of data in release builds of the app + return; + } - API.write('SendPerformanceTiming', { - name: grafanaEventName, - value: eventTime, - platform: `${getPlatform()}`, - }); + API.read( + 'SendPerformanceTiming', + { + name: grafanaEventName, + value: eventTime, + platform: `${getPlatform()}`, + }, + {}, + ); }); } From 36f8cca36cf466c40a4985efb21def7ae42b275a Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 16:56:53 -0700 Subject: [PATCH 471/826] Add fetch-depth: 0 to fix log command --- .github/workflows/preDeploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 7a9190c3579a..086c2438b980 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -86,6 +86,7 @@ jobs: - uses: actions/checkout@v3 with: ref: main + fetch-depth: 0 token: ${{ secrets.OS_BOTIFY_TOKEN }} - uses: Expensify/App/.github/actions/composite/setupGitForOSBotify@main From ce2ef1e0fbd0c381e73a6f84e0c41dc4e3888102 Mon Sep 17 00:00:00 2001 From: rory Date: Fri, 23 Jun 2023 17:01:21 -0700 Subject: [PATCH 472/826] Rebuild GH actions --- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 2 +- .github/actions/javascript/getDeployPullRequestList/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index f529f8006f9b..a4ebf20428fe 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -256,7 +256,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) { return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format=\'{"commit": "%H", "authorName": "%an", "subject": "%s"},\'', `${fromTag}...${toTag}`]; + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index ed4140bbbee9..ba7ddfb49054 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -190,7 +190,7 @@ function getCommitHistoryAsJSON(fromTag, toTag) { return new Promise((resolve, reject) => { let stdout = ''; let stderr = ''; - const args = ['log', '--format=\'{"commit": "%H", "authorName": "%an", "subject": "%s"},\'', `${fromTag}...${toTag}`]; + const args = ['log', '--format={"commit": "%H", "authorName": "%an", "subject": "%s"},', `${fromTag}...${toTag}`]; console.log(`Running command: git ${args.join(' ')}`); const spawnedProcess = spawn('git', args); spawnedProcess.on('message', console.log); From a455bfd0ae9827972656588e995a48456dfd8b5a Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Sat, 24 Jun 2023 05:02:28 +0500 Subject: [PATCH 473/826] feat: move static methods out of the NewContactMethodPage component --- .../Profile/Contacts/NewContactMethodPage.js | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js index 0436064766a8..7332dbfc1eac 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.js +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.js @@ -54,26 +54,34 @@ const defaultProps = { loginList: {}, }; -function NewContactMethodPage(props) { - const loginInputRef = useRef(null); +const getPhoneLogin = (phoneOrEmail) => { + if (_.isEmpty(phoneOrEmail)) { + return ''; + } - const getPhoneLogin = (phoneOrEmail) => { - if (_.isEmpty(phoneOrEmail)) { - return ''; - } + return LoginUtils.appendCountryCode(LoginUtils.getPhoneNumberWithoutSpecialChars(phoneOrEmail)); +}; - return LoginUtils.appendCountryCode(LoginUtils.getPhoneNumberWithoutSpecialChars(phoneOrEmail)); - }; +const validateNumber = (values) => { + const parsedPhoneNumber = parsePhoneNumber(values); - const validateNumber = (values) => { - const parsedPhoneNumber = parsePhoneNumber(values); + if (parsedPhoneNumber.possible) { + return parsedPhoneNumber.number.e164 + CONST.SMS.DOMAIN; + } - if (parsedPhoneNumber.possible) { - return parsedPhoneNumber.number.e164 + CONST.SMS.DOMAIN; - } + return ''; +}; - return ''; - }; +const addNewContactMethod = (values) => { + const phoneLogin = getPhoneLogin(values.phoneOrEmail); + const validateIfnumber = validateNumber(phoneLogin); + const submitDetail = (validateIfnumber || values.phoneOrEmail).trim().toLowerCase(); + + User.addNewContactMethodAndNavigate(submitDetail, values.password); +}; + +function NewContactMethodPage(props) { + const loginInputRef = useRef(null); const validate = React.useCallback( (values) => { @@ -107,14 +115,6 @@ function NewContactMethodPage(props) { [], ); - const addNewContactMethod = (values) => { - const phoneLogin = getPhoneLogin(values.phoneOrEmail); - const validateIfnumber = validateNumber(phoneLogin); - const submitDetail = (validateIfnumber || values.phoneOrEmail).trim().toLowerCase(); - - User.addNewContactMethodAndNavigate(submitDetail, values.password); - }; - return ( { From 70bf90d61a93a7fc8b139a4640f16436992d6728 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Sat, 24 Jun 2023 00:13:10 +0000 Subject: [PATCH 474/826] Update version to 1.3.32-5 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 97e843f80768..b006a83f9d73 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033204 - versionName "1.3.32-4" + versionCode 1001033205 + versionName "1.3.32-5" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index a6c7de8e23f3..4733cfdf7ffe 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.32.4 + 1.3.32.5 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 17a19f91c57f..a8bcda464a28 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.32.4 + 1.3.32.5 diff --git a/package-lock.json b/package-lock.json index 139b5ebc26a3..d6f038ddcc69 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.32-4", + "version": "1.3.32-5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.32-4", + "version": "1.3.32-5", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 7ee5c36bd753..cb5c05287a8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.32-4", + "version": "1.3.32-5", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 90dee1527fe55d74d33db336b1d84ccef60b7477 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 24 Jun 2023 12:16:39 +0800 Subject: [PATCH 475/826] export ref --- src/hooks/useReportScrollManager/index.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useReportScrollManager/index.native.js b/src/hooks/useReportScrollManager/index.native.js index 91930a4e6cea..e206991efa03 100644 --- a/src/hooks/useReportScrollManager/index.native.js +++ b/src/hooks/useReportScrollManager/index.native.js @@ -28,7 +28,7 @@ function useReportScrollManager() { flatListRef.current.scrollToOffset({animated: false, offset: 0}); }; - return {scrollToIndex, scrollToBottom}; + return {ref: flatListRef, scrollToIndex, scrollToBottom}; } export default useReportScrollManager; From 6b2bb9c6aee222199ac5752e507ad0e833f378d6 Mon Sep 17 00:00:00 2001 From: Daraksha Date: Sat, 24 Jun 2023 10:53:15 +0530 Subject: [PATCH 476/826] use justifyCenter for single icon in composer --- src/pages/home/report/ReportActionCompose.js | 2 +- src/styles/styles.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index 35e33bb5170a..8399ab039ba1 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -953,7 +953,7 @@ class ReportActionCompose extends React.Component { style={[ styles.dFlex, styles.flexColumn, - isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentEnd, + isFullComposerAvailable || this.props.isComposerFullSize ? styles.justifyContentBetween : styles.justifyContentCenter, ]} > {this.props.isComposerFullSize && ( diff --git a/src/styles/styles.js b/src/styles/styles.js index 0dfe6edce787..01d50fc54df7 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1721,7 +1721,7 @@ const styles = { composerSizeButton: { alignSelf: 'center', - height: 40, + height: 32, width: 32, padding: 6, margin: 3, From 356ce239daec7f2775ccf0ea8d708bdc7ee5e00a Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 24 Jun 2023 14:58:16 +0800 Subject: [PATCH 477/826] fix thread parent message stays highlighted --- src/pages/home/report/ContextMenu/ContextMenuActions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index c39db7af6594..9cffb99588f2 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -117,10 +117,14 @@ export default [ shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID) => type === CONTEXT_MENU_TYPES.REPORT_ACTION && reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID), onPress: (closePopover, {reportAction, reportID}) => { - Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); if (closePopover) { - hideContextMenu(true, ReportActionComposeFocusManager.focus); + hideContextMenu(false, () => { + Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); + }); + return; } + + Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); }, getDescription: () => {}, }, From 28e892f7b97b21cc2e8f99fc44783fdeb69708e4 Mon Sep 17 00:00:00 2001 From: someone-here Date: Sat, 24 Jun 2023 14:59:12 +0530 Subject: [PATCH 478/826] Add isThread check to conciergeReport --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 64a07113cb51..1b08428f99bf 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -382,7 +382,7 @@ function getBankAccountRoute(report) { * @returns {Boolean} */ function isConciergeChatReport(report) { - return lodashGet(report, 'participantAccountIDs', []).length === 1 && Number(report.participantAccountIDs[0]) === CONST.ACCOUNT_ID.CONCIERGE; + return lodashGet(report, 'participantAccountIDs', []).length === 1 && Number(report.participantAccountIDs[0]) === CONST.ACCOUNT_ID.CONCIERGE && !isThread(report); } /** From 72f8a083df62d40a3a0b11f698ccd1efbaf136a3 Mon Sep 17 00:00:00 2001 From: someone-here Date: Sat, 24 Jun 2023 15:02:47 +0530 Subject: [PATCH 479/826] Fix lint --- src/libs/ReportUtils.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 1b08428f99bf..887401d786f6 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -375,6 +375,16 @@ function getBankAccountRoute(report) { return isPolicyExpenseChat(report) ? ROUTES.getBankAccountRoute('', report.policyID) : ROUTES.SETTINGS_ADD_BANK_ACCOUNT; } +/** + * Returns true if report has a parent and is therefore a Thread. + * + * @param {Object} report + * @returns {Boolean} + */ +function isThread(report) { + return Boolean(report && report.parentReportID && report.parentReportActionID && report.type === CONST.REPORT.TYPE.CHAT); +} + /** * Only returns true if this is our main 1:1 DM report with Concierge * @@ -524,16 +534,6 @@ function isPolicyExpenseChatAdmin(report, policies) { return policyRole === CONST.POLICY.ROLE.ADMIN; } -/** - * Returns true if report has a parent and is therefore a Thread. - * - * @param {Object} report - * @returns {Boolean} - */ -function isThread(report) { - return Boolean(report && report.parentReportID && report.parentReportActionID && report.type === CONST.REPORT.TYPE.CHAT); -} - /** * Returns true if reportAction has a child. * From bb1d37756dd435f4e45dd70a89c55a5481a545d5 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sat, 24 Jun 2023 22:52:18 +0700 Subject: [PATCH 480/826] add character --- src/CONST.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CONST.js b/src/CONST.js index 74ef2b2052d8..b5d0ed293f20 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -1151,7 +1151,7 @@ const CONST = { SPECIAL_CHAR_OR_EMOJI: // eslint-disable-next-line no-misleading-character-class - /[\n\s,/?"{}[\]()&^%\\;`$#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, + /[\n\s,/?"{}[\]()&^%\\;`$=#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, SPACE_OR_EMOJI: // eslint-disable-next-line no-misleading-character-class @@ -1160,7 +1160,7 @@ const CONST = { // Define the regular expression pattern to match a string starting with an at sign and ending with a space or newline character MENTION_REPLACER: // eslint-disable-next-line no-misleading-character-class - /^@[^\n\r]*?(?=$|[\s,/?"{}[\]()&^%\\;`$#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3)/u, + /^@[^\n\r]*?(?=$|[\s,/?"{}[\]()&^%\\;`$=#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3)/u, MERGED_ACCOUNT_PREFIX: /^(MERGED_\d+@)/, From fce7f374db0e900fa6da512bb60084f7df065d3d Mon Sep 17 00:00:00 2001 From: Danut Gavrus Date: Sat, 24 Jun 2023 20:36:31 +0300 Subject: [PATCH 481/826] [FIX 20759] Remove the *New* notifiers just as the deletion starts. --- src/pages/home/report/ReportActionsView.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/home/report/ReportActionsView.js b/src/pages/home/report/ReportActionsView.js index 8c11571d0da1..7c1d7496b38c 100755 --- a/src/pages/home/report/ReportActionsView.js +++ b/src/pages/home/report/ReportActionsView.js @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import _ from 'underscore'; import lodashGet from 'lodash/get'; +import lodashCloneDeep from 'lodash/cloneDeep'; import * as Report from '../../../libs/actions/Report'; import reportActionPropTypes from './reportActionPropTypes'; import Visibility from '../../../libs/Visibility'; @@ -218,6 +219,15 @@ class ReportActionsView extends React.Component { }); } + // If the last unread message was deleted, remove the *New* green marker and the *New Messages* notification at scroll just as the deletion starts. + if (this.props.reportActions.length > 0 && this.props.reportActions[0].pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE && !this.props.network.isOffline) { + const reportActionsWithoutPendingOne = lodashCloneDeep(this.props.reportActions); + reportActionsWithoutPendingOne.shift(); + this.setState({ + newMarkerReportActionID: ReportUtils.getNewMarkerReportActionID(this.props.report, reportActionsWithoutPendingOne), + }); + } + // Checks to see if a report comment has been manually "marked as unread". All other times when the lastReadTime // changes it will be because we marked the entire report as read. const didManuallyMarkReportAsUnread = prevProps.report.lastReadTime !== this.props.report.lastReadTime && ReportUtils.isUnread(this.props.report); From fc04ddc94e22012a223f7383ea1e3a1c07c7614e Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sat, 24 Jun 2023 17:51:13 -0400 Subject: [PATCH 482/826] Create migration for reportActions with accountID --- .../migrations/PersonalDetailsByAccountID.js | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 src/libs/migrations/PersonalDetailsByAccountID.js diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js new file mode 100644 index 000000000000..be7190c78fad --- /dev/null +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -0,0 +1,174 @@ +import _ from 'underscore'; +import Onyx from 'react-native-onyx'; +import ONYXKEYS from '../../ONYXKEYS'; + +const DEPRECATED_ONYX_KEYS = { + // Deprecated personal details object which was keyed by login instead of accountID. + PERSONAL_DETAILS: 'personalDetails', +}; + +/** + * @returns {Promise} + */ +function getReportActionsFromOnyx() { + return new Promise((resolve) => { + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + return resolve(allReportActions); + }, + }); + }); +} + +/** + * @returns {Promise} + */ +function getDeprecatedPersonalDetailsFromOnyx() { + return new Promise((resolve) => { + const connectionID = Onyx.connect({ + key: DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS, + callback: (allPersonalDetails) => { + Onyx.disconnect(connectionID); + return resolve(allPersonalDetails); + }, + }); + }); +} + +/** + * Migrate Onyx data to hide emails where necessary. + * + * - personalDetails -> personalDetailsList + * - Key by accountID instead of email + * - Must check if users are "known" or not, and include their contact info if and only if they are "known" + * - policyMemberList_ -> policyMember_ + * - Key by accountID instead of email + * - reportAction_ + * - oldLogin -> oldAccountID + * - newLogin -> newAccountID + * - actorEmail -> actorAccountID + * - accountEmail -> accountID + * - childManagerEmail -> childManagerAccountID + * - originalMessage.participants -> originalMessage.participantAccountIDs + * - whisperedTo -> whisperedToAccountID + * - childOldestFourEmails -> childOldestFourAccountIDs + * - report_ + * - ownerEmail -> ownerAccountID + * - managerEmail -> managerID + * - lastActorEmail -> lastActorAccountID + * - participants -> participantAccountIDs + * + * @returns {Promise} + */ +export default function () { + return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then( + ([oldReportActions, oldPersonalDetails]) => { + const onyxData = {}; + + // We migrate reportActions to have the new accountID-based data if they don't already. + // If we are not able to get the accountID for some reason, we will just clear the reportAction + // and let it be fetched from the API next time they open the report and scroll to that action. + _.each(oldReportActions, (reportActionsForReport, onyxKey) => { + if (!reportActionsForReport) { + return; + } + + const newReportActionsForReport = {}; + _.each(reportActionsForReport, (reportAction) => { + if (!reportAction) { + return; + } + + const newReportAction = reportAction; + + if (reportAction.oldLogin && !reportAction.oldAccountID) { + const oldAccountID = _.get(oldPersonalDetails, [reportAction.oldLogin, 'accountID']); + if (oldAccountID) { + newReportAction.oldAccountID = oldAccountID; + } else { + return; + } + } + + if (reportAction.newLogin && !reportAction.newAccountID) { + const newAccountID = _.get(oldPersonalDetails, [reportAction.newLogin, 'accountID']); + if (newAccountID) { + newReportAction.newAccountID = newAccountID; + } else { + return; + } + } + + if (reportAction.actorEmail && !reportAction.actorAccountID) { + const actorAccountID = _.get(oldPersonalDetails, [reportAction.actorEmail, 'accountID']); + if (actorAccountID) { + newReportAction.actorAccountID = actorAccountID; + } else { + return; + } + } + + if (reportAction.accountEmail && !reportAction.accountID) { + const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); + if (accountID) { + newReportAction.accountID = accountID; + } else { + return; + } + } + + if (reportAction.childManagerEmail && !reportAction.childManagerAccountID) { + const childManagerAccountID = _.get(oldPersonalDetails, [reportAction.childManagerEmail, 'accountID']); + if (childManagerAccountID) { + newReportAction.childManagerAccountID = childManagerAccountID; + } else { + return; + } + } + + const newOriginalMessage = _.omit(reportAction.originalMessage, ['participants']); + const oldParticipants = _.get(reportAction, ['originalMessage', 'participants'], []); + const newParticipants = []; + _.each(oldParticipants, (login) => { + const accountID = _.get(oldPersonalDetails, [login, 'accountID']); + newParticipants.push(accountID); + }); + newOriginalMessage.participantAccountIDs = newParticipants; + newReportAction.originalMessage = newOriginalMessage; + + if (reportAction.whisperedTo) { + const whisperedToAccountIDs = []; + _.each(reportAction.whisperedTo, (whisperedToLogin) => { + const whisperedToAccountID = _.get(oldPersonalDetails, [whisperedToLogin, 'accountID']); + if (whisperedToAccountID) { + whisperedToAccountIDs.push(whisperedToAccountID); + } + }); + newReportAction.whisperedToAccountIDs = whisperedToAccountIDs; + } + + if (reportAction.childOldestFourEmails) { + const childOldestFourEmails = reportAction.childOldestFourEmails.split(','); + const childOldestFourAccountIDs = []; + _.each(childOldestFourEmails, (login) => { + const accountID = _.get(oldPersonalDetails, [login, 'accountID']); + if (accountID) { + childOldestFourAccountIDs.push(accountID); + } + }); + newReportAction.childOldestFourAccountIDs = childOldestFourAccountIDs.join(','); + } + + newReportActionsForReport[newReportAction.reportActionID] = newReportAction; + }); + + onyxData[onyxKey] = newReportActionsForReport; + }); + + return Onyx.multiSet(onyxData); + }, + ); +} \ No newline at end of file From bccd4656bda31e5d83a6820e1fad7be7603531ea Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sat, 24 Jun 2023 18:22:07 -0400 Subject: [PATCH 483/826] Add whisperedTo and childEmails --- .../migrations/PersonalDetailsByAccountID.js | 100 +++++++++--------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index be7190c78fad..1f6bfa69c182 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -39,27 +39,7 @@ function getDeprecatedPersonalDetailsFromOnyx() { } /** - * Migrate Onyx data to hide emails where necessary. - * - * - personalDetails -> personalDetailsList - * - Key by accountID instead of email - * - Must check if users are "known" or not, and include their contact info if and only if they are "known" - * - policyMemberList_ -> policyMember_ - * - Key by accountID instead of email - * - reportAction_ - * - oldLogin -> oldAccountID - * - newLogin -> newAccountID - * - actorEmail -> actorAccountID - * - accountEmail -> accountID - * - childManagerEmail -> childManagerAccountID - * - originalMessage.participants -> originalMessage.participantAccountIDs - * - whisperedTo -> whisperedToAccountID - * - childOldestFourEmails -> childOldestFourAccountIDs - * - report_ - * - ownerEmail -> ownerAccountID - * - managerEmail -> managerID - * - lastActorEmail -> lastActorAccountID - * - participants -> participantAccountIDs + * Migrate Onyx data for the email to accountID migration. * * @returns {Promise} */ @@ -67,6 +47,14 @@ export default function () { return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then( ([oldReportActions, oldPersonalDetails]) => { const onyxData = {}; + // originalMessage.oldLogin -> originalMessage.oldAccountID x + // originalMessage.newLogin -> originalMessage.newAccountID x + // actorEmail -> actorAccountID x + // childManagerEmail -> childManagerAccountID x + // whisperedTo -> whisperedToAccountIDs x + // childOldestFourEmails -> childOldestFourAccountIDs x + // participants -> participantAccountIDs ? + // accountEmail -> accountID ? // We migrate reportActions to have the new accountID-based data if they don't already. // If we are not able to get the accountID for some reason, we will just clear the reportAction @@ -84,19 +72,19 @@ export default function () { const newReportAction = reportAction; - if (reportAction.oldLogin && !reportAction.oldAccountID) { - const oldAccountID = _.get(oldPersonalDetails, [reportAction.oldLogin, 'accountID']); + if (reportAction.originalMessage.oldLogin && !reportAction.originalMessage.oldAccountID) { + const oldAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.oldLogin, 'accountID']); if (oldAccountID) { - newReportAction.oldAccountID = oldAccountID; + newReportAction.originalMessage.oldAccountID = oldAccountID; } else { return; } } - if (reportAction.newLogin && !reportAction.newAccountID) { - const newAccountID = _.get(oldPersonalDetails, [reportAction.newLogin, 'accountID']); + if (reportAction.originalMessage.newLogin && !reportAction.originalMessage.newAccountID) { + const newAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.newLogin, 'accountID']); if (newAccountID) { - newReportAction.newAccountID = newAccountID; + newReportAction.originalMessage.newAccountID = newAccountID; } else { return; } @@ -111,15 +99,6 @@ export default function () { } } - if (reportAction.accountEmail && !reportAction.accountID) { - const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); - if (accountID) { - newReportAction.accountID = accountID; - } else { - return; - } - } - if (reportAction.childManagerEmail && !reportAction.childManagerAccountID) { const childManagerAccountID = _.get(oldPersonalDetails, [reportAction.childManagerEmail, 'accountID']); if (childManagerAccountID) { @@ -129,17 +108,7 @@ export default function () { } } - const newOriginalMessage = _.omit(reportAction.originalMessage, ['participants']); - const oldParticipants = _.get(reportAction, ['originalMessage', 'participants'], []); - const newParticipants = []; - _.each(oldParticipants, (login) => { - const accountID = _.get(oldPersonalDetails, [login, 'accountID']); - newParticipants.push(accountID); - }); - newOriginalMessage.participantAccountIDs = newParticipants; - newReportAction.originalMessage = newOriginalMessage; - - if (reportAction.whisperedTo) { + if (reportAction.whisperedTo && !reportAction.whisperedToAccountIDs) { const whisperedToAccountIDs = []; _.each(reportAction.whisperedTo, (whisperedToLogin) => { const whisperedToAccountID = _.get(oldPersonalDetails, [whisperedToLogin, 'accountID']); @@ -147,10 +116,15 @@ export default function () { whisperedToAccountIDs.push(whisperedToAccountID); } }); - newReportAction.whisperedToAccountIDs = whisperedToAccountIDs; + + if (whisperedToAccountIDs.length === reportAction.whisperedTo.length) { + newReportAction.whisperedToAccountIDs = whisperedToAccountIDs; + } else { + return; + } } - if (reportAction.childOldestFourEmails) { + if (reportAction.childOldestFourEmails && !reportAction.childOldestFourAccountIDs) { const childOldestFourEmails = reportAction.childOldestFourEmails.split(','); const childOldestFourAccountIDs = []; _.each(childOldestFourEmails, (login) => { @@ -159,9 +133,35 @@ export default function () { childOldestFourAccountIDs.push(accountID); } }); - newReportAction.childOldestFourAccountIDs = childOldestFourAccountIDs.join(','); + + if (childOldestFourAccountIDs.length === childOldestFourEmails.length) { + newReportAction.childOldestFourAccountIDs = childOldestFourAccountIDs.join(','); + } else { + return; + } + } + + + if (reportAction.accountEmail && !reportAction.accountID) { + const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); + if (accountID) { + newReportAction.accountID = accountID; + } else { + return; + } } + const newOriginalMessage = _.omit(reportAction.originalMessage, ['participants']); + const oldParticipants = _.get(reportAction, ['originalMessage', 'participants'], []); + const newParticipants = []; + _.each(oldParticipants, (login) => { + const accountID = _.get(oldPersonalDetails, [login, 'accountID']); + newParticipants.push(accountID); + }); + newOriginalMessage.participantAccountIDs = newParticipants; + newReportAction.originalMessage = newOriginalMessage; + + newReportActionsForReport[newReportAction.reportActionID] = newReportAction; }); From 218920473e5753234408554cfd86517e4923ad84 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sat, 24 Jun 2023 19:52:27 -0400 Subject: [PATCH 484/826] Use lodashHas for checking if properties exist in object --- src/libs/migrateOnyx.js | 2 + .../migrations/PersonalDetailsByAccountID.js | 207 +++++++++--------- 2 files changed, 104 insertions(+), 105 deletions(-) diff --git a/src/libs/migrateOnyx.js b/src/libs/migrateOnyx.js index fd48ad1fa6eb..9389a9b66fbc 100644 --- a/src/libs/migrateOnyx.js +++ b/src/libs/migrateOnyx.js @@ -7,6 +7,7 @@ import MoveToIndexedDB from './migrations/MoveToIndexedDB'; import RenameExpensifyNewsStatus from './migrations/RenameExpensifyNewsStatus'; import AddLastVisibleActionCreated from './migrations/AddLastVisibleActionCreated'; import KeyReportActionsByReportActionID from './migrations/KeyReportActionsByReportActionID'; +import PersonalDetailsByAccountID from './migrations/PersonalDetailsByAccountID'; export default function () { const startTime = Date.now(); @@ -22,6 +23,7 @@ export default function () { RenameExpensifyNewsStatus, AddLastVisibleActionCreated, KeyReportActionsByReportActionID, + PersonalDetailsByAccountID, ]; // Reduce all promises down to a single promise. All promises run in a linear fashion, waiting for the diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 1f6bfa69c182..c5eac4959887 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -1,4 +1,5 @@ import _ from 'underscore'; +import lodashHas from 'lodash/has'; import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; @@ -44,131 +45,127 @@ function getDeprecatedPersonalDetailsFromOnyx() { * @returns {Promise} */ export default function () { - return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then( - ([oldReportActions, oldPersonalDetails]) => { - const onyxData = {}; - // originalMessage.oldLogin -> originalMessage.oldAccountID x - // originalMessage.newLogin -> originalMessage.newAccountID x - // actorEmail -> actorAccountID x - // childManagerEmail -> childManagerAccountID x - // whisperedTo -> whisperedToAccountIDs x - // childOldestFourEmails -> childOldestFourAccountIDs x - // participants -> participantAccountIDs ? - // accountEmail -> accountID ? - - // We migrate reportActions to have the new accountID-based data if they don't already. - // If we are not able to get the accountID for some reason, we will just clear the reportAction - // and let it be fetched from the API next time they open the report and scroll to that action. - _.each(oldReportActions, (reportActionsForReport, onyxKey) => { - if (!reportActionsForReport) { + return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then(([oldReportActions, oldPersonalDetails]) => { + const onyxData = {}; + // originalMessage.oldLogin -> originalMessage.oldAccountID x + // originalMessage.newLogin -> originalMessage.newAccountID x + // actorEmail -> actorAccountID x + // childManagerEmail -> childManagerAccountID x + // whisperedTo -> whisperedToAccountIDs x + // childOldestFourEmails -> childOldestFourAccountIDs x + // participants -> participantAccountIDs ? + // accountEmail -> accountID ? + + // We migrate reportActions to have the new accountID-based data if they don't already. + // If we are not able to get the accountID for some reason, we will just clear the reportAction + // and let it be fetched from the API next time they open the report and scroll to that action. + _.each(oldReportActions, (reportActionsForReport, onyxKey) => { + if (!reportActionsForReport) { + return; + } + + const newReportActionsForReport = {}; + _.each(reportActionsForReport, (reportAction) => { + if (!reportAction) { return; } - const newReportActionsForReport = {}; - _.each(reportActionsForReport, (reportAction) => { - if (!reportAction) { - return; - } - - const newReportAction = reportAction; + const newReportAction = reportAction; - if (reportAction.originalMessage.oldLogin && !reportAction.originalMessage.oldAccountID) { - const oldAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.oldLogin, 'accountID']); - if (oldAccountID) { - newReportAction.originalMessage.oldAccountID = oldAccountID; - } else { - return; - } + if (lodashHas(reportAction, ['originalMessage', 'oldLogin']) && !lodashHas(reportAction, ['originalMessage', 'oldAccountID'])) { + const oldAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.oldLogin, 'accountID']); + if (oldAccountID) { + newReportAction.originalMessage.oldAccountID = oldAccountID; + } else { + return; } + } - if (reportAction.originalMessage.newLogin && !reportAction.originalMessage.newAccountID) { - const newAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.newLogin, 'accountID']); - if (newAccountID) { - newReportAction.originalMessage.newAccountID = newAccountID; - } else { - return; - } + if (lodashHas(reportAction, ['originalMessage', 'newLogin']) && !lodashHas(reportAction, ['originalMessage', 'newAccountID'])) { + const newAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.newLogin, 'accountID']); + if (newAccountID) { + newReportAction.originalMessage.newAccountID = newAccountID; + } else { + return; } + } - if (reportAction.actorEmail && !reportAction.actorAccountID) { - const actorAccountID = _.get(oldPersonalDetails, [reportAction.actorEmail, 'accountID']); - if (actorAccountID) { - newReportAction.actorAccountID = actorAccountID; - } else { - return; - } + if (lodashHas(reportAction, ['actorEmail']) && !lodashHas(reportAction, ['actorAccountID'])) { + const actorAccountID = _.get(oldPersonalDetails, [reportAction.actorEmail, 'accountID']); + if (actorAccountID) { + newReportAction.actorAccountID = actorAccountID; + } else { + return; } + } - if (reportAction.childManagerEmail && !reportAction.childManagerAccountID) { - const childManagerAccountID = _.get(oldPersonalDetails, [reportAction.childManagerEmail, 'accountID']); - if (childManagerAccountID) { - newReportAction.childManagerAccountID = childManagerAccountID; - } else { - return; - } + if (lodashHas(reportAction, ['childManagerEmail']) && !lodashHas(reportAction, ['childManagerAccountID'])) { + const childManagerAccountID = _.get(oldPersonalDetails, [reportAction.childManagerEmail, 'accountID']); + if (childManagerAccountID) { + newReportAction.childManagerAccountID = childManagerAccountID; + } else { + return; } + } - if (reportAction.whisperedTo && !reportAction.whisperedToAccountIDs) { - const whisperedToAccountIDs = []; - _.each(reportAction.whisperedTo, (whisperedToLogin) => { - const whisperedToAccountID = _.get(oldPersonalDetails, [whisperedToLogin, 'accountID']); - if (whisperedToAccountID) { - whisperedToAccountIDs.push(whisperedToAccountID); - } - }); - - if (whisperedToAccountIDs.length === reportAction.whisperedTo.length) { - newReportAction.whisperedToAccountIDs = whisperedToAccountIDs; - } else { - return; + if (lodashHas(reportAction, ['whisperedTo']) && !lodashHas(reportAction, ['whisperedToAccountIDs'])) { + const whisperedToAccountIDs = []; + _.each(reportAction.whisperedTo, (whisperedToLogin) => { + const whisperedToAccountID = _.get(oldPersonalDetails, [whisperedToLogin, 'accountID']); + if (whisperedToAccountID) { + whisperedToAccountIDs.push(whisperedToAccountID); } - } + }); - if (reportAction.childOldestFourEmails && !reportAction.childOldestFourAccountIDs) { - const childOldestFourEmails = reportAction.childOldestFourEmails.split(','); - const childOldestFourAccountIDs = []; - _.each(childOldestFourEmails, (login) => { - const accountID = _.get(oldPersonalDetails, [login, 'accountID']); - if (accountID) { - childOldestFourAccountIDs.push(accountID); - } - }); - - if (childOldestFourAccountIDs.length === childOldestFourEmails.length) { - newReportAction.childOldestFourAccountIDs = childOldestFourAccountIDs.join(','); - } else { - return; - } + if (whisperedToAccountIDs.length === reportAction.whisperedTo.length) { + newReportAction.whisperedToAccountIDs = whisperedToAccountIDs; + } else { + return; } + } - - if (reportAction.accountEmail && !reportAction.accountID) { - const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); + if (lodashHas(reportAction, ['childOldestFourEmails']) && !lodashHas(reportAction, ['childOldestFourAccountIDs'])) { + const childOldestFourEmails = reportAction.childOldestFourEmails.split(','); + const childOldestFourAccountIDs = []; + _.each(childOldestFourEmails, (login) => { + const accountID = _.get(oldPersonalDetails, [login, 'accountID']); if (accountID) { - newReportAction.accountID = accountID; - } else { - return; + childOldestFourAccountIDs.push(accountID); } - } - - const newOriginalMessage = _.omit(reportAction.originalMessage, ['participants']); - const oldParticipants = _.get(reportAction, ['originalMessage', 'participants'], []); - const newParticipants = []; - _.each(oldParticipants, (login) => { - const accountID = _.get(oldPersonalDetails, [login, 'accountID']); - newParticipants.push(accountID); }); - newOriginalMessage.participantAccountIDs = newParticipants; - newReportAction.originalMessage = newOriginalMessage; + if (childOldestFourAccountIDs.length === childOldestFourEmails.length) { + newReportAction.childOldestFourAccountIDs = childOldestFourAccountIDs.join(','); + } else { + return; + } + } - newReportActionsForReport[newReportAction.reportActionID] = newReportAction; - }); - - onyxData[onyxKey] = newReportActionsForReport; + // if (reportAction.accountEmail && !reportAction.accountID) { + // const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); + // if (accountID) { + // newReportAction.accountID = accountID; + // } else { + // return; + // } + // } + + // const newOriginalMessage = _.omit(reportAction.originalMessage, ['participants']); + // const oldParticipants = _.get(reportAction, ['originalMessage', 'participants'], []); + // const newParticipants = []; + // _.each(oldParticipants, (login) => { + // const accountID = _.get(oldPersonalDetails, [login, 'accountID']); + // newParticipants.push(accountID); + // }); + // newOriginalMessage.participantAccountIDs = newParticipants; + // newReportAction.originalMessage = newOriginalMessage; + + newReportActionsForReport[newReportAction.reportActionID] = newReportAction; }); - return Onyx.multiSet(onyxData); - }, - ); -} \ No newline at end of file + onyxData[onyxKey] = newReportActionsForReport; + }); + + return Onyx.multiSet(onyxData); + }); +} From 04b794e248bcfb625138edab51b5a092faf09894 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sat, 24 Jun 2023 20:18:04 -0400 Subject: [PATCH 485/826] Add logs when removing or skipping --- .../migrations/PersonalDetailsByAccountID.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index c5eac4959887..54e6f5fb26f8 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -2,6 +2,7 @@ import _ from 'underscore'; import lodashHas from 'lodash/has'; import Onyx from 'react-native-onyx'; import ONYXKEYS from '../../ONYXKEYS'; +import Log from '../Log'; const DEPRECATED_ONYX_KEYS = { // Deprecated personal details object which was keyed by login instead of accountID. @@ -60,13 +61,15 @@ export default function () { // If we are not able to get the accountID for some reason, we will just clear the reportAction // and let it be fetched from the API next time they open the report and scroll to that action. _.each(oldReportActions, (reportActionsForReport, onyxKey) => { - if (!reportActionsForReport) { + if (_.isEmpty(reportActionsForReport)) { + Log.info(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${onyxKey} because there were no reportActions`); return; } const newReportActionsForReport = {}; - _.each(reportActionsForReport, (reportAction) => { - if (!reportAction) { + _.each(reportActionsForReport, (reportAction, reportActionID) => { + if (_.isEmpty(reportAction)) { + Log.info(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for reportAction ${reportActionID} because the reportAction was empty`); return; } @@ -77,6 +80,7 @@ export default function () { if (oldAccountID) { newReportAction.originalMessage.oldAccountID = oldAccountID; } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because originalMessage.oldAccountID not found`); return; } } @@ -86,6 +90,7 @@ export default function () { if (newAccountID) { newReportAction.originalMessage.newAccountID = newAccountID; } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because originalMessage.newAccountID not found`); return; } } @@ -95,6 +100,7 @@ export default function () { if (actorAccountID) { newReportAction.actorAccountID = actorAccountID; } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because actorAccountID not found`); return; } } @@ -104,6 +110,7 @@ export default function () { if (childManagerAccountID) { newReportAction.childManagerAccountID = childManagerAccountID; } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because childManagerAccountID not found`); return; } } @@ -120,6 +127,7 @@ export default function () { if (whisperedToAccountIDs.length === reportAction.whisperedTo.length) { newReportAction.whisperedToAccountIDs = whisperedToAccountIDs; } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because whisperedToAccountIDs not found`); return; } } @@ -137,6 +145,7 @@ export default function () { if (childOldestFourAccountIDs.length === childOldestFourEmails.length) { newReportAction.childOldestFourAccountIDs = childOldestFourAccountIDs.join(','); } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because childOldestFourAccountIDs not found`); return; } } @@ -160,7 +169,7 @@ export default function () { // newOriginalMessage.participantAccountIDs = newParticipants; // newReportAction.originalMessage = newOriginalMessage; - newReportActionsForReport[newReportAction.reportActionID] = newReportAction; + newReportActionsForReport[reportActionID] = newReportAction; }); onyxData[onyxKey] = newReportActionsForReport; From c5a7b92495c707d67c422aeb11d9781888c5b551 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sat, 24 Jun 2023 20:46:03 -0400 Subject: [PATCH 486/826] Only migrate reportActions if they have changed --- src/libs/migrations/PersonalDetailsByAccountID.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 54e6f5fb26f8..74fa5be19586 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -67,6 +67,7 @@ export default function () { } const newReportActionsForReport = {}; + let reportActionsWereModified = false; _.each(reportActionsForReport, (reportAction, reportActionID) => { if (_.isEmpty(reportAction)) { Log.info(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for reportAction ${reportActionID} because the reportAction was empty`); @@ -76,6 +77,7 @@ export default function () { const newReportAction = reportAction; if (lodashHas(reportAction, ['originalMessage', 'oldLogin']) && !lodashHas(reportAction, ['originalMessage', 'oldAccountID'])) { + reportActionsWereModified = true; const oldAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.oldLogin, 'accountID']); if (oldAccountID) { newReportAction.originalMessage.oldAccountID = oldAccountID; @@ -86,6 +88,7 @@ export default function () { } if (lodashHas(reportAction, ['originalMessage', 'newLogin']) && !lodashHas(reportAction, ['originalMessage', 'newAccountID'])) { + reportActionsWereModified = true; const newAccountID = _.get(oldPersonalDetails, [reportAction.originalMessage.newLogin, 'accountID']); if (newAccountID) { newReportAction.originalMessage.newAccountID = newAccountID; @@ -96,6 +99,7 @@ export default function () { } if (lodashHas(reportAction, ['actorEmail']) && !lodashHas(reportAction, ['actorAccountID'])) { + reportActionsWereModified = true; const actorAccountID = _.get(oldPersonalDetails, [reportAction.actorEmail, 'accountID']); if (actorAccountID) { newReportAction.actorAccountID = actorAccountID; @@ -106,6 +110,7 @@ export default function () { } if (lodashHas(reportAction, ['childManagerEmail']) && !lodashHas(reportAction, ['childManagerAccountID'])) { + reportActionsWereModified = true; const childManagerAccountID = _.get(oldPersonalDetails, [reportAction.childManagerEmail, 'accountID']); if (childManagerAccountID) { newReportAction.childManagerAccountID = childManagerAccountID; @@ -116,6 +121,7 @@ export default function () { } if (lodashHas(reportAction, ['whisperedTo']) && !lodashHas(reportAction, ['whisperedToAccountIDs'])) { + reportActionsWereModified = true; const whisperedToAccountIDs = []; _.each(reportAction.whisperedTo, (whisperedToLogin) => { const whisperedToAccountID = _.get(oldPersonalDetails, [whisperedToLogin, 'accountID']); @@ -133,6 +139,7 @@ export default function () { } if (lodashHas(reportAction, ['childOldestFourEmails']) && !lodashHas(reportAction, ['childOldestFourAccountIDs'])) { + reportActionsWereModified = true; const childOldestFourEmails = reportAction.childOldestFourEmails.split(','); const childOldestFourAccountIDs = []; _.each(childOldestFourEmails, (login) => { @@ -172,7 +179,10 @@ export default function () { newReportActionsForReport[reportActionID] = newReportAction; }); - onyxData[onyxKey] = newReportActionsForReport; + // Only include the reportActions from this report if they were modified in any way + if (reportActionsWereModified) { + onyxData[onyxKey] = newReportActionsForReport; + } }); return Onyx.multiSet(onyxData); From 1b36c75b17ae965615c7e6394c7d39c548d4e8df Mon Sep 17 00:00:00 2001 From: reinaldo Date: Thu, 22 Jun 2023 23:32:31 +0700 Subject: [PATCH 487/826] Fix inconsistent input field size in close account page message field --- src/components/TextInput/BaseTextInput.js | 4 +++- src/pages/ReportWelcomeMessagePage.js | 4 ++-- src/pages/settings/Security/CloseAccountPage.js | 5 ++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index 91ab2162674f..d18da6f99934 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -224,6 +224,8 @@ class BaseTextInput extends Component { {}, ); const isMultiline = this.props.multiline || this.props.autoGrowHeight; + //if AutoGrowWeight is true, placeholder needs to be filled with any string. + const hiddenTextPlaceholder = this.props.placeholder ? this.props.placeholder : this.props.autoGrowHeight ? ' ' : ''; return ( <> @@ -388,7 +390,7 @@ class BaseTextInput extends Component { ]} onLayout={(e) => this.setState({textInputWidth: e.nativeEvent.layout.width + 2, textInputHeight: e.nativeEvent.layout.height})} > - {this.state.value || this.props.placeholder} + {this.state.value || hiddenTextPlaceholder} )} diff --git a/src/pages/ReportWelcomeMessagePage.js b/src/pages/ReportWelcomeMessagePage.js index 33e36ff44ba1..b5a8f0e85045 100644 --- a/src/pages/ReportWelcomeMessagePage.js +++ b/src/pages/ReportWelcomeMessagePage.js @@ -69,14 +69,14 @@ function ReportWelcomeMessagePage(props) { (welcomeMessageInputRef.current = el)} value={welcomeMessage} onChangeText={handleWelcomeMessageChange} autoCapitalize="none" textAlignVertical="top" + containerStyles={[styles.autoGrowHeightMultilineInput]} /> diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 3789804acc73..2b71195e0eec 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -103,11 +103,10 @@ class CloseAccountPage extends Component { {this.props.translate('closeAccountPage.reasonForLeavingPrompt')} {this.props.translate('closeAccountPage.enterDefaultContactToConfirm')} {userEmailOrPhone}. From 93c513eaf1b680d69483443d7b16b9865677398d Mon Sep 17 00:00:00 2001 From: reinaldo Date: Sat, 24 Jun 2023 09:03:14 +0700 Subject: [PATCH 488/826] Revert hidden text placeholder on BaseTextInput --- src/components/TextInput/BaseTextInput.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index d18da6f99934..91ab2162674f 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -224,8 +224,6 @@ class BaseTextInput extends Component { {}, ); const isMultiline = this.props.multiline || this.props.autoGrowHeight; - //if AutoGrowWeight is true, placeholder needs to be filled with any string. - const hiddenTextPlaceholder = this.props.placeholder ? this.props.placeholder : this.props.autoGrowHeight ? ' ' : ''; return ( <> @@ -390,7 +388,7 @@ class BaseTextInput extends Component { ]} onLayout={(e) => this.setState({textInputWidth: e.nativeEvent.layout.width + 2, textInputHeight: e.nativeEvent.layout.height})} > - {this.state.value || hiddenTextPlaceholder} + {this.state.value || this.props.placeholder} )} From 388bba074f87ca6b20ebd65dfd821d8cb7bb3e29 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sun, 25 Jun 2023 22:22:27 +0700 Subject: [PATCH 489/826] add comment for prop --- src/components/AttachmentView.js | 2 ++ src/components/PDFView/PDFPasswordForm.js | 7 ++++--- src/components/PDFView/pdfViewPropTypes.js | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/AttachmentView.js b/src/components/AttachmentView.js index 6ce10e364194..8516c6c6587f 100755 --- a/src/components/AttachmentView.js +++ b/src/components/AttachmentView.js @@ -35,7 +35,9 @@ const propTypes = { /** Flag to show the loading indicator */ shouldShowLoadingSpinnerIcon: PropTypes.bool, + /** Should focus to the password input */ isFocused: PropTypes.bool, + /** Function for handle on press */ onPress: PropTypes.func, diff --git a/src/components/PDFView/PDFPasswordForm.js b/src/components/PDFView/PDFPasswordForm.js index 43ac66093dac..423bc49511c2 100644 --- a/src/components/PDFView/PDFPasswordForm.js +++ b/src/components/PDFView/PDFPasswordForm.js @@ -30,6 +30,7 @@ const propTypes = { /** Notify parent that a text field has been focused or blurred */ onPasswordFieldFocused: PropTypes.func, + /** Should focus to the password input */ isFocused: PropTypes.bool.isRequired, ...withLocalizePropTypes, @@ -58,11 +59,11 @@ class PDFPasswordForm extends Component { this.validateAndNotifyPasswordBlur = this.validateAndNotifyPasswordBlur.bind(this); } - // eslint-disable-next-line rulesdir/prefer-early-return componentDidUpdate(prevProps) { - if (!prevProps.isFocused && this.props.isFocused && this.textInputRef) { - this.textInputRef.focus(); + if (prevProps.isFocused || !this.props.isFocused || !this.textInputRef) { + return; } + this.textInputRef.focus(); } submitPassword() { diff --git a/src/components/PDFView/pdfViewPropTypes.js b/src/components/PDFView/pdfViewPropTypes.js index d965234b799a..74a4c7f48524 100644 --- a/src/components/PDFView/pdfViewPropTypes.js +++ b/src/components/PDFView/pdfViewPropTypes.js @@ -21,6 +21,7 @@ const propTypes = { /** Handles load complete event in PDF component */ onLoadComplete: PropTypes.func, + /** Should focus to the password input */ isFocused: PropTypes.bool, ...windowDimensionsPropTypes, From e02647e795f2b8b8976d189a39bce52ad628290a Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Sun, 25 Jun 2023 22:37:24 +0700 Subject: [PATCH 490/826] update comment --- src/components/AttachmentView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AttachmentView.js b/src/components/AttachmentView.js index 8516c6c6587f..383770f9279b 100755 --- a/src/components/AttachmentView.js +++ b/src/components/AttachmentView.js @@ -35,7 +35,7 @@ const propTypes = { /** Flag to show the loading indicator */ shouldShowLoadingSpinnerIcon: PropTypes.bool, - /** Should focus to the password input */ + /** Whether this view is the active screen */ isFocused: PropTypes.bool, /** Function for handle on press */ From 3be92b02dbd2e5eb74c9b7dc39dc2e6ebeb681e5 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sun, 25 Jun 2023 15:39:20 +0000 Subject: [PATCH 491/826] fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-ELECTRON-5710626 --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index d6f038ddcc69..721451483a4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -144,7 +144,7 @@ "css-loader": "^6.7.2", "diff-so-fancy": "^1.3.0", "dotenv": "^16.0.3", - "electron": "22.3.7", + "electron": "^22.3.14", "electron-builder": "24.5.0", "eslint": "^7.6.0", "eslint-config-expensify": "^2.0.38", @@ -22063,9 +22063,9 @@ } }, "node_modules/electron": { - "version": "22.3.7", - "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.7.tgz", - "integrity": "sha512-QUuRCl0QJk0w2yPAQXl6sk4YV1b9353w4e1eO/fF2OUmrGQV9Fy2pEpEDV1PIq/JJ/oeVVlI3H07LHpEcNb0TA==", + "version": "22.3.14", + "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.14.tgz", + "integrity": "sha512-WxVcLnC4DrkBLN1/BwpxNkGvVq8iq1hM7lae5nvjnSYg/bwVbuo1Cwc80Keft4MIWKlYCXNiKKqs3qCXV4Aiaw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -58529,9 +58529,9 @@ } }, "electron": { - "version": "22.3.7", - "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.7.tgz", - "integrity": "sha512-QUuRCl0QJk0w2yPAQXl6sk4YV1b9353w4e1eO/fF2OUmrGQV9Fy2pEpEDV1PIq/JJ/oeVVlI3H07LHpEcNb0TA==", + "version": "22.3.14", + "resolved": "https://registry.npmjs.org/electron/-/electron-22.3.14.tgz", + "integrity": "sha512-WxVcLnC4DrkBLN1/BwpxNkGvVq8iq1hM7lae5nvjnSYg/bwVbuo1Cwc80Keft4MIWKlYCXNiKKqs3qCXV4Aiaw==", "dev": true, "requires": { "@electron/get": "^2.0.0", diff --git a/package.json b/package.json index cb5c05287a8b..84a49786904c 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "css-loader": "^6.7.2", "diff-so-fancy": "^1.3.0", "dotenv": "^16.0.3", - "electron": "22.3.7", + "electron": "22.3.14", "electron-builder": "24.5.0", "eslint": "^7.6.0", "eslint-config-expensify": "^2.0.38", From 8142f02d554231e9549bbbd3465f6ab508f2ee2b Mon Sep 17 00:00:00 2001 From: VH Date: Mon, 26 Jun 2023 01:03:17 +0700 Subject: [PATCH 492/826] If iouReport is not found locally then use BE message other parse BE message then localize --- src/languages/en.js | 3 ++- src/languages/es.js | 3 ++- src/libs/ReportUtils.js | 30 +++++++++++++----------------- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 192d9954e5ff..50ee6be7e3aa 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -359,7 +359,8 @@ export default { amountEach: ({amount}) => `${amount} each`, payerOwesAmount: ({payer, amount}) => `${payer} owes ${amount}`, payerPaidAmount: ({payer, amount}) => `${payer} paid ${amount}`, - payerSettled: ({amount}) => `paid ${amount}`, + settledElsewhereWithAmount: ({amount}) => `paid ${amount} elsewhere`, + settledPaypalMeWithAmount: ({amount}) => `paid ${amount} using Paypal.me`, noReimbursableExpenses: 'This report has an invalid amount', pendingConversionMessage: "Total will update when you're back online", threadRequestReportName: ({formattedAmount, comment}) => `${formattedAmount} request${comment ? ` for ${comment}` : ''}`, diff --git a/src/languages/es.js b/src/languages/es.js index d54fa5110117..27be7afc4f96 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -358,7 +358,8 @@ export default { amountEach: ({amount}) => `${amount} cada uno`, payerOwesAmount: ({payer, amount}) => `${payer} debe ${amount}`, payerPaidAmount: ({payer, amount}) => `${payer} pagó ${amount}`, - payerSettled: ({amount}) => `pagó ${amount}`, + settledElsewhereWithAmount: ({amount}) => `paid ${amount} de otra forma`, + settledPaypalMeWithAmount: ({amount}) => `paid ${amount} con PayPal.me`, noReimbursableExpenses: 'El monto de este informe es inválido', pendingConversionMessage: 'El total se actualizará cuando estés online', threadRequestReportName: ({formattedAmount, comment}) => `Solicitud de ${formattedAmount}${comment ? ` para ${comment}` : ''}`, diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 82643b36c28d..eb2280033873 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -994,27 +994,23 @@ function getTransactionReportName(reportAction) { * @returns {String} */ function getMoneyRequestReportActionMessage(report, reportAction) { - let formattedAmount = null; - let reportHasOutstandingIOU = null; + if (_.isEmpty(report) || !report.reportID) { + // The iouReport is not found locally after SignIn because the OpenApp API won't return iouReports if they're settled + // As a temporary solution until we know how to solve this the best, we just use the message that returned from BE + return lodashGet(reportAction, 'message[0].html', ''); + } + const totalAmount = getMoneyRequestTotal(report); const payerName = isExpenseReport(report) ? getPolicyName(report) : getDisplayNameForParticipant(report.managerID, true); + const formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency); - if (totalAmount > 0) { - formattedAmount = CurrencyUtils.convertToDisplayString(totalAmount, report.currency); - reportHasOutstandingIOU = report.hasOutstandingIOU; - } else { - const reportActionMessage = lodashGet(reportAction, 'message[0].html', ''); - - // The totalAmount is 0 after Sign in because OpenApp API won't return iouReports if it's paid, so we need to retrieve it from the reportActionMessage - // reportActionMessage is in the format of either "payer@mail.com owes $1.00" or "paid $1.00" - formattedAmount = _.last(reportActionMessage.split(' ')); - reportHasOutstandingIOU = Boolean(reportActionMessage.match(/ owes /)); - } - - if (reportHasOutstandingIOU) { - return Localize.translateLocal('iou.payerOwesAmount', {payer: payerName, amount: formattedAmount}); + if (isSettled(report.reportID)) { + // A settled message is in the format of either "paid $1.00 elsewhere" or "paid $1.00 using Paypal.me" + const isSettledPaypalMe = Boolean(report.lastMessageText.match(/ Paypal.me$/)); + const translatePhraseKey = isSettledPaypalMe ? 'iou.settledPaypalMeWithAmount' : 'iou.settledElsewhereWithAmount'; + return Localize.translateLocal(translatePhraseKey, {amount: formattedAmount}); } - return Localize.translateLocal('iou.payerSettled', {amount: formattedAmount}); + return Localize.translateLocal('iou.payerOwesAmount', {payer: payerName, amount: formattedAmount}); } /** From f8dca5a79123f305755ec49e9f4ed0155adfe22b Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sun, 25 Jun 2023 15:11:23 -0400 Subject: [PATCH 493/826] Start adding tests --- .../migrations/PersonalDetailsByAccountID.js | 4 + tests/unit/MigrationTest.js | 108 ++++++++++++++++++ 2 files changed, 112 insertions(+) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 74fa5be19586..9f4c49df338a 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -56,6 +56,10 @@ export default function () { // childOldestFourEmails -> childOldestFourAccountIDs x // participants -> participantAccountIDs ? // accountEmail -> accountID ? + if (!oldReportActions) { + Log.info('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'); + return; + } // We migrate reportActions to have the new accountID-based data if they don't already. // If we are not able to get the accountID for some reason, we will just clear the reportAction diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index 41512b364646..6ba63301127b 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -7,6 +7,7 @@ import getPlatform from '../../src/libs/getPlatform'; import AddLastVisibleActionCreated from '../../src/libs/migrations/AddLastVisibleActionCreated'; import MoveToIndexedDB from '../../src/libs/migrations/MoveToIndexedDB'; import KeyReportActionsByReportActionID from '../../src/libs/migrations/KeyReportActionsByReportActionID'; +import PersonalDetailsByAccountID from '../../src/libs/migrations/PersonalDetailsByAccountID'; import ONYXKEYS from '../../src/ONYXKEYS'; jest.mock('../../src/libs/getPlatform'); @@ -253,4 +254,111 @@ describe('Migrations', () => { }); })); }); + + describe('PersonalDetailsByAccountID', () => { + // Warning: this test has to come before the others in this suite because Onyx.clear leaves traces and keys with null values aren't cleared out between tests + it("Should work even if there's no reportAction data in Onyx", () => + PersonalDetailsByAccountID().then(() => + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'), + )); + + it("Should work even if there's zombie reportAction data in Onyx", () => + Onyx.multiSet({ + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: null, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]: null, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1 because there were no reportActions`); + expect(LogSpy).toHaveBeenCalledWith(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2 because there were no reportActions`); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + _.each(allReportActions, (reportActionsForReport) => expect(reportActionsForReport).toBeNull()); + }, + }); + })); + + // it('Should migrate reportActions to be keyed by reportActionID instead of sequenceNumber', () => + // Onyx.multiSet({ + // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + // 1: { + // reportActionID: '1000', + // sequenceNumber: 1, + // }, + // 2: { + // reportActionID: '2000', + // sequenceNumber: 2, + // }, + // }, + // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]: { + // 1: { + // reportActionID: '3000', + // sequenceNumber: 1, + // }, + // 2: { + // reportActionID: '4000', + // sequenceNumber: 2, + // }, + // }, + // }) + // .then(KeyReportActionsByReportActionID) + // .then(() => { + // expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Re-keying reportActions by reportActionID for 2 reports'); + // const connectionID = Onyx.connect({ + // key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + // waitForCollectionCallback: true, + // callback: (allReportActions) => { + // Onyx.disconnect(connectionID); + // expect(_.keys(allReportActions).length).toBe(2); + // _.each(allReportActions, (reportActionsForReport) => { + // _.each(reportActionsForReport, (reportAction, key) => { + // expect(key).toBe(reportAction.reportActionID); + // }); + // }); + // }, + // }); + // })); + + // it('Should return early if the migration has already happened', () => + // Onyx.multiSet({ + // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + // 1000: { + // reportActionID: '1000', + // sequenceNumber: 1, + // }, + // 2000: { + // reportActionID: '2000', + // sequenceNumber: 2, + // }, + // }, + // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]: { + // 3000: { + // reportActionID: '3000', + // }, + // 4000: { + // reportActionID: '4000', + // }, + // }, + // }) + // .then(KeyReportActionsByReportActionID) + // .then(() => { + // expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Skipped migration KeyReportActionsByReportActionID because we already migrated it'); + // const connectionID = Onyx.connect({ + // key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + // waitForCollectionCallback: true, + // callback: (allReportActions) => { + // Onyx.disconnect(connectionID); + // expect(_.keys(allReportActions).length).toBe(2); + // _.each(allReportActions, (reportActionsForReport) => { + // _.each(reportActionsForReport, (reportAction, key) => { + // expect(key).toBe(reportAction.reportActionID); + // }); + // }); + // }, + // }); + // })); + }); }); From b70b37ed60f7dbc3479fdbe0121d5c6f5a68c32a Mon Sep 17 00:00:00 2001 From: oleh Date: Sun, 25 Jun 2023 22:26:34 +0300 Subject: [PATCH 494/826] Merge branch 'main' into 16280_refactor_MoneyRequestParticipantsSplitSelector --- .../MoneyRequestParticipantsSplitSelector.js | 90 ++++++++----------- 1 file changed, 36 insertions(+), 54 deletions(-) diff --git a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js index 7469c322f7d4..7aef507ac12d 100755 --- a/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js +++ b/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSplitSelector.js @@ -55,7 +55,7 @@ const defaultProps = { safeAreaPaddingBottomStyle: {}, }; -function MoneyRequestParticipantsSplitSelector(props) { +function MoneyRequestParticipantsSplitSelector({betas, participants, personalDetails, reports, translate, onAddParticipants, onStepComplete, safeAreaPaddingBottomStyle}) { const [searchTerm, setSearchTerm] = useState(''); const [newChatOptions, setNewChatOptions] = useState({ recentReports: [], @@ -63,7 +63,7 @@ function MoneyRequestParticipantsSplitSelector(props) { userToInvite: null, }); - const maxParticipantsReached = props.participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; + const maxParticipantsReached = participants.length === CONST.REPORT.MAXIMUM_PARTICIPANTS; /** * Returns the sections needed for the OptionsSelector @@ -77,46 +77,43 @@ function MoneyRequestParticipantsSplitSelector(props) { newSections.push({ title: undefined, - data: OptionsListUtils.getParticipantsOptions(props.participants, props.personalDetails), + data: OptionsListUtils.getParticipantsOptions(participants, personalDetails), shouldShow: true, indexOffset, }); - indexOffset += props.participants.length; + indexOffset += participants.length; if (maxParticipantsReached) { return newSections; } - const {recentReports, personalDetails, userToInvite} = newChatOptions; - newSections.push({ - title: props.translate('common.recents'), - data: recentReports, - shouldShow: !_.isEmpty(recentReports), + title: translate('common.recents'), + data: newChatOptions.recentReports, + shouldShow: !_.isEmpty(newChatOptions.recentReports), indexOffset, }); - indexOffset += recentReports.length; + indexOffset += newChatOptions.recentReports.length; newSections.push({ - title: props.translate('common.contacts'), - data: personalDetails, - shouldShow: !_.isEmpty(personalDetails), + title: translate('common.contacts'), + data: newChatOptions.personalDetails, + shouldShow: !_.isEmpty(newChatOptions.personalDetails), indexOffset, }); - indexOffset += personalDetails.length; + indexOffset += newChatOptions.personalDetails.length; - if (userToInvite && !OptionsListUtils.isCurrentUser(userToInvite)) { + if (newChatOptions.userToInvite && !OptionsListUtils.isCurrentUser(newChatOptions.userToInvite)) { newSections.push({ undefined, - data: [userToInvite], + data: [newChatOptions.userToInvite], shouldShow: true, indexOffset, }); } return newSections; - // eslint-disable-next-line react-hooks/exhaustive-deps -- props does not need to be a dependency as it will always exist - }, [maxParticipantsReached, newChatOptions, props.participants, props.personalDetails, props.translate]); + }, [maxParticipantsReached, newChatOptions, participants, personalDetails, translate]); /** * Removes a selected option from list if already selected. If not already selected add this option to the list. @@ -124,38 +121,30 @@ function MoneyRequestParticipantsSplitSelector(props) { */ const toggleOption = useCallback( (option) => { - const isOptionInList = _.some(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); + const isOptionInList = _.some(participants, (selectedOption) => selectedOption.accountID === option.accountID); let newSelectedOptions; if (isOptionInList) { - newSelectedOptions = _.reject(props.participants, (selectedOption) => selectedOption.accountID === option.accountID); + newSelectedOptions = _.reject(participants, (selectedOption) => selectedOption.accountID === option.accountID); } else { - newSelectedOptions = [...props.participants, {accountID: option.accountID, login: option.login, selected: true}]; + newSelectedOptions = [...participants, {accountID: option.accountID, login: option.login, selected: true}]; } - props.onAddParticipants(newSelectedOptions); + onAddParticipants(newSelectedOptions); - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - props.reports, - props.personalDetails, - props.betas, - isOptionInList ? searchTerm : '', - newSelectedOptions, - CONST.EXPENSIFY_EMAILS, - ); + const chatOptions = OptionsListUtils.getNewChatOptions(reports, personalDetails, betas, isOptionInList ? searchTerm : '', newSelectedOptions, CONST.EXPENSIFY_EMAILS); setNewChatOptions({ - recentReports, - personalDetails, - userToInvite, + recentReports: chatOptions.recentReports, + personalDetails: chatOptions.personalDetails, + userToInvite: chatOptions.userToInvite, }); if (!isOptionInList) { setSearchTerm(''); } }, - // eslint-disable-next-line react-hooks/exhaustive-deps -- props does not need to be a dependency as it will always exist - [searchTerm, props.participants, props.onAddParticipants, props.reports, props.personalDetails, props.betas, setNewChatOptions, setSearchTerm], + [searchTerm, participants, onAddParticipants, reports, personalDetails, betas, setNewChatOptions, setSearchTerm], ); const headerMessage = OptionsListUtils.getHeaderMessage( @@ -164,40 +153,33 @@ function MoneyRequestParticipantsSplitSelector(props) { searchTerm, maxParticipantsReached, ); - const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(props.personalDetails); + const isOptionsDataReady = ReportUtils.isReportDataReady() && OptionsListUtils.isPersonalDetailsReady(personalDetails); useEffect(() => { - const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getNewChatOptions( - props.reports, - props.personalDetails, - props.betas, - searchTerm, - props.participants, - CONST.EXPENSIFY_EMAILS, - ); + const chatOptions = OptionsListUtils.getNewChatOptions(reports, personalDetails, betas, searchTerm, participants, CONST.EXPENSIFY_EMAILS); setNewChatOptions({ - recentReports, - personalDetails, - userToInvite, + recentReports: chatOptions.recentReports, + personalDetails: chatOptions.personalDetails, + userToInvite: chatOptions.userToInvite, }); - }, [props.betas, props.reports, props.participants, props.personalDetails, props.translate, searchTerm]); + }, [betas, reports, participants, personalDetails, translate, searchTerm, setNewChatOptions]); return ( - 0 ? props.safeAreaPaddingBottomStyle : {}]}> + 0 ? safeAreaPaddingBottomStyle : {}]}> From e1bed86478314756a2efae468cef6876376de722 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sun, 25 Jun 2023 16:35:06 -0400 Subject: [PATCH 495/826] Add case for originalMessage.participants --- .../migrations/PersonalDetailsByAccountID.js | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 9f4c49df338a..798fce19733a 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -74,7 +74,7 @@ export default function () { let reportActionsWereModified = false; _.each(reportActionsForReport, (reportAction, reportActionID) => { if (_.isEmpty(reportAction)) { - Log.info(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for reportAction ${reportActionID} because the reportAction was empty`); + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because the reportAction was empty`); return; } @@ -161,6 +161,24 @@ export default function () { } } + if (lodashHas(reportAction, ['originalMessage', 'participants']) && !lodashHas(reportAction, ['originalMessage', 'participantAccountIDs'])) { + reportActionsWereModified = true; + const participantAccountIDs = []; + _.each(reportAction.originalMessage.participants, (participant) => { + const participantAccountID = _.get(oldPersonalDetails, [participant, 'accountID']); + if (participantAccountID) { + participantAccountIDs.push(participantAccountID); + } + }); + + if (participantAccountIDs.length === reportAction.originalMessage.participants.length) { + newReportAction.participantAccountIDs = participantAccountIDs; + } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because originalMessage.participantAccountIDs not found`); + return; + } + } + // if (reportAction.accountEmail && !reportAction.accountID) { // const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); // if (accountID) { From 6959985e70b809edb122e405dd4a4ad9b4e70e63 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Sun, 25 Jun 2023 17:26:50 -0400 Subject: [PATCH 496/826] Add tests for each case --- .../migrations/PersonalDetailsByAccountID.js | 17 +- tests/unit/MigrationTest.js | 493 +++++++++++++++--- 2 files changed, 416 insertions(+), 94 deletions(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 798fce19733a..938f823d4c79 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -48,13 +48,13 @@ function getDeprecatedPersonalDetailsFromOnyx() { export default function () { return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then(([oldReportActions, oldPersonalDetails]) => { const onyxData = {}; - // originalMessage.oldLogin -> originalMessage.oldAccountID x - // originalMessage.newLogin -> originalMessage.newAccountID x - // actorEmail -> actorAccountID x - // childManagerEmail -> childManagerAccountID x - // whisperedTo -> whisperedToAccountIDs x - // childOldestFourEmails -> childOldestFourAccountIDs x - // participants -> participantAccountIDs ? + // originalMessage.oldLogin -> originalMessage.oldAccountID xx + // originalMessage.newLogin -> originalMessage.newAccountID xx + // actorEmail -> actorAccountID xx + // childManagerEmail -> childManagerAccountID xx + // whisperedTo -> whisperedToAccountIDs xx + // childOldestFourEmails -> childOldestFourAccountIDs xx + // participants -> participantAccountIDs xx // accountEmail -> accountID ? if (!oldReportActions) { Log.info('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'); @@ -74,6 +74,7 @@ export default function () { let reportActionsWereModified = false; _.each(reportActionsForReport, (reportAction, reportActionID) => { if (_.isEmpty(reportAction)) { + reportActionsWereModified = true; Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because the reportAction was empty`); return; } @@ -147,7 +148,7 @@ export default function () { const childOldestFourEmails = reportAction.childOldestFourEmails.split(','); const childOldestFourAccountIDs = []; _.each(childOldestFourEmails, (login) => { - const accountID = _.get(oldPersonalDetails, [login, 'accountID']); + const accountID = _.get(oldPersonalDetails, [login.trim(), 'accountID']); if (accountID) { childOldestFourAccountIDs.push(accountID); } diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index 6ba63301127b..8be00ca3acb2 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -256,21 +256,28 @@ describe('Migrations', () => { }); describe('PersonalDetailsByAccountID', () => { + const DEPRECATED_ONYX_KEYS = { + // Deprecated personal details object which was keyed by login instead of accountID. + PERSONAL_DETAILS: 'personalDetails', + }; + // Warning: this test has to come before the others in this suite because Onyx.clear leaves traces and keys with null values aren't cleared out between tests - it("Should work even if there's no reportAction data in Onyx", () => - PersonalDetailsByAccountID().then(() => - expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'), - )); + it("Should skip the migration if there's no reportAction data in Onyx", () => + PersonalDetailsByAccountID().then(() => expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'))); - it("Should work even if there's zombie reportAction data in Onyx", () => + it('Should skip any zombie reportAction collections that have no reportAction data in Onyx', () => Onyx.multiSet({ [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: null, [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]: null, }) .then(PersonalDetailsByAccountID) .then(() => { - expect(LogSpy).toHaveBeenCalledWith(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1 because there were no reportActions`); - expect(LogSpy).toHaveBeenCalledWith(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2 because there were no reportActions`); + expect(LogSpy).toHaveBeenCalledWith( + `[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1 because there were no reportActions`, + ); + expect(LogSpy).toHaveBeenCalledWith( + `[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2 because there were no reportActions`, + ); const connectionID = Onyx.connect({ key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, waitForCollectionCallback: true, @@ -281,84 +288,398 @@ describe('Migrations', () => { }); })); - // it('Should migrate reportActions to be keyed by reportActionID instead of sequenceNumber', () => - // Onyx.multiSet({ - // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { - // 1: { - // reportActionID: '1000', - // sequenceNumber: 1, - // }, - // 2: { - // reportActionID: '2000', - // sequenceNumber: 2, - // }, - // }, - // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]: { - // 1: { - // reportActionID: '3000', - // sequenceNumber: 1, - // }, - // 2: { - // reportActionID: '4000', - // sequenceNumber: 2, - // }, - // }, - // }) - // .then(KeyReportActionsByReportActionID) - // .then(() => { - // expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Re-keying reportActions by reportActionID for 2 reports'); - // const connectionID = Onyx.connect({ - // key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, - // waitForCollectionCallback: true, - // callback: (allReportActions) => { - // Onyx.disconnect(connectionID); - // expect(_.keys(allReportActions).length).toBe(2); - // _.each(allReportActions, (reportActionsForReport) => { - // _.each(reportActionsForReport, (reportAction, key) => { - // expect(key).toBe(reportAction.reportActionID); - // }); - // }); - // }, - // }); - // })); - - // it('Should return early if the migration has already happened', () => - // Onyx.multiSet({ - // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { - // 1000: { - // reportActionID: '1000', - // sequenceNumber: 1, - // }, - // 2000: { - // reportActionID: '2000', - // sequenceNumber: 2, - // }, - // }, - // [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}2`]: { - // 3000: { - // reportActionID: '3000', - // }, - // 4000: { - // reportActionID: '4000', - // }, - // }, - // }) - // .then(KeyReportActionsByReportActionID) - // .then(() => { - // expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] Skipped migration KeyReportActionsByReportActionID because we already migrated it'); - // const connectionID = Onyx.connect({ - // key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, - // waitForCollectionCallback: true, - // callback: (allReportActions) => { - // Onyx.disconnect(connectionID); - // expect(_.keys(allReportActions).length).toBe(2); - // _.each(allReportActions, (reportActionsForReport) => { - // _.each(reportActionsForReport, (reportAction, key) => { - // expect(key).toBe(reportAction.reportActionID); - // }); - // }); - // }, - // }); - // })); + it('Should remove any individual reportActions that have no data in Onyx', () => + Onyx.multiSet({ + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: null, + 2: null, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 1 because the reportAction was empty'); + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because the reportAction was empty'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + _.each(allReportActions, (reportActionsForReport) => expect(reportActionsForReport).toMatchObject({})); + }, + }); + })); + + it('Should remove any individual reportActions that have originalMessage.oldLogin but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'non-existent@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because originalMessage.oldAccountID not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + + it('Should remove any individual reportActions that have originalMessage.newLogin but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'non-existent@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because originalMessage.newAccountID not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + + it('Should remove any individual reportActions that have actorEmail but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'non-existent@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because actorAccountID not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + + it('Should remove any individual reportActions that have childManagerEmail but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'non-existent@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because childManagerAccountID not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + + it('Should remove any individual reportActions that have whisperedTo but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'non-existent@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because whisperedToAccountIDs not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + + it('Should remove any individual reportActions that have childOldestFourEmails but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, non-existent@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because childOldestFourAccountIDs not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + + it('Should remove any individual reportActions that have originalMessage.participants but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'non-existent@account.com'], + }, + actorEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith( + '[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because originalMessage.participantAccountIDs not found', + ); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); }); }); From d1e4aae3f6453a2bfd8669b692208a9f9dd2af04 Mon Sep 17 00:00:00 2001 From: VH Date: Mon, 26 Jun 2023 06:42:17 +0700 Subject: [PATCH 497/826] Use report action message instead report last message text --- src/libs/ReportUtils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index eb2280033873..eb3384d525ee 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -994,10 +994,12 @@ function getTransactionReportName(reportAction) { * @returns {String} */ function getMoneyRequestReportActionMessage(report, reportAction) { + const reportActionMessage = lodashGet(reportAction, 'message[0].html', ''); + if (_.isEmpty(report) || !report.reportID) { // The iouReport is not found locally after SignIn because the OpenApp API won't return iouReports if they're settled // As a temporary solution until we know how to solve this the best, we just use the message that returned from BE - return lodashGet(reportAction, 'message[0].html', ''); + return reportActionMessage; } const totalAmount = getMoneyRequestTotal(report); @@ -1006,7 +1008,7 @@ function getMoneyRequestReportActionMessage(report, reportAction) { if (isSettled(report.reportID)) { // A settled message is in the format of either "paid $1.00 elsewhere" or "paid $1.00 using Paypal.me" - const isSettledPaypalMe = Boolean(report.lastMessageText.match(/ Paypal.me$/)); + const isSettledPaypalMe = Boolean(reportActionMessage.match(/ Paypal.me$/)); const translatePhraseKey = isSettledPaypalMe ? 'iou.settledPaypalMeWithAmount' : 'iou.settledElsewhereWithAmount'; return Localize.translateLocal(translatePhraseKey, {amount: formattedAmount}); } From c9a25e5ea74d054e4063f3a9841cda917382570b Mon Sep 17 00:00:00 2001 From: VH Date: Mon, 26 Jun 2023 07:04:15 +0700 Subject: [PATCH 498/826] Fix translate settled message to ES --- src/languages/es.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/es.js b/src/languages/es.js index 6b9e3ea8ef9d..1267a59b7043 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -358,8 +358,8 @@ export default { amountEach: ({amount}) => `${amount} cada uno`, payerOwesAmount: ({payer, amount}) => `${payer} debe ${amount}`, payerPaidAmount: ({payer, amount}) => `${payer} pagó ${amount}`, - settledElsewhereWithAmount: ({amount}) => `paid ${amount} de otra forma`, - settledPaypalMeWithAmount: ({amount}) => `paid ${amount} con PayPal.me`, + settledElsewhereWithAmount: ({amount}) => `pagó ${amount} de otra forma`, + settledPaypalMeWithAmount: ({amount}) => `pagó ${amount} con PayPal.me`, noReimbursableExpenses: 'El monto de este informe es inválido', pendingConversionMessage: 'El total se actualizará cuando estés online', threadRequestReportName: ({formattedAmount, comment}) => `Solicitud de ${formattedAmount}${comment ? ` para ${comment}` : ''}`, From de7ccb5562f4ba6c6a70f83797b267a0d833e6e9 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 26 Jun 2023 11:32:48 +0700 Subject: [PATCH 499/826] Fix shield icon hover effect --- src/pages/ReimbursementAccount/Enable2FAPrompt.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/Enable2FAPrompt.js b/src/pages/ReimbursementAccount/Enable2FAPrompt.js index e27cba2b51a0..7681685b42ef 100644 --- a/src/pages/ReimbursementAccount/Enable2FAPrompt.js +++ b/src/pages/ReimbursementAccount/Enable2FAPrompt.js @@ -29,7 +29,6 @@ function Enable2FAPrompt(props) { icon: Expensicons.Shield, shouldShowRightIcon: true, iconRight: Expensicons.NewWindow, - iconFill: themeColors.success, wrapperStyle: [styles.cardMenuItem], link: () => Link.buildOldDotURL(secureYourAccountUrl), }, From 7f92ba647016e26e5ce1f25bebcf46d364811662 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 26 Jun 2023 11:48:14 +0700 Subject: [PATCH 500/826] fix lint --- src/pages/ReimbursementAccount/Enable2FAPrompt.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/Enable2FAPrompt.js b/src/pages/ReimbursementAccount/Enable2FAPrompt.js index 7681685b42ef..829ac9b63848 100644 --- a/src/pages/ReimbursementAccount/Enable2FAPrompt.js +++ b/src/pages/ReimbursementAccount/Enable2FAPrompt.js @@ -8,7 +8,6 @@ import * as Illustrations from '../../components/Icon/Illustrations'; import Section from '../../components/Section'; import * as Link from '../../libs/actions/Link'; import ROUTES from '../../ROUTES'; -import themeColors from '../../styles/themes/default'; const propTypes = { ...withLocalizePropTypes, From 0f5878ea6d821b46a0fe8fd720236265a4b71273 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Mon, 26 Jun 2023 11:57:19 +0200 Subject: [PATCH 501/826] fix: apply changes from review --- src/components/MoneyRequestHeader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index a0e0fc3b70ad..93d31a1390f4 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -109,7 +109,7 @@ function MoneyRequestHeader(props) { policies={props.policies} personalDetails={props.personalDetails} shouldShowBackButton={props.isSmallScreenWidth} - onBackButtonPress={() => Navigation.goBack(ROUTES.HOME)} + onBackButtonPress={() => Navigation.goBack(ROUTES.HOME, false, true)} /> {props.translate('common.to')} From f0079d1f224f369b6ccafcae629c45bba6e59e8a Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 26 Jun 2023 17:21:26 +0700 Subject: [PATCH 502/826] add accessbilityLabel prop --- src/pages/workspace/WorkspaceMembersPage.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 314778e14ff8..6b692f9399b0 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -459,6 +459,7 @@ function WorkspaceMembersPage(props) { accessibilityState={{ checked: !_.isEmpty(removableMembers) && _.every(_.keys(removableMembers), (accountID) => _.contains(selectedEmployees, Number(accountID))), }} + accessibilityLabel={props.translate('workspace.people.selectAll')} // disable hover dimming hoverDimmingValue={1} pressDimmingValue={0.7} From c9585e9d4497ecf5940980a199378c13178cd015 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 26 Jun 2023 13:35:06 +0200 Subject: [PATCH 503/826] modify docs --- contributingGuides/NAVIGATION.md | 47 ++++++++++++++++++- .../Navigators/RightModalNavigator.js | 1 - 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/contributingGuides/NAVIGATION.md b/contributingGuides/NAVIGATION.md index d1eca9f5e724..d7a94c2a4337 100644 --- a/contributingGuides/NAVIGATION.md +++ b/contributingGuides/NAVIGATION.md @@ -107,7 +107,6 @@ The action for the first step looks like that: "params": { "initial": true, "screen": "Profile", - "path": "/settings/profile" } } } @@ -115,7 +114,51 @@ The action for the first step looks like that: ``` -That means, the params for the `RightModalNavigator` and `Settings` (also a navigator) will be filled with the information that we want to navigate to the `Profile` screen. +That means, the params for the `RightModalNavigator` and `Settings` (also a navigator) will be filled with the information that we want to have the `Profile` screen in the state. + +```json +{ + "index": 2, + "routes": [ + { "name": "Home", }, + { + "name": "RightModalNavigator", + // here you can see that the params are filled with the information about structure that should be in the state. + "params": { + "initial": true, + "screen": "Settings", + "params": { + "initial": true, + "screen": "Settings_Profile", + "path": "/settings/profile" + } + }, + "state": { + "index": 0, + "routes": [ + { + "name": "Settings", + // Same here + "params": { + "initial": true, + "screen": "Settings_Profile", + "path": "/settings/profile" + }, + "state": { + "index": 0, + "routes": [ + { + "name": "Settings_Profile" + } + ] + } + } + ] + } + } + ] +} +``` This information will stay here even if we pop the `Profile` screen and navigate to `About` screen. diff --git a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js index 9544026ddcbb..7b22475bc623 100644 --- a/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js +++ b/src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.js @@ -87,7 +87,6 @@ function RigthModalNavigator() { /> From c82a43cfb93d04d2ed12709a2e653d0bdc625c78 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 26 Jun 2023 09:16:48 -0400 Subject: [PATCH 504/826] Add accountEmail -> accountID case --- .../migrations/PersonalDetailsByAccountID.js | 49 ++++++------- tests/unit/MigrationTest.js | 69 +++++++++++++++++++ 2 files changed, 91 insertions(+), 27 deletions(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 938f823d4c79..0e6144569353 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -43,19 +43,22 @@ function getDeprecatedPersonalDetailsFromOnyx() { /** * Migrate Onyx data for the email to accountID migration. * + * - reportAction_ + * - originalMessage.oldLogin -> originalMessage.oldAccountID + * - originalMessage.newLogin -> originalMessage.newAccountID + * - accountEmail -> accountID + * - actorEmail -> actorAccountID + * - childManagerEmail -> childManagerAccountID + * - whisperedTo -> whisperedToAccountIDs + * - childOldestFourEmails -> childOldestFourAccountIDs + * - originalMessage.participants -> originalMessage.participantAccountIDs + * * @returns {Promise} */ export default function () { return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then(([oldReportActions, oldPersonalDetails]) => { const onyxData = {}; - // originalMessage.oldLogin -> originalMessage.oldAccountID xx - // originalMessage.newLogin -> originalMessage.newAccountID xx - // actorEmail -> actorAccountID xx - // childManagerEmail -> childManagerAccountID xx - // whisperedTo -> whisperedToAccountIDs xx - // childOldestFourEmails -> childOldestFourAccountIDs xx - // participants -> participantAccountIDs xx - // accountEmail -> accountID ? + if (!oldReportActions) { Log.info('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'); return; @@ -103,6 +106,17 @@ export default function () { } } + if (lodashHas(reportAction, ['accountEmail']) && !lodashHas(reportAction, ['accountID'])) { + reportActionsWereModified = true; + const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); + if (accountID) { + newReportAction.accountID = accountID; + } else { + Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because accountID not found`); + return; + } + } + if (lodashHas(reportAction, ['actorEmail']) && !lodashHas(reportAction, ['actorAccountID'])) { reportActionsWereModified = true; const actorAccountID = _.get(oldPersonalDetails, [reportAction.actorEmail, 'accountID']); @@ -180,25 +194,6 @@ export default function () { } } - // if (reportAction.accountEmail && !reportAction.accountID) { - // const accountID = _.get(oldPersonalDetails, [reportAction.accountEmail, 'accountID']); - // if (accountID) { - // newReportAction.accountID = accountID; - // } else { - // return; - // } - // } - - // const newOriginalMessage = _.omit(reportAction.originalMessage, ['participants']); - // const oldParticipants = _.get(reportAction, ['originalMessage', 'participants'], []); - // const newParticipants = []; - // _.each(oldParticipants, (login) => { - // const accountID = _.get(oldPersonalDetails, [login, 'accountID']); - // newParticipants.push(accountID); - // }); - // newOriginalMessage.participantAccountIDs = newParticipants; - // newReportAction.originalMessage = newOriginalMessage; - newReportActionsForReport[reportActionID] = newReportAction; }); diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index 8be00ca3acb2..a31444b0d917 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -330,6 +330,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -342,6 +343,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -383,6 +385,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -395,6 +398,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -415,6 +419,61 @@ describe('Migrations', () => { }); })); + it('Should remove any individual reportActions that have accountEmail but the matching accountID is not found', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + 2: { + reportActionID: '2', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + accountEmail: 'non-existent@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + expect(LogSpy).toHaveBeenCalledWith('[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction 2 because accountID not found'); + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).toHaveProperty('1'); + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]).not.toHaveProperty('2'); + }, + }); + })); + it('Should remove any individual reportActions that have actorEmail but the matching accountID is not found', () => Onyx.multiSet({ [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { @@ -436,6 +495,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -448,6 +508,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'non-existent@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -489,6 +550,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -501,6 +563,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'non-existent@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -542,6 +605,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -554,6 +618,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'non-existent@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -595,6 +660,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -607,6 +673,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, non-existent@account.com', @@ -648,6 +715,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'test2@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', @@ -660,6 +728,7 @@ describe('Migrations', () => { participants: ['test1@account.com', 'non-existent@account.com'], }, actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', childManagerEmail: 'test2@account.com', whisperedTo: ['test1@account.com', 'test2@account.com'], childOldestFourEmails: 'test1@account.com, test2@account.com', From 312ec88d05bacc1a3d11f00eb22a9ac1ca76982c Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 26 Jun 2023 09:57:29 -0400 Subject: [PATCH 505/826] Add test for success scenario --- .../migrations/PersonalDetailsByAccountID.js | 2 +- tests/unit/MigrationTest.js | 61 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 0e6144569353..aeb88094ceb4 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -187,7 +187,7 @@ export default function () { }); if (participantAccountIDs.length === reportAction.originalMessage.participants.length) { - newReportAction.participantAccountIDs = participantAccountIDs; + newReportAction.originalMessage.participantAccountIDs = participantAccountIDs; } else { Log.info(`[Migrate Onyx] PersonalDetailsByAccountID migration: removing reportAction ${reportActionID} because originalMessage.participantAccountIDs not found`); return; diff --git a/tests/unit/MigrationTest.js b/tests/unit/MigrationTest.js index a31444b0d917..e9f605699e43 100644 --- a/tests/unit/MigrationTest.js +++ b/tests/unit/MigrationTest.js @@ -750,5 +750,66 @@ describe('Migrations', () => { }, }); })); + + it('Should succeed in adding all relevant accountID data if it can be found in personalDetails', () => + Onyx.multiSet({ + [`${DEPRECATED_ONYX_KEYS.PERSONAL_DETAILS}`]: { + 'test1@account.com': { + accountID: 100, + login: 'test1@account.com', + }, + 'test2@account.com': { + accountID: 101, + login: 'test2@account.com', + }, + }, + [`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`]: { + 1: { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + newLogin: 'test2@account.com', + participants: ['test1@account.com', 'test2@account.com'], + }, + actorEmail: 'test2@account.com', + accountEmail: 'test2@account.com', + childManagerEmail: 'test2@account.com', + whisperedTo: ['test1@account.com', 'test2@account.com'], + childOldestFourEmails: 'test1@account.com, test2@account.com', + }, + }, + }) + .then(PersonalDetailsByAccountID) + .then(() => { + const connectionID = Onyx.connect({ + key: ONYXKEYS.COLLECTION.REPORT_ACTIONS, + waitForCollectionCallback: true, + callback: (allReportActions) => { + Onyx.disconnect(connectionID); + const expectedReportAction = { + reportActionID: '1', + originalMessage: { + oldLogin: 'test1@account.com', + oldAccountID: 100, + newLogin: 'test2@account.com', + newAccountID: 101, + participants: ['test1@account.com', 'test2@account.com'], + participantAccountIDs: [100, 101], + }, + actorEmail: 'test2@account.com', + actorAccountID: 101, + accountEmail: 'test2@account.com', + accountID: 101, + childManagerEmail: 'test2@account.com', + childManagerAccountID: 101, + whisperedTo: ['test1@account.com', 'test2@account.com'], + whisperedToAccountIDs: [100, 101], + childOldestFourEmails: 'test1@account.com, test2@account.com', + childOldestFourAccountIDs: '100,101', + }; + expect(allReportActions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}1`][1]).toMatchObject(expectedReportAction); + }, + }); + })); }); }); From 0eb83f4b7edcdba9f857fec62e1cdd429084542d Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 26 Jun 2023 10:52:22 -0400 Subject: [PATCH 506/826] Improve reportActions explanation --- src/libs/migrations/PersonalDetailsByAccountID.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index aeb88094ceb4..02016d888117 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -65,8 +65,9 @@ export default function () { } // We migrate reportActions to have the new accountID-based data if they don't already. - // If we are not able to get the accountID for some reason, we will just clear the reportAction + // If we are not able to get the accountID from personalDetails for some reason, we will just clear the reportAction // and let it be fetched from the API next time they open the report and scroll to that action. + // We do this because we know the reportAction from the API will include the needed accountID data. _.each(oldReportActions, (reportActionsForReport, onyxKey) => { if (_.isEmpty(reportActionsForReport)) { Log.info(`[Migrate Onyx] Skipped migration PersonalDetailsByAccountID for ${onyxKey} because there were no reportActions`); From d5ed78f70ed9d7e1f8287f7b7b60480aa4b3de8f Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 26 Jun 2023 17:15:32 +0200 Subject: [PATCH 507/826] Update src/libs/migrations/PersonalDetailsByAccountID.js Co-authored-by: Alex Beaman --- src/libs/migrations/PersonalDetailsByAccountID.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 02016d888117..0fd8b84c8fb1 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -198,7 +198,8 @@ export default function () { newReportActionsForReport[reportActionID] = newReportAction; }); - // Only include the reportActions from this report if they were modified in any way + // Only include the reportActions from this report if at least one reportAction in this report + // was modified in any way. if (reportActionsWereModified) { onyxData[onyxKey] = newReportActionsForReport; } From 566301f7cad2474fbf44cd5127344bfbdc2fc9d4 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 26 Jun 2023 11:22:27 -0400 Subject: [PATCH 508/826] Explain why were using old personalDetails object --- src/libs/migrations/PersonalDetailsByAccountID.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 0fd8b84c8fb1..8716f063357e 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -26,6 +26,9 @@ function getReportActionsFromOnyx() { } /** + * We use the old personalDetails object becuase it is more efficient for this migration since it is keyed by email address. + * Also, if the old personalDetails object is not available, that likely means the migration has already run successfully before on this account. + * * @returns {Promise} */ function getDeprecatedPersonalDetailsFromOnyx() { From 8f8de9c95ab4903ac9a7531b27fac146cd57758e Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 10:23:47 -0700 Subject: [PATCH 509/826] Fetch all tags in GitUtils --- .../actions/javascript/createOrUpdateStagingDeploy/index.js | 6 ++++-- .../actions/javascript/getDeployPullRequestList/index.js | 6 ++++-- .github/libs/GitUtils.js | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index a4ebf20428fe..9ded6880be82 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -249,8 +249,10 @@ function fetchTagIfNeeded(tag) { * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromTag, toTag) { - fetchTagIfNeeded(fromTag); - fetchTagIfNeeded(toTag); + // fetchTagIfNeeded(fromTag); + // fetchTagIfNeeded(toTag); + // Note: this is a temporary measure until we can figure out a faster way to fetch only what's needed + execSync('git fetch --all --tags'); console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index ba7ddfb49054..233662be47d5 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -183,8 +183,10 @@ function fetchTagIfNeeded(tag) { * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromTag, toTag) { - fetchTagIfNeeded(fromTag); - fetchTagIfNeeded(toTag); + // fetchTagIfNeeded(fromTag); + // fetchTagIfNeeded(toTag); + // Note: this is a temporary measure until we can figure out a faster way to fetch only what's needed + execSync('git fetch --all --tags'); console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index e7b062dd5df6..13f45ac290d2 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -35,8 +35,10 @@ function fetchTagIfNeeded(tag) { * @returns {Promise>>} */ function getCommitHistoryAsJSON(fromTag, toTag) { - fetchTagIfNeeded(fromTag); - fetchTagIfNeeded(toTag); + // fetchTagIfNeeded(fromTag); + // fetchTagIfNeeded(toTag); + // Note: this is a temporary measure until we can figure out a faster way to fetch only what's needed + execSync('git fetch --all --tags'); console.log('Getting pull requests merged between the following tags:', fromTag, toTag); return new Promise((resolve, reject) => { From 23975168390625785f9949adf4eb6e8ed264163f Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 10:45:08 -0700 Subject: [PATCH 510/826] Suppress lint failure --- .github/actions/javascript/createOrUpdateStagingDeploy/index.js | 1 + .github/actions/javascript/getDeployPullRequestList/index.js | 1 + .github/libs/GitUtils.js | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js index 9ded6880be82..5fcd41200f47 100644 --- a/.github/actions/javascript/createOrUpdateStagingDeploy/index.js +++ b/.github/actions/javascript/createOrUpdateStagingDeploy/index.js @@ -220,6 +220,7 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); /** * @param {String} tag */ +// eslint-disable-next-line no-unused-vars function fetchTagIfNeeded(tag) { try { console.log(`Checking if tag ${tag} exists locally`); diff --git a/.github/actions/javascript/getDeployPullRequestList/index.js b/.github/actions/javascript/getDeployPullRequestList/index.js index 233662be47d5..2d3b51f58f2e 100644 --- a/.github/actions/javascript/getDeployPullRequestList/index.js +++ b/.github/actions/javascript/getDeployPullRequestList/index.js @@ -154,6 +154,7 @@ const sanitizeStringForJSONParse = __nccwpck_require__(9338); /** * @param {String} tag */ +// eslint-disable-next-line no-unused-vars function fetchTagIfNeeded(tag) { try { console.log(`Checking if tag ${tag} exists locally`); diff --git a/.github/libs/GitUtils.js b/.github/libs/GitUtils.js index 13f45ac290d2..af76465e5b1e 100644 --- a/.github/libs/GitUtils.js +++ b/.github/libs/GitUtils.js @@ -6,6 +6,7 @@ const sanitizeStringForJSONParse = require('./sanitizeStringForJSONParse'); /** * @param {String} tag */ +// eslint-disable-next-line no-unused-vars function fetchTagIfNeeded(tag) { try { console.log(`Checking if tag ${tag} exists locally`); From 01dcb62a850ae2647c79867ea7c0d27935413b2e Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 26 Jun 2023 19:47:10 +0200 Subject: [PATCH 511/826] update patch for KeyboardAvoidingView --- patches/react-native+0.71.2-alpha.3.patch | 84 +++++++++++++++++++++-- 1 file changed, 78 insertions(+), 6 deletions(-) diff --git a/patches/react-native+0.71.2-alpha.3.patch b/patches/react-native+0.71.2-alpha.3.patch index 90112ee8f023..92076b1be28c 100644 --- a/patches/react-native+0.71.2-alpha.3.patch +++ b/patches/react-native+0.71.2-alpha.3.patch @@ -1,15 +1,87 @@ diff --git a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js -index 2f48f9e..f59beee 100644 +index 2f48f9e..6418c76 100644 --- a/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js +++ b/node_modules/react-native/Libraries/Components/Keyboard/KeyboardAvoidingView.js -@@ -128,6 +128,10 @@ class KeyboardAvoidingView extends React.Component { +@@ -65,6 +65,7 @@ class KeyboardAvoidingView extends React.Component { + _subscriptions: Array = []; + viewRef: {current: React.ElementRef | null, ...}; + _initialFrameHeight: number = 0; ++ _bottom: number = 0; + + constructor(props: Props) { + super(props); +@@ -107,18 +108,20 @@ class KeyboardAvoidingView extends React.Component { + + _onKeyboardChange = (event: ?KeyboardEvent) => { + this._keyboardEvent = event; ++ // $FlowFixMe[unused-promise] + this._updateBottomIfNecessary(); }; - _updateBottomIfNecessary = async () => { -+ if (!this.props.enabled) { -+ return; + _onLayout = async (event: ViewLayoutEvent) => { +- const wasFrameNull = this._frame == null; ++ const oldFrame = this._frame; + this._frame = event.nativeEvent.layout; + if (!this._initialFrameHeight) { + // save the initial frame height, before the keyboard is visible + this._initialFrameHeight = this._frame.height; + } + +- if (wasFrameNull) { ++ // update bottom height for the first time or when the height is changed ++ if (!oldFrame || oldFrame.height !== this._frame.height) { + await this._updateBottomIfNecessary(); + } + +@@ -127,20 +130,31 @@ class KeyboardAvoidingView extends React.Component { + } + }; + ++ // Avoid unnecessary renders if the KeyboardAvoidingView is disabled. ++ _setBottom = (value: number) => { ++ const {enabled = true} = this.props; ++ this._bottom = value; ++ if (enabled) { ++ this.setState({bottom: value}); + } ++ }; + + _updateBottomIfNecessary = async () => { if (this._keyboardEvent == null) { - this.setState({bottom: 0}); +- this.setState({bottom: 0}); ++ this._setBottom(0); return; + } + + const {duration, easing, endCoordinates} = this._keyboardEvent; + const height = await this._relativeKeyboardHeight(endCoordinates); + +- if (this.state.bottom === height) { ++ if (this._bottom === height) { + return; + } + +- if (duration && easing) { ++ this._setBottom(height); ++ ++ if (enabled && duration && easing) { + LayoutAnimation.configureNext({ + // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m + duration: duration > 10 ? duration : 10, +@@ -150,9 +164,15 @@ class KeyboardAvoidingView extends React.Component { + }, + }); + } +- this.setState({bottom: height}); + }; + ++ componentDidUpdate(_: Props, prevState: State): void { ++ const {enabled = true} = this.props; ++ if (enabled && this._bottom !== prevState.bottom) { ++ this.setState({bottom: this._bottom}); ++ } ++ } ++ + componentDidMount(): void { + if (Platform.OS === 'ios') { + this._subscriptions = [ From 0544a0ef129d930c063a404994f89aa294d9d27f Mon Sep 17 00:00:00 2001 From: Andrew Li Date: Mon, 26 Jun 2023 14:03:02 -0400 Subject: [PATCH 512/826] Only include reportCreationData if nonempty to prevent WAF violation --- src/libs/actions/Policy.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 0bd6b45172d9..bb76ad0742c2 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -400,18 +400,17 @@ function addMembersToWorkspace(invitedEmailsToAccountIDs, welcomeNote, policyID, ]; const logins = _.map(_.keys(invitedEmailsToAccountIDs), (memberLogin) => OptionsListUtils.addSMSDomainIfPhoneNumber(memberLogin)); - API.write( - 'AddMembersToWorkspace', - { - employees: JSON.stringify(_.map(logins, (login) => ({email: login}))), + const params = { + employees: JSON.stringify(_.map(logins, (login) => ({email: login}))), - // Escape HTML special chars to enable them to appear in the invite email - welcomeNote: _.escape(welcomeNote), - policyID, - reportCreationData: JSON.stringify(membersChats.reportCreationData), - }, - {optimisticData, successData, failureData}, - ); + // Escape HTML special chars to enable them to appear in the invite email + welcomeNote: _.escape(welcomeNote), + policyID, + }; + if (!_.isEmpty(membersChats.reportCreationData)) { + params.reportCreationData = JSON.stringify(membersChats.reportCreationData); + } + API.write('AddMembersToWorkspace', params, {optimisticData, successData, failureData}); } /** From 151aa88d5a24ee5b816425368036a34e5f59e7dd Mon Sep 17 00:00:00 2001 From: Nikki Wines Date: Mon, 26 Jun 2023 11:04:31 -0700 Subject: [PATCH 513/826] display error beneath magic code input field for 2FA and magic code flows --- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index edb8a9ac533c..abee3ce0f25b 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -239,6 +239,7 @@ function BaseValidateCodeForm(props) { hasError={hasError} autoFocus /> + {hasError && } ) : ( From 6395e38c0412a36bb96e19f73f4d8c41b5ac9150 Mon Sep 17 00:00:00 2001 From: Adam Grzybowski Date: Mon, 26 Jun 2023 20:07:09 +0200 Subject: [PATCH 514/826] fix prettier diff --- src/pages/home/ReportScreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 57f33f57cb5a..b97c14b5106f 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -257,7 +257,7 @@ class ReportScreen extends React.Component { reactionListRef: this.reactionListRef, }} > - From 2cc2fc52cc13ef055f8a14332ef575f3cbcd4601 Mon Sep 17 00:00:00 2001 From: Andrew Gable Date: Mon, 26 Jun 2023 12:28:54 -0600 Subject: [PATCH 515/826] Remove `CP Staging` label functionality --- .github/workflows/preDeploy.yml | 43 +------------------------------ .github/workflows/warnCPLabel.yml | 25 ------------------ 2 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 .github/workflows/warnCPLabel.yml diff --git a/.github/workflows/preDeploy.yml b/.github/workflows/preDeploy.yml index 086c2438b980..a806be1af7aa 100644 --- a/.github/workflows/preDeploy.yml +++ b/.github/workflows/preDeploy.yml @@ -31,7 +31,6 @@ jobs: outputs: MERGED_PR: ${{ steps.getMergedPullRequest.outputs.number }} SHOULD_DEPLOY: ${{ steps.shouldDeploy.outputs.SHOULD_DEPLOY }} - SHOULD_CP: ${{ steps.isStagingDeployLocked.outputs.IS_LOCKED && steps.hasCherryPickLabel.outputs.HAS_CP_LABEL }} steps: - name: Get merged pull request @@ -46,13 +45,9 @@ jobs: with: GITHUB_TOKEN: ${{ github.token }} - - name: Check if merged pull request has `CP Staging` label - id: hasCherryPickLabel - run: echo "HAS_CP_LABEL=${{ contains(steps.getMergedPullRequest.outputs.labels, 'CP Staging') }}" >> "$GITHUB_OUTPUT" - - name: Check if merged pull request should trigger a deploy id: shouldDeploy - run: echo "SHOULD_DEPLOY=${{ fromJSON(steps.hasCherryPickLabel.outputs.HAS_CP_LABEL) || (!fromJSON(steps.isStagingDeployLocked.outputs.IS_LOCKED) && github.actor != 'OSBotify') }}" >> "$GITHUB_OUTPUT" + run: echo "SHOULD_DEPLOY=${{ (!fromJSON(steps.isStagingDeployLocked.outputs.IS_LOCKED) && github.actor != 'OSBotify') }}" >> "$GITHUB_OUTPUT" skipDeploy: runs-on: ubuntu-latest @@ -94,7 +89,6 @@ jobs: GPG_PASSPHRASE: ${{ secrets.LARGE_SECRET_PASSPHRASE }} - name: Update staging branch from main - if: ${{ !fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} run: | # Re-create the staging branch from main git switch -c staging @@ -102,14 +96,6 @@ jobs: # Force-update the remote staging branch git push --force origin staging - - name: Cherry-pick PR to staging - if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} - uses: Expensify/App/.github/actions/javascript/triggerWorkflowAndWait@main - with: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - WORKFLOW: cherryPick.yml - INPUTS: '{ "PULL_REQUEST_NUMBER": "${{ needs.chooseDeployActions.outputs.MERGED_PR }}", "NEW_VERSION": "${{ needs.createNewVersion.outputs.NEW_VERSION }}" }' - # Create a local git tag on staging so that GitUtils.getPullRequestsMergedBetween can use `git log` to generate a # list of pull requests that were merged between this version tag and another. # NOTE: This tag is only used locally and shouldn't be pushed to the remote. @@ -129,33 +115,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - name: Comment in StagingDeployCash to alert Applause that a new pull request has been cherry-picked - if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} - run: | - PR_URL="https://github.com/Expensify/App/pull/${{ needs.chooseDeployActions.outputs.MERGED_PR }}" - printf -v COMMENT ":clap: Heads up @Expensify/applauseleads :clap:\nA [new pull request](%s) has been :cherries: cherry-picked :cherries: to staging, and will be deployed to staging in version \`%s\` :rocket:" "$PR_URL" ${{ needs.createNewVersion.outputs.NEW_VERSION }} - gh issue comment \ - ${{ steps.getStagingDeployCash.outputs.STAGING_DEPLOY_CASH }} \ - --body "$COMMENT" - env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - - name: Wait for staging deploys to finish - if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} - uses: Expensify/App/.github/actions/javascript/awaitStagingDeploys@main - with: - GITHUB_TOKEN: ${{ github.token }} - TAG: ${{ needs.createNewVersion.outputs.NEW_VERSION }} - - - name: Comment in StagingDeployCash to alert Applause that cherry-picked pull request has been deployed. - if: ${{ fromJSON(needs.chooseDeployActions.outputs.SHOULD_CP) }} - run: | - gh issue comment \ - ${{ steps.getStagingDeployCash.outputs.STAGING_DEPLOY_CASH }} \ - --body ":tada: All set?…You bet! @Expensify/applauseleads https://github.com/Expensify/App/releases/tag/${{ needs.createNewVersion.outputs.NEW_VERSION }} has been deployed to staging :tada:" - env: - GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }} - - if: ${{ failure() }} uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main with: diff --git a/.github/workflows/warnCPLabel.yml b/.github/workflows/warnCPLabel.yml deleted file mode 100644 index c488bb1836d6..000000000000 --- a/.github/workflows/warnCPLabel.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Explain Cherry-Pick label via OSBotify comment - -on: - pull_request_target: - types: - - labeled - -jobs: - warnCPLabel: - runs-on: ubuntu-latest - if: ${{ github.event.label.name == 'CP Staging' }} - - steps: - - name: Comment on PR to explain the CP Staging label - uses: actions-ecosystem/action-create-comment@cd098164398331c50e7dfdd0dfa1b564a1873fac - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - body: | - :warning: :warning: **Heads up! This pull request has the `CP Staging` label** :warning: :warning: - If you applied the `CP Staging` label before the PR was merged, the PR will be be immediately deployed to staging even if the [open `StagingDeployCash` deploy checklist](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3AStagingDeployCash) is locked. - However if you applied the `CP Staging` after the PR was merged it's possible it won't be CP'ed automatically. If you need it to be CP'ed to staging, tag a member of @Expensify/mobile-deployers to CP it manually, otherwise you can wait for it to go out with the next deploy. - - if: ${{ failure() }} - uses: Expensify/App/.github/actions/composite/announceFailedWorkflowInSlack@main - with: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} From 5f33be8cb21392686d3126056c03a7caa524cc3a Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 11:38:36 -0700 Subject: [PATCH 516/826] Fix Reanimated error --- src/libs/Navigation/NavigationRoot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/Navigation/NavigationRoot.js b/src/libs/Navigation/NavigationRoot.js index 83ea56775760..0ede46da4603 100644 --- a/src/libs/Navigation/NavigationRoot.js +++ b/src/libs/Navigation/NavigationRoot.js @@ -61,11 +61,12 @@ function NavigationRoot(props) { const statusBarBackgroundColor = useRef(themeColors.appBG); const statusBarAnimation = useSharedValue(0); + const updateStatusBarBackgroundColor = (color) => StatusBar.setBackgroundColor(color); useAnimatedReaction( () => statusBarAnimation.value, () => { const color = interpolateColor(statusBarAnimation.value, [0, 1], [prevStatusBarBackgroundColor.current, statusBarBackgroundColor.current]); - runOnJS(StatusBar.setBackgroundColor)(color); + runOnJS(updateStatusBarBackgroundColor)(color); }, ); From cddb10343f07497d301c4e9ae2b27d976b3652f5 Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 12:51:45 -0700 Subject: [PATCH 517/826] Read config values from Appfile --- fastlane/Fastfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 994a6d7d9bfd..aba3430d9f72 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -245,14 +245,15 @@ platform :ios do lane :production do # Login to Spaceship fastlane_require 'spaceship' - teamID = "368M544MTT" + teamID = CredentialsManager::AppfileConfig.try_fetch_value(:team_id) Spaceship::ConnectAPI.login( use_portal: false, tunes_team_id: teamID, ) # Find our app - app = Spaceship::ConnectAPI::App.find("com.chat.expensify.chat") + bundleID = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) + app = Spaceship::ConnectAPI::App.find(bundleID) if app.nil? UI.important "not found in team #{teamID} on ASC!" next From 1e4e4f2a75ca093b1df241d7968134b8faec231c Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 13:02:06 -0700 Subject: [PATCH 518/826] Don't index storybook docs --- .storybook/manager-head.html | 1 + 1 file changed, 1 insertion(+) diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html index d9e41443cbb2..edeb868c298f 100644 --- a/.storybook/manager-head.html +++ b/.storybook/manager-head.html @@ -1,3 +1,4 @@ + From 67561d81bd95681e47dab14261349eb6eaad384d Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 26 Jun 2023 20:29:15 +0000 Subject: [PATCH 519/826] Update version to 1.3.33-0 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 4 ++-- ios/NewExpensifyTests/Info.plist | 4 ++-- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index b006a83f9d73..98504ed95397 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033205 - versionName "1.3.32-5" + versionCode 1001033300 + versionName "1.3.33-0" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 4733cfdf7ffe..ec7c288e4af8 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.3.32 + 1.3.33 CFBundleSignature ???? CFBundleURLTypes @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.32.5 + 1.3.33.0 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index a8bcda464a28..19778f2b817a 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -15,10 +15,10 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.3.32 + 1.3.33 CFBundleSignature ???? CFBundleVersion - 1.3.32.5 + 1.3.33.0 diff --git a/package-lock.json b/package-lock.json index 07f2d4edb643..e11b8257f5d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.32-5", + "version": "1.3.33-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.32-5", + "version": "1.3.33-0", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1869faedeb98..1ecf76244bff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.32-5", + "version": "1.3.33-0", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 9f238db303887fa076a8c5a350236e70978255e5 Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 13:42:33 -0700 Subject: [PATCH 520/826] Only add noindex on staging --- .storybook/main.js | 4 ++++ .storybook/manager-head.html | 1 - .storybook/webpack.config.js | 18 +++++++++++++++--- package.json | 3 ++- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 0f9081d055c8..7d063fd6ffe1 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -5,4 +5,8 @@ module.exports = { core: { builder: 'webpack5', }, + managerHead: (head) => ` + ${head} + ${process.env.ENV === 'staging' ? '' : ''} + `, }; diff --git a/.storybook/manager-head.html b/.storybook/manager-head.html index edeb868c298f..d9e41443cbb2 100644 --- a/.storybook/manager-head.html +++ b/.storybook/manager-head.html @@ -1,4 +1,3 @@ - diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js index 189851366792..6c39661c76f9 100644 --- a/.storybook/webpack.config.js +++ b/.storybook/webpack.config.js @@ -3,12 +3,24 @@ const path = require('path'); const dotenv = require('dotenv'); const _ = require('underscore'); + +let envFile; +switch (process.env.ENV) { + case 'production': + envFile = '.env.production'; + break; + case 'staging': + envFile = '.env.staging'; + break; + default: + envFile = '.env'; +} + +const env = dotenv.config({path: path.resolve(__dirname, `../${envFile}`)}); const custom = require('../config/webpack/webpack.common')({ - envFile: '.env.production', + envFile, }); -const env = dotenv.config({path: path.resolve(__dirname, '../.env.staging')}).parsed; - module.exports = ({config}) => { config.resolve.alias = { 'react-native-config': 'react-web-config', diff --git a/package.json b/package.json index 1869faedeb98..9269012c5b9e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ "prettier-watch": "onchange \"**/*.js\" -- prettier --write --ignore-unknown {{changed}}", "print-version": "echo $npm_package_version", "storybook": "start-storybook -p 6006", - "storybook-build": "build-storybook -o dist/docs", + "storybook-build": "ENV=production build-storybook -o dist/docs", + "storybook-build-staging": "ENV=staging build-storybook -o dist/docs", "gh-actions-build": "./.github/scripts/buildActions.sh", "gh-actions-validate": "./.github/scripts/validateActionsAndWorkflows.sh", "analyze-packages": "ANALYZE_BUNDLE=true webpack --config config/webpack/webpack.common.js --env envFile=.env.production", From a10aedf63b64df986a3ea826a9b41d545ce6e439 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Mon, 26 Jun 2023 23:59:45 +0300 Subject: [PATCH 521/826] Remove resend validate code from expired code page --- .../ValidateCode/ExpiredValidateCodeModal.js | 57 +------------------ src/languages/en.js | 2 - src/languages/es.js | 2 - 3 files changed, 1 insertion(+), 60 deletions(-) diff --git a/src/components/ValidateCode/ExpiredValidateCodeModal.js b/src/components/ValidateCode/ExpiredValidateCodeModal.js index 57d6f2cf2b98..8d31b7a936fc 100644 --- a/src/components/ValidateCode/ExpiredValidateCodeModal.js +++ b/src/components/ValidateCode/ExpiredValidateCodeModal.js @@ -2,7 +2,6 @@ import React, {PureComponent} from 'react'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import _, {compose} from 'underscore'; -import lodashGet from 'lodash/get'; import {View} from 'react-native'; import colors from '../../styles/colors'; import styles from '../../styles/styles'; @@ -12,10 +11,7 @@ import Text from '../Text'; import * as Expensicons from '../Icon/Expensicons'; import * as Illustrations from '../Icon/Illustrations'; import variables from '../../styles/variables'; -import TextLink from '../TextLink'; import ONYXKEYS from '../../ONYXKEYS'; -import * as ErrorUtils from '../../libs/ErrorUtils'; -import * as Session from '../../libs/actions/Session'; const propTypes = { /** The details about the account that the user is signing in with */ @@ -27,42 +23,15 @@ const propTypes = { message: PropTypes.string, }), - /** The credentials of the logged in person */ - credentials: PropTypes.shape({ - /** The email the user logged in with */ - login: PropTypes.string, - }), - ...withLocalizePropTypes, }; const defaultProps = { account: {}, - credentials: {}, }; class ExpiredValidateCodeModal extends PureComponent { - constructor(props) { - super(props); - - this.requestNewCode = this.requestNewCode.bind(this); - } - - shouldShowRequestCodeLink() { - return Boolean(lodashGet(this.props, 'credentials.login', null)); - } - - requestNewCode() { - Session.resendValidateCode(); - } - render() { - const codeRequestedMessage = lodashGet(this.props, 'account.message', null); - const accountErrors = lodashGet(this.props, 'account.errors', {}); - let codeRequestedErrors; - if (_.keys(accountErrors).length > 1) { - codeRequestedErrors = ErrorUtils.getLatestErrorMessage(this.props.account); - } return ( @@ -75,30 +44,7 @@ class ExpiredValidateCodeModal extends PureComponent { {this.props.translate('validateCodeModal.expiredCodeTitle')} - - {this.props.translate('validateCodeModal.expiredCodeDescription')} - {this.shouldShowRequestCodeLink() && !codeRequestedMessage && ( - <> -
- {this.props.translate('validateCodeModal.requestNewCode')}{' '} - {this.props.translate('validateCodeModal.requestNewCodeLink')}! - - )} -
- {this.shouldShowRequestCodeLink() && Boolean(codeRequestedErrors) && ( - -
-
- {codeRequestedErrors} -
- )} - {this.shouldShowRequestCodeLink() && Boolean(codeRequestedMessage) && ( - -
-
- {this.props.translate(codeRequestedMessage)} -
- )} + {this.props.translate('validateCodeModal.expiredCodeDescription')}
@@ -120,6 +66,5 @@ export default compose( withLocalize, withOnyx({ account: {key: ONYXKEYS.ACCOUNT}, - credentials: {key: ONYXKEYS.CREDENTIALS}, }), )(ExpiredValidateCodeModal); diff --git a/src/languages/en.js b/src/languages/en.js index 17653692828e..7ba9ef0475c9 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -195,8 +195,6 @@ export default { signInHere: 'just sign in here', expiredCodeTitle: 'Magic code expired', expiredCodeDescription: 'Go back to the original device and request a new code.', - requestNewCode: 'You can also', - requestNewCodeLink: 'request a new code here', successfulNewCodeRequest: 'Code requested. Please check your device.', tfaRequiredTitle: 'Two-factor authentication\nrequired', tfaRequiredDescription: 'Please enter the two-factor authentication code\nwhere you are trying to sign in.', diff --git a/src/languages/es.js b/src/languages/es.js index 2a8af5628045..a027cd0a1c6d 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -194,8 +194,6 @@ export default { signInHere: 'simplemente inicia sesión aquí', expiredCodeTitle: 'Código mágico caducado', expiredCodeDescription: 'Vuelve al dispositivo original y solicita un código nuevo.', - requestNewCode: '¡También puedes', - requestNewCodeLink: 'solicitar un nuevo código aquí', successfulNewCodeRequest: 'Código solicitado. Por favor, comprueba tu dispositivo.', tfaRequiredTitle: 'Se requiere autenticación\nde dos factores', tfaRequiredDescription: 'Por favor, introduce el código de autenticación de dos factores\ndonde estás intentando iniciar sesión.', From d01f36e77022f2fb7c281413039b20e30f8d317a Mon Sep 17 00:00:00 2001 From: rory Date: Mon, 26 Jun 2023 14:03:47 -0700 Subject: [PATCH 522/826] Add storybook staging build to platformDeploy.yml --- .github/workflows/platformDeploy.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index cc6653aa9aa0..8f8f80134e38 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -261,10 +261,16 @@ jobs: if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} run: npm run build-staging - - name: Build docs + - name: Build storybook docs for production + if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} run: npm run storybook-build continue-on-error: true + - name: Build storybook docs for staging + if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} + run: npm run storybook-build-staging + continue-on-error: true + - name: Deploy production to S3 if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} run: aws s3 cp --recursive --acl public-read "$GITHUB_WORKSPACE"/dist s3://expensify-cash/ && aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE s3://expensify-cash/.well-known/apple-app-site-association s3://expensify-cash/.well-known/apple-app-site-association && aws s3 cp --acl public-read --content-type 'application/json' --metadata-directive REPLACE s3://expensify-cash/.well-known/apple-app-site-association s3://expensify-cash/apple-app-site-association From 8a6a8ce577f917d9ef69dbe1758a46045a059f32 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 27 Jun 2023 00:07:47 +0300 Subject: [PATCH 523/826] Remove unnecessary account prop. --- .../ValidateCode/ExpiredValidateCodeModal.js | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/components/ValidateCode/ExpiredValidateCodeModal.js b/src/components/ValidateCode/ExpiredValidateCodeModal.js index 8d31b7a936fc..d0e7199749fd 100644 --- a/src/components/ValidateCode/ExpiredValidateCodeModal.js +++ b/src/components/ValidateCode/ExpiredValidateCodeModal.js @@ -1,7 +1,4 @@ import React, {PureComponent} from 'react'; -import {withOnyx} from 'react-native-onyx'; -import PropTypes from 'prop-types'; -import _, {compose} from 'underscore'; import {View} from 'react-native'; import colors from '../../styles/colors'; import styles from '../../styles/styles'; @@ -11,25 +8,12 @@ import Text from '../Text'; import * as Expensicons from '../Icon/Expensicons'; import * as Illustrations from '../Icon/Illustrations'; import variables from '../../styles/variables'; -import ONYXKEYS from '../../ONYXKEYS'; const propTypes = { - /** The details about the account that the user is signing in with */ - account: PropTypes.shape({ - /** An error message to display to the user */ - errors: PropTypes.objectOf(PropTypes.string), - - /** The message to be displayed when code requested */ - message: PropTypes.string, - }), ...withLocalizePropTypes, }; -const defaultProps = { - account: {}, -}; - class ExpiredValidateCodeModal extends PureComponent { render() { return ( @@ -61,10 +45,4 @@ class ExpiredValidateCodeModal extends PureComponent { } ExpiredValidateCodeModal.propTypes = propTypes; -ExpiredValidateCodeModal.defaultProps = defaultProps; -export default compose( - withLocalize, - withOnyx({ - account: {key: ONYXKEYS.ACCOUNT}, - }), -)(ExpiredValidateCodeModal); +export default withLocalize(ExpiredValidateCodeModal); From fbe83882cd340ad640b23df7db982cbb094d10b8 Mon Sep 17 00:00:00 2001 From: Cristi Paval Date: Tue, 27 Jun 2023 00:09:41 +0300 Subject: [PATCH 524/826] Make expired validate code a function component. --- .../ValidateCode/ExpiredValidateCodeModal.js | 49 +++++++++---------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/src/components/ValidateCode/ExpiredValidateCodeModal.js b/src/components/ValidateCode/ExpiredValidateCodeModal.js index d0e7199749fd..6c246f8ae5a5 100644 --- a/src/components/ValidateCode/ExpiredValidateCodeModal.js +++ b/src/components/ValidateCode/ExpiredValidateCodeModal.js @@ -1,4 +1,4 @@ -import React, {PureComponent} from 'react'; +import React from 'react'; import {View} from 'react-native'; import colors from '../../styles/colors'; import styles from '../../styles/styles'; @@ -10,38 +10,35 @@ import * as Illustrations from '../Icon/Illustrations'; import variables from '../../styles/variables'; const propTypes = { - ...withLocalizePropTypes, }; -class ExpiredValidateCodeModal extends PureComponent { - render() { - return ( - - - - - - {this.props.translate('validateCodeModal.expiredCodeTitle')} - - {this.props.translate('validateCodeModal.expiredCodeDescription')} - - - +function ExpiredValidateCodeModal(props) { + return ( + + + + {props.translate('validateCodeModal.expiredCodeTitle')} + + {props.translate('validateCodeModal.expiredCodeDescription')} + + + + - ); - } + + ); } ExpiredValidateCodeModal.propTypes = propTypes; From eab31759d2704fd3469b24e459954d32bac10256 Mon Sep 17 00:00:00 2001 From: Srikar Parsi Date: Mon, 26 Jun 2023 17:18:09 -0400 Subject: [PATCH 525/826] Fix onfido version package-lock --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index e11b8257f5d2..67059fa920fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ "metro-config": "^0.71.3", "moment": "^2.29.4", "moment-timezone": "^0.5.31", - "onfido-sdk-ui": "^12.4.0", + "onfido-sdk-ui": "12.4.0", "process": "^0.11.10", "prop-types": "^15.7.2", "pusher-js": "7.4.0", From d76b1addefaf57c4299a74d8f6350e2602ad5a80 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 26 Jun 2023 22:02:08 +0000 Subject: [PATCH 526/826] Update version to 1.3.33-1 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 98504ed95397..f3db0414c188 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033300 - versionName "1.3.33-0" + versionCode 1001033301 + versionName "1.3.33-1" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index ec7c288e4af8..59803868352e 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.33.0 + 1.3.33.1 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 19778f2b817a..51a3e72ae1ed 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.33.0 + 1.3.33.1 diff --git a/package-lock.json b/package-lock.json index 67059fa920fe..1af94212d3a2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.33-0", + "version": "1.3.33-1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.33-0", + "version": "1.3.33-1", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 1ecf76244bff..222b42965833 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.33-0", + "version": "1.3.33-1", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 1a2072fd6d1d4da13d110fb4d63da00097022a91 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 26 Jun 2023 22:14:37 +0000 Subject: [PATCH 527/826] Update version to 1.3.33-2 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index f3db0414c188..5b7025770d27 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033301 - versionName "1.3.33-1" + versionCode 1001033302 + versionName "1.3.33-2" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 59803868352e..2d1be6abca61 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.33.1 + 1.3.33.2 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 51a3e72ae1ed..126642826e16 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.33.1 + 1.3.33.2 diff --git a/package-lock.json b/package-lock.json index 1af94212d3a2..c20b0d7d577e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.33-1", + "version": "1.3.33-2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.33-1", + "version": "1.3.33-2", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 222b42965833..e4dd607f01cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.33-1", + "version": "1.3.33-2", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 1bb52878c275035319c2124046dee43b80801ad5 Mon Sep 17 00:00:00 2001 From: OSBotify Date: Mon, 26 Jun 2023 22:29:45 +0000 Subject: [PATCH 528/826] Update version to 1.3.33-3 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 5b7025770d27..4043f87acc92 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033302 - versionName "1.3.33-2" + versionCode 1001033303 + versionName "1.3.33-3" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 2d1be6abca61..81e2307b7e7e 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.33.2 + 1.3.33.3 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index 126642826e16..a5f71c944db6 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.33.2 + 1.3.33.3 diff --git a/package-lock.json b/package-lock.json index c20b0d7d577e..efa508556007 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.33-2", + "version": "1.3.33-3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.33-2", + "version": "1.3.33-3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e4dd607f01cb..bb04c661bd35 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.33-2", + "version": "1.3.33-3", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 331cc43bed4182ce2ee5ba85f4f63941b3c977fe Mon Sep 17 00:00:00 2001 From: VH Date: Tue, 27 Jun 2023 05:33:09 +0700 Subject: [PATCH 529/826] Rename method to avoid confusing --- src/components/ReportActionItem/ReportPreview.js | 2 +- src/libs/OptionsListUtils.js | 2 +- src/libs/ReportUtils.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/ReportActionItem/ReportPreview.js b/src/components/ReportActionItem/ReportPreview.js index 99ba312281a5..8321fcde825a 100644 --- a/src/components/ReportActionItem/ReportPreview.js +++ b/src/components/ReportActionItem/ReportPreview.js @@ -96,7 +96,7 @@ function ReportPreview(props) { const managerEmail = props.iouReport.managerEmail || ''; const isCurrentUserManager = managerEmail === lodashGet(props.session, 'email', null); const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport); - const displayingMessage = ReportUtils.getMoneyRequestReportActionMessage(props.iouReport, props.action); + const displayingMessage = ReportUtils.getReportPreviewMessage(props.iouReport, props.action); return ( Date: Tue, 27 Jun 2023 06:01:00 +0700 Subject: [PATCH 530/826] Ensure ValidateCodeModal still show when user logged in if autoAuthState is not started --- src/pages/ValidateLoginPage/index.website.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ValidateLoginPage/index.website.js b/src/pages/ValidateLoginPage/index.website.js index 26bfdf902a22..cdb7e2ad064f 100644 --- a/src/pages/ValidateLoginPage/index.website.js +++ b/src/pages/ValidateLoginPage/index.website.js @@ -125,7 +125,7 @@ class ValidateLoginPage extends Component { {currentAuthState === CONST.AUTO_AUTH_STATE.FAILED && } {currentAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && is2FARequired && !isSignedIn && } {currentAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && isSignedIn && } - {currentAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && !isSignedIn && ( + {currentAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && ( Date: Mon, 26 Jun 2023 18:26:52 -0500 Subject: [PATCH 531/826] fix(reportutils): Support personalDetails name in getIcon default result --- src/libs/OptionsListUtils.js | 2 +- src/libs/ReportUtils.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index a8edd8636202..54dbca236f31 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -516,7 +516,7 @@ function createOption(accountIDs, personalDetails, report, reportActions = {}, { result.text = reportName; result.searchText = getSearchText(report, reportName, personalDetailList, result.isChatRoom || result.isPolicyExpenseChat, result.isThread); - result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID)); + result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.login), false, personalDetail.login); result.subtitle = subtitle; return result; diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 64a07113cb51..3d257886fddc 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -713,7 +713,7 @@ function getIconsForParticipants(participants, personalDetails) { * @param {Boolean} [isPayer] * @returns {Array<*>} */ -function getIcons(report, personalDetails, defaultIcon = null, isPayer = false) { +function getIcons(report, personalDetails, defaultIcon = null, isPayer = false, defaultName = '') { const result = { source: '', type: CONST.ICON_TYPE_AVATAR, @@ -722,6 +722,7 @@ function getIcons(report, personalDetails, defaultIcon = null, isPayer = false) if (_.isEmpty(report)) { result.source = defaultIcon || Expensicons.FallbackAvatar; + result.name = defaultName || ''; return [result]; } if (isArchivedRoom(report)) { From 21bf80dedd544577d6c022176ef7ca7876ad0eff Mon Sep 17 00:00:00 2001 From: Davi Rodrigues Date: Mon, 26 Jun 2023 20:58:38 -0300 Subject: [PATCH 532/826] fix: solve missing avatar workspace logo issue --- src/components/Avatar.js | 16 +++++++++------- src/components/SubscriptAvatar.js | 1 - 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/Avatar.js b/src/components/Avatar.js index 66a1b60c3cef..fa7d17d22535 100644 --- a/src/components/Avatar.js +++ b/src/components/Avatar.js @@ -73,9 +73,9 @@ function Avatar(props) { const isWorkspace = props.type === CONST.ICON_TYPE_WORKSPACE; const iconSize = StyleUtils.getAvatarSize(props.size); - const imageStyle = props.imageStyles ? [StyleUtils.getAvatarStyle(props.size), ...props.imageStyles, StyleUtils.getAvatarBorderRadius(props.size, props.type)] : undefined; + const imageStyle = props.imageStyles && props.imageStyles.length > 0 ? [StyleUtils.getAvatarStyle(props.size), ...props.imageStyles, StyleUtils.getAvatarBorderRadius(props.size, props.type)] : [StyleUtils.getAvatarStyle(props.size), StyleUtils.getAvatarBorderRadius(props.size, props.type)]; - const iconStyle = props.imageStyles ? [StyleUtils.getAvatarStyle(props.size), styles.bgTransparent, ...props.imageStyles] : undefined; + const iconStyle = props.imageStyles && props.imageStyles.length > 0 ? [StyleUtils.getAvatarStyle(props.size), styles.bgTransparent, ...props.imageStyles] : undefined; const iconFillColor = isWorkspace ? StyleUtils.getDefaultWorkspaceAvatarColor(props.name).fill : props.fill; const fallbackAvatar = isWorkspace ? ReportUtils.getDefaultWorkspaceAvatar(props.name) : props.fallbackIcon; @@ -101,11 +101,13 @@ function Avatar(props) { /> ) : ( - setImageError(true)} - /> + + setImageError(true)} + /> + )} ); diff --git a/src/components/SubscriptAvatar.js b/src/components/SubscriptAvatar.js index b94bf4dffd25..454d5204d3a4 100644 --- a/src/components/SubscriptAvatar.js +++ b/src/components/SubscriptAvatar.js @@ -68,7 +68,6 @@ function SubscriptAvatar(props) { Date: Tue, 27 Jun 2023 01:08:13 +0100 Subject: [PATCH 533/826] Remove allBetas access for dev environment --- src/libs/Permissions.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libs/Permissions.js b/src/libs/Permissions.js index d3e407260e20..cce0fc984dab 100644 --- a/src/libs/Permissions.js +++ b/src/libs/Permissions.js @@ -1,5 +1,4 @@ import _ from 'underscore'; -import * as Environment from './Environment/Environment'; import CONST from '../CONST'; /** @@ -8,7 +7,7 @@ import CONST from '../CONST'; * @returns {Boolean} */ function canUseAllBetas(betas) { - return Environment.isDevelopment() || _.contains(betas, CONST.BETAS.ALL); + return _.contains(betas, CONST.BETAS.ALL); } /** @@ -75,7 +74,7 @@ function canUseCommentLinking(betas) { * @returns {Boolean} */ function canUsePolicyRooms(betas) { - return _.contains(betas, CONST.BETAS.POLICY_ROOMS) || _.contains(betas, CONST.BETAS.ALL); + return _.contains(betas, CONST.BETAS.POLICY_ROOMS) || canUseAllBetas(betas); } /** @@ -91,7 +90,7 @@ function canUsePolicyExpenseChat(betas) { * @returns {Boolean} */ function canUsePasswordlessLogins(betas) { - return _.contains(betas, CONST.BETAS.PASSWORDLESS) || _.contains(betas, CONST.BETAS.ALL); + return _.contains(betas, CONST.BETAS.PASSWORDLESS) || canUseAllBetas(betas); } /** @@ -99,7 +98,7 @@ function canUsePasswordlessLogins(betas) { * @returns {Boolean} */ function canUseTasks(betas) { - return _.contains(betas, CONST.BETAS.TASKS) || _.contains(betas, CONST.BETAS.ALL); + return _.contains(betas, CONST.BETAS.TASKS) || canUseAllBetas(betas); } export default { From 864789275e8f7356c493cc5fa9ce25a57416141c Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 26 Jun 2023 17:28:28 -0700 Subject: [PATCH 534/826] Fix bad conflict fix --- src/pages/home/report/ReportActionItemSingle.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index c8cad20d4ae3..d7d466d7b27d 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -88,6 +88,7 @@ function ReportActionItemSingle(props) { const delegateDetails = props.personalDetailsList[props.action.delegateAccountID]; const delegateDisplayName = delegateDetails.displayName; actorHint = `${delegateDisplayName} (${props.translate('reportAction.asCopilot')} ${displayName})`; + displayName = actorHint; avatarSource = UserUtils.getAvatar(delegateDetails.avatar, props.action.delegateAccountID); } From ba14361a7e08851fc6e02096f8b3c8e6cecc76fb Mon Sep 17 00:00:00 2001 From: Yuwen Memon Date: Mon, 26 Jun 2023 17:30:25 -0700 Subject: [PATCH 535/826] Linter --- src/pages/home/report/ReportActionItemSingle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItemSingle.js b/src/pages/home/report/ReportActionItemSingle.js index d7d466d7b27d..54b989a1fc47 100644 --- a/src/pages/home/report/ReportActionItemSingle.js +++ b/src/pages/home/report/ReportActionItemSingle.js @@ -110,7 +110,7 @@ function ReportActionItemSingle(props) { } else { showUserDetails(props.action.delegateAccountID ? props.action.delegateAccountID : actorAccountID); } - }, [isWorkspaceActor, props.report.reportID, actorAccountID]); + }, [isWorkspaceActor, props.report.reportID, actorAccountID, props.action.delegateAccountID]); return ( From 6a5fffc0c1fb3b1d12d19dfa9e684d4b568f857f Mon Sep 17 00:00:00 2001 From: Fedi Rajhi Date: Tue, 27 Jun 2023 02:22:19 +0100 Subject: [PATCH 536/826] Fix Test , add All betas access --- tests/unit/OptionsListUtilsTest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/OptionsListUtilsTest.js b/tests/unit/OptionsListUtilsTest.js index 75c7927888eb..f12c367b0038 100644 --- a/tests/unit/OptionsListUtilsTest.js +++ b/tests/unit/OptionsListUtilsTest.js @@ -296,7 +296,7 @@ describe('OptionsListUtils', () => { it('getSearchOptions()', () => { // When we filter in the Search view without providing a searchValue - let results = OptionsListUtils.getSearchOptions(REPORTS, PERSONAL_DETAILS, ''); + let results = OptionsListUtils.getSearchOptions(REPORTS, PERSONAL_DETAILS, '', [CONST.BETAS.ALL]); // Then the 2 personalDetails that don't have reports should be returned expect(results.personalDetails.length).toBe(2); From 812bbc554b49a27c54e2b6c214812a4a626bde9e Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 27 Jun 2023 02:43:00 +0100 Subject: [PATCH 537/826] focusAndUpdateMultilineInputRange refactor, add comments to provide context --- src/libs/actions/Task.js | 20 ---------------- src/libs/focusAndUpdateMultilineInputRange.js | 24 +++++++++++++++++++ src/pages/tasks/NewTaskDescriptionPage.js | 3 ++- src/pages/tasks/TaskDescriptionPage.js | 3 ++- 4 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 src/libs/focusAndUpdateMultilineInputRange.js diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 37d37e69e5eb..5e27d7db764d 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -672,25 +672,6 @@ function isTaskAssigneeOrTaskOwner(taskReport, sessionAccountID) { return sessionAccountID === getTaskOwnerAccountID(taskReport) || sessionAccountID === getTaskAssigneeAccountID(taskReport); } -/** - * Focus the task description text input and place the cursor at the end of the value (if there is a value in the input). - * - * @param {Object} input the input element - */ -function focusAndUpdateTaskDescriptionInputRange(input) { - if (!input) { - return; - } - - input.focus(); - if (input.value && input.setSelectionRange) { - const length = input.value.length; - input.setSelectionRange(length, length); - // eslint-disable-next-line no-param-reassign - input.scrollTop = input.scrollHeight; - } -} - export { createTaskAndNavigate, editTaskAndNavigate, @@ -712,5 +693,4 @@ export { dismissModalAndClearOutTaskInfo, getTaskAssigneeAccountID, isTaskAssigneeOrTaskOwner, - focusAndUpdateTaskDescriptionInputRange, }; diff --git a/src/libs/focusAndUpdateMultilineInputRange.js b/src/libs/focusAndUpdateMultilineInputRange.js new file mode 100644 index 000000000000..b5e438899d3d --- /dev/null +++ b/src/libs/focusAndUpdateMultilineInputRange.js @@ -0,0 +1,24 @@ +/** + * Focus a multiline text input and place the cursor at the end of the value (if there is a value in the input). + * + * When a multiline input contains a text value that goes beyond the scroll height, the cursor will be placed + * at the end of the text value, and automatically scroll the input field to this position after the field gains + * focus. This provides a better user experience in cases where the text in the field has to be edited. The auto- + * scroll behaviour works on all platforms except iOS native. + * See https://github.com/Expensify/App/issues/20836 for more details. + * + * @param {Object} input the input element + */ +export default function focusAndUpdateMultilineInputRange(input) { + if (!input) { + return; + } + + input.focus(); + if (input.value && input.setSelectionRange) { + const length = input.value.length; + input.setSelectionRange(length, length); + // eslint-disable-next-line no-param-reassign + input.scrollTop = input.scrollHeight; + } +} diff --git a/src/pages/tasks/NewTaskDescriptionPage.js b/src/pages/tasks/NewTaskDescriptionPage.js index 771559d8bb53..2931b73e74c0 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.js +++ b/src/pages/tasks/NewTaskDescriptionPage.js @@ -14,6 +14,7 @@ import TextInput from '../../components/TextInput'; import Permissions from '../../libs/Permissions'; import ROUTES from '../../ROUTES'; import * as TaskUtils from '../../libs/actions/Task'; +import focusAndUpdateMultilineInputRange from '../../libs/focusAndUpdateMultilineInputRange'; const propTypes = { /** Beta features list */ @@ -52,7 +53,7 @@ function NewTaskDescriptionPage(props) { return ( TaskUtils.focusAndUpdateTaskDescriptionInputRange(inputRef.current)} + onEntryTransitionEnd={() => focusAndUpdateMultilineInputRange(inputRef.current)} > TaskUtils.focusAndUpdateTaskDescriptionInputRange(inputRef.current)} + onEntryTransitionEnd={() => focusAndUpdateMultilineInputRange(inputRef.current)} >
Date: Tue, 27 Jun 2023 09:11:50 +0700 Subject: [PATCH 538/826] fix: remove assign and make empty avatar header --- src/libs/actions/Task.js | 5 +++++ src/pages/tasks/NewTaskPage.js | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/actions/Task.js b/src/libs/actions/Task.js index 5e27d7db764d..59a84182b803 100644 --- a/src/libs/actions/Task.js +++ b/src/libs/actions/Task.js @@ -648,6 +648,11 @@ function getTaskAssigneeAccountID(taskReport) { const reportAction = ReportActionsUtils.getParentReportAction(taskReport); const childManagerEmail = lodashGet(reportAction, 'childManagerEmail', ''); + + if (!childManagerEmail) { + return null; + } + return PersonalDetailsUtils.getAccountIDsByLogins([childManagerEmail])[0]; } diff --git a/src/pages/tasks/NewTaskPage.js b/src/pages/tasks/NewTaskPage.js index 90d635e43ae9..cd7632576024 100644 --- a/src/pages/tasks/NewTaskPage.js +++ b/src/pages/tasks/NewTaskPage.js @@ -86,11 +86,6 @@ function NewTaskPage(props) { setAssignee(displayDetails); } - // If we don't have an assignee and we are creating a task from a report - // this allows us to auto assign a participant of the report. - if (!props.task.assignee && props.task.parentReportID) { - TaskUtils.setAssigneeValueWithParentReportID(props.task.parentReportID); - } // We only set the parentReportID if we are creating a task from a report // this allows us to go ahead and set that report as the share destination From 2fb23101728fe12316735aa83010587e7a4e76ce Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 27 Jun 2023 10:52:57 +0700 Subject: [PATCH 539/826] submit form when hitting enter in assign task --- src/pages/tasks/NewTaskDescriptionPage.js | 1 + src/pages/tasks/NewTaskDetailsPage.js | 1 + src/pages/tasks/TaskDescriptionPage.js | 1 + 3 files changed, 3 insertions(+) diff --git a/src/pages/tasks/NewTaskDescriptionPage.js b/src/pages/tasks/NewTaskDescriptionPage.js index e18615a34ffe..035e54ba816d 100644 --- a/src/pages/tasks/NewTaskDescriptionPage.js +++ b/src/pages/tasks/NewTaskDescriptionPage.js @@ -90,6 +90,7 @@ function NewTaskDescriptionPage(props) { label={props.translate('newTaskPage.descriptionOptional')} ref={(el) => (inputRef.current = el)} autoGrowHeight + submitOnEnter containerStyles={[styles.autoGrowHeightMultilineInput]} textAlignVertical="top" selection={selection} diff --git a/src/pages/tasks/NewTaskDetailsPage.js b/src/pages/tasks/NewTaskDetailsPage.js index 5b9773270048..80744721ad00 100644 --- a/src/pages/tasks/NewTaskDetailsPage.js +++ b/src/pages/tasks/NewTaskDetailsPage.js @@ -103,6 +103,7 @@ function NewTaskPage(props) { inputID="taskDescription" label={props.translate('newTaskPage.descriptionOptional')} autoGrowHeight + submitOnEnter containerStyles={[styles.autoGrowHeightMultilineInput]} textAlignVertical="top" value={taskDescription} diff --git a/src/pages/tasks/TaskDescriptionPage.js b/src/pages/tasks/TaskDescriptionPage.js index 2791358a912d..c0aac2102308 100644 --- a/src/pages/tasks/TaskDescriptionPage.js +++ b/src/pages/tasks/TaskDescriptionPage.js @@ -81,6 +81,7 @@ function TaskDescriptionPage(props) { defaultValue={(props.task.report && props.task.report.description) || ''} ref={(el) => (inputRef.current = el)} autoGrowHeight + submitOnEnter containerStyles={[styles.autoGrowHeightMultilineInput]} textAlignVertical="top" selection={selection} From 6568a55006cf270f93143765a099e8bbce67de66 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Tue, 27 Jun 2023 11:53:11 +0800 Subject: [PATCH 540/826] added back composer focus --- src/pages/home/report/ContextMenu/ContextMenuActions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 9cffb99588f2..0a0388e414c7 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -119,6 +119,7 @@ export default [ onPress: (closePopover, {reportAction, reportID}) => { if (closePopover) { hideContextMenu(false, () => { + ReportActionComposeFocusManager.focus(); Report.navigateToAndOpenChildReport(lodashGet(reportAction, 'childReportID', '0'), reportAction, reportID); }); return; From 293b85b4145ef0c9f08b387448889658b3fa5f70 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 27 Jun 2023 12:03:06 +0700 Subject: [PATCH 541/826] update comment --- src/pages/workspace/WorkspaceMembersPage.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 6b692f9399b0..777fdddc4295 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -310,7 +310,8 @@ function WorkspaceMembersPage(props) { checked: isChecked, }} accessibilityLabel={props.formatPhoneNumber(item.displayName)} - // disable hover dimming + + // Disable hover dimming hoverDimmingValue={1} pressDimmingValue={0.7} > @@ -460,7 +461,8 @@ function WorkspaceMembersPage(props) { checked: !_.isEmpty(removableMembers) && _.every(_.keys(removableMembers), (accountID) => _.contains(selectedEmployees, Number(accountID))), }} accessibilityLabel={props.translate('workspace.people.selectAll')} - // disable hover dimming + + // Disable hover dimming hoverDimmingValue={1} pressDimmingValue={0.7} > From 2acdc32137a1709dc16f4202528a13949210ca69 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 27 Jun 2023 12:18:00 +0700 Subject: [PATCH 542/826] fix lint --- src/pages/workspace/WorkspaceMembersPage.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 777fdddc4295..1700c81b2149 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -310,7 +310,6 @@ function WorkspaceMembersPage(props) { checked: isChecked, }} accessibilityLabel={props.formatPhoneNumber(item.displayName)} - // Disable hover dimming hoverDimmingValue={1} pressDimmingValue={0.7} @@ -461,7 +460,6 @@ function WorkspaceMembersPage(props) { checked: !_.isEmpty(removableMembers) && _.every(_.keys(removableMembers), (accountID) => _.contains(selectedEmployees, Number(accountID))), }} accessibilityLabel={props.translate('workspace.people.selectAll')} - // Disable hover dimming hoverDimmingValue={1} pressDimmingValue={0.7} From d986308459119b0020c74e0bf1a2e8b511eb2a87 Mon Sep 17 00:00:00 2001 From: ahmedGaber93 Date: Tue, 27 Jun 2023 08:46:02 +0200 Subject: [PATCH 543/826] fix OfflineWithFeedback errorRowStyles is misaligned --- src/pages/settings/Report/ReportSettingsPage.js | 1 + src/pages/workspace/WorkspaceInitialPage.js | 2 +- src/pages/workspace/WorkspacesListPage.js | 2 +- src/styles/styles.js | 4 ---- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages/settings/Report/ReportSettingsPage.js b/src/pages/settings/Report/ReportSettingsPage.js index 53f0b99910bb..4c8f82c625cd 100644 --- a/src/pages/settings/Report/ReportSettingsPage.js +++ b/src/pages/settings/Report/ReportSettingsPage.js @@ -119,6 +119,7 @@ class ReportSettingsPage extends Component { Report.clearPolicyRoomNameErrors(this.props.report.reportID)} > {shouldDisableRename ? ( diff --git a/src/pages/workspace/WorkspaceInitialPage.js b/src/pages/workspace/WorkspaceInitialPage.js index 73f659574e71..5728525a12f1 100644 --- a/src/pages/workspace/WorkspaceInitialPage.js +++ b/src/pages/workspace/WorkspaceInitialPage.js @@ -194,7 +194,7 @@ function WorkspaceInitialPage(props) { pendingAction={policy.pendingAction} onClose={() => dismissError(policy.id)} errors={policy.errors} - errorRowStyles={[styles.ph6, styles.pv2]} + errorRowStyles={[styles.ph5, styles.pv2]} > diff --git a/src/pages/workspace/WorkspacesListPage.js b/src/pages/workspace/WorkspacesListPage.js index f88ced6fc9fb..6f11c70a6707 100755 --- a/src/pages/workspace/WorkspacesListPage.js +++ b/src/pages/workspace/WorkspacesListPage.js @@ -156,7 +156,7 @@ class WorkspacesListPage extends Component { diff --git a/src/styles/styles.js b/src/styles/styles.js index f37013eb23b0..0ffe6e579472 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2837,10 +2837,6 @@ const styles = { errorDot: { marginRight: 12, }, - menuItemErrorPadding: { - paddingLeft: 44, - paddingRight: 20, - }, }, dotIndicatorMessage: { From 1f91603096bd7a348a9dbb86edfb18d67bcf1f54 Mon Sep 17 00:00:00 2001 From: AmjedNazzal Date: Tue, 27 Jun 2023 11:17:37 +0300 Subject: [PATCH 544/826] Issue21195 --- src/pages/home/report/ReportActionItem.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/ReportActionItem.js b/src/pages/home/report/ReportActionItem.js index 24be64dc6468..d81e6739ed0e 100644 --- a/src/pages/home/report/ReportActionItem.js +++ b/src/pages/home/report/ReportActionItem.js @@ -346,7 +346,7 @@ function ReportActionItem(props) { return ( <> {children} - {!_.isEmpty(props.action.linkMetadata) && ( + {!isHidden && !_.isEmpty(props.action.linkMetadata) && ( !_.isEmpty(item))} /> From a63eee4b177d4f57754baeab47fb58836592fb76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ska=C5=82ka?= Date: Tue, 27 Jun 2023 11:32:03 +0200 Subject: [PATCH 545/826] review changes + added accessibility labels --- ios/Podfile.lock | 6 +++--- src/components/Checkbox.js | 3 +-- src/components/CheckboxWithLabel.js | 5 +++++ .../CheckboxWithTooltipForMobileWebAndNative.js | 1 + .../CheckboxWithTooltip/checkboxWithTooltipPropTypes.js | 4 ++++ src/components/CheckboxWithTooltip/index.js | 2 ++ src/components/CheckboxWithTooltip/index.native.js | 1 + src/components/ReportActionItem/TaskPreview.js | 1 + src/components/TextInput/BaseTextInput.js | 4 +++- src/languages/en.js | 1 + src/languages/es.js | 1 + src/pages/EnablePayments/TermsStep.js | 2 ++ src/pages/ReimbursementAccount/ACHContractStep.js | 4 ++++ src/pages/ReimbursementAccount/BankAccountManualStep.js | 1 + src/pages/ReimbursementAccount/BankAccountPlaidStep.js | 1 + src/pages/ReimbursementAccount/CompanyStep.js | 1 + src/pages/ReimbursementAccount/RequestorStep.js | 1 + src/pages/settings/Payments/AddDebitCardPage.js | 1 + src/pages/workspace/WorkspaceMembersPage.js | 2 ++ 19 files changed, 36 insertions(+), 6 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 048eeca5f76f..41f6eadb9bd3 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1024,7 +1024,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Airship: c70eed50e429f97f5adb285423c7291fb7a032ae AirshipFrameworkProxy: 7bc4130c668c6c98e2d4c60fe4c9eb61a999be99 - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: ff54429f0110d3c722630a98096ba689c39f6d5f @@ -1067,7 +1067,7 @@ SPEC CHECKSUMS: Permission-LocationWhenInUse: 3ba99e45c852763f730eabecec2870c2382b7bd4 Plaid: 7d340abeadb46c7aa1a91f896c5b22395a31fcf2 PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: e9e7b8b45aa9bedb2fdad71740adf07a7265b9be RCTTypeSafety: 9ae0e9206625e995f0df4d5b9ddc94411929fb30 React: a71c8e1380f07e01de721ccd52bcf9c03e81867d @@ -1141,4 +1141,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4ed1c7b099741c82e2b0411b95f6468e72be6c76 -COCOAPODS: 1.12.0 +COCOAPODS: 1.12.1 diff --git a/src/components/Checkbox.js b/src/components/Checkbox.js index 7090abe319d6..d321b0abee77 100644 --- a/src/components/Checkbox.js +++ b/src/components/Checkbox.js @@ -37,7 +37,7 @@ const propTypes = { forwardedRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]), /** An accessibility label for the checkbox */ - accessibilityLabel: PropTypes.string, + accessibilityLabel: PropTypes.string.isRequired, }; const defaultProps = { @@ -49,7 +49,6 @@ const defaultProps = { forwardedRef: undefined, children: null, onMouseDown: undefined, - accessibilityLabel: '', }; function Checkbox(props) { diff --git a/src/components/CheckboxWithLabel.js b/src/components/CheckboxWithLabel.js index 37cfcc895bff..18ad0880b92c 100644 --- a/src/components/CheckboxWithLabel.js +++ b/src/components/CheckboxWithLabel.js @@ -63,6 +63,9 @@ const propTypes = { /** Saves a draft of the input value when used in a form */ /* eslint-disable-next-line react/no-unused-prop-types */ shouldSaveDraft: PropTypes.bool, + + /** An accessibility label for the checkbox */ + accessibilityLabel: PropTypes.string, }; const defaultProps = { @@ -76,6 +79,7 @@ const defaultProps = { value: false, defaultValue: false, forwardedRef: () => {}, + accessibilityLabel: undefined, }; function CheckboxWithLabel(props) { @@ -100,6 +104,7 @@ function CheckboxWithLabel(props) { label={props.label} hasError={Boolean(props.errorText)} forwardedRef={props.forwardedRef} + accessibilityLabel={props.accessibilityLabel || props.label} /> ); diff --git a/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js b/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js index 2d438413a197..1656fa7a82cc 100644 --- a/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js +++ b/src/components/CheckboxWithTooltip/checkboxWithTooltipPropTypes.js @@ -25,6 +25,9 @@ const propTypes = { /** Wheter the checkbox is disabled */ disabled: PropTypes.bool, + /** An accessibility label for the checkbox */ + accessibilityLabel: PropTypes.string, + /** Props inherited from withWindowDimensions */ ...windowDimensionsPropTypes, }; @@ -34,6 +37,7 @@ const defaultProps = { disabled: false, toggleTooltip: true, growlType: CONST.GROWL.WARNING, + accessibilityLabel: undefined, }; export {propTypes, defaultProps}; diff --git a/src/components/CheckboxWithTooltip/index.js b/src/components/CheckboxWithTooltip/index.js index 12f67fcd8c8a..70b1f345fb61 100644 --- a/src/components/CheckboxWithTooltip/index.js +++ b/src/components/CheckboxWithTooltip/index.js @@ -16,6 +16,7 @@ function CheckboxWithTooltip(props) { text={props.text} toggleTooltip={props.toggleTooltip} disabled={props.disabled} + accessibilityLabel={props.accessibilityLabel || props.text} /> ); } @@ -24,6 +25,7 @@ function CheckboxWithTooltip(props) { isChecked={props.isChecked} onPress={props.onPress} disabled={props.disabled} + accessibilityLabel={props.accessibilityLabel || props.text} /> ); return ( diff --git a/src/components/CheckboxWithTooltip/index.native.js b/src/components/CheckboxWithTooltip/index.native.js index 56605f95ac2e..61d171d1717a 100644 --- a/src/components/CheckboxWithTooltip/index.native.js +++ b/src/components/CheckboxWithTooltip/index.native.js @@ -11,6 +11,7 @@ function CheckboxWithTooltip(props) { onPress={props.onPress} text={props.text} toggleTooltip={props.toggleTooltip} + accessibilityLabel={props.accessibilityLabel || props.text} /> ); } diff --git a/src/components/ReportActionItem/TaskPreview.js b/src/components/ReportActionItem/TaskPreview.js index 2e47d7ae471e..30f0864bd35a 100644 --- a/src/components/ReportActionItem/TaskPreview.js +++ b/src/components/ReportActionItem/TaskPreview.js @@ -81,6 +81,7 @@ function TaskPreview(props) { TaskUtils.completeTask(props.taskReportID, taskTitle); } }} + accessibilityLabel={props.translate('newTaskPage.task')} /> diff --git a/src/components/TextInput/BaseTextInput.js b/src/components/TextInput/BaseTextInput.js index d687e38d975d..d307b6eff902 100644 --- a/src/components/TextInput/BaseTextInput.js +++ b/src/components/TextInput/BaseTextInput.js @@ -19,6 +19,7 @@ import CONST from '../../CONST'; import FormHelpMessage from '../FormHelpMessage'; import isInputAutoFilled from '../../libs/isInputAutoFilled'; import * as Pressables from '../Pressable'; +import withLocalize from '../withLocalize'; const PressableWithoutFeedback = Pressables.PressableWithoutFeedback; class BaseTextInput extends Component { @@ -346,6 +347,7 @@ class BaseTextInput extends Component { style={[styles.flex1, styles.textInputIconContainer]} onPress={this.togglePasswordVisibility} onMouseDown={(e) => e.preventDefault()} + accessibilityLabel={this.props.translate('common.visible')} > ( @@ -72,6 +73,7 @@ function TermsStep(props) { )} /> ( diff --git a/src/pages/ReimbursementAccount/ACHContractStep.js b/src/pages/ReimbursementAccount/ACHContractStep.js index 2e0979b00253..6083661b0d0d 100644 --- a/src/pages/ReimbursementAccount/ACHContractStep.js +++ b/src/pages/ReimbursementAccount/ACHContractStep.js @@ -166,6 +166,7 @@ function ACHContractStep(props) { {props.translate('beneficialOwnersStep.checkAllThatApply')} ( @@ -186,6 +187,7 @@ function ACHContractStep(props) { shouldSaveDraft /> ( @@ -251,6 +253,7 @@ function ACHContractStep(props) { )} {props.translate('beneficialOwnersStep.agreement')} ( @@ -263,6 +266,7 @@ function ACHContractStep(props) { shouldSaveDraft /> {props.translate('beneficialOwnersStep.certifyTrueAndAccurate')}} diff --git a/src/pages/ReimbursementAccount/BankAccountManualStep.js b/src/pages/ReimbursementAccount/BankAccountManualStep.js index 5e495f70b27e..94e136dc0dee 100644 --- a/src/pages/ReimbursementAccount/BankAccountManualStep.js +++ b/src/pages/ReimbursementAccount/BankAccountManualStep.js @@ -112,6 +112,7 @@ class BankAccountManualStep extends React.Component { shouldUseDefaultValue={shouldDisableInputs} /> ( diff --git a/src/pages/ReimbursementAccount/BankAccountPlaidStep.js b/src/pages/ReimbursementAccount/BankAccountPlaidStep.js index 8e46b1757e1c..9f0325128efa 100644 --- a/src/pages/ReimbursementAccount/BankAccountPlaidStep.js +++ b/src/pages/ReimbursementAccount/BankAccountPlaidStep.js @@ -116,6 +116,7 @@ class BankAccountPlaidStep extends React.Component { /> {Boolean(selectedPlaidAccountID) && !_.isEmpty(lodashGet(this.props.plaidData, 'bankAccounts')) && ( ( diff --git a/src/pages/ReimbursementAccount/CompanyStep.js b/src/pages/ReimbursementAccount/CompanyStep.js index e44d0562b58e..21648144579c 100644 --- a/src/pages/ReimbursementAccount/CompanyStep.js +++ b/src/pages/ReimbursementAccount/CompanyStep.js @@ -257,6 +257,7 @@ class CompanyStep extends React.Component { /> ( diff --git a/src/pages/ReimbursementAccount/RequestorStep.js b/src/pages/ReimbursementAccount/RequestorStep.js index c6496db73adc..0fa71833b34c 100644 --- a/src/pages/ReimbursementAccount/RequestorStep.js +++ b/src/pages/ReimbursementAccount/RequestorStep.js @@ -172,6 +172,7 @@ class RequestorStep extends React.Component { shouldSaveDraft /> ( diff --git a/src/pages/settings/Payments/AddDebitCardPage.js b/src/pages/settings/Payments/AddDebitCardPage.js index 77b7089fd2ef..65be895baee3 100644 --- a/src/pages/settings/Payments/AddDebitCardPage.js +++ b/src/pages/settings/Payments/AddDebitCardPage.js @@ -187,6 +187,7 @@ class DebitCardPage extends Component { )} ( diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index 4c170deb9ec5..53809fcbfd50 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -315,6 +315,7 @@ function WorkspaceMembersPage(props) { toggleUser(item.accountID, item.pendingAction)} + accessibilityLabel={item.displayName} /> _.contains(selectedEmployees, Number(accountID)))} onPress={() => toggleAllUsers(removableMembers)} + accessibilityLabel={props.translate('workspace.people.selectAll')} /> {props.translate('workspace.people.selectAll')} From 12c81630849814d4261c84fbec01c8341520e863 Mon Sep 17 00:00:00 2001 From: Anusha Date: Tue, 27 Jun 2023 15:45:30 +0500 Subject: [PATCH 546/826] fix keyboard jump --- src/components/Form.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Form.js b/src/components/Form.js index 174fba176bb8..ca775de0fc51 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -346,7 +346,9 @@ function Form(props) { const focusInput = inputRefs.current[focusKey]; // Start with dismissing the keyboard, so when we focus a non-text input, the keyboard is hidden - Keyboard.dismiss(); + if(typeof focusInput.isFocused !== 'function'){ + Keyboard.dismiss(); + } // We subtract 10 to scroll slightly above the input if (focusInput.measureLayout && typeof focusInput.measureLayout === 'function') { From c604a4f0bf1c6762bdda12c43859267fe76978b1 Mon Sep 17 00:00:00 2001 From: Sibtain Ali Date: Tue, 27 Jun 2023 16:05:41 +0500 Subject: [PATCH 547/826] fix: use correct prop type in BaseInvertedFlatlist component --- src/components/InvertedFlatList/BaseInvertedFlatList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/InvertedFlatList/BaseInvertedFlatList.js b/src/components/InvertedFlatList/BaseInvertedFlatList.js index 6c507d110436..4eb29af89cb3 100644 --- a/src/components/InvertedFlatList/BaseInvertedFlatList.js +++ b/src/components/InvertedFlatList/BaseInvertedFlatList.js @@ -18,7 +18,7 @@ const propTypes = { initialRowHeight: PropTypes.number.isRequired, /** Passed via forwardRef so we can access the FlatList ref */ - innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(FlatList)})]).isRequired, + innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({current: PropTypes.instanceOf(React.Component)})]).isRequired, /** Should we measure these items and call getItemLayout? */ shouldMeasureItems: PropTypes.bool, From 753e6cc8e2aa3636b371ed1260a7cd8f1c8197b8 Mon Sep 17 00:00:00 2001 From: dukenv0307 <129500732+dukenv0307@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:39:19 +0700 Subject: [PATCH 548/826] Update src/libs/ReportUtils.js Co-authored-by: Sahil --- src/libs/ReportUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index fce1e62defbf..dfa0d336a654 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -2259,7 +2259,7 @@ function getParentReport(report) { } /** - * Return true if the composer should be hide + * Return true if the composer should be hidden * @param {Object} report * @param {Object} errors * @returns {Boolean} From fa48c39fd4d018f76aff55b04cbd61ef6dcb1513 Mon Sep 17 00:00:00 2001 From: dukenv0307 <129500732+dukenv0307@users.noreply.github.com> Date: Tue, 27 Jun 2023 18:39:25 +0700 Subject: [PATCH 549/826] Update src/pages/home/ReportScreen.js Co-authored-by: Sahil --- src/pages/home/ReportScreen.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js index 5f52931a8e50..758cb28a7279 100644 --- a/src/pages/home/ReportScreen.js +++ b/src/pages/home/ReportScreen.js @@ -155,6 +155,7 @@ class ReportScreen extends React.Component { } componentDidUpdate(prevProps) { + // If composer should be hidden, hide emoji picker as well if (ReportUtils.shouldHideComposer(this.props.report, this.props.errors)) { EmojiPickerAction.hideEmojiPicker(true); } From dd6843aa2190e4dd3f70ac331159895f1d2eadc3 Mon Sep 17 00:00:00 2001 From: Rayane Djouah <77965000+rayane-djouah@users.noreply.github.com> Date: Tue, 27 Jun 2023 00:42:18 +0000 Subject: [PATCH 550/826] Migrate withReportOrNotFound.js to function component --- src/pages/home/report/withReportOrNotFound.js | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/pages/home/report/withReportOrNotFound.js b/src/pages/home/report/withReportOrNotFound.js index ec561db20c81..3f1be1f82553 100644 --- a/src/pages/home/report/withReportOrNotFound.js +++ b/src/pages/home/report/withReportOrNotFound.js @@ -1,5 +1,5 @@ import PropTypes from 'prop-types'; -import React, {Component} from 'react'; +import React from 'react'; import {withOnyx} from 'react-native-onyx'; import _ from 'underscore'; import getComponentDisplayName from '../../../libs/getComponentDisplayName'; @@ -26,31 +26,29 @@ export default function (WrappedComponent) { report: {}, isLoadingReportData: true, }; - - class WithReportOrNotFound extends Component { - render() { - if (this.props.isLoadingReportData && (_.isEmpty(this.props.report) || !this.props.report.reportID)) { - return ; - } - if (_.isEmpty(this.props.report) || !this.props.report.reportID) { - return ; - } - - const rest = _.omit(this.props, ['forwardedRef']); - - return ( - - ); + + // eslint-disable-next-line rulesdir/no-negated-variables + function WithReportOrNotFound(props) { + if (props.isLoadingReportData && (_.isEmpty(props.report) || !props.report.reportID)) { + return ; + } + if (_.isEmpty(props.report) || !props.report.reportID) { + return ; } + const rest = _.omit(props, ['forwardedRef']); + return ( + + ); } WithReportOrNotFound.propTypes = propTypes; WithReportOrNotFound.defaultProps = defaultProps; WithReportOrNotFound.displayName = `withReportOrNotFound(${getComponentDisplayName(WrappedComponent)})`; + // eslint-disable-next-line rulesdir/no-negated-variables const withReportOrNotFound = React.forwardRef((props, ref) => ( Date: Tue, 27 Jun 2023 13:55:45 +0000 Subject: [PATCH 551/826] run prettier --- src/pages/home/report/withReportOrNotFound.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/report/withReportOrNotFound.js b/src/pages/home/report/withReportOrNotFound.js index 3f1be1f82553..5334093bf320 100644 --- a/src/pages/home/report/withReportOrNotFound.js +++ b/src/pages/home/report/withReportOrNotFound.js @@ -26,7 +26,7 @@ export default function (WrappedComponent) { report: {}, isLoadingReportData: true, }; - + // eslint-disable-next-line rulesdir/no-negated-variables function WithReportOrNotFound(props) { if (props.isLoadingReportData && (_.isEmpty(props.report) || !props.report.reportID)) { From a95b3e27222729d202b90ba69bc7cb33b8d21602 Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 17:18:27 +0300 Subject: [PATCH 552/826] make sure inputs get blurred when validating magic code using link --- src/languages/en.js | 1 + src/languages/es.js | 1 + .../signin/ValidateCodeForm/BaseValidateCodeForm.js | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/languages/en.js b/src/languages/en.js index 17653692828e..a22b5380733f 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -701,6 +701,7 @@ export default { }, validateCodeForm: { magicCodeNotReceived: "Didn't receive a magic code?", + requestNewCodeAfterErrorOccured: "Request a new code", enterAuthenticatorCode: 'Please enter your authenticator code', requiredWhen2FAEnabled: 'Required when 2FA is enabled', requestNewCode: 'Request a new code in ', diff --git a/src/languages/es.js b/src/languages/es.js index 2a8af5628045..9e72d605b73a 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -703,6 +703,7 @@ export default { }, validateCodeForm: { magicCodeNotReceived: '¿No recibiste un código mágico?', + requestNewCodeAfterErrorOccured: "Solicitar un nuevo código", enterAuthenticatorCode: 'Por favor, introduce el código de autenticador', requiredWhen2FAEnabled: 'Obligatorio cuando A2F está habilitado', requestNewCode: 'Pedir un código nuevo en ', diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index abee3ce0f25b..695200c0d3a1 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -79,6 +79,12 @@ function BaseValidateCodeForm(props) { const input2FARef = useRef(); const timerRef = useRef(); + useEffect(() => { + if(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading)) { + inputValidateCodeRef.current.blur(); + } + }, [props.account.isLoading, props.session.autoAuthState]) + useEffect(() => { if (!inputValidateCodeRef.current || prevIsVisible || !props.isVisible || !canFocusInputOnScreenFocus()) { return; @@ -273,7 +279,7 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {props.translate('validateCodeForm.magicCodeNotReceived')} + {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccured') : props.translate('validateCodeForm.magicCodeNotReceived')} )} @@ -309,6 +315,7 @@ export default compose( account: {key: ONYXKEYS.ACCOUNT}, credentials: {key: ONYXKEYS.CREDENTIALS}, preferredLocale: {key: ONYXKEYS.NVP_PREFERRED_LOCALE}, + session: {key: ONYXKEYS.SESSION}, }), withToggleVisibilityView, withNetwork(), From c1edca5234b2a817cb5a89e69e14e78b0815407c Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 17:24:27 +0300 Subject: [PATCH 553/826] Added PropTypes --- .../signin/ValidateCodeForm/BaseValidateCodeForm.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 695200c0d3a1..f3528f0ee3c1 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -46,6 +46,12 @@ const propTypes = { login: PropTypes.string, }), + /** Session of currently logged in user */ + session: PropTypes.shape({ + /** Currently logged in user authToken */ + authToken: PropTypes.string, + }), + /** Indicates which locale the user currently has selected */ preferredLocale: PropTypes.string, @@ -62,6 +68,9 @@ const propTypes = { const defaultProps = { account: {}, credentials: {}, + session: { + authToken: null, + }, preferredLocale: CONST.LOCALES.DEFAULT, }; From ec8565728ebf91285232e0a092c086396b78637c Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 17:46:48 +0300 Subject: [PATCH 554/826] consistency issue fixed --- src/languages/es.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/es.js b/src/languages/es.js index 9e72d605b73a..3a02d096e5ec 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -703,7 +703,7 @@ export default { }, validateCodeForm: { magicCodeNotReceived: '¿No recibiste un código mágico?', - requestNewCodeAfterErrorOccured: "Solicitar un nuevo código", + requestNewCodeAfterErrorOccured: 'Solicitar un nuevo código', enterAuthenticatorCode: 'Por favor, introduce el código de autenticador', requiredWhen2FAEnabled: 'Obligatorio cuando A2F está habilitado', requestNewCode: 'Pedir un código nuevo en ', From d4a9daec6b358cc9708d6b8d0de545f259fad197 Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 17:48:01 +0300 Subject: [PATCH 555/826] fix --- src/languages/en.js | 2 +- src/languages/es.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index a22b5380733f..117e45c1961d 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -701,10 +701,10 @@ export default { }, validateCodeForm: { magicCodeNotReceived: "Didn't receive a magic code?", - requestNewCodeAfterErrorOccured: "Request a new code", enterAuthenticatorCode: 'Please enter your authenticator code', requiredWhen2FAEnabled: 'Required when 2FA is enabled', requestNewCode: 'Request a new code in ', + requestNewCodeAfterErrorOccured: "Request a new code", error: { pleaseFillMagicCode: 'Please enter your magic code', incorrectMagicCode: 'Incorrect magic code.', diff --git a/src/languages/es.js b/src/languages/es.js index 3a02d096e5ec..8b68cf794594 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -703,10 +703,10 @@ export default { }, validateCodeForm: { magicCodeNotReceived: '¿No recibiste un código mágico?', - requestNewCodeAfterErrorOccured: 'Solicitar un nuevo código', enterAuthenticatorCode: 'Por favor, introduce el código de autenticador', requiredWhen2FAEnabled: 'Obligatorio cuando A2F está habilitado', requestNewCode: 'Pedir un código nuevo en ', + requestNewCodeAfterErrorOccured: 'Solicitar un nuevo código', error: { pleaseFillMagicCode: 'Por favor, introduce el código mágico', incorrectMagicCode: 'Código mágico incorrecto.', From 9cdf059c47c14f5aa25546ae75c984f2ff17ae1e Mon Sep 17 00:00:00 2001 From: Ionatan Wiznia Date: Tue, 27 Jun 2023 11:48:12 -0300 Subject: [PATCH 556/826] Do not log the notificationID --- .../Notification/PushNotification/index.native.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libs/Notification/PushNotification/index.native.js b/src/libs/Notification/PushNotification/index.native.js index 2d4b2ff29287..299af69873f9 100644 --- a/src/libs/Notification/PushNotification/index.native.js +++ b/src/libs/Notification/PushNotification/index.native.js @@ -100,13 +100,13 @@ function init() { } /** - * Register this device for push notifications for the given accountID. + * Register this device for push notifications for the given notificationID. * - * @param {String|Number} accountID + * @param {String|Number} notificationID */ -function register(accountID) { - if (Airship.contact.getNamedUserId() === accountID.toString()) { - // No need to register again for this accountID. +function register(notificationID) { + if (Airship.contact.getNamedUserId() === notificationID.toString()) { + // No need to register again for this notificationID. return; } @@ -121,8 +121,8 @@ function register(accountID) { // Register this device as a named user in AirshipAPI. // Regardless of the user's opt-in status, we still want to receive silent push notifications. - Log.info(`[PushNotification] Subscribing to notifications for account ID ${accountID}`); - Airship.contact.identify(accountID.toString()); + Log.info(`[PushNotification] Subscribing to notifications`); + Airship.contact.identify(notificationID.toString()); // Refresh notification opt-in status NVP for the new user. refreshNotificationOptInStatus(); From 1dd4349180bdaf8bd889f9566f839284cf27e904 Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 18:09:56 +0300 Subject: [PATCH 557/826] added Boolean --- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index f3528f0ee3c1..38c3b8347a1b 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -288,7 +288,7 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccured') : props.translate('validateCodeForm.magicCodeNotReceived')} + {Boolean(hasError) ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccured') : props.translate('validateCodeForm.magicCodeNotReceived')} )} From 87514ea874cacd77e980c57bb7cca5c65a157239 Mon Sep 17 00:00:00 2001 From: s-alves10 Date: Tue, 27 Jun 2023 10:12:50 -0500 Subject: [PATCH 558/826] fix: update selectedOptions when personalDetails or policyMembers changes --- src/pages/workspace/WorkspaceInvitePage.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/pages/workspace/WorkspaceInvitePage.js b/src/pages/workspace/WorkspaceInvitePage.js index 990320037b6d..104463f85be5 100644 --- a/src/pages/workspace/WorkspaceInvitePage.js +++ b/src/pages/workspace/WorkspaceInvitePage.js @@ -93,10 +93,7 @@ class WorkspaceInvitePage extends React.Component { } componentDidUpdate(prevProps) { - if (!_.isEqual(prevProps.personalDetails, this.props.personalDetails)) { - this.updateOptionsWithSearchTerm(this.props.searchTerm); - } - if (!_.isEqual(prevProps.policyMembers, this.props.policyMembers)) { + if (!_.isEqual(prevProps.personalDetails, this.props.personalDetails) || !_.isEqual(prevProps.policyMembers, this.props.policyMembers)) { this.updateOptionsWithSearchTerm(this.state.searchTerm); } @@ -176,10 +173,23 @@ class WorkspaceInvitePage extends React.Component { updateOptionsWithSearchTerm(searchTerm = '') { const {personalDetails, userToInvite} = OptionsListUtils.getMemberInviteOptions(this.props.personalDetails, this.props.betas, searchTerm, this.getExcludedUsers()); + + // update selectedOptions as well + const detailsMap = {}; + _.forEach(personalDetails, (detail) => (detailsMap[detail.login] = detail)); + const selectedOptions = []; + _.forEach(this.state.selectedOptions, (option) => { + if (!_.has(detailsMap, option.login)) { + return; + } + selectedOptions.push(detailsMap[option.login]); + }); + this.setState({ searchTerm, userToInvite, personalDetails, + selectedOptions, }); } From def12419fb1995aca37f53be1d8a69e3cb86f4c2 Mon Sep 17 00:00:00 2001 From: Anusha <93134676+Nodebrute@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:23:07 +0500 Subject: [PATCH 559/826] Update src/components/Form.js Co-authored-by: Alex Beaman --- src/components/Form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Form.js b/src/components/Form.js index ca775de0fc51..423a629d98aa 100644 --- a/src/components/Form.js +++ b/src/components/Form.js @@ -346,7 +346,7 @@ function Form(props) { const focusInput = inputRefs.current[focusKey]; // Start with dismissing the keyboard, so when we focus a non-text input, the keyboard is hidden - if(typeof focusInput.isFocused !== 'function'){ + if (typeof focusInput.isFocused !== 'function') { Keyboard.dismiss(); } From 3551658ff7d5d7703288c9e14b85eb655f941497 Mon Sep 17 00:00:00 2001 From: Eric Han Date: Tue, 27 Jun 2023 23:15:09 +0800 Subject: [PATCH 560/826] fix clicking title of url preview don't open site --- src/pages/home/report/LinkPreviewer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pages/home/report/LinkPreviewer.js b/src/pages/home/report/LinkPreviewer.js index 1da48efe91d1..dfa1d1ba1d99 100644 --- a/src/pages/home/report/LinkPreviewer.js +++ b/src/pages/home/report/LinkPreviewer.js @@ -5,6 +5,7 @@ import _ from 'underscore'; import {uniqBy} from 'lodash'; import useWindowDimensions from '../../../hooks/useWindowDimensions'; import Text from '../../../components/Text'; +import TextLink from '../../../components/TextLink'; import styles from '../../../styles/styles'; import variables from '../../../styles/variables'; import colors from '../../../styles/colors'; @@ -103,13 +104,14 @@ function LinkPreviewer(props) { )} {!_.isEmpty(title) && ( - {title} - + )} {!_.isEmpty(description) && {description}} {!_.isEmpty(image) && IMAGE_TYPES.includes(image.type) && ( From e7113a5a653e9b1b6d54d18ba2b5e6e4c35368a7 Mon Sep 17 00:00:00 2001 From: Daniel Ordonez Date: Tue, 27 Jun 2023 10:42:38 -0500 Subject: [PATCH 561/826] fix(reportutils): Calculate default avatar with accountid for consistency with fallbackUserDetails --- src/libs/OptionsListUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 54dbca236f31..55e3058dd2b5 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -517,6 +517,7 @@ function createOption(accountIDs, personalDetails, report, reportActions = {}, { result.text = reportName; result.searchText = getSearchText(report, reportName, personalDetailList, result.isChatRoom || result.isPolicyExpenseChat, result.isThread); result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.login), false, personalDetail.login); + result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), false, personalDetail.login); result.subtitle = subtitle; return result; From 5a6807fea9ee53b6439c8dc221bc2e63eb7ef8ab Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Tue, 27 Jun 2023 11:47:57 -0400 Subject: [PATCH 562/826] Connect to policy member list deprecated key --- .../migrations/PersonalDetailsByAccountID.js | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/libs/migrations/PersonalDetailsByAccountID.js b/src/libs/migrations/PersonalDetailsByAccountID.js index 8716f063357e..0ceebb8bfe0c 100644 --- a/src/libs/migrations/PersonalDetailsByAccountID.js +++ b/src/libs/migrations/PersonalDetailsByAccountID.js @@ -7,6 +7,11 @@ import Log from '../Log'; const DEPRECATED_ONYX_KEYS = { // Deprecated personal details object which was keyed by login instead of accountID. PERSONAL_DETAILS: 'personalDetails', + + // Deprecated policy member list object which was keyed by login instead of accountID. + COLLECTION: { + POLICY_MEMBER_LIST: 'policyMemberList_', + }, }; /** @@ -43,6 +48,22 @@ function getDeprecatedPersonalDetailsFromOnyx() { }); } +/** + * @returns {Promise} + */ +function getDeprecatedPolicyMemberListFromOnyx() { + return new Promise((resolve) => { + const connectionID = Onyx.connect({ + key: DEPRECATED_ONYX_KEYS.COLLECTION.POLICY_MEMBER_LIST, + waitForCollectionCallback: true, + callback: (allPolicyMembers) => { + Onyx.disconnect(connectionID); + return resolve(allPolicyMembers); + }, + }); + }); +} + /** * Migrate Onyx data for the email to accountID migration. * @@ -59,9 +80,17 @@ function getDeprecatedPersonalDetailsFromOnyx() { * @returns {Promise} */ export default function () { - return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx()]).then(([oldReportActions, oldPersonalDetails]) => { + return Promise.all([getReportActionsFromOnyx(), getDeprecatedPersonalDetailsFromOnyx(), getDeprecatedPolicyMemberListFromOnyx()]).then(([oldReportActions, oldPersonalDetails, oldPolicyMembers]) => { const onyxData = {}; + console.log('puneetlath', oldReportActions); + console.log('puneetlath', oldPersonalDetails); + console.log('puneetlath', oldPolicyMembers); + _.each(oldPolicyMembers, (_policyMembersForPolicy, policyKey) => { + console.log('puneetlath', policyKey); + onyxData[policyKey] = null; + }); + if (!oldReportActions) { Log.info('[Migrate Onyx] Skipped migration PersonalDetailsByAccountID because there were no reportActions'); return; From d71f54b57814b7cbd4b5194d0de815a993a6d5aa Mon Sep 17 00:00:00 2001 From: David Bondy Date: Tue, 27 Jun 2023 09:52:30 -0600 Subject: [PATCH 563/826] apply changes from commit 38e49c372 --- src/pages/settings/Security/CloseAccountPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 11df367e5bcb..26d40565f548 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -117,7 +117,7 @@ function CloseAccountPage(props) { onCancel={hideConfirmModal} isVisible={isConfirmModalVisible} prompt={props.translate('closeAccountPage.closeAccountPermanentlyDeleteData')} - confirmText={props.translate('common.yes')} + confirmText={props.translate('common.yesContinue')} cancelText={props.translate('common.cancel')} shouldShowCancelButton /> From 57a33a47058e6fd1f6b7e34b9b7904bd9f9da724 Mon Sep 17 00:00:00 2001 From: David Bondy Date: Tue, 27 Jun 2023 09:54:31 -0600 Subject: [PATCH 564/826] pull in change from commit b2dda336 --- src/pages/settings/Security/CloseAccountPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 26d40565f548..23b752841833 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -109,7 +109,7 @@ function CloseAccountPage(props) { label={props.translate('closeAccountPage.enterDefaultContact')} containerStyles={[styles.mt5]} autoCorrect={false} - keyboardType={CONST.KEYBOARD_TYPE.EMAIL_ADDRESS} + keyboardType={Str.isValidEmail(userEmailOrPhone) ? CONST.KEYBOARD_TYPE.EMAIL_ADDRESS : CONST.KEYBOARD_TYPE.DEFAULT} /> Date: Tue, 27 Jun 2023 09:55:48 -0600 Subject: [PATCH 565/826] pull in changes from commit 1b36c75b17 --- src/pages/settings/Security/CloseAccountPage.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 23b752841833..0eb5e30fc2dc 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -94,11 +94,10 @@ function CloseAccountPage(props) { {props.translate('closeAccountPage.reasonForLeavingPrompt')} {props.translate('closeAccountPage.enterDefaultContactToConfirm')} {userEmailOrPhone}. From 8e3b94f066a572e61cd6b576d75870861414a3fc Mon Sep 17 00:00:00 2001 From: Nam Le Date: Tue, 27 Jun 2023 22:59:34 +0700 Subject: [PATCH 566/826] fix style copy button --- src/pages/settings/Security/TwoFactorAuth/VerifyPage.js | 2 +- src/styles/styles.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js index 35dd3564c63d..a34cc3744d0a 100644 --- a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js @@ -132,7 +132,7 @@ function VerifyPage(props) { icon={Expensicons.Copy} inline={false} onPress={() => Clipboard.setString(props.account.twoFactorAuthSecretKey)} - styles={[styles.button, styles.buttonMedium]} + styles={[styles.button, styles.buttonMedium, styles.verifyCodesButton]} textStyles={[styles.buttonMediumText]} /> diff --git a/src/styles/styles.js b/src/styles/styles.js index 74066af5e20a..5ea9c954ddc3 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2215,7 +2215,11 @@ const styles = { }, twoFactorAuthCodesButton: { - minWidth: 100, + minWidth: 140, + }, + + verifyCodesButton: { + minWidth: 110, }, anonymousRoomFooter: { From e087f79db05e6a04ddcdb03240a0328db53be198 Mon Sep 17 00:00:00 2001 From: Daniel Ordonez Date: Tue, 27 Jun 2023 11:06:21 -0500 Subject: [PATCH 567/826] fix(reportutils): Remove first getIcon --- src/libs/OptionsListUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 55e3058dd2b5..bc4fd2539799 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -516,7 +516,6 @@ function createOption(accountIDs, personalDetails, report, reportActions = {}, { result.text = reportName; result.searchText = getSearchText(report, reportName, personalDetailList, result.isChatRoom || result.isPolicyExpenseChat, result.isThread); - result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.login), false, personalDetail.login); result.icons = ReportUtils.getIcons(report, personalDetails, UserUtils.getAvatar(personalDetail.avatar, personalDetail.accountID), false, personalDetail.login); result.subtitle = subtitle; From cdfc707903b9f63610fc1400a2a0c060133bfeaa Mon Sep 17 00:00:00 2001 From: Daniel Ordonez Date: Tue, 27 Jun 2023 11:15:37 -0500 Subject: [PATCH 568/826] fix(reportutils): Include JSDoc for new defaultName param --- src/libs/ReportUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 3d257886fddc..1704018c3cab 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -711,6 +711,7 @@ function getIconsForParticipants(participants, personalDetails) { * @param {Object} personalDetails * @param {*} [defaultIcon] * @param {Boolean} [isPayer] + * @param {String} [defaultName] * @returns {Array<*>} */ function getIcons(report, personalDetails, defaultIcon = null, isPayer = false, defaultName = '') { From 7bd01cbea52cbf080ccc03f7aeb2f4f1836c437d Mon Sep 17 00:00:00 2001 From: David Bondy Date: Tue, 27 Jun 2023 10:18:32 -0600 Subject: [PATCH 569/826] pull in changes from commit 3b5e279fe7 --- src/pages/settings/Security/CloseAccountPage.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index 0eb5e30fc2dc..daa400448ff7 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -76,11 +76,9 @@ function CloseAccountPage(props) { return ( - Navigation.navigate(ROUTES.SETTINGS_SECURITY)} - onCloseButtonPress={() => Navigation.dismissModal(true)} + onBackButtonPress={Navigation.goBack} /> Date: Tue, 27 Jun 2023 10:26:01 -0600 Subject: [PATCH 570/826] pull in changes from commit 1e456f6788d1d --- src/pages/settings/Security/CloseAccountPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Security/CloseAccountPage.js b/src/pages/settings/Security/CloseAccountPage.js index daa400448ff7..8b99d16302b2 100644 --- a/src/pages/settings/Security/CloseAccountPage.js +++ b/src/pages/settings/Security/CloseAccountPage.js @@ -78,7 +78,7 @@ function CloseAccountPage(props) { Navigation.goBack(ROUTES.SETTINGS_SECURITY)} /> Date: Tue, 27 Jun 2023 17:02:21 +0000 Subject: [PATCH 571/826] Update version to 1.3.33-4 --- android/app/build.gradle | 4 ++-- ios/NewExpensify/Info.plist | 2 +- ios/NewExpensifyTests/Info.plist | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4043f87acc92..25a0d5bc2ee6 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -106,8 +106,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion multiDexEnabled rootProject.ext.multiDexEnabled - versionCode 1001033303 - versionName "1.3.33-3" + versionCode 1001033304 + versionName "1.3.33-4" } splits { diff --git a/ios/NewExpensify/Info.plist b/ios/NewExpensify/Info.plist index 81e2307b7e7e..687ac87785b3 100644 --- a/ios/NewExpensify/Info.plist +++ b/ios/NewExpensify/Info.plist @@ -32,7 +32,7 @@ CFBundleVersion - 1.3.33.3 + 1.3.33.4 ITSAppUsesNonExemptEncryption LSApplicationQueriesSchemes diff --git a/ios/NewExpensifyTests/Info.plist b/ios/NewExpensifyTests/Info.plist index a5f71c944db6..71c4d0453e9b 100644 --- a/ios/NewExpensifyTests/Info.plist +++ b/ios/NewExpensifyTests/Info.plist @@ -19,6 +19,6 @@ CFBundleSignature ???? CFBundleVersion - 1.3.33.3 + 1.3.33.4 diff --git a/package-lock.json b/package-lock.json index efa508556007..ccdfc60632aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "new.expensify", - "version": "1.3.33-3", + "version": "1.3.33-4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "new.expensify", - "version": "1.3.33-3", + "version": "1.3.33-4", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index bb04c661bd35..2e0536dcf195 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "new.expensify", - "version": "1.3.33-3", + "version": "1.3.33-4", "author": "Expensify, Inc.", "homepage": "https://new.expensify.com", "description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.", From 75df5a8ebdc7a8aa3db11f0d3bc3b3f940ca19e8 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Wed, 28 Jun 2023 00:38:54 +0700 Subject: [PATCH 572/826] refactor baseSizeBarScreen to function --- .../SidebarScreen/BaseSidebarScreen.js | 63 ++++++++----------- 1 file changed, 27 insertions(+), 36 deletions(-) diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js index 18622166d4bf..6c56976f9843 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js @@ -1,4 +1,4 @@ -import React, {Component} from 'react'; +import React, {useEffect} from 'react'; import {View} from 'react-native'; import styles from '../../../../styles/styles'; import SidebarLinks from '../SidebarLinks'; @@ -17,57 +17,48 @@ const propTypes = { ...windowDimensionsPropTypes, }; -class BaseSidebarScreen extends Component { - constructor(props) { - super(props); - - this.startTimer = this.startTimer.bind(this); - this.navigateToSettings = this.navigateToSettings.bind(this); - } - - componentDidMount() { +function BaseSidebarScreen(props) { + useEffect(() => { Performance.markStart(CONST.TIMING.SIDEBAR_LOADED); Timing.start(CONST.TIMING.SIDEBAR_LOADED, true); - } + }, []); /** * Method called when avatar is clicked */ - navigateToSettings() { + const navigateToSettings = () => { Navigation.navigate(ROUTES.SETTINGS); } /** * Method called when a pinned chat is selected. */ - startTimer() { + const startTimer = () => { Timing.start(CONST.TIMING.SWITCH_REPORT); Performance.markStart(CONST.TIMING.SWITCH_REPORT); } - render() { - return ( - - {({insets}) => ( - <> - - - - {this.props.children} - - )} - - ); - } + return ( + + {({insets}) => ( + <> + + + + {props.children} + + )} + + ); } BaseSidebarScreen.propTypes = propTypes; From 383ffffd0d0728a7dffe43ddde0399fc4abffb77 Mon Sep 17 00:00:00 2001 From: rain2o Date: Tue, 27 Jun 2023 18:45:22 +0100 Subject: [PATCH 573/826] Override isLoading only if accountID is invalid --- src/pages/ProfilePage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 6b59315bbc3c..05e177dfdc0d 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -101,7 +101,11 @@ function ProfilePage(props) { } }, [accountID]); - const details = lodashGet(props.personalDetails, accountID, {isLoading: ValidationUtils.isValidAccountRoute(accountID)}); +const details = lodashGet( + props.personalDetails, + accountID, + ValidationUtils.isValidAccountRoute(accountID) ? {} : {isloading: false}, +); const displayName = details.displayName ? details.displayName : props.translate('common.hidden'); const avatar = lodashGet(details, 'avatar', UserUtils.getDefaultAvatar()); From caa353806d12f071b0da2633795585b294c47ade Mon Sep 17 00:00:00 2001 From: Pujan Date: Tue, 27 Jun 2023 23:31:16 +0530 Subject: [PATCH 574/826] flag comment menu item style changes --- src/components/MenuItem.js | 2 +- src/pages/FlagCommentPage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MenuItem.js b/src/components/MenuItem.js index eae6069783f3..f392cbfba1f5 100644 --- a/src/components/MenuItem.js +++ b/src/components/MenuItem.js @@ -215,7 +215,7 @@ function MenuItem(props) { )} {Boolean(props.furtherDetails) && ( - + flagComment(item.severity))} - style={[styles.pt2, styles.pb4, styles.mh5, styles.ph0, styles.flexRow, styles.borderBottom]} + style={[styles.pt2, styles.pb4, styles.ph5, styles.flexRow]} furtherDetails={item.furtherDetails} furtherDetailsIcon={item.furtherDetailsIcon} hoverAndPressStyle={[styles.mh0, styles.ph5]} From c2c229c758e12c9c3127a94644f75757cb7b5f2a Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 21:22:37 +0300 Subject: [PATCH 575/826] typo fixed --- src/languages/en.js | 2 +- src/languages/es.js | 2 +- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/languages/en.js b/src/languages/en.js index 117e45c1961d..7fc56a90ec3e 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -704,7 +704,7 @@ export default { enterAuthenticatorCode: 'Please enter your authenticator code', requiredWhen2FAEnabled: 'Required when 2FA is enabled', requestNewCode: 'Request a new code in ', - requestNewCodeAfterErrorOccured: "Request a new code", + requestNewCodeAfterErrorOccurred: "Request a new code", error: { pleaseFillMagicCode: 'Please enter your magic code', incorrectMagicCode: 'Incorrect magic code.', diff --git a/src/languages/es.js b/src/languages/es.js index 8b68cf794594..b578c6479567 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -706,7 +706,7 @@ export default { enterAuthenticatorCode: 'Por favor, introduce el código de autenticador', requiredWhen2FAEnabled: 'Obligatorio cuando A2F está habilitado', requestNewCode: 'Pedir un código nuevo en ', - requestNewCodeAfterErrorOccured: 'Solicitar un nuevo código', + requestNewCodeAfterErrorOccurred: 'Solicitar un nuevo código', error: { pleaseFillMagicCode: 'Por favor, introduce el código mágico', incorrectMagicCode: 'Código mágico incorrecto.', diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 38c3b8347a1b..01751cc6968b 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -288,7 +288,7 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {Boolean(hasError) ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccured') : props.translate('validateCodeForm.magicCodeNotReceived')} + {Boolean(hasError) ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} )} From bb33473fe3516358b85dd5afe259cee75e8e44ab Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 21:43:13 +0300 Subject: [PATCH 576/826] single quote --- src/languages/en.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/languages/en.js b/src/languages/en.js index 7fc56a90ec3e..950bd7e134e3 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -704,7 +704,7 @@ export default { enterAuthenticatorCode: 'Please enter your authenticator code', requiredWhen2FAEnabled: 'Required when 2FA is enabled', requestNewCode: 'Request a new code in ', - requestNewCodeAfterErrorOccurred: "Request a new code", + requestNewCodeAfterErrorOccurred: 'Request a new code', error: { pleaseFillMagicCode: 'Please enter your magic code', incorrectMagicCode: 'Incorrect magic code.', From 0fa37e12df881546f9847819087ed20b58038ecc Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 21:46:09 +0300 Subject: [PATCH 577/826] fix lint error --- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 01751cc6968b..2286a5fb4ba6 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -88,6 +88,8 @@ function BaseValidateCodeForm(props) { const input2FARef = useRef(); const timerRef = useRef(); + const hasError = Boolean(props.account) && !_.isEmpty(props.account.errors); + useEffect(() => { if(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading)) { inputValidateCodeRef.current.blur(); @@ -234,8 +236,6 @@ function BaseValidateCodeForm(props) { } }, [props.account.requiresTwoFactorAuth, props.credentials, props.preferredLocale, twoFactorAuthCode, validateCode]); - const hasError = Boolean(props.account) && !_.isEmpty(props.account.errors); - return ( <> {/* At this point, if we know the account requires 2FA we already successfully authenticated */} From a2a780f5a5004f84c4465cccdd71a3c49f1609a0 Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 21:51:19 +0300 Subject: [PATCH 578/826] fix lint error --- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 2286a5fb4ba6..4203a541f2b3 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -94,7 +94,7 @@ function BaseValidateCodeForm(props) { if(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading)) { inputValidateCodeRef.current.blur(); } - }, [props.account.isLoading, props.session.autoAuthState]) + }, [props.account.isLoading, props.session.autoAuthState, hasError]) useEffect(() => { if (!inputValidateCodeRef.current || prevIsVisible || !props.isVisible || !canFocusInputOnScreenFocus()) { @@ -288,7 +288,7 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {Boolean(hasError) ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} + {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} )} From 8426a5eb780b2cfe3fdfea5fe0a0694d12f8934b Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 21:57:53 +0300 Subject: [PATCH 579/826] fix lint error --- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 4203a541f2b3..46b8db6b9869 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -91,9 +91,10 @@ function BaseValidateCodeForm(props) { const hasError = Boolean(props.account) && !_.isEmpty(props.account.errors); useEffect(() => { - if(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading)) { - inputValidateCodeRef.current.blur(); + if(!(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading))) { + return } + inputValidateCodeRef.current.blur(); }, [props.account.isLoading, props.session.autoAuthState, hasError]) useEffect(() => { @@ -288,7 +289,7 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} + {Boolean(hasError) ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} )} From 2f1d2fe0ee879916d9fd8896b378667d120eeeb8 Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 22:13:43 +0300 Subject: [PATCH 580/826] removed boolean --- src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 46b8db6b9869..7721585d7bd4 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -289,7 +289,7 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {Boolean(hasError) ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} + {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} )} From 2851d6bc2eb18fe7f9d1a93bbcd50fd46fb6e3ab Mon Sep 17 00:00:00 2001 From: Nam Le Date: Wed, 28 Jun 2023 02:15:40 +0700 Subject: [PATCH 581/826] add displayName for component --- src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js index 6c56976f9843..2aa59319be47 100644 --- a/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js +++ b/src/pages/home/sidebar/SidebarScreen/BaseSidebarScreen.js @@ -62,5 +62,6 @@ function BaseSidebarScreen(props) { } BaseSidebarScreen.propTypes = propTypes; +BaseSidebarScreen.displayName = 'BaseSidebarScreen'; export default withWindowDimensions(BaseSidebarScreen); From a1898ea4055986e83633bb4ccc23b31782aa3629 Mon Sep 17 00:00:00 2001 From: Nam Le Date: Wed, 28 Jun 2023 02:17:34 +0700 Subject: [PATCH 582/826] update name style 2fa copy button --- src/pages/settings/Security/TwoFactorAuth/VerifyPage.js | 2 +- src/styles/styles.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js index a34cc3744d0a..90765b45caa2 100644 --- a/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js +++ b/src/pages/settings/Security/TwoFactorAuth/VerifyPage.js @@ -132,7 +132,7 @@ function VerifyPage(props) { icon={Expensicons.Copy} inline={false} onPress={() => Clipboard.setString(props.account.twoFactorAuthSecretKey)} - styles={[styles.button, styles.buttonMedium, styles.verifyCodesButton]} + styles={[styles.button, styles.buttonMedium, styles.twoFactorAuthCopyCodeButton]} textStyles={[styles.buttonMediumText]} /> diff --git a/src/styles/styles.js b/src/styles/styles.js index 5ea9c954ddc3..343e13b0ce46 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2218,7 +2218,7 @@ const styles = { minWidth: 140, }, - verifyCodesButton: { + twoFactorAuthCopyCodeButton: { minWidth: 110, }, From 06c7156b0ce43270147aa2a9b13cc08a3ce954cd Mon Sep 17 00:00:00 2001 From: Hezekiel Tamire Date: Tue, 27 Jun 2023 22:20:32 +0300 Subject: [PATCH 583/826] fixed prettier issue --- .../signin/ValidateCodeForm/BaseValidateCodeForm.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js index 7721585d7bd4..83a4d0afbaa5 100755 --- a/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js +++ b/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.js @@ -91,11 +91,11 @@ function BaseValidateCodeForm(props) { const hasError = Boolean(props.account) && !_.isEmpty(props.account.errors); useEffect(() => { - if(!(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading))) { - return + if (!(inputValidateCodeRef.current && ((hasError && props.session.autoAuthState === CONST.AUTO_AUTH_STATE.FAILED) || props.account.isLoading))) { + return; } inputValidateCodeRef.current.blur(); - }, [props.account.isLoading, props.session.autoAuthState, hasError]) + }, [props.account.isLoading, props.session.autoAuthState, hasError]); useEffect(() => { if (!inputValidateCodeRef.current || prevIsVisible || !props.isVisible || !canFocusInputOnScreenFocus()) { @@ -289,7 +289,9 @@ function BaseValidateCodeForm(props) { accessibilityRole="button" accessibilityLabel={props.translate('validateCodeForm.magicCodeNotReceived')} > - {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} + + {hasError ? props.translate('validateCodeForm.requestNewCodeAfterErrorOccurred') : props.translate('validateCodeForm.magicCodeNotReceived')} + )} From b2ec5b1a10324bc2c66ace40f008d74501e5628c Mon Sep 17 00:00:00 2001 From: Pujan Date: Wed, 28 Jun 2023 01:16:29 +0530 Subject: [PATCH 584/826] removed hoverAndPressStyle prop --- src/pages/FlagCommentPage.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/FlagCommentPage.js b/src/pages/FlagCommentPage.js index cd26256a28d2..0d6875041248 100644 --- a/src/pages/FlagCommentPage.js +++ b/src/pages/FlagCommentPage.js @@ -134,7 +134,6 @@ function FlagCommentPage(props) { style={[styles.pt2, styles.pb4, styles.ph5, styles.flexRow]} furtherDetails={item.furtherDetails} furtherDetailsIcon={item.furtherDetailsIcon} - hoverAndPressStyle={[styles.mh0, styles.ph5]} /> )); From 2bc58977945f0142aafd6851edad3e18b220157c Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Tue, 27 Jun 2023 21:52:38 +0200 Subject: [PATCH 585/826] update mobile home background SVG opacity --- assets/images/home-background--mobile.svg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/assets/images/home-background--mobile.svg b/assets/images/home-background--mobile.svg index 0af3aac59146..76892c1f022f 100644 --- a/assets/images/home-background--mobile.svg +++ b/assets/images/home-background--mobile.svg @@ -5,8 +5,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/images/home-background--mobile.svg b/assets/images/home-background--mobile.svg index 76892c1f022f..cc6b9f46addb 100644 --- a/assets/images/home-background--mobile.svg +++ b/assets/images/home-background--mobile.svg @@ -5,7 +5,8 @@