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C5D,MAAMy4B,EAAU,CAAC,EACjB,IAAK,MAAMp+C,KAAUjd,OAAOe,OAAO6hC,GAC5By4B,EAAQp+C,EAAOlD,YAClBshD,EAAQp+C,EAAOlD,UAAY,CAAC,GAE9BshD,EAAQp+C,EAAOlD,UAAUkD,EAAO3mB,IAAM2mB,EAExC,OAAOo+C,CAAO,IAGHC,GAA+BvT,EAAAA,EAAAA,IAC1C,CAACqT,IACDG,IACE,MAAMC,EAAW,CAAC,EAClB,IAAK,MAAM1hD,KAAW9Z,OAAO6tB,KAAK0tC,GAAiB,CACjDC,EAAS1hD,GAAW,CAClB2hD,UAAW,EACXtuB,OAAQ,EACR2B,MAAO,EACP90B,SAAU,EACV0hD,QAAS,GAEX,IAAK,MAAMz+C,KAAUjd,OAAOe,OAAOw6D,EAAezhD,IAChD0hD,EAAS1hD,GAASmD,EAAOtkB,SAAW,CAExC,CACA,OAAO6iE,CAAQ,IAING,GAAsB5T,EAAAA,EAAAA,IAAe,CAACN,IAAWngB,IAC5D,MAAMs0B,EAAmB,CAAC,EAC1B,IAAK,MAAM5/D,KAAQgE,OAAOe,OAAOumC,GAC3BtrC,EAAKwD,kBACPo8D,EAAiB5/D,EAAKwD,iBAAmBxD,GAG7C,OAAO4/D,CAAgB,G","sources":["webpack://rsvpbridge/./app/javascript/api/credits.js","webpack://rsvpbridge/./app/javascript/api/rsvp_api.js","webpack://rsvpbridge/./app/javascript/api/users.js","webpack://rsvpbridge/./app/javascript/components/elements/Icons/BouncingDots.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Icons/HiddenIcon.js.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Icons/Icon.js.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Icons/OpenCloseIcon.js.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Icons/VisibleIcon.js.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Icons/VisibleOrHiddenIcon.js.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Icons/Preferred.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/AccountRbucksBalance.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/AwardPigment.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Badge.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/BecomeLink.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Bid.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Board.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/BoardNumber.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/BoardSelector.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/BoardSet.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/BoardSetContainer.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/CalendarSelector/SelectMonth.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/CalendarSelector/SelectYear.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/CalendarSelector/index.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Card.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/CardGraphic.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Checked.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ClubAlert.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ClubLink.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ClubLogo.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ClubTitle.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Confirm.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Contract.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ControlToggle.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/CourseIndicator.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/DateBox.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/DatePickerWithTimeZone.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/EventTypeSelector.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Fee.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/FeeWithOverride.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/FriendlyText.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/GroupLink.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/HandChart.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/HelpText.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/HighlightPairMessage.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/InactiveIndicator.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/IneligibleIndicator.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ManagerNotifications.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/MemberMps.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/MaxWidthContainer.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/styles.js","webpack://rsvpbridge/./app/javascript/components/elements/Misc/NavigateToEvent.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ParsedHtml.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PaymentRecorded.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PreferredMovementNotation.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PhoneLink.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PigmentedAwards.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PlusMinusControl.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PricingTier.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PricingTierSelector.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/PrivacyControlsMessage.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Rank.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/RecentEventsList.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ScoreMadeDelta.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/RoundSelector.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ScoreResult.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/ScoringProgress.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Seat.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/SlamBadges.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/SmallBSG.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/SmallPairNumber.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Spinner.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Suit.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/Time.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/TimeRange.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/TournamentCode.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/UserHomeLink.jsx","webpack://rsvpbridge/./app/javascript/components/elements/Misc/YearButton.jsx","webpack://rsvpbridge/./app/javascript/subscriptions/current-user.js","webpack://rsvpbridge/./app/javascript/contexts/current-user-context.js","webpack://rsvpbridge/./app/javascript/contexts/page-context/storage_methods.js","webpack://rsvpbridge/./app/javascript/contexts/pane-memory-context.js","webpack://rsvpbridge/./app/javascript/helpers/IMPs.js","webpack://rsvpbridge/./app/javascript/helpers/Movement.js","webpack://rsvpbridge/./app/javascript/redux/reducers/account_requests.js","webpack://rsvpbridge/./app/javascript/redux/reducers/accounts.js","webpack://rsvpbridge/./app/javascript/redux/reducers/awards.js","webpack://rsvpbridge/./app/javascript/redux/reducers/board_sets.js","webpack://rsvpbridge/./app/javascript/redux/reducers/boards.js","webpack://rsvpbridge/./app/javascript/redux/reducers/charges.js","webpack://rsvpbridge/./app/javascript/redux/reducers/clubs.js","webpack://rsvpbridge/./app/javascript/redux/reducers/deals.js","webpack://rsvpbridge/./app/javascript/redux/reducers/event.js","webpack://rsvpbridge/./app/javascript/redux/reducers/events.js","webpack://rsvpbridge/./app/javascript/redux/reducers/group_events.js","webpack://rsvpbridge/./app/javascript/redux/reducers/groups.js","webpack://rsvpbridge/./app/javascript/redux/reducers/help_articles.js","webpack://rsvpbridge/./app/javascript/redux/reducers/help_panes.js","webpack://rsvpbridge/./app/javascript/redux/reducers/help_tags.js","webpack://rsvpbridge/./app/javascript/redux/reducers/help_terms.js","webpack://rsvpbridge/./app/javascript/redux/reducers/help_videos.js","webpack://rsvpbridge/./app/javascript/redux/reducers/helpers.js","webpack://rsvpbridge/./app/javascript/redux/reducers/invites.js","webpack://rsvpbridge/./app/javascript/redux/reducers/invoices.js","webpack://rsvpbridge/./app/javascript/redux/reducers/late_plays.js","webpack://rsvpbridge/./app/javascript/redux/reducers/locations.js","webpack://rsvpbridge/./app/javascript/redux/reducers/mail_failures.js","webpack://rsvpbridge/./app/javascript/redux/reducers/members.js","webpack://rsvpbridge/./app/javascript/redux/reducers/messages.js","webpack://rsvpbridge/./app/javascript/redux/reducers/movements.js","webpack://rsvpbridge/./app/javascript/redux/reducers/notes.js","webpack://rsvpbridge/./app/javascript/redux/reducers/payouts.js","webpack://rsvpbridge/./app/javascript/redux/reducers/pending_members.js","webpack://rsvpbridge/./app/javascript/redux/reducers/pending_partners.js","webpack://rsvpbridge/./app/javascript/redux/reducers/plans.js","webpack://rsvpbridge/./app/javascript/redux/reducers/plays.js","webpack://rsvpbridge/./app/javascript/redux/reducers/results.js","webpack://rsvpbridge/./app/javascript/redux/reducers/scores.js","webpack://rsvpbridge/./app/javascript/redux/reducers/section_movements.js","webpack://rsvpbridge/./app/javascript/redux/reducers/sections.js","webpack://rsvpbridge/./app/javascript/redux/reducers/signup_overlaps.js","webpack://rsvpbridge/./app/javascript/redux/reducers/signups.js","webpack://rsvpbridge/./app/javascript/redux/reducers/users.js","webpack://rsvpbridge/./app/javascript/redux/reducers/index.js","webpack://rsvpbridge/./app/javascript/redux/store.js","webpack://rsvpbridge/./app/javascript/helpers/appSetup.js","webpack://rsvpbridge/./app/javascript/helpers/colors.js","webpack://rsvpbridge/./app/javascript/helpers/constants.js","webpack://rsvpbridge/./app/javascript/helpers/debugging.js","webpack://rsvpbridge/./app/javascript/helpers/icons.js","webpack://rsvpbridge/./app/javascript/helpers/messages.js","webpack://rsvpbridge/./app/javascript/helpers/seating.js","webpack://rsvpbridge/./app/javascript/helpers/utilities.js","webpack://rsvpbridge/./app/javascript/hooks/useToggle.js","webpack://rsvpbridge/./app/javascript/pages/Event/styles.js","webpack://rsvpbridge/./app/javascript/redux/action_types.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/base_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/filter_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/movement_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/boards_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/member_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/online_play_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/overall_state_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/pairs_selectors.js","webpack://rsvpbridge/./app/javascript/helpers/VictoryPoints.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/score_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/seating_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/table_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/index.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/indexed_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/individual_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/event_selectors/masterpoint_selectors.js","webpack://rsvpbridge/./app/javascript/redux/selectors/shared_selectors.js"],"sourcesContent":["import { get, post, patch } from 'api/rsvp_api'\n\nexport const apiAccountChangeAutoPurchase = (accountId, value, controls) => {\n patch(\n 'changing account auto purchase',\n '/api/credits/set_auto_purchase',\n {\n creditable_type: 'account',\n creditable_id: accountId,\n value,\n },\n controls,\n )\n}\n\nexport const apiSetUserAutoPurchase = (id, value, controls) => {\n patch(\n 'setting user auto-pay',\n '/api/credits/set_auto_purchase',\n {\n creditable_type: 'user',\n creditable_id: id,\n value: value,\n },\n controls,\n )\n}\n\nexport const apiGetCreditAudit = controls => {\n get('getting credit audit', '/api/credits/credit_audit', controls)\n}\n\nexport const apiGetCreditReport = (requestedYear, controls) => {\n get(\n 'getting credit report',\n `/api/credits/credit_report/${requestedYear}`,\n controls,\n )\n}\n\nexport const apiAccountCreditReport = (accountId, requestedYear, controls) => {\n get(\n 'getting account credit report',\n `/api/credits/account_credit_report/${accountId}/${requestedYear}`,\n controls,\n )\n}\n\nexport const apiEventFeesReconciliation = (\n accountId,\n requestedYear,\n controls,\n) => {\n get(\n 'getting account fees reconciliation',\n `/api/credits/event-reconciliation/${accountId}/${requestedYear}`,\n controls,\n )\n}\n\nexport const apiAdminCredit = (\n credits,\n reason,\n to_from,\n creditable_type,\n creditable_id,\n controls,\n) => {\n post(\n 'making admin credit',\n '/api/credits/admin_credit',\n { credits, reason, to_from, creditable_type, creditable_id },\n controls,\n )\n}\n\nexport const apiAdminDebit = (\n credits,\n reason,\n to_from,\n creditable_type,\n creditable_id,\n controls,\n) => {\n post(\n 'making admin debit',\n '/api/credits/admin_debit',\n { credits, reason, to_from, creditable_type, creditable_id },\n controls,\n )\n}\n\nexport const apiPurchaseCredits = (paymentData, controls) => {\n post('purchasing credits', '/api/credits/purchase', paymentData, controls)\n}\n\nexport const apiPurchaseCreditsWithSavedCard = (paymentData, controls) => {\n post(\n 'purchasing credits with saved card',\n '/api/credits/purchase_with_saved_card',\n paymentData,\n controls,\n )\n}\n\nexport const apiGetCreditsLog = (\n creditableType,\n creditableId,\n page,\n controls,\n) => {\n get(\n 'getting credits logs',\n `/api/credits/credit_log/${creditableType}/${creditableId}/${page}`,\n controls,\n )\n}\n\nexport const apiGetUserEventCredits = (user_id, event_id, controls) => {\n get(\n 'getting user-event credits',\n `/api/credits/user_event_credits/${user_id}/${event_id}`,\n controls,\n )\n}\n\nexport const apiReverseEventCredit = (credit_id, controls) => {\n post(\n 'reversing event credit',\n `/api/credits/${credit_id}/reverse_event_credit`,\n {},\n controls,\n )\n}\n","import { toast } from 'react-toastify'\nimport 'whatwg-fetch'\n\nconst getMeta = metaName => {\n const metas = document.getElementsByTagName('meta')\n for (let i = 0; i < metas.length; i++) {\n if (metas[i].getAttribute('name') == metaName) {\n return metas[i].getAttribute('content')\n }\n }\n return ''\n}\n\nexport const csrf = () => {\n return getMeta('csrf-token')\n}\n\nconst handleFetchResponseErrors = response => {\n if (!response.ok) {\n if (response.status == 401) {\n window.location.href = '/'\n } else {\n throw Error(response.statusText)\n }\n }\n return response\n}\n\nconst catchFetchErrors = (ex, msg) => {\n if (ex.name === 'AbortError') {\n return\n }\n const lower = ex.message.toLowerCase()\n if (lower.includes('fetch') || lower.includes('unavailable')) {\n toast.error('Could not process request. Check internet connection.', {\n autoClose: false,\n })\n } else {\n console.error('[RSVP]', 'in rsvp_api.js - :', 'ex', ex)\n toast.error(`${msg}: ${ex.message}`, { autoClose: false })\n }\n}\n\nconst request = (\n actionText,\n url,\n baseAttr,\n controls = {},\n isFileUpload = false,\n) => {\n const attr = {\n ...baseAttr,\n credentials: 'same-origin',\n headers: {\n Accepts: 'application/json',\n 'X-CSRF-Token': csrf(),\n },\n }\n if (!isFileUpload) {\n attr.headers['Content-Type'] = 'application/json'\n }\n if (controls.signal) {\n attr.signal = controls.signal\n }\n\n if (controls.loading) {\n controls.loading(true)\n }\n\n let skipFinally = false\n\n fetch(url, attr)\n .then(handleFetchResponseErrors)\n .then(response => response.json())\n .then(json => {\n if (json.error) {\n if (controls.errorMsg) {\n toast.error(controls.errorMsg)\n }\n if (json.redirect) {\n setTimeout(() => {\n window.location.href = json.redirect\n }, 2000)\n }\n if (controls.error) {\n controls.error(json)\n }\n if (!controls.errorMsg && !controls.error) {\n toast.error(`Error ${actionText}: ${json.error}`, {\n autoClose: 10000,\n })\n }\n } else {\n if (json.success_message) {\n toast.success(json.success_message)\n } else if (controls.successMsg) {\n toast.success(controls.successMsg)\n }\n if (controls.successDispatch) {\n const [dispatch, action] = controls.successDispatch\n dispatch(action(json))\n }\n if (controls.success) {\n controls.success(json)\n }\n if (controls.skipFinally) {\n if (controls.skipFinally(json)) {\n skipFinally = true\n }\n }\n if (controls.successClose) {\n skipFinally = true\n if (typeof controls.successClose == 'function') {\n controls.successClose(json)\n }\n }\n }\n })\n .catch(ex => {\n catchFetchErrors(ex, `Error ${actionText}`)\n })\n .finally(() => {\n if (controls.loading && !skipFinally) {\n controls.loading(false)\n }\n })\n}\n\nexport const get = (actionText, url, controls) => {\n const attr = {\n method: 'GET',\n }\n request(actionText, url, attr, controls)\n}\n\nexport const post = (actionText, url, data, controls) => {\n const attr = {\n method: 'POST',\n }\n if (data) {\n attr.body = JSON.stringify(data)\n }\n request(actionText, url, attr, controls)\n}\n\nexport const patch = (actionText, url, data, controls) => {\n const attr = {\n method: 'PATCH',\n }\n if (data) {\n attr.body = JSON.stringify(data)\n }\n request(actionText, url, attr, controls)\n}\n\nexport const uploadFile = (actionText, url, data, controls) => {\n const attr = {\n method: 'PATCH',\n body: data,\n }\n request(actionText, url, attr, controls, true)\n}\n\nexport const destroy = (actionText, url, controls) => {\n const attr = {\n method: 'DELETE',\n }\n request(actionText, url, attr, controls)\n}\n\nexport const login = (user, reportError, reportSuccess) => {\n let url = '/users/sign_in'\n const csrf = getMeta('csrf-token')\n let attr = {\n method: 'POST',\n body: JSON.stringify({ user }),\n credentials: 'same-origin',\n headers: {\n 'Content-Type': 'application/json',\n Accepts: 'application/json',\n 'X-CSRF-Token': csrf,\n },\n }\n fetch(url, attr)\n .then(response => {\n if (response.ok) {\n reportSuccess(true)\n window.location.href = response.url\n } else {\n return response.json()\n }\n })\n .then(json => {\n if (json) {\n if (json.error_message) {\n reportError(json.error_message)\n } else {\n reportError('Log in did not succeed. Reason unknown.')\n }\n }\n })\n .catch(ex => {\n catchFetchErrors(ex, 'Error logging in')\n })\n}\n\nexport const logout = () => {\n let url = '/users/sign_out'\n const csrf = getMeta('csrf-token')\n let attr = {\n method: 'DELETE',\n credentials: 'same-origin',\n headers: {\n 'Content-Type': 'application/json',\n Accepts: 'application/json',\n 'X-CSRF-Token': csrf,\n },\n }\n localStorage.clear()\n sessionStorage.clear()\n fetch(url, attr).then(() => {\n let name = '_rsvp_bridge_session'\n document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC'\n window.location.href = '/'\n })\n}\n\nexport const returnToTableLogin = () => {\n let url = '/users/sign_out'\n const csrf = getMeta('csrf-token')\n let attr = {\n method: 'DELETE',\n credentials: 'same-origin',\n headers: {\n 'Content-Type': 'application/json',\n Accepts: 'application/json',\n 'X-CSRF-Token': csrf,\n },\n }\n localStorage.clear()\n sessionStorage.clear()\n fetch(url, attr).then(() => {\n let name = '_rsvp_bridge_session'\n document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC'\n window.location.href = '/table-login'\n })\n}\n","import { get, patch, destroy } from 'api/rsvp_api'\n\nexport const apiRefreshUser = (id, controls) => {\n get('refreshing user', `/api/users/${id}/refresh`, controls)\n}\n\nexport const apiLoadUserEvents = (id, year, month, controls) => {\n get(\n 'loading user events',\n `/api/users/${id}/load_user_events/${year}/${month}`,\n controls,\n )\n}\n\nexport const apiLoadUserResults = (id, year, month, controls) => {\n get(\n 'loading user results',\n `/api/users/${id}/load_user_results/${year}/${month}`,\n controls,\n )\n}\n\nexport const apiLoadMessages = (id, controls) => {\n get('loading user messages', `/api/users/${id}/load_user_messages`, controls)\n}\n\nexport const apiLoadClubData = controls => {\n get('loading club data', '/api/users/club_data', controls)\n}\nexport const apiLoadCourseData = controls => {\n get('loading course data', '/api/users/course_data', controls)\n}\n\nexport const apiLoadUsers = controls => {\n get('loading users', '/api/users', controls)\n}\n\nexport const apiLoadUser = (id, controls) => {\n get('loading user', `/api/users/${id}/load`, controls)\n}\n\nexport const apiUpdateUserProfile = (id, user, controls) => {\n patch('updating user profile', `/api/users/${id}`, { user }, controls)\n}\n\nexport const apiUpdateUserPassword = (id, user, controls) => {\n patch(\n 'updating user password',\n `/api/users/${id}/update_password`,\n { user },\n controls,\n )\n}\n\nexport const apiAssignAcblNumber = (id, acbl_number, controls) => {\n patch(\n 'assigning ACBL number',\n `/api/users/${id}/update_acbl_number`,\n { acbl_number },\n controls,\n )\n}\n\nexport const apiUserProfileReviewed = (id, controls) => {\n patch(\n 'marking user profile reviewed',\n `/api/users/${id}/reviewed`,\n {},\n controls,\n )\n}\n\nexport const apiPrivacyChange = (id, field, value, controls) => {\n patch(\n 'making privacy change',\n `/api/users/${id}/privacy_change`,\n { field, value },\n controls,\n )\n}\n\nexport const apiSetEmailPreference = (\n id,\n preference_type,\n preference_id,\n value,\n notify,\n controls,\n) => {\n patch(\n 'setting email preference',\n `/api/users/${id}/email_preference_change`,\n { preference_type, preference_id, value, notify },\n controls,\n )\n}\n\nexport const apiUpdateAllMasterpoints = controls => {\n patch(\n 'updating all masterpoints',\n '/api/users/update_all_masterpoints',\n {},\n controls,\n )\n}\n\nexport const apiDeleteUser = (id, controls) => {\n destroy('deleting user', `/api/users/${id}`, controls)\n}\n\nexport const apiMergeUser = (sourceUserId, targetUserId, controls) => {\n patch(\n 'merging users',\n `/api/users/${targetUserId}/merge/${sourceUserId}`,\n {},\n controls,\n )\n}\n\nexport const apiSetPreference = (id, key, value, controls) => {\n patch(\n 'setting user preference',\n `/api/users/${id}/set_preference`,\n { key, value },\n controls,\n )\n}\n\nexport const apiSetAutoPay = (id, checked, controls) => {\n patch(\n 'setting auto-pay',\n `/api/users/${id}/set_auto_pay/${checked ? 'on' : 'off'}`,\n {},\n controls,\n )\n}\n\nexport const apiGetDiscordServerOptions = controls => {\n get(\n 'getting discord server options',\n '/api/users/discord_server_options',\n controls,\n )\n}\n\nexport const apiGetSpamBlocks = controls => {\n get('getting spam blocks', '/api/users/spam-blocks', controls)\n}\n\nexport const apiGetEmailBounces = controls => {\n get('getting email bounces', '/api/users/email-bounces', controls)\n}\n\nexport const apiRemoveSpamBlock = (userId, controls) => {\n patch(\n 'removing spam block',\n `/api/users/${userId}/remove_spam_block`,\n {},\n controls,\n )\n}\n\nexport const apiRemoveEmailBounce = (userId, controls) => {\n patch(\n 'removing email bounce',\n `/api/users/${userId}/remove_email_bounce`,\n {},\n controls,\n )\n}\n\nexport const apiBounceAudit = (do_it, controls) => {\n get(\n 'getting bounce audit',\n `/api/users/bounce_audit/${do_it ? 'do_it' : ''}`,\n controls,\n )\n}\nexport const apiComplaintAudit = (do_it, controls) => {\n get(\n 'getting complaint audit',\n `/api/users/complaint_audit/${do_it ? 'do_it' : ''}`,\n controls,\n )\n}\n\nexport const apiResendWelcomeUserEmail = (userId, controls) => {\n patch(\n 'resending Welcome User email',\n `/api/users/${userId}/resend_welcome_user_email`,\n {},\n controls,\n )\n}\n\nexport const apiChangeUserStationaryPreference = (\n userId,\n pref,\n event_source,\n user_source,\n controls,\n) => {\n patch(\n 'changing user stationary preference',\n `/api/users/${userId}/change_stationary_preference`,\n { pref, event_source, user_source },\n controls,\n )\n}\n\nexport const apiConnectDiscordUser = (\n userId,\n discord_name,\n discord_user_id,\n controls,\n) => {\n patch(\n 'updating discord id for user',\n `/api/users/${userId}/connect_discord_user`,\n { discord_name, discord_user_id },\n controls,\n )\n}\n\nexport const apiLoadDuplicateNames = controls => {\n get('loading duplicate names', '/api/users/duplicate_names', controls)\n}\n\nexport const apiLoadDuplicateEmails = controls => {\n get('loading duplicate emails', '/api/users/duplicate_emails', controls)\n}\n\nexport const apiLoadInvalidAcblNumbers = controls => {\n get(\n 'loading invalid ACBL numbers',\n '/api/users/invalid_acbl_numbers',\n controls,\n )\n}\n\nexport const apiGetUsersSummary = controls => {\n get('getting users summary', '/api/users/summary', controls)\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst BouncingDots = props => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n )\n}\n\nBouncingDots.propTypes = {\n color: PropTypes.string,\n}\n\nBouncingDots.defaultProps = {\n color: '#337ab7',\n}\n\nexport default BouncingDots\n","import React from 'react'\nimport { Icon } from 'components/elements/Icons'\n\nconst HiddenIcon = () => \n\nexport default HiddenIcon\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\nimport { getIconClassname } from 'helpers/icons'\nimport { ColorConstants } from 'helpers/colors'\n\nconst Icon = props => {\n let cls = getIconClassname(props.icon)\n if (cls == 'icon-TBD') {\n console.error(\n `%c[RSVP] ---- UNRECOGNIZED ICON: ${props.icon}`,\n 'color: #aa0000; font-weight: bold;',\n 'abc',\n )\n }\n if (props.classes) {\n cls = cls + ' ' + props.classes\n }\n if (props.tag) {\n cls = cls + ' tag-icon'\n }\n const clickable = !(\n props.onClick === null || typeof props.onClick === 'undefined'\n )\n let color = null\n let bg\n if (props.danger) {\n color = ColorConstants.text.danger\n }\n if (props.success) {\n color = ColorConstants.text.success\n }\n if (props.warning) {\n color = ColorConstants.text.warning\n }\n if (props.info) {\n color = ColorConstants.text.info\n }\n if (props.positive) {\n color = ColorConstants.positive\n }\n if (props.negative) {\n color = ColorConstants.negative\n }\n if (props.neutral) {\n color = ColorConstants.neutral\n }\n if (props.transparent) {\n color = 'transparent'\n }\n if (props.redSuit) {\n color = ColorConstants.redSuit + ' !important'\n }\n if (props.blackSuit) {\n color =\n (props.inverted ? ColorConstants.white : ColorConstants.blackSuit) +\n ' !important'\n }\n if (props.color) {\n color = props.inverted ? null : props.color\n bg = props.inverted ? props.color : null\n }\n\n return (\n \n )\n}\n\nIcon.propTypes = {\n icon: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n classes: PropTypes.string,\n color: PropTypes.string,\n weight: PropTypes.string,\n\n danger: PropTypes.bool,\n success: PropTypes.bool,\n warning: PropTypes.bool,\n info: PropTypes.bool,\n positive: PropTypes.bool,\n negative: PropTypes.bool,\n neutral: PropTypes.bool,\n transparent: PropTypes.bool,\n redSuit: PropTypes.bool,\n blackSuit: PropTypes.bool,\n\n inverted: PropTypes.bool,\n tag: PropTypes.bool,\n\n spaceAfter: PropTypes.bool,\n spaceBefore: PropTypes.bool,\n small: PropTypes.bool,\n verySmall: PropTypes.bool,\n big: PropTypes.bool,\n}\n\nIcon.defaultProps = {\n weight: 'normal',\n danger: false,\n success: false,\n warning: false,\n info: false,\n positive: false,\n negative: false,\n neutral: false,\n transparent: false,\n redSuit: false,\n blackSuit: false,\n\n inverted: false,\n tag: false,\n\n spaceAfter: false,\n spaceBefore: false,\n small: false,\n verySmall: false,\n big: false,\n}\n\nexport default Icon\n\nconst IconContainer = styled.span`\n ${p => (p.$color ? `color: ${p.$color};` : '')}\n ${p => (p.$bg ? `background-color: ${p.$bg};` : '')}\n ${p => (p.$verySmall ? 'font-size: 70%;' : '')}\n ${p => (p.$small ? 'font-size: 85%;' : '')}\n ${p => (p.$big ? 'font-size: 22px;' : '')}\n ${p => (p.$spaceBefore ? 'margin-left: 0.3em;' : '')}\n ${p => (p.$spaceAfter ? 'margin-right: 0.3em;' : '')}\n ${p => (p.$clickable ? 'cursor: pointer;' : '')}\n ${p => (p.$weight ? `font-weight: ${p.$weight}` : '')}\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\nimport { getIconClassname } from 'helpers/icons'\n\nconst iconClassName = getIconClassname('open-close')\n\nconst StyledOpenCloseIcon = styled.span`\n transition: transform 0.3s;\n display: inline-block;\n margin: ${p => (p.$padRight ? '0 5px 0 0' : '0')};\n cursor: pointer;\n transform: ${p =>\n p.$open ? 'rotate(90deg)' : p.$reverse ? 'rotate(180deg)' : 'rotate(0deg)'};\n ${p => (p.$navSelector ? 'font-size: 30px; margin-left: -10px;' : '')}\n ${p => (p.$configureSelector ? 'font-size: 20px;' : '')}\n ${p =>\n p.$bordered\n ? 'border: 1px solid #aaa; border-radius: 3px; background-color: #ffffff;'\n : ''}\n`\n\nconst OpenCloseIcon = ({\n open,\n padRight,\n reverse,\n navSelector,\n configureSelector,\n bordered,\n ...rest\n}) => {\n return (\n \n )\n}\n\nOpenCloseIcon.propTypes = {\n open: PropTypes.bool.isRequired,\n padRight: PropTypes.bool,\n reverse: PropTypes.bool,\n navSelector: PropTypes.bool,\n configureSelector: PropTypes.bool,\n bordered: PropTypes.bool,\n}\n\nOpenCloseIcon.defaultProps = {\n padRight: false,\n reverse: false,\n navSelector: false,\n}\n\nexport default OpenCloseIcon\n","import React from 'react'\nimport { Icon } from 'components/elements/Icons'\n\nconst VisibleIcon = () => \n\nexport default VisibleIcon\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { VisibleIcon, HiddenIcon } from 'components/elements/Icons'\n\nconst VisibleOrHiddenIcon = ({ show, visible }) => {\n return show ? visible ? : : null\n}\n\nVisibleOrHiddenIcon.propTypes = {\n show: PropTypes.bool,\n visible: PropTypes.bool,\n}\n\nVisibleOrHiddenIcon.defaultProps = {\n show: true,\n visible: false,\n}\n\nexport default VisibleOrHiddenIcon\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Preferred = props => {\n return props.preferred ? : null\n}\n\nPreferred.propTypes = {\n preferred: PropTypes.bool,\n}\n\nexport default Preferred\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { HelpText, Fee } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst AccountRbucksBalance = ({ account }) => {\n return (\n \n

\n \n Current Balance: \n \n

\n

\n \n Obligated to future events: \n \n

\n\n

\n R-Bucks, (\n ), are the currency of RSVP Bridge. Players pay their table fees with\n R-Bucks, which are then credited to the account. Accounts pay the fees\n due to RSVP Bridge from from their R-Bucks balance.\n

\n

\n \n Your account R-Bucks are separate from your personal R-Bucks.\n \n

\n
\n )\n}\n\nAccountRbucksBalance.propTypes = {\n account: PropTypes.object.isRequired,\n}\n\nexport default AccountRbucksBalance\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\nconst AwardPigment = props => {\n return (\n \n {props.children}\n \n )\n}\n\nAwardPigment.propTypes = {\n color: PropTypes.string,\n children: PropTypes.node,\n horizontal: PropTypes.bool,\n first: PropTypes.bool,\n last: PropTypes.bool,\n only: PropTypes.bool,\n}\n\nexport default AwardPigment\n\nconst AwardPigmentStyle = styled.div`\n display: ${p => (p.$horizontal ? 'inline-block' : 'block')};\n font-weight: ${p => (p.$color ? 'normal' : '700')};\n color: ${p => (p.$color ? 'white' : 'inherit')};\n text-transform: uppercase;\n border-radius: ${p =>\n p.$only\n ? '8px'\n : p.$horizontal\n ? p.$first\n ? '8px 0 0 8px'\n : p.$last\n ? '0 8px 8px 0'\n : '0'\n : p.$first\n ? '8px 8px 0 0'\n : p.$last\n ? '0 0 8px 8px'\n : '0'};\n margin-top: ${p => (p.$only || p.$horizontal || p.$first ? '3px' : 0)};\n margin-bottom: ${p => (p.$only || p.$horizontal || p.$last ? '3px' : 0)};\n padding: 2px 4px;\n background-color: ${p =>\n p.$color == 'Black'\n ? '#222222'\n : p.$color == 'Red'\n ? '#aa0000'\n : p.$color == 'Silver'\n ? '#aaaaaa'\n : p.$color == 'Gold'\n ? '#a59737'\n : 'inherit'};\n`\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Badge = props => {\n return {props.children}\n}\n\nBadge.propTypes = {\n children: PropTypes.node,\n color: PropTypes.string,\n}\n\nBadge.defaultProps = {\n color: 'positive',\n}\n\nconst BadgeContainer = styled.div`\n display: inline-block;\n position: relative;\n font-size: 10px;\n line-height: 13px;\n color: #fff;\n background-color: ${p =>\n p.$color == 'negative' ? ColorConstants.negative : ColorConstants.positive};\n border-radius: 50%;\n height: 15px;\n width: 15px;\n text-align: center;\n top: -8px;\n padding: 2px;\n`\n\nexport default Badge\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Button } from 'react-bootstrap'\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst BecomeLink = props => {\n if (props.allowed) {\n if (props.iconOnly) {\n return (\n \n \n \n )\n } else {\n return (\n \n Become\n \n )\n }\n } else {\n return null\n }\n}\n\nBecomeLink.propTypes = {\n allowed: PropTypes.bool.isRequired,\n userId: PropTypes.number.isRequired,\n iconOnly: PropTypes.bool,\n}\n\nexport default BecomeLink\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Suit } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Bid = ({ score }) => {\n return (\n \n {score.contract_qty}\n \n {score.doubled ? ' x' : score.redoubled ? ' xx' : ''}\n \n )\n}\n\nBid.propTypes = {\n score: PropTypes.object.isRequired,\n}\n\nexport default Bid\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { dealer, vulnerability } from 'helpers/utilities'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\nconst dealerClass = b => {\n return `dealer-${dealer(b).toLowerCase()}`\n}\n\nconst vulClass = b => {\n const v = vulnerability(b).replace('/', '').toLowerCase()\n return `vul-${v}`\n}\n\n// --------------------\n\nconst Board = props => {\n const absBoardNumber = props.board % 100\n return (\n \n \n
{absBoardNumber}
\n
D
\n \n \n )\n}\n\nBoard.propTypes = {\n board: PropTypes.number.isRequired,\n action: PropTypes.func,\n size: PropTypes.string,\n disabled: PropTypes.bool,\n bordered: PropTypes.bool,\n}\nBoard.defaultProps = {\n size: 'regular',\n}\n\nexport default Board\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { BoardSet } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst BoardNumber = ({ sectionId, board }) => {\n return board >= 100 ? (\n \n Board {board % 100} in Set {parseInt(board / 100)}\n \n ) : (\n Board {board % 100}\n )\n}\n\nBoardNumber.propTypes = {\n sectionId: PropTypes.number,\n board: PropTypes.number,\n}\n\nexport default BoardNumber\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\nimport { usePaneState } from 'contexts/pane-memory-context'\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\nimport { BoardSet } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\nconst BoardSelectorContainer = styled.div`\n background-color: ${ColorConstants.bg.instruction};\n padding: 5px;\n margin-bottom: 10px;\n border-radius: 3px;\n display: flex;\n flex-flow: row wrap;\n gap: ${p => (p.$multi ? '3px' : '5px')};\n justify-content: center;\n .btn {\n margin-bottom: 0;\n line-height: 1;\n }\n`\nconst BoardButton = styled.div`\n cursor: ${p => (p.$disabled ? 'default' : 'pointer')};\n ${p => (!p.$multi ? 'min-width: 35px;' : '')}\n text-align: center;\n border: 1px solid\n ${p => (p.$selected ? '#000000' : p.$multi ? 'transparent' : '#cccccc')};\n border-radius: 5px;\n padding: 2px 5px;\n background-color: ${p =>\n p.$multi\n ? p.$selected\n ? '#ffffff'\n : 'transparent'\n : p.$disabled\n ? '#eeeeee'\n : p.$selected\n ? ColorConstants.medBlue\n : '#ffffff'};\n color: ${p =>\n p.$disabled ? '#777777' : p.$selected ? '#ffffff' : '#000000'};\n &:hover {\n background-color: ${p =>\n p.$multi\n ? p.$selected\n ? '#ffffff'\n : '#ffffff'\n : p.$selected\n ? ColorConstants.medBlue\n : '#eeeeee'};\n }\n`\n\n// --------------------\n\nconst BoardSelector = ({\n memoryKey,\n boards,\n sectionId,\n nextPrevOnly,\n skipAll,\n}) => {\n const [selectedBoard, setSelectedBoard] = usePaneState(\n memoryKey,\n 'selectedBoard',\n boards[0],\n )\n\n const firstBoard = boards[0]\n const lastBoard = boards[boards.length - 1]\n const isMulti = firstBoard >= 100\n\n const prevBoard = () => {\n setSelectedBoard(\n selectedBoard === firstBoard\n ? lastBoard\n : boards[boards.indexOf(selectedBoard) - 1],\n )\n }\n\n const nextBoard = () => {\n setSelectedBoard(\n selectedBoard === lastBoard\n ? firstBoard\n : boards[boards.indexOf(selectedBoard) + 1],\n )\n }\n\n const boardDisplay = board => {\n const bs = Math.floor(board / 100)\n const b = board % 100\n return sectionId && bs > 0 ? (\n \n {b}\n \n ) : (\n board\n )\n }\n\n return (\n \n {nextPrevOnly && (\n setSelectedBoard(firstBoard)}\n >\n <<\n \n )}\n\n \n <\n \n\n {nextPrevOnly ? (\n \n {boardDisplay(selectedBoard)}\n \n ) : (\n <>\n {!skipAll && (\n setSelectedBoard(0)}\n >\n All\n \n )}\n {boards.map(board => {\n return (\n = 100}\n $selected={selectedBoard === board}\n onClick={() => setSelectedBoard(board)}\n >\n {boardDisplay(board)}\n \n )\n })}\n \n )}\n \n >\n \n {nextPrevOnly && (\n setSelectedBoard(lastBoard)}\n >\n >>\n \n )}\n \n )\n}\n\nBoardSelector.propTypes = {\n skipAll: PropTypes.bool,\n memoryKey: PropTypes.string.isRequired,\n boards: PropTypes.array.isRequired,\n nextPrevOnly: PropTypes.bool,\n sectionId: PropTypes.number,\n}\n\nexport default BoardSelector\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\nimport { tint } from 'polished'\n\n// import apis\n\n// import redux, selectors, actions\nimport { useSelector } from 'react-redux'\nimport { getSectionBoardSets } from 'redux/selectors/event_selectors'\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { getLabelFromValue } from 'helpers/utilities'\nimport { BOARD_COLOR_OPTIONS } from 'helpers/constants'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst BoardSet = ({ sectionId, setNumber, small, spaceAfter, children }) => {\n const boardSets = useSelector(state => getSectionBoardSets(state, sectionId))\n const color =\n boardSets && boardSets[setNumber] ? boardSets[setNumber].color : '#ccc'\n\n let label = setNumber ? getLabelFromValue(color, BOARD_COLOR_OPTIONS) : null\n\n if (label == 'Unspecified') {\n label = `Board Set ${setNumber}`\n } else {\n label = `${label}`\n }\n\n return setNumber ? (\n \n {children || label}\n \n ) : null\n}\n\nBoardSet.propTypes = {\n sectionId: PropTypes.number,\n setNumber: PropTypes.number,\n children: PropTypes.node,\n small: PropTypes.bool,\n spaceAfter: PropTypes.bool,\n}\n\nBoardSet.defaultProps = {\n small: false,\n options: {\n color: '#cccccc',\n },\n}\n\nexport default BoardSet\n\nconst BoardSetDisplay = styled.div`\n border-radius: 3px;\n display: inline-block;\n padding: 2px 5px 1px 4px;\n line-height: 1;\n font-size: ${p => (p.$small ? '66%' : '85%')};\n box-shadow: 0 0 1px 1px #000;\n border-left: 15px solid ${p => p.$color};\n color: #000;\n background-color: ${p => tint(0.67, p.$color || '#ccc')};\n margin-right: ${p => (p.$spaceAfter ? '5px' : '0')};\n`\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { tint } from 'polished'\n\n// import apis\n\n// import redux, selectors, actions\nimport { useSelector } from 'react-redux'\nimport { getSectionBoardSets } from 'redux/selectors/event_selectors'\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst BoardSetContainer = ({ sectionId, boardNumber, children }) => {\n const boardSets = useSelector(state => getSectionBoardSets(state, sectionId))\n const setNumber = boardNumber > 100 ? parseInt(boardNumber / 100) : null\n const bg = setNumber ? tint(0, boardSets[setNumber].color) : 'transparent'\n\n return
{children}
\n}\n\nBoardSetContainer.propTypes = {\n sectionId: PropTypes.number,\n boardNumber: PropTypes.number,\n children: PropTypes.node,\n}\n\nexport default BoardSetContainer\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { SHORT_MONTHS } from 'helpers/constants'\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst SelectMonth = ({\n month,\n year,\n setYearMonth,\n earliest,\n latest,\n close,\n}) => {\n const canChoose = m => {\n if (earliest) {\n if (year == earliest.year && m < earliest.month) {\n return false\n }\n }\n if (latest) {\n if (year == latest.year && m > latest.month) {\n return false\n }\n }\n return true\n }\n\n const select = m => {\n if (canChoose(m)) {\n setYearMonth(year, m)\n close()\n }\n }\n\n return (\n \n {SHORT_MONTHS.map((m, i) => (\n select(i + 1)}\n $selected={month === i + 1}\n $canChoose={canChoose(i + 1)}\n >\n {canChoose(i + 1) ? m : ' '}\n \n ))}\n \n )\n}\n\nSelectMonth.propTypes = {\n month: PropTypes.number.isRequired,\n year: PropTypes.number.isRequired,\n setYearMonth: PropTypes.func.isRequired,\n close: PropTypes.func.isRequired,\n earliest: PropTypes.object,\n latest: PropTypes.object,\n}\n\nconst MonthsContainer = styled.div`\n padding: 10px 0;\n display: grid;\n gap: 10px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n`\n\nconst Month = styled.div`\n padding: 2px 5px;\n text-align: center;\n border-radius: 10px;\n background-color: ${p =>\n p.$selected\n ? ColorConstants.medBlue\n : p.$canChoose\n ? ColorConstants.bg.instruction\n : 'transparent'};\n color: ${p => (p.$selected ? ColorConstants.white : ColorConstants.text)};\n cursor: ${p => (p.$selected || !p.$canChoose ? 'default' : 'pointer')};\n &:hover {\n background-color: ${p =>\n p.$selected\n ? ColorConstants.medBlue\n : p.$canChoose\n ? ColorConstants.bg.neutral\n : 'transparent'};\n }\n`\n\nexport default SelectMonth\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { rangeMtoN } from 'helpers/utilities'\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst SelectYear = ({ month, year, setYearMonth, earliest, latest, close }) => {\n const select = y => {\n setYearMonth(y, month)\n close()\n }\n\n const startYear = earliest ? earliest.year : 2016\n const endYear = latest ? latest.year : new Date().getFullYear() + 1\n\n const range = rangeMtoN(startYear, endYear)\n\n return (\n \n {range.map((y, i) => (\n select(y)} $selected={y === year + 1}>\n {y}\n \n ))}\n \n )\n}\n\nSelectYear.propTypes = {\n month: PropTypes.number.isRequired,\n year: PropTypes.number.isRequired,\n setYearMonth: PropTypes.func.isRequired,\n close: PropTypes.func.isRequired,\n earliest: PropTypes.object,\n latest: PropTypes.object,\n}\n\nconst YearsContainer = styled.div`\n padding: 10px 0;\n display: grid;\n gap: 10px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n`\n\nconst Year = styled.div`\n padding: 5px;\n text-align: center;\n border-radius: 10px;\n background-color: ${props =>\n props.$selected ? ColorConstants.medBlue : ColorConstants.bg.instruction};\n color: ${props =>\n props.$selected ? ColorConstants.white : ColorConstants.text};\n cursor: ${props => (props.$selected ? 'default' : 'pointer')};\n &:hover {\n background-color: ${props =>\n props.$selected ? ColorConstants.medBlue : ColorConstants.bg.neutral};\n }\n`\n\nexport default SelectYear\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { MONTH } from 'helpers/constants'\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\nimport { Icon, OpenCloseIcon } from 'components/elements/Icons'\n\n// import common elements\n\n// import components\nimport SelectMonth from './SelectMonth'\nimport SelectYear from './SelectYear'\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst CalendarSelector = props => {\n const {\n year,\n month,\n setDay,\n setYearMonth,\n dayHighlight,\n highlightCell,\n bg,\n dayDisabled,\n responsive,\n earliest,\n latest,\n } = props\n\n const [weeks, setWeeks] = React.useState([])\n const [showRowsResponsive, setShowRowsResponsive] = React.useState(false)\n const toggleRows = () => setShowRowsResponsive(t => !t)\n\n const [selectingMonth, setSelectingMonth] = React.useState(false)\n const toggleSelectingMonth = () => setSelectingMonth(t => !t)\n\n const [selectingYear, setSelectingYear] = React.useState(false)\n const toggleSelectingYear = () => setSelectingYear(t => !t)\n\n const canGoForward = latest\n ? year < latest.year || month < latest.month\n : true\n const canGoBack = earliest\n ? year > earliest.year || month > earliest.month\n : true\n\n React.useEffect(() => {\n if (selectingMonth) {\n setSelectingYear(false)\n setShowRowsResponsive(true)\n }\n }, [selectingMonth])\n\n React.useEffect(() => {\n if (selectingYear) {\n setSelectingMonth(false)\n setShowRowsResponsive(true)\n }\n }, [selectingYear])\n\n React.useEffect(() => {\n let updatedWeeks = []\n let date = new Date(year, month - 1, 1)\n let week = [false, false, false, false, false, false, false]\n let weekday\n do {\n let day = date.getDate()\n weekday = date.getDay()\n week[weekday] = { day: day }\n if (weekday == 6) {\n // Saturday\n updatedWeeks.push([...week])\n week = [false, false, false, false, false, false, false]\n }\n date.setDate(date.getDate() + 1)\n } while (date.getMonth() == month - 1)\n if (weekday != 6) {\n updatedWeeks.push([...week])\n }\n setWeeks(updatedWeeks)\n }, [year, month])\n\n const dateBack = () => {\n if (month == 1) {\n setYearMonth(year - 1, 12)\n } else {\n setYearMonth(year, month - 1)\n }\n }\n\n const dateForward = () => {\n if (month == 12) {\n setYearMonth(year + 1, 1)\n } else {\n setYearMonth(year, month + 1)\n }\n }\n\n const cellHighlight = d => {\n if (highlightCell) {\n return highlightCell(d)\n } else {\n return false\n }\n }\n\n const calendarRows = () => {\n return weeks.map((week, w) => (\n \n {week.map((weekday, d) => {\n const disabled = dayDisabled ? dayDisabled(weekday.day) : false\n const date = weekday.day\n return (\n (disabled ? null : setDay(date))}\n >\n {weekday ? (\n \n {date}\n \n ) : (\n \n )}\n \n )\n })}\n \n ))\n }\n\n return (\n \n {canGoBack ? (\n \n \n \n ) : (\n \n )}\n\n \n \n
\n {responsive && (\n \n \n \n )}\n
\n
{MONTH[month - 1]}
\n
{year}
\n
\n\n \n {selectingMonth ? (\n setSelectingMonth(false)}\n />\n ) : selectingYear ? (\n setSelectingYear(false)}\n />\n ) : (\n calendarRows()\n )}\n \n
\n\n {canGoForward ? (\n \n \n \n ) : (\n \n )}\n
\n )\n}\n\nconst CalendarBox = styled.div`\n flex: 0 0 auto;\n display: flex;\n justify-content: center;\n\n @media (max-width: 700px) {\n margin: 0 auto;\n }\n`\n\nconst Direction = styled.div`\n align-self: stretch;\n display: flex;\n align-items: center;\n background-color: #eee;\n border: 1px solid #aaa;\n width: 30px;\n cursor: ${p => (p.$disabled ? 'default' : 'pointer')};\n border-radius: ${p => (p.$back ? '50% 5px 5px 50%' : '5px 50% 50% 5px')};\n &:hover {\n ${p => (p.$disabled ? '' : 'border-color: #a2a2a2;')};\n ${p => (p.$disabled ? '' : 'background-color: #ddd;')};\n }\n & > span {\n display: block;\n margin: 0 auto;\n }\n`\n\nconst Calendar = styled.div`\n margin: 0 15px;\n width: 240px;\n padding: 0 5px;\n border: 1px solid #ccc;\n border-radius: 10px;\n background-color: ${p => p.$bg};\n @media (max-width: 359px) {\n width: 200px;\n margin: 0 10px;\n }\n`\n\nconst YearMoHeader = styled.div`\n display: grid;\n gap: 10px;\n grid-template-columns: min-content 1fr 1fr;\n text-align: center;\n font-weight: 700;\n text-align: left;\n & > div {\n cursor: pointer;\n }\n div:nth-child(even) {\n text-align: right;\n }\n`\n\nconst Week = styled.div`\n display: flex;\n justify-content: space-evenly;\n margin-bottom: 5px;\n`\n\nconst Cell = styled.div`\n border-radius: 4px;\n box-shadow: ${p => (p.$highlight ? '0 0 6px 0 inset #0875a0' : 'none')};\n`\nconst Day = styled.div`\n text-align: center;\n width: 24px;\n height: 24px;\n margin: 3px;\n font-size: 16px;\n font-weight: ${p => p.$fontWeight};\n line-height: 24px;\n border-radius: 50%;\n cursor: ${p => (p.$disabled ? 'default' : 'pointer')};\n color: ${p => p.$color};\n background-color: ${p => p.$bg};\n box-shadow: ${p => p.$boxShadow};\n`\n\nconst CalendarRows = styled.div`\n display: block;\n @media (max-width: 767px) {\n display: ${p => (p.$hidden ? 'none' : 'block')};\n }\n`\n\nconst SmallScreenOnly = styled.div`\n display: none;\n @media (max-width: 767px) {\n display: inline-block;\n }\n`\n\nCalendarSelector.propTypes = {\n year: PropTypes.number.isRequired,\n month: PropTypes.number.isRequired,\n setYearMonth: PropTypes.func.isRequired,\n setDay: PropTypes.func.isRequired,\n dayHighlight: PropTypes.func.isRequired,\n highlightCell: PropTypes.func,\n dayDisabled: PropTypes.func,\n bg: PropTypes.string,\n responsive: PropTypes.bool,\n earliest: PropTypes.object,\n latest: PropTypes.object,\n}\nCalendarSelector.defaultProps = {\n bg: ColorConstants.bg.tableTitle,\n fontWeight: 'normal',\n}\n\nexport default CalendarSelector\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Suit } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Card = props => {\n if (props.card) {\n const rank = props.card[0]\n const suit = props.card[1]\n const size = props.smaller ? 'smaller' : 'regular'\n return (\n \n \n {rank}\n \n )\n } else {\n return null\n }\n}\n\nCard.propTypes = {\n card: PropTypes.string,\n smaller: PropTypes.bool,\n}\n\nexport default Card\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Suit, Rank } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst CardGraphic = props => {\n if (props.card) {\n let rank = props.card[0]\n let suit = props.card[1]\n let size = props.size ? props.size : ''\n let bordered = props.bordered ? 'bordered' : ''\n let inverted = props.inverted ? 'inverted' : ''\n let highlighted = props.highlighted ? 'highlighted' : ''\n let led = props.led ? 'led' : ''\n let suitColor = suit == 'H' || suit == 'D' ? 'red-suit' : 'black-suit'\n return (\n \n \n
\n \n
\n \n )\n } else {\n return null\n }\n}\n\nCardGraphic.propTypes = {\n card: PropTypes.string,\n bordered: PropTypes.bool,\n inverted: PropTypes.bool,\n highlighted: PropTypes.bool,\n led: PropTypes.bool,\n size: PropTypes.string,\n}\n\nexport default CardGraphic\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Checked = ({ checked, toggle, text, display }) => {\n const icon = checked ? 'checkbox-checked2' : 'checkbox-unchecked2'\n return (\n
\n {text}\n
\n )\n}\n\nChecked.propTypes = {\n checked: PropTypes.bool.isRequired,\n toggle: PropTypes.func.isRequired,\n text: PropTypes.node.isRequired,\n display: PropTypes.string,\n}\nChecked.defaultProps = {\n display: 'block',\n}\n\nexport default Checked\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\nimport { useToggle } from 'hooks/useToggle'\n\n// import utilities\n\n// import common elements\nimport { ParsedHtml, ClubLogo } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\nconst truncateAt = 300\n\n// --------------------\n\nconst ClubAlert = ({ club, dismiss }) => {\n const alert = club.alert\n const isLong = club.alert.length > truncateAt\n\n const [content, setContent] = React.useState('')\n const [expanded, toggleExpanded] = useToggle(false)\n\n React.useEffect(() => {\n if (expanded || alert.length <= truncateAt) {\n setContent(alert)\n } else {\n setContent(alert.substring(0, truncateAt))\n }\n }, [expanded, alert])\n\n const dismissClub = () => dismiss(club.id)\n\n return (\n \n \n \n {club.logo_url ? (\n \n ) : (\n From {club.title}:\n )}\n \n\n \n \n \n \n {isLong && (\n \n )}\n \n\n {dismiss && (\n \n ×\n \n )}\n \n \n )\n}\n\nClubAlert.propTypes = {\n club: PropTypes.object.isRequired,\n dismiss: PropTypes.func,\n}\n\nexport default ClubAlert\n\nconst AlertContainer = styled.div`\n background-color: #ffffff;\n border-color: #44abc0;\n border-style: solid;\n border-width: 3px 3px 3px 10px;\n border-radius: 10px;\n margin-bottom: 15px;\n padding: 5px 10px 5px 5px;\n`\n\nconst AlertContent = styled.div`\n display: grid;\n grid-template-columns: min-content 1fr min-content;\n gap: 10px;\n grid-template-areas: 'logo content dismiss';\n font-size: 85%;\n`\nconst AlertArea = styled.div`\n grid-area: ${p => p.$area};\n`\n\nconst AlertClub = styled.div`\n color: #44abc0;\n font-weight: 700;\n text-transform: uppercase;\n min-width: 150px;\n`\n\nconst Faded = styled.div`\n --mask: linear-gradient(\n to bottom,\n rgba(0, 0, 0, 1) 0,\n rgba(0, 0, 0, 1) 40%,\n rgba(0, 0, 0, 0) 95%,\n rgba(0, 0, 0, 0) 0\n )\n 100% 50% / 100% 100% repeat-x;\n\n ${p => p.$fade && '-webkit-mask: var(--mask); mask: var(--mask);'}\n`\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\nimport { useCurrentUserState } from 'contexts/current-user-context'\nimport { usePaneMemory } from 'contexts/pane-memory-context'\nimport { setStoredValue } from 'contexts/page-context/storage_methods'\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ClubLink = ({ club, iconOnly }) => {\n const currentUser = useCurrentUserState()\n const { remember } = usePaneMemory()\n\n const clubTitle = club.title || club.club_title\n const clubId = club.id || club.club_id\n\n const goThere = () => {\n remember('SSCU|selected-managed-club', clubId)\n setStoredValue('/', currentUser.id, 'activePane', 'club-config')\n window.location = '/'\n }\n\n return iconOnly ? (\n \n ) : (\n {clubTitle}\n )\n}\n\nClubLink.propTypes = {\n club: PropTypes.object.isRequired,\n iconOnly: PropTypes.bool,\n}\n\nconst ClubLinkContainer = styled.a`\n cursor: pointer;\n display: block;\n color: ${ColorConstants.text.clubTitle};\n font-weight: 900;\n`\n\nexport default ClubLink\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ClubLogo = ({ club, height, centered, maxWidth }) => {\n if (!club.logo_url) {\n return null\n }\n return (\n \n )\n}\n\nClubLogo.propTypes = {\n club: PropTypes.object.isRequired,\n height: PropTypes.number,\n centered: PropTypes.bool,\n maxWidth: PropTypes.string,\n}\n\nClubLogo.defaultProps = {\n height: 50,\n centered: false,\n}\n\nexport default ClubLogo\n\nconst LogoImg = styled.img`\n margin: ${p => (p.$centered ? '3px auto' : '3px')};\n display: ${p => (p.$centered ? 'block' : 'inline')};\n ${p =>\n p.$maxWidth ? `max-width: ${p.$maxWidth}; width: auto; height: auto;` : ''};\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ClubTitle = ({ club, clubTitle }) => {\n return (\n {club ? club.title : clubTitle}\n )\n}\n\nClubTitle.propTypes = {\n club: PropTypes.object,\n clubTitle: PropTypes.string,\n}\n\nexport default ClubTitle\n\nconst ClubTitleContainer = styled.div`\n text-transform: uppercase;\n color: ${ColorConstants.text.clubTitle};\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Button, ButtonToolbar } from 'react-bootstrap'\nimport { Spinner } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Confirm = props => {\n const [clicked, setClicked] = React.useState(false)\n const { open } = props\n\n React.useEffect(() => {\n setClicked(false)\n }, [open])\n\n const confirm = () => {\n setClicked(true)\n props.onConfirm()\n }\n\n const cancel = () => {\n setClicked(true)\n props.onCancel()\n }\n\n if (props.open) {\n return (\n
\n

\n {props.content}\n

\n {props.processing ? (\n
\n \n Processing...\n
\n ) : (\n \n \n \n \n )}\n
\n )\n } else {\n return props.closed\n }\n}\n\nConfirm.propTypes = {\n open: PropTypes.bool,\n content: PropTypes.node.isRequired,\n confirmButton: PropTypes.node,\n onConfirm: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n cancelButton: PropTypes.node,\n closed: PropTypes.node,\n processing: PropTypes.bool,\n}\n\nexport default Confirm\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Bid, Seat, ScoreResult } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\nconst artificialScore = score => {\n if (score.avg_ns && score.assign_ns_score) {\n return (\n <>\n N/S assigned score {score.assign_ns_score} and protected to{' '}\n {score.avg_ns}\n \n )\n } else if (score.avg_ew && score.assign_ew_score) {\n return (\n <>\n E/W assigned score {score.assign_ew_score} and protected to{' '}\n {score.avg_ew}\n \n )\n } else if (score.assign_ns_score && score.assign_ew_score) {\n return (\n <>\n Assigned Scores: N/S: {score.assign_ns_score}, E/W:{' '}\n {score.assign_ew_score}\n \n )\n } else {\n return (\n <>\n N/S:{' '}\n {score.avg_ns\n ? score.avg_ns\n : score.assign_ns_mp\n ? score.assign_ns_mp\n : '???'}\n {', '}\n E/W:{' '}\n {score.avg_ew\n ? score.avg_ew\n : score.assign_ew_mp\n ? score.assign_ew_mp\n : '???'}\n \n )\n }\n}\n\n// --------------------\n\nconst Contract = ({ score, inline }) => {\n let content\n if (score.recorded) {\n if (score.artificially_scored) {\n content = artificialScore(score)\n } else if (score.passed) {\n content = 'Passed'\n } else if (score.not_played) {\n content = 'Not Played'\n } else {\n content = (\n <>\n by \n {score.ns_score != null ? (\n \n , \n \n ) : null}\n \n )\n }\n } else {\n content = '???'\n }\n return inline ? {content} :
{content}
\n}\n\nContract.propTypes = {\n score: PropTypes.object.isRequired,\n inline: PropTypes.bool,\n}\n\nexport default Contract\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ControlToggle = props => {\n const clickToggle = () => {\n if (!props.disabled) {\n props.clickAction(props.name, !props.checked)\n }\n }\n\n const offWord = props.offWord || 'Off'\n const onWord = props.onWord || 'On'\n\n return (\n \n \n \n {offWord}\n {onWord}\n \n )\n}\n\nControlToggle.propTypes = {\n clickAction: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n offWord: PropTypes.string,\n onWord: PropTypes.string,\n checked: PropTypes.bool,\n left: PropTypes.bool,\n extended: PropTypes.bool,\n name: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.object,\n ]),\n testId: PropTypes.string,\n}\n\nexport default ControlToggle\n\nconst ControlToggleContainer = styled.div`\n position: relative;\n width: ${p => (p.$extended ? '100px' : '50px')};\n height: 40px;\n margin: ${p => (p.$left ? '0' : '0 auto')};\n`\n\nconst SwitchBar = styled.div`\n height: 16px;\n width: ${p => (p.$extended ? '100px' : '50px')};\n border-radius: 8px;\n position: absolute;\n top: 5px;\n left: 0;\n background-color: ${p =>\n p.$on ? `${ColorConstants.positive}77` : `${ColorConstants.neutral}77`};\n box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.4);\n`\n\nconst SwitchDot = styled.div`\n height: 26px;\n width: 26px;\n border-radius: 13px;\n background-color: #ccc;\n position: absolute;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);\n top: 0;\n background-color: ${p =>\n p.$on ? ColorConstants.positive : ColorConstants.neutral};\n ${p => (p.$on ? 'right: 0;' : 'left: 0;')}\n`\n\nconst SwitchText = styled.div`\n font-size: 10px;\n position: absolute;\n bottom: 0;\n text-transform: uppercase;\n font-weight: 700;\n`\n\nconst SwitchTextOn = styled(SwitchText)`\n right: 0;\n color: ${p => (p.$on ? ColorConstants.positive : ColorConstants.neutral)};\n`\n\nconst SwitchTextOff = styled(SwitchText)`\n left: 0;\n color: ${p => (p.$on ? ColorConstants.neutral : ColorConstants.text.default)};\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\nconst CourseIndicator = props => {\n if (!props.group || !props.group.is_course) {\n return null\n }\n return (\n \n Course\n \n )\n}\n\nCourseIndicator.propTypes = {\n group: PropTypes.object,\n spaceBefore: PropTypes.bool,\n spaceAfter: PropTypes.bool,\n}\n\nexport default CourseIndicator\n\nconst CourseIndicatorStyle = styled.span`\n display: inline;\n position: relative;\n top: -3px;\n font-weight: 700;\n color: green;\n border-radius: 3px;\n border: 1px solid green;\n text-transform: uppercase;\n background-color: white;\n font-size: 60%;\n padding: 3px;\n ${p => p.$spaceAfter && 'margin-right: 0.5em;'}\n ${p => p.$spaceBefore && 'margin-left: 0.5em;'}\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\nimport { useCurrentUserState } from 'contexts/current-user-context'\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst DateBox = ({ date, flexed }) => {\n const currentUser = useCurrentUserState()\n const tz = currentUser ? { timeZone: currentUser.tz } : {}\n const jsDate = new Date(date)\n const month = jsDate.toLocaleString([], {\n month: 'short',\n ...tz,\n })\n const day = jsDate.toLocaleString([], {\n day: 'numeric',\n ...tz,\n })\n const weekday = jsDate.toLocaleString([], {\n weekday: 'short',\n ...tz,\n })\n const year = jsDate.toLocaleString([], {\n year: 'numeric',\n ...tz,\n })\n return (\n \n {month}\n {year}\n {day}\n {weekday}\n \n )\n}\n\nDateBox.propTypes = {\n date: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n flexed: PropTypes.bool,\n}\n\nexport default DateBox\n\nconst DateBoxContainer = styled.div`\n width: 40px;\n height: 71px;\n border: 1px solid ${ColorConstants.medBlue};\n border-radius: 0 0 4px 4px;\n background-color: white;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n line-height: 1;\n ${p => p.$flexed && 'margin-right: 10px; flex: 0 0 auto; '}\n`\n\nconst DateMonth = styled.div`\n order: 1;\n flex: 0 0 15px;\n padding-top: 2px;\n background-color: ${ColorConstants.medBlue};\n color: #fff;\n font-size: 12px;\n text-align: center;\n text-transform: uppercase;\n`\n\nconst DateYear = styled.div`\n order: 3;\n flex: 0 0 10px;\n font-size: 10px;\n text-align: center;\n color: #999;\n`\n\nconst DateDay = styled.div`\n order: 2;\n flex: 0 0 27px;\n padding-top: 3px;\n font-size: 24px;\n text-align: center;\n font-weight: 900;\n`\n\nconst DateWDay = styled.div`\n order: 4;\n flex: 0 0 15px;\n padding-top: 2px;\n font-size: 12px;\n text-align: center;\n text-transform: uppercase;\n color: #000000;\n font-weight: 900;\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport DatePicker from 'react-datepicker'\nimport {\n convertToLocalTime,\n convertToTimeZone,\n formatToTimeZone,\n} from 'date-fns-timezone'\nimport styled from 'styled-components'\n\n// Adds time zone support to DatePicker. Source date (aka dateTime) should have the time zone already applied.\n\nconst DatePickerWithTimeZone = props => {\n const { dateTime, timeZone, onChange, ...passedProps } = props\n const [zonelessDate, setZonelessDate] = React.useState(\n dateTime ? convertToTimeZone(dateTime, { timeZone }) : null,\n )\n\n const zone = formatToTimeZone(dateTime || new Date(), 'z', { timeZone })\n\n const handleChange = v => {\n setZonelessDate(v)\n onChange(convertToLocalTime(v, { timeZone }))\n }\n\n return (\n \n \n \n {zone}\n \n \n )\n}\n\nDatePickerWithTimeZone.propTypes = {\n dateTime: PropTypes.any.isRequired,\n timeZone: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n timeZoneToggle: PropTypes.func,\n}\n\nexport default DatePickerWithTimeZone\n\nconst DatePickerContainer = styled.div`\n position: relative;\n .react-datepicker__input-container input {\n padding-right: 35px;\n }\n`\nconst Zone = styled.div`\n position: absolute;\n top: 5px;\n right: 5px;\n cursor: ${p => (p.$clickable ? 'pointer' : 'default')};\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { ButtonGroup, Button } from 'react-bootstrap'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst EventTypeSelector = props => {\n const { eventType, setEventType } = props\n\n const setIndividual = () => {\n setEventType('IndividualEvent')\n }\n\n const setPair = () => {\n setEventType('PairEvent')\n }\n\n const setTeam = () => {\n setEventType('TeamEvent')\n }\n\n return (\n \n {!props.disallowIndividual && (\n \n Individual\n \n )}\n \n Pair\n \n \n Team\n \n \n )\n}\n\nEventTypeSelector.propTypes = {\n eventType: PropTypes.string.isRequired,\n setEventType: PropTypes.func.isRequired,\n disallowIndividual: PropTypes.bool,\n}\n\nexport default EventTypeSelector\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { asCredits, asRoundableCredits } from 'helpers/utilities'\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Fee = props => {\n let fee\n if (typeof props.fee == 'undefined') {\n fee = ''\n } else {\n let n = parseFloat(props.fee)\n fee = props.withPrecision ? asCredits(n) : asRoundableCredits(n)\n }\n\n return (\n \n ${fee}\n \n )\n}\n\nexport default Fee\n\nFee.propTypes = {\n noPrint: PropTypes.bool,\n small: PropTypes.bool,\n spaceBefore: PropTypes.bool,\n spaceAfter: PropTypes.bool,\n fee: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n withPrecision: PropTypes.bool,\n weight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n strike: PropTypes.bool,\n inColor: PropTypes.bool,\n}\n\nFee.defaultProps = {\n weight: 'normal',\n withPrecision: false,\n inColor: false,\n}\n\nconst Rbuck = styled.span`\n font-size: 67%;\n vertical-align: top;\n &:before {\n content: 'R';\n }\n`\n\nconst FeeContainer = styled.span`\n font-weight: ${p => p.$weight};\n font-size: ${p => (p.$small ? '85%' : 'inherit')};\n margin-left: ${p => (p.$spaceBefore ? '0.3em' : '0')};\n margin-right: ${p => (p.$spaceAfter ? '0.3em' : '0')};\n ${p => p.$strike && 'text-decoration: line-through; '}\n ${p => p.$noPrint && '@media print { display: none; } '}\n ${p => p.$inColor && `color: ${ColorConstants.positive};`}\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Fee } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst FeeWithOverride = ({ fee, adjustedFee, ...props }) => {\n return adjustedFee ? (\n <>\n {fee != adjustedFee && }\n \n \n ) : (\n \n )\n}\n\nexport default FeeWithOverride\n\nFeeWithOverride.propTypes = {\n fee: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n adjustedFee: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n}\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst FriendlyText = ({ noSpace, children }) => {\n return {children}\n}\n\nconst Friendly = styled.div`\n font-family: 'Handlee', 'sans-serif';\n line-height: 1.2;\n margin-bottom: ${p => (p.$noSpace ? '0' : '0.5rem')};\n`\n\nFriendlyText.propTypes = {\n children: PropTypes.node,\n noSpace: PropTypes.bool,\n}\n\nexport default FriendlyText\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\nimport { useCurrentUserState } from 'contexts/current-user-context'\nimport { usePaneMemory } from 'contexts/pane-memory-context'\nimport { setStoredValue } from 'contexts/page-context/storage_methods'\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst GroupLink = ({ group, iconOnly }) => {\n const currentUser = useCurrentUserState()\n const { remember } = usePaneMemory()\n\n const groupTitle = group.title || group.group_title\n const groupId = group.id || group.group_id\n\n const goThere = () => {\n remember('SSCU|selected-managed-group', groupId)\n setStoredValue('/', currentUser.id, 'activePane', 'group-setup')\n window.location = '/'\n }\n\n return iconOnly ? (\n \n ) : (\n \n {groupTitle}\n \n )\n}\n\nGroupLink.propTypes = {\n group: PropTypes.object.isRequired,\n iconOnly: PropTypes.bool,\n}\n\nconst GroupLinkContainer = styled.a`\n cursor: pointer;\n display: block;\n color: ${ColorConstants.text.groupTitle};\n font-weight: ${p => (p.$inactive ? 'normal' : '900')};\n`\n\nexport default GroupLink\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { dealer, vulnerability, suitCards } from 'helpers/utilities'\n\n// import common elements\nimport { Suit, Rank, Board } from 'components/elements/Misc'\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\nconst suits = ['S', 'H', 'D', 'C']\n\nconst suit_offset = { S: 0, H: 13, D: 26, C: 39 }\n\nconst rank_offset = {\n A: 0,\n K: 1,\n Q: 2,\n J: 3,\n T: 4,\n 9: 5,\n 8: 6,\n 7: 7,\n 6: 8,\n 5: 9,\n 4: 10,\n 3: 11,\n 2: 12,\n}\n\nconst high_card_points = { A: 4, K: 3, Q: 2, J: 1 }\n\n// --------------------\n\nconst HandChart = props => {\n const handSuitCards = (suit, pos) => {\n return suitCards(props.hand, suit, pos)\n }\n\n const hcp = pos => {\n let pts = 0\n for (const suit of suits) {\n for (const rank of ['A', 'K', 'Q', 'J']) {\n const index = suit_offset[suit] + rank_offset[rank]\n if (props.hand.substr(index, 1) == pos) {\n pts += high_card_points[rank]\n }\n }\n }\n return pts\n }\n\n const renderSeat = position => {\n let pos = position.substring(0, 1)\n let count_for_pos = props.hand.split(pos).length - 1\n let incomplete = count_for_pos < 13\n return (\n
\n
\n
\n {position}\n {dealer(props.board) == position ? ' (D)' : ''}\n
\n
\n {'HCP '}\n {hcp(pos)}\n
\n {incomplete ? (\n
\n \n
\n ) : null}\n
\n {suits.map(suit => {\n return (\n
\n \n \n \n \n {handSuitCards(suit, pos).map(r => (\n \n ))}\n \n
\n )\n })}\n
\n )\n }\n\n const handEntryComplete = () => {\n return props.hand != null && !props.hand.includes('x')\n }\n\n const BridgeSolverLink = () => {\n let vuln\n switch (vulnerability(props.board)) {\n case 'None':\n vuln = 'none'\n break\n case 'N/S':\n vuln = 'ns'\n break\n case 'E/W':\n vuln = 'ew'\n break\n default:\n vuln = 'all'\n }\n const north = BSOLhand('N')\n const south = BSOLhand('S')\n const east = BSOLhand('E')\n const west = BSOLhand('W')\n\n return `http://dds.bridgewebs.com/bsol1/ddummy.htm?club=usa_rsvp&board=${\n props.board\n }&dealer=${\n dealer(props.board)[0]\n }&vul=${vuln}&north=${north}&south=${south}&east=${east}&west=${west}&analyse=true&title=RSVPBridge`\n }\n\n const BSOLhand = pos => {\n const hand = []\n for (const suit of suits) {\n hand.push(handSuitCards(suit, pos).join(''))\n }\n return hand.join('.')\n }\n\n return (\n
\n {props.board ? : null}\n
{renderSeat('North')}
\n
\n {renderSeat('West')}\n {renderSeat('East')}\n
\n
{renderSeat('South')}
\n {handEntryComplete() && props.board ? (\n
\n {props.showBridgeSolver && (\n

\n \n Analyze on BridgeSolver Website\n \n

\n )}\n
\n ) : null}\n
\n )\n}\n\nHandChart.propTypes = {\n hand: PropTypes.string.isRequired,\n board: PropTypes.number.isRequired,\n showBridgeSolver: PropTypes.bool,\n}\n\nexport default HandChart\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst HelpText = props => {\n let classes = ['help-text']\n if (props.variant) {\n classes.push(props.variant)\n }\n if (props.strong) {\n classes.push('strong')\n }\n if (props.tight) {\n classes.push('tight')\n }\n if (props.small) {\n classes.push('small')\n }\n if (props.indented) {\n classes.push('indented')\n }\n if (props.inline) {\n classes.push('inline')\n }\n if (props.spaceBefore) {\n classes.push('vertical-space-before')\n }\n if (props.borderBottom) {\n classes.push('border-bottom')\n }\n if (props.noPrint) {\n classes.push('no-print')\n }\n if (props.shaded) {\n classes.push('shaded')\n }\n return (\n
\n {props.warning && } {props.children}\n
\n )\n}\n\nHelpText.propTypes = {\n variant: PropTypes.string,\n noPrint: PropTypes.bool,\n strong: PropTypes.bool,\n tight: PropTypes.bool,\n indented: PropTypes.bool,\n inline: PropTypes.bool,\n warning: PropTypes.bool,\n spaceBefore: PropTypes.bool,\n borderBottom: PropTypes.bool,\n small: PropTypes.bool,\n children: PropTypes.node.isRequired,\n shaded: PropTypes.bool,\n}\n\nexport default HelpText\n","import React from 'react'\n\nconst HighlightPairMessage = () => (\n

\n To highlight a pair's results throughout the various results tabs, tap\n their name or number.\n

\n)\n\nexport default HighlightPairMessage\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\nconst InactiveIndicator = props => {\n if (!props.inactive) {\n return null\n }\n return (\n \n Inactive\n \n )\n}\n\nInactiveIndicator.propTypes = {\n inactive: PropTypes.bool,\n spaceBefore: PropTypes.bool,\n spaceAfter: PropTypes.bool,\n}\n\nexport default InactiveIndicator\n\nconst InactiveIndicatorStyle = styled.span`\n display: inline;\n position: relative;\n top: -3px;\n font-weight: 700;\n color: #777;\n border-radius: 3px;\n border: 1px solid #777;\n text-transform: uppercase;\n background-color: white;\n font-size: 60%;\n padding: 3px;\n ${p => p.$spaceAfter && 'margin-right: 0.5em;'}\n ${p => p.$spaceBefore && 'margin-left: 0.5em;'}\n`\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst IneligibleIndicator = ({ ineligible }) => {\n if (!ineligible) {\n return null\n }\n\n return ! \n}\n\nIneligibleIndicator.propTypes = {\n ineligible: PropTypes.bool,\n}\n\nconst IIContainer = styled.span`\n font-weight: 900;\n color: ${ColorConstants.negative};\n`\n\nexport default IneligibleIndicator\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { MANAGER_NOTIFICATIONS } from 'helpers/constants.js'\n\n// import common elements\nimport { HelpText } from 'components/elements/Misc'\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ManagerNotifications = ({ member }) => {\n if (!member || !member.manager) {\n return null\n }\n\n if (member.manager_notifications.length == 0) {\n return (\n \n Does not receive notifications.\n \n )\n }\n\n const tasks = member.manager_notifications.map(n => MANAGER_NOTIFICATIONS[n])\n\n return (\n \n
\n Receives:\n
\n {tasks.map(t => (\n
\n • {t}\n
\n ))}\n
\n )\n}\n\nManagerNotifications.propTypes = {\n member: PropTypes.object,\n}\n\nexport default ManagerNotifications\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { commaize } from 'helpers/utilities.js'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst MemberMps = props => {\n if (!props.show) {\n return null\n }\n const { user_mp, estimated_mp, computed, lm } = props.memberMps\n\n return (\n
\n {user_mp != computed ? (\n \n {commaize(user_mp, 2)}{' '}\n {commaize(estimated_mp, 2)}\n \n ) : (\n {commaize(user_mp, 2)}\n )}\n {lm ? ' LM' : ''}\n
\n )\n}\n\nMemberMps.propTypes = {\n show: PropTypes.bool,\n memberMps: PropTypes.object,\n}\n\nexport default MemberMps\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst MaxWidthContainer = props => {\n const fontSize = props.small ? '85%' : 'inherit'\n\n return (\n \n {props.children}\n \n )\n}\n\nMaxWidthContainer.propTypes = {\n maxWidth: PropTypes.string.isRequired,\n small: PropTypes.bool,\n children: PropTypes.node,\n}\n\nconst Container = styled.div`\n max-width: ${p => p.$maxWidth};\n font-size: ${p => p.$fontSize};\n`\n\nexport default MaxWidthContainer\n","import styled from 'styled-components'\nimport { ColorConstants } from 'helpers/colors'\n\nexport const RankContainer = styled.span`\n font-size: 70%;\n display: ${p => (p.$block ? 'block' : 'inline')};\n`\n\nexport const ArrowContainer = styled.div`\n flex: 0 0 ${p => (p.$giant ? '60px' : '35px')};\n height: ${p => (p.$giant ? '50px' : '35px')};\n font-size: ${p => (p.$giant ? '50px' : '35px')};\n line-height: ${p => (p.$giant ? '50px' : '35px')};\n color: ${ColorConstants.text.info};\n text-align: center;\n cursor: pointer;\n background-color: transparent;\n border-radius: 5px;\n &:hover {\n color: ${ColorConstants.text.success};\n }\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Spinner } from 'components/elements/Misc'\n\n// import components\n\n// import styles\nimport { ArrowContainer } from './styles'\n\n// local constants\n\n// --------------------\n\nconst NavigateToEvent = props => {\n const [clicked, setClicked] = React.useState(false)\n\n if (!props.event.id) {\n return null\n }\n\n const handleClick = e => {\n e.stopPropagation()\n if (props.navigateFunction) {\n props.navigateFunction()\n } else {\n setClicked(true)\n setTimeout(() => {\n window.location.href = `/events/${props.event.id}`\n }, 300)\n }\n }\n\n return (\n \n \n \n )\n}\n\nNavigateToEvent.propTypes = {\n event: PropTypes.object.isRequired,\n navigateFunction: PropTypes.func,\n clicked: PropTypes.bool.isRequired,\n giant: PropTypes.bool.isRequired,\n}\nNavigateToEvent.defaultProps = {\n clicked: false,\n giant: false,\n}\n\nexport default NavigateToEvent\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport parse from 'html-react-parser'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ParsedHtml = props => {\n const classes = ['trix-content', ...props.classes]\n if (props.small) {\n classes.push('small')\n }\n return
{parse(props.content || '')}
\n}\n\nParsedHtml.propTypes = {\n content: PropTypes.string,\n small: PropTypes.bool,\n classes: PropTypes.array,\n}\n\nParsedHtml.defaultProps = {\n small: false,\n classes: [],\n}\n\nexport default ParsedHtml\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PaymentRecorded = props => {\n const forText = props.forText ? `${props.forText} ` : ''\n const hasRecordedPayment = props.payer\n ? props.payer.has_recorded_payment\n : false\n const paymentType = props.payer ? props.payer.payment_type : null\n\n const paymentText = () => {\n switch (paymentType) {\n case 'free_play':\n return props.isCourse ? 'Free course!' : 'Free play!'\n case 'check_payment':\n return `Paid ${forText}by check`\n case 'cash_payment':\n return `Paid ${forText}cash`\n case 'credit_card_payment':\n return `Paid ${forText}by credit card`\n case 'course':\n return `Paid ${forText}for course`\n case 'paid_with_rbucks':\n return `Paid ${forText}with R-Bucks`\n default:\n return 'Unpaid'\n }\n }\n\n const paymentIcon = () => {\n switch (paymentType) {\n case 'free_play':\n return 'free'\n case 'check_payment':\n return 'check'\n case 'cash_payment':\n return 'cash'\n case 'credit_card_payment':\n return 'credit-card'\n case 'course':\n return 'teach'\n case 'paid_with_rbucks':\n return 'cardbuck'\n default:\n return 'notification'\n }\n }\n\n const icon = hasRecordedPayment\n ? props.withPaymentIcon\n ? paymentIcon()\n : 'checkmark-circle'\n : 'notification'\n\n return (\n \n \n {props.withText && paymentText()}\n \n )\n}\n\nPaymentRecorded.propTypes = {\n payer: PropTypes.object,\n withText: PropTypes.bool,\n withPaymentIcon: PropTypes.bool,\n isCourse: PropTypes.bool,\n forText: PropTypes.string,\n}\n\nPaymentRecorded.defaultProps = {\n withText: false,\n withPaymentIcon: false,\n isCourse: false,\n}\n\nexport default PaymentRecorded\n","// import packages\nimport React from 'react'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { HelpText } from 'components/elements/Misc'\nimport { Preferred } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PreferredMovementNotation = () => {\n return (\n \n \n Preferred Movements\n \n )\n}\n\nexport default PreferredMovementNotation\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst PhoneLink = props => {\n const digits = props.phone.replace(/[^0-9]+/g, '')\n if (props.phone) {\n return (\n \n {props.phone}\n {props.label && {props.label.toUpperCase()}}\n \n )\n } else {\n return null\n }\n}\n\nPhoneLink.propTypes = {\n phone: PropTypes.string,\n label: PropTypes.string,\n}\n\nexport default PhoneLink\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { AwardPigment } from 'components/elements/Misc'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PigmentedAwards = props => {\n const { awards, horizontal } = props\n const count = awards.length\n return awards.map((award, i) => (\n \n {award.amount}\n \n ))\n}\n\nPigmentedAwards.propTypes = {\n awards: PropTypes.array,\n horizontal: PropTypes.bool,\n}\n\nexport default PigmentedAwards\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { ButtonGroup, Button } from 'react-bootstrap'\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PlusMinusControl = props => {\n const { currentValue, subtract, add, disableSubtract, disableAdd } = props\n\n return (\n \n \n \n \n \n )\n}\n\nPlusMinusControl.propTypes = {\n currentValue: PropTypes.number.isRequired,\n add: PropTypes.func.isRequired,\n subtract: PropTypes.func.isRequired,\n disableAdd: PropTypes.bool.isRequired,\n disableSubtract: PropTypes.bool.isRequired,\n}\n\nexport default PlusMinusControl\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { pricingTierText } from 'helpers/utilities'\n// import common elements\nimport { Label } from 'react-bootstrap'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PricingTier = ({ tier }) => {\n const bsStyle =\n tier == 'rsvp'\n ? 'warning'\n : tier == 'score'\n ? 'success'\n : tier == 'play'\n ? 'primary'\n : 'info'\n\n return \n}\n\nPricingTier.propTypes = {\n tier: PropTypes.string.isRequired,\n}\n\nexport default PricingTier\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { ButtonGroup, Button } from 'react-bootstrap'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PricingTierSelector = props => {\n const { pricingTier, setPricingTier } = props\n\n return (\n \n setPricingTier('rsvp')}\n >\n Reservations\n \n\n setPricingTier('score')}\n >\n In Person\n \n\n setPricingTier('play')}\n >\n Online\n \n\n setPricingTier('teach')}\n >\n Teaching\n \n \n )\n}\n\nPricingTierSelector.propTypes = {\n pricingTier: PropTypes.string.isRequired,\n setPricingTier: PropTypes.func.isRequired,\n}\n\nexport default PricingTierSelector\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { HelpText } from 'components/elements/Misc'\nimport { VisibleIcon, HiddenIcon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst PrivacyControlsMessage = props => {\n return (\n \n {props.user.findable ? (\n
\n

\n You are permitting members of the groups in which you play to find\n your contact information.\n

\n

\n {} denotes information that is shared with group\n members.\n
\n {} denotes information that is hidden from group\n members.\n

\n
\n ) : (\n
\n

\n You have chosen not to share any contact information with other\n members of the groups in which you.\n

\n

\n Others will not be able to find you with the ‘Find\n Someone’ screen, and you will not be listed in directories.\n

\n
\n )}\n\n

\n Managers of your groups will always be able to see whatever contact\n information you have provided.\n

\n\n {props.children}\n
\n )\n}\n\nPrivacyControlsMessage.propTypes = {\n user: PropTypes.object.isRequired,\n children: PropTypes.node,\n}\n\nexport default PrivacyControlsMessage\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\nimport { RankContainer } from './styles'\n\n// local constants\n\n// --------------------\n\nconst Rank = props => {\n return (\n \n \n \n )\n}\n\nRank.propTypes = {\n rank: PropTypes.string.isRequired,\n block: PropTypes.bool,\n color: PropTypes.string,\n weight: PropTypes.string,\n}\nRank.defaultProps = {\n color: '#000000',\n weight: 'normal',\n block: false,\n}\n\nexport default Rank\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\nimport { useCurrentUserState } from 'contexts/current-user-context'\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Collapse, Button } from 'react-bootstrap'\nimport { OpenCloseIcon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst RecentEventsList = ({ recentEvents, more }) => {\n const currentUser = useCurrentUserState()\n const [showRecent, setShowRecent] = React.useState(true)\n const toggleRecent = () => setShowRecent(s => !s)\n return (\n \n \n Recent events:\n \n \n
\n {recentEvents && recentEvents.length > 0 ? (\n
\n {recentEvents.map(re => (\n \n \n {currentUser.isAdmin && `[${re.event_id}] `}\n {re.title} - {re.status.toUpperCase()}\n \n \n ))}\n {more && (\n \n )}\n
\n ) : (\n
No recent events.
\n )}\n
\n
\n
\n )\n}\n\nRecentEventsList.propTypes = {\n recentEvents: PropTypes.array,\n more: PropTypes.func,\n}\n\nconst RecentEventsContainer = styled.div`\n margin-top: 5px;\n border-top: 1px solid #ddd;\n`\n\nconst ListTitle = styled.div`\n text-transform: uppercase;\n font-weight: 700;\n`\n\nconst RecentEvent = styled.div`\n font-size: 85%;\n margin-left: 20px;\n`\n\nexport default RecentEventsList\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst ScoreMadeDelta = ({ score }) => {\n return (\n \n {score['made_delta'] < 0\n ? score['made_delta']\n : score.made_delta == 0\n ? '='\n : `+${score['made_delta']}`}\n \n )\n}\n\nScoreMadeDelta.propTypes = {\n score: PropTypes.object.isRequired,\n}\n\nexport default ScoreMadeDelta\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { ColorConstants } from 'helpers/colors'\n\n// import common elements\nimport { Button } from 'react-bootstrap'\n\n// import components\n\n// import styles\n\n// local constants\nconst RoundSelectorContainer = styled.div`\n background-color: ${ColorConstants.bg.instruction};\n padding: 5px;\n margin-bottom: 10px;\n border-radius: 3px;\n display: flex;\n flex-flow: row wrap;\n gap: 8px;\n justify-content: center;\n .btn {\n margin-bottom: 0;\n line-height: 1;\n }\n`\n// --------------------\n\nconst RoundSelector = ({ rounds, currentRound, setRound }) => {\n return (\n \n {rounds.map(round => {\n return (\n setRound(round)}\n >\n {round}\n \n )\n })}\n \n )\n}\n\nRoundSelector.propTypes = {\n rounds: PropTypes.array.isRequired,\n currentRound: PropTypes.number.isRequired,\n setRound: PropTypes.func.isRequired,\n}\n\nexport default RoundSelector\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst Result = ({ score }) => {\n if (score.ns_score != null) {\n if (score.made_delta >= 0) {\n return Made {score.contract_qty + score.made_delta}\n } else {\n return Down {-1 * score.made_delta}\n }\n } else {\n return null\n }\n}\n\nResult.propTypes = {\n score: PropTypes.object.isRequired,\n}\n\nexport default Result\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\nimport { transparentize } from 'polished'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { ScoringProgressColors } from 'helpers/colors'\nimport { toTitleCase } from 'helpers/utilities'\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst ScoringProgress = ({\n scoringProgress,\n small,\n hasScores,\n filled,\n iconOnly,\n}) => {\n if (!scoringProgress) {\n return null\n }\n const sp =\n scoringProgress == 'not_started' && hasScores ? 'paused' : scoringProgress\n const color =\n scoringProgress == '' ? 'transparent' : ScoringProgressColors[sp]\n const showLabel = !iconOnly\n\n let label = toTitleCase(sp)\n\n return showLabel ? (\n \n {scoringProgress != '' && (\n \n )}\n {scoringProgress != '' && label}\n \n ) : (\n \n )\n}\n\nScoringProgress.propTypes = {\n scoringProgress: PropTypes.string,\n small: PropTypes.bool.isRequired,\n iconOnly: PropTypes.bool.isRequired,\n hasScores: PropTypes.bool.isRequired,\n filled: PropTypes.bool.isRequired,\n}\n\nScoringProgress.defaultProps = {\n small: false,\n iconOnly: false,\n hasScores: false,\n filled: false,\n}\n\nexport default ScoringProgress\n\nconst ScoringProgressDisplay = styled.span`\n border-radius: 3px;\n display: inline-block;\n padding: 2px 5px 1px 4px;\n line-height: 1;\n font-size: ${p => (p.$small ? '66%' : '85%')};\n border: 1px solid ${p => p.$color};\n text-transform: uppercase;\n color: ${p => p.$color};\n background-color: ${p =>\n p.$filled ? '#ffffff' : transparentize(0.9, p.$color)};\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst Seat = ({ seat }) => {\n switch (seat) {\n case 'n':\n return North\n case 's':\n return South\n case 'e':\n return East\n case 'w':\n return West\n default:\n return null\n }\n}\n\nSeat.propTypes = {\n seat: PropTypes.string,\n}\n\nexport default Seat\n","import React from 'react'\nimport PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst SlamBadges = props => {\n if (props.slams && props.slams != '') {\n return (\n \n {props.slams.split(',').map(board => {\n return (\n \n \n {board}\n \n )\n })}\n \n )\n } else {\n return null\n }\n}\n\nSlamBadges.propTypes = {\n slams: PropTypes.string.isRequired,\n type: PropTypes.string.isRequired,\n}\n\nexport default SlamBadges\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { LETTERS } from 'helpers/constants'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst SmallBSG = ({ bsg, after }) => {\n const set = bsg >= 100 ? {Math.floor(bsg / 100)} : ''\n return (\n \n {LETTERS[bsg % 100]}\n {set}\n {after}\n \n )\n}\n\nconst SBN = styled.span`\n font-size: 85%;\n`\n\nSmallBSG.propTypes = {\n bsg: PropTypes.number.isRequired,\n after: PropTypes.string,\n}\n\nexport default SmallBSG\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst SmallPairNumber = ({ pairNumber, nsStationary, after }) => {\n const dir = nsStationary ? (pairNumber > 0 ? 'NS' : 'EW') : ''\n\n return (\n \n {Math.abs(pairNumber)}\n {dir}\n {after}\n \n )\n}\n\nconst SPN = styled.span`\n font-size: 85%;\n`\n\nSmallPairNumber.propTypes = {\n pairNumber: PropTypes.number.isRequired,\n nsStationary: PropTypes.bool,\n after: PropTypes.string,\n}\n\nexport default SmallPairNumber\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled, { keyframes } from 'styled-components'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\nimport { Icon } from 'components/elements/Icons'\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Spinner = props => {\n if (!props.show) {\n return props.altIcon ? : null\n }\n return (\n \n \n \n )\n}\n\nSpinner.propTypes = {\n show: PropTypes.bool,\n spaceAfter: PropTypes.bool,\n altIcon: PropTypes.string,\n}\n\nSpinner.defaultProps = {\n show: true,\n spaceAfter: false,\n}\n\nexport default Spinner\n\nconst SpinningAnimation = keyframes`\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n`\n\nconst Spin = styled.span`\n display: inline-block;\n line-height: 1;\n margin-right: ${p => (p.$spaceAfter ? '0.5em' : '0')};\n animation: ${SpinningAnimation} 2s infinite steps(12);\n`\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Suit = ({ suit, inverted }) => {\n switch (suit) {\n case 'S':\n case 's':\n return \n case 'H':\n case 'h':\n return \n case 'D':\n case 'd':\n return \n case 'C':\n case 'c':\n return \n case 'N':\n case 'n':\n return \n case 'M':\n case 'm':\n return (\n \n \n \n \n )\n case 'J':\n case 'j':\n return (\n \n \n \n \n )\n default:\n return null\n }\n}\n\nSuit.propTypes = {\n suit: PropTypes.string,\n inverted: PropTypes.bool,\n}\n\nexport default Suit\n\nconst Combined = styled.span`\n display: inline-block;\n span:not(:first-child) {\n margin-left: -1em;\n }\n`\n","import PropTypes from 'prop-types'\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\nimport { TIME_OPTIONS } from 'helpers/constants.js'\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst Time = props => {\n for (let opt of TIME_OPTIONS) {\n if (opt.value == props.time) {\n return opt.label\n }\n }\n return '??'\n}\n\nexport default Time\n\nTime.propTypes = {\n time: PropTypes.number.isRequired,\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\n// import packages\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\nimport { useCurrentUserState } from 'contexts/current-user-context'\n\n// import hooks\n\n// import utilities\n\n// import common elements\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst TimeRange = props => {\n const currentUser = useCurrentUserState()\n\n // currentUser.timeZone => Rails version, e.g., 'Eastern Time (US & Canada)'\n // currentUser.tz => Javascript version, e.g., 'America/New York'\n\n const starts = new Date(props.starts)\n const ends = new Date(props.ends)\n const startOnly = props.startOnly || !props.ends\n\n const startOpts = {\n hour: 'numeric',\n minute: '2-digit',\n timeZone: props.tz,\n }\n const endOpts = {\n hour: 'numeric',\n minute: '2-digit',\n timeZone: props.tz,\n }\n\n if (props.withDates) {\n startOpts.year = 'numeric'\n startOpts.month = 'numeric'\n startOpts.day = 'numeric'\n endOpts.year = 'numeric'\n endOpts.month = 'numeric'\n endOpts.day = 'numeric'\n }\n\n // If there are different time zones in use between the event, currentuUser\n // and the browser, display the time zone\n const showZone =\n props.forceZone ||\n currentUser.tz !== props.tz ||\n currentUser.tz !== Intl.DateTimeFormat().resolvedOptions().timeZone\n\n if (showZone && startOnly) {\n startOpts.timeZoneName = 'short'\n }\n\n if (showZone) {\n endOpts.timeZoneName = 'short'\n }\n return (\n \n {starts.toLocaleString([], startOpts)}\n {!startOnly && ' – '}\n {!startOnly && ends.toLocaleString([], endOpts)}\n \n )\n}\n\nTimeRange.propTypes = {\n starts: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n ends: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n tz: PropTypes.string.isRequired,\n startOnly: PropTypes.bool,\n withDates: PropTypes.bool,\n forceZone: PropTypes.bool,\n}\n\nexport default TimeRange\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\n\nconst TournamentCode = props =>\n props.code ? {props.code} : null\n\nexport default TournamentCode\n\nTournamentCode.propTypes = {\n code: PropTypes.string,\n}\n\nconst CodeContainer = styled.div`\n color: #990000;\n line-height: 1.2;\n font-weight: normal;\n margin-bottom: 3px;\n`\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Button } from 'react-bootstrap'\nimport { Icon } from 'components/elements/Icons'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst UserHomeLink = props => {\n if (props.allowed) {\n return (\n \n )\n } else {\n return null\n }\n}\n\nUserHomeLink.propTypes = {\n allowed: PropTypes.bool,\n userId: PropTypes.number.isRequired,\n}\nexport default UserHomeLink\n","// import packages\nimport React from 'react'\nimport PropTypes from 'prop-types'\n\n// import apis\n\n// import redux, selectors, actions\n\n// import contexts\n\n// import hooks\n\n// import utilities\n\n// import common elements\nimport { Button } from 'react-bootstrap'\n\n// import components\n\n// import styles\n\n// local constants\n\n// --------------------\n\nconst YearButton = props => {\n const set = () => {\n props.set(props.year)\n }\n return props.year === props.currentYear ? (\n \n ) : (\n \n )\n}\n\nYearButton.propTypes = {\n set: PropTypes.func.isRequired,\n year: PropTypes.number.isRequired,\n currentYear: PropTypes.number.isRequired,\n}\n\nexport default YearButton\n","import { toast } from 'react-toastify'\nimport { actionTypes } from 'contexts/current-user-context'\nimport { getDebugOptions } from 'helpers/debugging'\nconst { trackCurrentUserSubscription } = getDebugOptions()\n\nexport const subscribeToCurrentUserChannel = (\n id,\n currentUserDispatch,\n updateUserMemberStore,\n) => {\n let currentUserChannel\n if (typeof App !== 'undefined') {\n /*global App */\n currentUserChannel = App.cable.subscriptions.create(\n {\n channel: 'CurrentUserChannel',\n current_user_id: id,\n },\n {\n connected: function () {},\n disconnected: function () {},\n received: function (data) {\n if (trackCurrentUserSubscription) {\n console.info('[RSVP] CurrentUserChannel received:', data)\n }\n if (data['credit_balance']) {\n currentUserDispatch({\n type: actionTypes.updateCreditBalance,\n payload: data,\n })\n } else if (data['message_to_user']) {\n toast.info(data['message_to_user'], { autoClose: false })\n } else {\n // Update current user\n if (data['current_user'] && data['current_user'].id == id) {\n currentUserDispatch({\n type: actionTypes.update,\n payload: data.current_user,\n })\n }\n // Update member and user data in the store (redux), which may or may not be the current member;\n // use case is when a manager edits a person's account.\n // Updates get broadcast to that person as well\n if (updateUserMemberStore && (data['member'] || data['user'])) {\n return updateUserMemberStore(data)\n }\n }\n },\n },\n )\n return currentUserChannel\n }\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\nimport { apiSetUserAutoPurchase } from 'api/credits'\nimport { apiSetPreference, apiSetAutoPay } from 'api/users'\nimport { subscribeToCurrentUserChannel } from 'subscriptions/current-user'\n\nconst PREFERENCE_KEY = {\n confirm_cards: 'confirmCards',\n confirm_bids: 'confirmBids',\n ma_suits_by_contract: 'memoryAidsSuitsByContract',\n}\n\nconst CurrentUserStateContext = React.createContext(null)\nconst CurrentUserDispatchContext = React.createContext(null)\n\nconst CurrentUserSubscribe = ({\n id,\n currentUserDispatch,\n updateUserMemberStore,\n children,\n}) => {\n React.useEffect(() => {\n const abortController = new AbortController()\n const currentUserChannel = subscribeToCurrentUserChannel(\n id,\n currentUserDispatch,\n updateUserMemberStore,\n )\n return () => {\n if (currentUserChannel) {\n currentUserChannel.unsubscribe()\n }\n abortController.abort()\n }\n }, [id, currentUserDispatch, updateUserMemberStore])\n\n return children\n}\n\nconst initialState = props => {\n const firstName = props.first_name || ''\n const lastName = props.last_name || ''\n const email = props.email || ''\n const isTable = props.is_table\n const isAdmin = props.admin === true\n const managedGroupIds = props.groups_managed\n ? props.groups_managed.map(s => parseInt(s))\n : []\n const managedClubIds = props.clubs_managed || []\n const ownedClubIds = props.clubs_owned || []\n const isGroupManager = managedGroupIds.length > 0\n const isClubManager = managedClubIds.length > 0\n const isClubOwner = ownedClubIds.length > 0\n const isDemo = props.is_demo\n const managesAcblGroup = props.manages_acbl_group\n\n return {\n id: props.id,\n channel: `current_user_${props.id}`,\n firstName,\n lastName,\n email,\n timeZone: props.time_zone,\n tz: props.tz,\n zip: props.zip,\n acblActive: props.acbl_active,\n\n fullName: `${firstName} ${lastName}`,\n isTable,\n isNotTable: !isTable,\n // table details: {section, table, seat}\n tableEntry: isTable ? props.table_details : null,\n\n managedGroupIds,\n managedClubIds,\n ownedClubIds,\n relinquishable: props.relinquishable,\n isAdmin,\n emailProvider: email && email.split('@').pop(),\n confirmBids: props.preferences\n ? props.preferences['confirm_bids'] !== false\n : false,\n confirmCards: props.preferences\n ? props.preferences['confirm_cards'] !== false\n : false,\n memoryAidsSuitsByContract: props.preferences\n ? props.preferences['ma_suits_by_contract'] === true\n : false,\n savedCard: props.saved_card,\n autoPay: props.auto_pay,\n autoPurchase: props.auto_purchase,\n defaultManagedGroup: props.default_managed_group,\n defaultManagedClub: props.default_managed_club,\n\n creditBalance: props.credit_balance,\n stripePublicKey: props.stripe_public_key,\n\n isGroupManager,\n isClubManager,\n isClubOwner,\n isDemo,\n managesAcblGroup,\n isSomeKindOfManager:\n isGroupManager || isClubManager || isClubOwner || isAdmin,\n }\n}\n\nconst actionTypes = {\n set: 'SET',\n updateCreditBalance: 'UPDATE_CREDIT_BALANCE',\n updateDefaultManagedGroup: 'UPDATE_DEFAULT_MANAGED_GROUP',\n update: 'UPDATE',\n}\n\nfunction currentUserReducer(state, action) {\n const payload = action.payload\n let newState\n\n switch (action.type) {\n case actionTypes.set: {\n return { ...state, [payload.key]: payload.value }\n }\n case actionTypes.update: {\n return initialState(payload)\n }\n case actionTypes.updateCreditBalance:\n newState = { ...state }\n newState.creditBalance = payload.credit_balance\n if ('saved_card' in payload) {\n newState.savedCard = payload.saved_card\n }\n return newState\n\n case actionTypes.updateDefaultManagedGroup:\n return {\n ...state,\n defaultManagedGroup:\n state.managedGroupIds.length > 0\n ? state.managedGroupIds.filter(\n g => g != payload.otherThanGroupId,\n )[0]\n : null,\n }\n\n default: {\n throw new Error(`Unhandled action type: ${action.type}`)\n }\n }\n}\n\nfunction CurrentUserProvider(props) {\n const [state, dispatch] = React.useReducer(\n currentUserReducer,\n initialState(props),\n )\n return (\n \n \n \n {props.children}\n \n \n \n )\n}\n\nfunction useCurrentUserState() {\n const context = React.useContext(CurrentUserStateContext)\n if (context === undefined) {\n throw new Error(\n 'useCurrentUserState must be used within a CurrentUserProvider',\n )\n }\n\n const hasId = id => context.id == id\n const managesGroupId = groupId => context.managedGroupIds.includes(groupId)\n const managesGroup = group => managesGroupId(group.id)\n const canManageGroupId = groupId => managesGroupId(groupId) || context.isAdmin\n const managesClubId = clubId => context.managedClubIds.includes(clubId)\n const managesClub = club => managesClubId(club.id)\n const canManageClubId = clubId => managesClubId(clubId) || context.isAdmin\n const ownsClubId = clubId => context.ownedClubIds.includes(clubId)\n const ownsClub = club => ownsClubId(club.id)\n const controlsGroup = group =>\n managesGroupId(group.id) ||\n managesClubId(group.club_id) ||\n ownsClubId(group.club_id)\n const canControlGroup = group => controlsGroup(group) || context.isAdmin\n const controlsClub = club => managesClubId(club.id) || ownsClubId(club.id)\n const controlsClubId = clubId => managesClubId(clubId) || ownsClubId(clubId)\n const canControlClub = club => controlsClubId(club.id) || context.isAdmin\n const canControlClubId = clubId => controlsClubId(clubId) || context.isAdmin\n const isDirector = event =>\n event.directors && event.directors.includes(context.id)\n const canDirect = event => isDirector(event) || context.isAdmin\n const directsOrManages = event =>\n canDirect(event) || managesGroupId(event.group_id)\n const canSeeMessageRecipients = msg =>\n msg.sender_id == context.id || context.isAdmin\n const canManageUser = user =>\n user.id == context.id || context.isAdmin || user.managed_by_current_user\n const canEditUser = user => {\n return (\n user.id == context.id ||\n context.isAdmin ||\n (user.managed_by_current_user && !user.is_some_kind_of_manager) ||\n user.controlled_by_current_user ||\n (user.creator_id = context.id && !user.current_sign_in_at)\n )\n }\n\n const eventPermissions = event => {\n return {\n epAdmin: context.isAdmin,\n epManage: canManageGroupId(event.group_id),\n epDirect: canDirect(event),\n epTable: context.isTable,\n }\n }\n\n return {\n ...context,\n hasId,\n managesGroupId,\n managesGroup,\n canManageGroupId,\n eventPermissions,\n managesClubId,\n managesClub,\n canManageClubId,\n ownsClubId,\n ownsClub,\n controlsGroup,\n canControlGroup,\n controlsClub,\n controlsClubId,\n canControlClub,\n canControlClubId,\n isDirector,\n canDirect,\n directsOrManages,\n canSeeMessageRecipients,\n canManageUser,\n canEditUser,\n }\n}\n\nfunction useCurrentUserDispatch() {\n const currentUserDispatch = React.useContext(CurrentUserDispatchContext)\n const { id, isNotTable } = useCurrentUserState()\n if (currentUserDispatch === undefined) {\n throw new Error(\n 'useCurrentUserDispatch must be used within a CurrentUserProvider',\n )\n }\n\n const updateDefaultManagedGroup = otherThanGroupId => {\n currentUserDispatch({\n type: actionTypes.updateDefaultManagedGroup,\n payload: { otherThanGroupId },\n })\n return otherThanGroupId\n }\n\n const setDefaultManagedGroup = groupId => {\n currentUserDispatch({\n type: actionTypes.set,\n payload: { key: 'defaultManagedGroup', value: groupId },\n })\n }\n\n const setDefaultManagedClub = response => {\n currentUserDispatch({\n type: actionTypes.set,\n payload: {\n key: 'defaultManagedClub',\n value: response.default_managed_club_id,\n },\n })\n }\n\n const setPreference = (key, value, callback) => {\n if (isNotTable) {\n apiSetPreference(id, key, value, {\n success: response => {\n currentUserDispatch({\n type: actionTypes.set,\n payload: {\n key: PREFERENCE_KEY[key],\n value,\n },\n })\n callback(key, response.preferences[key])\n },\n })\n } else {\n // Tables will need to set preference every session\n currentUserDispatch({\n type: actionTypes.set,\n payload: {\n key: PREFERENCE_KEY[key],\n value,\n },\n })\n callback(key, value)\n }\n }\n\n const setAutoPay = (checked, loading) => {\n apiSetAutoPay(id, checked, {\n loading,\n success: () => {\n currentUserDispatch({\n type: actionTypes.set,\n payload: {\n key: 'autoPay',\n value: checked,\n },\n })\n },\n })\n }\n\n const setAutoPurchase = (value, loading) => {\n apiSetUserAutoPurchase(id, value, {\n loading,\n success: () => {\n currentUserDispatch({\n type: actionTypes.set,\n payload: {\n key: 'autoPurchase',\n value: value,\n },\n })\n },\n })\n }\n\n return {\n updateDefaultManagedGroup,\n setDefaultManagedGroup,\n setDefaultManagedClub,\n setPreference,\n setAutoPay,\n setAutoPurchase,\n }\n}\n\n// remove CurrentUserStateContext once class components no longer need it\nexport {\n CurrentUserStateContext,\n CurrentUserProvider,\n useCurrentUserState,\n useCurrentUserDispatch,\n actionTypes,\n}\n\nCurrentUserProvider.propTypes = {\n children: PropTypes.node,\n updateUserMemberStore: PropTypes.func,\n}\n","const storageKey = (page, cuId, key) => `${page}#${cuId}.${key}`\n\nexport const setStoredValue = (page, cuId, key, value) => {\n if (page && cuId) {\n sessionStorage.setItem(storageKey(page, cuId, key), JSON.stringify(value))\n }\n}\n\nexport const retrieveStoredValue = (page, cuId, key) => {\n if (!page || !cuId) {\n return null\n }\n let v = sessionStorage.getItem(storageKey(page, cuId, key))\n return v ? JSON.parse(v) : null\n}\n\nexport const removeActivePaneKeys = () => {\n Object.keys(sessionStorage).forEach(key => {\n if (key.includes('.activePane')) {\n sessionStorage.removeItem(key)\n }\n })\n}\n","import React from 'react'\nimport PropTypes from 'prop-types'\n\nconst PaneMemoryContext = React.createContext()\n\nconst actionTypes = {\n forget: 'forget',\n remember: 'remember',\n}\n\nconst isStorage = key => {\n return key ? key.startsWith('sscu#') || key.startsWith('lscu#') : false\n}\n\n// Note that calling storageKey on a value that has already been tranformed\n// will still return the properly transformed key\nconst storageKey = (cuId, key) =>\n key\n ? key.replace('SSCU', `sscu#${cuId}`).replace('LSCU', `lscu#${cuId}`)\n : null\n\nconst storageSet = (sKey, value) => {\n if (value === null) {\n if (sKey.startsWith('sscu#')) {\n sessionStorage.removeItem(sKey)\n } else if (sKey.startsWith('lscu#')) {\n localStorage.removeItem(sKey)\n }\n } else {\n if (sKey.startsWith('sscu#')) {\n sessionStorage.setItem(sKey, JSON.stringify(value))\n } else if (sKey.startsWith('lscu#')) {\n localStorage.setItem(sKey, JSON.stringify(value))\n }\n }\n}\nconst storageGet = sKey => {\n let v = null\n if (sKey.startsWith('sscu#')) {\n v = sessionStorage.getItem(sKey)\n } else if (sKey.startsWith('lscu#')) {\n v = localStorage.getItem(sKey)\n }\n return v === null ? null : JSON.parse(v)\n}\n\nconst storageRemove = sKey => {\n if (sKey.startsWith('sscu#')) {\n sessionStorage.removeItem(sKey)\n } else if (sKey.startsWith('lscu#')) {\n localStorage.removeItem(sKey)\n }\n}\n\nfunction paneMemoryReducer(state, action) {\n const { memoryKey, key, value } = action.payload\n let newState, keyMatch, newValue\n const cuId = state.cuId\n const sMemoryKey = storageKey(cuId, memoryKey)\n const sKey = storageKey(cuId, key)\n\n switch (action.type) {\n case actionTypes.forget:\n newState = {}\n keyMatch = `${sMemoryKey}|`\n for (const mk in state) {\n if (!mk.includes(keyMatch)) {\n newState[mk] = state[mk]\n }\n if (isStorage(mk)) {\n storageRemove(mk)\n }\n }\n return newState\n\n case actionTypes.remember:\n newValue = typeof value === 'function' ? value(state[sKey]) : value\n if (isStorage(sKey)) {\n storageSet(sKey, newValue)\n }\n return {\n ...state,\n [sKey]: newValue,\n }\n default: {\n throw new Error(`Unhandled action type: ${action.type}`)\n }\n }\n}\n\nfunction PaneMemoryProvider({ cuId, children }) {\n const [state, dispatch] = React.useReducer(paneMemoryReducer, { cuId })\n\n function remember(key, value) {\n dispatch({\n type: actionTypes.remember,\n payload: {\n key,\n value,\n },\n })\n }\n\n function recall(key, defaultValue) {\n const sKey = storageKey(cuId, key)\n if (typeof state[sKey] === 'undefined') {\n let storedValue = storageGet(sKey)\n return storedValue === null ? defaultValue : storedValue\n } else {\n return state[sKey]\n }\n }\n\n function initialize(key, defaultValue) {\n const sKey = storageKey(cuId, key)\n if (typeof state[sKey] === 'undefined') {\n remember(sKey, defaultValue)\n }\n }\n\n function clearPaneMemory(memoryKey) {\n dispatch({\n type: actionTypes.forget,\n payload: { memoryKey },\n })\n }\n\n return (\n \n {children}\n \n )\n}\n\nfunction usePaneMemory() {\n const context = React.useContext(PaneMemoryContext)\n if (context === undefined) {\n throw new Error('usePaneMemory must be used within a PaneMemoryProvider')\n }\n // const { state, dispatch } = context\n return context\n}\n\nfunction usePaneState(memoryKey, name, defaultValue) {\n const { recall, remember, initialize } = usePaneMemory()\n const key = `${memoryKey}|${name}`\n const recalled = recall(key, defaultValue)\n const intialValue = recalled === null ? defaultValue : recalled\n // remember is purely a call to dispatch, which is stable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const rememberThis = React.useCallback(value => remember(key, value), [])\n\n React.useEffect(() => {\n initialize(key, intialValue)\n // initialize is purely a call to dispatch, which is stable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return [recalled, rememberThis]\n}\n\nexport { PaneMemoryProvider, usePaneMemory, usePaneState }\n\nPaneMemoryProvider.propTypes = {\n cuId: PropTypes.number,\n children: PropTypes.node,\n}\n","const IMPs = delta => {\n const abs_delta = Math.abs(delta)\n let imps =\n abs_delta <= 10\n ? 0\n : abs_delta <= 40\n ? 1\n : abs_delta <= 80\n ? 2\n : abs_delta <= 120\n ? 3\n : abs_delta <= 160\n ? 4\n : abs_delta <= 210\n ? 5\n : abs_delta <= 260\n ? 6\n : abs_delta <= 310\n ? 7\n : abs_delta <= 360\n ? 8\n : abs_delta <= 420\n ? 9\n : abs_delta <= 490\n ? 10\n : abs_delta <= 590\n ? 11\n : abs_delta <= 740\n ? 12\n : abs_delta <= 890\n ? 13\n : abs_delta <= 1090\n ? 14\n : abs_delta <= 1290\n ? 15\n : abs_delta <= 1490\n ? 16\n : abs_delta <= 1740\n ? 17\n : abs_delta <= 1990\n ? 18\n : abs_delta <= 2240\n ? 19\n : abs_delta <= 2490\n ? 20\n : abs_delta <= 2990\n ? 21\n : abs_delta <= 3490\n ? 22\n : abs_delta <= 3990\n ? 23\n : 24\n if (delta < 0) {\n imps = -1 * imps\n }\n return imps\n}\n\nexport default IMPs\n","import { LETTERS } from 'helpers/constants'\nimport { sortedIntegers, copyStructure, arrayUnique } from 'helpers/utilities'\n\n// extended by MovementEditor\n\nexport default class Movement {\n constructor(mvmt) {\n this.id = mvmt ? mvmt.id : false\n this.ns_stationary = mvmt.ns_stationary || false\n // Non-identical board sets are ONLY for auto-paired Swiss\n // This causes board numbers to be 100*board_set + board_number\n // board_sets are numbered from 1\n // board_groups are numbered from 0\n this.board_sets_are_identical = mvmt ? mvmt.board_sets_are_identical : true\n this.structure = {}\n this.rounds = []\n this.lastRound = 0\n this.lastTable = 0\n this.tables = []\n this.pairs = []\n this.stationaries = []\n this.board_set_groups = []\n this.structure = copyStructure(mvmt.structure)\n // These are only needed when editing:\n this.boardGroupCount = mvmt.board_group_count\n this.boardSetCount = mvmt.board_set_count\n // These are only used when using movement\n this.boardsPerRound = mvmt.boards_per_round\n this.phantomPair = mvmt.phantom_pair_number || 0\n this.computeMovement()\n if (mvmt.inferred_phantom_pair) {\n let newPhantom = this.pairNumberFromOriginalTableDirection(\n mvmt.inferred_phantom_pair.table,\n mvmt.inferred_phantom_pair.direction,\n )\n this.changePhantomPair(newPhantom)\n }\n }\n\n changePhantomPair(newPhantom) {\n this.phantomPair = newPhantom\n this.computeMovement()\n }\n\n computeMovement() {\n this.rounds = this._getRounds()\n this.tables = this._getTables()\n this.lastRound = Math.max(...this.rounds)\n this.lastTable = Math.max(...this.tables)\n this.pairs = this._getPairs()\n this.stationaries = this._getStationaries()\n this.board_set_groups = this._getBoardSetGroups()\n\n if (!this.boardGroupCount) {\n // This is when the movement is passed in from an Event, rather than\n // the movement editor, which may require extra non-used board sets\n this.boardGroupCount = this.boardGroupsInUse().length\n }\n this.boardGroups = Array.from({ length: this.boardGroupCount }, (x, i) => i)\n\n if (!this.boardSetCount) {\n this.boardSetCount = this.boardSetMax()\n }\n this.boardSets = Array.from({ length: this.boardSetCount }, (x, i) => i + 1)\n\n this.boardGroupSets = this.board_sets_are_identical\n ? this.boardGroups\n : this.boardSets.map(s => this.boardGroups.map(g => s * 100 + g)).flat()\n }\n _getPairs() {\n if (this.rounds.length > 0) {\n return sortedIntegers(\n this.rounds.reduce((pairs, round) => {\n if (this.lastRound > 0) {\n for (let table of this.tables) {\n let contest = this.structure[round][table]\n if (\n contest.ns_pair &&\n !pairs.includes(parseInt(contest.ns_pair))\n ) {\n pairs.push(parseInt(contest.ns_pair))\n }\n if (\n contest.ew_pair &&\n !pairs.includes(parseInt(contest.ew_pair))\n ) {\n pairs.push(parseInt(contest.ew_pair))\n }\n }\n }\n return pairs\n }, []),\n )\n } else {\n return []\n }\n }\n\n _getRounds() {\n return sortedIntegers(Object.keys(this.structure))\n }\n\n _getStationaries() {\n if (this.ns_stationary) {\n return this.nsPairs()\n } else {\n let pairTables = {}\n for (let pair of this.pairs) {\n pairTables[pair] = []\n }\n for (let round of this.rounds) {\n for (let table in this.structure[round]) {\n let { ns_pair, ew_pair } = this.structure[round][table]\n if (ns_pair && ew_pair) {\n if (ew_pair != this.phantomPair) {\n if (!pairTables[ns_pair].includes(table)) {\n pairTables[ns_pair].push(table)\n }\n }\n if (ns_pair != this.phantomPair) {\n if (!pairTables[ew_pair].includes(table)) {\n pairTables[ew_pair].push(table)\n }\n }\n }\n }\n }\n return Object.keys(pairTables).filter(pair => pairTables[pair].length < 2)\n }\n }\n\n _getTables() {\n if (this.rounds.length > 0) {\n return sortedIntegers(\n this.rounds.reduce((tables, round) => {\n if (Object.keys(this.structure[round]).length > 0) {\n for (let table of Object.keys(this.structure[round])) {\n if (tables.indexOf(table) == -1) {\n tables.push(table)\n }\n }\n }\n return tables\n }, []),\n )\n } else {\n return []\n }\n }\n\n _getBoardSetGroups() {\n if (this.rounds.length > 0) {\n return sortedIntegers(\n this.rounds.reduce((boardSetGroups, round) => {\n if (Object.keys(this.structure[round]).length > 0) {\n for (let table of Object.keys(this.structure[round])) {\n let contest = this.structure[round][table]\n if (\n parseInt(contest.board_set) == contest.board_set &&\n parseInt(contest.board_group) == contest.board_group\n ) {\n let bs = this.board_sets_are_identical\n ? 0\n : parseInt(contest.board_set)\n let boardSetGroup = bs * 100 + parseInt(contest.board_group)\n if (boardSetGroups.indexOf(boardSetGroup) == -1) {\n boardSetGroups.push(boardSetGroup)\n }\n }\n }\n }\n return boardSetGroups\n }, []),\n )\n } else {\n return []\n }\n }\n\n allBoards(boardsPerRound = this.boardsPerRound) {\n // In movements were board sets are NOT identical, there may not be the\n // same number of boards in each set.\n const all = this.board_set_groups.map(bsg => {\n const set = Math.floor(bsg / 100)\n const group = bsg % 100\n return this.boardsInSetGroup(set, group, boardsPerRound)\n })\n return arrayUnique(all.flat())\n }\n\n boardGroupLetter(i, none = '') {\n return i !== '' && i >= 0 ? LETTERS.substr(i, 1) : none\n }\n\n boardDisplay(board) {\n const [boardSet, _boardGroup] = this.boardSetGroupFromBoard(board)\n if (this.boardSetCount > 1) {\n return `${board % 100} (Set ${boardSet})`\n } else {\n return board % 100\n }\n }\n\n boardNumbersDisplay(\n boardSet,\n boardGroup,\n boardsPerRound = this.boardsPerRound,\n ) {\n const numbers = this.boardNumbersInGroup(boardGroup, boardsPerRound).join(\n ',',\n )\n if (this.boardSetCount > 1) {\n return `${numbers} (Set ${boardSet})`\n } else {\n return numbers\n }\n }\n\n boardFromSetAndNumber(boardSet, boardNumber) {\n if (this.board_sets_are_identical) {\n return boardNumber\n } else {\n return boardSet * 100 + boardNumber\n }\n }\n\n boardNumber(board) {\n return board % 100\n }\n\n boardNumbersInGroup(boardGroup, boardsPerRound = this.boardsPerRound) {\n return Array.from(\n { length: boardsPerRound },\n (x, i) => boardGroup * boardsPerRound + i + 1,\n )\n }\n\n boardsInSetGroup(boardSet, boardGroup, boardsPerRound = this.boardsPerRound) {\n return boardGroup != null\n ? Array.from({ length: boardsPerRound }, (x, i) =>\n this.boardFromSetAndNumber(\n boardSet,\n boardGroup * boardsPerRound + i + 1,\n ),\n )\n : []\n }\n\n boardPlayedInRoundBy(board, round) {\n let [boardSet, boardGroup] = this.boardSetGroupFromBoard(\n board,\n this.boardsPerRound,\n )\n let players = []\n for (let table in this.structure[round]) {\n let { ns_pair, ew_pair, board_set, board_group } =\n this.structure[round][table]\n if (\n board_set == boardSet &&\n board_group == boardGroup &&\n ns_pair != this.phantomPair &&\n ew_pair != this.phantomPair\n ) {\n players.push({ ns_pair, ew_pair })\n }\n }\n return players\n }\n\n boardPlays(board) {\n let [_boardSet, boardGroup] = this.boardSetGroupFromBoard(board)\n return this.boardGroupPlays(boardGroup)\n }\n\n boardRangeAtTable(round, table, boardsPerRound = this.boardsPerRound) {\n let boards = this.boardsAtTable(round, table, boardsPerRound)\n if (boards.length == 0) {\n return '--'\n } else if (boards.length == 1) {\n return `${boards[0]}`\n } else {\n // because they might be reordered for shared boards\n boards.sort((a, b) => a - b)\n let last = boards.pop()\n return `${boards[0]}–${last}`\n }\n }\n\n boardRangeInSet(boardSet, boardsPerRound = this.boardsPerRound) {\n let boards = this.boardNumbersUsedInSet(boardSet, boardsPerRound)\n if (boards.length == 0) {\n return '--'\n } else if (boards.length == 1) {\n return `${boards[0]}`\n } else {\n // because they might be reordered for shared boards\n let last = boards.pop()\n return `${boards[0]}–${last}`\n }\n }\n\n boardsAtTable(round, table, boardsPerRound = this.boardsPerRound) {\n if (this.hasRoundTable(round, table)) {\n let boardSet = this.structure[round][table].board_set\n let boardGroup = this.structure[round][table].board_group\n if (this.isNotSitout(round, table)) {\n let boards = this.boardsInSetGroup(boardSet, boardGroup, boardsPerRound)\n return boards\n } else {\n return []\n }\n } else {\n return []\n }\n }\n\n boardsAtTableInPlayOrder(round, table, boardsPerRound = this.boardsPerRound) {\n if (!this.hasRoundTable(round, table)) {\n return [[]]\n }\n if (this.isSitout(round, table)) {\n return [[]]\n }\n let boardSet = this.structure[round][table].board_set\n let boardGroup = this.structure[round][table].board_group\n\n let boards = this.boardsInSetGroup(boardSet, boardGroup, boardsPerRound)\n let boardCount = boards.length\n const sharing = this.sharingBoardsWith(round, table)\n\n if (boardCount == 1 || !sharing || this.isRobin(round, table)) {\n return [boards]\n }\n\n if (boardCount > 1 && sharing && this.isNotRobin(round, table)) {\n // When sharing boards with a lower numbered table, play last half first\n // sharing does not include this table\n const groupedBoards = []\n\n const sharingCount = sharing.length + 1\n const perShift = parseInt(boardCount / sharingCount)\n const boardsInEachGroup = []\n for (let i = 0; i < sharingCount; i++) {\n boardsInEachGroup.push(perShift)\n }\n let remainder = boardCount % sharingCount\n for (let i = 0; i < remainder; i++) {\n boardsInEachGroup[i] += 1\n }\n let boardsCopy = [...boards]\n for (let i = 0; i < sharingCount; i++) {\n groupedBoards.push(boardsCopy.splice(0, boardsInEachGroup[i]))\n }\n const numShifts = sharing.filter(s => s < table).length\n // Rotate the sets of boards the number of shifts\n for (let i = 0; i < numShifts; i++) {\n groupedBoards.push(groupedBoards.shift())\n }\n\n return groupedBoards\n }\n }\n\n boardSetGroupFromBoard(board, boardsPerRound = this.boardsPerRound) {\n const boardNumber = board % 100\n // When board < 100, we have a singular boardSet\n const boardSet = parseInt(board / 100) || 1\n const boardGroup = Math.floor((boardNumber - 1) / boardsPerRound)\n return [boardSet, boardGroup]\n }\n\n boardGroupPlays(bsg) {\n const boardGroup = bsg % 100\n // Will be zero is board sets are identical\n const boardSet = Math.floor(bsg / 100)\n let playCount = 0\n for (let round of this.rounds) {\n for (let table in this.structure[round]) {\n if (boardSet == 0) {\n if (boardGroup == this.structure[round][table].board_group) {\n playCount += 1\n }\n } else {\n if (\n boardGroup == this.structure[round][table].board_group &&\n boardSet == this.structure[round][table].board_set\n ) {\n playCount += 1\n }\n }\n }\n }\n return playCount\n }\n\n boardGroupsInUse() {\n const used = []\n for (const round of this.rounds) {\n for (const table in this.structure[round]) {\n let board_group = this.structure[round][table]['board_group']\n if (board_group !== '') {\n board_group = parseInt(board_group)\n if (!used.includes(board_group)) {\n used.push(board_group)\n }\n }\n }\n }\n return used.sort((a, b) => a - b)\n }\n\n boardSetsInUse() {\n const used = []\n for (const round of this.rounds) {\n for (const table in this.structure[round]) {\n let board_set = this.structure[round][table]['board_set']\n if (board_set !== '') {\n board_set = parseInt(board_set)\n if (!used.includes(board_set)) {\n used.push(board_set)\n }\n }\n }\n }\n return used.sort((a, b) => a - b)\n }\n\n boardSetGroupsInUse() {\n const used = {}\n for (const round of this.rounds) {\n for (const table in this.structure[round]) {\n const { board_set, board_group } = this.structure[round][table]\n if (\n board_set === parseInt(board_set) &&\n board_group === parseInt(board_group)\n ) {\n if (!used[board_set]) {\n used[board_set] = []\n }\n if (!used[board_set].includes(board_group)) {\n used[board_set].push(board_group)\n }\n }\n }\n }\n for (const set in used) {\n used[set] = used[set].sort((a, b) => a - b)\n }\n return used\n }\n\n boardNumbersUsedInSet(boardSet, boardsPerRound = this.boardsPerRound) {\n let used = []\n for (const round of this.rounds) {\n for (const table in this.structure[round]) {\n const { board_set, board_group } = this.structure[round][table]\n if (board_set == boardSet) {\n used = [\n ...used,\n ...this.boardNumbersInGroup(board_group, boardsPerRound),\n ]\n }\n }\n }\n return arrayUnique(sortedIntegers(used))\n }\n\n boardMaxInSet(boardSet, boardsPerRound = this.boardsPerRound) {\n let range = this.boardNumbersUsedInSet(boardSet, boardsPerRound)\n return Math.max(...range)\n }\n\n boardSetAtTable(round, table) {\n if (this.hasRoundTable(round, table)) {\n return this.structure[round][table].board_set\n } else {\n return null\n }\n }\n\n boardSetUsedInRounds(boardSet) {\n let used = []\n for (const round of this.rounds) {\n for (const table in this.structure[round]) {\n const { board_set } = this.structure[round][table]\n if (board_set == boardSet) {\n used.push(round)\n }\n }\n }\n return arrayUnique(sortedIntegers(used))\n }\n\n boardSetMax() {\n let max = 1\n for (let round of this.rounds) {\n for (let table in this.structure[round]) {\n let board_set = this.structure[round][table]['board_set']\n if (board_set !== '') {\n board_set = parseInt(board_set)\n if (board_set > max) {\n max = board_set\n }\n }\n }\n }\n return max\n }\n\n checkPreparedBoardSets(boardSets, usePreparedBoards) {\n // boardSets is a hash of baord sets for a section/movement, indexed\n // by set_number. Each board set has a deal_id and a range. Set numbers\n // should be consequitive from 1.\n const errors = []\n const setErrors = {}\n let ready = false\n const numberBoardSets = Object.keys(boardSets).length\n\n // Do we have enough board sets? Stop right here if we do not.\n if (this.boardSetCount > numberBoardSets) {\n errors.push('Not enough board sets have been defined.')\n return { errors, setErrors, ready }\n }\n\n if (usePreparedBoards) {\n // If we have multiple board sets, and they must be identical...\n if (this.boardSetCount > 1 && this.board_sets_are_identical) {\n const firstDeal = boardSets[1].deal_id\n for (let i = 1; i < this.boardSetCount; i++) {\n if (boardSets[i].deal_id != firstDeal) {\n errors.push(`Sets 1-${this.boardSetCount} must use the same deal.`)\n break\n }\n }\n }\n // If we have multiple board sets, and they must be different...\n if (this.boardSetCount > 1 && !this.board_sets_are_identical) {\n const existing = []\n for (let i = 1; i <= this.boardSetCount; i++) {\n if (existing.includes(boardSets[i].deal_id)) {\n errors.push('Each set of boards must use a different deal.')\n break\n }\n existing.push(boardSets[i].deal_id)\n }\n }\n }\n\n // Are there enough boards in each set?\n // Board sets in the model are numbered from 1\n for (let i = 1; i <= this.boardSetCount; i++) {\n setErrors[i] = []\n const boardsInSet = boardSets[i].range\n const needed = this.boardMaxInSet(i)\n if (usePreparedBoards && boardSets[i].deal_id == null) {\n setErrors[i].push('No deal has been assigned to this set.')\n }\n if (boardsInSet < needed) {\n setErrors[i].push(\n `Set ${i} does not have enough boards: ${boardsInSet}/${needed}.`,\n )\n }\n }\n ready = errors.length == 0 && Object.values(setErrors).flat().length == 0\n return { errors, setErrors, ready }\n }\n\n combinedPairs(excludePhantom = false) {\n return [...this.nsPairs(excludePhantom), ...this.ewPairs(excludePhantom)]\n }\n\n comboExists(\n searchRound = false,\n searchTable = false,\n searchPair = false,\n searchBoard = false,\n ) {\n let [searchBoardSet, searchBoardGroup] = searchBoard\n ? this.boardSetGroupFromBoard(searchBoard)\n : [false, false]\n if (this.phantomPair != 0 && searchPair == this.phantomPair) {\n return false\n }\n for (let round of this.rounds) {\n if (searchRound && round != searchRound) {\n continue\n }\n for (let table in this.structure[round]) {\n if (searchTable && table != searchTable) {\n continue\n }\n let { ns_pair, ew_pair, board_set, board_group } =\n this.structure[round][table]\n if (searchPair && ns_pair != searchPair && ew_pair != searchPair) {\n continue\n }\n if (this.phantomPair == ns_pair || this.phantomPair == ew_pair) {\n continue\n }\n // We are skipping boardSet if it is false (not searching) OR zero (not specified)\n // Board sets are numbered from 1...\n if (searchBoardSet && board_set != searchBoardSet) {\n continue\n }\n if (searchBoardGroup !== false && board_group != searchBoardGroup) {\n continue\n }\n return true\n }\n }\n return false\n }\n\n ewPairAt(round, table) {\n return this.hasRoundTable(round, table)\n ? this.structure[round][table].ew_pair\n : null\n }\n\n ewPairFor(round, table) {\n return this.hasRoundTable(round, table)\n ? this.pairNumber(this.structure[round][table].ew_pair)\n : '--'\n }\n\n ewPairs(excludePhantom = false) {\n return this.pairs\n .filter(p => p < 0 && (!excludePhantom || p != this.phantomPair))\n .reverse()\n }\n\n hasRoundTable(round, table) {\n return round <= this.lastRound && table <= this.lastTable\n }\n\n isLastRound(round) {\n return round == this.lastRound\n }\n\n isNotSitout(round, table) {\n return !this.isSitout(round, table)\n }\n\n isSitout(round, table) {\n let { ns_pair, ew_pair } = this.structure[round][table]\n return ns_pair == this.phantomPair || ew_pair == this.phantomPair\n }\n\n isStationary(pair) {\n return this.stationaries.includes(`${pair}`)\n }\n\n matchingScores(\n searchRound = false,\n searchTable = false,\n searchPair = false,\n searchBoard = false,\n ) {\n let [searchBoardSet, searchBoardGroup] = searchBoard\n ? this.boardSetGroupFromBoard(searchBoard)\n : [false, false]\n\n let matching = []\n for (let round of this.rounds) {\n if (searchRound && round != searchRound) {\n continue\n }\n for (let table in this.structure[round]) {\n if (searchTable && table != searchTable) {\n continue\n }\n let { ns_pair, ew_pair, board_group, board_set } =\n this.structure[round][table]\n if (searchPair && ns_pair != searchPair && ew_pair != searchPair) {\n continue\n }\n if (this.phantomPair == ns_pair || this.phantomPair == ew_pair) {\n continue\n }\n if (!this.board_sets_are_identical) {\n if (searchBoardSet !== false && board_set != searchBoardSet) {\n continue\n }\n }\n if (searchBoardGroup !== false && board_group != searchBoardGroup) {\n continue\n }\n matching.push({\n round,\n table,\n ns_pair,\n ew_pair,\n board_group,\n board_set,\n })\n }\n }\n return matching\n }\n\n nsPairFor(round, table) {\n return this.hasRoundTable(round, table)\n ? this.pairNumber(this.structure[round][table].ns_pair)\n : '--'\n }\n\n nsPairAt(round, table) {\n return this.hasRoundTable(round, table)\n ? this.structure[round][table].ns_pair\n : null\n }\n\n nsPairs(excludePhantom = false) {\n return this.pairs.filter(\n p => p > 0 && (!excludePhantom || p != this.phantomPair),\n )\n }\n\n originalTableDirectionFromPairNumber(pairNumber) {\n for (let table in this.structure[1]) {\n if (this.structure[1][table].ns_pair == pairNumber) {\n return { table: parseInt(table), direction: 'NS' }\n }\n if (this.structure[1][table].ew_pair == pairNumber) {\n return { table: parseInt(table), direction: 'EW' }\n }\n }\n // Should not occur...\n return { table: null, direction: null }\n }\n\n pairHasArrowSwitch = pair => {\n if (this.ns_stationary) {\n return false\n }\n const satNs = []\n const satEw = []\n for (let round of this.rounds) {\n for (let table in this.structure[round]) {\n let { ns_pair, ew_pair } = this.structure[round][table]\n if (ns_pair == pair) {\n satNs.push(table)\n }\n if (ew_pair == pair) {\n satEw.push(table)\n }\n }\n }\n return satNs.length > 0 && satEw.length > 0\n }\n\n pairNumber = pair => {\n if (this.ns_stationary) {\n return pair > 0 ? `${pair} N/S` : `${-1 * pair} E/W`\n } else {\n return `${pair}`\n }\n }\n\n pairNumberFromPairAssignment = assignment => {\n if (assignment) {\n let [t, d] = assignment.split('-')\n return this.pairNumberFromOriginalTableDirection(parseInt(t), d)\n }\n return null\n }\n\n pairNumberFromOriginalTableDirection = (table, direction) => {\n if (!table || !direction) {\n return null\n }\n return direction == 'NS' ? this.nsPairAt(1, table) : this.ewPairAt(1, table)\n }\n\n pairNumberFromSignup = signup => {\n if (!signup || !signup.table0 || !signup.seat0) {\n return null\n }\n let { table0, seat0 } = signup\n if (seat0 == 'N' || seat0 == 'S') {\n return this.nsPairAt(1, table0)\n } else if (seat0 == 'E' || seat0 == 'W') {\n return this.ewPairAt(1, table0)\n } else {\n return null\n }\n }\n\n pairPlaysBoardAt(pair, board, boardsPerRound = this.boardsPerRound) {\n let [boardSet, boardGroup] = this.boardSetGroupFromBoard(\n board,\n boardsPerRound,\n )\n for (let round of this.rounds) {\n for (let table in this.structure[round]) {\n let { ns_pair, ew_pair, board_set, board_group } =\n this.structure[round][table]\n if (ns_pair == pair || ew_pair == pair) {\n if (\n (this.board_sets_are_identical || boardSet == board_set) &&\n boardGroup == board_group\n ) {\n return { round: parseInt(round), table: parseInt(table) }\n }\n }\n }\n }\n return { round: null, table: null }\n }\n\n pairsAt(table, round) {\n return [\n this.structure[round][table].ns_pair,\n this.structure[round][table].ew_pair,\n ]\n }\n\n playerMovement(pair) {\n let pm = {}\n for (let round of this.rounds) {\n for (let table in this.structure[round]) {\n let { ns_pair, ew_pair, board_set, board_group } =\n this.structure[round][table]\n let boards = this.boardsInSetGroup(board_set, board_group)\n if (ns_pair == pair && ew_pair != this.phantomPair) {\n pm[round] = {\n sitting: 'ns',\n against: ew_pair,\n table,\n board_set,\n board_group,\n boards,\n }\n } else if (ew_pair == pair && ns_pair != this.phantomPair) {\n pm[round] = {\n sitting: 'ew',\n against: ns_pair,\n table,\n board_set,\n board_group,\n boards,\n }\n }\n }\n if (!pm[round]) {\n pm[round] = { sitting: 'out' }\n }\n }\n return pm\n }\n\n playingBoards(pair, round, boardsPerRound = this.boardsPerRound) {\n const [boardSet, boardGroup] = this.playingBoardSetGroup(pair, round)\n // boardSet will be 1 or greater if it exists; boardGroup can be 0\n return boardSet\n ? this.boardsInSetGroup(boardSet, boardGroup, boardsPerRound)\n : []\n }\n\n playingBoardSetGroup(pair, round) {\n for (let table in this.structure[round]) {\n const { ns_pair, ew_pair, board_set, board_group } =\n this.structure[round][table]\n if (\n ns_pair != this.phantomPair &&\n ew_pair != this.phantomPair &&\n (ns_pair == pair || ew_pair == pair)\n ) {\n return [board_set, board_group]\n }\n }\n return [false, false]\n }\n\n playingWith(thisPair, round) {\n let table = this.whereIsPair(thisPair, round)\n let position = this.structure[round][table]\n if (position && position.ns_pair == thisPair) {\n return { table, against: position.ew_pair, sitting: 'ns' }\n }\n if (position && position.ew_pair == thisPair) {\n return { table, against: position.ns_pair, sitting: 'ew' }\n }\n return null\n }\n\n robins() {\n // Only called on team events\n const robins = {}\n for (const round of this.rounds) {\n robins[round] = []\n for (const table in this.structure[round]) {\n const { ns_pair, ew_pair } = this.structure[round][table]\n const otherSide = this.playingWith(-1 * ew_pair, round)\n if (otherSide && otherSide.against != -1 * ns_pair) {\n robins[round].push(ns_pair)\n }\n }\n }\n return robins\n }\n\n isRobin(round, table) {\n if (this.board_sets_are_identical) {\n // This means this is not a Swiss event, and hence no robins\n return false\n }\n const { ns_pair } = this.structure[round][table]\n return this.robins()[round].includes(ns_pair)\n }\n\n isNotRobin(round, table) {\n return !this.isRobin(round, table)\n }\n\n sharingBoardsWith(round, table) {\n if (this.hasRoundTable(round, table)) {\n let boardGroup = this.structure[round][table].board_group\n let boardSet = this.structure[round][table].board_set\n let atTables = this.whereIsBoardSetGroup(boardSet, boardGroup, round)\n if (atTables.length > 1) {\n return atTables.filter(t => t != table)\n }\n }\n return false\n }\n\n sitting(pair, round, table) {\n let { ns_pair, ew_pair } = this.structure[round][table]\n if (pair == ns_pair) {\n return ew_pair == this.phantomPair ? 'out' : 'N/S'\n }\n if (pair == ew_pair) {\n return ns_pair == this.phantomPair ? 'out' : 'E/W'\n }\n return null\n }\n\n whereIsBoardSetGroup(boardSet, boardGroup, round) {\n // A board set can be at more than one table in a round\n let tables = []\n for (let table in this.structure[round]) {\n if (\n !this.isSitout(round, table) &&\n this.structure[round][table].board_group == boardGroup &&\n this.structure[round][table].board_set == boardSet\n ) {\n tables.push(parseInt(table))\n }\n }\n return tables\n }\n\n whereIsPair(pair, round) {\n for (let table in this.structure[round]) {\n if (this.structure[round][table].ns_pair == pair) {\n return parseInt(table)\n }\n if (this.structure[round][table].ew_pair == pair) {\n return parseInt(table)\n }\n }\n // Should never happen ... pair location must be defined for every round\n return null\n }\n}\n","import {\n LOAD_ACCOUNTS,\n ADD_OR_UPDATE_ACCOUNT_REQUEST,\n APPROVE_DENY_ACCOUNT_REQUEST,\n DELETE_ACCOUNT_REQUEST,\n} from 'redux/action_types.js'\n\nconst account_requests = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_ACCOUNTS:\n if (action.account_requests) {\n return action.account_requests.reduce((map, account_request) => {\n map[account_request.id] = account_request\n return map\n }, {})\n } else {\n return state\n }\n\n case ADD_OR_UPDATE_ACCOUNT_REQUEST:\n case APPROVE_DENY_ACCOUNT_REQUEST:\n return {\n ...state,\n [action.account_request.id]: action.account_request,\n }\n\n case DELETE_ACCOUNT_REQUEST:\n newState = { ...state }\n delete newState[action.id]\n return newState\n\n default:\n return state\n }\n}\n\nexport default account_requests\n","import {\n LOAD_ACCOUNTS,\n LOAD_USERS,\n DELETE_ACCOUNT,\n UPDATE_ACCOUNT,\n APPROVE_DENY_ACCOUNT_REQUEST,\n LOAD_ACCOUNT,\n UPDATE_USER,\n REMOVE_INVOICE,\n REMOVE_PAYOUT,\n LOAD_PAYOUTS,\n RECORD_PAYOUT,\n LOAD_INVOICES,\n} from 'redux/action_types.js'\n\nconst accounts = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_ACCOUNT:\n case LOAD_ACCOUNTS:\n case LOAD_INVOICES:\n case LOAD_USERS:\n if (action.accounts) {\n let newAccounts = action.accounts.reduce((map, account) => {\n map[account.id] = account\n return map\n }, {})\n return { ...state, ...newAccounts }\n } else {\n return state\n }\n\n case APPROVE_DENY_ACCOUNT_REQUEST:\n case UPDATE_ACCOUNT:\n case RECORD_PAYOUT:\n case REMOVE_PAYOUT:\n case LOAD_PAYOUTS:\n case REMOVE_INVOICE:\n if (action.account) {\n return {\n ...state,\n [action.account.id]: {\n ...state[action.account.id],\n ...action.account,\n },\n }\n } else {\n return state\n }\n\n case DELETE_ACCOUNT:\n newState = { ...state }\n delete newState[action.accountId]\n return newState\n\n case UPDATE_USER:\n newState = { ...state }\n for (let id in newState) {\n if (newState[id].owner_id == action.userId) {\n newState[id] = {\n ...newState[id],\n owner_name: action.user.full_name,\n owner_email: action.user.email,\n }\n }\n }\n return newState\n\n default:\n return state\n }\n}\n\nexport default accounts\n","import { LOAD_EVENT, UPDATE_SECTION } from 'redux/action_types.js'\n\nconst sectionId = award =>\n award.pair_section_id || award.team_section_id || award.section_id\n\nconst awards = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_EVENT: {\n if (action.awards) {\n return action.awards.reduce((map, award) => {\n map[sectionId(award)] = award\n return map\n }, {})\n } else {\n return state\n }\n }\n\n case UPDATE_SECTION: {\n if (action.hasOwnProperty('section_awards')) {\n if (action.section_awards) {\n return {\n ...state,\n [action.section.id]: action.section_awards,\n }\n } else {\n newState = { ...state }\n delete newState[action.section.id]\n return newState\n }\n }\n }\n\n default:\n return state\n }\n}\n\nexport default awards\n","import {\n LOAD_EVENT,\n UPDATE_BOARD_DATA,\n REPLACE_BOARD_DATA,\n UPDATE_SECTIONS,\n} from 'redux/action_types.js'\n\nconst board_sets = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_EVENT:\n case REPLACE_BOARD_DATA:\n case UPDATE_BOARD_DATA:\n if (action.board_sets) {\n let newState = action.type == UPDATE_BOARD_DATA ? { ...state } : {}\n\n for (let board_set of action.board_sets) {\n newState[board_set.id] = board_set\n }\n return newState\n } else {\n return state\n }\n\n case UPDATE_SECTIONS:\n if (action.sections) {\n newState = { ...state }\n for (let section of action.sections) {\n if (section.destroyed) {\n for (let board_set of Object.values(newState)) {\n if (board_set.section_id == section.id) {\n delete newState[board_set.id]\n }\n }\n }\n }\n return newState\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default board_sets\n","import {\n LOAD_EVENT,\n UPDATE_BOARD_DATA,\n REPLACE_BOARD_DATA,\n} from 'redux/action_types.js'\n\nconst boards = (state = {}, action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case REPLACE_BOARD_DATA:\n case UPDATE_BOARD_DATA:\n if (action.boards) {\n let new_state = action.type == UPDATE_BOARD_DATA ? { ...state } : {}\n for (let board of action.boards) {\n new_state[board.id] = board\n }\n return new_state\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default boards\n","import { LOAD_ACCOUNT } from 'redux/action_types.js'\n\nconst charges = (state = {}, action) => {\n switch (action.type) {\n case LOAD_ACCOUNT:\n if (action.charges) {\n return action.charges\n } else {\n return state\n }\n default:\n return state\n }\n}\n\nexport default charges\n","import {\n LOAD_USER_HOME_PAGE,\n LOAD_EVENT,\n LOAD_MOVEMENTS,\n LOAD_PENDING_MEMBERS,\n LOAD_USER,\n LOAD_USERS,\n UPDATE_MANAGED_GROUP,\n UPDATE_CLUB,\n UPDATE_MANAGED_CLUB,\n AUGMENT_GROUP_EVENTS,\n ADD_CLUB,\n DELETE_CLUB,\n LOAD_ACCOUNT,\n LOAD_ACCOUNTS,\n APPROVE_DENY_ACCOUNT_REQUEST,\n} from 'redux/action_types.js'\n\nconst clubs = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_USER:\n case LOAD_USERS:\n case LOAD_EVENT:\n case LOAD_MOVEMENTS:\n case LOAD_PENDING_MEMBERS:\n case LOAD_USER_HOME_PAGE:\n case LOAD_ACCOUNT:\n case LOAD_ACCOUNTS:\n case APPROVE_DENY_ACCOUNT_REQUEST:\n case AUGMENT_GROUP_EVENTS:\n if (action.clubs) {\n let new_clubs = action.clubs.reduce((map, club) => {\n map[club.id] = club\n return map\n }, {})\n return { ...state, ...new_clubs }\n } else {\n return state\n }\n\n case ADD_CLUB:\n case UPDATE_CLUB:\n case UPDATE_MANAGED_CLUB:\n case UPDATE_MANAGED_GROUP:\n if (action.club) {\n return { ...state, [action.club.id]: action.club }\n } else {\n return state\n }\n\n case DELETE_CLUB:\n newState = { ...state }\n delete newState[action.clubId]\n return newState\n\n default:\n return state\n }\n}\n\nexport default clubs\n","import {\n LOAD_EVENT,\n UPDATE_BOARD_DATA,\n REPLACE_BOARD_DATA,\n} from 'redux/action_types.js'\n\nconst deals = (state = {}, action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case UPDATE_BOARD_DATA:\n case REPLACE_BOARD_DATA:\n if (action.deals) {\n let new_state = action.type == UPDATE_BOARD_DATA ? { ...state } : {}\n for (let deal of action.deals) {\n new_state[deal.id] = deal\n }\n return new_state\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default deals\n","import {\n LOAD_EVENT,\n UPDATE_EVENT,\n UPDATE_SIGNUP,\n UPDATE_SIGNUP_SEATING,\n} from 'redux/action_types.js'\n\nconst event = (state = { loaded: false }, action) => {\n switch (action.type) {\n case LOAD_EVENT:\n return {\n ...state,\n ...action.event,\n loaded: true,\n }\n\n case UPDATE_EVENT:\n return {\n ...state,\n ...action.event,\n }\n\n case UPDATE_SIGNUP:\n case UPDATE_SIGNUP_SEATING:\n if (action.event) {\n return {\n ...state,\n ...action.event,\n }\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default event\n","import {\n LOAD_USER_HOME_PAGE,\n LOAD_USER_EVENTS,\n UPDATE_SIGNUP,\n ADD_EVENT,\n LOAD_MORE_SCORED_EVENTS,\n DELETE_EVENT,\n UPDATE_USER_EVENT,\n} from 'redux/action_types.js'\n\nconst events = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_USER_HOME_PAGE:\n case LOAD_USER_EVENTS: {\n let newEvents = action.events.reduce((map, event) => {\n map[event.id] = event\n return map\n }, {})\n return { ...state, ...newEvents }\n }\n\n case ADD_EVENT: {\n if (action.event) {\n return { ...state, [action.event.id]: action.event }\n } else {\n return state\n }\n }\n\n case UPDATE_USER_EVENT: {\n if (state[action.event.id]) {\n newState = {\n ...state,\n [action.event.id]: {\n ...state[action.event.id],\n ...action.event,\n },\n }\n if (action.signup_list) {\n newState[action.event.id].signup_list = action.signup_list\n }\n return newState\n } else {\n return state\n }\n }\n\n case DELETE_EVENT: {\n newState = { ...state }\n delete newState[action.eventId]\n return newState\n }\n\n case LOAD_MORE_SCORED_EVENTS: {\n if (action.error) {\n return state\n } else {\n let new_events = action.events.reduce((map, event) => {\n map[event.id] = event\n return map\n }, {})\n return { ...state, ...new_events }\n }\n }\n\n case UPDATE_SIGNUP: {\n if (!action.event) {\n return state\n }\n if (!state[action.event.id]) {\n return state\n }\n if (action.event.table_count != '') {\n let updated_event = {\n ...state[action.event.id],\n ...action.event,\n }\n return {\n ...state,\n [action.event.id]: updated_event,\n }\n } else {\n return state\n }\n }\n\n default:\n return state\n }\n}\n\nexport default events\n","// Because we don't need complete event data for group management\n\nimport {\n UPDATE_SIGNUP,\n DELETE_EVENT,\n ADD_EVENT,\n UPDATE_MANAGED_GROUP,\n CLEAR_GROUP_DATA,\n LOAD_MORE_PAST_EVENTS,\n UPDATE_USER_EVENT,\n AUGMENT_GROUP_EVENTS,\n UPDATE_GROUP_EVENT,\n REMOVE_GROUP_EVENTS,\n} from 'redux/action_types.js'\n\nlet newState\n\n// We use a separate reducer for group_events because not all events in the group_events\n// belong on a user's calendar in the non-manager screens\n\nconst group_events = (state = {}, action) => {\n switch (action.type) {\n case AUGMENT_GROUP_EVENTS:\n case LOAD_MORE_PAST_EVENTS:\n case UPDATE_MANAGED_GROUP: {\n if (action.error) {\n return state\n } else if (action.group_events) {\n let new_events = action.group_events.reduce((map, event) => {\n map[event.id] = event\n return map\n }, {})\n return { ...state, ...new_events }\n } else {\n return state\n }\n }\n\n case UPDATE_GROUP_EVENT:\n case ADD_EVENT: {\n return { ...state, [action.group_event.id]: action.group_event }\n }\n\n case UPDATE_USER_EVENT: {\n if (state[action.event.id]) {\n newState = {\n ...state,\n [action.event.id]: {\n ...state[action.event.id],\n ...action.event,\n },\n }\n if (action.signup_list) {\n newState[action.event.id].signup_list = action.signup_list\n }\n return newState\n } else {\n return state\n }\n }\n\n case DELETE_EVENT: {\n let newState = { ...state }\n delete newState[action.eventId]\n return newState\n }\n\n case UPDATE_SIGNUP: {\n if (!action.event) {\n return state\n }\n if (!state[action.event.id]) {\n return state\n }\n if (action.event.table_count != '') {\n let updated_event = {\n ...state[action.event.id],\n ...action.event,\n }\n return {\n ...state,\n [action.event.id]: updated_event,\n }\n } else {\n return state\n }\n }\n\n case REMOVE_GROUP_EVENTS: {\n let newState = { ...state }\n if (action.groupId) {\n Object.keys(newState).forEach(eventId => {\n if (newState[eventId].group_id == action.groupId) {\n delete newState[eventId]\n }\n })\n }\n return newState\n }\n\n case CLEAR_GROUP_DATA: {\n return {}\n }\n\n default:\n return state\n }\n}\n\nexport default group_events\n","import {\n LOAD_USER_HOME_PAGE,\n UPDATE_GROUP,\n UPDATE_GROUPS,\n UPDATE_MANAGED_GROUP,\n REMOVE_GROUP,\n UPDATE_MANAGED_CLUB,\n LOAD_USER,\n LOAD_USERS,\n LOAD_ACCOUNT,\n LOAD_ACCOUNTS,\n LOAD_PENDING_MEMBERS,\n ADD_CLUB,\n LOAD_EVENT,\n AUGMENT_GROUP_EVENTS,\n APPROVE_DENY_ACCOUNT_REQUEST,\n UPDATE_DISCORD_MEMBERS,\n UPDATE_PENDING_MEMBER,\n UPDATE_GROUP_ORDER,\n DELETE_EVENT,\n} from 'redux/action_types.js'\n\nconst groups = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_USER:\n case LOAD_USERS:\n case LOAD_EVENT:\n case LOAD_ACCOUNT:\n case LOAD_ACCOUNTS:\n case LOAD_PENDING_MEMBERS:\n case ADD_CLUB:\n case LOAD_USER_HOME_PAGE:\n case UPDATE_MANAGED_CLUB:\n case AUGMENT_GROUP_EVENTS:\n case APPROVE_DENY_ACCOUNT_REQUEST:\n case UPDATE_GROUPS:\n if (action.groups) {\n let new_groups = action.groups.reduce((map, group) => {\n map[group.id] = group\n return map\n }, {})\n return { ...state, ...new_groups }\n } else {\n return state\n }\n\n case UPDATE_MANAGED_GROUP:\n case UPDATE_GROUP:\n case UPDATE_DISCORD_MEMBERS:\n case UPDATE_PENDING_MEMBER:\n case DELETE_EVENT:\n if (action.group) {\n return {\n ...state,\n [action.group.id]: {\n ...state[action.group.id],\n ...action.group,\n },\n }\n } else {\n return state\n }\n\n case REMOVE_GROUP:\n newState = { ...state }\n delete newState[action.groupId]\n return newState\n\n case UPDATE_GROUP_ORDER:\n newState = { ...state }\n for (const g of action.groupOrder) {\n newState[g.id].sort_order = g.sort_order\n }\n return newState\n\n default:\n return state\n }\n}\n\nexport default groups\n","import {\n LOAD_ARTICLES,\n ADD_OR_UPDATE_HELP_ARTICLE,\n DELETE_HELP_ARTICLE,\n LOAD_HELP_ARTICLE,\n} from 'redux/action_types.js'\n\nconst help_articles = (state = {}, action) => {\n let newState\n\n switch (action.type) {\n case LOAD_HELP_ARTICLE:\n return {\n ...state,\n [action.help_article.selector]: action.help_article,\n }\n case LOAD_ARTICLES:\n if (action.help_articles) {\n newState = action.help_articles.reduce((map, help_article) => {\n map[help_article.id] = help_article\n return map\n }, {})\n return newState\n } else {\n return state\n }\n\n case ADD_OR_UPDATE_HELP_ARTICLE:\n return {\n ...state,\n [action.help_article.id]: action.help_article,\n }\n\n case DELETE_HELP_ARTICLE:\n newState = { ...state }\n delete newState[action.help_article.id]\n return newState\n\n default:\n return state\n }\n}\n\nexport default help_articles\n","import {\n LOAD_HELP_PANE,\n LOAD_PANES,\n ADD_OR_UPDATE_HELP_PANE,\n DELETE_HELP_PANE,\n} from 'redux/action_types.js'\n\nconst help_panes = (state = {}, action) => {\n let newState\n\n switch (action.type) {\n case LOAD_HELP_PANE:\n return {\n ...state,\n [action.help_pane.selector]: action.help_pane,\n }\n\n case LOAD_PANES:\n if (action.help_panes) {\n newState = action.help_panes.reduce((map, help_pane) => {\n map[help_pane.id] = help_pane\n return map\n }, {})\n return newState\n } else {\n return state\n }\n\n case ADD_OR_UPDATE_HELP_PANE:\n return {\n ...state,\n [action.help_pane.id]: action.help_pane,\n }\n\n case DELETE_HELP_PANE:\n newState = { ...state }\n delete newState[action.help_pane.id]\n return newState\n\n default:\n return state\n }\n}\n\nexport default help_panes\n","import {\n LOAD_HELP_PANE,\n LOAD_HELP_ARTICLE,\n LOAD_HELP_VIDEO,\n} from 'redux/action_types.js'\n\nconst help_tags = (state = {}, action) => {\n let newState\n\n switch (action.type) {\n case LOAD_HELP_PANE:\n case LOAD_HELP_ARTICLE:\n case LOAD_HELP_VIDEO:\n newState = { ...state }\n for (let related of action.related) {\n newState[related.id] = related\n }\n return newState\n\n default:\n return state\n }\n}\n\nexport default help_tags\n","import {\n LOAD_HELP_PANE,\n LOAD_HELP_ARTICLE,\n LOAD_TERMS,\n ADD_OR_UPDATE_HELP_TERM,\n DELETE_HELP_TERM,\n} from 'redux/action_types.js'\n\nconst help_terms = (state = {}, action) => {\n let newState\n\n switch (action.type) {\n case LOAD_HELP_PANE:\n case LOAD_HELP_ARTICLE:\n newState = { ...state }\n for (let help_term of action.help_terms) {\n newState[help_term.selector] = help_term\n }\n return newState\n\n case LOAD_TERMS:\n if (action.help_terms) {\n newState = action.help_terms.reduce((map, help_term) => {\n map[help_term.id] = help_term\n return map\n }, {})\n return newState\n } else {\n return state\n }\n\n case ADD_OR_UPDATE_HELP_TERM:\n return {\n ...state,\n [action.help_term.id]: action.help_term,\n }\n\n case DELETE_HELP_TERM:\n newState = { ...state }\n delete newState[action.id]\n return newState\n\n default:\n return state\n }\n}\n\nexport default help_terms\n","import {\n LOAD_HELP_VIDEO,\n LOAD_VIDEOS,\n ADD_OR_UPDATE_HELP_VIDEO,\n DELETE_HELP_VIDEO,\n} from 'redux/action_types.js'\n\nconst help_videos = (state = {}, action) => {\n let newState\n\n switch (action.type) {\n case LOAD_HELP_VIDEO:\n return {\n ...state,\n [action.help_video.selector]: action.help_video,\n }\n\n case LOAD_VIDEOS:\n if (action.help_videos) {\n newState = action.help_videos.reduce((map, help_video) => {\n map[help_video.id] = help_video\n return map\n }, {})\n return newState\n } else {\n return state\n }\n\n case ADD_OR_UPDATE_HELP_VIDEO:\n return {\n ...state,\n [action.help_video.id]: action.help_video,\n }\n\n case DELETE_HELP_VIDEO:\n newState = { ...state }\n delete newState[action.help_video.id]\n return newState\n\n default:\n return state\n }\n}\n\nexport default help_videos\n","import {\n ADD_HELPER,\n REFRESH_EVENT_ON,\n REFRESH_EVENT_OFF,\n REFRESH_SECTION_ON,\n REFRESH_SECTION_OFF,\n LOAD_EVENT,\n LOAD_PANES,\n LOAD_ARTICLES,\n LOAD_VIDEOS,\n LOAD_TERMS,\n UPDATE_SECTION,\n} from 'redux/action_types.js'\n\n// These are items needed site-wide, or UI elements that are also needed by the redux selectors\n\nconst helpers = (\n state = {\n current_user_id: null,\n displayed_user_id: null,\n masterpoint_update_date: null,\n refreshingEvent: false,\n refreshingSections: [],\n send_signup_emails: true,\n all_group_club_options: null,\n stratify_by: 'average',\n strats: [{ label: 'A', upper: false }],\n },\n action,\n) => {\n switch (action.type) {\n case ADD_HELPER:\n return { ...state, ...action.helper }\n\n case REFRESH_EVENT_ON:\n return { ...state, refreshingEvent: true }\n\n case LOAD_EVENT:\n case REFRESH_EVENT_OFF:\n return {\n ...state,\n refreshingEvent: false,\n refreshingSections: [],\n }\n\n case REFRESH_SECTION_ON:\n return {\n ...state,\n refreshingSections: [...state.refreshingSections, action.section],\n }\n\n case UPDATE_SECTION:\n return {\n ...state,\n refreshingSections: state.refreshingSections.filter(\n s => s != action.section.id,\n ),\n }\n\n case REFRESH_SECTION_OFF:\n return {\n ...state,\n refreshingSections: state.refreshingSections.filter(\n s => s != action.section,\n ),\n }\n\n case LOAD_PANES: {\n return { ...state, help_panes_loaded: true }\n }\n\n case LOAD_ARTICLES: {\n return { ...state, help_articles_loaded: true }\n }\n\n case LOAD_VIDEOS: {\n return { ...state, help_videos_loaded: true }\n }\n\n case LOAD_TERMS: {\n return { ...state, help_terms_loaded: true }\n }\n\n default:\n return state\n }\n}\n\nexport default helpers\n","import {\n LOAD_EVENT,\n LOAD_USER_HOME_PAGE,\n ADD_INVITE,\n REMOVE_INVITE,\n} from 'redux/action_types.js'\n\nconst invites = (state = [], action) => {\n switch (action.type) {\n case LOAD_EVENT: {\n return action.invites || state\n }\n\n case LOAD_USER_HOME_PAGE: {\n return action.invites || state\n }\n\n case ADD_INVITE: {\n return [...state, action.invite]\n }\n\n case REMOVE_INVITE: {\n return [...state].filter(i => i.id != action.id)\n }\n\n default:\n return state\n }\n}\n\nexport default invites\n","import {\n LOAD_ACCOUNT,\n LOAD_ACCOUNTS,\n LOAD_INVOICES,\n UPDATE_ACCOUNT,\n REMOVE_INVOICE,\n} from 'redux/action_types.js'\n\nconst invoices = (state = [], action) => {\n switch (action.type) {\n case LOAD_ACCOUNT:\n case LOAD_ACCOUNTS:\n case LOAD_INVOICES:\n if (action.invoices) {\n return action.invoices\n } else {\n return state\n }\n\n case UPDATE_ACCOUNT:\n if (action.invoices) {\n const existingRemoved = [...state].filter(\n i => i.account_id != action.accountId,\n )\n return [...existingRemoved, ...action.invoices]\n } else {\n return state\n }\n\n case REMOVE_INVOICE: {\n return [...state].filter(i => i.id != action.id)\n }\n\n default:\n return state\n }\n}\n\nexport default invoices\n","import { LOAD_EVENT, UPDATE_LATE_PLAYS } from 'redux/action_types.js'\n\nconst late_plays = (state = [], action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case UPDATE_LATE_PLAYS:\n return action.late_plays ? [...action.late_plays] : state\n\n default:\n return state\n }\n}\n\nexport default late_plays\n","import {\n LOAD_USER_HOME_PAGE,\n LOAD_EVENT,\n LOAD_USERS,\n UPDATE_MANAGED_CLUB,\n UPDATE_MANAGED_GROUP,\n ADD_LOCATION,\n UPDATE_LOCATION,\n DELETE_LOCATION,\n AUGMENT_GROUP_EVENTS,\n} from 'redux/action_types.js'\n\nconst locations = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_USER_HOME_PAGE:\n case LOAD_EVENT:\n case UPDATE_MANAGED_CLUB:\n case UPDATE_MANAGED_GROUP:\n case AUGMENT_GROUP_EVENTS:\n case LOAD_USERS:\n if (action.locations) {\n let new_state = { ...state }\n for (let location of action.locations) {\n new_state[location.id] = location\n }\n return new_state\n } else {\n return state\n }\n\n case ADD_LOCATION:\n case UPDATE_LOCATION:\n return {\n ...state,\n [action.location.id]: action.location,\n }\n\n case DELETE_LOCATION:\n newState = { ...state }\n delete newState[action.locationId]\n return newState\n\n default:\n return state\n }\n}\n\nexport default locations\n","import { LOAD_MAIL_FAILURES, UPDATE_MAIL_FAILURES } from 'redux/action_types.js'\n\nconst mail_failures = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_MAIL_FAILURES: {\n if (action.mail_failures) {\n let new_state = {}\n for (let mail_failure of action.mail_failures) {\n new_state[mail_failure.id] = mail_failure\n }\n return new_state\n } else {\n return state\n }\n }\n\n case UPDATE_MAIL_FAILURES: {\n if (action.mail_failures) {\n let new_state = { ...state }\n for (let mail_failure of action.mail_failures) {\n new_state[mail_failure.id] = mail_failure\n }\n return new_state\n } else {\n return state\n }\n }\n\n default:\n return state\n }\n}\n\nexport default mail_failures\n","import {\n LOAD_EVENT,\n ADD_MEMBER_SEATING_HISTORY,\n LOAD_USER,\n LOAD_USERS,\n MERGE_USER,\n UPDATE_USER,\n LOAD_USER_HOME_PAGE,\n ADD_MEMBER,\n UPDATE_MEMBER,\n DELETE_MEMBER,\n UPDATE_BY_CURRENT_USER,\n UPDATE_MANAGED_GROUP,\n UPDATE_CLUB_MEMBERS,\n UPDATE_PENDING_MEMBER,\n UPDATE_SIGNUP,\n} from 'redux/action_types.js'\n\n// Reducer --------------------------------------------------------------------\n\nconst members = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_EVENT:\n case LOAD_USER:\n case LOAD_USERS:\n case LOAD_USER_HOME_PAGE:\n case UPDATE_USER:\n case UPDATE_CLUB_MEMBERS:\n case UPDATE_MANAGED_GROUP:\n newState = { ...state }\n if (action.members) {\n for (let member of action.members) {\n newState[member.id] = member\n }\n }\n return newState\n\n case ADD_MEMBER:\n case UPDATE_MEMBER:\n case UPDATE_SIGNUP:\n case UPDATE_PENDING_MEMBER:\n case UPDATE_BY_CURRENT_USER: {\n if (action.member) {\n return {\n ...state,\n [action.member.id]: action.member,\n }\n } else {\n return state\n }\n }\n\n case ADD_MEMBER_SEATING_HISTORY: {\n let newState = { ...state }\n for (let member_id in action.seatingHistory) {\n newState[member_id].seatingHistory = action.seatingHistory[member_id]\n }\n return newState\n }\n\n case DELETE_MEMBER: {\n newState = { ...state }\n delete newState[action.memberId]\n return newState\n }\n\n case MERGE_USER: {\n newState = { ...state }\n if (action.members) {\n for (let member of action.members) {\n newState[member.id] = member\n }\n }\n if (action.source_user_id) {\n for (let member_id in newState) {\n if (newState[member_id].user_id == action.source_user_id) {\n delete newState[member_id]\n }\n }\n }\n return newState\n }\n\n default:\n return state\n }\n}\n\nexport default members\n","import { LOAD_MESSAGES, LOAD_EVENT } from 'redux/action_types.js'\n\nconst messages = (state = [], action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case LOAD_MESSAGES: {\n return action.messages ? action.messages : []\n }\n\n default:\n return state\n }\n}\n\nexport default messages\n","import {\n LOAD_MOVEMENTS,\n ADD_MOVEMENT,\n UPDATE_MOVEMENT,\n DELETE_MOVEMENT,\n LOAD_EVENT,\n AUGMENT_MOVEMENTS,\n} from 'redux/action_types.js'\n\nconst movements = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_EVENT:\n case LOAD_MOVEMENTS:\n case AUGMENT_MOVEMENTS:\n if (action.movements) {\n let new_movements = action.movements.reduce((map, movement) => {\n map[movement.id] = movement\n return map\n }, {})\n return { ...state, ...new_movements }\n } else {\n return state\n }\n\n case ADD_MOVEMENT:\n case UPDATE_MOVEMENT:\n return {\n ...state,\n [action.movement.id]: action.movement,\n }\n\n case DELETE_MOVEMENT:\n newState = { ...state }\n delete newState[action.movementId]\n return newState\n\n default:\n return state\n }\n}\n\nexport default movements\n","import {\n LOAD_USER_HOME_PAGE,\n LOAD_NOTES,\n ADD_NOTE,\n UPDATE_NOTE,\n DELETE_NOTE,\n} from 'redux/action_types.js'\n\nconst notes = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_USER_HOME_PAGE:\n case LOAD_NOTES:\n if (action.notes) {\n let new_state = {}\n for (let note of action.notes) {\n new_state[note.id] = note\n }\n return new_state\n } else {\n return state\n }\n\n case ADD_NOTE:\n case UPDATE_NOTE:\n return {\n ...state,\n [action.note.id]: action.note,\n }\n\n case DELETE_NOTE:\n newState = { ...state }\n delete newState[action.noteId]\n return newState\n\n default:\n return state\n }\n}\n\nexport default notes\n","import {\n LOAD_PAYOUTS,\n REMOVE_PAYOUT,\n UPDATE_PAYOUT,\n RECORD_PAYOUT,\n} from 'redux/action_types.js'\n\nconst payouts = (state = {}, action) => {\n let newState\n\n switch (action.type) {\n case LOAD_PAYOUTS:\n if (action.payouts) {\n newState = action.payouts.reduce((map, payout) => {\n map[payout.id] = payout\n return map\n }, {})\n return newState\n } else {\n return state\n }\n\n case RECORD_PAYOUT:\n case UPDATE_PAYOUT:\n if (action.payout) {\n return { ...state, [action.payout.id]: action.payout }\n } else {\n return state\n }\n\n case REMOVE_PAYOUT:\n newState = { ...state }\n delete newState[action.id]\n return newState\n\n default:\n return state\n }\n}\n\nexport default payouts\n","import {\n LOAD_EVENT,\n LOAD_PENDING_MEMBERS,\n LOAD_USER_HOME_PAGE,\n DELETE_PENDING_MEMBER,\n UPDATE_MANAGED_GROUP,\n UPDATE_PENDING_MEMBER,\n} from 'redux/action_types.js'\n\nconst pending_members = (state = {}, action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case LOAD_PENDING_MEMBERS:\n case LOAD_USER_HOME_PAGE:\n case UPDATE_MANAGED_GROUP: {\n if (action.pending_members) {\n let newState = action.pending_members.reduce((map, pending_member) => {\n map[pending_member.id] = pending_member\n return map\n }, {})\n return newState\n } else {\n return state\n }\n }\n\n case UPDATE_PENDING_MEMBER: {\n return {\n ...state,\n [action.pending_member.id]: { ...action.pending_member },\n }\n }\n\n case DELETE_PENDING_MEMBER: {\n let newState = { ...state }\n delete newState[action.id]\n return newState\n }\n\n default:\n return state\n }\n}\n\nexport default pending_members\n","import {\n LOAD_USER_HOME_PAGE,\n UPDATE_MANAGED_GROUP,\n UPDATE_SIGNUP,\n REMOVE_PENDING_PARTNER_REQUEST,\n} from 'redux/action_types.js'\n\n// The pending_partners reducer is only used on the home page. On event pages,\n// the data is parsed from the already-loaded data\n\nconst pending_partners = (state = {}, action) => {\n switch (action.type) {\n case LOAD_USER_HOME_PAGE: {\n if (action.pending_partners) {\n let newState = action.pending_partners.reduce(\n (map, pending_partner) => {\n map[pending_partner.id] = pending_partner\n return map\n },\n {},\n )\n return { ...state, ...newState }\n } else {\n return state\n }\n }\n case UPDATE_MANAGED_GROUP: {\n // In this case, we need to clear out all existing\n // pending partners for this group\n if (action.pending_partners) {\n let newState = { ...state }\n for (const id in newState) {\n if (newState[id].group_id == action.group.id) {\n delete newState[id]\n }\n }\n for (const pp of action.pending_partners) {\n newState[pp.id] = pp\n }\n return newState\n } else {\n return state\n }\n }\n\n case UPDATE_SIGNUP: {\n let updatedState = { ...state }\n if (action.signup.destroyed || action.signup.pending_partner == null) {\n delete updatedState[action.signup.id]\n return updatedState\n } else if (action.pending_partner_signup) {\n updatedState[action.pending_partner_signup.id] =\n action.pending_partner_signup\n return updatedState\n } else {\n return state\n }\n }\n\n case REMOVE_PENDING_PARTNER_REQUEST: {\n // It may already have been removed by UPDATE_SIGNUP if it is the user's own signup or on the event page\n let updatedState = { ...state }\n delete updatedState[action.id]\n return updatedState\n }\n\n default:\n return state\n }\n}\n\nexport default pending_partners\n","import {\n ADD_OR_UPDATE_PLAN,\n RELOAD_PLANS,\n DELETE_PLAN,\n LOAD_ACCOUNTS,\n LOAD_ACCOUNT,\n} from 'redux/action_types.js'\n\nconst plans = (state = {}, action) => {\n let newState\n switch (action.type) {\n case RELOAD_PLANS:\n case LOAD_ACCOUNT:\n case LOAD_ACCOUNTS:\n if (action.plans) {\n return action.plans.reduce((map, plan) => {\n map[plan.id] = plan\n return map\n }, {})\n } else {\n return state\n }\n\n case ADD_OR_UPDATE_PLAN:\n return { ...state, [action.plan.id]: action.plan }\n\n case DELETE_PLAN:\n newState = { ...state }\n delete newState[action.planId]\n return newState\n\n default:\n return state\n }\n}\n\nexport default plans\n","import {\n LOAD_PLAYS,\n ADD_PLAY,\n REMOVE_PLAY,\n DIRECTOR_CALL,\n} from 'redux/action_types.js'\n\nconst plays = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_PLAYS:\n newState = {}\n for (let play of action.plays) {\n newState[play.id] = play\n }\n return newState\n\n case ADD_PLAY:\n return {\n ...state,\n [action.play.id]: action.play,\n }\n\n case REMOVE_PLAY:\n newState = { ...state }\n delete newState[action.playId]\n return newState\n\n case DIRECTOR_CALL:\n return { ...state, [action.play.id]: action.play }\n\n default:\n return state\n }\n}\n\nexport default plays\n","import { LOAD_EVENT, UPDATE_SECTION } from 'redux/action_types.js'\n\nconst sectionId = result =>\n result?.pair_section_id || result?.team_section_id || result?.section_id\n\nconst results = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_EVENT: {\n if (action.results) {\n return action.results.reduce((map, result) => {\n map[sectionId(result)] = result\n return map\n }, {})\n } else {\n return state\n }\n }\n\n case UPDATE_SECTION: {\n // Note that section_result could be null\n if (action.hasOwnProperty('section_result')) {\n if (action.section_result) {\n return {\n ...state,\n [action.section.id]: action.section_result,\n }\n } else {\n newState = { ...state }\n delete newState[action.section.id]\n return newState\n }\n } else {\n return state\n }\n }\n\n default:\n return state\n }\n}\n\nexport default results\n","import { LOAD_EVENT, UPDATE_SCORE } from 'redux/action_types.js'\n\nconst scored = score => {\n return score.passed || score.artificially_scored || score.made_delta != null\n}\n\nconst recorded = score => {\n return scored(score) || score.not_played\n}\n\nconst score = (state = {}, action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case UPDATE_SCORE: {\n return {\n ...state,\n ...action.score,\n recorded: recorded(action.score),\n scored: scored(action.score),\n }\n }\n\n default:\n return state\n }\n}\n\nconst scores = (state = {}, action) => {\n switch (action.type) {\n case LOAD_EVENT: {\n if (action.scores) {\n return action.scores.reduce((map, g) => {\n let a = { type: action.type, score: g }\n map[g.id] = score({}, a)\n return map\n }, {})\n } else {\n return state\n }\n }\n\n case UPDATE_SCORE: {\n if (action.score.destroyed) {\n let updatedState = { ...state }\n delete updatedState[action.score.id]\n return updatedState\n } else {\n delete action.score['destroyed']\n return {\n ...state,\n [action.score_id]: score(state[action.score_id], action),\n }\n }\n }\n\n default:\n return state\n }\n}\n\nexport default scores\n","import {\n LOAD_EVENT,\n UPDATE_EVENT,\n UPDATE_SECTION,\n UPDATE_SECTIONS,\n} from 'redux/action_types.js'\n\nimport { indexBy } from 'helpers/utilities'\n// Section hasOne SectionMovement, which is also provided in the data attributes for these actions\n// i.e., there are not separate actions for SectionMovement. However there are separate reducers.\n\n// SectionMovements are indexed by section_id !!!\n\n// They are only called on the Event page.\n\nconst section_movements = (state = {}, action) => {\n let newSectionMovements\n switch (action.type) {\n case LOAD_EVENT:\n if (action.section_movements) {\n newSectionMovements = indexBy(action.section_movements, 'section_id')\n return {\n ...newSectionMovements,\n }\n } else {\n return state\n }\n\n case UPDATE_EVENT:\n case UPDATE_SECTIONS:\n if (action.section_movements) {\n newSectionMovements = { ...state }\n for (let section_movement of action.section_movements) {\n newSectionMovements[section_movement.section_id] = {\n ...newSectionMovements[section_movement.section_id],\n ...section_movement,\n }\n }\n if (action.sections) {\n for (let section of action.sections) {\n if (section.destroyed) {\n delete newSectionMovements[section.id]\n }\n }\n }\n return newSectionMovements\n } else {\n return state\n }\n\n case UPDATE_SECTION:\n if (action.section_movement) {\n if (action.section_movement.destroyed) {\n newSectionMovements = { ...state }\n delete newSectionMovements[action.section_movement.section_id]\n return newSectionMovements\n } else {\n return {\n ...state,\n [action.section_movement.section_id]: {\n ...state[action.section_movement.section_id],\n ...action.section_movement,\n },\n }\n }\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default section_movements\n","import {\n LOAD_EVENT,\n UPDATE_EVENT,\n UPDATE_SECTION,\n UPDATE_SECTIONS,\n LOAD_USER_EVENTS,\n UPDATE_SIGNUP_SEATING,\n} from 'redux/action_types.js'\n\nimport { indexBy } from 'helpers/utilities'\n\nconst sections = (state = {}, action) => {\n let newSections\n switch (action.type) {\n case LOAD_EVENT:\n case LOAD_USER_EVENTS:\n if (action.sections) {\n newSections = indexBy(action.sections, 'id')\n return {\n ...newSections,\n }\n } else {\n return state\n }\n\n case UPDATE_EVENT:\n case UPDATE_SECTIONS:\n case UPDATE_SIGNUP_SEATING:\n if (action.sections) {\n newSections = { ...state }\n for (let section of action.sections) {\n if (section.destroyed) {\n delete newSections[section.id]\n } else {\n newSections[section.id] = { ...newSections[section.id], ...section }\n }\n }\n return newSections\n } else {\n return state\n }\n\n case UPDATE_SECTION:\n if (action.section) {\n return {\n ...state,\n [action.section.id]: {\n ...state[action.section.id],\n ...action.section,\n },\n }\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default sections\n","import { LOAD_SIGNUP_OVERLAPS } from 'redux/action_types.js'\n\nconst signup_overlaps = (state = [], action) => {\n switch (action.type) {\n case LOAD_SIGNUP_OVERLAPS:\n if (action.signup_overlaps) {\n return action.signup_overlaps\n } else {\n return state\n }\n\n default:\n return state\n }\n}\n\nexport default signup_overlaps\n","import {\n LOAD_EVENT,\n LOAD_USER_EVENTS,\n LOAD_MORE_SCORED_EVENTS,\n UPDATE_MANAGED_GROUP,\n UPDATE_SIGNUP,\n UPDATE_SIGNUP_ATTR,\n UPDATE_SIGNUP_SEATING,\n} from 'redux/action_types.js'\n\nconst signups = (state = {}, action) => {\n switch (action.type) {\n case LOAD_EVENT:\n case LOAD_USER_EVENTS:\n case LOAD_MORE_SCORED_EVENTS:\n case UPDATE_MANAGED_GROUP:\n if (action.signups) {\n let newSignups = action.signups.reduce((map, signup) => {\n delete signup['destroyed']\n map[signup.id] = signup\n return map\n }, {})\n return { ...state, ...newSignups }\n } else {\n return state\n }\n\n case UPDATE_SIGNUP: {\n if (action.signup.destroyed) {\n let updatedState = { ...state }\n delete updatedState[action.signup.id]\n return updatedState\n } else {\n delete action.signup['destroyed']\n return { ...state, [action.signup.id]: action.signup }\n }\n }\n\n case UPDATE_SIGNUP_ATTR: {\n return {\n ...state,\n [action.signup.id]: { ...state[action.signup.id], ...action.signup },\n }\n }\n\n case UPDATE_SIGNUP_SEATING: {\n let updatedSeats = action.signupSeating.reduce((map, su) => {\n map[su.id] = { ...state[su.id], ...su }\n return map\n }, {})\n return { ...state, ...updatedSeats }\n }\n\n default:\n return state\n }\n}\n\nexport default signups\n","import {\n LOAD_USER,\n LOAD_USERS,\n MERGE_USER,\n UPDATE_USER,\n DELETE_USER,\n ADD_MEMBER,\n DELETE_MEMBER,\n UPDATE_MEMBER,\n UPDATE_MANAGED_GROUP,\n UPDATE_MANAGED_CLUB,\n UPDATE_CLUB_MEMBERS,\n LOAD_USER_HOME_PAGE,\n LOAD_EVENT,\n LOAD_ACCOUNTS,\n LOAD_MAIL_FAILURES,\n UPDATE_BY_CURRENT_USER,\n UPDATE_SIGNUP,\n UPDATE_PENDING_MEMBER,\n APPROVE_DENY_ACCOUNT_REQUEST,\n} from 'redux/action_types.js'\n\n// Reducer --------------------------------------------------------------------\n\nconst users = (state = {}, action) => {\n let newState\n switch (action.type) {\n case LOAD_USER:\n case UPDATE_USER:\n case ADD_MEMBER:\n case UPDATE_MEMBER:\n case DELETE_MEMBER:\n case APPROVE_DENY_ACCOUNT_REQUEST:\n case UPDATE_SIGNUP:\n case UPDATE_BY_CURRENT_USER:\n case UPDATE_PENDING_MEMBER:\n if (action.user) {\n return {\n ...state,\n [action.user.id]: { ...state[action.user.id], ...action.user },\n }\n } else {\n return state\n }\n\n case LOAD_EVENT:\n case UPDATE_CLUB_MEMBERS:\n case UPDATE_MANAGED_GROUP:\n case LOAD_ACCOUNTS:\n case LOAD_MAIL_FAILURES:\n case LOAD_USER_HOME_PAGE:\n case LOAD_USERS:\n if (action.users) {\n newState = { ...state }\n for (let user of action.users) {\n newState[user.id] = { ...user }\n }\n return newState\n } else {\n return state\n }\n\n case DELETE_USER:\n newState = { ...state }\n delete newState[action.userId]\n return newState\n\n case UPDATE_MANAGED_CLUB:\n if (action.manager) {\n return {\n ...state,\n [action.manager.id]: { ...state[action.user.id], ...action.manager },\n }\n } else {\n return state\n }\n\n case MERGE_USER:\n newState = { ...state }\n if (action.user) {\n newState[action.user.id] = { ...state[action.user.id], ...action.user }\n }\n if (action.source_user_id && newState[action.source_user_id]) {\n delete newState[action.source_user_id]\n }\n return newState\n\n default:\n return state\n }\n}\n\nexport default users\n","import { combineReducers } from 'redux'\nimport account_requests from 'redux/reducers/account_requests'\nimport accounts from 'redux/reducers/accounts'\nimport awards from 'redux/reducers/awards'\nimport board_sets from 'redux/reducers/board_sets'\nimport boards from './boards'\nimport charges from 'redux/reducers/charges'\nimport clubs from 'redux/reducers/clubs'\nimport deals from './deals'\nimport event from 'redux/reducers/event'\nimport events from 'redux/reducers/events'\nimport group_events from 'redux/reducers/group_events'\nimport groups from 'redux/reducers/groups'\nimport help_articles from 'redux/reducers/help_articles'\nimport help_panes from 'redux/reducers/help_panes'\nimport help_tags from 'redux/reducers/help_tags'\nimport help_terms from 'redux/reducers/help_terms'\nimport help_videos from 'redux/reducers/help_videos'\nimport helpers from 'redux/reducers/helpers'\nimport invites from 'redux/reducers/invites'\nimport invoices from 'redux/reducers/invoices'\nimport late_plays from 'redux/reducers/late_plays'\nimport locations from 'redux/reducers/locations'\nimport mail_failures from './mail_failures'\nimport members from 'redux/reducers/members'\nimport messages from 'redux/reducers/messages'\nimport movements from 'redux/reducers/movements'\nimport notes from 'redux/reducers/notes'\nimport payouts from 'redux/reducers/payouts'\nimport pending_members from 'redux/reducers/pending_members'\nimport pending_partners from 'redux/reducers/pending_partners'\nimport plans from 'redux/reducers/plans'\nimport plays from 'redux/reducers/plays'\nimport results from 'redux/reducers/results'\nimport scores from 'redux/reducers/scores'\nimport section_movements from './section_movements'\nimport sections from 'redux/reducers/sections'\nimport signup_overlaps from './signup_overlaps'\nimport signups from 'redux/reducers/signups'\nimport users from 'redux/reducers/users'\n\nconst rootReducer = combineReducers({\n account_requests,\n accounts,\n awards,\n boards,\n board_sets,\n charges,\n clubs,\n deals,\n event,\n events,\n group_events,\n groups,\n help_articles,\n help_panes,\n help_tags,\n help_terms,\n help_videos,\n helpers,\n invites,\n invoices,\n late_plays,\n locations,\n mail_failures,\n members,\n messages,\n movements,\n notes,\n payouts,\n pending_members,\n pending_partners,\n plans,\n plays,\n results,\n scores,\n section_movements,\n sections,\n signup_overlaps,\n signups,\n users,\n})\n\nexport default rootReducer\n","import { createStore, compose } from 'redux'\nimport rootReducer from 'redux/reducers/index.js'\n\nconst composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose\nexport const store = createStore(rootReducer, undefined, composeEnhancers())\n","import { ADD_HELPER, UPDATE_BY_CURRENT_USER } from 'redux/action_types.js'\nimport { loadStripe } from '@stripe/stripe-js'\nimport { store } from 'redux/store.js'\nimport { toast } from 'react-toastify'\n\nfunction setCurrentUserId(id) {\n return {\n type: ADD_HELPER,\n helper: { current_user_id: id },\n }\n}\n\nconst appSetup = container => {\n let passedProps = {}\n let dataset = container.dataset\n let stripePromise\n let updateUserMemberStore\n let currentUserData\n if (dataset['currentUser']) {\n currentUserData = JSON.parse(dataset['currentUser'])\n if (currentUserData.stripe_public_key) {\n stripePromise = loadStripe(currentUserData.stripe_public_key)\n }\n updateUserMemberStore = store\n ? updates =>\n store.dispatch({\n type: UPDATE_BY_CURRENT_USER,\n ...updates,\n })\n : null\n }\n\n for (let key in dataset) {\n if (key == 'currentUser') {\n continue\n } else if (key == 'alerts') {\n if (dataset['alerts'].length > 0) {\n for (const alert of JSON.parse(dataset['alerts'])) {\n toast(alert.text, {\n type: alert.type,\n autoClose: alert.type != 'error',\n })\n }\n }\n } else if (dataset[key] == 'true') {\n passedProps[key] = true\n } else if (dataset[key] == 'false') {\n passedProps[key] = false\n } else if (key.substr(-2) == 'Id') {\n passedProps[key] = parseInt(dataset[key])\n } else {\n passedProps[key] = dataset[key]\n }\n }\n\n if (currentUserData && store) {\n store.dispatch(setCurrentUserId(currentUserData.id))\n }\n\n const cuId = currentUserData ? currentUserData.id : null\n\n container.classList.add('loaded')\n\n return {\n currentUserData,\n cuId,\n updateUserMemberStore,\n passedProps,\n stripePromise,\n store,\n }\n}\n\nexport default appSetup\n","import Nav0_bg from 'nav0.png'\nimport SubNav0_bg from 'subnav0.png'\nimport Nav1_bg from 'nav1.png'\nimport SubNav1_bg from 'subnav1.png'\nimport Nav2_bg from 'nav2.png'\nimport SubNav2_bg from 'subnav2.png'\nimport Nav3_bg from 'nav3.png'\nimport SubNav3_bg from 'subnav3.png'\nimport LowerNav_bg from 'lowernav.png'\nimport LowerSubNav_bg from 'lowersubnav.png'\n\nexport const ColorConstants = {\n white: '#ffffff',\n highlight: '#fce17e',\n negative: '#aa0000',\n positive: '#007700',\n neutral: '#cccccc',\n red: '#990000',\n medBlue: '#0875a0',\n aloe: '#c5d4c5',\n redSuit: '#aa0000',\n blackSuit: '#222222',\n toggleNavOff: '#bbbbbb',\n brown: '#635b1a',\n gold: '#c39933',\n darkBlue: '#1b4153',\n neonGreen: '#21c121',\n neonYellow: '#ffff00',\n text: {\n default: '#444444',\n darker: '#222222',\n strong: '#000000',\n primary: '#337ab7',\n success: '#348435',\n info: '#319bbb',\n warning: '#f9ab40',\n danger: '#a11215',\n alert: '#aa0000',\n announce: '#3081a0',\n clubTitle: '#ab9353',\n groupTitle: '#0875a0',\n accountTitle: '#619d13',\n commentInListing: '#bd9127',\n muted: '#777777',\n green: '#697f6b',\n nav: '#ccc',\n navHover: '#fff',\n navHighlighted: '#fce17e',\n subNav: '#ffffff',\n subNavHighlighted: '#fce17e',\n intermediateNav: '#444444',\n activeScoreEntry: '#444444',\n helpHeader: '#209da7',\n },\n border: {\n danger: '#ebccd1',\n success: '#2d722e',\n action: '#0875a0',\n well: '#d9dcd5',\n listing: '#d9dcd5',\n activeScoreEntry: '#babbb7',\n staticControls: '#f0f0d8',\n },\n bg: {\n body: '#f8f8f5',\n danger: '#f2dede',\n neutral: '#eeeeee',\n success: '#dff0d8',\n toolbar: '#2b6392',\n toolbarContent: '#dbedef',\n hoverRow: '#dbedef',\n well: '#e8eae5',\n tableTitle: '#dbdcd0',\n instruction: '#dbedef',\n staticControls: '#f8f8f5',\n news: '#fffbeb',\n club: '#ede1c1',\n group: '#dbedef',\n newGroup: '#d4dcba',\n listingClosed: '#ffffff',\n listingOpen: '#eeeeee',\n nav: '#697f6b',\n subnav: '#3f4641',\n altnav: '#0875a0',\n altsubnav: '#1b4153',\n intermediateNav: '#e1e2d7',\n highlight: '#ffff00',\n activeScoreEntry: '#e8eae5',\n },\n bgImages: {\n locked:\n 'repeating-linear-gradient(-45deg, rgba(0,0,0,0.03), rgba(0,0,0,0.03) 8px, transparent 8px, transparent 16px)',\n },\n}\n\nexport const NavColors = {\n level0: {\n navText: '#f9f9f9',\n navHighlighted: '#fce17e',\n navHover: '#fff',\n navBg: `#697f6b url(${Nav0_bg})`,\n subNavBg: `#3f4641 url(${SubNav0_bg})`,\n },\n level1: {\n navText: '#f9f9f9',\n navHighlighted: '#fce17e',\n navHover: '#fff',\n navBg: `#0875a0 url(${Nav1_bg})`,\n subNavBg: `#1b4153 url(${SubNav1_bg})`,\n },\n level2: {\n navText: '#f9f9f9',\n navHighlighted: '#fce17e',\n navHover: '#fff',\n navBg: `#3d1e6c url(${Nav2_bg})`,\n subNavBg: `#2e1456 url(${SubNav2_bg})`,\n },\n level3: {\n navText: '#f9f9f9',\n navHighlighted: '#fce17e',\n navHover: '#fff',\n navBg: `#635b1a url(${Nav3_bg})`,\n subNavBg: `#413b10 url(${SubNav3_bg})`,\n },\n lowerNav: {\n navText: '#cccccc',\n navHighlighted: '#fce17e',\n navHover: '#ffffff',\n navBg: `#202020 url(${LowerNav_bg})`,\n subNavBg: `#404040 url(${LowerSubNav_bg})`,\n },\n intermediate: {\n navBg: '#e1e2d7',\n text: '#444444',\n },\n}\n\nexport const PlayColors = {\n vuln: '#990000',\n notVuln: '#ffffff',\n pass: '#009900',\n double: '#990000',\n redouble: '#000099',\n activePlayer: {\n text: '#ffffff',\n bg: '#2b9284',\n },\n playerNames: {\n text: '#2a3524',\n },\n alert: {\n border: '#FF0000',\n bg: '#e6de72',\n text: '#990000',\n },\n explanation: {\n border: '#0000FF',\n text: '#000099',\n },\n acceptances: {\n bg: '#e6de72',\n color: '#000000',\n },\n auctionChart: {\n bg: '#ffffff',\n border: {\n interior: '#7f7f7f',\n exterior: '#cccccc',\n },\n header: {\n bg: '#7f7f7f',\n text: '#ffffff',\n },\n },\n input: {\n color: '#444444',\n bg: 'rgba(255,255,255, 0.7)',\n border: '#555555',\n },\n card: {\n bg: '#ffffff',\n alreadyPlayed: {\n bg: 'transparent',\n opacity: '0.3',\n },\n disabled: {\n opacity: '0.6',\n },\n },\n trick: {\n bg: '#658257',\n card: {\n bg: '#ffffff',\n color: '#222222',\n active: {\n bg: 'yellow',\n },\n placeholder: {\n bg: 'rgba(0, 0, 0, 0.1)',\n active: 'yellow',\n },\n },\n display: {\n won: '#007700',\n lost: '#aa0000',\n inspecting: 'yellow',\n border: '#ffffff',\n },\n },\n presentIndicator: {\n border: '#999999',\n online: {\n bg: '#009900',\n },\n offline: {\n bg: '#9c9c9c',\n },\n },\n bg: {\n tablecloth: '#bcc4b8',\n auctionArea: '#658257',\n actionBox: '#e6de72',\n infoBox: '#eeeeee',\n highlight: 'yellow',\n },\n}\n\nexport const StratColors = {\n strat: {\n A: {\n bg: '#e3f1e1',\n text: '#559247',\n },\n B: {\n bg: '#f1e1e1',\n text: '#d6464f',\n },\n C: {\n bg: '#ddecfb',\n text: '#2d67b1',\n },\n D: {\n bg: '#e9e3cd',\n text: '#a9743b',\n },\n E: {\n bg: '#c4dfe0',\n text: '#07979c',\n },\n F: {\n bg: '#dac6e8',\n text: '#741bb0',\n },\n G: {\n bg: '#f7ddc8',\n text: '#d86609',\n },\n 'too-high': {\n bg: '#f9f6ac',\n text: '#000000',\n },\n 'too-low': {\n bg: '#f9f6ac',\n text: '#000000',\n },\n none: {\n bg: 'transparent',\n text: '#444444',\n },\n },\n}\n\n// attending is alias for playing\nexport const SignupColors = {\n status: {\n playing: {\n base: '#57652a',\n bg: '#d4dcba',\n text: '#768939',\n btn: '#57652a',\n },\n attending: {\n base: '#57652a',\n bg: '#d4dcba',\n text: '#768939',\n btn: '#57652a',\n },\n waiting: {\n base: '#ab9353',\n bg: '#efe1ab',\n text: '#ab9353',\n btn: '#ab9353',\n },\n sub: {\n base: '#155765',\n bg: '#d3e6e8',\n text: '#1e7b8f',\n btn: '#155765',\n },\n cancelled: {\n base: '#76323f',\n bg: '#ecd7dd',\n text: '#9a4152',\n btn: '#76323f',\n },\n allowed: {\n base: '#d48b45',\n bg: '#f7e6d7',\n text: '#d48b45',\n btn: '#d48b45',\n },\n 'not-signed-up': {\n base: '#888888',\n bg: '#cecece',\n text: '#888888',\n btn: '#888888',\n },\n notSignedUp: {\n base: '#888888',\n bg: '#cecece',\n text: '#888888',\n btn: '#888888',\n },\n active: {\n base: '#888888',\n bg: '#cecece',\n text: '#888888',\n btn: '#888888',\n },\n guest: {\n base: '#888888',\n bg: '#cecece',\n text: '#888888',\n btn: '#888888',\n },\n none: {\n base: '#ffffff',\n bg: '#ffffff',\n text: '#444444',\n btn: '#ffffff',\n },\n 'non-playing-director': {\n base: '#c5c7b4',\n bg: '#dadbce',\n text: '#5d5f4d',\n btn: '#c5c7b4',\n },\n },\n}\n\nexport const StationaryPreferenceColors = {\n required: '#990000',\n requested: '#de7d26',\n undesired: '#107f01',\n indifferent: '#999999',\n}\n\nconst validStratLabels = Object.keys(StratColors.strat)\n\nexport const stratColor = (level, type) => {\n const validLevel = validStratLabels.includes(level) ? level : 'none'\n return StratColors.strat[validLevel][type]\n}\n\nexport const signupColor = (status, type) => {\n return SignupColors.status[status][type]\n}\n\nexport const ScoringProgressColors = {\n not_started: ColorConstants.negative,\n paused: ColorConstants.negative,\n entry: ColorConstants.positive,\n complete: ColorConstants.gold,\n unknown: ColorConstants.negative,\n}\n\nexport const PricingTierColors = {\n rsvp: ColorConstants.medBlue,\n score: ColorConstants.redSuit,\n play: ColorConstants.positive,\n teach: ColorConstants.gold,\n}\n","export const STRAT_LABELS = '_ABCDEFG'\nexport const MAX_STRATS = 7\n\nexport const NESW = ['N', 'E', 'S', 'W']\nexport const NSEW = ['N', 'S', 'E', 'W']\nexport const NSEWXY = ['N', 'S', 'E', 'W', 'X', 'Y']\n\nexport const SEAT_NAMES = {\n N: 'North',\n S: 'South',\n E: 'East',\n W: 'West',\n X: 'Alt-X',\n Y: 'Alt-Y',\n}\n\nexport const DIRECTION_FROM_SEAT = {\n N: 'N/S',\n S: 'N/S',\n E: 'E/W',\n W: 'E/W',\n}\n\nexport const MANAGER_NOTIFICATIONS = {\n hourly_signup: 'hourly signup activity',\n daily_signup: 'daily signup activity',\n pending_partner: 'pending partner requests',\n}\n\nexport const extPayOptions = {\n cash_payment: 'Cash',\n check_payment: 'Check',\n credit_card_payment: 'Credit card',\n free_play: 'Free play',\n unpaid: 'Unpaid',\n}\n\nexport const BOARD_COLOR_OPTIONS = [\n { label: 'Blue', value: '#0b3ebd' },\n { label: 'Green', value: '#025e06' },\n { label: 'Light Blue', value: '#169fe3' },\n { label: 'Yellow', value: '#fec107' },\n { label: 'Red', value: '#aa0000' },\n { label: 'Orange', value: '#fd5901' },\n { label: 'Purple', value: '#4e006b' },\n { label: 'Almond', value: '#fbe3c2' },\n { label: 'Magenta', value: '#f72664' },\n { label: 'Black', value: '#000000' },\n { label: 'Gray', value: '#cccccc' },\n]\n\nexport const BOARD_COUNT_OPTIONS = [\n { label: 'Boards 1-36', value: 36 },\n { label: 'Boards 1-32', value: 32 },\n { label: 'Boards 1-28', value: 28 },\n { label: 'Boards 1-24', value: 24 },\n { label: 'Boards 1-18', value: 18 },\n { label: 'Boards 1-16', value: 16 },\n { label: 'Boards 1-12', value: 12 },\n]\nexport const SUITS = ['S', 'H', 'D', 'C']\nexport const RANKS = [\n 'A',\n 'K',\n 'Q',\n 'J',\n 'T',\n '9',\n '8',\n '7',\n '6',\n '5',\n '4',\n '3',\n '2',\n]\n\nexport const RANKS_REV = '23456789TJQKA'\n\nexport const SUIT_OFFSET = { S: 0, H: 13, D: 26, C: 39 }\nexport const RANK_OFFSET = {\n A: 0,\n K: 1,\n Q: 2,\n J: 3,\n T: 4,\n 9: 5,\n 8: 6,\n 7: 7,\n 6: 8,\n 5: 9,\n 4: 10,\n 3: 11,\n 2: 12,\n}\n\nexport const RANK_VALUE = {\n A: 4,\n K: 3,\n Q: 2,\n J: 1,\n T: 0,\n 9: 0,\n 8: 0,\n 7: 0,\n 6: 0,\n 5: 0,\n 4: 0,\n 3: 0,\n 2: 0,\n}\n\nexport const DISPLAY_CURRENT_EVENTS_COUNT = 5\n\nexport const LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n\nexport const MONTH = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n]\n\nexport const WEEKDAYS = [\n 'Sunday',\n 'Monday',\n 'Tuesday',\n 'Wednesday',\n 'Thursday',\n 'Friday',\n 'Saturday',\n]\n\nexport const WEEKDAY_OPTIONS = [\n { label: 'Varies', value: -1 },\n { label: WEEKDAYS[0], value: 0 },\n { label: WEEKDAYS[1], value: 1 },\n { label: WEEKDAYS[2], value: 2 },\n { label: WEEKDAYS[3], value: 3 },\n { label: WEEKDAYS[4], value: 4 },\n { label: WEEKDAYS[5], value: 5 },\n { label: WEEKDAYS[6], value: 6 },\n]\n\nexport const SHORT_MONTHS = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n]\n\nexport const SHORT_WEEKDAYS = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']\n\nexport const EDITOR_HELP =\n 'Merge tags: #=pane, @=term, $=article, /=video, %=button'\n\nexport const AUTO_CANCEL_OPTIONS = [\n { label: 'off', value: '' },\n { label: '< 1 minute', value: '1' },\n { label: '< 2 minutes', value: '2' },\n { label: '< 3 minutes', value: '3' },\n { label: '< 4 minutes', value: '4' },\n { label: '< 5 minutes', value: '5' },\n { label: '< 6 minutes', value: '6' },\n { label: '< 7 minutes', value: '7' },\n { label: '< 8 minutes', value: '8' },\n]\n\nexport const BOARD_DURATION_OPTIONS = [\n { label: '4 min / board', value: 4.0 },\n { label: '4.5 min / board', value: 4.5 },\n { label: '5 min / board', value: 5.0 },\n { label: '5.5 min / board', value: 5.5 },\n { label: '6 min / board', value: 6.0 },\n { label: '6.5 min / board', value: 6.5 },\n { label: '7 min / board', value: 7.0 },\n { label: '7.5min / board (default)', value: '' },\n { label: '8 min / board', value: 8.0 },\n { label: '8.5 min / board', value: 8.5 },\n { label: '9 min / board', value: 9.0 },\n { label: '9.5 min / board', value: 9.5 },\n { label: '10 min / board', value: 10.0 },\n { label: '10.5 min / board', value: 10.5 },\n { label: '11 min / board', value: 11.0 },\n { label: '11.5 min / board', value: 11.5 },\n { label: '12 min / board', value: 12.0 },\n { label: '12.5 min / board', value: 12.5 },\n { label: '13 min / board', value: 13.0 },\n { label: '13.5 min / board', value: 13.5 },\n { label: '14 min / board', value: 14.0 },\n { label: '14.5 min / board', value: 14.5 },\n { label: '15 min / board', value: 15.0 },\n]\n\nexport const TABLE_COUNT_OPTIONS = [\n { label: '2 tables', value: 2 },\n { label: '3 tables', value: 3 },\n { label: '4 tables', value: 4 },\n { label: '5 tables', value: 5 },\n { label: '6 tables', value: 6 },\n { label: '7 tables', value: 7 },\n { label: '8 tables', value: 8 },\n { label: '9 tables', value: 9 },\n { label: '10 tables', value: 10 },\n { label: '11 tables', value: 11 },\n { label: '12 tables', value: 12 },\n { label: '13 tables', value: 13 },\n { label: '14 tables', value: 14 },\n { label: '15 tables', value: 15 },\n { label: '16 tables', value: 16 },\n { label: '17 tables', value: 17 },\n { label: '18 tables', value: 18 },\n { label: '19 tables', value: 19 },\n { label: '20 tables', value: 20 },\n { label: '21 tables', value: 21 },\n { label: '22 tables', value: 22 },\n { label: '23 tables', value: 23 },\n { label: '24 tables', value: 24 },\n { label: '25 tables', value: 25 },\n { label: '26 tables', value: 26 },\n { label: '27 tables', value: 27 },\n { label: '28 tables', value: 28 },\n { label: '29 tables', value: 29 },\n { label: '30 tables', value: 30 },\n { label: '31 tables', value: 31 },\n { label: '32 tables', value: 32 },\n { label: '33 tables', value: 33 },\n { label: '34 tables', value: 34 },\n { label: '35 tables', value: 35 },\n { label: '36 tables', value: 36 },\n]\n\nexport const VISIBILITY_OPTIONS = [\n { value: 'open', label: 'Open' },\n { value: 'private', label: 'Private' },\n]\n\nexport const AWARD_TYPE_OPTIONS = [\n { value: 'none', label: 'None' },\n { value: 'acbl_masterpoint', label: 'ACBL Masterpoint' },\n { value: 'rsvp_charity', label: 'RSVP Charity' },\n]\n\nexport const PRICING_TIERS = {\n rsvp: 'Reservations Only',\n score: 'In Person',\n play: 'Online Play',\n teach: 'Teaching Game',\n}\n\nexport const PRICING_TIER_OPTIONS = [\n { label: 'Reservations Only', value: 'rsvp' },\n { label: 'In Person', value: 'score' },\n { label: 'Online Play', value: 'play' },\n { label: 'Teaching Game', value: 'teach' },\n]\n\nexport const TIME_OPTIONS = [\n { value: 15, label: '12:15 am' },\n { value: 30, label: '12:30 am' },\n { value: 45, label: '12:45 am' },\n { value: 100, label: '1:00 am' },\n { value: 115, label: '1:15 am' },\n { value: 130, label: '1:30 am' },\n { value: 145, label: '1:45 am' },\n { value: 200, label: '2:00 am' },\n { value: 215, label: '2:15 am' },\n { value: 230, label: '2:30 am' },\n { value: 245, label: '2:45 am' },\n { value: 300, label: '3:00 am' },\n { value: 315, label: '3:15 am' },\n { value: 330, label: '3:30 am' },\n { value: 345, label: '3:45 am' },\n { value: 400, label: '4:00 am' },\n { value: 415, label: '4:15 am' },\n { value: 430, label: '4:30 am' },\n { value: 445, label: '4:45 am' },\n { value: 500, label: '5:00 am' },\n { value: 515, label: '5:15 am' },\n { value: 530, label: '5:30 am' },\n { value: 545, label: '5:45 am' },\n { value: 600, label: '6:00 am' },\n { value: 615, label: '6:15 am' },\n { value: 630, label: '6:30 am' },\n { value: 645, label: '6:45 am' },\n { value: 700, label: '7:00 am' },\n { value: 715, label: '7:15 am' },\n { value: 730, label: '7:30 am' },\n { value: 745, label: '7:45 am' },\n { value: 800, label: '8:00 am' },\n { value: 815, label: '8:15 am' },\n { value: 830, label: '8:30 am' },\n { value: 845, label: '8:45 am' },\n { value: 900, label: '9:00 am' },\n { value: 915, label: '9:15 am' },\n { value: 930, label: '9:30 am' },\n { value: 945, label: '9:45 am' },\n { value: 1000, label: '10:00 am' },\n { value: 1015, label: '10:15 am' },\n { value: 1030, label: '10:30 am' },\n { value: 1045, label: '10:45 am' },\n { value: 1100, label: '11:00 am' },\n { value: 1115, label: '11:15 am' },\n { value: 1130, label: '11:30 am' },\n { value: 1145, label: '11:45 am' },\n { value: 1200, label: '12:00 pm' },\n { value: 1215, label: '12:15 pm' },\n { value: 1230, label: '12:30 pm' },\n { value: 1245, label: '12:45 pm' },\n { value: 1300, label: '1:00 pm' },\n { value: 1315, label: '1:15 pm' },\n { value: 1330, label: '1:30 pm' },\n { value: 1345, label: '1:45 pm' },\n { value: 1400, label: '2:00 pm' },\n { value: 1415, label: '2:15 pm' },\n { value: 1430, label: '2:30 pm' },\n { value: 1445, label: '2:45 pm' },\n { value: 1500, label: '3:00 pm' },\n { value: 1515, label: '3:15 pm' },\n { value: 1530, label: '3:30 pm' },\n { value: 1545, label: '3:45 pm' },\n { value: 1600, label: '4:00 pm' },\n { value: 1615, label: '4:15 pm' },\n { value: 1630, label: '4:30 pm' },\n { value: 1645, label: '4:45 pm' },\n { value: 1700, label: '5:00 pm' },\n { value: 1715, label: '5:15 pm' },\n { value: 1730, label: '5:30 pm' },\n { value: 1745, label: '5:45 pm' },\n { value: 1800, label: '6:00 pm' },\n { value: 1815, label: '6:15 pm' },\n { value: 1830, label: '6:30 pm' },\n { value: 1845, label: '6:45 pm' },\n { value: 1900, label: '7:00 pm' },\n { value: 1915, label: '7:15 pm' },\n { value: 1930, label: '7:30 pm' },\n { value: 1945, label: '7:45 pm' },\n { value: 2000, label: '8:00 pm' },\n { value: 2015, label: '8:15 pm' },\n { value: 2030, label: '8:30 pm' },\n { value: 2045, label: '8:45 pm' },\n { value: 2100, label: '9:00 pm' },\n { value: 2115, label: '9:15 pm' },\n { value: 2130, label: '9:30 pm' },\n { value: 2145, label: '9:45 pm' },\n { value: 2200, label: '10:00 pm' },\n { value: 2215, label: '10:15 pm' },\n { value: 2230, label: '10:30 pm' },\n { value: 2245, label: '10:45 pm' },\n { value: 2300, label: '11:00 pm' },\n { value: 2315, label: '11:15 pm' },\n { value: 2330, label: '11:30 pm' },\n { value: 2345, label: '11:45 pm' },\n { value: 2359, label: 'Midnight' },\n]\n\nexport const STATE_OPTIONS = [\n { value: 'AK', label: 'AK' },\n { value: 'AL', label: 'AL' },\n { value: 'AR', label: 'AR' },\n { value: 'AZ', label: 'AZ' },\n { value: 'CA', label: 'CA' },\n { value: 'CO', label: 'CO' },\n { value: 'CT', label: 'CT' },\n { value: 'DC', label: 'DC' },\n { value: 'DE', label: 'DE' },\n { value: 'FL', label: 'FL' },\n { value: 'GA', label: 'GA' },\n { value: 'HI', label: 'HI' },\n { value: 'IA', label: 'IA' },\n { value: 'ID', label: 'ID' },\n { value: 'IL', label: 'IL' },\n { value: 'IN', label: 'IN' },\n { value: 'KS', label: 'KS' },\n { value: 'KY', label: 'KY' },\n { value: 'LA', label: 'LA' },\n { value: 'MA', label: 'MA' },\n { value: 'MD', label: 'MD' },\n { value: 'ME', label: 'ME' },\n { value: 'MI', label: 'MI' },\n { value: 'MN', label: 'MN' },\n { value: 'MO', label: 'MO' },\n { value: 'MS', label: 'MS' },\n { value: 'MT', label: 'MT' },\n { value: 'NC', label: 'NC' },\n { value: 'ND', label: 'ND' },\n { value: 'NE', label: 'NE' },\n { value: 'NH', label: 'NH' },\n { value: 'NJ', label: 'NJ' },\n { value: 'NM', label: 'NM' },\n { value: 'NV', label: 'NV' },\n { value: 'NY', label: 'NY' },\n { value: 'OH', label: 'OH' },\n { value: 'OK', label: 'OK' },\n { value: 'OR', label: 'OR' },\n { value: 'PA', label: 'PA' },\n { value: 'RI', label: 'RI' },\n { value: 'SC', label: 'SC' },\n { value: 'SD', label: 'SD' },\n { value: 'TN', label: 'TN' },\n { value: 'TX', label: 'TX' },\n { value: 'UT', label: 'UT' },\n { value: 'VA', label: 'VA' },\n { value: 'VT', label: 'VT' },\n { value: 'WA', label: 'WA' },\n { value: 'WI', label: 'WI' },\n { value: 'WV', label: 'WV' },\n { value: 'WY', label: 'WY' },\n]\n\nexport const AUDIENCE_OPTIONS = [\n { label: 'User', value: 'user' },\n { label: 'Group Manager', value: 'group-manager' },\n { label: 'Club Manager', value: 'club-manager' },\n { label: 'Account Owner', value: 'account-owner' },\n { label: 'Admin', value: 'admin' },\n]\n\nexport const EVENT_TYPE_OPTIONS = [\n { label: 'Individual', value: 'IndividualEvent' },\n { label: 'Pair', value: 'PairEvent' },\n { label: 'Team', value: 'TeamEvent' },\n]\n\nexport const SECTION_SCORING_OPTIONS = [\n { label: 'Independent - as separate events', value: 'independent' },\n {\n label: 'Factored - scored individually, but factored to the same average',\n value: 'factored',\n },\n {\n label:\n 'Combined - scores from all sections considered when matchpointing each board',\n value: 'combined',\n },\n]\n\nexport const DEFAULT_REMOVED_STATUS = 'cancelled'\n\nexport const ACBL_RANK_NAMES = {\n '': 'Rookie,',\n A: 'Junior Master',\n B: 'Club Master',\n C: 'Sectional Master',\n D: 'Regional Master',\n E: 'NABC Master',\n F: 'Advanced NABC Master',\n G: 'Life Master',\n H: 'Bronze Life Master',\n I: 'Silver Life Master',\n J: 'Ruby Life Master',\n K: 'Gold Life Master',\n L: 'Sapphire Life Master',\n M: 'Diamond Life Master',\n N: 'Emerald Life Master',\n O: 'Platinum Life Master',\n P: 'Grand Life Master',\n}\n","const defaultDebugOptions = {\n trackPanels: false,\n trackReducer: false,\n trackUserSubscription: false,\n trackEventSubscription: false,\n trackCurrentUserSubscription: false,\n trackPlaySubscription: false,\n}\n\nexport const getDebugOptions = () => {\n let dbo = localStorage.getItem('debugOptions')\n if (dbo) {\n dbo = JSON.parse(dbo)\n } else {\n // Since these values are admin only, we don't store them by default\n // unless they are being toggled from teh Debugging page.\n dbo = defaultDebugOptions\n }\n return dbo\n}\n\nconst setDebugOptions = options => {\n localStorage.setItem('debugOptions', JSON.stringify(options))\n}\n\nexport const toggleDebugOption = option => {\n const currentOptions = getDebugOptions()\n const newValue = {\n ...defaultDebugOptions,\n ...currentOptions,\n [option]: !currentOptions[option],\n }\n setDebugOptions(newValue)\n return newValue\n}\n\nexport const clearDebugOptions = () => {\n localStorage.removeItem('debugOptions')\n return defaultDebugOptions\n}\n","export const ICOMOON_ICONS = {\n 'account-billing': 'icon-currency-dollar',\n 'account-clubs': 'icon-store2',\n 'account-credits': 'icon-cardbuck',\n 'account-dashboard': 'icon-account',\n 'account-metrics': 'icon-stats-bars2',\n 'account-payouts': 'icon-check',\n 'account-plans': 'icon-stats-bars3',\n 'account-requests': 'icon-bell3',\n 'account-requests-approved': 'icon-bell-check',\n 'account-requests-create': 'icon-bell-plus',\n 'account-requests-denied': 'icon-bell-cross',\n 'account-requests-open': 'icon-bell3',\n 'admin-actions': 'icon-magic-wand2',\n 'admin-dashboard': 'icon-meter2',\n 'admin-message': 'icon-envelop3',\n 'admin-more': 'icon-menu',\n 'admin-payouts': 'icon-check',\n 'admin-plans': 'icon-stats-bars3',\n 'angle-arrow': 'icon-enter5',\n boards: 'icon-ticket',\n redis: 'icon-redis',\n 'cancel-circle': 'icon-cancel-circle',\n 'caret-down': 'icon-arrow-up5',\n 'caret-up': 'icon-arrow-down5',\n 'check-in': 'icon-checkmark',\n 'check-in-ns': 'icon-checkmark',\n 'checkbox-checked2': 'icon-checkbox-checked2',\n 'checkbox-unchecked2': 'icon-checkbox-unchecked2',\n 'checkmark-circle': 'icon-checkmark-circle',\n 'circle-empty': 'icon-circle',\n 'circle-filled': 'icon-circle2',\n 'circle-small': 'icon-circle-small',\n 'club-groups': 'icon-group',\n 'club-locations': 'icon-location',\n 'club-members': 'icon-user',\n 'club-member-list': 'icon-user',\n 'club-duplicate-emails': 'icon-at-sign',\n 'club-duplicate-names': 'icon-users2',\n 'club-invalid-acbl-numbers': 'icon-warning2',\n 'club-rank-changes': 'icon-acbl',\n 'club-alert': 'icon-bullhorn',\n 'club-config': 'icon-cog2',\n 'club-list': 'icon-list2',\n 'club-manager': 'icon-store2',\n 'club-more': 'icon-menu',\n 'club-send-email': 'icon-envelop3',\n 'convention-cards': 'icon-map5',\n 'credit-audit': 'icon-balance',\n 'credit-card': 'icon-credit-card',\n 'credit-report': 'icon-cardbuck',\n 'cross:': 'icon-cross-circle',\n 'current-user': 'icon-user1',\n 'd-logs': 'icon-clock',\n 'd-more': 'icon-menu',\n 'd-movement-more': 'icon-strategy',\n 'd-scoring-more': 'icon-file-text',\n 'database-upload': 'icon-database-upload',\n demo: 'icon-presentation',\n 'duplicate-names': 'icon-users2',\n 'duplicate-emails': 'icon-at-sign',\n 'group-demo-setup': 'icon-presentation',\n 'direction-down': 'icon-arrow-down14',\n 'direction-left': 'icon-arrow-left14',\n 'direction-right': 'icon-arrow-right14',\n 'direction-up': 'icon-arrow-up14',\n 'director-scoring': 'icon-file-text',\n down: 'icon-arrow-down6',\n 'duplicate-results-email': 'icon-envelop3',\n 'email-bounces': 'icon-sad',\n 'event-about': 'icon-info',\n 'event-activity-log': 'icon-clock',\n controls: 'icon-edit_attributes',\n 'event-fees-reconciliation': 'icon-documents',\n 'signup-log': 'icon-clipboard3',\n 'event-next': 'icon-arrow-right2',\n 'event-prior': 'icon-arrow-left2',\n 'event-reminder-email': 'icon-envelop3',\n 'event-setup': 'icon-pencil',\n 'external-link': 'icon-new-tab',\n 'failed-login': 'icon-user-block2',\n 'failed-logins': 'icon-user-block2',\n 'find-acbl-number': 'icon-acbl',\n 'find-event': 'icon-find-event',\n 'find-someone': 'icon-find-someone',\n 'flip-vertical': 'icon-flip-vertical3',\n 'fouled-boards': 'icon-ticket',\n 'getting-started': 'icon-map5',\n 'group-approvals': 'icon-thumbs-up2',\n 'group-config': 'icon-cog2',\n 'group-default-event-setup': 'icon-pencil',\n 'group-default-section-controls': 'icon-edit_attributes',\n 'group-events': 'icon-documents',\n 'group-list': 'icon-list2',\n 'group-members': 'icon-user',\n 'group-more': 'icon-menu',\n 'group-printables': 'icon-printer',\n 'group-send-email': 'icon-envelop3',\n 'group-setup': 'icon-cog2',\n 'half-club': 'icon-half-club',\n 'half-diamond': 'icon-half-diamond',\n 'half-heart': 'icon-half-heart',\n 'half-spade': 'icon-half-spade',\n 'hammer-wrench': 'icon-hammer-wrench',\n 'help-admin': 'icon-cabinet',\n 'help-articles': 'icon-book',\n 'help-panes': 'icon-popout',\n 'help-tags': 'icon-price-tags',\n 'help-terms': 'icon-book2',\n 'help-videos': 'icon-play',\n 'how-to': 'icon-question3',\n 'individual-lesson': 'icon-graduation',\n 'invalid-acbl-numbers': 'icon-warning2',\n 'invoice-audit': 'icon-balance',\n 'late-play': 'icon-late-play',\n 'late-plays': 'icon-history',\n 'list-numbered': 'icon-list-numbered',\n 'log-in': 'icon-enter',\n 'log-out': 'icon-exit',\n logins: 'icon-enter',\n 'message-deliverability': 'icon-warning2',\n 'mail-deliverability': 'icon-envelop3',\n 'message-bounces': 'icon-sad',\n 'message-spam-blocks': 'icon-blocked',\n 'member-profile': 'icon-user',\n 'member-profile-ns': 'icon-user',\n 'member-profiles': 'icon-user',\n 'message-history': 'icon-history',\n 'movement-change': 'icon-transmission',\n 'movement-display': 'icon-strategy',\n 'current-player-movement': 'icon-strategy',\n 'movement-edit': 'icon-pencil',\n 'movement-listing': 'icon-strategy',\n 'movement-progress': 'icon-strategy',\n 'my-managers': 'icon-reading',\n 'next-event': 'icon-arrow-right6',\n 'no-trump': 'icon-no-trump',\n notes: 'icon-file-text',\n 'group-notifications': 'icon-paperplane',\n 'open-close': 'icon-arrow-right5',\n 'configure-game': 'icon-cog2',\n 'configure-pairs': 'icon-users',\n 'configure-teams': 'icon-users',\n 'configure-individual': 'icon-cog2',\n 'event-counts': 'icon-stats-bars3',\n 'user-counts': 'icon-stats-bars3',\n 'payment-log': 'icon-cardbuck',\n 'pending-members': 'icon-user',\n 'group-pending-partners': 'icon-users',\n 'phantom-pair': 'icon-users2',\n 'point-down': 'icon-arrow-down2',\n 'point-left': 'icon-arrow-left2',\n 'point-right': 'icon-arrow-right2',\n 'point-up': 'icon-arrow-up2',\n hand: 'icon-hand',\n 'finger-right': 'icon-point-right',\n 'prev-event': 'icon-arrow-left6',\n 'recent-login': 'icon-user-check2',\n 'recent-logins': 'icon-user-check2',\n 'icon-reference': 'icon-books',\n 'hybrid-tables': 'icon-hybrid-game',\n 'provisional-results': 'icon-podium',\n 'regular-partner': 'icon-users',\n 'request-add': 'icon-bell-plus',\n 'request-approved': 'icon-bell-check',\n 'request-denied': 'icon-bell-cross',\n 'request-open': 'icon-bell3',\n 'results-boards': 'icon-ticket',\n 'results-matrix': 'icon-grid5',\n 'results-pairs': 'icon-podium',\n 'acbl-stratified-pairs-results': 'icon-list-numbered',\n 'rsvp-charity-results': 'icon-list-numbered',\n 'rounded-square': 'icon-rounded-square',\n 'rounded-square-circle': 'icon-rounded-square-circle',\n 'score-management': 'icon-magic-wand2',\n 'scorekeeper-names': 'icon-pencil6',\n 'scoring-log': 'icon-file-text',\n 'set-directors': 'icon-reading',\n 'signup-activity': 'icon-clock',\n screens: 'icon-display',\n 'pair-seating': 'icon-chair',\n 'pair-seating-ns': 'icon-chair',\n 'team-seating': 'icon-chair',\n 'team-seating-ns': 'icon-chair',\n 'shared-boards': 'icon-transmission',\n 'spam-blocks': 'icon-blocked',\n star: 'icon-star-full2',\n 'stationary-preference': 'icon-chair',\n 'swiss-seating': 'icon-team1',\n teach: 'icon-graduation',\n 'team-standings': 'icon-podium',\n 'team-standings-entry': 'icon-podium',\n 'team-standings-complete': 'icon-podium',\n 'update-masterpoints': 'icon-database-upload',\n 'user-credits': 'icon-cardbuck',\n 'user-email-preferences': 'icon-envelop3',\n 'user-listing': 'icon-users',\n 'user-log': 'icon-clock',\n 'user-management': 'icon-group',\n 'user-privacy': 'icon-eye-blocked',\n 'user-profile': 'icon-profile',\n 'user-results': 'icon-podium',\n 'user-reservations': 'icon-calendar',\n autopay: 'icon-autopay',\n about: 'icon-info',\n acbl: 'icon-acbl',\n account: 'icon-account',\n add: 'icon-plus2',\n admin: 'icon-shield',\n articles: 'icon-book',\n auction: 'icon-table1',\n back: 'icon-arrow-left6',\n bars: 'icon-menu7',\n become: 'icon-mask',\n billing: 'icon-cash3',\n blocked: 'icon-blocked',\n board: 'icon-ticket',\n bubble: 'icon-bubble',\n calendar: 'icon-calendar',\n camera: 'icon-camera2',\n cardbuck: 'icon-cardbuck',\n cash: 'icon-cash1',\n check: 'icon-check',\n checkmark: 'icon-checkmark',\n cleaning: 'icon-broom',\n clone: 'icon-copy3',\n club: 'icon-store2',\n clubs: 'icon-clubs',\n 'club-listing': 'icon-store2',\n compass: 'icon-compass4',\n configure: 'icon-cog2',\n course: 'icon-graduation',\n contacts: 'icon-phone2',\n dashboard: 'icon-meter2',\n debugging: 'icon-bug',\n diamonds: 'icon-diamonds',\n director: 'icon-reading',\n discord: 'icon-discord',\n display: 'icon-display',\n download: 'icon-download4',\n edit: 'icon-pencil',\n email: 'icon-envelop3',\n enter: 'icon-enter',\n erase: 'icon-eraser',\n event: 'icon-documents',\n exit: 'icon-exit',\n facebook: 'icon-facebook2',\n faq: 'icon-bubbles5',\n filter: 'icon-filter4',\n finder: 'icon-search',\n flag: 'icon-flag3',\n flagged: 'icon-flag3',\n forward: 'icon-arrow-right6',\n free: 'icon-free',\n full: 'icon-spam',\n glossary: 'icon-book2',\n go: 'icon-go',\n groups: 'icon-group',\n heart: 'icon-heart5',\n help: 'icon-question3',\n hidden: 'icon-eye-blocked',\n history: 'icon-history',\n home: 'icon-home',\n IndividualEvent: 'icon-user',\n invites: 'icon-email',\n invoices: 'icon-cash3',\n 'open-invoices': 'icon-cash3',\n list: 'icon-list2',\n livestream: 'icon-tv',\n locked: 'icon-lock4',\n log: 'icon-clock',\n map: 'icon-map5',\n matrix: 'icon-grid5',\n member: 'icon-user',\n members: 'icon-users4',\n 'menu-selector': 'icon-menu7',\n 'user-messages': 'icon-envelop3',\n metric: 'icon-stats-bars2',\n mobile: 'icon-mobile',\n monitor: 'icon-clock',\n more: 'icon-menu',\n 'more-not-started': 'icon-menu',\n 'more-entry': 'icon-menu',\n 'more-complete': 'icon-menu',\n movement: 'icon-strategy',\n movements: 'icon-strategy',\n news: 'icon-bullhorn',\n notification: 'icon-notification',\n override: 'icon-eraser',\n overview: 'icon-compass4',\n PairEvent: 'icon-users',\n pairs: 'icon-users',\n panes: 'icon-popout',\n payment: 'icon-currency-dollar',\n permanentize: 'icon-mask',\n phantom: 'icon-users2',\n plan: 'icon-stats-bars3',\n print: 'icon-printer',\n profile: 'icon-user1',\n profiles: 'icon-profile',\n progress: 'icon-menu',\n question: 'icon-help',\n question_answer: 'icon-bubbles5',\n rank_2: 'icon-rank_2',\n rank_3: 'icon-rank_3',\n rank_4: 'icon-rank_4',\n rank_5: 'icon-rank_5',\n rank_6: 'icon-rank_6',\n rank_7: 'icon-rank_7',\n rank_8: 'icon-rank_8',\n rank_9: 'icon-rank_9',\n rank_a: 'icon-rank_a',\n rank_j: 'icon-rank_j',\n rank_k: 'icon-rank_k',\n rank_q: 'icon-rank_q',\n rank_t: 'icon-rank_t',\n redo: 'icon-redo',\n relinquish: 'icon-mask',\n refresh: 'icon-loop3',\n reload: 'icon-loop3',\n remove: 'icon-cross',\n results: 'icon-podium',\n reward: 'icon-starburst',\n scorekeeper: 'icon-pencil6',\n scoresheet: 'icon-file-text',\n search: 'icon-search',\n seat: 'icon-chair',\n settings: 'icon-cog2',\n signup: 'icon-clipboard3',\n signups: 'icon-clipboard3',\n 'signups-ns': 'icon-clipboard3',\n spades: 'icon-spades',\n spinner: 'icon-spinner',\n spotlight2: 'icon-spotlight2',\n square: 'icon-square',\n 'rsvp-charity-standings': 'icon-podium',\n subtract: 'icon-minus2',\n support: 'icon-lifebuoy',\n swap: 'icon-transmission',\n table: 'icon-table',\n tablet: 'icon-mobile2',\n 'table-login-config': 'icon-mobile2',\n 'table-scoring': 'icon-table',\n 'table-waiting': 'icon-table',\n tags: 'icon-price-tags',\n team: 'icon-team1',\n TeamEvent: 'icon-team1',\n teams: 'icon-team1',\n timer: 'icon-time',\n tv: 'icon-tv',\n undo: 'icon-undo',\n unlocked: 'icon-unlocked',\n up: 'icon-arrow-up6',\n user: 'icon-user1',\n users: 'icon-group',\n 'user-clubs': 'icon-store2',\n 'user-courses': 'icon-graduation',\n 'user-invites': 'icon-email',\n vaccination: 'icon-syringe',\n video: 'icon-play',\n videos: 'icon-play',\n visible: 'icon-eye',\n wand: 'icon-magic-wand2',\n warning: 'icon-warning2',\n web: 'icon-sphere',\n youtube2: 'icon-youtube2',\n diamondHollow: 'icon-diamond3',\n heartHollow: 'icon-heart6',\n}\n\nexport const getIconClassname = icon => {\n return ICOMOON_ICONS[icon] || 'icon-TBD'\n}\n","export const emailBlock = (user, type, id) => {\n if (user.spam_block) {\n return 'spam-block'\n }\n if (user.email_bounce) {\n return 'email-bounce'\n }\n if (user.email_blocks[type] != null && user.email_blocks[type].includes(id)) {\n return 'preference'\n }\n if (user.email == '') {\n return 'no-email'\n }\n return false\n}\n\nexport const recipientOptionsSort = (a, b) => {\n let A = a.grouping\n let B = b.grouping\n let AA = a.label\n let BB = b.label\n return A < B ? -1 : A > B ? 1 : AA < BB ? -1 : AA > BB ? 1 : 0\n}\n","import { SEAT_NAMES } from 'helpers/constants'\n\nexport const DIRECTION_FROM_SEAT_OR_DIRECTION = {\n N: 'NS',\n S: 'NS',\n E: 'EW',\n W: 'EW',\n NS: 'NS',\n EW: 'EW',\n}\n\nexport const SEAT_ORDER = {\n N: 1,\n S: 2,\n E: 3,\n W: 4,\n X: 5,\n Y: 6,\n}\n\nexport const displayOriginalSeat = signup =>\n signup.table0 && signup.seat0\n ? `${signup.table0}-${DIRECTION_FROM_SEAT_OR_DIRECTION[signup.seat0]}`\n : null\n\nexport const currentSeatFromOriginalSeat = (pairDirection, seat0) => {\n if (seat0 == 'N' || seat0 == 'S') {\n return SEAT_NAMES[pairDirection[0].toUpperCase()]\n } else {\n return SEAT_NAMES[pairDirection[1].toUpperCase()]\n }\n}\n\nexport const sortByOriginalSeat = (a, b) => {\n let sectionA = a.section_label || '~'\n let sectionB = b.section_label || '~'\n return sectionA < sectionB\n ? -1\n : sectionA > sectionB\n ? 1\n : a.table0 < b.table0\n ? -1\n : a.table0 > b.table0\n ? 1\n : SEAT_ORDER[a.seat0] < SEAT_ORDER[b.seat0]\n ? -1\n : SEAT_ORDER[a.seat0] > SEAT_ORDER[b.seat0]\n ? 1\n : 0\n}\n\n// For teams:\n\nexport const signupIsCaptain = s => (s && s.captain_id == s.id ? s.id : null)\nexport const signupIsPair = s =>\n s && !s.captain_id && s.partner_id ? s.id : null\nexport const signupIsIndividual = s =>\n s && !s.captain_id && !s.partner_id ? s.id : null\nexport const isUnseatedTeam = s => s && s.captain_id && !!s.table0\n","import React from 'react'\nimport { toast } from 'react-toastify'\nimport { MemberGroupLabel } from 'pages/Event/styles'\nimport {\n AUDIENCE_OPTIONS,\n NESW,\n RANKS,\n SUIT_OFFSET,\n RANK_OFFSET,\n NSEWXY,\n SECTION_SCORING_OPTIONS,\n} from 'helpers/constants.js'\n\nimport { Suit, Fee } from 'components/elements/Misc'\nconst PARSE_SUIT_REGEX = /(![CcDdHhSsNnMm]+)/g\n\nexport const noop = () => {}\n\nexport const indexBy = (array, attr) => {\n return array\n .filter(value => value[attr] !== null)\n .reduce((index, value) => {\n index[value[attr]] = value\n return index\n }, {})\n}\n\nexport const countIndexedObjectBy = (indexedObject, attr) => {\n let counts = {}\n\n for (let obj of Object.values(indexedObject)) {\n if (!(obj[attr] in counts)) {\n counts[obj[attr]] = 0\n }\n counts[obj[attr]] += 1\n }\n return counts\n}\n\nexport const sortObjectValuesBy = (obj, attr) => {\n return Object.values(obj).sort((a, b) => {\n let A = a[attr]\n let B = b[attr]\n return A < B ? -1 : A > B ? 1 : 0\n })\n}\n\nexport const sortArrayByAttr = (arr, attr) => {\n return arr.sort((a, b) =>\n a[attr] < b[attr] ? -1 : a[attr] > b[attr] ? 1 : 0,\n )\n}\n\nexport const selectFilterCharsInOrder = (candidate, input) => {\n let label = candidate.toLowerCase()\n let inputLower = input.toLowerCase()\n let indexA = 0\n for (const char of inputLower) {\n const charIndex = label.indexOf(char, indexA)\n if (charIndex === -1) {\n return false\n }\n indexA = charIndex + 1\n }\n return true\n}\n\nexport const sectionSorter = (a, b) => {\n const sA = a.sort_order\n const sB = b.sort_order\n const lA = a.label\n const lB = b.label\n return sA < sB ? -1 : sA > sB ? 1 : lA < lB ? -1 : lA > lB ? 1 : 0\n}\n\nexport const nameMatchesParts = (name, parts) => {\n let matches = true\n const lcName = name.toLowerCase()\n for (const part of parts) {\n if (!lcName.includes(part)) {\n matches = false\n break\n }\n }\n return matches\n}\n\nexport const hexToRGB = (hex, alpha) => {\n var r = parseInt(hex.slice(1, 3), 16),\n g = parseInt(hex.slice(3, 5), 16),\n b = parseInt(hex.slice(5, 7), 16)\n\n if (alpha) {\n return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'\n } else {\n return 'rgb(' + r + ', ' + g + ', ' + b + ')'\n }\n}\n\n// For relative sizing in Play Table\nexport const rpx = v => `calc( var(--table-ratio) * ${v}px)`\n\nexport const fullPairNumber = (pairNumber, ns) => {\n if (pairNumber) {\n if (ns) {\n return `${Math.abs(pairNumber)} ${pairNumber > 0 ? 'N/S' : 'E/W'}`\n } else {\n return `${pairNumber}`\n }\n } else {\n return ''\n }\n}\n\nexport const suitCards = (deal, suit, pos) => {\n let values = []\n for (let rank of RANKS) {\n let index = SUIT_OFFSET[suit] + RANK_OFFSET[rank]\n if (deal.substr(index, 1) == pos) {\n values.push(rank)\n }\n }\n return values\n}\n\nexport const fullNameSort = (a, b) =>\n a.full_name.toLowerCase() < b.full_name.toLowerCase()\n ? -1\n : a.full_name.toLowerCase() > b.full_name.toLowerCase()\n ? 1\n : 0\n\nexport const teamSeatSort = (s1, s2) => {\n let a = NSEWXY.indexOf(s1.seat0)\n let b = NSEWXY.indexOf(s2.seat0)\n return a - b\n}\n\nexport const labelSort = (a, b) =>\n a.label.toLowerCase() < b.label.toLowerCase()\n ? -1\n : a.label.toLowerCase() > b.label.toLowerCase()\n ? 1\n : 0\n\nexport const boardNumberSet = board => {\n if (board < 100) {\n return board % 100\n } else {\n return `${board % 100} in Set ${parseInt(board / 100)}`\n }\n}\n\nexport const fullyDealt = boardSet => {\n for (let i = 1; i <= boardSet.range; i++) {\n if (!boardSet.boards[i]) {\n return false\n }\n if (boardSet.boards[i].length != 52) {\n return false\n }\n if (boardSet.boards[i].includes('x')) {\n return false\n }\n }\n return true\n}\n\n// Return object with only specified keys\nexport const pick = (obj, keys) =>\n Object.fromEntries(keys.filter(key => key in obj).map(key => [key, obj[key]]))\n\nexport const playingOnline = event => {\n return event.pricing_tier == 'play' || event.pricing_tier == 'teach'\n}\n\nexport const usesDiscord = (event, section) => {\n return playingOnline(event) && (section ? !section.opts.skip_discord : true)\n}\n\nexport const pricingTierText = tier => {\n switch (tier) {\n case 'teach':\n return 'Teaching Game'\n case 'play':\n return 'Online Game'\n case 'score':\n return 'In Person Game'\n default:\n return 'Reservations Only'\n }\n}\n\nexport const sectionScoringText = value => {\n return getLabelFromValue(value, SECTION_SCORING_OPTIONS)\n}\n\nexport const parseSuits = text => {\n if (typeof text != 'string') {\n return ''\n }\n const matches = text.match(PARSE_SUIT_REGEX)\n const parts = text.split(PARSE_SUIT_REGEX)\n if (!matches) {\n return text\n }\n return parts.map((part, index) => (\n \n {matches.includes(part) ? : part}\n \n ))\n}\n\nexport const feeNotation = fee => {\n return `${fee} rbucks`\n}\n\n// THIS_MONTH = YYYYMM\nexport const THIS_MONTH =\n new Date().getFullYear() +\n ['0', (new Date().getMonth() + 1).toString()].join('').slice(-2)\n\nexport const getMeta = metaName => {\n let metas = document.getElementsByTagName('meta')\n for (let i = 0; i < metas.length; i++) {\n if (metas[i].getAttribute('name') == metaName) {\n return metas[i].getAttribute('content')\n }\n }\n return ''\n}\n\nexport const safelyGet = (o, p) =>\n p.reduce((xs, x) => (xs && xs[x] ? xs[x] : null), o)\n\nexport const range1to = n => {\n let a = []\n for (let i = 1; i <= n; i++) {\n a.push(i)\n }\n return a\n}\n\nexport const rangeMtoN = (m, n) => {\n let a = []\n for (let i = m; i <= n; i++) {\n a.push(i)\n }\n return a\n}\n\nexport const arrayUnique = a => {\n return a.filter(function (value, index, self) {\n return self.indexOf(value) === index\n })\n}\n\nexport const duplicateValuesInArray = array => {\n const dups = []\n array.forEach((item, index) => {\n if (!dups.includes(item) && array.indexOf(item) !== index) {\n dups.push(item)\n }\n })\n return dups\n}\n\nexport const arrayChunk = (arr, size) => {\n // [1,2,3,4,5] => [ [1,2], [3,4], [5] ]\n return arr.reduce(\n (chunks, el, i) =>\n (i % size ? chunks[chunks.length - 1].push(el) : chunks.push([el])) &&\n chunks,\n [],\n )\n}\n\nexport const seatIndex = seatChar => NESW.indexOf(seatChar)\nexport const seatDirection = seatIndex => NESW[seatIndex]\n\nexport const relativeSeat = (seat, playerSeat) => {\n if (seat == playerSeat) {\n return 'player'\n }\n if ((seatIndex(playerSeat) + 1) % 4 == seatIndex(seat)) {\n return 'lho'\n }\n if ((seatIndex(playerSeat) + 2) % 4 == seatIndex(seat)) {\n return 'pard'\n }\n if ((seatIndex(playerSeat) + 3) % 4 == seatIndex(seat)) {\n return 'rho'\n }\n return ''\n}\n\nexport const turnToPlay = flatTricks => {\n let tricks = arrayChunk(flatTricks, 5)\n let displayTrick = tricks.pop()\n let leader = seatIndex(displayTrick.shift())\n let nextPlayer\n if (displayTrick.length == 0) {\n // Show prior trick until next card is led\n if (tricks.length > 0) {\n displayTrick = tricks.pop()\n nextPlayer = leader // from the next trick, who won this trick\n leader = seatIndex(displayTrick.shift())\n } else {\n displayTrick = [null, null, null, null]\n nextPlayer = leader\n }\n } else {\n nextPlayer = (leader + displayTrick.length) % 4\n }\n let cardsLeft = 4 - displayTrick.length\n while (cardsLeft > 0) {\n displayTrick.push(null)\n cardsLeft -= 1\n }\n return { displayTrick, leader, nextPlayer }\n}\n\nexport const pluralize = (count, singular, plural = false) => {\n if (!plural) {\n plural = singular + 's'\n }\n let word = count == 1 ? singular : plural\n return `${count} ${word}`\n}\n\nexport const ordinalize = n => {\n let s = ['th', 'st', 'nd', 'rd']\n let v = n % 100\n return n + (s[(v - 20) % 10] || s[v] || s[0])\n}\n\nexport const dashOrInt = i => (parseInt(i) == 0 ? '--' : i)\n\nexport const dashOrValue = mp => {\n return mp == null ? '--' : parseFloat(mp).toFixed(2)\n}\n\nexport const dashOr = (value, prepend = null, precision = 0) =>\n value === 0 ? (\n '---'\n ) : prepend == 'credits' ? (\n \n ) : prepend == 'dollars' ? (\n `$${commaize(value, precision)}`\n ) : (\n commaize(value, precision)\n )\n\nexport const commaize = (value, precision = 0) => {\n return (typeof value == 'string' ? parseFloat(value) : value).toLocaleString(\n 'en',\n {\n minimumFractionDigits: precision,\n maximumFractionDigits: precision,\n },\n )\n}\n\nexport const dealer = boardNumber => {\n switch (absBoardNumber(boardNumber) % 4) {\n case 1:\n return 'North'\n case 2:\n return 'East'\n case 3:\n return 'South'\n case 0:\n return 'West'\n default:\n return 'Unknown'\n }\n}\n\nexport const absBoardNumber = boardNumber => {\n return (((boardNumber % 100) - 1) % 36) + 1\n}\n\nexport const vulnerability = boardNumber => {\n const absNumber = absBoardNumber(boardNumber)\n if ([1, 8, 11, 14, 17, 24, 27, 30, 33].includes(absNumber)) {\n return 'None'\n }\n if ([2, 5, 12, 15, 18, 21, 28, 31, 34].includes(absNumber)) {\n return 'N/S'\n }\n if ([3, 6, 9, 16, 19, 22, 25, 32, 35].includes(absNumber)) {\n return 'E/W'\n }\n return 'Both'\n}\n\nexport const isVulnerable = (seat, boardNumber) => {\n const vul = vulnerability(absBoardNumber(boardNumber))\n switch (seat.toUpperCase()) {\n case 'N':\n return vul == 'N/S' || vul == 'Both'\n case 'S':\n return vul == 'N/S' || vul == 'Both'\n case 'E':\n return vul == 'E/W' || vul == 'Both'\n case 'W':\n return vul == 'E/W' || vul == 'Both'\n default:\n return false\n }\n}\n\nexport const directionalVulnerability = (boardNumber, seat) => {\n const vul = vulnerability(absBoardNumber(boardNumber))\n switch (vul) {\n case 'N/S':\n return seat == 'N' || seat == 'S' ? 'We' : 'They'\n case 'E/W':\n return seat == 'E' || seat == 'W' ? 'We' : 'They'\n default:\n return vul\n }\n}\n\nexport const fillTemplate = (template, args) => {\n let result = template\n for (let placeholder in args) {\n result = result.replace('[' + placeholder + ']', args[placeholder])\n }\n return result\n}\n\nexport const toTitleCase = str => {\n return str\n ? str\n .replace(/\\w\\S*/g, function (txt) {\n return txt.charAt(0).toUpperCase() + txt.substr(1)\n })\n .replace(/[_-]/g, ' ')\n : ''\n}\n\nexport const toSnakeCase = str => {\n let array = str.split('')\n let converted = array.map((a, i) => {\n if (i == 0) {\n return a.toLowerCase()\n } else {\n if (a == a.toUpperCase()) {\n return '_' + a.toLowerCase()\n } else {\n return a\n }\n }\n })\n return converted.join('')\n}\n\nexport const signedValue = value => {\n return value <= 0 ? value : `+${value}`\n}\n\nexport const convertPennies = pennies => {\n return (pennies / 100.0).toFixed(2)\n}\n\nexport const asRoundableCredits = value => {\n const precision = value == Math.trunc(value) ? 0 : 2\n return commaize(value, precision)\n}\n\nexport const asCredits = value => {\n return commaize(value, 2)\n}\n\nexport const handleFetchResponseErrors = response => {\n if (response.status == 401) {\n window.location.href = '/'\n }\n if (!response.ok) {\n throw Error(response.statusText)\n }\n return response\n}\n\nexport const catchFetchErrors = (ex, msg) => {\n if (ex.message.includes('fetch') || ex.message.includes('unavailable')) {\n toast.error('Could not process request. Check internet connection.', {\n autoClose: false,\n })\n } else {\n toast.error(`${msg}: ${ex.message}`, { autoClose: false })\n }\n}\n\nexport const todayString = () => {\n let t = new Date()\n return t.toISOString().substring(0, 10)\n}\n\nexport const getLocationOptions = (locations, club_id, includeValue = null) => {\n const locationOptions = []\n for (const location_id in locations) {\n const location = locations[location_id]\n if (\n location.club_id == club_id &&\n (!location.archived || location.id == includeValue)\n ) {\n const title = location.archived\n ? location.title + ' - archived'\n : location.title\n locationOptions.push({\n value: location_id,\n label: title,\n archived: location.archived,\n })\n }\n }\n locationOptions.sort((a, b) => {\n const A = a.archived ? 1 : 0\n const B = b.archived ? 1 : 0\n const AA = a.label\n const BB = b.label\n return A < B ? -1 : A > B ? 1 : AA < BB ? -1 : AA > BB ? 1 : 0\n })\n return locationOptions\n}\n\nexport const findInMap = (map, key, value) => {\n // returns first found object were obj[key] = value\n for (let object_id in map) {\n let object = map[object_id]\n if (object[key] == value) {\n return object\n }\n }\n return null\n}\n\nexport const groupAndSortObjectBy = (obj, grouper, sorter) => {\n let grouped = Object.keys(obj).reduce(function (rv, id) {\n let el = obj[id]\n let key = typeof grouper == 'function' ? grouper(el) : el[grouper]\n rv[key] = rv[key] || []\n rv[key].push(el)\n return rv\n }, {})\n for (let key in grouped) {\n grouped[key].sort((a, b) =>\n typeof sorter == 'function'\n ? sorter(a) < sorter(b)\n ? -1\n : sorter(a) > sorter(b)\n ? 1\n : 0\n : a[sorter] < b[sorter]\n ? -1\n : a[sorter] > b[sorter]\n ? 1\n : 0,\n )\n }\n return grouped\n}\n\nexport const groupSorter = (a, b) =>\n !a.inactive && b.inactive\n ? -1\n : a.inactive && !b.inactive\n ? 1\n : a.sort_order < b.sort_order\n ? -1\n : a.sort_order > b.sort_order\n ? 1\n : a.title < b.title\n ? -1\n : a.title > b.title\n ? 1\n : 0\n\nexport const validEmail = (email, allowBlank = false) => {\n const tester =\n /^[-!#$%&'*+/0-9=?A-Z^_a-z{|}~](\\.?[-!#$%&'*+/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\\.?[a-zA-Z0-9])*\\.[a-zA-Z](-?[a-zA-Z0-9])+$/\n // adapted from https://github.com/manishsaraan/email-validator/blob/master/index.js\n if (!email || email.length == 0) {\n return allowBlank\n }\n\n if (email.length > 254) return false\n\n let valid = tester.test(email)\n if (!valid) return false\n\n // Further checking of some things regex can't handle\n let parts = email.split('@')\n if (parts[0].length > 64) return false\n\n let domainParts = parts[1].split('.')\n if (\n domainParts.some(function (part) {\n return part.length > 63\n })\n )\n return false\n\n return true\n}\n\nexport const validAlphanumericName = (name, allowBlank = false) => {\n const tester = /^[A-Za-z0-9][A-Za-z0-9. -]*$/\n if (!name || name.length == 0) {\n return allowBlank\n }\n return tester.test(name)\n}\n\nexport const parseAcblNumberEntry = value => {\n const ACBL_LETTERS = 'JKLMNOPQR'\n let newValue = value\n if (newValue.length > 0) {\n let first = newValue[0]\n if (ACBL_LETTERS.includes(first.toUpperCase())) {\n newValue = newValue.replace(\n first,\n ACBL_LETTERS.indexOf(first.toUpperCase()) + 1,\n )\n }\n }\n newValue = newValue.replace(/[^0-9]+/g, '')\n return newValue.substr(0, 7)\n}\n\nexport const validAcblNumber = (n, allowBlank = false) => {\n const number = n ? `${n}` : ''\n if (!number || number.length == 0) {\n return allowBlank\n }\n return number.length == 7 && acblNumberMatchesChecksum(number, allowBlank)\n}\n\nexport const acblNumberMatchesChecksum = (number, allowBlank = false) => {\n if (!number || number.length == 0) {\n return allowBlank\n }\n if (number.length != 7) {\n return false\n }\n if (number[0] == '0') {\n return false\n }\n const digits = `${number}`.split('').map(s => parseInt(s))\n const checksum = digits.reduce((sum, digit, index) => {\n return sum + digit * (7 - index)\n }, 0)\n return checksum % 11 == 0\n}\n\nexport const validPendingPartner = pendingPartner => {\n return (\n validAlphanumericName(pendingPartner.first_name) &&\n validAlphanumericName(pendingPartner.last_name) &&\n validEmail(pendingPartner.email, true) &&\n validAcblNumber(pendingPartner.acbl_number, true)\n )\n}\n\nexport const getLabelFromValue = (value, options) => {\n for (let option of options) {\n if (option.value == value) {\n return option.label\n }\n }\n return 'Unspecified'\n}\n\nexport const validPairEntry = (pairs, tables) => {\n let pair_count = Object.keys(pairs).length\n let pairs_needed = tables * 2\n\n // Players defined for all pairs\n for (let pair_number in pairs) {\n let pair = pairs[pair_number]\n if (!pair.member1_id || !pair.member2_id) {\n return false\n }\n }\n return pair_count == pairs_needed || pair_count + 1 == pairs_needed\n}\n\nexport const validTeamEntry = (teams, tables) => {\n // Teams are teamNumber: {N: signup, S: signup...}\n for (let teamNumber of Object.keys(teams)) {\n if (teamNumber > tables) {\n return false\n }\n let team = teams[teamNumber]\n if (!team.N || !team.S || !team.E || !team.W) {\n return false\n }\n }\n return Object.keys(teams).length == tables\n}\n\nexport const audienceOptionLabel = value => {\n for (let option of AUDIENCE_OPTIONS) {\n if (option.value == value) {\n return option.label\n }\n }\n return 'Unknown'\n}\n\nexport const formatGroupLabel = data => {\n return {data.label}\n}\n\nexport const tableCountText = event => {\n let pcount = event.playing_count\n if (pcount == 0) {\n return '0 tables'\n }\n let track_wait_list = event.track_wait_list\n let paired_signup = event.event_type == 'PairEvent'\n let team_signup = event.event_type == 'TeamEvent'\n let text = ''\n let tables = Math.floor(pcount / 4)\n let remainder = pcount % 4\n if (track_wait_list) {\n let blind_text = ''\n if (remainder > 0) {\n blind_text = ' (with blind)'\n tables += 1\n }\n if (tables == 1) {\n text = `1 table${blind_text}`\n } else {\n text = `${tables} tables${blind_text}`\n }\n } else if (paired_signup) {\n if (pcount == 2) {\n text = '½ table'\n } else if (pcount == 4) {\n text = '1 table'\n } else {\n text = `${tables}${remainder == 2 ? '½' : ''} tables`\n }\n } else if (team_signup) {\n return pluralize(event.team_count, 'table')\n } else {\n if (pcount < 4) {\n text = '1 partial table'\n } else if (pcount == 4) {\n text = '1 table'\n } else if (remainder == 0) {\n text = `${tables} tables`\n } else if (remainder == 1) {\n text = `${tables}¼ tables`\n } else if (remainder == 2) {\n text = `${tables}½ tables`\n } else if (remainder == 3) {\n text = `${tables}¾ tables`\n } else {\n text = `${tables}+} tables`\n }\n }\n return text\n}\n\nexport const signupGroupingFormatter = status => {\n // For those not signed up, status is their MEMBER status, not\n // their SIGNUP status\n if (status == 'active' || status == 'guest') {\n return (\n \n Not Signed Up ({toTitleCase(status)})\n \n )\n } else if (status == 'allowed') {\n return (\n \n Invited to Private Event\n \n )\n } else {\n return (\n \n {toTitleCase(status)}\n \n )\n }\n}\n\nexport const sortedIntegers = a => {\n return a.map(r => parseInt(r)).sort((a, b) => a - b)\n}\n\nexport const copyStructure = s => {\n return JSON.parse(JSON.stringify(s))\n}\n\nexport const memberLookupFromOpts = (opts, member_id) => {\n for (let p of opts) {\n for (let option of p.options) {\n if (option.member_id == member_id) {\n return {\n member_id: member_id,\n full_name: option.full_name,\n mp_holding: option.mp_holding,\n partner_member_id: option.partner_member_id,\n }\n }\n }\n }\n return null\n}\n\nexport const computeStrat = (mpLevel, strats) => {\n if (mpLevel == null) {\n return null\n }\n let computedStrat = 'invalid'\n for (let strat of strats) {\n if (strat.upper && mpLevel >= strat.upper) {\n continue\n } else {\n computedStrat = strat.label\n break\n }\n }\n return computedStrat\n}\n\nexport const yyyymmdd = d => {\n return d.toISOString().substring(0, 10)\n}\n\nexport const fullDateInZone = (d, tz) => {\n const jsDate = new Date(d)\n return jsDate.toLocaleString([], {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n timeZone: tz,\n })\n}\n\nexport const hasChangedValues = (a, b) => {\n for (const field in a) {\n if (typeof a[field] == 'object') {\n if (typeof b[field] != 'object') {\n return true\n }\n if (JSON.stringify(a[field]) != JSON.stringify(b[field])) {\n return true\n }\n } else if (a[field] != b[field]) {\n return true\n }\n }\n return false\n}\n\nexport const firstSeat = (sitting, seat) => {\n if (sitting == 'out') {\n return 'out'\n } else {\n switch (sitting.split('/')[seat - 1]) {\n case 'N':\n return 'North'\n case 'E':\n return 'East'\n case 'W':\n return 'West'\n case 'S':\n return 'South'\n default:\n return '---'\n }\n }\n}\n\nexport const sortNotes = (a, b) => {\n return a.active && !b.active\n ? -1\n : !a.active && b.active\n ? 1\n : a.priority > b.priority\n ? 1\n : a.priority < b.priority\n ? -1\n : a.level == 'default' && b.level == 'urgent'\n ? 1\n : a.level == 'urgent' && b.level == 'default'\n ? -1\n : a.created_at > b.created_at\n ? 1\n : a.created_at < b.created_at\n ? -1\n : 0\n}\n\nexport const moveContactToNestedAttributes = obj => {\n const moved = {\n ...obj,\n contact_attributes: {\n contact_name: obj.contact_name,\n contact_email: obj.contact_email,\n },\n }\n delete moved.contact_name\n delete moved.contact_email\n return moved\n}\nexport const parseContactFromNestedErrors = errors => {\n if (errors['contact.contact_email']) {\n errors['contact_email'] = errors['contact.contact_email']\n delete errors['contact.contact_email']\n }\n if (errors['contact.contact_name']) {\n errors['contact_name'] = errors['contact.contact_name']\n delete errors['contact.contact_name']\n }\n return errors\n}\n","import React from 'react'\n// See https://usehooks.com/useToggle/\n\nexport const useToggle = (initialState = false) => {\n const [t, setT] = React.useState(!!initialState)\n const toggle = React.useCallback(() => setT(t => !t), [])\n return [t, toggle]\n}\n","import styled from 'styled-components'\n\nimport { signupColor, stratColor, ColorConstants } from 'helpers/colors.js'\n\nconst NEGATIVE_BORDER = `1px solid ${ColorConstants.negative}`\n\nexport const UnitBox = styled.div`\n margin-bottom: 5px;\n max-width: 400px;\n // min-height: 50px;\n border-radius: 5px;\n box-shadow: ${p => (p.$empty ? 'none' : '2px 2px 4px rgba(0, 0, 0, 0.3)')};\n\n @media (max-width: 359px) {\n min-height: 40px;\n }\n border: ${p =>\n p.$outsideRange\n ? NEGATIVE_BORDER\n : p.$empty\n ? '1px dashed #aaaaaa'\n : 'none'};\n background-color: ${p =>\n p.$stratified\n ? stratColor(p.$strat, 'bg')\n : p.$empty\n ? 'transparent'\n : p.$seated\n ? '#e5e9d8'\n : '#f2eccf'}!important;\n background-image: ${p =>\n p.$locked ? ColorConstants.bgImages.locked : 'none'};\n\n .strat {\n font-weight: 900;\n color: ${p => stratColor(p.$strat, 'text')} !important;\n }\n > .unit-content {\n display: flex;\n justify-content: space-between;\n }\n .mp {\n font-size: 70%;\n }\n .unit-stratification {\n flex: 0 0 75px;\n &.tight {\n flex: 0 0 25px;\n }\n padding-right: 5px;\n text-align: right;\n }\n\n .flipper {\n flex: 0 0 auto;\n align-self: center;\n margin: 0 5px;\n }\n`\n\nexport const UnitNumberBox = styled.div`\n cursor: ${p =>\n p.$canSelect ? (p.$disabled ? 'not-allowed' : 'pointer') : 'default'};\n white-space: nowrap;\n vertical-align: middle;\n border: 1px solid #ccc;\n border-radius: 4px;\n padding: 5px;\n margin: 3px;\n text-align: right;\n flex: 0 0 45px;\n line-height: 1;\n font-size: 18px;\n font-weight: 900;\n color: ${p => (p.$isSelected && !p.$highlight ? '#ffffff' : '#aaaaaa')};\n background-color: ${p =>\n p.$highlight\n ? ColorConstants.bg.highlight\n : p.$isSelected\n ? '#348435'\n : p.$disabled\n ? '#dddddd'\n : '#ffffff'}!important;\n .direction {\n font-size: 14px;\n }\n .detail {\n font-size: 13px;\n line-height: 14px;\n font-weight: normal;\n }\n`\n\nexport const UnitMembers = styled.div`\n min-height: 50px;\n padding: 3px;\n flex: 1 1 auto;\n`\n\nexport const UnitMember = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n .unit-member-seat {\n width: 1em;\n text-align: center;\n font-size: 70%;\n }\n .unit-member-name {\n flex: 1 1 auto;\n line-height: 1;\n padding: 3px 5px 3px 3px;\n font-size: ${p => (p.$teamMember ? '70%' : '85%')};\n font-weight: ${p => (p.$captain ? '900' : 'normal')};\n }\n .unit-member-mp {\n flex: 0 0 auto;\n font-size: 60%;\n }\n .unit-member-seating-pref {\n flex: 0 0 25px;\n }\n`\n\nexport const OptionsWhenSelected = styled.div`\n margin-left: 55px;\n padding: 5px 20px 5px 5px;\n .btn {\n margin: 0 5px 0 0;\n }\n .tap-instruction {\n display: inline-block;\n font-size: 9px;\n vertical-align: middle;\n }\n .closer {\n margin-left: 5px;\n float: right;\n display: inline-block;\n color: #aaaaaa;\n }\n`\n\nexport const MemberGroupLabel = styled.div`\n font-weight: 700;\n background-color: ${p => signupColor(p.$status, 'bg')};\n color: ${p => signupColor(p.$status, 'text')};\n`\n\nUnitBox.defaultProps = {\n $strat: 'none',\n}\n","export const ADD_CLUB = 'ADD_CLUB'\nexport const ADD_EVENT = 'ADD_EVENT'\nexport const ADD_HELPER = 'ADD_HELPER'\nexport const ADD_INVITE = 'ADD_INVITE'\nexport const ADD_LOCATION = 'ADD_LOCATION'\nexport const ADD_MEMBER = 'ADD_MEMBER'\nexport const ADD_MEMBER_SEATING_HISTORY = 'ADD_MEMBER_SEATING_HISTORY'\nexport const ADD_MOVEMENT = 'ADD_MOVEMENT'\nexport const ADD_NOTE = 'ADD_NOTE'\nexport const ADD_OR_UPDATE_ACCOUNT_REQUEST = 'ADD_OR_UPDATE_ACCOUNT_REQUEST'\nexport const ADD_OR_UPDATE_HELP_ARTICLE = 'ADD_OR_UPDATE_HELP_ARTICLE'\nexport const ADD_OR_UPDATE_HELP_PANE = 'ADD_OR_UPDATE_HELP_PANE'\nexport const ADD_OR_UPDATE_HELP_TERM = 'ADD_OR_UPDATE_HELP_TERM'\nexport const ADD_OR_UPDATE_HELP_VIDEO = 'ADD_OR_UPDATE_HELP_VIDEO'\nexport const ADD_OR_UPDATE_PLAN = 'ADD_OR_UPDATE_PLAN'\nexport const ADD_PLAY = 'ADD_PLAY'\nexport const APPROVE_DENY_ACCOUNT_REQUEST = 'APPROVE_DENY_ACCOUNT_REQUEST'\nexport const AUGMENT_GROUP_EVENTS = 'AUGMENT_GROUP_EVENTS'\nexport const AUGMENT_MOVEMENTS = 'AUGMENT_MOVEMENTS'\nexport const CLEAR_GROUP_DATA = 'CLEAR_GROUP_DATA'\nexport const DELETE_ACCOUNT = 'DELETE_ACCOUNT'\nexport const DELETE_ACCOUNT_REQUEST = 'DELETE_ACCOUNT_REQUEST'\nexport const DELETE_CLUB = 'DELETE_CLUB'\nexport const DELETE_EVENT = 'DELETE_EVENT'\nexport const DELETE_HELP_ARTICLE = 'DELETE_HELP_ARTICLE'\nexport const DELETE_HELP_PANE = 'DELETE_HELP_PANE'\nexport const DELETE_HELP_TERM = 'DELETE_HELP_TERM'\nexport const DELETE_HELP_VIDEO = 'DELETE_HELP_VIDEO'\nexport const DELETE_LOCATION = 'DELETE_LOCATION'\nexport const DELETE_MEMBER = 'DELETE_MEMBER'\nexport const DELETE_MOVEMENT = 'DELETE_MOVEMENT'\nexport const DELETE_NOTE = 'DELETE_NOTE'\nexport const DELETE_PENDING_MEMBER = 'DELETE_PENDING_MEMBER'\nexport const DELETE_PLAN = 'DELETE_PLAN'\nexport const DELETE_USER = 'DELETE_USER'\nexport const DIRECTOR_CALL = 'DIRECTOR_CALL'\nexport const FORGET_PANE = 'FORGET_PANE'\nexport const LOAD_ACCOUNT = 'LOAD_ACCOUNT'\nexport const LOAD_ACCOUNTS = 'LOAD_ACCOUNTS'\nexport const LOAD_ARTICLES = 'LOAD_ARTICLES'\nexport const LOAD_EVENT = 'LOAD_EVENT'\nexport const LOAD_HELP_ARTICLE = 'LOAD_HELP_ARTICLE'\nexport const LOAD_HELP_PANE = 'LOAD_HELP_PANE'\nexport const LOAD_HELP_VIDEO = 'LOAD_HELP_VIDEO'\nexport const LOAD_INVOICES = 'LOAD_INVOICES'\nexport const LOAD_MAIL_FAILURES = 'LOAD_MAIL_FAILURES'\nexport const LOAD_MESSAGES = 'LOAD_MESSAGES'\nexport const LOAD_MORE_PAST_EVENTS = 'LOAD_MORE_PAST_EVENTS'\nexport const LOAD_MORE_SCORED_EVENTS = 'LOAD_MORE_SCORED_EVENTS'\nexport const LOAD_MOVEMENTS = 'LOAD_MOVEMENTS'\nexport const LOAD_NOTES = 'LOAD_NOTES'\nexport const LOAD_PANES = 'LOAD_PANES'\nexport const LOAD_PAYOUTS = 'LOAD_PAYOUTS'\nexport const LOAD_PENDING_MEMBERS = 'LOAD_PENDING_MEMBERS'\nexport const LOAD_PLAYS = 'LOAD_PLAYS'\nexport const LOAD_SIGNUP_OVERLAPS = 'LOAD_SIGNUP_OVERLAPS'\nexport const LOAD_STANDINGS = 'LOAD_STANDINGS'\nexport const LOAD_TERMS = 'LOAD_TERMS'\nexport const LOAD_USER = 'LOAD_USER'\nexport const LOAD_USER_EVENTS = 'LOAD_USER_EVENTS'\nexport const LOAD_USER_HOME_PAGE = 'LOAD_USER_HOME_PAGE'\nexport const LOAD_USERS = 'LOAD_USERS'\nexport const LOAD_VIDEOS = 'LOAD_VIDEOS'\nexport const MERGE_USER = 'MERGE_USER'\nexport const RECORD_PAYOUT = 'RECORD_PAYOUT'\nexport const RECORD_SCOREKEEPERS = 'RECORD_SCOREKEEPERS'\nexport const REFRESH_EVENT_OFF = 'REFRESH_EVENT_OFF'\nexport const REFRESH_EVENT_ON = 'REFRESH_EVENT_ON'\nexport const REFRESH_SECTION_OFF = 'REFRESH_SECTION_OFF'\nexport const REFRESH_SECTION_ON = 'REFRESH_SECTION_ON'\nexport const RELOAD_PLANS = 'RELOAD_PLANS'\nexport const REMEMBER_PANE = 'REMEMBER_PANE'\nexport const REMOVE_GROUP = 'REMOVE_GROUP'\nexport const REMOVE_GROUP_EVENTS = 'REMOVE_GROUP_EVENTS'\nexport const REMOVE_INVITE = 'REMOVE_INVITE'\nexport const REMOVE_INVOICE = 'REMOVE_INVOICE'\nexport const REMOVE_PAYOUT = 'REMOVE_PAYOUT'\nexport const REMOVE_PENDING_PARTNER_REQUEST = 'REMOVE_PENDING_PARTNER_REQUEST'\nexport const REMOVE_PLAY = 'REMOVE_PLAY'\nexport const REPLACE_BOARD_DATA = 'REPLACE_BOARD_DATA'\nexport const UPDATE_ACCOUNT = 'UPDATE_ACCOUNT'\nexport const UPDATE_BOARD_DATA = 'UPDATE_BOARD_DATA'\nexport const UPDATE_BY_CURRENT_USER = 'UPDATE_BY_CURRENT_USER'\nexport const UPDATE_CLUB = 'UPDATE_CLUB'\nexport const UPDATE_CLUB_MEMBERS = 'UPDATE_CLUB_MEMBERS'\nexport const UPDATE_DISCORD_MEMBERS = 'UPDATE_DISCORD_MEMBERS'\nexport const UPDATE_EVENT = 'UPDATE_EVENT'\nexport const UPDATE_GROUP = 'UPDATE_GROUP'\nexport const UPDATE_GROUP_EVENT = 'UPDATE_GROUP_EVENT'\nexport const UPDATE_GROUP_ORDER = 'UPDATE_GROUP_ORDER'\nexport const UPDATE_GROUPS = 'UPDATE_GROUPS'\nexport const UPDATE_LATE_PLAYS = 'UPDATE_LATE_PLAYS'\nexport const UPDATE_LOCATION = 'UPDATE_LOCATION'\nexport const UPDATE_MAIL_FAILURES = 'UPDATE_MAIL_FAILURES'\nexport const UPDATE_MANAGED_CLUB = 'UPDATE_MANAGED_CLUB'\nexport const UPDATE_MANAGED_GROUP = 'UPDATE_MANAGED_GROUP'\nexport const UPDATE_MEMBER = 'UPDATE_MEMBER'\nexport const UPDATE_MOVEMENT = 'UPDATE_MOVEMENT'\nexport const UPDATE_NOTE = 'UPDATE_NOTE'\nexport const UPDATE_PAYOUT = 'UPDATE_PAYOUT'\nexport const UPDATE_PENDING_MEMBER = 'UPDATE_PENDING_MEMBER'\nexport const UPDATE_SCORE = 'UPDATE_SCORE'\nexport const UPDATE_SECTION = 'UPDATE_SECTION'\nexport const UPDATE_SECTIONS = 'UPDATE_SECTIONS'\nexport const UPDATE_SIGNUP = 'UPDATE_SIGNUP'\nexport const UPDATE_SIGNUP_ATTR = 'UPDATE_SIGNUP_ATTR'\nexport const UPDATE_SIGNUP_SEATING = 'UPDATE_SIGNUP_SEATING'\nexport const UPDATE_USER = 'UPDATE_USER'\nexport const UPDATE_USER_EVENT = 'UPDATE_USER_EVENT'\nexport const UPDATING_USER = 'UPDATING_USER'\nexport const USER_UPDATE_INVALID = 'USER_UPDATE_INVALID'\n","// Selectors directly from state\nexport const getBoardSets = state => state.board_sets\nexport const getBoards = state => state.boards\nexport const getDeals = state => state.deals\nexport const getClubs = state => state.clubs\nexport const getEvent = state => state.event\nexport const getGroups = state => state.groups\nexport const getHelpers = state => state.helpers\nexport const getLatePlays = state => state.late_plays\nexport const getLocations = state => state.locations\nexport const getMembers = state => state.members\nexport const getMovements = state => state.movements\nexport const getPlays = state => state.plays\nexport const getResults = state => state.results\nexport const getScores = state => state.scores\nexport const getSectionMovements = state => state.section_movements\nexport const getSections = state => state.sections\nexport const getSignups = state => state.signups\nexport const getUsers = state => state.users\nexport const getId = (_state, id) => id\nexport const getTableSectionId = state => state.helpers.table_section_id\n","import { createSelector } from 'reselect'\n\nimport { getEvent, getMembers, getScores, getSignups } from './base_selectors'\n\nimport { getGroup, getClub } from './individual_selectors'\n\n// Get filtered elements\n\nexport const getPendingPartners = createSelector(\n [getEvent, getGroup, getClub, getSignups],\n (event, group, club, signups) => {\n const pendingPartners = {}\n for (const signup of Object.values(signups)) {\n if (signup.status == 'waiting' && signup.pending_partner != null) {\n // Compare with PendingPartnerSerializer for data used on the user#home page\n pendingPartners[signup.id] = {\n ...signup,\n starts_at: event.starts_at,\n group_id: event.group_id,\n group_title: group.title,\n club_title: club.title,\n comment: event.comment,\n fee: event.fee,\n }\n }\n }\n return pendingPartners\n },\n)\n\nexport const getGroupMembers = createSelector(\n [getEvent, getMembers],\n (event, members) => {\n let groupMembers = {}\n for (let member_id in members) {\n let member = members[member_id]\n if (member.group_id == event.group_id) {\n groupMembers[member.id] = member\n }\n }\n return groupMembers\n },\n)\n\nexport const getFlaggedCount = createSelector([getScores], scores => {\n let fcount = 0\n for (let score_id in scores) {\n if (scores[score_id].flagged) {\n fcount += 1\n }\n }\n return fcount\n})\n\nexport const getUnseatedPlayersCount = createSelector([getSignups], signups => {\n return Object.values(signups).filter(\n s => s.table0 == null && s.status == 'playing',\n ).length\n})\n","import { createSelector } from 'reselect'\nimport Movement from 'helpers/Movement'\n\nimport { getSectionMovements } from './base_selectors'\n\n// Movements\n\nexport const getMovementModels = createSelector(\n [getSectionMovements],\n sectionMovements => {\n const models = {}\n for (const sm of Object.values(sectionMovements)) {\n models[sm.section_id] = new Movement(sm)\n }\n return models\n },\n)\n\nexport const getSectionMovementModel = (state, sectionId) =>\n sectionId ? getMovementModels(state)[sectionId] : null\n","import { createSelector } from 'reselect'\nimport { NESW, SUITS } from 'helpers/constants.js'\nimport { suitCards, arrayUnique } from 'helpers/utilities'\n\nimport {\n getBoards,\n getScores,\n getBoardSets,\n getEvent,\n getSections,\n} from './base_selectors'\n\nimport { getMovementModels } from './movement_selectors'\n\n// About the boards in use\n\nexport const getBoardSetsBySection = createSelector(\n [getBoardSets],\n boardSets => {\n const sbs = {}\n for (let bs of Object.values(boardSets)) {\n if (!sbs[bs.section_id]) {\n sbs[bs.section_id] = {}\n }\n sbs[bs.section_id][bs.set_number] = bs\n }\n\n return sbs\n },\n)\n\nexport const getSectionBoardSets = (state, sectionId) =>\n sectionId ? getBoardSetsBySection(state)[sectionId] : null\n\nexport const getAnyHandRecords = createSelector([getBoards], boards => {\n return Object.keys(boards).length > 0\n})\n\nconst getAllBoardsByDealId = createSelector([getBoards], boards => {\n const byDealId = {}\n for (let board of Object.values(boards)) {\n if (!byDealId[board.deal_id]) {\n byDealId[board.deal_id] = {}\n }\n byDealId[board.deal_id][board.board_number] = board.hand\n }\n return byDealId\n})\n\nexport const getBoardsByDealId = (state, dealId) => {\n return dealId ? getAllBoardsByDealId(state)[dealId] : null\n}\n\nexport const getHandRecords = createSelector(\n [getBoardSets, getBoards],\n (boardSets, boards) => {\n // {set_number, board_number} is the same deal across all sections\n let records = {}\n for (let bs of Object.values(boardSets)) {\n let sn = bs.set_number\n if (!records[sn]) {\n records[sn] = { color: bs.color, boards: {} }\n let dealId = bs.deal_id\n for (let board of Object.values(boards)) {\n if (board.deal_id == dealId)\n records[sn].boards[board.board_number] = board.hand\n }\n }\n }\n // Return sn => {color, boards: {bn => hand}}\n return records\n },\n)\n\n// Will be deprecated in favor of getHand\nexport const getDeal = createSelector(\n getHandRecords,\n (_, board) => board,\n (handRecords, board) => {\n const boardSet = board > 100 ? parseInt(board / 100) : 1\n const boardNumber = board % 100\n if (handRecords[boardSet]) {\n return handRecords[boardSet].boards[boardNumber]\n }\n return null\n },\n)\n\n// This is the preferred name for getDeal, which will be deprecated\nexport const getHand = createSelector(\n getHandRecords,\n (_, board) => board,\n (handRecords, board) => {\n const boardSet = board > 100 ? parseInt(board / 100) : 1\n const boardNumber = board % 100\n if (handRecords[boardSet]) {\n return handRecords[boardSet].boards[boardNumber]\n }\n return null\n },\n)\n\n// Used to display results\nconst getScoredBoards = createSelector([getScores], scores => {\n let bySection = {}\n\n for (let score of Object.values(scores)) {\n if (!bySection[score.section_id]) {\n bySection[score.section_id] = []\n }\n let b = score.board\n if (!bySection[score.section_id].includes(b)) {\n bySection[score.section_id].push(b)\n }\n }\n for (let sect of Object.values(bySection)) {\n sect.sort((a, b) => a - b)\n }\n return bySection\n})\n\nexport const getAllScoredBoards = createSelector(\n [getScoredBoards],\n scoredBoardsBySection => {\n return arrayUnique(Object.values(scoredBoardsBySection).flat()).sort(\n (a, b) => a - b,\n )\n },\n)\n\nexport const getSectionScoredBoards = (state, sectionId) =>\n sectionId ? getScoredBoards(state)[sectionId] : null\n\n// This goes across sections\nexport const getBoardPreparationStatus = createSelector(\n [getEvent, getSections, getMovementModels, getBoardSetsBySection],\n (event, sections, movementModels, boardSetsBySection) => {\n const usePreparedBoards = event.use_prepared_boards\n const status = {}\n for (const sectionId of Object.keys(sections)) {\n let movement = movementModels[sectionId]\n let boardSets = boardSetsBySection[sectionId]\n if (movement && boardSets) {\n status[sectionId] = movement.checkPreparedBoardSets(\n boardSets,\n usePreparedBoards,\n )\n } else {\n status[sectionId] = {\n ready: false,\n errors: ['Movement and/or board sets not defined.'],\n setErrors: {},\n }\n }\n }\n return status\n },\n)\n\nexport const getCardsBySeatSuit = createSelector(\n getBoardSets,\n getDeal,\n (boardSets, deal) => {\n const cardsBySeatSuit = {}\n for (let seat of NESW) {\n cardsBySeatSuit[seat] = {}\n for (let suit of SUITS) {\n cardsBySeatSuit[seat][suit] = suitCards(deal, suit, seat)\n }\n }\n return cardsBySeatSuit\n },\n)\n","import { createSelector } from 'reselect'\nimport { fullNameSort } from 'helpers/utilities'\n\nimport { getUsers, getEvent } from './base_selectors'\nimport { getGroupMembers } from './filter_selectors'\n\nexport const getDirectors = createSelector(\n [getEvent, getUsers],\n (event, users) => {\n let directors = []\n for (let user_id of event.directors) {\n if (users[user_id]) {\n directors.push(users[user_id])\n }\n }\n directors.sort(fullNameSort)\n return directors\n },\n)\n\nexport const getNonDirectors = createSelector(\n [getEvent, getGroupMembers, getUsers],\n (event, members, users) => {\n let non_directors = []\n for (let member_id in members) {\n let member = members[member_id]\n let user = users[member.user_id]\n if (!event.directors.includes(user.id)) {\n non_directors.push(user)\n }\n }\n non_directors.sort(fullNameSort)\n return non_directors\n },\n)\n","import { createSelector } from 'reselect'\n\nimport { getPlays } from './base_selectors'\nimport { getSortedSectionIds } from './indexed_selectors'\n\n// Plays\n\nconst getSortedPlays = createSelector(\n [getSortedSectionIds, getPlays],\n (sectionIds, plays) => {\n const bySection = {}\n for (const sId of sectionIds) {\n bySection[sId] = {}\n }\n for (const play of Object.values(plays)) {\n if (!bySection[play.section_id]) {\n bySection[play.section_id] = {}\n }\n if (!bySection[play.section_id][play.round]) {\n bySection[play.section_id][play.round] = {}\n }\n bySection[play.section_id][play.round][play.table] = play\n }\n return bySection\n },\n)\n\nexport const getSectionSortedPlays = (state, sectionId) =>\n sectionId ? getSortedPlays(state)[sectionId] : {}\n","import { createSelector } from 'reselect'\n\nimport {\n getMovements,\n getScores,\n getSignups,\n getResults,\n} from './base_selectors'\n\n// Selectors for determining overall state\n\nexport const getMovementsLoaded = createSelector(\n [getMovements],\n movements => Object.keys(movements).length > 0,\n)\n\nexport const getEventHasScores = createSelector(\n [getScores],\n scores => Object.keys(scores).length > 0,\n)\n\nexport const getEventHasResults = createSelector(\n [getResults],\n results => Object.keys(results).length > 0,\n)\n\nexport const getSectionScoreStatusChecker = createSelector(\n [getScores],\n scores => {\n return sectionId => {\n return (\n Object.values(scores).filter(score => score.section_id == sectionId)\n .length > 0\n )\n }\n },\n)\n\nexport const getHasIneligibles = createSelector([getSignups], signups => {\n for (const signup of Object.values(signups)) {\n if (signup.status == 'playing' && !signup.mp_eligible) {\n return true\n }\n }\n return false\n})\n","import { createSelector } from 'reselect'\n\nimport { fullPairNumber, safelyGet } from 'helpers/utilities'\nimport { DIRECTION_FROM_SEAT_OR_DIRECTION } from 'helpers/seating'\n\nimport { getMembers, getSections, getSignups } from './base_selectors'\nimport { getMovementModels } from './movement_selectors'\n\nexport const getPairNumberFinder = createSelector(\n [getMovementModels],\n movementModels => {\n let lookup = {}\n for (let sectionId in movementModels) {\n lookup[sectionId] = {}\n let movement = movementModels[sectionId]\n if (movement) {\n for (let table of movement.tables) {\n lookup[sectionId][table] = {\n NS: movement.nsPairAt(1, table),\n EW: movement.ewPairAt(1, table),\n }\n }\n }\n }\n return (sectionId, table, directionOrSeat) => {\n let direction = DIRECTION_FROM_SEAT_OR_DIRECTION[directionOrSeat]\n return safelyGet(lookup, [sectionId, table, direction])\n }\n },\n)\n\nexport const getAllPairs = createSelector(\n [getSignups, getSections, getMovementModels],\n (signups, sections, movementModels) => {\n // this will process a pair twice, once for each member of the pair,\n // but that prevents problems that occur when new signups are processed\n // successively and signup2 might not yet have been received\n let sectionPairs = {}\n for (let section of Object.values(sections)) {\n let movement = movementModels[section.id]\n let pairs = {}\n if (movement) {\n for (let signup of Object.values(signups)) {\n if (signup.section_id != section.id) {\n continue\n }\n let pairNumber = movement.pairNumberFromSignup(signup)\n if (pairNumber) {\n if (!pairs[pairNumber]) {\n pairs[pairNumber] = {}\n }\n if (signup.seat0 == 'N' || signup.seat0 == 'E') {\n pairs[pairNumber] = {\n member1_id: signup.member_id,\n signup1_id: signup.id,\n member2_id: signup.partner_member_id,\n signup2_id: signup.partner_id,\n member1_name: signup.full_name,\n member2_name: signup.partner_name,\n member_names: `${signup.full_name} & ${signup.partner_name}`,\n number: Math.abs(pairNumber),\n full_number: fullPairNumber(pairNumber, movement.ns_stationary),\n table0: signup.table0,\n direction: signup.seat0 == 'N' ? 'NS' : 'EW',\n }\n } else {\n pairs[pairNumber] = {\n member2_id: signup.member_id,\n signup2_id: signup.id,\n member1_id: signup.partner_member_id,\n signup1_id: signup.partner_id,\n member2_name: signup.full_name,\n member1_name: signup.partner_name,\n member_names: `${signup.partner_name} & ${signup.full_name}`,\n number: Math.abs(pairNumber),\n table0: signup.table0,\n full_number: fullPairNumber(pairNumber, movement.ns_stationary),\n direction: signup.seat0 == 'S' ? 'NS' : 'EW',\n }\n }\n }\n }\n }\n sectionPairs[section.id] = pairs\n }\n\n return sectionPairs\n },\n)\n\nexport const getSectionPairs = (state, sectionId = null) => {\n return sectionId ? getAllPairs(state)[sectionId] : null\n}\n\n// pairNsEw = {sectonId#ns_pair#ew_pair}\nconst getPairSectNsEw = (_state, pairSectNsEw) => pairSectNsEw\nexport const getUserBySeat = createSelector(\n [getMembers, getAllPairs, getPairSectNsEw],\n (members, pairs, pairSectNsEw) => {\n const [sectionId, ns_pair, ew_pair] = pairSectNsEw\n .split('#')\n .map(s => parseInt(s))\n return {\n N: {\n id: members[pairs[sectionId][ns_pair].member1_id].user_id,\n fullName: pairs[sectionId][ns_pair].member1_name,\n },\n S: {\n id: members[pairs[sectionId][ns_pair].member2_id].user_id,\n fullName: pairs[sectionId][ns_pair].member2_name,\n },\n E: {\n id: members[pairs[sectionId][ew_pair].member1_id].user_id,\n fullName: pairs[sectionId][ew_pair].member1_name,\n },\n W: {\n id: members[pairs[sectionId][ew_pair].member2_id].user_id,\n fullName: pairs[sectionId][ew_pair].member2_name,\n },\n }\n },\n)\n","const VictoryPoints = (imps, boards_per_round) => {\n const abs_imps = Math.abs(imps)\n let vwin\n if (boards_per_round < 8) {\n vwin =\n abs_imps == 0\n ? 10\n : abs_imps <= 2\n ? 11\n : abs_imps <= 4\n ? 12\n : abs_imps <= 7\n ? 13\n : abs_imps <= 10\n ? 14\n : abs_imps <= 13\n ? 15\n : abs_imps <= 16\n ? 16\n : abs_imps <= 19\n ? 17\n : abs_imps <= 23\n ? 18\n : abs_imps <= 27\n ? 19\n : 20\n } else {\n vwin =\n abs_imps == 0\n ? 10\n : abs_imps <= 2\n ? 11\n : abs_imps <= 5\n ? 12\n : abs_imps <= 9\n ? 13\n : abs_imps <= 13\n ? 14\n : abs_imps <= 17\n ? 15\n : abs_imps <= 21\n ? 16\n : abs_imps <= 25\n ? 17\n : abs_imps <= 30\n ? 18\n : abs_imps <= 35\n ? 19\n : 20\n }\n return imps > 0 ? vwin : 20 - vwin\n}\n\nexport default VictoryPoints\n","import { createSelector } from 'reselect'\nimport { safelyGet } from 'helpers/utilities'\nimport IMPs from 'helpers/IMPs.js'\nimport VictoryPoints from 'helpers/VictoryPoints.js'\n\nimport {\n getSections,\n getSectionMovements,\n getScores,\n getLatePlays,\n getId,\n} from './base_selectors'\nimport { getSectionIds } from './indexed_selectors'\nimport { getMovementModels } from './movement_selectors'\n\nconst NULL_OBJECT = {}\n\n// Scores\n\nexport const getScoreFinder = createSelector([getScores], scores => {\n let lookup = {}\n for (let score_id in scores) {\n let score = scores[score_id]\n let { section_id, round, table, board } = score\n if (!lookup[section_id]) {\n lookup[section_id] = {}\n }\n if (!lookup[section_id][round]) {\n lookup[section_id][round] = { [table]: { [board]: score } }\n } else if (!lookup[section_id][round][table]) {\n lookup[section_id][round][table] = { [board]: score }\n } else {\n lookup[section_id][round][table][board] = score\n }\n }\n return (sectionId, round, table, board) => {\n return safelyGet(lookup, [sectionId, round, table, board])\n }\n})\n\nexport const getBoardScoresBySection = createSelector(\n [getSectionIds, getScores],\n (sectionIds, scores) => {\n let boardScores = {}\n for (let sectionId of sectionIds) {\n boardScores[sectionId] = {}\n }\n for (let score_id in scores) {\n let score = scores[score_id]\n if (!boardScores[score.section_id][score.board]) {\n boardScores[score.section_id][score.board] = []\n }\n boardScores[score.section_id][score.board].push(score)\n }\n for (let sectionId in boardScores) {\n for (let board in boardScores[sectionId]) {\n boardScores[sectionId][board].sort((a, b) => {\n return a.ns_pair_number - b.ns_pair_number\n })\n }\n }\n return boardScores\n },\n)\n\nexport const getSectionHasScores = (state, sectionId) => {\n const bySid = getBoardScoresBySection(state)[sectionId]\n return bySid ? Object.keys(bySid).length > 0 : false\n}\n\nexport const getSectionBoardScores = (state, sectionId) =>\n sectionId ? getBoardScoresBySection(state)[sectionId] : NULL_OBJECT\n\nexport const getPairScoresFinder = createSelector(\n [getSections, getScores, getMovementModels],\n (sections, scores, movementModels) => {\n let lookup = {}\n for (let sectionId in sections) {\n lookup[sectionId] = {}\n let movement = movementModels[sectionId]\n if (movement) {\n for (let pair of movement.combinedPairs(true)) {\n lookup[sectionId][pair] = []\n }\n }\n }\n for (let score_id in scores) {\n let score = scores[score_id]\n if (lookup[score.section_id][score.ns_pair_number]) {\n // It could be the movement no longer exists\n lookup[score.section_id][score.ns_pair_number].push(score)\n lookup[score.section_id][score.ew_pair_number].push(score)\n }\n }\n\n return (pairNumber, sectionId) => {\n return safelyGet(lookup, [sectionId, pairNumber])\n }\n },\n)\n\nexport const getPairHasScoresFinder = createSelector(\n [getPairScoresFinder],\n pairScoresFinder => {\n return (pairNumber, sectionId) => {\n if (!pairNumber || !sectionId || sectionId == 'unseated') {\n return false\n }\n let scores = pairScoresFinder(pairNumber, sectionId)\n return scores && scores.length > 0\n }\n },\n)\n\nconst getPairBoards = createSelector(\n [getScores, getMovementModels],\n (scores, movementModels) => {\n let pair_boards = {}\n for (let sectionId in movementModels) {\n pair_boards[sectionId] = {}\n let movement = movementModels[sectionId]\n if (movement) {\n for (let pair of movement.combinedPairs(true)) {\n pair_boards[sectionId][pair] = {}\n }\n }\n }\n for (let score_id in scores) {\n let score = scores[score_id]\n let board = score.board\n if (pair_boards[score.section_id][score.ns_pair_number]) {\n pair_boards[score.section_id][score.ns_pair_number][board] = score\n pair_boards[score.section_id][score.ew_pair_number][board] = score\n }\n }\n return pair_boards\n },\n)\n\nexport const getSectionPairBoards = (state, sectionId) =>\n sectionId ? getPairBoards(state)[sectionId] : null\n\nconst getPairProgress = createSelector(\n [getSections, getMovementModels, getPairScoresFinder],\n (sections, movementModels, pairScoresFinder) => {\n let pairProgress = {}\n for (let sectionId in sections) {\n pairProgress[sectionId] = {}\n let movement = movementModels[sectionId]\n // true == exclude_phantom\n if (movement) {\n for (let pairNumber of movement.combinedPairs(true)) {\n pairProgress[sectionId][pairNumber] = {}\n let scored = pairScoresFinder(pairNumber, sectionId) || []\n for (let round of movement.rounds) {\n let playingBoards = movement.playingBoards(pairNumber, round)\n let boardCount = playingBoards.length\n let playedCount = scored.filter(s => s.round == round).length\n // playedCount could be zero in the case of a sitout\n pairProgress[sectionId][pairNumber][round] =\n playedCount == boardCount\n ? 'complete'\n : playedCount == 0\n ? 'not started'\n : 'in progress'\n }\n }\n }\n }\n return pairProgress\n },\n)\n\nexport const getSectionPairProgress = createSelector(\n [getPairProgress, getId],\n (pairProgress, sectionId) => pairProgress[sectionId],\n)\n\nconst getFinishedPairs = createSelector([getPairProgress], pairProgress => {\n const finishedPairs = {}\n for (let sectionId in pairProgress) {\n finishedPairs[sectionId] = []\n\n for (const pairNumber in pairProgress[sectionId]) {\n let done = true\n for (const round in pairProgress[sectionId][pairNumber]) {\n if (pairProgress[sectionId][pairNumber][round] !== 'complete') {\n done = false\n break\n }\n }\n if (done) {\n finishedPairs[sectionId].push(parseInt(pairNumber))\n }\n }\n }\n return finishedPairs\n})\n\nexport const getSectionFinishedPairs = (state, sectionId) =>\n sectionId ? getFinishedPairs(state)[sectionId] : null\n\nexport const getScoreCountsBySection = createSelector(getScores, scores => {\n let counts = {}\n for (let score of Object.values(scores)) {\n if (!counts[score.section_id]) {\n counts[score.section_id] = 0\n }\n counts[score.section_id] += 1\n }\n return counts\n})\n\nexport const getSectionScoreCounts = (state, sectionId) => {\n return getScoreCountsBySection(state)[sectionId] || 0\n}\n\nexport const getAllScoresArray = createSelector(\n [getSections, getMovementModels, getScoreFinder, getLatePlays],\n (sections, movementModels, scoreFinder, latePlays) => {\n const allScores = {}\n const findLatePlay = (sId, b, ns, ew) =>\n latePlays.filter(\n lp =>\n lp.section_id == sId &&\n lp.board == b &&\n lp.ns_pair == ns &&\n lp.ew_pair == ew,\n ).length > 0\n\n for (let sectionId in sections) {\n allScores[sectionId] = []\n let movement = movementModels[sectionId]\n if (movement) {\n const phantomPairNumber = movement.phantomPair\n\n let index = 0\n for (const round of movement.rounds) {\n for (const table of movement.tables) {\n const { board_set, board_group, ns_pair, ew_pair } =\n movement.structure[round][table]\n for (const board of movement.boardsInSetGroup(\n board_set,\n board_group,\n )) {\n if (\n ns_pair != phantomPairNumber &&\n ew_pair != phantomPairNumber\n ) {\n const score = scoreFinder(sectionId, round, table, board)\n const latePlay =\n score && score.not_played\n ? findLatePlay(sectionId, board, ns_pair, ew_pair)\n : false\n const score_id = score ? score.id : null\n allScores[sectionId].push({\n index,\n round,\n table,\n board,\n ns_pair,\n ew_pair,\n score_id,\n section_id: sectionId,\n notPlayed: score && score.not_played && !latePlay,\n latePlay: latePlay,\n flagged: score && score.flagged,\n })\n index++\n }\n }\n }\n }\n }\n }\n return allScores\n },\n)\n\nexport const getSectionScoresArray = (state, sectionId) =>\n getAllScoresArray(state)[sectionId]\n\nexport const getScoringStats = createSelector(\n [getSectionIds, getAllScoresArray],\n (sectionIds, allScores) => {\n const stats = {}\n for (const sectionId of sectionIds) {\n stats[sectionId] = {}\n\n for (const score of allScores[sectionId]) {\n if (!stats[score.section_id][score.round]) {\n stats[score.section_id][score.round] = {\n played: 0,\n latePlays: 0,\n notPlayed: 0,\n unrecorded: 0,\n flagged: 0,\n missing: [],\n }\n }\n if (score.score_id) {\n if (score.notPlayed) {\n stats[score.section_id][score.round].notPlayed += 1\n } else if (score.latePlay) {\n stats[score.section_id][score.round].latePlays += 1\n } else {\n stats[score.section_id][score.round].played += 1\n }\n if (score.flagged) {\n stats[score.section_id][score.round].flagged += 1\n }\n } else {\n stats[score.section_id][score.round].unrecorded += 1\n stats[score.section_id][score.round].missing.push({\n table: score.table,\n board: score.board,\n })\n }\n }\n }\n return stats\n },\n)\n\nexport const getSectionScoringStats = (state, sectionId) =>\n getScoringStats(state)[sectionId]\n\nexport const getScoringObstacles = createSelector(\n [getSections, getMovementModels, getScores, getLatePlays],\n (sections, movementModels, scores, latePlays) => {\n // Obstacles\n // Boards played less than twice, Pairs playing less than twice\n const bySection = {}\n for (let section of Object.values(sections)) {\n let movement = movementModels[section.id]\n const obstacles = []\n const boardCounts = {}\n const pairCounts = {}\n if (movement) {\n for (const board of movement.allBoards()) {\n boardCounts[board] = 0\n }\n for (let pair of movement.combinedPairs(true)) {\n pairCounts[pair] = 0\n }\n for (const score of Object.values(scores)) {\n if (score.section_id == section.id && score.scored) {\n boardCounts[score.board] += 1\n pairCounts[score.ns_pair_number] += 1\n pairCounts[score.ew_pair_number] += 1\n }\n }\n for (const board in boardCounts) {\n if (!section.is_swiss && boardCounts[board] == 0) {\n obstacles.push(`Board ${board} has not been played.`)\n } else if (boardCounts[board] == 1) {\n obstacles.push(`Board ${board} has only been played once.`)\n }\n }\n for (const pair_number in pairCounts) {\n if (pairCounts[pair_number] == 0) {\n obstacles.push(\n `No scores recorded for Pair ${movement.pairNumber(pair_number)}.`,\n )\n }\n }\n\n if (latePlays.filter(lp => lp.section_id == section.id).length > 0) {\n obstacles.push(`${latePlays.length} late plays are pending.`)\n }\n }\n bySection[section.id] = obstacles\n }\n\n return bySection\n },\n)\n\nexport const getSectionScoringObstacles = (state, sectionId) =>\n getScoringObstacles(state)[sectionId]\n\nexport const getSectionPlayedBoards = createSelector(\n [getScores, getId],\n (scores, sectionId) => {\n const playedBoards = []\n for (const score of Object.values(scores)) {\n if (\n score.section_id == sectionId &&\n !playedBoards.includes(score.board)\n ) {\n playedBoards.push(score.board)\n }\n }\n return playedBoards\n },\n)\n\nexport const getProvisionalResults = createSelector(\n [getSections, getBoardScoresBySection, getMovementModels],\n (sections, boardScores, movementModels) => {\n const includedScore = score => {\n return !score.not_played && !score.artificially_scored\n }\n\n const isThisPair = (score, pairNumber) => {\n return (\n score.ns_pair_number == pairNumber || score.ew_pair_number == pairNumber\n )\n }\n\n const bySection = {}\n for (let section of Object.values(sections)) {\n let movement = movementModels[section.id]\n if (movement) {\n const pairNumbers = movement.combinedPairs(true)\n const r = {}\n for (const pairNumber of pairNumbers) {\n r[pairNumber] = { earned: 0, max: 0 }\n }\n for (const board in boardScores[section.id]) {\n for (const pairNumber of pairNumbers) {\n let played = false\n let nsScore = null\n let satNs\n for (let score of boardScores[section.id][board]) {\n if (includedScore(score) && isThisPair(score, pairNumber)) {\n played = true\n satNs = score.ns_pair_number == pairNumber\n nsScore = score.ns_score\n }\n }\n if (played) {\n for (let score of boardScores[section.id][board]) {\n if (includedScore(score) && !isThisPair(score, pairNumber)) {\n r[pairNumber].max += 1\n if (satNs) {\n if (score.ns_score < nsScore) {\n r[pairNumber].earned += 1.0\n } else if (score.ns_score == nsScore) {\n r[pairNumber].earned += 0.5\n }\n } else {\n if (score.ns_score > nsScore) {\n r[pairNumber].earned += 1.0\n } else if (score.ns_score == nsScore) {\n r[pairNumber].earned += 0.5\n }\n }\n }\n }\n }\n }\n }\n bySection[section.id] = r\n } else {\n bySection[section.id] = null\n }\n }\n\n return bySection\n },\n)\n\nexport const getSectionProvisionalResults = (state, sectionId) =>\n sectionId ? getProvisionalResults(state)[sectionId] : {}\n\nexport const getTeamStandings = createSelector(\n [\n getScores,\n getSections,\n getSectionMovements,\n getPairProgress,\n getBoardScoresBySection,\n ],\n (scores, sections, sectionMovements, pairProgress, boardScores) => {\n const bySection = {}\n for (const sectionId in sections) {\n const section = sections[sectionId]\n if (section.scoring_progress != 'entry') {\n continue\n }\n const sectionMovement = sectionMovements[sectionId]\n const rounds = sectionMovement.round_count\n const teams = sectionMovement.table_count\n const results = {}\n const standings = {}\n\n for (let score of Object.values(scores)) {\n if (score.section_id != sectionId) {\n continue\n }\n const ns_team = score.ns_pair_number\n const ew_team = -1 * score.ew_pair_number\n if (!results[score.round]) {\n results[score.round] = {}\n }\n if (!results[score.round][ns_team]) {\n results[score.round][ns_team] = {}\n }\n if (!results[score.round][ns_team][score.board]) {\n results[score.round][ns_team][score.board] = {}\n }\n // E/W scores may occur in a different round\n results[score.round][ns_team][score.board].ns = score.ns_score\n results[score.round][ns_team][score.board].vs = ew_team\n for (let ewScore of boardScores[sectionId][score.board]) {\n if (\n ewScore.ns_pair_number == ew_team &&\n ewScore.ew_pair_number == -1 * ns_team\n ) {\n results[score.round][ns_team][score.board].ew =\n ewScore.ns_score !== null ? 0 - ewScore.ns_score : null\n }\n }\n }\n for (let r = 1; r <= rounds; r += 1) {\n for (let t = 1; t <= teams; t += 1) {\n if (results[r] && results[r][t]) {\n if (pairProgress[sectionId][t][r] == 'complete') {\n for (let result of Object.values(results[r][t])) {\n if (\n typeof result.ns == 'undefined' ||\n typeof result.ew == 'undefined'\n ) {\n if (standings[r] && standings[r][t]) {\n delete standings[r][t]\n }\n break\n } else {\n if (!standings[r]) {\n standings[r] = {}\n }\n if (!standings[r][t]) {\n standings[r][t] = {\n vs: result.vs,\n imps: 0,\n vps: null,\n rank: null,\n tie: false,\n cumulative_vps: null,\n max_vps: 20,\n pct: 0,\n }\n }\n if (result.ns !== null && result.ew !== null) {\n standings[r][t].imps += IMPs(result.ns + result.ew)\n }\n }\n }\n }\n }\n if (standings[r] && standings[r][t]) {\n standings[r][t].vps = VictoryPoints(\n standings[r][t].imps,\n sectionMovement.boards_per_round,\n )\n standings[r][t].max_vps = r * 20\n if (r == 1) {\n standings[r][t].cumulative_vps = standings[r][t].vps\n } else {\n if (\n standings[r - 1] &&\n standings[r - 1][t] &&\n standings[r - 1][t].cumulative_vps != null\n ) {\n standings[r][t].cumulative_vps =\n standings[r - 1][t].cumulative_vps + standings[r][t].vps\n }\n }\n }\n }\n if (standings[r]) {\n // Rank, only if all are complete\n if (Object.keys(standings[r].length == teams)) {\n const roundVps = Object.values(standings[r])\n .filter(t => t.cumulative_vps !== null)\n .map(t => t.cumulative_vps)\n if (roundVps.length == teams) {\n roundVps.sort((a, b) => parseInt(b) - parseInt(a))\n for (const [t, stndg] of Object.entries(standings[r])) {\n if (stndg.cumulative_vps !== null) {\n standings[r][t].rank =\n roundVps.indexOf(stndg.cumulative_vps) + 1\n standings[r][t].tie =\n roundVps.filter(t => t == stndg.cumulative_vps).length > 1\n standings[r][t].pct =\n (stndg.cumulative_vps * 100.0) / stndg.max_vp\n }\n }\n }\n }\n }\n }\n\n bySection[sectionId] = standings\n }\n\n return bySection\n },\n)\n\nexport const getSectionTeamStandings = (state, sectionId) =>\n sectionId ? getTeamStandings(state)[sectionId] : {}\n","import { createSelector } from 'reselect'\nimport { safelyGet, teamSeatSort } from 'helpers/utilities'\nimport { NSEW } from 'helpers/constants'\n\nimport {\n getUsers,\n getMembers,\n getSections,\n getSignups,\n getId,\n} from './base_selectors'\nimport { getTeamsByCaptainId, getSignupsByStatus } from './indexed_selectors'\n\n// Players by seating\n\nconst getSignupIdsBySectionTableSeat = createSelector(\n [getSections, getSignups],\n (sections, signups) => {\n let assigned = Object.keys(sections).reduce((map, s) => {\n map[s] = {}\n return map\n }, {})\n for (let signup of Object.values(signups)) {\n let { section_id, table0, seat0 } = signup\n if (section_id && table0 && seat0) {\n if (!assigned[section_id][table0]) {\n assigned[section_id][table0] = {}\n }\n assigned[section_id][table0][seat0] = signup.id\n }\n }\n return assigned\n },\n)\n\nexport const getSignupIdFinder = createSelector(\n [getSignupIdsBySectionTableSeat],\n signupIdsBySectionTableSeat => {\n return (sectionId, table, seat) =>\n safelyGet(signupIdsBySectionTableSeat, [sectionId, table, seat])\n },\n)\n\nexport const getPairsSectionSeatingStatus = createSelector(\n [getSections, getSignupIdFinder],\n (sections, signupIdFinder) => {\n let status = Object.keys(sections).reduce((map, s) => {\n map[s] = { allSeats: [], emptySeats: [], filledSeats: [] }\n return map\n }, {})\n for (let section of Object.values(sections)) {\n for (let table = 1; table <= section.max_tables; table += 1) {\n status[section.id].allSeats.push(`${table}-NS`)\n status[section.id].allSeats.push(`${table}-EW`)\n if (signupIdFinder(section.id, table, 'N')) {\n status[section.id].filledSeats.push(`${table}-NS`)\n } else {\n status[section.id].emptySeats.push(`${table}-NS`)\n }\n if (signupIdFinder(section.id, table, 'E')) {\n status[section.id].filledSeats.push(`${table}-EW`)\n } else {\n status[section.id].emptySeats.push(`${table}-EW`)\n }\n }\n status[section.id].pairsCount = status[section.id].filledSeats.length\n }\n return status\n },\n)\n\nexport const getTeamSectionSeatingStatus = createSelector(\n [getSections, getSignups],\n (sections, signups) => {\n const readySections = {}\n for (let sectionId of Object.keys(sections)) {\n readySections[sectionId] = { tables: {}, ready: true }\n }\n for (let signup of Object.values(signups)) {\n if (signup.table0) {\n if (!readySections[signup.section_id].tables[signup.table0]) {\n readySections[signup.section_id].tables[signup.table0] = []\n }\n readySections[signup.section_id].tables[signup.table0].push(\n signup.seat0,\n )\n }\n }\n for (let sectionId of Object.keys(sections)) {\n for (let table of Object.keys(readySections[sectionId].tables)) {\n let atTable = readySections[sectionId].tables[table]\n let allSeatsPresent = NSEW.every(seat => atTable.includes(seat))\n if (!allSeatsPresent) {\n readySections[sectionId].ready = false\n break\n }\n }\n }\n return readySections\n },\n)\n\nexport const getSignupsBySectionTeamAssignment = createSelector(\n [getSections, getSignups],\n (sections, signups) => {\n let assigned = Object.keys(sections).reduce((map, s) => {\n map[s] = {}\n return map\n }, {})\n for (let signup of Object.values(signups)) {\n if (signup.table0) {\n if (!assigned[signup.section_id][signup.table0]) {\n assigned[signup.section_id][signup.table0] = {}\n }\n assigned[signup.section_id][signup.table0][signup.seat0] = signup\n }\n }\n return assigned\n },\n)\n\nconst getCaptainIdsBySectionTeamNumber = createSelector(\n [getSections, getSignups],\n (sections, signups) => {\n let assigned = Object.keys(sections).reduce((map, s) => {\n map[s] = {}\n return map\n }, {})\n for (let signup of Object.values(signups)) {\n if (\n signup.captain_id &&\n signup.id == signup.captain_id &&\n signup.table0\n ) {\n assigned[signup.section_id][signup.table0] = signup.captain_id\n }\n }\n return assigned\n },\n)\n\nexport const getCaptainIdFinder = createSelector(\n [getCaptainIdsBySectionTeamNumber],\n captainIdsBySectionTeamNumber => {\n return (sectionId, teamNumber = null) => {\n if (teamNumber) {\n return safelyGet(captainIdsBySectionTeamNumber, [sectionId, teamNumber])\n } else {\n return null\n }\n }\n },\n)\n\nexport const getTeamMembersBySectionTeamNumber = createSelector(\n [getCaptainIdsBySectionTeamNumber, getTeamsByCaptainId],\n (captainIdsBySectionTeamNumber, teamsByCaptainId) => {\n const bySection = {}\n for (const sectionId in captainIdsBySectionTeamNumber) {\n bySection[sectionId] = {}\n for (const [teamNumber, captainId] of Object.entries(\n captainIdsBySectionTeamNumber[sectionId],\n )) {\n const team = teamsByCaptainId[captainId]\n // team = {N: .., S: ...}\n bySection[sectionId][teamNumber] = Object.entries(team)\n .sort(teamSeatSort)\n .map(e => e[1].full_name)\n }\n }\n return bySection\n },\n)\n\nexport const getSectionTeamMembersByTeamNumber = createSelector(\n getTeamMembersBySectionTeamNumber,\n (_state, sectionId) => sectionId,\n (teamMembersBySectionTeamNumber, sectionId) => {\n return teamMembersBySectionTeamNumber[sectionId]\n },\n)\n\n// For Team Games\nexport const getTeamsUnseated = createSelector([getSignups], signups => {\n const r = {\n unassignedTeamSignups: [],\n unassignedPairSignups: [],\n unassignedIndividualSignups: [],\n }\n const alreadyIncluded = []\n for (const signup of Object.values(signups)) {\n // Only include the captain of teams, or one partner of a partnership\n if (signup.status == 'playing' || signup.status == 'waiting') {\n if (signup.section_id == null && !alreadyIncluded.includes(signup.id)) {\n if (signup.captain_id) {\n if (signup.captain_id == signup.id) {\n r.unassignedTeamSignups.push(signup)\n alreadyIncluded.push(signup.captain_id)\n }\n } else if (signup.partner_id) {\n r.unassignedPairSignups.push(signup)\n alreadyIncluded.push(signup.id)\n alreadyIncluded.push(signup.partner_id)\n } else {\n r.unassignedIndividualSignups.push(signup)\n alreadyIncluded.push(signup.id)\n }\n }\n }\n }\n return r\n})\n\nexport const getSectionInferredPhantomPair = createSelector(\n [getPairsSectionSeatingStatus, getId],\n (pairsSectionSeatingStatus, sectionId) => {\n const sectionSeatingStatus = sectionId\n ? pairsSectionSeatingStatus[sectionId]\n : null\n\n if (sectionSeatingStatus && sectionSeatingStatus.emptySeats.length == 1) {\n let [t, d] = sectionSeatingStatus.emptySeats[0].split('-')\n return { table: parseInt(t), direction: d }\n } else {\n return null\n }\n },\n)\n\n// Those playing\n\nexport const getEventPlayers = createSelector(\n [getUsers, getMembers, getSignupsByStatus],\n (users, members, signupsByStatus) => {\n const players = []\n for (const signup of signupsByStatus.playing) {\n const member = members[signup.member_id]\n const user = users[member.user_id]\n players.push({\n signup,\n member,\n user,\n })\n }\n return players\n },\n)\n","import { createSelector } from 'reselect'\n\nimport { getScores, getTableSectionId } from './base_selectors'\nimport { getMovementModels } from './movement_selectors'\n\n// for the displayedSection\nexport const getTableProgress = createSelector(\n [getTableSectionId, getMovementModels, getScores],\n (tableSectionId, movementModels, scores) => {\n const tableProgress = {}\n\n const movement = movementModels[tableSectionId]\n for (const t of movement.tables) {\n tableProgress[t] = {}\n for (const r of movement.rounds) {\n tableProgress[t][r] = { boardsPlayed: [], complete: false }\n }\n }\n for (const score of Object.values(scores)) {\n if (score.section_id != tableSectionId) {\n continue\n }\n const { table, round, board } = score\n tableProgress[table][round].boardsPlayed.push(board)\n }\n for (const table of Object.keys(tableProgress)) {\n for (const round of Object.keys(tableProgress[table])) {\n tableProgress[table][round].complete =\n movement.isSitout(round, table) ||\n tableProgress[table][round].boardsPlayed.length ==\n movement.boardsPerRound\n }\n }\n return tableProgress\n },\n)\n\n// export const getTableScores = createSelector(\n// [getScores, getMovementModel],\n// (scores, movement) => {\n// const tableScores = {}\n// for (const table of movement.tables) {\n// tableScores[table] = {}\n// for (const round of movement.rounds) {\n// tableScores[table][round] = {}\n// for (const board of movement.boardsAtTable(round, table)) {\n// tableScores[table][round][board] = null\n// }\n// }\n// }\n// for (const score of Object.values(scores)) {\n// tableScores[score.table][score.round][score.board] = score\n// }\n// return tableScores\n// },\n// )\n","import { createSelector } from 'reselect'\n\nimport { labelSort } from 'helpers/utilities.js'\nimport { emailBlock, recipientOptionsSort } from 'helpers/messages'\nimport { getCurrentUserId } from 'redux/selectors/shared_selectors'\n\n// These MUST be in order as they rely on imports from those above\nimport {\n getEvent,\n getHelpers,\n getMembers,\n getSignups,\n getUsers,\n} from './base_selectors'\n\nimport {\n getGroup,\n getClub,\n getLocation,\n getSection,\n getSectionMovement,\n getSectionResults,\n getSectionAwards,\n} from './individual_selectors'\n\nimport {\n getPendingPartners,\n getGroupMembers,\n getFlaggedCount,\n getUnseatedPlayersCount,\n} from './filter_selectors'\n\nimport {\n getSortedSectionIds,\n getSignupsByStatus,\n getNotSignedUps,\n getSignupStatusByMemberId,\n getSignupsByMemberId,\n getTeamsByCaptainId,\n} from './indexed_selectors'\n\n// The remainder of these imports rely ONLY on imports from the\n// above imported selectors.\n\nimport {\n getBoardsByDealId,\n getSectionBoardSets,\n getAnyHandRecords,\n getHandRecords,\n getAllScoredBoards,\n getSectionScoredBoards,\n getBoardPreparationStatus,\n getCardsBySeatSuit,\n getDeal,\n} from './boards_selectors'\n\nimport {\n getMemberMps,\n getMpLevelByPairSignup,\n getMpLevelByCaptainId,\n getPairsUnseated,\n getPairsGameStratStats,\n getTeamGameStratStats,\n} from './masterpoint_selectors'\n\nimport { getDirectors, getNonDirectors } from './member_selectors'\n\nimport {\n getSectionMovementModel,\n getMovementModels,\n} from './movement_selectors'\n\nimport { getSectionSortedPlays } from './online_play_selectors'\nimport {\n getMovementsLoaded,\n getEventHasScores,\n getEventHasResults,\n getSectionScoreStatusChecker,\n getHasIneligibles,\n} from './overall_state_selectors'\n\nimport {\n getAllPairs,\n getPairNumberFinder,\n getSectionPairs,\n getUserBySeat,\n} from './pairs_selectors'\n\nimport {\n getScoreFinder,\n getBoardScoresBySection,\n getSectionBoardScores,\n getPairHasScoresFinder,\n getPairScoresFinder,\n getSectionPairBoards,\n getSectionPairProgress,\n getSectionFinishedPairs,\n getScoreCountsBySection,\n getSectionScoreCounts,\n getSectionScoresArray,\n getSectionScoringStats,\n getSectionScoringObstacles,\n getSectionPlayedBoards,\n getSectionProvisionalResults,\n getSectionTeamStandings,\n getSectionHasScores,\n} from './score_selectors'\n\nimport {\n getSignupsBySectionTeamAssignment,\n getTeamMembersBySectionTeamNumber,\n getSectionTeamMembersByTeamNumber,\n getSectionInferredPhantomPair,\n getEventPlayers,\n getCaptainIdFinder,\n getSignupIdFinder,\n getPairsSectionSeatingStatus,\n getTeamSectionSeatingStatus,\n getTeamsUnseated,\n} from './seating_selectors'\n\nimport { getTableProgress } from './table_selectors'\n\n// The remainder of these selectors rely on a combination of all\n// that was imported above.\n\nconst getRefreshingSections = createSelector(\n [getHelpers],\n helpers => helpers.refreshingSections,\n)\nconst getRefreshingSection = (state, sectionId) =>\n sectionId ? getRefreshingSections(state).includes(sectionId) : false\n\nconst getAllMemberOptions = createSelector(\n [\n getGroupMembers,\n getUsers,\n getSignupStatusByMemberId,\n getSignupsByMemberId,\n getPairNumberFinder,\n getPairHasScoresFinder,\n ],\n (\n members,\n users,\n statusByMemberId,\n signupsByMemberId,\n pairNumberFinder,\n pairHasScoresFinder,\n ) => {\n // Never permit choosing a member that has recorded scores.\n let opts = {\n playing: [],\n waiting: [],\n sub: [],\n cancelled: [],\n allowed: [],\n active: [],\n guest: [],\n }\n for (let member_id in members) {\n let hasScores\n let member = members[member_id]\n if (\n (member.status != 'inactive' && member.status != 'removed') ||\n statusByMemberId[member_id] == 'playing'\n ) {\n let signup = signupsByMemberId[member.id]\n if (signup && signup.table0) {\n let pairNumber = pairNumberFinder(\n signup.section_id,\n signup.table0,\n signup.seat0,\n )\n hasScores = pairHasScoresFinder(pairNumber, signup.section_id)\n }\n if (!hasScores) {\n opts[statusByMemberId[member_id]].push({\n value: member_id,\n label: users[member.user_id].full_name,\n className: `select-option-${statusByMemberId[member_id]}`,\n })\n }\n }\n }\n opts.playing.sort(labelSort)\n opts.waiting.sort(labelSort)\n opts.sub.sort(labelSort)\n opts.cancelled.sort(labelSort)\n opts.allowed.sort(labelSort)\n opts['active'].sort(labelSort)\n opts['guest'].sort(labelSort)\n return [\n {\n label: 'Waiting',\n status: 'waiting',\n options: opts['waiting'],\n },\n {\n label: 'Not signed up',\n status: 'active',\n options: opts['active'],\n },\n { label: 'Sub', status: 'sub', options: opts['sub'] },\n {\n label: 'Invited to private event',\n status: 'allowed',\n options: opts['allowed'],\n },\n {\n label: 'Cannot Play',\n status: 'cancelled',\n options: opts['cancelled'],\n },\n {\n label: 'Playing',\n status: 'playing',\n options: opts['playing'],\n },\n {\n label: 'Guests',\n status: 'guest',\n options: opts['guest'],\n },\n ]\n },\n)\n\nconst getRecipientOptions = createSelector(\n [getEvent, getSignupStatusByMemberId, getMembers, getUsers],\n (event, signupStatusByMemberId, members, users) => {\n const opts = []\n for (const member of Object.values(members)) {\n if (member.group_id != event.group_id) {\n continue\n }\n if (member.status == 'inactive' || member.status == 'removed') {\n continue\n }\n let signup_status = signupStatusByMemberId[member.id]\n const user = users[member.user_id]\n if (user.deceased) {\n continue\n }\n opts.push({\n label: user.full_name,\n value: `${user.id}`,\n email: user.email,\n grouping: signup_status,\n blocked: emailBlock(user, 'group', event.group_id),\n })\n }\n return opts.sort(recipientOptionsSort)\n },\n)\n\n// For the current user\nconst getCurrentMember = createSelector(\n [getCurrentUserId, getGroupMembers],\n (current_user_id, members) => {\n let current_member = { id: null }\n for (let member_id in members) {\n if (members[member_id].user_id == current_user_id) {\n current_member = members[member_id]\n break\n }\n }\n return current_member\n },\n)\n\nconst getCurrentSignup = createSelector(\n [getCurrentMember, getSignups],\n (current_member, signups) => {\n for (let signup_id in signups) {\n let signup = signups[signup_id]\n if (signup.member_id == current_member.id) {\n return signup\n }\n }\n return null\n },\n)\n\n// Navigation\n\nconst getIsAdmin = (_state, isAdmin) => isAdmin\n\nconst getDefaultPanes = createSelector(\n [\n getEvent,\n getUsers,\n getCurrentUserId,\n getCurrentSignup,\n getEventHasScores,\n getEventHasResults,\n getIsAdmin,\n ],\n (\n event,\n users,\n currentUserId,\n currentSignup,\n hasScores,\n hasResults,\n isAdmin,\n ) => {\n if (!event.loaded) {\n return { nav: {}, defaultPanes: {} }\n }\n\n // Set up calcs to determine which panes can be seen\n\n const current_user = users[currentUserId] // This is NOT the currentUser context!\n // If we don't have a current_user, this is the table login (not passed in the event data)\n const isTable = typeof current_user == 'undefined'\n const directing =\n !isTable && (event.directors.includes(currentUserId) || isAdmin)\n\n const directsOrManages =\n !isTable &&\n (directing || current_user.management.group_ids.includes(event.group_id))\n const lessonOnly =\n event.event_type == 'IndividualEvent' && event.pricing_tier == 'teach'\n\n const isNonplayingDirector =\n directing && (!currentSignup || currentSignup.status != 'playing')\n\n const isPlaying = currentSignup && currentSignup.status === 'playing'\n const showCheckinDefault =\n directing || (event.opts.start_checkin && isPlaying)\n\n const pairEvent = event.event_type == 'PairEvent'\n const teamEvent = event.event_type == 'TeamEvent'\n\n // Set default panes\n let tableDefaultPane, playerDefaultPane, managerDefaultPane\n\n switch (event.scoring_progress) {\n case 'not_started':\n if (isTable) {\n tableDefaultPane = 'table-waiting'\n break\n } else if (event.opts.start_checkin && showCheckinDefault) {\n playerDefaultPane = 'check-in-ns'\n } else if (hasScores) {\n playerDefaultPane = 'check-in-ns'\n } else {\n playerDefaultPane = 'signups-ns'\n }\n managerDefaultPane = pairEvent\n ? 'configure-pairs'\n : teamEvent\n ? 'configure-teams'\n : 'event-reminder-email'\n\n break\n case 'entry': {\n if (isTable) {\n tableDefaultPane = 'table-scoring'\n } else {\n playerDefaultPane = lessonOnly\n ? 'individual-lesson'\n : isNonplayingDirector\n ? teamEvent\n ? 'team-standings-entry'\n : 'progress'\n : isPlaying\n ? 'scoresheet'\n : 'event-about'\n\n managerDefaultPane = directing\n ? 'director'\n : pairEvent\n ? 'configure-pairs'\n : teamEvent\n ? 'configure-teams'\n : 'configure-individual'\n }\n break\n }\n case 'complete':\n if (pairEvent) {\n playerDefaultPane = hasResults\n ? event.award_type == 'acbl_masterpoint'\n ? 'acbl-stratified-pairs-results'\n : event.award_type == 'rsvp_charity'\n ? 'rsvp-charity-results'\n : 'results-pairs'\n : 'results-boards'\n tableDefaultPane = playerDefaultPane\n } else if (event.event_type == 'TeamEvent') {\n playerDefaultPane = 'team-standings-complete'\n tableDefaultPane = playerDefaultPane\n } else {\n playerDefaultPane = lessonOnly ? 'individual-lesson' : 'event-about'\n tableDefaultPane = playerDefaultPane\n }\n managerDefaultPane = 'director'\n break\n default:\n console.error('[RSVP]', 'Unknown scoring progress encountered.')\n }\n\n if (!isTable) {\n tableDefaultPane = null\n }\n if (!directsOrManages && !isAdmin) {\n managerDefaultPane = null\n }\n\n return JSON.stringify({\n 'event#table': tableDefaultPane,\n 'event#player': playerDefaultPane,\n 'event#manager': managerDefaultPane,\n })\n },\n)\n\nexport {\n getAllMemberOptions,\n getAllPairs,\n getAllScoredBoards,\n getAnyHandRecords,\n getBoardPreparationStatus,\n getBoardScoresBySection,\n getBoardsByDealId,\n getCaptainIdFinder,\n getCardsBySeatSuit,\n getClub,\n getCurrentMember,\n getCurrentSignup,\n getDeal,\n getDefaultPanes,\n getDirectors,\n getEventHasResults,\n getEventHasScores,\n getEventPlayers,\n getFlaggedCount,\n getGroup,\n getGroupMembers,\n getHandRecords,\n getHasIneligibles,\n getLocation,\n getMemberMps,\n getMovementModels,\n getMovementsLoaded,\n getMpLevelByCaptainId,\n getMpLevelByPairSignup,\n getNonDirectors,\n getNotSignedUps,\n getPairHasScoresFinder,\n getPairNumberFinder,\n getPairScoresFinder,\n getPairsGameStratStats,\n getPairsSectionSeatingStatus,\n getPairsUnseated,\n getPendingPartners,\n getRecipientOptions,\n getRefreshingSection,\n getScoreCountsBySection,\n getScoreFinder,\n getSection,\n getSectionAwards,\n getSectionBoardScores,\n getSectionBoardSets,\n getSectionFinishedPairs,\n getSectionHasScores,\n getSectionInferredPhantomPair,\n getSectionMovement,\n getSectionMovementModel,\n getSectionPairBoards,\n getSectionPairProgress,\n getSectionPairs,\n getSectionPlayedBoards,\n getSectionProvisionalResults,\n getSectionResults,\n getSectionScoreCounts,\n getSectionScoredBoards,\n getSectionScoresArray,\n getSectionScoreStatusChecker,\n getSectionScoringObstacles,\n getSectionScoringStats,\n getSectionSortedPlays,\n getSectionTeamMembersByTeamNumber,\n getSectionTeamStandings,\n getSignupIdFinder,\n getSignupsByMemberId,\n getSignupsBySectionTeamAssignment,\n getSignupsByStatus,\n getSignupStatusByMemberId,\n getSortedSectionIds,\n getTableProgress,\n getTeamGameStratStats,\n getTeamMembersBySectionTeamNumber,\n getTeamsByCaptainId,\n getTeamSectionSeatingStatus,\n getTeamsUnseated,\n getUnseatedPlayersCount,\n getUserBySeat,\n}\n","import { createSelector } from 'reselect'\nimport { fullNameSort, sectionSorter } from 'helpers/utilities'\n\nimport { getUsers, getSections, getSignups } from './base_selectors'\nimport { getGroupMembers } from './filter_selectors'\n\n// Elements indexed by an attribute\n\nexport const getSectionIds = createSelector([getSections], sections =>\n Object.values(sections).map(section => section.id),\n)\n\nexport const getSortedSectionIds = createSelector([getSections], sections => {\n return Object.values(sections)\n .sort(sectionSorter)\n .map(section => parseInt(section.id))\n})\n\nexport const getSignupsByStatus = createSelector(\n [getGroupMembers, getSignups, getUsers],\n (members, signups, users) => {\n let by_status = {\n playing: [],\n waiting: [],\n sub: [],\n cancelled: [],\n allowed: [],\n }\n for (let signup_id in signups) {\n let signup = signups[signup_id]\n let member = members[signup.member_id]\n let user = users[member.user_id]\n by_status[signup.status].push({ ...signup, full_name: user.full_name })\n }\n for (let status in by_status) {\n by_status[status].sort((a, b) => {\n if (a.action_ts < b.action_ts) {\n return -1\n } else if (a.action_ts == b.action_ts) {\n return 0\n } else {\n return 1\n }\n })\n }\n return by_status\n },\n)\n\nexport const getNotSignedUps = createSelector(\n [getGroupMembers, getSignups, getUsers],\n (members, signups, users) => {\n let signed_up_member_ids = []\n for (let signup_id in signups) {\n let signup = signups[signup_id]\n signed_up_member_ids.push(signup.member_id)\n }\n let active = []\n let guest = []\n for (let member_id in members) {\n let member = { ...members[member_id] }\n member.full_name = users[member.user_id].full_name\n if (member.status != 'inactive' && member.status != 'removed') {\n if (!signed_up_member_ids.includes(parseInt(member_id))) {\n if (member.status == 'guest') {\n guest.push(member)\n } else {\n active.push(member)\n }\n }\n }\n }\n guest.sort(fullNameSort)\n active.sort(fullNameSort)\n return { active, guest }\n },\n)\n\nexport const getSignupsByMemberId = createSelector([getSignups], signups => {\n let sbmi = Object.values(signups).reduce((map, signup) => {\n map[signup.member_id] = signup\n return map\n }, {})\n return sbmi\n})\n\nexport const getSignupStatusByMemberId = createSelector(\n [getGroupMembers, getSignups],\n (members, signups) => {\n let sbpi = Object.keys(members).reduce((map, member_id) => {\n // Set all members to their member status; this will be overwritten\n // by their actual signup status in the next loop\n if (members[member_id].status == 'permanent') {\n // Permanents will always start with a signup, so they won't be\n // not signed up, unless the signup got erased. Treat them\n // as if active\n map[member_id] = 'active'\n } else {\n map[member_id] = members[member_id].status\n }\n return map\n }, {})\n for (let signup_id in signups) {\n let signup = signups[signup_id]\n sbpi[signup.member_id] = signup.status\n }\n return sbpi\n },\n)\n\nexport const getTeamsByCaptainId = createSelector([getSignups], signups => {\n let teams = {}\n for (let signup_id in signups) {\n let signup = signups[signup_id]\n if (signup.captain_id) {\n if (!teams[signup.captain_id]) {\n teams[signup.captain_id] = {}\n }\n teams[signup.captain_id][signup.seat0] = {\n member_id: signup.member_id,\n signup_id: signup.id,\n full_name: signup.full_name,\n mp_eligible: signup.mp_eligible,\n team_number: signup.table0,\n section_id: signup.section_id,\n }\n }\n }\n return teams\n})\n","// Selectors for individual elements\n// They do not need to be memoized with create_selector\n\n// Note that sectionMovements are indexed by sectionId, not id\n\nexport const getSection = (state, sId) => (sId ? state.sections[sId] : null)\n\nexport const getSectionMovement = (state, sId) =>\n sId ? state.section_movements[sId] : null\n\nexport const getSectionResults = (state, sectionId) =>\n sectionId ? state.results[sectionId] : null\n\nexport const getSectionAwards = (state, sectionId) =>\n sectionId ? state.awards[sectionId] : null\n\nexport const getGroup = state =>\n state.event.loaded ? state.groups[state.event.group_id] : null\n\nexport const getClub = state =>\n state.event.loaded\n ? state.clubs[state.groups[state.event.group_id].club_id]\n : null\n\nexport const getLocation = state =>\n state.event.loaded ? state.locations[state.event.location_id] : null\n","import { createSelector } from 'reselect'\nimport { computeStrat } from 'helpers/utilities'\n\nimport {\n getMembers,\n getUsers,\n getSignups,\n getHelpers,\n getSections,\n getEvent,\n getResults,\n} from './base_selectors'\nimport { getTeamsByCaptainId } from './indexed_selectors'\n\n// Masterpoints\nconst getStrata = createSelector([getHelpers], helpers => {\n return { stratify_by: helpers.stratify_by, strats: helpers.strats }\n})\n\nexport const getMemberMps = createSelector(\n [getMembers, getUsers, getEvent, getResults],\n (members, users, event, results) => {\n let memberMps = {}\n let recordedValues = {}\n if (event.scoring_progress == 'complete' && results) {\n for (let sectionResult of Object.values(results)) {\n // flatten over pair/team number\n let playerValues = Object.values(sectionResult.players)\n let players\n // team players is an object, pair players is an array\n if (event.event_type == 'PairEvent') {\n players = playerValues.flat()\n } else {\n players = playerValues.map(p => Object.values(p)).flat()\n }\n\n for (let player of players) {\n recordedValues[player.member_id] = {\n mp_holding: player.mp_holding,\n estimated_mp_holding: player.estimated_mp_holding,\n life_master: player.life_master,\n }\n }\n }\n }\n for (let memberId in members) {\n let user_mp, estimated_mp, member, user, computed, lm\n if (recordedValues[memberId]) {\n user_mp = recordedValues[memberId].mp_holding\n estimated_mp = recordedValues[memberId].estimated_mp_holding\n lm = recordedValues[memberId].life_master\n } else {\n member = members[memberId]\n user = users[member.user_id]\n user_mp = user.mp_holding ? parseFloat(user.mp_holding) : 0.0\n lm = user.life_master\n estimated_mp = member.estimated_mp_holding\n ? parseFloat(member.estimated_mp_holding)\n : 0.0\n }\n computed = Math.max(user_mp, estimated_mp)\n memberMps[memberId] = { user_mp, estimated_mp, computed, lm }\n }\n return memberMps\n },\n)\n\nexport const getMpLevelByPairSignup = createSelector(\n [getSignups, getMemberMps, getStrata],\n (signups, memberMps, strata) => {\n // for all playing signups, computes the mpLevel for the pair\n const { stratify_by, strats } = strata\n let lookup = {}\n for (let signupId in signups) {\n let signup = signups[signupId]\n if (signup.partner_id == null) {\n continue\n }\n let partner = signups[signup.partner_id]\n if (partner && lookup[partner.id]) {\n continue\n }\n let mp1 = memberMps[signup.member_id].computed\n let mp2 =\n partner && memberMps[partner.member_id]\n ? memberMps[partner.member_id].computed\n : 0.0\n let mpLevel =\n stratify_by == 'highest'\n ? parseFloat(Math.max(mp1, mp2).toFixed(2))\n : parseFloat(((mp1 + mp2) / 2.0).toFixed(2))\n let strat = computeStrat(mpLevel, strats)\n lookup[signup.id] = { mpLevel, strat }\n if (partner) {\n lookup[partner.id] = lookup[signup.id]\n }\n }\n return lookup\n },\n)\n\nexport const getMpLevelByCaptainId = createSelector(\n [getTeamsByCaptainId, getMemberMps, getStrata],\n (teams, memberMps, strata) => {\n // for each captain Id, computes the mpLevel for the team\n const { stratify_by, strats } = strata\n\n let lookup = {}\n for (let captainId in teams) {\n let mps = []\n for (let seat in teams[captainId]) {\n let member = teams[captainId][seat]\n if (member) {\n mps.push(memberMps[member.member_id].computed)\n }\n }\n let mpLevel\n if (stratify_by == 'highest') {\n mpLevel = parseFloat(Math.max(...mps))\n } else {\n if (mps.length == 0) {\n mpLevel = 0.0\n } else {\n mpLevel = parseFloat(\n (mps.reduce((a, b) => a + b, 0) / mps.length).toFixed(2),\n )\n }\n }\n let strat = computeStrat(mpLevel, strats)\n lookup[captainId] = { mpLevel: mpLevel, strat }\n }\n return lookup\n },\n)\n\n// For Pairs games\nexport const getPairsUnseated = createSelector(\n [getSignups, getMpLevelByPairSignup],\n (signups, mpLevelByPair) => {\n const r = {\n unassignedSignups: [],\n }\n const alreadyIncluded = []\n for (const signup of Object.values(signups)) {\n if (signup.status == 'playing') {\n if (signup.table0 == null && !alreadyIncluded.includes(signup.id)) {\n r.unassignedSignups.push(signup)\n alreadyIncluded.push(signup.id)\n alreadyIncluded.push(signup.partner_id)\n }\n }\n }\n r.unassignedSignups.sort((a, b) => {\n const aLevel = mpLevelByPair[a.id] ? mpLevelByPair[a.id].mpLevel : 0.0\n const bLevel = mpLevelByPair[b.id] ? mpLevelByPair[b.id].mpLevel : 0.0\n return aLevel < bLevel ? 1 : aLevel > bLevel ? -1 : 0\n })\n return r\n },\n)\n\nexport const getPairsGameStratStats = createSelector(\n [getSignups, getSections, getMpLevelByPairSignup, getStrata],\n (signups, sections, mpLevelByPair, strata) => {\n const { strats } = strata\n const stratStats = {}\n const sectionIds = Object.keys(sections)\n const bySection = { unseated: {} }\n for (let sectionId of sectionIds) {\n bySection[sectionId] = {}\n }\n for (const strat of Object.values(strats)) {\n stratStats[strat.label] = { natural: [], overrides: [] }\n for (let sectionId of sectionIds) {\n bySection[sectionId][strat.label] = 0\n stratStats[strat.label][sectionId] = 0\n }\n bySection.unseated[strat.label] = 0\n }\n const processedSignupIds = []\n for (const signup of Object.values(signups)) {\n if (processedSignupIds.includes(signup.id)) {\n continue\n }\n if (!signup.partner_id) {\n continue\n }\n const hasOverride = !!signup.strat_override\n const mpLevel = mpLevelByPair[signup.id]\n ? mpLevelByPair[signup.id].mpLevel\n : 0\n const stratByPoints = computeStrat(mpLevel, strats)\n const strat = signup.strat_override || stratByPoints\n\n if (strat != 'invalid') {\n if (hasOverride) {\n stratStats[strat].overrides.push(mpLevel)\n } else {\n stratStats[strat].natural.push(mpLevel)\n }\n if (signup.section_id) {\n stratStats[strat][signup.section_id] += 1\n bySection[signup.section_id][strat] += 1\n } else {\n bySection.unseated[strat] += 1\n }\n }\n processedSignupIds.push(signup.id)\n processedSignupIds.push(signup.partner_id)\n }\n for (const s in stratStats) {\n stratStats[s].natural.sort((a, b) => b - a)\n stratStats[s].overrides.sort((a, b) => b - a)\n }\n return { stratStats, bySection }\n },\n)\n\nexport const getTeamGameStratStats = createSelector(\n [getSignups, getSections, getMpLevelByCaptainId, getStrata],\n (signups, sections, mpLevelByTeam, strata) => {\n const { strats } = strata\n const stratStats = {}\n\n const sectionIds = Object.keys(sections)\n const bySection = { unseatedTeams: {} }\n for (let sectionId of sectionIds) {\n bySection[sectionId] = {}\n }\n for (const strat of Object.values(strats)) {\n stratStats[strat.label] = { natural: [], overrides: [] }\n for (let sectionId of sectionIds) {\n bySection[sectionId][strat.label] = 0\n }\n bySection.unseatedTeams[strat.label] = 0\n }\n\n for (const signup of Object.values(signups)) {\n if (signup.id != signup.captain_id) {\n continue\n }\n const hasOverride =\n !!signup.strat_override && signup.strat_override != 'X'\n const mpLevel = mpLevelByTeam[signup.id]\n ? mpLevelByTeam[signup.id].mpLevel\n : 0\n const stratByPoints = computeStrat(mpLevel, strats)\n const strat = hasOverride ? signup.strat_override : stratByPoints\n\n if (strat != 'invalid') {\n if (hasOverride) {\n stratStats[strat].overrides.push(mpLevel)\n } else {\n stratStats[strat].natural.push(mpLevel)\n }\n if (signup.section_id) {\n bySection[signup.section_id][strat] += 1\n } else {\n if (signup.captain_id) {\n bySection.unseatedTeams[strat] += 1\n }\n }\n }\n }\n for (let s in stratStats) {\n stratStats[s].natural.sort((a, b) => b - a)\n stratStats[s].overrides.sort((a, b) => b - a)\n }\n return { stratStats, bySection }\n },\n)\n","import { createSelector } from 'reselect'\n// import { arrayUnique } from 'helpers/utilities'\n\nconst getSections = state => state.sections\nconst getMembers = state => state.members\nconst getUsers = state => state.users\nconst getGroups = state => state.groups\nconst getClubs = state => state.clubs\nconst getHelpers = state => state.helpers\nconst getSignups = state => state.signups\nconst getAccounts = state => state.accounts\nconst getLocations = state => state.locations\nconst getId = (_state, id) => id\n\nconst sectionLetterSort = (A, B) => {\n const a = A.letter\n const b = B.letter\n return a < b ? -1 : a > b ? 1 : 0\n}\n\nexport const getCurrentUserId = createSelector([getHelpers], helpers => {\n return helpers.current_user_id\n})\n\nexport const getUser = createSelector(\n [getUsers, getId],\n (users, userId) => users[userId],\n)\n\nexport const getSignup = createSelector(\n [getSignups, getId],\n (signups, signupId) => signups[signupId],\n)\n\nexport const getEventSectionsArray = createSelector(\n [getSections, getId],\n (sections, eventId) => {\n return Object.values(sections)\n .filter(s => s.event_id == eventId)\n .sort(sectionLetterSort)\n },\n)\n\nexport const getMember = createSelector(\n [getMembers, getId],\n (members, memberId) => members[memberId],\n)\n\nexport const getAccount = createSelector(\n [getAccounts, getId],\n (accounts, accountId) => accounts[accountId],\n)\n\nexport const getGroup = createSelector([getGroups, getId], (groups, groupId) =>\n groupId ? groups[groupId] : null,\n)\n\nexport const getLocation = createSelector(\n [getLocations, getId],\n (locations, locationId) => locations[locationId],\n)\n\nexport const getClub = createSelector([getClubs, getId], (clubs, clubId) =>\n clubId ? clubs[clubId] : null,\n)\n\nexport const getGroupManagersByGroup = createSelector(\n [getMembers, getUsers],\n (members, users) => {\n let managers = {}\n for (let member_id in members) {\n let member = members[member_id]\n if (member.manager) {\n if (!managers[member.group_id]) {\n managers[member.group_id] = []\n }\n managers[member.group_id].push({\n value: member.user_id,\n label: users[member.user_id].full_name,\n email: users[member.user_id].email,\n notifications: member.manager_notifications,\n member_id: member.id,\n })\n }\n }\n return managers\n },\n)\n\nexport const getCurrentUserActiveClubsGroups = createSelector(\n [getCurrentUserId, getUsers, getGroups, getClubs],\n (currentUserId, users, groups, clubs) => {\n const user = users[currentUserId]\n if (!user) {\n return []\n }\n const groupIds = Object.keys(groups).filter(\n group_id =>\n !groups[group_id].hidden &&\n !groups[group_id].inactive &&\n user.membership.participating_visible_group_ids.includes(\n parseInt(group_id),\n ),\n )\n const sortedClubGroups = Object.keys(clubs)\n .filter(club_id => user.membership.club_ids.includes(parseInt(club_id)))\n .sort((a_id, b_id) => {\n let a_club = clubs[a_id]\n let b_club = clubs[b_id]\n return a_club.title > b_club.title\n ? 1\n : a_club.title < b_club.title\n ? -1\n : 0\n })\n .map(club_id => {\n const club = clubs[club_id]\n const clubGroups = groupIds\n .filter(\n group_id =>\n groups[group_id].club_id == club.id &&\n !groups[group_id].inactive &&\n !groups[group_id].hidden,\n )\n .sort((a_id, b_id) => {\n let a_group = groups[a_id]\n let b_group = groups[b_id]\n return a_group.title > b_group.title\n ? 1\n : a_group.title < b_group.title\n ? -1\n : 0\n })\n .map(group_id => groups[group_id])\n return { club, groups: clubGroups }\n })\n .filter(cg => cg.groups.length > 0)\n\n return sortedClubGroups\n },\n)\n\nexport const getCurrentUserActiveCourses = createSelector(\n [getCurrentUserActiveClubsGroups],\n clubsGroups => {\n const activeCourses = []\n clubsGroups.forEach(({ groups }) => {\n activeCourses.push(...groups.filter(g => g.is_course))\n })\n return activeCourses\n },\n)\n\nexport const getHasCourses = createSelector(\n [getCurrentUserActiveCourses],\n activeCourses => {\n return activeCourses.length > 0\n },\n)\n\nexport const getMembersByGroup = createSelector([getMembers], members => {\n const byGroup = {}\n for (const member of Object.values(members)) {\n if (!byGroup[member.group_id]) {\n byGroup[member.group_id] = {}\n }\n byGroup[member.group_id][member.id] = member\n }\n return byGroup\n})\n\nexport const getMemberStatusCountsByGroup = createSelector(\n [getMembersByGroup],\n membersByGroup => {\n const byStatus = {}\n for (const groupId of Object.keys(membersByGroup)) {\n byStatus[groupId] = {\n permanent: 0,\n active: 0,\n guest: 0,\n inactive: 0,\n removed: 0,\n }\n for (const member of Object.values(membersByGroup[groupId])) {\n byStatus[groupId][member.status] += 1\n }\n }\n return byStatus\n },\n)\n\nexport const getUsersByDiscordId = createSelector([getUsers], users => {\n const usersByDiscordId = {}\n for (const user of Object.values(users)) {\n if (user.discord_user_id) {\n usersByDiscordId[user.discord_user_id] = user\n }\n }\n return usersByDiscordId\n})\n"],"names":["apiAccountChangeAutoPurchase","accountId","value","controls","patch","creditable_type","creditable_id","apiSetUserAutoPurchase","id","apiGetCreditAudit","get","apiGetCreditReport","requestedYear","apiAccountCreditReport","apiEventFeesReconciliation","apiAdminCredit","credits","reason","to_from","post","apiAdminDebit","apiPurchaseCredits","paymentData","apiPurchaseCreditsWithSavedCard","apiGetCreditsLog","creditableType","creditableId","page","apiGetUserEventCredits","user_id","event_id","apiReverseEventCredit","credit_id","getMeta","metaName","metas","document","getElementsByTagName","i","length","getAttribute","csrf","handleFetchResponseErrors","response","ok","status","Error","statusText","window","location","href","catchFetchErrors","ex","msg","name","lower","message","toLowerCase","includes","toast","error","autoClose","console","request","actionText","url","baseAttr","isFileUpload","attr","credentials","headers","Accepts","signal","loading","skipFinally","fetch","then","json","errorMsg","redirect","setTimeout","success_message","success","successMsg","successDispatch","dispatch","action","successClose","catch","finally","method","data","body","JSON","stringify","uploadFile","destroy","login","user","reportError","reportSuccess","error_message","logout","localStorage","clear","sessionStorage","cookie","returnToTableLogin","apiRefreshUser","apiLoadUserEvents","year","month","apiLoadUserResults","apiLoadMessages","apiLoadClubData","apiLoadCourseData","apiLoadUsers","apiLoadUser","apiUpdateUserProfile","apiUpdateUserPassword","apiAssignAcblNumber","acbl_number","apiUserProfileReviewed","apiPrivacyChange","field","apiSetEmailPreference","preference_type","preference_id","notify","apiUpdateAllMasterpoints","apiDeleteUser","apiMergeUser","sourceUserId","targetUserId","apiSetPreference","key","apiSetAutoPay","checked","apiGetDiscordServerOptions","apiGetSpamBlocks","apiGetEmailBounces","apiRemoveSpamBlock","userId","apiRemoveEmailBounce","apiBounceAudit","do_it","apiComplaintAudit","apiResendWelcomeUserEmail","apiChangeUserStationaryPreference","pref","event_source","user_source","apiConnectDiscordUser","discord_name","discord_user_id","apiLoadDuplicateNames","apiLoadDuplicateEmails","apiLoadInvalidAcblNumbers","apiGetUsersSummary","BouncingDots","props","React","Object","assign","xmlns","width","height","viewBox","cx","cy","r","fill","attributeName","begin","calcMode","dur","keySplines","values","defaultProps","color","HiddenIcon","Icon","icon","negative","small","cls","getIconClassname","classes","tag","clickable","onClick","bg","danger","ColorConstants","text","warning","info","positive","neutral","transparent","redSuit","blackSuit","inverted","white","IconContainer","className","$clickable","$color","$bg","$weight","weight","$spaceBefore","spaceBefore","$spaceAfter","spaceAfter","$small","$verySmall","verySmall","$big","big","styled","span","withConfig","displayName","componentId","p","iconClassName","StyledOpenCloseIcon","$padRight","$open","$reverse","$navSelector","$configureSelector","$bordered","OpenCloseIcon","open","padRight","reverse","navSelector","configureSelector","bordered","rest","VisibleIcon","VisibleOrHiddenIcon","show","visible","preferred","AccountRbucksBalance","account","HelpText","Fee","fee","credit_balance","pending_player_fees","AwardPigmentStyle","$horizontal","horizontal","$first","first","$last","last","$only","only","children","div","Badge","BadgeContainer","allowed","iconOnly","Button","bsSize","bsStyle","Bid","score","contract_qty","Suit","suit","contract_suit","doubled","redoubled","vulClass","b","vulnerability","replace","Board","absBoardNumber","board","size","disabled","dealer","BoardNumber","sectionId","BoardSet","setNumber","parseInt","BoardSelectorContainer","instruction","$multi","BoardButton","$disabled","$selected","medBlue","BoardSelector","memoryKey","boards","nextPrevOnly","skipAll","selectedBoard","setSelectedBoard","usePaneState","firstBoard","lastBoard","isMulti","boardDisplay","bs","Math","floor","$nextPrevOnly","prevBoard","indexOf","map","nextBoard","boardSets","useSelector","state","getSectionBoardSets","label","getLabelFromValue","BOARD_COLOR_OPTIONS","BoardSetDisplay","options","tint","BoardSetContainer","boardNumber","style","backgroundColor","MonthsContainer","Month","$canChoose","SelectMonth","setYearMonth","earliest","latest","close","canChoose","m","SHORT_MONTHS","select","YearsContainer","Year","SelectYear","startYear","endYear","Date","getFullYear","range","rangeMtoN","y","CalendarSelector","setDay","dayHighlight","highlightCell","dayDisabled","responsive","weeks","setWeeks","showRowsResponsive","setShowRowsResponsive","selectingMonth","setSelectingMonth","selectingYear","setSelectingYear","canGoForward","canGoBack","weekday","updatedWeeks","date","week","day","getDate","getDay","push","setDate","getMonth","cellHighlight","d","CalendarBox","Direction","$back","dateBack","Calendar","YearMoHeader","SmallScreenOnly","toggleRows","t","toggleSelectingMonth","MONTH","toggleSelectingYear","CalendarRows","$hidden","w","Week","Cell","$highlight","Day","dateForward","$fontWeight","$boxShadow","tableTitle","fontWeight","card","rank","smaller","highlighted","led","suitColor","Rank","Checked","toggle","display","ClubAlert","club","dismiss","alert","isLong","content","setContent","expanded","toggleExpanded","useToggle","substring","AlertContainer","$severity","alert_severity","AlertContent","AlertArea","$area","logo_url","ClubLogo","AlertClub","title","Faded","$fade","ParsedHtml","dismissClub","ClubLinkContainer","a","clubTitle","ClubLink","currentUser","useCurrentUserState","remember","usePaneMemory","club_title","clubId","club_id","goThere","setStoredValue","centered","maxWidth","LogoImg","src","alt","$centered","$maxWidth","img","ClubTitle","ClubTitleContainer","clicked","setClicked","confirm","onConfirm","cancel","onCancel","processing","Spinner","ButtonToolbar","confirmButton","cancelButton","closed","Contract","inline","recorded","artificially_scored","avg_ns","assign_ns_score","avg_ew","assign_ew_score","assign_ns_mp","assign_ew_mp","artificialScore","passed","not_played","Seat","seat","contract_by","ns_score","ScoreResult","offWord","onWord","ControlToggleContainer","$left","left","$extended","extended","clickToggle","clickAction","testId","SwitchBar","$on","SwitchDot","SwitchTextOff","SwitchTextOn","SwitchText","default","group","is_course","CourseIndicatorStyle","DateBox","flexed","tz","timeZone","jsDate","toLocaleString","DateBoxContainer","$flexed","DateMonth","DateYear","DateDay","DateWDay","dateTime","onChange","passedProps","zonelessDate","setZonelessDate","convertToTimeZone","zone","formatToTimeZone","DatePickerContainer","DatePicker","selected","v","convertToLocalTime","Zone","timeZoneToggle","eventType","setEventType","ButtonGroup","disallowIndividual","setIndividual","setPair","setTeam","n","parseFloat","withPrecision","asCredits","asRoundableCredits","FeeContainer","$noPrint","noPrint","$strike","strike","$inColor","inColor","Rbuck","FeeWithOverride","adjustedFee","Friendly","$noSpace","FriendlyText","noSpace","GroupLinkContainer","groupTitle","$inactive","GroupLink","group_title","groupId","group_id","inactive","suits","suit_offset","S","H","D","C","rank_offset","A","K","Q","J","T","high_card_points","handSuitCards","pos","suitCards","hand","renderSeat","position","incomplete","split","pts","index","substr","hcp","BSOLhand","join","showBridgeSolver","BridgeSolverLink","vuln","north","south","east","west","target","rel","variant","strong","tight","indented","borderBottom","shaded","HighlightPairMessage","InactiveIndicatorStyle","IIContainer","IneligibleIndicator","ineligible","ManagerNotifications","member","manager","manager_notifications","tasks","MANAGER_NOTIFICATIONS","$fontSize","user_mp","estimated_mp","computed","lm","memberMps","commaize","RankContainer","$block","ArrowContainer","$giant","NavigateToEvent","event","giant","e","stopPropagation","navigateFunction","altIcon","parse","PaymentRecorded","forText","hasRecordedPayment","payer","has_recorded_payment","paymentType","payment_type","withPaymentIcon","paymentIcon","withText","paymentText","isCourse","PreferredMovementNotation","Preferred","digits","phone","toUpperCase","awards","count","award","AwardPigment","amount","currentValue","subtract","add","disableSubtract","disableAdd","PricingTier","tier","Label","pricingTierText","pricingTier","setPricingTier","findable","block","RecentEventsContainer","ListTitle","RecentEvent","RecentEventsList","recentEvents","more","showRecent","setShowRecent","toggleRecent","s","Collapse","in","re","isAdmin","ScoreMadeDelta","made_delta","Result","ScoringProgress","scoringProgress","hasScores","filled","sp","ScoringProgressColors","showLabel","toTitleCase","ScoringProgressDisplay","$filled","transparentize","slams","type","SBN","SmallBSG","bsg","after","set","LETTERS","SPN","SmallPairNumber","pairNumber","nsStationary","dir","abs","Spin","SpinningAnimation","keyframes","Combined","Time","opt","TIME_OPTIONS","time","propTypes","PropTypes","isRequired","starts","ends","startOnly","startOpts","hour","minute","endOpts","withDates","showZone","forceZone","Intl","DateTimeFormat","resolvedOptions","timeZoneName","code","CodeContainer","currentYear","trackCurrentUserSubscription","getDebugOptions","PREFERENCE_KEY","confirm_cards","confirm_bids","ma_suits_by_contract","CurrentUserStateContext","CurrentUserDispatchContext","CurrentUserSubscribe","currentUserDispatch","updateUserMemberStore","abortController","AbortController","currentUserChannel","subscribeToCurrentUserChannel","App","cable","subscriptions","create","channel","current_user_id","connected","disconnected","received","actionTypes","updateCreditBalance","payload","update","current_user","unsubscribe","abort","initialState","firstName","first_name","lastName","last_name","email","isTable","is_table","admin","managedGroupIds","groups_managed","managedClubIds","clubs_managed","ownedClubIds","clubs_owned","isGroupManager","isClubManager","isClubOwner","isDemo","is_demo","managesAcblGroup","manages_acbl_group","time_zone","zip","acblActive","acbl_active","fullName","isNotTable","tableEntry","table_details","relinquishable","emailProvider","pop","confirmBids","preferences","confirmCards","memoryAidsSuitsByContract","savedCard","saved_card","autoPay","auto_pay","autoPurchase","auto_purchase","defaultManagedGroup","default_managed_group","defaultManagedClub","default_managed_club","creditBalance","stripePublicKey","stripe_public_key","isSomeKindOfManager","updateDefaultManagedGroup","currentUserReducer","newState","filter","g","otherThanGroupId","CurrentUserProvider","Provider","context","undefined","managesGroupId","canManageGroupId","managesClubId","ownsClubId","controlsGroup","controlsClubId","isDirector","directors","canDirect","hasId","managesGroup","eventPermissions","epAdmin","epManage","epDirect","epTable","managesClub","canManageClubId","ownsClub","canControlGroup","controlsClub","canControlClub","canControlClubId","directsOrManages","canSeeMessageRecipients","sender_id","canManageUser","managed_by_current_user","canEditUser","is_some_kind_of_manager","controlled_by_current_user","creator_id","current_sign_in_at","useCurrentUserDispatch","setDefaultManagedGroup","setDefaultManagedClub","default_managed_club_id","setPreference","callback","setAutoPay","setAutoPurchase","storageKey","cuId","setItem","retrieveStoredValue","getItem","removeActivePaneKeys","keys","forEach","removeItem","PaneMemoryContext","forget","isStorage","startsWith","storageSet","sKey","storageGet","storageRemove","paneMemoryReducer","keyMatch","newValue","sMemoryKey","mk","PaneMemoryProvider","recall","defaultValue","storedValue","initialize","clearPaneMemory","recalled","intialValue","rememberThis","delta","abs_delta","imps","Movement","constructor","mvmt","this","ns_stationary","board_sets_are_identical","structure","rounds","lastRound","lastTable","tables","pairs","stationaries","board_set_groups","copyStructure","boardGroupCount","board_group_count","boardSetCount","board_set_count","boardsPerRound","boards_per_round","phantomPair","phantom_pair_number","computeMovement","inferred_phantom_pair","newPhantom","pairNumberFromOriginalTableDirection","table","direction","changePhantomPair","_getRounds","_getTables","max","_getPairs","_getStationaries","_getBoardSetGroups","boardGroupsInUse","boardGroups","Array","from","x","boardSetMax","boardGroupSets","flat","sortedIntegers","reduce","round","contest","ns_pair","ew_pair","nsPairs","pairTables","pair","boardSetGroups","board_set","board_group","boardSetGroup","allBoards","all","boardsInSetGroup","arrayUnique","boardGroupLetter","none","boardSet","_boardGroup","boardSetGroupFromBoard","boardNumbersDisplay","boardGroup","numbers","boardNumbersInGroup","boardFromSetAndNumber","boardPlayedInRoundBy","players","boardPlays","_boardSet","boardGroupPlays","boardRangeAtTable","boardsAtTable","sort","boardRangeInSet","boardNumbersUsedInSet","hasRoundTable","isNotSitout","boardsAtTableInPlayOrder","isSitout","boardCount","sharing","sharingBoardsWith","isRobin","isNotRobin","groupedBoards","sharingCount","perShift","boardsInEachGroup","remainder","boardsCopy","splice","numShifts","shift","playCount","used","boardSetsInUse","boardSetGroupsInUse","boardMaxInSet","boardSetAtTable","boardSetUsedInRounds","checkPreparedBoardSets","usePreparedBoards","errors","setErrors","ready","numberBoardSets","firstDeal","deal_id","existing","boardsInSet","needed","combinedPairs","excludePhantom","ewPairs","comboExists","searchRound","searchTable","searchPair","searchBoard","searchBoardSet","searchBoardGroup","ewPairAt","ewPairFor","isLastRound","isStationary","matchingScores","matching","nsPairFor","nsPairAt","originalTableDirectionFromPairNumber","pairHasArrowSwitch","satNs","satEw","pairNumberFromPairAssignment","assignment","pairNumberFromSignup","signup","table0","seat0","pairPlaysBoardAt","pairsAt","playerMovement","pm","sitting","against","playingBoards","playingBoardSetGroup","playingWith","thisPair","whereIsPair","robins","otherSide","atTables","whereIsBoardSetGroup","account_requests","LOAD_ACCOUNTS","account_request","ADD_OR_UPDATE_ACCOUNT_REQUEST","APPROVE_DENY_ACCOUNT_REQUEST","DELETE_ACCOUNT_REQUEST","accounts","LOAD_ACCOUNT","LOAD_INVOICES","LOAD_USERS","newAccounts","UPDATE_ACCOUNT","RECORD_PAYOUT","REMOVE_PAYOUT","LOAD_PAYOUTS","REMOVE_INVOICE","DELETE_ACCOUNT","UPDATE_USER","owner_id","owner_name","full_name","owner_email","LOAD_EVENT","pair_section_id","team_section_id","section_id","UPDATE_SECTION","hasOwnProperty","section_awards","section","board_sets","REPLACE_BOARD_DATA","UPDATE_BOARD_DATA","UPDATE_SECTIONS","sections","destroyed","new_state","charges","clubs","LOAD_USER","LOAD_MOVEMENTS","LOAD_PENDING_MEMBERS","LOAD_USER_HOME_PAGE","AUGMENT_GROUP_EVENTS","new_clubs","ADD_CLUB","UPDATE_CLUB","UPDATE_MANAGED_CLUB","UPDATE_MANAGED_GROUP","DELETE_CLUB","deals","deal","loaded","UPDATE_EVENT","UPDATE_SIGNUP","UPDATE_SIGNUP_SEATING","events","LOAD_USER_EVENTS","newEvents","ADD_EVENT","UPDATE_USER_EVENT","signup_list","DELETE_EVENT","eventId","LOAD_MORE_SCORED_EVENTS","new_events","table_count","updated_event","group_events","LOAD_MORE_PAST_EVENTS","UPDATE_GROUP_EVENT","group_event","REMOVE_GROUP_EVENTS","CLEAR_GROUP_DATA","groups","UPDATE_GROUPS","new_groups","UPDATE_GROUP","UPDATE_DISCORD_MEMBERS","UPDATE_PENDING_MEMBER","REMOVE_GROUP","UPDATE_GROUP_ORDER","groupOrder","sort_order","help_articles","LOAD_HELP_ARTICLE","help_article","selector","LOAD_ARTICLES","ADD_OR_UPDATE_HELP_ARTICLE","DELETE_HELP_ARTICLE","help_panes","LOAD_HELP_PANE","help_pane","LOAD_PANES","ADD_OR_UPDATE_HELP_PANE","DELETE_HELP_PANE","help_tags","LOAD_HELP_VIDEO","related","help_terms","help_term","LOAD_TERMS","ADD_OR_UPDATE_HELP_TERM","DELETE_HELP_TERM","help_videos","help_video","LOAD_VIDEOS","ADD_OR_UPDATE_HELP_VIDEO","DELETE_HELP_VIDEO","helpers","displayed_user_id","masterpoint_update_date","refreshingEvent","refreshingSections","send_signup_emails","all_group_club_options","stratify_by","strats","upper","ADD_HELPER","helper","REFRESH_EVENT_ON","REFRESH_EVENT_OFF","REFRESH_SECTION_ON","REFRESH_SECTION_OFF","help_panes_loaded","help_articles_loaded","help_videos_loaded","help_terms_loaded","invites","ADD_INVITE","invite","REMOVE_INVITE","invoices","account_id","late_plays","UPDATE_LATE_PLAYS","locations","ADD_LOCATION","UPDATE_LOCATION","DELETE_LOCATION","locationId","mail_failures","LOAD_MAIL_FAILURES","mail_failure","UPDATE_MAIL_FAILURES","members","UPDATE_CLUB_MEMBERS","ADD_MEMBER","UPDATE_MEMBER","UPDATE_BY_CURRENT_USER","ADD_MEMBER_SEATING_HISTORY","member_id","seatingHistory","DELETE_MEMBER","memberId","MERGE_USER","source_user_id","messages","LOAD_MESSAGES","movements","AUGMENT_MOVEMENTS","new_movements","movement","ADD_MOVEMENT","UPDATE_MOVEMENT","DELETE_MOVEMENT","movementId","notes","LOAD_NOTES","note","ADD_NOTE","UPDATE_NOTE","DELETE_NOTE","noteId","payouts","payout","UPDATE_PAYOUT","pending_members","pending_member","DELETE_PENDING_MEMBER","pending_partners","pending_partner","pp","updatedState","pending_partner_signup","REMOVE_PENDING_PARTNER_REQUEST","plans","RELOAD_PLANS","plan","ADD_OR_UPDATE_PLAN","DELETE_PLAN","planId","plays","LOAD_PLAYS","play","ADD_PLAY","REMOVE_PLAY","playId","DIRECTOR_CALL","results","result","section_result","scored","UPDATE_SCORE","scores","score_id","section_movements","newSectionMovements","indexBy","section_movement","newSections","signup_overlaps","LOAD_SIGNUP_OVERLAPS","signups","newSignups","UPDATE_SIGNUP_ATTR","updatedSeats","signupSeating","su","users","DELETE_USER","combineReducers","composeEnhancers","__REDUX_DEVTOOLS_EXTENSION_COMPOSE__","compose","store","createStore","rootReducer","container","stripePromise","currentUserData","dataset","loadStripe","updates","classList","highlight","red","aloe","toggleNavOff","brown","gold","darkBlue","neonGreen","neonYellow","darker","primary","announce","accountTitle","commentInListing","muted","green","nav","navHover","navHighlighted","subNav","subNavHighlighted","intermediateNav","activeScoreEntry","helpHeader","border","well","listing","staticControls","toolbar","toolbarContent","hoverRow","news","newGroup","listingClosed","listingOpen","subnav","altnav","altsubnav","bgImages","locked","NavColors","level0","navText","navBg","Nav0_bg","subNavBg","SubNav0_bg","level1","Nav1_bg","SubNav1_bg","level2","Nav2_bg","SubNav2_bg","level3","Nav3_bg","SubNav3_bg","lowerNav","LowerNav_bg","LowerSubNav_bg","intermediate","PlayColors","notVuln","pass","double","redouble","activePlayer","playerNames","explanation","acceptances","auctionChart","interior","exterior","header","input","alreadyPlayed","opacity","trick","active","placeholder","won","lost","inspecting","presentIndicator","online","offline","tablecloth","auctionArea","actionBox","infoBox","StratColors","strat","B","E","F","G","SignupColors","playing","base","btn","attending","waiting","sub","cancelled","notSignedUp","guest","StationaryPreferenceColors","required","requested","undesired","indifferent","validStratLabels","stratColor","level","validLevel","signupColor","not_started","paused","entry","complete","unknown","PricingTierColors","rsvp","teach","STRAT_LABELS","MAX_STRATS","NESW","NSEW","NSEWXY","SEAT_NAMES","N","W","X","Y","hourly_signup","daily_signup","extPayOptions","cash_payment","check_payment","credit_card_payment","free_play","unpaid","SUITS","RANKS","RANKS_REV","SUIT_OFFSET","RANK_OFFSET","WEEKDAYS","WEEKDAY_OPTIONS","AUTO_CANCEL_OPTIONS","BOARD_DURATION_OPTIONS","TABLE_COUNT_OPTIONS","VISIBILITY_OPTIONS","AWARD_TYPE_OPTIONS","PRICING_TIER_OPTIONS","STATE_OPTIONS","AUDIENCE_OPTIONS","EVENT_TYPE_OPTIONS","SECTION_SCORING_OPTIONS","DEFAULT_REMOVED_STATUS","ACBL_RANK_NAMES","I","L","M","O","P","defaultDebugOptions","trackPanels","trackReducer","trackUserSubscription","trackEventSubscription","trackPlaySubscription","dbo","toggleDebugOption","option","currentOptions","clearDebugOptions","ICOMOON_ICONS","redis","demo","down","logins","screens","star","autopay","about","acbl","articles","auction","back","bars","become","billing","blocked","bubble","calendar","camera","cardbuck","cash","check","checkmark","cleaning","clone","compass","configure","course","contacts","dashboard","debugging","diamonds","director","discord","download","edit","enter","erase","exit","facebook","faq","finder","flag","flagged","forward","free","full","glossary","go","heart","help","hidden","history","home","IndividualEvent","list","livestream","log","matrix","metric","mobile","monitor","notification","override","overview","PairEvent","panes","payment","permanentize","phantom","print","profile","profiles","progress","question","question_answer","rank_2","rank_3","rank_4","rank_5","rank_6","rank_7","rank_8","rank_9","rank_a","rank_j","rank_k","rank_q","rank_t","redo","relinquish","refresh","reload","remove","reward","scorekeeper","scoresheet","search","settings","spades","spinner","spotlight2","square","support","swap","tablet","tags","team","TeamEvent","teams","timer","tv","undo","unlocked","up","vaccination","video","videos","wand","web","youtube2","diamondHollow","heartHollow","emailBlock","spam_block","email_bounce","email_blocks","recipientOptionsSort","grouping","AA","BB","DIRECTION_FROM_SEAT_OR_DIRECTION","NS","EW","SEAT_ORDER","displayOriginalSeat","currentSeatFromOriginalSeat","pairDirection","sortByOriginalSeat","sectionA","section_label","sectionB","signupIsCaptain","captain_id","signupIsPair","partner_id","signupIsIndividual","isUnseatedTeam","noop","array","sortObjectValuesBy","obj","sortArrayByAttr","arr","selectFilterCharsInOrder","candidate","inputLower","indexA","char","charIndex","sectionSorter","sA","sB","lA","lB","nameMatchesParts","parts","matches","lcName","part","hexToRGB","hex","alpha","slice","rpx","fullPairNumber","ns","fullNameSort","teamSeatSort","s1","s2","labelSort","boardNumberSet","pick","fromEntries","playingOnline","pricing_tier","usesDiscord","opts","skip_discord","sectionScoringText","THIS_MONTH","toString","safelyGet","o","xs","range1to","self","duplicateValuesInArray","dups","item","arrayChunk","chunks","el","seatIndex","seatChar","seatDirection","relativeSeat","playerSeat","pluralize","singular","plural","ordinalize","dashOrInt","dashOrValue","mp","toFixed","dashOr","prepend","precision","minimumFractionDigits","maximumFractionDigits","absNumber","isVulnerable","vul","directionalVulnerability","str","txt","charAt","toSnakeCase","signedValue","convertPennies","pennies","trunc","getLocationOptions","includeValue","locationOptions","location_id","archived","groupAndSortObjectBy","grouper","sorter","grouped","rv","groupSorter","validEmail","allowBlank","test","some","validAlphanumericName","parseAcblNumberEntry","ACBL_LETTERS","validAcblNumber","number","acblNumberMatchesChecksum","sum","digit","validPendingPartner","pendingPartner","audienceOptionLabel","formatGroupLabel","MemberGroupLabel","$status","tableCountText","pcount","playing_count","track_wait_list","paired_signup","event_type","team_signup","blind_text","team_count","signupGroupingFormatter","memberLookupFromOpts","mp_holding","partner_member_id","computeStrat","mpLevel","computedStrat","yyyymmdd","toISOString","fullDateInZone","hasChangedValues","sortNotes","priority","created_at","moveContactToNestedAttributes","moved","contact_attributes","contact_name","contact_email","parseContactFromNestedErrors","setT","NEGATIVE_BORDER","UnitBox","$empty","$outsideRange","$stratified","$strat","$seated","$locked","UnitNumberBox","$canSelect","$isSelected","UnitMembers","UnitMember","$teamMember","$captain","OptionsWhenSelected","getBoardSets","getBoards","getEvent","getHelpers","getLatePlays","getMembers","getMovements","getPlays","getResults","getScores","getSectionMovements","getSections","getSignups","getUsers","getId","_state","getTableSectionId","table_section_id","getPendingPartners","createSelector","getGroup","getClub","pendingPartners","starts_at","comment","getGroupMembers","groupMembers","getFlaggedCount","fcount","getUnseatedPlayersCount","getMovementModels","sectionMovements","models","sm","getSectionMovementModel","getBoardSetsBySection","sbs","set_number","getAnyHandRecords","getAllBoardsByDealId","byDealId","board_number","getBoardsByDealId","dealId","getHandRecords","records","sn","getDeal","_","handRecords","getScoredBoards","bySection","sect","getAllScoredBoards","scoredBoardsBySection","getSectionScoredBoards","getBoardPreparationStatus","movementModels","boardSetsBySection","use_prepared_boards","getCardsBySeatSuit","cardsBySeatSuit","getDirectors","getNonDirectors","non_directors","getSortedPlays","getSortedSectionIds","sectionIds","sId","getSectionSortedPlays","getEventHasScores","getEventHasResults","getSectionScoreStatusChecker","getHasIneligibles","mp_eligible","getPairNumberFinder","lookup","directionOrSeat","getAllPairs","sectionPairs","member1_id","signup1_id","member2_id","signup2_id","member1_name","member2_name","partner_name","member_names","full_number","getSectionPairs","getUserBySeat","getPairSectNsEw","pairSectNsEw","VictoryPoints","abs_imps","vwin","NULL_OBJECT","getScoreFinder","getBoardScoresBySection","getSectionIds","boardScores","ns_pair_number","getSectionHasScores","bySid","getSectionBoardScores","getPairScoresFinder","ew_pair_number","getPairHasScoresFinder","pairScoresFinder","getPairBoards","pair_boards","getSectionPairBoards","getPairProgress","pairProgress","playedCount","getSectionPairProgress","getFinishedPairs","finishedPairs","done","getSectionFinishedPairs","getScoreCountsBySection","counts","getSectionScoreCounts","getAllScoresArray","scoreFinder","latePlays","allScores","findLatePlay","ew","lp","phantomPairNumber","latePlay","notPlayed","getSectionScoresArray","getScoringStats","stats","played","unrecorded","missing","getSectionScoringStats","getScoringObstacles","obstacles","boardCounts","pairCounts","is_swiss","pair_number","getSectionScoringObstacles","getSectionPlayedBoards","playedBoards","getProvisionalResults","includedScore","isThisPair","pairNumbers","earned","nsScore","getSectionProvisionalResults","getTeamStandings","scoring_progress","sectionMovement","round_count","standings","ns_team","ew_team","vs","ewScore","vps","tie","cumulative_vps","max_vps","pct","IMPs","roundVps","stndg","entries","max_vp","getSectionTeamStandings","getSignupIdsBySectionTableSeat","assigned","getSignupIdFinder","signupIdsBySectionTableSeat","getPairsSectionSeatingStatus","signupIdFinder","allSeats","emptySeats","filledSeats","max_tables","pairsCount","getTeamSectionSeatingStatus","readySections","atTable","every","getSignupsBySectionTeamAssignment","getCaptainIdsBySectionTeamNumber","getCaptainIdFinder","captainIdsBySectionTeamNumber","teamNumber","getTeamMembersBySectionTeamNumber","getTeamsByCaptainId","teamsByCaptainId","captainId","getSectionTeamMembersByTeamNumber","teamMembersBySectionTeamNumber","getTeamsUnseated","unassignedTeamSignups","unassignedPairSignups","unassignedIndividualSignups","alreadyIncluded","getSectionInferredPhantomPair","pairsSectionSeatingStatus","sectionSeatingStatus","getEventPlayers","getSignupsByStatus","signupsByStatus","getTableProgress","tableSectionId","tableProgress","boardsPlayed","getRefreshingSections","getRefreshingSection","getAllMemberOptions","getSignupStatusByMemberId","getSignupsByMemberId","statusByMemberId","signupsByMemberId","pairNumberFinder","pairHasScoresFinder","getRecipientOptions","signupStatusByMemberId","signup_status","deceased","getCurrentMember","getCurrentUserId","current_member","getCurrentSignup","signup_id","getDefaultPanes","getIsAdmin","currentUserId","currentSignup","hasResults","defaultPanes","directing","management","group_ids","lessonOnly","isNonplayingDirector","isPlaying","showCheckinDefault","start_checkin","pairEvent","teamEvent","tableDefaultPane","playerDefaultPane","managerDefaultPane","award_type","by_status","action_ts","getNotSignedUps","signed_up_member_ids","sbpi","team_number","getSection","getSectionMovement","getSectionResults","getSectionAwards","getLocation","getStrata","getMemberMps","recordedValues","sectionResult","playerValues","player","estimated_mp_holding","life_master","getMpLevelByPairSignup","strata","signupId","partner","mp1","mp2","getMpLevelByCaptainId","mps","getPairsUnseated","mpLevelByPair","unassignedSignups","aLevel","bLevel","getPairsGameStratStats","stratStats","unseated","natural","overrides","processedSignupIds","hasOverride","strat_override","stratByPoints","getTeamGameStratStats","mpLevelByTeam","unseatedTeams","getGroups","getClubs","sectionLetterSort","letter","getUser","getSignup","getEventSectionsArray","getMember","getAccount","getGroupManagersByGroup","managers","notifications","getCurrentUserActiveClubsGroups","groupIds","membership","participating_visible_group_ids","club_ids","a_id","b_id","a_club","b_club","clubGroups","a_group","b_group","cg","getCurrentUserActiveCourses","clubsGroups","activeCourses","getHasCourses","getMembersByGroup","byGroup","getMemberStatusCountsByGroup","membersByGroup","byStatus","permanent","removed","getUsersByDiscordId","usersByDiscordId"],"sourceRoot":""}