var environmentSettingsConfig = this.environmentSettingsConfig || {}; environmentSettingsConfig.Partner = 'usta'; environmentSettingsConfig.TenantID = '96a7c92e-92cb-4965-8284-8e5a33761130'; environmentSettingsConfig.FacebookAppID = '572763470210879'; environmentSettingsConfig.StripeKey = 'pk_live_ZZmBeL65OkrBpS2L75faMbEw00e4HVOglG'; environmentSettingsConfig.StripeExpressKey = 'pk_live_ZZmBeL65OkrBpS2L75faMbEw00e4HVOglG'; environmentSettingsConfig.GlobalDomain = 'playtennis.usta.com'; environmentSettingsConfig.Genders = [{"Text":"Male","Value":0},{"Text":"Female","Value":1}]; environmentSettingsConfig.SchoolTypes = [{"Text":"School","Value":0},{"Text":"Home School","Value":1}]; environmentSettingsConfig.SubCategorySessions = [{"sessionId":2010,"name":"Adult"},{"sessionId":2020,"name":"Junior"},{"sessionId":2040,"name":"Individual"},{"sessionId":2050,"name":"Disability"},{"sessionId":2060,"name":"Camps"},{"sessionId":2990,"name":"Other"},{"sessionId":3010,"name":"Sanctioned Tournament"},{"sessionId":3020,"name":"Event"},{"sessionId":3030,"name":"League Fixture"},{"sessionId":3040,"name":"Fun Tournament"},{"sessionId":3990,"name":"Other"},{"sessionId":4010,"name":"Team Practice"},{"sessionId":4020,"name":"Club Night"},{"sessionId":4990,"name":"Other"},{"sessionId":5030,"name":"Non-venue Event/Tournament"},{"sessionId":5990,"name":"Other"}]; environmentSettingsConfig.VenueMode = window.location.hostname == environmentSettingsConfig.GlobalDomain ? 'brand' : 'domain'; environmentSettingsConfig.GlobalFeatures = { "Version": 638672071955407908, "DefaultModules": { "Venues": true, "CoachingOrganisations": true, "Regions": true, "Authorities": false }, "Account": { "UserPhoneNumberIsRequired": false, "EnableUserImpersonation": false, "SetPaymentReceiptEmail": true, "EnableStripeExpressOnboarding": true }, "Booking": { "AdminOnlyBookingSheetColours": false, "AppPromo": false, "CheckInContacts": false, "NewDayBookingAvailabilityTime": true, "NoShowCharges": false, "ResourceFormat": false, "ResponsibilityCategory": false, "SessionMaxBookingSlots": false, "CourtProperties": true, "CalendarEntry": false, "MembershipRequired": false, "ResourceCategories": false, "BookingEngineV2": false, "EnableGroupBooking": true, "BookingReminderEmails": true, "CoachingReminderEmails": false }, "Membership": { "DisableInstallments": true, "DirectDebitPayment": false, "CreditCardPayment": true, "DisableGiftAidOption": true, "GuardianMandatory": false, "AutoPaymentDateOfPurchasePackages": false, "AutoPaymentFixedDatePackages": false, "NewMembershipRegistrationProcess": true }, "Coaching": { "OptimisedSearch": true, "RunningFields": false, "CoachingTeam": true, "CoursePaymentRequests": true, "CoachingReports": true, "SessionPaymentRequests": true, "TennisForKidsLive": false, "JuniorLabel": true, "DelayParticipantOrders": false, "DelayCoachOrders": false, "RecurringSessions": true, "MembershipRequired": false, "EnqueueBookings": false, "EnableSchemeSearchFilter": false, "EnableThemeSearchFilter": false, "EnableBookingOpeningTimeRestrictedSchemeFeature": true, "OfflineCoachingPayments": true, "JuniorSafePlay": true, "AdultSafePlay": false, "Lessons": true, "EnableBookingCourtInProgramming": true, "DisableHolidayCamps": false, "DisableAddCategory": false, "EnableResources": true, "OneOffCourseFeatures": { "BulkDiscountsEnabled": false, "MultipleSessionsEnabled": false, "CreateSessionsAutomatically": true }, "SeriesFeatures": { "BulkDiscountsEnabled": true, "MultipleSessionsEnabled": true, "CreateSessionsAutomatically": true }, "EnableThemeForCustomCourses": true, "EnableCancellationWindowForCourses": true, "RoundRobinFormat": false, "EnableThemeConsent": true, "PlayTrackerProgramming": true, "FamilyCategories": true, "ArchiveCategories": true, "PublishCamps": true, "EnableBulkImportParticipants": true, "EnableElasticSearchCoaching": true, "EnableElasticSearchCamps": true, "CoachingRegisterAdministrator": true, "WaitingList": true }, "Competition": { "SocialLeagues": false, "UsePersonExternalID": false, "CustomerCareWidget": true, "BulkPaymentRequests": true, "DisableRefereeSearch": false, "DisableTournamentDirectorSearch": false, "HideLevelNames": false }, "Contacts": { "Bios": false, "Photos": false, "Social": false, "Mentors": false, "Delete": true, "Unsubscribe": true, "RestrictUnregistered": false, "EmailAttachments": true, "VenueContactRelationships": true, "BulkDeleteContacts": true, "ContactLookupsV2": true, "ContactForm": false, "LockPersonalDetailsWhenUserConnected": true, "ContactNotes": false, "WorldTennisNumber": true }, "Venue": { "DeliveryAddress": false, "PrivacyPolicy": true, "SocialAccountsDisabled": false, "CanEditJuniorAge": false, "SubDomainCreation": false, "Facilities": false, "AddTraditionalLocation": true, "AddNonTraditionalLocation": true, "LinkedLocations": true, "Waiver": true, "ReadOnlyProfile": true, "DisableAddVenue": true, "MultiBookingSheets": true }, "Website": { "Multilingual": false, "NoCoachingCourseSearch": false, "NoSubPages": false, "SectionHeros": true, "ConsentsOptOutByDefault": true, "VenueConsentsOptOutByDefault": true, "GuardianMandatory": false, "Activation": false, "ExternalActivation": true, "NationalCourtBookingLive": false, "EnableClassificationLogoImages": false, "PasswordConfirmation": false, "AcceptPrivacyPolicyOnRegister": false, "NewLocationsLookup": true, "Appcues": true, "FooterNavigation": true, "Affiliations": false, "DisableVenues": true, "MyGameNavigation": true }, "Events": { "GBTWAccess": false, "CustomEventName": false }, "DiscountsAndCredits": { "CoachingCredits": true, "BookingCredits": true }, "Payments": { "PaymentReports": true, "MultipleStripeAccounts": true, "StripeCheckoutCourtBooking": false } }; environmentSettingsConfig.CurrentVenueUrlSegment = ''; environmentSettingsConfig.ErrorsVerboseConsole = true; environmentSettingsConfig.ErrorsVerboseHtml = true; environmentSettingsConfig.PortalUrlSegment = "ServeControl"; environmentSettingsConfig.tournamentMustHavePaymentAccountIdRule = true; environmentSettingsConfig.CurrentVenueIanaTimeZone = ''; environmentSettingsConfig.ResourceItems = { Booking : { CourtLower : "court", CourtUpper : "Court", CourtsLower : "courts", CourtsUpper : "Courts", BookingLower : "court booking", BookingUpper : "Court booking", BookingsLower : "court bookings", BookingsUpper : "Court bookings", BookedLower : "booked", BookedUpper : "Booked", BookLower : "book", BookUpper : "Book", CourtBookingsLower : "court bookings", CourtBookingsUpper : "Court bookings" }, Classification : { Level1 : "National administrator", Level2 : "Regional", Level3 : "County" }, Coaching : { CategoryName : "Category name", ClassesLower : "sessions", ClassesUpper : "Sessions", ClassLower : "session", ClassUpper : "Session", CoachLower : "coach", CoachUpper : "Coach", CoachesUpper : "Staff", CoachingLower : "programming", CoachingUpper : "Programming", CostUnit : "", CourseCodeShort : "code", CourseCodeLong : "Code", CourseLower : "program", CoursesLower : "programs", CoursesUpper : "Programs", CourseUpper : "Program", HolidayCamp : "Camp", HolidayCamps : "Camps", HolidayCampLower : "camp", HolidayCampsLower : "camps", Interval : "Repeats", PlayerLower : "player", PlayersLower : "players", PlayersUpper : "Players", PlayerUpper : "Player", SessionsLower : "sessions", ProgrammeLower : "program", ProgrammesLower : "programs", ProgrammesUpper : "Programs", ProgrammeUpper : "Program", ProgrammeNameUpper : "Program Name", ProgrammeTypeUpper : "Program type", SessionName : "session", SessionVenue : "Facility", TeamName : "Staff", TitleRoot : "Programming / Programs / ", PageDefaultView : "List", UtrRatingMin : "1", UtrRatingMax : "16.5", BasketCourseName : "course", BasketSessionName : "session", AddNewBooking : "Add participant", AddNewCampBooking : "Add participant", ThemeUpper : "Ball color", SchemeContactSourceOrganiser : "Organizer", LeadCoach : "Lead coach", StartDate : "Start date", SessionThemeUpper : "Ball color", SkillLevelUpper : "Level", CapacityUpper : "Capacity", CostUpper : "Cost", NameUpper : "Name", EndDate : "End date", PublicCourseDescriptionHeader : "Description", ValidateAgeMinMaxErrorMessage : "This player must be between [MinimumAge] and [MaximumAge] to enter", ValidateAgeMinErrorMessage : "Players must be [MinimumAge] or over to enter", ValidateAgeMaxErrorMessage : "Players must be [MaximumAge] or under to enter", BulkImportPlayersFileHeader : "UstaID", RoundRobinDescription : "Developed by the International Tennis Federation (ITF), the ITF World Tennis Number (WTN) is a rating that provides a global standard for players in both singles and doubles with a scale of 40-1. WTN Match Play allows players to participate in matches that count towards their WTN without having to commit to a tournament. Players can be placed in groups based on their rating to promote an appropriate competitive level and positive sportsmanship through level-based play. Please note that WTN Match Play is offered in orange, green, and yellow ball programs, but orange ball does not count towards WTN." }, Common : { ChequeLabel : "Check", ColourLabel : "Color", DocumentRegion : "us", PlatformName : "USTA", PlatformLat : "41.850033", PlatformLng : "-87.6500523", PlatformZoom : "4", PlatformCountryRestriction : "us", StripeCountry : "US", TownLabel : "Town", PostcodeLabel : "Zip code", DistanceUnit : "miles", CurrencySymbol : "$", CurrencyCode : "USD", TournamentsCurrencySymbol : "$", TournamentsCurrencyCode : "USD", TournamentsStripeCountry : "US", PublicJavaScriptShortDateFormat : "m/d/yy", AdminJavaScriptShortDateFormat : "m/d/yyyy", JavaScriptTimeFormat : "hh:mm:ss", SmsName : "SMS", StripeRegisterCopy : "

To accept online debit or credit card payments for Serve Tennis modules, you’ll need to register a bank account on the Stripe website.

It only takes a few minutes to complete the form and connect your account to Serve Tennis.

If your programs, tournaments, leagues, court bookings or club memberships are free, you will not be charged any transaction fees. The transaction fee is 3.5% + $.50 per transaction.

Please note, this account will receive payments from your memberships, court bookings, programming and social leagues. For Tournament payments, please see the Payment settings tab within the tournaments module.

", MomentJsShortDateFormat : "MM/DD/YYYY", MembershipName : "Membership", MemberName : "Member", PartnerLocale : "en-US", CountyLabel : "State", GDPRGuardianConsentLabel : "I confirm I am the Parent or Guardian of this player, or have the permission of the Parent or Guardian to book on behalf of this player.", GDPRGuardianConsentToolTip : "In order to make a booking you must be ?0? years old; be the parent or guardian of the player under ?0? years old, or have permission from the parent or guardian of the player.", GDPRGuardianConsentValidation : "Consent required - edit details", ProgrammeLower : "program", ProgrammeUpper : "Program", ProgrammesLower : "programs", ProgrammesUpper : "Programs", FloodlitLabel : "Lighted", StripeCosts : "Stripe will deduct 2.9% + 30c per transaction. The fees are subject to change and we will notify you in advance of any changes to the fees.", GoCardlessCosts : "We have a special arrangement with GoCardless who will only charge 1.0% and capped to a maximum of £2.00 per transaction (minimum of 20p). In addition Sportlabs charge 0.8% (uncapped) per transaction in order to provide and support this service. A maximum of 1.8% is deducted automatically when a user makes a payment.", GoCardlessIntro : "It only takes a few minutes to complete the form on the GoCardless site. Once registered you'll be asked to connect your account to ClubSpark and as soon as you've done this we'll be able to help you to automatically keep track of payments made via GoCardless (for one-off payments and monthly Direct Debits).", OperatorNameLong : "United States Tennis Association", OperatorName : "USTA", OperatorLogoDark : "~/Content/Public/Clubspark/usta/global/img/usta-logo-dark.png", OperatorWebsite : "https://www.usta.com/", OperatorWebsiteText : "USTA.com", OperatorPoweredText : " ", RegisterLinkText : "Join us", OptimisationLower : "optimization", AdminDateFormat : "MM/dd/yyyy", CancelledLower : "canceled", CancelledUpper : "Canceled", CancellingLower : "canceling", SchemeCategoryThemeValidation : "Theme preference required", SchemeCategoryProfileThemeValidation : "competition level is required to enter this event.", TermsAndConditionsPrefix : "Please check this box to confirm you agree to the", StripeNote : "Please note, this account will receive payments from your memberships, court bookings, programming and social leagues. For Tournament payments, please see the Payment settings tab within the tournaments module." }, Contacts : { CoachingRole : "Programming administrator", GoverningBodyNumber : "", ResponsibleLower : "contact", ResponsibleUpper : "Contact", ResponsiblesLower : "contacts", ResponsiblesUpper : "Contacts", RolesDescription : "Organization", MentalHealthChampionUpper : "" }, Emails : { Salutation : "Hi" }, Home : { Heading : "Where would you like to go?" }, MyGame : { SkillLevelUpper : "Skill level" }, RegularExpressions : { PersonName : "^[a-zA-Z\\-\\'\\&\\ \\.]+$", Postcode : "^[A-Z a-z0-9_-]{3,}($)", PhoneNumber : "^(\\+\\d{1,2}\\s)?\\(?\\d{3}\\)?[\\s.-]?\\d{3}[\\s.-]?\\d{4}$" }, Terms : { MinimumUserAge : "13", AssociationScope : "The USA and its national, county and island associations", InvolvementScope : "US tennis", UseOfPersonalInformationScope : "Sportlabs Technology Ltd" }, Venue : { CoachingOrganisationLower : "coaching organisation", CoachingOrganisationUpper : "Coaching organisation", CoachingOrganisationModuleStatusName : "individual", OrganisationUpper : "Organization", OrganisationLower : "organization", OrganisationsLower : "organizations", OrganisationsUpper : "Organizations", VenueLower : "organization", VenueUpper : "Organization", VenuesLower : "organizations", VenuesUpper : "Organizations", VenueClassification : "Classification", VenueEventDefaltName : "Course details", PartnerIdentifierName : "USTA UAID", AcceptInvitationAgreeTermsAndConditionsPrefix : "Please check this box to confirm you agree to the", PrivacyPolicyConsentPrefix : "Please check this box to confirm you have read and accepted", VenuesLabel : "sites" }, Region : { RegionLower : "section/district", RegionUpper : "Section/district", RegionsLower : "sections/districts", RegionsUpper : "Sections/districts" }, Events : { EventLower : "event", EventUpper : "Event", EventsLower : "events", EventsUpper : "Events", ChangeLabel : "Change" }, MembershipEmails : { LoginTextForAccount : "You will need to login with your USTA account" }, AdminWebsite : { HeroPhotoGuidance : "For best viewing of this photo we recommend uploading a photo with dimensions of 1400px x 650px", GalleryGuidance : "For best viewing of this photo we recommend uploading a photo with dimensions of 600px by 400px", NewsArticleGuidance : "For best viewing of this photo we recommend uploading a photo with dimensions of 1180px by 600px", SubSectionPhotoGuidance : "For best viewing of this photo we recommend uploading a photo with dimensions of 1400px x 450px", NewsArticleTextGuidance : "For best viewing please upload images that are 1180px wide. Height can be variable" }, SchemesEmails : { SchemeSessionsBookingUserSubject : "[#scheme#] / Booking Confirmation", SchemeSessionsBookingAdminSubject : "[#scheme#] / Booking Confirmation", SchemeSessionFullNotificationSubject : "[#scheme#] / [#course-type#] Full", SchemeSessionBookingImportedUserSubject : "You've been registered for a USTA {0}!" }, Tournaments : { TournamentsAddPaymentStripeRegistered : "Once registered you can connect your account to USTA, automatically keep track of payments, issue refunds and manage payouts.", TournamentsAddTournamentPaymentAccountText : "Before you start your tournament setup journey, you must first create at least one Stripe Express account to accept entry fees. Entry fees are subject to 3.5% +.50 c transaction fees and if applicable USTA Section or District head taxes.", TournamentsPlayerBulkUploadCSVUpload : "If your CSV file contains a column header row, please check this box. It must have a header titled 'UstaID' with the USTA IDs of the players you wish to add in that column.", TournamentsEntriesDoublesReqs : "", TournamentsEntriesDoublesId : "*Important: You will need to know your partner's USTA number in order to be paired.", TournamentsSummaryCreditCardCharge : "Your credit card will not be charged at the time of registration. Payment will be processed upon selection. Once selected the USTA will treat all transactions as nonrefundable, unless USTA is instructed otherwise by the applicable tournament committee.", TournamentsAdditionalInfoDoublesCopy : "You can now invite and confirm your doubles partner with their USTA number.", TournamentsConfirmationCopy : "Your credit card will not be charged at the time of registration. Payment will be processed upon selection. Once selected the USTA will treat all transactions as nonrefundable, unless USTA is instructed otherwise by the applicable tournament committee.", TournamentsSanctioningSubmitCopy : "

Your Tournament will be sent to USTA for approval and is subject to USTA sanction fees. If approved, your tournament will be ready to be published and registration will open . Please note that once approved, changes may only be made by contacting your USTA administrator.

", TournamentsSanctioningSubmitConfirmation : "", TournamentsRegisteredOrganisations : "USTA sanctioned tournaments are only available to registered organizations.", TournamentsPlayerSelectionInfo : "Please contact your local USTA office to have your tournament be prepared to run in TDM. At this time, team event management is not available in tournament desk.", TournamentsSanctionedApprovedReady : "Your tournament application has been approved. Please complete the payment of your sanction fee of in order to publish your USTA Tournament.", TournamentsSanctionedApprovedChargeFailed : "Your tournament application has been approved but your fee payment has failed.
Please complete the payment of your sanction fee of in order to publish your USTA Tournament.", TournamentsEntryFee : "Entry fees are subject to 3.5%+.50c transaction fees and applicable section or district head tax fees." } }; var AuthHandler = function(config) { var cache; var redirectUrl = config.zoneRoot + 'oauth2-redirect.html'; var authorizeUrl = config.authRoot + 'issue/oauth2/authorize'; this.withToken = function (args) { args = args || {}; if (typeof args === "function") args = { success: args }; args.success = args.success || function() {}; args.error = args.error || function() {}; args.scope = args.scope || "token"; /* Attempt to load the current oauth token from localStorage */ /* var tokenCache = localStorage.getItem('oauth2.token'); */ var tokenCache = cache; var adminToken = null; if (tokenCache != null) adminToken = JSON.parse(tokenCache); var now = Math.floor(Date.now() / 1000); /* If token expires within next 60 seconds, we'll request a new one anyways */ if (adminToken != null && adminToken.expires_after < now + 60) adminToken = null; if (adminToken == null) { window.addEventListener('message', function (event) { if (event.data.action == 'oauth2.callback') { if (event.data.isValid) { var token = { expires_after: now + event.data.expires_in, access_token: event.data.access_token }; /* Store the token in cache */ /* localStorage.setItem('oauth2.token', JSON.stringify(token)); */ cache = JSON.stringify(token); args.success(token.access_token); } else { args.error(event.data); } } }, { once: true, capture: false }); var nonce = btoa(Date.now()); var authorizePayload = { tokenType: 'csa', response_type: 'token', client_id: 'clubspark-ui', redirect_uri: redirectUrl, scope: config.scopeRoot + args.scope, state: nonce, realm: config.webRoot, }; var implicitUrl = authorizeUrl + '?' + $.param(authorizePayload); /* Get iframe for sso */ var iframe = $('iframe[name="oauth2"]'); if (iframe.length == 0) { iframe = $('