{"version":3,"file":"consumer-sweepstakes.js","names":["_initializerDefineProperty","target","property","descriptor","context","Object","defineProperty","enumerable","configurable","writable","value","initializer","call","_defineProperty","obj","key","arg","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","String","Number","_toPrimitive","_toPropertyKey","_applyDecoratedDescriptor","decorators","desc","keys","forEach","slice","reverse","reduce","decorator","skipCache","ApplicationAdapter","_class","CommonAdapter","constructor","args","super","this","_descriptor","_descriptor2","config","apiNamespace","apiHost","apiKey","window","location","href","ENV","APP","organizationId","promotionId","organizationPromotionId","findAll","store","type","data","useCachedData","includes","modelName","getPreviewData","findRecord","query","queryRecord","name","pathForType","talker","send","then","response","payload","prototype","service","_exports","default","App","Application","modulePrefix","podModulePrefix","Resolver","loadInitializers","DynamicElementAlt","Component","DynamicElement","_default","extend","tagName","attributeBindings","classNameBindings","didRender","_super","arguments","onLoadCallback","run","setOrientation","element","addEventListener","onerror","set","willDestroyElement","removeEventListener","width","height","alt","cropmode","anchor","offsetWidth","offsetHeight","src","computed","dipsUrl","get","mediaItemId","externalSource","multiplier","queryString","compact","join","MAX_ATTEMPTS","environment","cancel","tryAgainTimer","video","querySelector","onVideoSeek","onVideoTimeUpdate","onVideoEnded","onVideoLoadedData","didInsertElement","attemptVideo","disableSeeking","didReceiveAttrs","_width","_key","attempts","maxAttempts","videoReady","poster","load","incrementProperty","timer","later","bind","FAILED_VIDEO_POLLING_DELAY_SECONDS","supposedCurrentTime","highestTime","delta","currentTime","Math","abs","seeking","EmberYoutube","i18n","shouldShowOrHide","observer","blank","options","dateFrom","yyyy","mm","dd","some","x","isBlank","str","isNaN","parseInt","iso8601","date","Date","getTime","_previousValue","valueUpdated","_usesDDMMYYYY","day","month","year","checkAndSendDate","checked","onValidDate","onReset","setProperties","getUTCDate","getUTCMonth","getUTCFullYear","actions","dayChanged","monthChanged","yearChanged","domain","parent","theme","classNames","isExpanded","isDark","equal","current","$","document","body","on","event","designTemplateTypeId","getAttribute","loadAndShowPage","off","show","html","focusConstrainer","FocusConstrainer","keyListener","KeyListener","async","relevantDesign","designTemplateType","BypassCache","IncludeTokenContent","designTemplate","design","result","legalDesigns","findBy","open","sanitizedHtml","sanitize","renderedContent","htmlSafe","innerHTML","scheduleOnce","configure","getElementById","begin","ESC","hide","end","useAnchor","click","createElement","url","getElementsByTagName","appendChild","handleBodyClicks","ev","isChild","contains","bubble","matches","shouldNotClose","or","one","isDestroyed","trigger","next","colorScheme","showFaces","header","stream","showBorder","hideCover","smallHeader","FB","XFBML","parse","imageFileExtensions","videoFileExtensions","session","enctype","method","currentlyUploading","accept","allowCapture","buildAjaxUploader","imagesOnly","videosOnly","VIDEO_FILE_FORMATS","imagesOrVideoOnly","validFileTypes","isMediaItem","file","action","fileExtension","getFileExtension","apiEndpoint","pluralizedJsonItemType","onchange","files","length","isValidFile","clearModelErrors","prepareFileUpload","FormData","append","ajax","contentType","processData","headers","getOwner","lookup","success","uploadResponse","uploadingAction","mediaItemJSON","JSON","successfulFileUpload","error","errors","failedFileUpload","itemType","propertyName","addModelError","responseJSON","jsonApiDocument","normalize","MediaItem","ImportFile","responseItem","push","addingFile","rerender","reset","fileUploader","responseText","fileName","substring","lastIndexOf","toLowerCase","flatten","split","map","acceptedItem","trim","model","clear","errorMessage","forceDirty","add","__COLOCATED_TEMPLATE__","_templateFactory","createTemplateFactory","id","block","moduleName","isStrictMode","SsFormEntryRegistrationComponent","_dec","SsFormNewComponent","_descriptor3","_descriptor4","_descriptor5","_descriptor6","_descriptor7","_descriptor8","_descriptor9","_descriptor10","_descriptor11","_descriptor12","isLoggedIn","debounce","recastVote","entryFormPage","formPageSubmission","createFormSubmission","votes","recastingVote","isEmpty","currentVotes","entries","userEntries","setVotesServiceAttributes","Promise","all","loadVotes","loadEntries","entry","currentEntry","vote","voteToDelete","findCurrentVoteAndEntry","changeVote","mediaItem","isUploadingImage","uploadedMediaItemId","isPersistingEntryData","localStorage","setItem","prefix","storedFormFields","assign","videoId","uploadedVideoId","removeItem","mediaTypeId","createVideoBlob","_asyncArrowRuntime","buildTask","generator","closeChangeWriteIn","isBallot","ensureBallotStateLoaded","destroyRecord","e","console","_currentEntry","currentFormPage","currentMatchupEntry","splitSubmission","entryFormSubmissionId","submitFormPageTask","perform","isPresent","submissionFailure","isPageOne","isEditingSubmission","drop","forceRerender","entryTitleFormField","entryTitleFormFieldValue","entryTitleId","place","placeObject","cleanup","URL","revokeObjectURL","blobUrl","persistEntryData","formPageFields","entryForm","formPages","toArray","formFields","showVideoPreview","field","fieldType","allowVideoUpload","allowAllMediaUpload","allowPhotoUpload","nextRegistrationPageToComplete","form","sortBy","find","page","hasFormFields","shouldShowEntryForm","pageNumber","shouldShowEntryPreview","promotionType","urlTextbox","videoUploadedByUrl","formField","fieldId","enums","findWhere","toString","entryCaptionFormField","googlePlaceField","isNominationBallot","promotionSubType","submitButtonText","changeToWriteIn","hasStartedRegistration","thirdPartyAuthProvider","thirdPartyUsesExternalLogin","accessToken","isLastPage","formPagesCount","useCurrentFormPage","capitalizedCategoryName","matchupName","filter","capitalize","isSaving","submitFormPagesTask","isRunning","isTurnstileChecking","freezeFormState","captureFormSubmissionDetails","formSubmissionId","formType","DeveloperError","matchupEntryId","entryId","clearFormRelatedLocalStorage","excludedItems","clearFormPageErrors","fp","clearFormFieldValues","restoreProgress","getItem","syncFormWithStoredValues","restoreFormValues","json","values","isNone","setValuesToDefaultIfBlank","defaultValue","entryLimitReached","formPage","message","voteLimitReached","currentVote","unVote","save","finishedAction","finished","matchup","attribute","waitForInFlightVotes","isLoading","resolve","startedAt","now","setInterval","clearInterval","userVotes","entriesPromise","isLoadingEntries","isLoaded","writeInEntry","filterWriteinNominationsForThisCategoryAndInterval","matchupId","userMatchupEntry","sort","a","b","pop","findVoteWithinMatchupForCurrentInterval","currentVoteForMatchupEntry","pageFields","pageField","validationFailure","invalidError","ff","source","pointer","match","detail","twitterAuthorizationRedirect","scrollToError","el","parentNode","scroller","scrollTo","formSubmission","captureSession","sendFormPageSubmissionSDKEvent","nextPage","hasMismatchErrored","prefillEntryFormValues","entryTitle","entryPhotoId","entryCaption","entryMediaReleaseConsent","getField","prefillField","startsWith","createObjectURL","removeImage","imageField","removeVideo","reason","logout","shouldClearAccessToken","router","transitionTo","iteration","normalizedName","clearStoredValues","setup","firstInput","container","focus","tracked","getOwnPropertyDescriptor","_component","setComponentTemplate","SsFormFieldCaptchaComponent","FormField","scrollToTurnstileWidget","widgetElement","center","duration","setTurnstileRunningState","loadScript","turnstile","render","sitekey","consumer","TURNSTILE_KEY","callback","token","failed","submitFormPage","error-callback","challenge-callback","ensureValueArray","Array","isArray","isAnswerLimitReached","isLimitSelection","answerLimit","removeUncheckedItem","fields","fieldOptionId","selectedFieldOptions","valueChanged","fieldOption","isChecked","valueArray","existing","val","addObject","isBrowserWithBadNativeDateUX","mobileOperatingSystem","getPropertyNumber","computedStyle","parseFloat","getPropertyValue","ReferralShareList","boundRecalculate","recalculateIsTooWide","mutationObserver","MutationObserver","observe","childList","attributes","subtree","disconnect","isTooWide","referralLabel","readOnly","areReferralsEnabled","pCS","getComputedStyle","pBL","pBR","pPL","pPR","parentInnerBoxWidth","scrollWidth","SsFormFieldFacebookLink","PLACES_DEBOUNCE","SsFormFieldGooglePlace","placeName","setPlaceObject","setEntryName","googleIntegrationSetting","isLoadingSuggestions","showPredictions","predictions","timeout","fetchSuggestionsTask","restartable","googleSuggestionPreference","queryPlacesTask","entryNames","searchValue","pageSize","geographicArea","peekAll","firstObject","status","googleMaps","google","maps","places","PlacesServiceStatus","OK","isDestroying","getPlacePredictions","setupMaps","instantiateGoogleMaps","promotionLanguageCode","settings","getValueFor","displayPredictions","selectPrediction","prediction","place_id","structured_formatting","main_text","internal","preventFormSubmitOnEnter","preventDefault","SsFormFieldImageSelectComponent","isMobile","test","navigator","userAgent","accepts","_addMediaItem","newMediaItem","startUpload","addMediaItem","onChange","automateImageUploadForTesting","testMediaItem","createRecord","currentVersionNumber","size","SsFormFieldInstagram","GOOGLE_PLAY_BADGE","APPLE_APP_STORE_BADGE","_dec2","_class2","androidImageSource","organizationPromotion","defaultLanguageId","iosImageSource","delayFormFieldValueChanged","SsFormFieldOptin","alexaSkillImageSource","nativeDataList","HTMLDListElement","availableTags","autocomplete","SsFormFieldTikTokLink","SsFormFieldVideoSelectComponent","switchToYoutubeUpload","isFlyoutOpen","toggleAddByVideoUrl","SsFormFieldXLink","SsFormFieldYouTubeLink","SsFormPageEntryRegistrationComponent","SsFormPageComponent","suggestedValues","entryNameField","labelText","bool","addingVideoByUrl","storeFieldValues","isExtraChancesForm","sortedFormFields","aMatches","bMatches","displayOrder","hasRequiredTwitterFollow","fomField","isRequired","filterBy","isNominating","isVoting","continueToPayment","skip","submitFormField","currentSubmittingField","onFormFieldChange","updateStoredFormFields","stringify","isMultipleCheckbox","splitCheckedIntoFormFields","_descriptor13","_descriptor14","_descriptor15","_descriptor16","_descriptor17","_descriptor18","_descriptor19","_descriptor20","_descriptor21","_descriptor22","_descriptor23","_descriptor24","_descriptor25","transformLoginEmailRedirectPath","languageCode","clearEntryFormSubmission","loadStoredSession","restoreMinimumAgeRestriction","acknowledgeForm","addThirdPartyCancelHandler","clearProgress","hideThirdPartyRequestOnLoad","launchThirdPartyRequestLogin","optionalRegistration","googlePlaceId","googlePlaceName","locationId","extraChances","sumExtraChances","submissionSuccess","focusFirstIn","registrationForm","formTypeClass","isLogoutVisible","usesSecondStreetLogin","isRegistered","isFirstPage","canChangeUpload","emailAddressThatIsAlreadyInUse","emailAddressThatRequiresVerification","emailFormField","sessionRelatedSetup","restoreState","isFinished","forceDisableForm","createFormFieldsForMultipleCheckboxes","formPageId","isCaptchaPage","matchupClassificationTypeId","referrer","desiredPageNumber","formId","captchaPage","scrollToCaptchaPage","scrollToTopOfForm","extraChancesAdded","submissionErrorMessage","updateFormPage","camelize","failedFormSubmissionId","meta","form_submission_id","sessions","access_token","loginUsingAccessToken","ForbiddenError","InvalidError","Errors","UnauthorizedError","emailAddressAlreadyInUse","emailVerificationRequired","userSession","useExistingSession","fieldValue","label","valueText","fieldOptions","option","text","nextFormPage","reload","beginSubmission","storeEligibilityDate","getEntryEligibilityDate","delayClearFormFieldValues","designSettings","handleKioskMode","handleThanksPageRedirection","isQuiz","ad","closest","additionalOffset","top","targetTop","getBoundingClientRect","bottom","offset","min","behavior","entryEligibilityDate","currentPageNumber","disqualify","fieldTypeId","username","toSet","replace","escapeRedirectPath","routeUrl","specialEncode","encode","removeUtmQueryParams","sanitizeRedirectPath","minimumAgeRestriction","setErrorOnEmailField","validationSignUpLimitHasBeenReached","emailField","validationAlreadyRegisteredForThisEvent","lastObject","focusFirstErrorField","grecaptcha","emailFieldId","email","currentURL","redirectPath","encodedPath","encodeURIComponent","loginRequest","pending","Boolean","returnTo","timestamp","postMessage","loginRequestPromise","requestLoginEmail","emailSubmittedCallback","verificationRequestToken","sendTo","clearForm","isStarted","alert","willInsertElement","_setAttributes","setEmptySrc","alreadyAttempted","altSrc","title","getProperties","$img","attr","$this","setAttribute","disabled","onDomChange","onDataChange","selection","content","selectedValue","changed","hasErrors","has","init","change","selectedIndex","prompt","objectAt","optionValuePath","enc","disableInteraction","hashtag","isCustomButton","buttonUrl","rawHashtag","referrerUrl","buttonCssClass","twttr","widgets","events","tweetHandler","twitterEvent","customClick","autoPlay","StripeFormComponent","promotionProduct","packages","promotionProducts","selectedPromotionProduct","checkout","createStripeSession","productId","emailAddress","promotionProductId","initializeCheckout","onComplete","destroyInstance","updateTransactionStatus","onPaymentComplete","normalizedTextColor","adjustColor","color","SweepstakesMatchup","previousMatchup","matchups","endDate","bestChoice","currentMatchup","relevantMatchups","startDate","nextMatchup","beforeContest","hasEntryLimitReachedForCurrentRound","matchupSummary","duringContestMatchupOpen","duringContestMatchupClosed","afterContest","nextMatchupStartDate","moment","format","timeZone","getTimeZone","handle","$destination","to","empty","hasDestination","youtubeVideo","internalVideoTimer","timerCount","highestTimerCount","playerVars","autoplay","playsinline","rel","videoPaused","videoPlaying","player","oldTime","newTime","getCurrentTime","seekTo","getDuration","ApplicationController","Controller","updateReferringUrlHeader","currentRouteName","routePath","localFullUrl","adapterFor","addHeaders","guid","referrerUserGuid","rootUrl","application","controller","emailFieldValue","submitted","errorMessages","referrerRoute","emailFieldIsEmpty","not","organizationPromotionName","alias","redirectTo","sanitizedRedirectPath","toggleProperty","loginRequestWork","exception","addObjects","_classPrivateMethodInitSpec","privateSet","privateCollection","_checkPrivateRedeclaration","FIELD_TYPE_IDS_WITHOUT_VALUES","ThanksController","_dec3","_dec4","_dec5","_dec6","_dec7","_dec8","_dec9","_dec10","_setEmailFieldValue","WeakSet","receiver","fn","_classPrivateMethodGet","_setEmailFieldValue2","reenter","canSubmitFormAutomatically","queryParams","refresh","promise","reenteredSuccessfully","pinterestEnabled","socialSettingUtils","isSocialSettingEnabledNew","thanksMessageDisabled","isSocialSettingDisabledNew","thanksMessage","getSocialSettingNew","ignoredFieldTypeIds","flat","thanksMessageSafe","facebookApiKey","showThanksMessage","extraChancesFirstObject","extraChancesForm","combineThanksWithExtraChances","showReferrals","entryEligibilityMetaData","entry_eligibility_date","entry_matchup_id","matchup_id","isNextRound","logoutAction","unloadAll","appVersion","_","hash","version","versionOnly","hideSha","shaOnly","hideVersion","showExtended","versionExtendedRegExp","versionRegExp","shaRegExp","helper","compare","first","operator","second","getProperty","propName","safeString","string","Helper","compute","exists","t","math","pageTitle","pluralize","singularize","initialize","initializerFactory","register","ContainerDebugAdapter","setupContainer","exportApplicationGlobal","theGlobal","global","self","globalName","Ember","classify","reopen","willDestroy","apply","resolvePrimaryColor","arc","designContentHtml","promotionElement","rulePattern","lastConcreteColor","exec","findTemplatePrimaryBackgroundColor","color_element","colorElement","variableName","varMatch","RegExp","findCssVariableValue","getCustomStyles","primaryColor","color_background","colorBackground","color_text","colorText","color_button","colorButton","font_heading","fontHeading","font_paragraph","fontParagraph","styles","font","foregroundColor","isModalFormShell","pathname","showPromotionLoading","deferReadiness","warn","promotionContentsRequestUrl","params","matchEmbedUrl","organizationPromotionUniqueId","isLocalhost","Error","promotionContentsUrl","hasSettled","setTimeout","EmberPromise","crossDomain","contents","strValues","insertFontsToDom","insertCustomFontLinks","font_links","rawDesignContent","isValidJSON","Arc","srcDoc","socialElement","facebook","xDescription","emailSubject","emailDescription","metadata","getCustomContent","designContent","rootElement","stripe_publishable_key","stripe","publishableKey","lazyLoad","advanceReadiness","appId","cookie","xfbml","Canvas","setAutoGrow","htmlEl","style","overflow","removeProperty","ResizeObserver","documentElement","previousHeight","handleBodyHeightChange","currentHeight","bodyScroll","checkAllImagesLoaded","imagesLoaded","images","getElementsByClassName","totalImages","imageLoaded","i","cloneImage","onload","firstChild","mutations","childSelectors","mutation","addedNodes","loadableChildren","loadedElements","loadingWorkaround","trackHeightViaMutationObserver","namespace","setURL","handleURL","thirdParty","adgagement","sdk","handleThirdPartyConnection","info","isThirdPartyEnabledViaAPI","respond","visit","declareAdgagement","classList","Mixin","create","enableButtons","handleFormSubmissionError","DS","pageModel","modelFor","RehydratedSetting","shareUrl","facebookEnabled","isSocialSettingEnabled","twitterEnabled","emailEnabled","twitterText","getSocialSetting","emailBody","pinterestImage","htmlSource","RSVP","customMediaItemId","p","pinterestText","tokenContext","Promotion","Name","Organization","User","ReferralUrl","usingRehydration","querySelectorAll","prefixSettingValue","prefixSettingKey","SocialSharer","DesignTemplateModel","BaseModel","DesignTokenContent","_dec11","_dec12","_dec13","_dec14","belongsTo","_dec15","isEnabled","isDisabled","designToken","tokenCategory","category","DesignToken","DesignModel","hasMany","hostname","domainTypeId","statusTypeId","isPrimary","subdomain","isOldPlatform","EntryOutcomeModel","GameModel","importFileTypeId","originalFileName","KeywordAssignmentModel","KeywordModel","keywordText","loginRequestToken","logicTypeId","matchupLogic","isExtraChances","logicActionTypeId","pointsPerMatch","maximumMatches","matchupPlacingCriteriaId","matchupLogicConditions","startRank","endRank","ownerEntityType","ownerEntityId","dateCreated","dateModified","isInherited","matchupPlacingCriteria","tieBreakLogicTypeId","winnerMethodTypeId","winnerMethodType","tieBreakingLogicValue","MatchupSummary","count","matchupEntry","uniqueId","organizationUserId","birthDay","birthMonth","birthYear","firstName","middleName","gender","lastActivityDate","lastName","userId","userTypeId","addressSummary","isActive","affiliateId","organizationGuid","organizationTypeId","timeZoneId","organizationPromotions","OutcomeModel","formattedCumulativePercent","round","percentagePointsAverage","PollSubmissionEntryResult","pollSubmissionEntryId","question","questionOption","questionOptionResults","makeBooleanProperties","QuestionOptionOutcomeWeightModel","QuestionOptionPickModel","QuestionOptionResultModel","QuestionOptionModel","quizTransition","quizTransitions","questionOptions","adMatchupTypeId","QuestionModel","hasYoutubeVideo","videoUrl","hasVideoMediaItem","hasAudioMediaItem","useFadeInAnimation","displayOrderTransition","quizQuestionResponses","questions","indexOf","isMultiChoiceQuestion","q","isCorrect","markedCorrectOptionIds","correctOptionIds","pickedOptionIds","picked","isAd","questionType","sponsoredPost","sp","isBannerAd","isProgrammaticAd","QuizSubmissionModel","referredEntityTypeId","referredEntityId","organizationPromotionUser","password","expiresInSeconds","organizationUserGuid","organizationPromotionUserId","organizationPromotionUserGuid","isNewPlatformJoyrideComplete","thirdPartyId","thirdPartyUniqueUserId","organizationUsers","organization","Inflector","inflector","uncountable","numberOfWinners","promotion","templateTypeId","userDataEmailAddress","userDataFirstName","userDataLastName","userDataCity","userDataAddress1","userDataAddress2","userDataStateProvince","userDataPostalCode","userDataCountry","userDataGender","userDataPhone","userDataBirthDate","TransitionModel","peekRecord","Router","TalkerRouter","locationType","rootURL","route","path","ApplicationRoute","ConsumerApplicationRoute","EnterRoute","Route","redirect","replaceWith","EnterAccountRoute","HelpRoute","IndexRoute","forms","excludeSecondaryMatchups","formTypeId","excludeFormPages","currentRound","isReentering","formValues","formSubmitted","IneligibleRoute","LoginRoute","LoginTokenRoute","TokenRoute","OldThanksRoute","ReferralsIndexRoute","ReferralRoute","referrer_user_guid","ThanksRoute","mostRecentMatchup","reenterFormResult","rest","extractArray","onlyCodeWordOrEmailPage","userAttributeTypes","userAttributeTypeId","update","reminderEmailOptin","isReminderEmailConfirmed","hasMultipleMatchups","setupController","matchupLogics","referrals","shortenedLink","referralLinks","shortener","socialUrlShortener","referralRoute","referralUrl","_exception","shorten","didTransition","loading","SecondStreetSerializer","EmbeddedRecordsMixin","attrs","embedded","DesignSerializer","ApplicationSerializer","designTokenContents","keyForRelationship","entryFieldValues","mediaItems","normalizeCreateRecordResponse","primaryModelClass","requestType","form_page_submissions","LoginEmailRequestSerializer","login_email_requests","floor","random","orderLineItems","ordersTransactions","promotions","PromotionProductSerializer","promotionProductAttributes","questionOptionPicks","entryAtIndex","Service","Evented","watchSession","changingNominationFromEntry","changingNominationToEntryId","nominatingOnMatchupEntryId","hasEntries","hasNoEntries","entriesCount","previousEntry","mapBy","matchupFromUserEntries","matchupsWithUserSubmissions","uniqBy","force","isAlreadyLoading","filterByOrganizationPromotion","matchupEntries","refreshReminderEmailsUserAttributeTask","finally","ret","selectedMatchup","nominationEntries","writeinNominationsEligibility","clearEntries","hasCurrentNomination","isNominationAndVotingBallot","entriesEligibilityMetaData","lastUserEntry","beginChangingNomination","previousNominationEntry","toEntryId","endChangingNomination","beginNominating","endNominating","isOptimisticNominationForEntry","fromEntry","normalizedEntryId","relevantMatchupEntryForMatchup","autocompleteService","placesService","getBoundsFromRadius","radiusMeters","earthRadius","lat","lng","dLat","PI","dLng","cos","sw","LatLng","ne","LatLngBounds","types","promotionLocationRestriction","AutocompleteSuggestion","request","includedPrimaryTypes","radius","latitude","longitude","bounds","locationRestriction","suggestions","fetchAutocompleteSuggestions","suggestion","description","placePrediction","placeId","mainText","secondary_text","secondaryText","ERROR","i18nextInit","unknownProperty","keyName","blankMatch","interpolationPrefix","interpolationSuffix","i18next","resources","freeze","dev","translation","en","unsafeOptions","interpolation","escapeValue","addResource","addResources","deep","overwrite","optionsChanged","language","InMemoryStorage","inMemoryData","BrowserStorage","LocalStorageService","storage","testing","namespacedKey","promisify","tempString","tempStorage","catch","optional","attemptToLoadSessionWithLoginRequestToken","loginEmailRequest","loadedSession","initialQueryDelay","attemptLoginUsing","requestToken","_error","MomentOverride","MomentService","outputFormat","EmberScreen","isSmallAndUp","breakpoint","isMediumAndUp","isLargeAndUp","isExtraLargeAndUp","isExtraSmallAndDown","isSmallAndDown","isMediumAndDown","isLargeAndDown","userDataMapping","city","address1","address2","stateProvince","postalCode","country","phone","birthdate","__skipLoginAttempts","formIdQueue","lastAction","hasRecentAction","isAdgagement","isHandlingThirdPartyConnection","formIds","ids","concat","uniq","clearSession","rollbackAttributes","unloadRecord","handleNewSession","applicationAdapter","Authorization","handleFailedSession","isValidationError","isUsernameErrorOnly","removeHeader","handleDeletedSession","pushSession","sessionJson","sessionModel","serializerFor","storedToken","loadedSessions","loginEmailRequests","emailLoginRequestToken","querySessions","registerAction","startTime","queryDelay","fiveMinutes","wait","thirdPartyAuthSetting","thirdPartyLoginStrategy","uuid","additionalFields","matchesUUID","matchesThirdParty","done","record","spreadIf","thirdPartyConnection","prop","organizationUserFirstName","isAuthorized","isThirdParty","isLoggedOut","isEmbeddedRegex","domainQuery","organizationPromotionDomain","isEmbedded","regexResult","domains","existingDomainQuery","getLocation","link","search","primaryDomain","findPrimaryDomain","VotesService","gt","orgUserAttribute","nextRefresh","previouslyRefreshedAt","startOf","toDate","logger","log","voteIntervalStartDate","voteIntervalEndDate","isVoteInInterval","isVotingOpen","today","canVoteAgain","v","getVotes","bypassCache","allowPending","extractDatesFromMeta","refreshVotesTask","clearVotes","isVoteWrittenIn","noop","isAny","allowMultipleVotes","newVoteResult","_isDeletingVoteForMatchupEntryId","_isVotingOnMatchupEntryId","deletedVote","removeObject","currentVotesForMatchupEntry","item","isVoteForMatchupEntry","isCurrentlyVotedFor","recordWithMeta","extractDateFromMeta","eligibilityMetadata","voteEligibilityMetaData","underscore","isVoteForMatchup","focusableSelector","focusNextPrevIn","dir","focusableElements","focusIndex","activeElement","wasNotFocusedInModal","isFocusedAtBounds","focusNextIn","focusPreviousIn","lastFocus","keydownListener","keyCode","TAB","stopPropagation","shiftKey","listeners","keycodeListener","ua","tem","M","appName","splice","isNowBetweenAnyDates","arrayPath","beginDatePath","endDatePath","arr","ConfigUtil","_encode","fixColorContrast","base","getBodyOffsetHeight","getComputedBodyStyle","retVal","defaultView","left","runtimeStyle","currentStyle","pixelLeft","convertUnitsToPxForIE8","getBodyScrollHeight","scrollHeight","getDEOffsetHeight","getDEScrollHeight","getAllHeights","getMaxHeight","max","bodyOffset","documentElementOffset","documentScroll","documentElementScroll","grow","lowestElement","allElements","allElementsLength","maxBottomVal","getLowestElementHeight","BACKSPACE","ENTER","SHIFT","CTRL","ALT","PAUSE_BREAK","CAPS_LOCK","SPACE","PAGE_UP","PAGE_DOWN","END","HOME","LEFT","UP","RIGHT","DOWN","INSERT","DELETE","COMMAND","LEFT_COMMAND","RIGHT_COMMAND","NUMPAD_ASTERISK","NUMPAD_PLUS","NUMPAB_MINUS","NUMPAD_DOT","NUMPAD_SLASH","NUM_LOCK","SCROLL_LOCK","MY_COMPUTER","MY_CALCULATOR","SEMICOLON","EQUALS","COMMA","MINUS","DOT","SLASH","GRAVE","LEFT_BRACKET","BACKSLASH","RIGHT_BRACKET","QUOTE","origin","protocol","port","sortedMatchups","ms","metaFix","EmberObject","_talker","hasOwnProperty","_exportNames","theDefault","define","metaName","rawConfig","exports","decodeURIComponent","err","runningTests","require","assetHost"],"sources":["vendor/ember-cli/app-prefix.js","consumer-sweepstakes/adapters/application.ts","consumer-sweepstakes/app.js","consumer-sweepstakes/components/-dynamic-element-alt.js","consumer-sweepstakes/components/-dynamic-element.js","consumer-sweepstakes/components/dips-image.js","consumer-sweepstakes/components/dips-video.js","consumer-sweepstakes/components/email-verification-required.js","consumer-sweepstakes/components/ember-youtube.js","consumer-sweepstakes/components/form-field-error-and-help.js","consumer-sweepstakes/components/i18n-blank.js","consumer-sweepstakes/components/i18n-not-blank.js","consumer-sweepstakes/components/manual-date-input.js","consumer-sweepstakes/components/mycapture-classified.js","consumer-sweepstakes/components/nested-menu.js","consumer-sweepstakes/components/page-modal.js","consumer-sweepstakes/components/popup-button.js","consumer-sweepstakes/components/simple-flyout.js","consumer-sweepstakes/components/ss-facebook-like-box.js","consumer-sweepstakes/components/ss-file-upload.js","consumer-sweepstakes/components/ss-form-entry-registration.ts","consumer-sweepstakes/components/ss-form-field-captcha.ts","consumer-sweepstakes/components/ss-form-field-checkboxes.js","consumer-sweepstakes/components/ss-form-field-codeword.js","consumer-sweepstakes/components/ss-form-field-custom-date-input.js","consumer-sweepstakes/components/ss-form-field-display-text.js","consumer-sweepstakes/components/ss-form-field-email-textbox.js","consumer-sweepstakes/components/ss-form-field-extra-chances.js","consumer-sweepstakes/components/ss-form-field-facebook-like-api.js","consumer-sweepstakes/components/ss-form-field-facebook-link.js","consumer-sweepstakes/components/ss-form-field-google-place.js","consumer-sweepstakes/components/ss-form-field-image-select.js","consumer-sweepstakes/components/ss-form-field-instagram.js","consumer-sweepstakes/components/ss-form-field-mobile-app.js","consumer-sweepstakes/components/ss-form-field-number-input.js","consumer-sweepstakes/components/ss-form-field-optin.js","consumer-sweepstakes/components/ss-form-field-radio-buttons.js","consumer-sweepstakes/components/ss-form-field-select-single.js","consumer-sweepstakes/components/ss-form-field-single-checkbox.js","consumer-sweepstakes/components/ss-form-field-smart-speaker-skill.js","consumer-sweepstakes/components/ss-form-field-textarea.js","consumer-sweepstakes/components/ss-form-field-textbox.js","consumer-sweepstakes/components/ss-form-field-tik-tok-link.ts","consumer-sweepstakes/components/ss-form-field-twitter-follow-api.js","consumer-sweepstakes/components/ss-form-field-twitter-tweet-api.js","consumer-sweepstakes/components/ss-form-field-url-textbox.js","consumer-sweepstakes/components/ss-form-field-video-select.js","consumer-sweepstakes/components/ss-form-field-watch-video.js","consumer-sweepstakes/components/ss-form-field-web-link.js","consumer-sweepstakes/components/ss-form-field-xlink.ts","consumer-sweepstakes/components/ss-form-field-you-tube-link.ts","consumer-sweepstakes/components/ss-form-field.js","consumer-sweepstakes/components/ss-form-page-entry-registration.ts","consumer-sweepstakes/components/ss-form-page.ts","consumer-sweepstakes/components/ss-form.ts","consumer-sweepstakes/components/ss-img.js","consumer-sweepstakes/components/ss-radio.js","consumer-sweepstakes/components/ss-select.js","consumer-sweepstakes/components/ss-twitter-tweet.js","consumer-sweepstakes/components/ss-video.js","consumer-sweepstakes/components/stripe-form.ts","consumer-sweepstakes/components/sweepstakes-matchup.js","consumer-sweepstakes/components/twitter-follow.js","consumer-sweepstakes/components/ui/material-spinner.js","consumer-sweepstakes/components/vote-button.js","consumer-sweepstakes/components/wormholed-share-list.js","consumer-sweepstakes/components/youtube-video.js","consumer-sweepstakes/controllers/application.js","consumer-sweepstakes/controllers/index.ts","consumer-sweepstakes/controllers/login/index.js","consumer-sweepstakes/controllers/thanks.js","consumer-sweepstakes/helpers/app-version.js","consumer-sweepstakes/helpers/compare.js","consumer-sweepstakes/helpers/get-property.js","consumer-sweepstakes/helpers/i18n-t.js","consumer-sweepstakes/helpers/math.js","consumer-sweepstakes/helpers/page-title.js","consumer-sweepstakes/helpers/pluralize.js","consumer-sweepstakes/helpers/singularize.js","consumer-sweepstakes/initializers/app-version.js","consumer-sweepstakes/initializers/container-debug-adapter.js","consumer-sweepstakes/initializers/ember-cli-mirage.js","consumer-sweepstakes/initializers/ember-data.js","consumer-sweepstakes/initializers/export-application-global.js","consumer-sweepstakes/initializers/promotion-contents.js","consumer-sweepstakes/instance-initializers/ember-data.js","consumer-sweepstakes/instance-initializers/facebook.js","consumer-sweepstakes/instance-initializers/iframe.js","consumer-sweepstakes/mixins/form-page-route.js","consumer-sweepstakes/mixins/referral-share-list.js","consumer-sweepstakes/mixins/rehydrated-setting.js","consumer-sweepstakes/mixins/social-sharer.js","consumer-sweepstakes/models/design-template.ts","consumer-sweepstakes/models/design-token-content.js","consumer-sweepstakes/models/design-token.js","consumer-sweepstakes/models/design.ts","consumer-sweepstakes/models/domain.js","consumer-sweepstakes/models/entry-outcome.ts","consumer-sweepstakes/models/form-field-group.js","consumer-sweepstakes/models/form-submission-entry.js","consumer-sweepstakes/models/game.js","consumer-sweepstakes/models/import-file.js","consumer-sweepstakes/models/keyword-assignment.ts","consumer-sweepstakes/models/keyword.ts","consumer-sweepstakes/models/login-email-request.js","consumer-sweepstakes/models/login-request-session.js","consumer-sweepstakes/models/matchup-logic-condition.js","consumer-sweepstakes/models/matchup-logic.js","consumer-sweepstakes/models/matchup-place.js","consumer-sweepstakes/models/matchup-placing-criteria.js","consumer-sweepstakes/models/matchup-summary.js","consumer-sweepstakes/models/nomination-entries-summary.js","consumer-sweepstakes/models/nomination.js","consumer-sweepstakes/models/organization-promotion-user.js","consumer-sweepstakes/models/organization-user.js","consumer-sweepstakes/models/organization.js","consumer-sweepstakes/models/outcome.ts","consumer-sweepstakes/models/poll-submission-entry-result.ts","consumer-sweepstakes/models/poll-submission.js","consumer-sweepstakes/models/promotion.ts","consumer-sweepstakes/models/question-option-outcome-weight.ts","consumer-sweepstakes/models/question-option-pick.ts","consumer-sweepstakes/models/question-option-result.ts","consumer-sweepstakes/models/question-option.ts","consumer-sweepstakes/models/question.ts","consumer-sweepstakes/models/quiz-submission.ts","consumer-sweepstakes/models/referral.js","consumer-sweepstakes/models/session.js","consumer-sweepstakes/models/sweepstakes.js","consumer-sweepstakes/models/template-token.js","consumer-sweepstakes/models/third-party-user-connection.js","consumer-sweepstakes/models/transition.ts","consumer-sweepstakes/router.js","consumer-sweepstakes/routes/application.js","consumer-sweepstakes/routes/enter.js","consumer-sweepstakes/routes/enter/account.js","consumer-sweepstakes/routes/enter/index.js","consumer-sweepstakes/routes/help.js","consumer-sweepstakes/routes/index.js","consumer-sweepstakes/routes/ineligible.js","consumer-sweepstakes/routes/login.js","consumer-sweepstakes/routes/login/index.js","consumer-sweepstakes/routes/login/token.js","consumer-sweepstakes/routes/old-thanks.js","consumer-sweepstakes/routes/referrals/index.js","consumer-sweepstakes/routes/referrals/referral.js","consumer-sweepstakes/routes/thanks.js","consumer-sweepstakes/serializers/design-token-content.js","consumer-sweepstakes/serializers/design.js","consumer-sweepstakes/serializers/entry.js","consumer-sweepstakes/serializers/field.js","consumer-sweepstakes/serializers/form-field.js","consumer-sweepstakes/serializers/form-page-submission.js","consumer-sweepstakes/serializers/form.js","consumer-sweepstakes/serializers/login-email-request.js","consumer-sweepstakes/serializers/login-request-session.js","consumer-sweepstakes/serializers/matchup-group.js","consumer-sweepstakes/serializers/order.js","consumer-sweepstakes/serializers/organization-promotion.js","consumer-sweepstakes/serializers/organization.js","consumer-sweepstakes/serializers/poll-submission-entry-result.js","consumer-sweepstakes/serializers/poll-submission.js","consumer-sweepstakes/serializers/promotion-product.ts","consumer-sweepstakes/serializers/quiz-submission.js","consumer-sweepstakes/serializers/session.js","consumer-sweepstakes/serializers/third-party-user-connection.js","consumer-sweepstakes/services/entries.js","consumer-sweepstakes/services/google-maps.js","consumer-sweepstakes/services/i18n.js","consumer-sweepstakes/services/local-storage.ts","consumer-sweepstakes/services/login-request.js","consumer-sweepstakes/services/moment.js","consumer-sweepstakes/services/screen.js","consumer-sweepstakes/services/session.js","consumer-sweepstakes/services/social-url-shortener.js","consumer-sweepstakes/services/votes.js","consumer-sweepstakes/utils/accessibility.js","consumer-sweepstakes/utils/browser-version.js","consumer-sweepstakes/utils/computed.js","consumer-sweepstakes/utils/config.js","consumer-sweepstakes/utils/encode.js","consumer-sweepstakes/utils/fix-color-contrast.js","consumer-sweepstakes/utils/height.js","consumer-sweepstakes/utils/keycodes.js","consumer-sweepstakes/utils/local-full-url.js","consumer-sweepstakes/utils/matchups.ts","consumer-sweepstakes/utils/most-current-matchup.js","consumer-sweepstakes/utils/promises.js","consumer-sweepstakes/utils/root-url.js","consumer-sweepstakes/utils/sanitize-meta.js","consumer-sweepstakes/utils/talker.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["'use strict';\n\n\n","// @ts-ignore\nimport ENV from '../config/environment';\nimport CommonAdapter from 'secondstreet-common/adapters/common-adapter';\nimport config from 'consumer/utils/config';\nimport { inject as service } from '@ember/service';\nimport type DataService from 'consumer/services/data';\nimport type Store from '@ember-data/store';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport { ModelSchema } from 'ember-data';\n// eslint-disable-next-line ember/use-ember-data-rfc-395-imports\nimport type ModelRegistry from 'ember-data/types/registries/model';\n\nconst skipCache = ['matchup-entry', 'winner', 'media-item', 'entity-link', 'design', 'design-template', 'theme'];\n\nexport default class ApplicationAdapter extends CommonAdapter {\n  @service declare data: DataService;\n  @service declare session: any;\n\n  namespace = config().apiNamespace;\n  host = config().apiHost;\n  headers = {\n    'X-Api-Key': config().apiKey,\n    'X-Referring-Url': window.location.href,\n    'X-Organization-Id': ENV.APP.config.organizationId,\n    'X-Promotion-Id': ENV.APP.config.promotionId,\n    'X-Organization-Promotion-Id': ENV.APP.config.organizationPromotionId,\n  };\n\n  findAll(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.findAll(store, type, ...args);\n  }\n\n  findRecord(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.findRecord(store, type, ...args);\n  }\n\n  query(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.query(store, type, ...args);\n  }\n\n  queryRecord(store: Store, type: ModelSchema, ...args: any) {\n    if (this.data.useCachedData && !skipCache.includes(type.modelName as string)) {\n      return this.getPreviewData(type.modelName);\n    }\n    // @ts-ignore\n    return super.queryRecord(store, type, ...args);\n  }\n\n  private getPreviewData(modelName: keyof ModelRegistry) {\n    const name = this.pathForType(modelName);\n    return this.data.talker.send(name).then((response: any) => {\n      const result = {\n        [name]: response.data.payload,\n      };\n      return result;\n    });\n  }\n}\n","import Application from '@ember/application';\nimport loadInitializers from 'ember-load-initializers';\nimport Resolver from 'ember-resolver';\n\nimport config from './config/environment';\n\nexport default class App extends Application {\n  modulePrefix = config.modulePrefix;\n  podModulePrefix = config.podModulePrefix;\n  Resolver = Resolver;\n}\n\nloadInitializers(App, config.modulePrefix);\n","import Component from '@glimmer/component';\n\n// This component is not needed anymore. However we can only safely remove it once we have an Embroider release that\n// has the special dependency rule for this addon removed:\n// https://github.com/embroider-build/embroider/blob/4fad67f16f811e7f93199a1ee92dba8254c42978/packages/compat/src/addon-dependency-rules/ember-element-helper.ts\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class DynamicElementAlt extends Component {}\n","import Component from '@glimmer/component';\n\n// This component is not needed anymore. However we can only safely remove it once we have an Embroider release that\n// has the special dependency rule for this addon removed:\n// https://github.com/embroider-build/embroider/blob/4fad67f16f811e7f93199a1ee92dba8254c42978/packages/compat/src/addon-dependency-rules/ember-element-helper.ts\n// eslint-disable-next-line ember/no-empty-glimmer-component-classes\nexport default class DynamicElement extends Component {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\nimport { run } from '@ember/runloop';\n/**\n * @param is-retina {Boolean} If true, this will request an image at double size, but display it as a number of CSS pixels as specified in `width` and `height`.\n */\nexport default Component.extend({\n  //region Ember Hooks\n  tagName: 'img',\n  attributeBindings: ['width', 'height', 'src', 'alt', 'cropmode', 'anchor'],\n  classNameBindings: ['orientationClass'],\n\n  didRender() {\n    this._super(...arguments);\n    this.onLoadCallback = () => {\n      // This sets orientationClass which in turn adds the value\n      // as a CSS class to the component's <img> element\n      run(() => {\n        this.setOrientation();\n      });\n    };\n    this.element.addEventListener('load', this.onLoadCallback);\n    this.element.onerror = () => {\n      if (this['alt-src']) {\n        set(this, 'src', this['alt-src']);\n      }\n    };\n  },\n\n  willDestroyElement() {\n    this._super(...arguments);\n    this.element.removeEventListener('load', this.onLoadCallback);\n  },\n  //endregion\n\n  //region Attributes\n  /**\n   * @type {String}\n   */\n  'dips-url': null,\n  'media-item-id': null,\n  'external-source': null,\n  width: null,\n  height: null,\n  alt: null,\n  cropmode: null,\n  anchor: null,\n  'is-retina': false,\n  //endregion\n\n  //region Methods\n  /**\n   * Sets the orientationClass variable which is a bound classname,\n   * resulting in a class of \"square\", \"landscape\", or \"portrait\"\n   * being added to the <img>'s class attribute.\n   */\n  setOrientation() {\n    const width = this.element.offsetWidth;\n    const height = this.element.offsetHeight;\n\n    if (width === height) {\n      set(this, 'orientationClass', 'square');\n    } else if (width > height) {\n      set(this, 'orientationClass', 'landscape');\n    } else {\n      set(this, 'orientationClass', 'portrait');\n    }\n  },\n  //endregion\n\n  //region Computed Properties\n  src: computed('dips-url', 'media-item-id', 'width', 'height', 'cropmode', 'anchor', 'is-retina', function () {\n    const dipsUrl = get(this, 'dips-url');\n    const mediaItemId = get(this, 'media-item-id');\n    const externalSource = get(this, 'external-source') || '';\n    const { width, height, cropmode, anchor } = this;\n    const multiplier = get(this, 'is-retina') ? 2 : 1;\n    const queryString = [\n      width ? `width=${width * multiplier}` : null,\n      height ? `height=${height * multiplier}` : null,\n      cropmode ? `cropmode=${cropmode}` : null,\n      anchor ? `anchor=${anchor}` : null,\n    ]\n      .compact()\n      .join('&');\n    if (dipsUrl && mediaItemId) {\n      return `//${dipsUrl}/${mediaItemId}?${queryString}`;\n    }\n    return externalSource;\n  }),\n  //endregion\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\nimport { cancel, later } from '@ember/runloop';\nimport ENV from 'ember-get-config';\n\nconst FAILED_VIDEO_POLLING_DELAY_SECONDS = 10;\nconst MAX_ATTEMPTS = ENV.environment === 'test' ? 0 : 50;\n\nexport default Component.extend({\n  //region Ember Hooks\n  attributeBindings: ['width', 'height', 'src'],\n\n  willDestroyElement() {\n    this._super(...arguments);\n    cancel(this.tryAgainTimer);\n    const video = this.element.querySelector('video');\n    video.removeEventListener('seeking', this.onVideoSeek);\n    video.removeEventListener('timeupdate', this.onVideoTimeUpdate);\n    video.removeEventListener('ended', this.onVideoEnded);\n    video.removeEventListener('loadeddata', this.onVideoLoadedData);\n  },\n\n  didInsertElement() {\n    this._super(...arguments);\n\n    this.attemptVideo();\n    if (get(this, 'disable-seeking')) {\n      this.disableSeeking();\n    }\n  },\n\n  didReceiveAttrs() {\n    this._super();\n    const video = this.element?.querySelector('video');\n    if (!get(this, 'disable-seeking') && video) {\n      video.removeEventListener('seeking', this.onVideoSeek);\n    }\n  },\n\n  //endregion\n\n  //region Attributes\n  'dips-url': null,\n  'media-item-id': null,\n  'disable-seeking': false,\n  'video-watched'() {},\n\n  width: computed('height', {\n    get() {\n      if (this._width) {\n        return this._width;\n      }\n\n      return this.height ? null : 300;\n    },\n\n    set(_key, value) {\n      return (this._width = value);\n    },\n  }),\n\n  height: null,\n  /**\n   * Pass in string \"autoplay\" in handlebars if you would like the video to auto-play on page load\n   */\n  'auto-play': '',\n  //endregion\n\n  //region Properties\n  /**\n   * How many times has the video failed to load?\n   * @private\n   * @type {Number}\n   */\n  attempts: 0,\n  maxAttempts: MAX_ATTEMPTS,\n  videoReady: false,\n  //endregion\n\n  //region Computed Properties\n  src: computed('dips-url', 'media-item-id', 'width', 'height', function () {\n    const dipsUrl = get(this, 'dips-url');\n    const mediaItemId = get(this, 'media-item-id');\n    const { width, height } = this;\n    const queryString = [width ? `width=${width}` : null, height ? `height=${height}` : null].compact().join('&');\n    if (dipsUrl && mediaItemId) {\n      return `//${dipsUrl}/videos/${mediaItemId}?${queryString}`;\n    }\n    return;\n  }),\n  /**\n   * The image URL representing the initial frame displayed for the video before clicking play\n   * We incorporate \"attempts\" because a video tag's poster image has no .load() message like the video file itself does.\n   * Bumping the \"attempts\" query paraming makes sure we're periodically refreshing the poster image.\n   */\n  poster: computed('dips-url', 'media-item-id', 'width', 'attempts', function () {\n    const { width } = this;\n    const queryString = width ? `width=${width}` : null;\n    return `//${get(this, 'dips-url')}/${get(this, 'media-item-id')}?${queryString}&attempts=${this.attempts}`;\n  }),\n  //endregion\n\n  //region Methods\n  attemptVideo() {\n    if (!this.videoReady && this.attempts < this.maxAttempts) {\n      const video = this.element.querySelector('video');\n      this.onVideoLoadedData = () => {\n        set(this, 'videoReady', true);\n      };\n      // the loadeddata event on a video tag is fired when the data for the current frame is loaded. This is a way for us\n      // to know there have not been any errors and the video is ready to be played.\n      video.addEventListener('loadeddata', this.onVideoLoadedData);\n      video.load();\n      this.incrementProperty('attempts');\n      const timer = later(this, this.attemptVideo.bind(this), FAILED_VIDEO_POLLING_DELAY_SECONDS * 1000);\n      set(this, 'tryAgainTimer', timer);\n    } else {\n      return false;\n    }\n  },\n  disableSeeking() {\n    const video = this.element.querySelector('video');\n    let supposedCurrentTime = 0;\n    let highestTime = 0;\n\n    this.onVideoSeek = () => {\n      const delta = video.currentTime - supposedCurrentTime;\n      if (Math.abs(delta) > 0.01 && video.currentTime > supposedCurrentTime && video.currentTime > highestTime) {\n        video.currentTime = supposedCurrentTime;\n      }\n    };\n\n    this.onVideoEnded = () => (supposedCurrentTime = 0);\n\n    this.onVideoTimeUpdate = () => {\n      if (!video.seeking) {\n        highestTime = video.currentTime > highestTime ? video.currentTime : highestTime;\n        supposedCurrentTime = video.currentTime;\n      }\n    };\n\n    video.addEventListener('timeupdate', this.onVideoTimeUpdate);\n    // prevent user from seeking\n    video.addEventListener('seeking', this.onVideoSeek);\n    // reset state to allow for rewatching\n    video.addEventListener('ended', this.onVideoEnded);\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  tagName: '',\n});\n","import EmberYoutube from 'ember-youtube/components/ember-youtube';\n\nexport default EmberYoutube;\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nexport { default } from 'consumer/components/form-field-error-and-help';\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { observer, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\n/**\n * Renders a block if the translation key is blank\n * @param {String} key - The translation key to look up\n * @param {String} [options] - An optional hash of options to pass to the translation\n * @type {Ember.Component}\n * @see {@link consumer/components/i18n-not-blank}\n */\nexport default Component.extend({\n  i18n: service(),\n  shouldShowOrHide: observer('key', 'options', function () {\n    set(this, 'isVisible', this.i18n.blank(this.key, this.options));\n  }),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { observer, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\n/**\n * Renders a block if the translation key is *not* blank\n * @param {String} key - The translation key to look up\n * @param {String} [options] - An optional hash of options to pass to the translation\n * @type {Ember.Component}\n * @see {@link consumer/components/i18n-blank}\n */\nexport default Component.extend({\n  i18n: service(),\n  shouldShowOrHide: observer('key', 'options', function () {\n    set(this, 'isVisible', !this.i18n.blank(this.key, this.options));\n  }),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set, setProperties } from '@ember/object';\nimport { isBlank } from '@ember/utils';\n\nconst isInt = str => !Number.isNaN(parseInt(str, 10));\nconst dateFrom = (yyyy, mm, dd) => {\n  if ([yyyy, mm, dd].some(x => isBlank(x) || !isInt(x))) {\n    return null;\n  }\n  const iso8601 = `${yyyy}-${mm}-${dd}`;\n  const date = new Date(iso8601);\n  if (!(date instanceof Date) || Number.isNaN(date.getTime())) {\n    return null;\n  }\n  return iso8601;\n};\n\n/**\n * @arg {String?} value\n * @arg {Boolean} required\n * @arg {Function} onValidDate - Receives the new value as an argument.\n * @arg {Function} onReset - Receives an empty string as an argument.\n * @arg {String?} inputClass - Rendered to each of the three inputs' HTML.\n */\nexport default Component.extend({\n  //region Ember Hooks\n  didReceiveAttrs() {\n    this._super(...arguments);\n    if (this.value !== this._previousValue) {\n      this.valueUpdated();\n    }\n  },\n  //endregion\n\n  //region Computed Properties\n  _previousValue: null,\n  // The Date parser takes into account locale-based formatting, so we can try a date\n  // that ONLY works in DD/MM/YYYY format to detect if that's probably the user's norm.\n  _usesDDMMYYYY: !Number.isNaN(new Date('31/12/2000').getTime()),\n  day: '',\n  month: '',\n  year: '',\n  //region\n\n  //region Methods\n  checkAndSendDate() {\n    const checked = dateFrom(this.year, this.month, this.day);\n    if (checked) {\n      return this.onValidDate(checked);\n    }\n    if (!this.day && !this.month && !this.year) {\n      return this.onReset('');\n    }\n  },\n  valueUpdated() {\n    const date = new Date(this.value);\n    setProperties(this, {\n      day: date.getUTCDate() || '',\n      month: date.getUTCMonth() + 1 || '',\n      year: date.getUTCFullYear() || '',\n      _previousValue: this.value,\n    });\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    dayChanged({ target: { value } }) {\n      set(this, 'day', value);\n      this.checkAndSendDate();\n    },\n    monthChanged({ target: { value } }) {\n      set(this, 'month', value);\n      this.checkAndSendDate();\n    },\n    yearChanged({ target: { value } }) {\n      set(this, 'year', value);\n      this.checkAndSendDate();\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Ember Hooks\n  attributeBindings: ['data-test'],\n  //endregion\n\n  //region Attributes\n  /**\n   * @type {String}\n   */\n  domain: null,\n  /**\n   * @type {String}\n   */\n  'pricing-sheet-id': null,\n  /**\n   * @type {Boolean}\n   */\n  'is-enabled': null,\n  /**\n   * @type {String}\n   */\n  'dips-url': null,\n  /**\n   * @type {Number}\n   */\n  'media-item-id': null,\n  /**\n   * @type {String}\n   */\n  'back-url': null,\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { equal } from '@ember/object/computed';\n\nexport default Component.extend({\n  //region Attributes\n  /**\n   * The model entity that will serve as the menu's parent\n   * @type {Object}\n   */\n  parent: null,\n  theme: null,\n  classNames: ['nested-menu'],\n  classNameBindings: ['isDark:nested-menu--dark', 'collapsable-parents:nested-menu--collapsable'],\n  'collapsable-parents': true,\n  //endregion\n\n  //region Properties\n  isExpanded: false,\n  //endregion\n\n  //region Computed Properties\n  isDark: equal('theme', 'dark'),\n  //endregion\n});\n","/* eslint-disable ember/no-incorrect-calls-with-inline-anonymous-functions, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, set, setProperties } from '@ember/object';\nimport { scheduleOnce } from '@ember/runloop';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport $ from 'jquery';\n\nimport { FocusConstrainer, KeyListener } from '../utils/accessibility';\nimport { ESC } from '../utils/keycodes';\nimport { htmlSafe } from '@ember/template';\nimport { sanitize } from 'secondstreet-common/utils/replace-tokens';\n\n/**\n * To be mixed into ApplicationViews, and used in tandem with the ModalRoute mixin.\n * @type {Ember.Mixin}\n */\nexport default Component.extend({\n  //region Dependencies\n  store: service(),\n  current: service(),\n  //endregion\n\n  //region Ember Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    $(document.body).on('click.SecondStreet', '*[data-design-template-type-id]', event => {\n      const designTemplateTypeId = parseInt(event.target.getAttribute('data-design-template-type-id'), 10);\n      run(() => this.loadAndShowPage(designTemplateTypeId));\n    });\n  },\n  willDestroyElement() {\n    this._super(...arguments);\n    $(document.body).off('click.SecondStreet');\n  },\n  show: false,\n  //endregion\n\n  //region Properties\n  html: '',\n  /**\n   * @property {FocusConstrainer}\n   */\n  focusConstrainer: computed(() => new FocusConstrainer()),\n  /**\n   * @property {KeyListener}\n   */\n  keyListener: computed(() => new KeyListener()),\n  //endregion\n\n  //region Methods\n  /**\n   * @param {String|Number} designTemplateTypeId\n   * @returns {RSVP.Promise} - Resolves with a string of HTML that is the Design Rendered Content\n   */\n  async loadPage(designTemplateTypeId) {\n    const relevantDesign = await this.store.queryRecord('design', {\n      designTemplateType: designTemplateTypeId,\n      BypassCache: true,\n      IncludeTokenContent: true,\n    });\n    const designTemplate = await relevantDesign.get('designTemplate');\n    return { design: relevantDesign, designTemplate };\n  },\n  /**\n   * @param {String|Number} designTemplateTypeId\n   * @param {Boolean} isNonCloseable\n   */\n  async loadAndShowPage(designTemplateTypeId) {\n    const result = this.current?.data?.legalDesigns?.findBy(\n      'designTemplate.designTemplateTypeId',\n      designTemplateTypeId\n    );\n    if (result?.designTemplate?.get('isCustomUrl')) {\n      window.open(result?.designTemplate?.get('redirectLink'));\n    } else {\n      const sanitizedHtml = sanitize(result?.renderedContent || '');\n      setProperties(this, { html: htmlSafe(sanitizedHtml.body.innerHTML), show: true });\n    }\n    // Double schedule -- once because it's necessary for Ember, and another\n    // because of {{ember-wormhole}}.\n    scheduleOnce('afterRender', () => {\n      scheduleOnce('afterRender', () => {\n        this.focusConstrainer.configure(document.getElementById('ssModalContainer')).begin();\n        this.keyListener\n          .configure({\n            [ESC]: () => this.hide(),\n          })\n          .begin();\n      });\n    });\n  },\n\n  hide() {\n    set(this, 'show', false);\n    this.focusConstrainer.end();\n    this.keyListener.end();\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    hide() {\n      this.hide();\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Properties\n  useAnchor: false,\n  //endregion\n\n  //region Methods\n  click() {\n    this.set('didClick', true);\n    if (this.useAnchor) {\n      const anchor = document.createElement('a');\n      anchor.href = this.url;\n      anchor.target = '_blank';\n      document.getElementsByTagName('body')[0].appendChild(anchor);\n      anchor.click();\n    } else {\n      window.open(\n        this.url,\n        '_blank',\n        'centerScreen=1,menubar=0,toolbar=0,personalbar=0,status=0,dialog=1,height=620,width=640'\n      );\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set } from '@ember/object';\nimport { or } from '@ember/object/computed';\nimport { next } from '@ember/runloop';\nimport $ from 'jquery';\n\nexport default Component.extend({\n  classNames: ['simple-flyout'],\n  //region Attributes\n  'force-open': false,\n  'is-open': false,\n  //endregion\n\n  //region Ember Hooks\n  didRender() {\n    this._super(...arguments);\n    this.handleBodyClicks();\n  },\n  click(ev) {\n    const isChild = this.element.contains(ev.target);\n    const bubble = true;\n    const capture = false;\n    if (ev.target.matches('input[type=file]')) {\n      set(this, 'shouldNotClose', true);\n      return bubble;\n    } else if (this['is-open']) {\n      return isChild ? capture : bubble;\n    }\n    return bubble;\n  },\n  //endregion\n\n  //region Properties\n  /**\n   * Sometimes we don't want the flyout to close. For example, file upload buttons force us to bubble the event which\n   * would cause body clicks to be detected and the flyout would close.\n   * @type {Boolean}\n   */\n  shouldNotClose: false,\n  //endregion\n\n  //region Computed Properties\n  show: or('is-open', 'force-open'),\n  //endregion\n\n  //region Methods\n  handleBodyClicks() {\n    $('body')\n      .off('click.simpleFlyout')\n      .one('click.simpleFlyout', () => {\n        // Bypass the flyout-close, then create a new event handler because this one has already been triggered.\n        if (this.shouldNotClose) {\n          set(this, 'shouldNotClose', false);\n          this.handleBodyClicks();\n        } else if (!this.isDestroyed) {\n          this.open(false);\n        }\n      });\n  },\n  //endregion\n\n  actions: {\n    trigger() {\n      next(() => this.open(!this['is-open'])); // Do this after click()\n    },\n  },\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\n/* globals FB */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Properties\n  href: '',\n  colorScheme: 'light',\n  showFaces: 'false',\n  header: 'false',\n  stream: 'false',\n  showBorder: 'false',\n  hideCover: 'true',\n  smallHeader: 'true',\n  //endregion\n\n  didInsertElement() {\n    this._super(...arguments);\n    // This forces like boxes to render after FB has initialized\n    if (window.FB) {\n      FB.XFBML.parse();\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { getOwner } from '@ember/application';\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\nimport { equal, or } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport $ from 'jquery';\nimport flatten from 'lodash/flatten';\n\nimport ENV from '../config/environment';\nimport ImportFile from '../models/import-file';\nimport MediaItem from '../models/media-item';\nimport { VIDEO_FILE_FORMATS } from 'consumer/utils/constants';\n\nconst imageFileExtensions = ['.jpg', '.jpeg', '.gif', '.png'];\n\nconst videoFileExtensions = [\n  '.3gp',\n  '.asf',\n  '.avi',\n  '.divx',\n  '.dv',\n  '.flv',\n  '.mkv',\n  '.mov',\n  '.mp4',\n  '.mpg',\n  '.mpeg',\n  '.mpeg-ps',\n  '.ts',\n  '.mxf',\n  '.ogg',\n  '.ogv',\n  '.wmv',\n];\n/**\n * File upload component.\n * @type {Ember.Component}\n */\nexport default Component.extend({\n  session: service(),\n\n  tagName: 'form',\n  classNames: ['ssFileUploadForm'],\n  attributeBindings: ['action', 'enctype', 'target', 'method'],\n  enctype: 'multipart/form-data',\n  method: 'post',\n  currentlyUploading: false,\n  accept: 'image/*',\n  allowCapture: false,\n  /**\n   * Pass in false if you want to opt out of the ss-file-upload's default button styling\n   */\n  'is-button': true,\n\n  //region Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    this.buildAjaxUploader();\n  },\n  //endregion\n\n  //region Computed Properties\n  imagesOnly: equal('accept', 'image/*'),\n  videosOnly: equal('accept', `${VIDEO_FILE_FORMATS}`),\n  imagesOrVideoOnly: equal('accept', `${VIDEO_FILE_FORMATS},image/*`),\n  validFileTypes: computed('imagesOnly', 'videosOnly', 'imagesOrVideoOnly', 'accept', function () {\n    if (this.imagesOnly) {\n      return imageFileExtensions.join(',');\n    } else if (this.videosOnly) {\n      return videoFileExtensions.join(',');\n    } else if (this.imagesOrVideoOnly) {\n      return [...imageFileExtensions, ...videoFileExtensions].join(',');\n    }\n    return this.accept;\n  }),\n  isMediaItem: or('imagesOnly', 'videosOnly', 'imagesOrVideoOnly'),\n\n  file: null,\n\n  action: computed('file', function () {\n    if (!this.file) {\n      return;\n    }\n    const fileExtension = this.getFileExtension(this.file.name);\n    const apiEndpoint = videoFileExtensions.includes(fileExtension)\n      ? 'media_items?MediaType=3'\n      : imageFileExtensions.includes(fileExtension)\n      ? 'media_items'\n      : 'audience_import_files';\n    return `${ENV.APP.config.apiHost}/${ENV.APP.config.apiNamespace}/${apiEndpoint}`;\n  }),\n  //endregion\n\n  //region Methods\n  buildAjaxUploader() {\n    const pluralizedJsonItemType = this.isMediaItem ? 'media_items' : 'import_files';\n\n    this.element.onchange = event => {\n      const { files } = event.target;\n      if (files.length > 0) {\n        set(this, 'file', files[0]);\n\n        if (this.isValidFile(this.file.name)) {\n          this.clearModelErrors();\n          this.prepareFileUpload();\n          const data = new FormData();\n          data.append('file', this.file);\n          $.ajax({\n            type: 'POST',\n            url: this.action,\n            contentType: false,\n            processData: false,\n            data,\n            headers: getOwner(this).lookup('adapter:application').headers,\n            success: uploadResponse => {\n              this.uploadingAction(this.file);\n              const [mediaItemJSON] = JSON.parse(uploadResponse)[pluralizedJsonItemType];\n              this.successfulFileUpload(mediaItemJSON);\n            },\n            error: errors => {\n              this.failedFileUpload(errors, this);\n            },\n          });\n        } else {\n          const itemType = this.isMediaItem ? 'mediaItem' : 'importFile';\n          const propertyName = get(this, 'propertyName') || `${itemType}Id`;\n          this.addModelError(propertyName, `Invalid file type. Valid file types include: ${this.validFileTypes}`);\n        }\n      }\n    };\n  },\n  prepareFileUpload() {\n    set(this, 'problemUploading', false);\n    set(this, 'currentlyUploading', true);\n  },\n  successfulFileUpload(responseJSON) {\n    const jsonApiDocument = getOwner(this)\n      .lookup('serializer:application')\n      .normalize(this.isMediaItem ? MediaItem : ImportFile, responseJSON);\n    jsonApiDocument.data.type = this.isMediaItem ? 'media-item' : 'import-file';\n    const responseItem = getOwner(this).lookup('service:store').push(jsonApiDocument);\n\n    this.addingFile(responseItem);\n    set(this, 'currentlyUploading', false);\n    /**\n     * We are rerendering here to reset the file input, which is unusually complex to do otherwise...\n     */\n    this.rerender();\n\n    // Reset the form so it can detect if the same file is uploaded twice in a row:\n    this.element.reset();\n\n    return responseItem;\n  },\n  failedFileUpload(errors, fileUploader) {\n    set(this, 'problemUploading', true);\n    set(this, 'currentlyUploading', false);\n\n    const itemType = this.isMediaItem ? 'mediaItem' : 'importFile';\n    const propertyName = get(fileUploader, 'propertyName') || `${itemType}Id`;\n    fileUploader.addModelError(propertyName, get(JSON.parse(errors.responseText).errors, 'firstObject.message'));\n\n    // Reset the form so it can detect if the same file is uploaded twice in a row:\n    this.element.reset();\n  },\n  getFileExtension(fileName) {\n    if (fileName) {\n      return fileName.substring(fileName.lastIndexOf('.')).toLowerCase();\n    }\n    return null;\n  },\n  isValidFile(fileName) {\n    const fileExtension = this.getFileExtension(fileName);\n    const acceptedItems = flatten(\n      this.accept.split(',').map(acceptedItem => {\n        switch (acceptedItem.trim()) {\n          case 'image/*':\n            return imageFileExtensions;\n          case 'video/*':\n            return videoFileExtensions;\n          case 'video/mp4':\n            return ['mp4'];\n          default:\n            return [acceptedItem];\n        }\n      })\n    );\n    return acceptedItems.includes(fileExtension);\n  },\n\n  clearModelErrors() {\n    const { model } = this;\n    if (model && get(model, 'errors.length') > 0) {\n      /**\n       * Manually clearing the errors that were manually added\n       */\n      get(model, 'errors').clear();\n    }\n  },\n  /**\n   * This inserts an error message into the model\n   * @param propertyName\n   * @param errorMessage\n   */\n  addModelError(propertyName, errorMessage) {\n    const { model } = this;\n    this.element.querySelector('input[type=\"file\"]').value = '';\n\n    if (model) {\n      model.forceDirty();\n      get(model, 'errors').add(propertyName, [errorMessage]);\n    }\n  },\n\n  //endregion\n});\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action no-curly-component-invocation no-invalid-interactive simple-unless }}\\n<div\\n  {{did-insert this.setup}}\\n  {{did-update this.updateFormPage this.desiredPageNumber}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-entry-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.hasStartedRegistration}}\\n      <div class=\\\"form-user\\\">\\n        <span\\n          role=\\\"button\\\"\\n          class=\\\"ssStartFormOver cursor-pointer\\\"\\n          {{on \\\"click\\\" (queue this.clearStoredValues (fn this.logout \\\"\\\"))}}\\n        >\\n          {{i18n-t \\\"start_form_over\\\"}}\\n        </span>\\n      </div>\\n    {{/if}}\\n    <form\\n      class=\\\"photo-upload-form {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\"\\n      {{on \\\"submit\\\" (prevent-default (perform this.submitFormPagesTask))}}\\n    >\\n      {{! Show headers only if not a ballot form }}\\n      {{#if @showFormHeaders}}\\n        {{#if this.entryFormSubmissionId}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"register\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t \\\"fill_out_form_with_your_info_to_register\\\"}}\\n          </div>\\n        {{else}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"submit_your_entry\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t\\n              (if @hasCategories \\\"fill_out_form_to_enter_category\\\" \\\"fill_out_form_to_enter_gallery\\\")\\n              categoryName=this.capitalizedCategoryName\\n            }}\\n          </div>\\n        {{/if}}\\n      {{else if this.isBallot}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{#if this.isNominationBallot}}\\n            {{i18n-t \\\"submit_your_nomination\\\"}}\\n          {{else}}\\n            {{i18n-t \\\"submit_your_write-in\\\"}}\\n          {{/if}}\\n        </div>\\n      {{/if}}\\n\\n      {{#if (has-block \\\"message\\\")}}\\n        {{yield to=\\\"message\\\"}}\\n      {{/if}}\\n\\n      <div class=\\\"uploaded-image-wrapper {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\">\\n        {{#if\\n          (and this.isBallot (not (or this.emailAddressThatIsAlreadyInUse this.emailAddressThatRequiresVerification)))\\n        }}\\n          {{#if (and this.googlePlaceField (not this.shouldShowEntryPreview))}}\\n            <SsFormFieldGooglePlace\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{@labelTextOverride}}\\n              @promotionLanguageCode={{this.languageCode}}\\n              @placeName={{this.entryTitleFormField.value}}\\n              @setEntryName={{this.setEntryName}}\\n              @setPlaceObject={{this.setPlaceObject}}\\n              @formField={{this.entryTitleFormField}}\\n              class=\\\"ballot-entrant-name\\\"\\n            />\\n          {{else if this.entryTitleFormField}}\\n            <SsFormFieldTextbox\\n              class=\\\"ballot-entrant-name\\\"\\n              @form-field={{this.entryTitleFormField}}\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{this.labelTextOverride}}\\n              @disabled={{this.shouldShowEntryPreview}}\\n              @show-suggested-values={{false}}\\n              @suggested-values={{this.suggestedValues}}\\n            />\\n          {{/if}}\\n        {{/if}}\\n        {{#if (not (and this.entryFormSubmissionId @splitSubmission))}}\\n          <div class=\\\"uploaded-image\\\">\\n            {{#if this.isUploadingImage}}\\n              <div class=\\\"empty-image-container loading\\\">\\n                <i class=\\\"ssIcon ssIcon-spinner ssIcon-spin\\\"></i>\\n              </div>\\n            {{else}}\\n              {{#if this.uploadedMediaItemId}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_photo\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeImage\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"upload_change_photo\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                <DipsImage\\n                  @dips-url={{@dipsUrl}}\\n                  @media-item-id={{this.uploadedMediaItemId}}\\n                  @width=\\\"600\\\"\\n                  width=\\\"600\\\"\\n                />\\n              {{/if}}\\n              {{#if (and this.uploadedVideoId this.showVideoPreview)}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_video\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeVideo\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"change_video_button_text\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                {{#if this.videoUploadedByUrl}}\\n                  <YoutubeVideo\\n                    @width=\\\"600\\\"\\n                    @height=\\\"315\\\"\\n                    width=\\\"600\\\"\\n                    height=\\\"315\\\"\\n                    @video-id={{this.uploadedVideoId}}\\n                  />\\n                {{else}}\\n                  <DipsVideo\\n                    @dips-url={{@dipsUrl}}\\n                    @media-item-id={{this.uploadedVideoId}}\\n                    @alt-src=\\\"/Images/video-removed-by-user.png\\\"\\n                    @blobUrl={{this.blobUrl}}\\n                    @width=\\\"600\\\"\\n                    width=\\\"600\\\"\\n                  />\\n                {{/if}}\\n              {{/if}}\\n            {{/if}}\\n          </div>\\n        {{/if}}\\n        {{#if (and this.shouldShowEntryPreview this.entryCaptionFormField)}}\\n          {{ss-form-field-textarea form-field=this.entryCaptionFormField disabled=true}}\\n        {{/if}}\\n      </div>\\n      <div class=\\\"form-pages {{if this.isBallot 'ballot-form'}}\\\">\\n        {{#if this.emailAddressThatIsAlreadyInUse}}\\n          <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{this.promotion-name}} />\\n        {{else if this.emailAddressThatRequiresVerification}}\\n          <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n        {{else}}\\n          {{#if this.shouldShowEntryForm}}\\n            <SsFormPageEntryRegistration\\n              @page={{this.entryFormPage}}\\n              @googlePlaceField={{this.googlePlaceField}}\\n              @entryNameField={{this.entryTitleFormField}}\\n              @isSaving={{this.isSaving}}\\n              @isBallotForm={{this.isBallot}}\\n              @suggestedValues={{this.suggestedValues}}\\n              @matchupClassificationType={{@matchupClassificationType}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @uploadedMediaItemId={{this.uploadedMediaItemId}}\\n              @uploadedVideoId={{this.uploadedVideoId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @beginUpload={{this.beginUpload}}\\n              @uploadImage={{this.uploadImage}}\\n              @uploadVideo={{this.uploadVideo}}\\n              @uploadMedia={{this.uploadMedia}}\\n              @uploadVideoByUrl={{this.uploadVideo}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @promotionType={{@promotionType}}\\n              @autoFocus={{@autoFocus}}\\n              @storeFieldValues={{this.isPersistingEntryData}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              @mediaId={{or this.uploadedMediaItemId this.uploadedVideoId}}\\n              @urlTextbox={{this.urlTextbox}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.useCurrentFormPage}}\\n            {{#if this.isBallot}}\\n              <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n                {{i18n-t \\\"register\\\"}}\\n              </div>\\n              <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n                {{i18n-t \\\"write-in_information_text\\\"}}\\n              </div>\\n            {{/if}}\\n\\n            <SsFormPageEntryRegistration\\n              @page={{this.currentFormPage}}\\n              @isSaving={{this.isSaving}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @languageCode={{this.languageCode}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              @promotionType={{this.promotionType}}\\n              @autoFocus={{this.autoFocus}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.isLastPage}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if\\n                    this.isBallot\\n                    'vote-button ssFormVoteButton'\\n                    'ssButtonPrimary template-color-primary-background-color template-color-primary-color-contrast'\\n                  )\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t this.submitButtonText}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{else}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if @changeToWriteIn 'vote-button ssFormVoteButton' 'ssButtonPrimary bg-primary text-primary-text')\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth' 'ssButtonContinue'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t (if @changeToWriteIn (if this.isNominationBallot \\\"change_nomination\\\" \\\"change_vote\\\") \\\"continue\\\")}}\\n              {{#unless @changeToWriteIn}}\\n                <i class=\\\"ssIcon-chevron-right\\\"></i>\\n              {{/unless}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{/if}}\\n          {{#if @changeToWriteIn}}\\n            <button\\n              type=\\\"button\\\"\\n              class=\\\"ssButton ssButtonFlat ssButtonNormalWidth\\\"\\n              {{on \\\"click\\\" this.closeChangeWriteIn}}\\n            >\\n              {{i18n-t \\\"video_upload_cancel\\\"}}\\n            </button>\\n          {{/if}}\\n        {{/if}}\\n        {{#unless this.isBallot}}\\n          <div class=\\\"cancel-entry\\\">\\n            <div role=\\\"button\\\" class=\\\"back-to-gallery back-to-gallery--enter\\\" {{on \\\"click\\\" this.cancel}}>\\n              {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n            </div>\\n          </div>\\n        {{/unless}}\\n      </div>\\n    </form>\\n  {{/if}}\\n</div>\", {\"contents\":\"{{! template-lint-disable no-action no-curly-component-invocation no-invalid-interactive simple-unless }}\\n<div\\n  {{did-insert this.setup}}\\n  {{did-update this.updateFormPage this.desiredPageNumber}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-entry-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.hasStartedRegistration}}\\n      <div class=\\\"form-user\\\">\\n        <span\\n          role=\\\"button\\\"\\n          class=\\\"ssStartFormOver cursor-pointer\\\"\\n          {{on \\\"click\\\" (queue this.clearStoredValues (fn this.logout \\\"\\\"))}}\\n        >\\n          {{i18n-t \\\"start_form_over\\\"}}\\n        </span>\\n      </div>\\n    {{/if}}\\n    <form\\n      class=\\\"photo-upload-form {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\"\\n      {{on \\\"submit\\\" (prevent-default (perform this.submitFormPagesTask))}}\\n    >\\n      {{! Show headers only if not a ballot form }}\\n      {{#if @showFormHeaders}}\\n        {{#if this.entryFormSubmissionId}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"register\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t \\\"fill_out_form_with_your_info_to_register\\\"}}\\n          </div>\\n        {{else}}\\n          <div class=\\\"entry-registration-form__header\\\">\\n            {{i18n-t \\\"submit_your_entry\\\"}}\\n          </div>\\n          <div class=\\\"entry-registration-form__subheader\\\">\\n            {{i18n-t\\n              (if @hasCategories \\\"fill_out_form_to_enter_category\\\" \\\"fill_out_form_to_enter_gallery\\\")\\n              categoryName=this.capitalizedCategoryName\\n            }}\\n          </div>\\n        {{/if}}\\n      {{else if this.isBallot}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{#if this.isNominationBallot}}\\n            {{i18n-t \\\"submit_your_nomination\\\"}}\\n          {{else}}\\n            {{i18n-t \\\"submit_your_write-in\\\"}}\\n          {{/if}}\\n        </div>\\n      {{/if}}\\n\\n      {{#if (has-block \\\"message\\\")}}\\n        {{yield to=\\\"message\\\"}}\\n      {{/if}}\\n\\n      <div class=\\\"uploaded-image-wrapper {{if this.isBallot 'ballot-form'}} {{if this.isSaving 'pointer-events-none'}}\\\">\\n        {{#if\\n          (and this.isBallot (not (or this.emailAddressThatIsAlreadyInUse this.emailAddressThatRequiresVerification)))\\n        }}\\n          {{#if (and this.googlePlaceField (not this.shouldShowEntryPreview))}}\\n            <SsFormFieldGooglePlace\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{@labelTextOverride}}\\n              @promotionLanguageCode={{this.languageCode}}\\n              @placeName={{this.entryTitleFormField.value}}\\n              @setEntryName={{this.setEntryName}}\\n              @setPlaceObject={{this.setPlaceObject}}\\n              @formField={{this.entryTitleFormField}}\\n              class=\\\"ballot-entrant-name\\\"\\n            />\\n          {{else if this.entryTitleFormField}}\\n            <SsFormFieldTextbox\\n              class=\\\"ballot-entrant-name\\\"\\n              @form-field={{this.entryTitleFormField}}\\n              @placeholder={{this.entryTitleFormField.labelText}}\\n              @labelTextOverride={{this.labelTextOverride}}\\n              @disabled={{this.shouldShowEntryPreview}}\\n              @show-suggested-values={{false}}\\n              @suggested-values={{this.suggestedValues}}\\n            />\\n          {{/if}}\\n        {{/if}}\\n        {{#if (not (and this.entryFormSubmissionId @splitSubmission))}}\\n          <div class=\\\"uploaded-image\\\">\\n            {{#if this.isUploadingImage}}\\n              <div class=\\\"empty-image-container loading\\\">\\n                <i class=\\\"ssIcon ssIcon-spinner ssIcon-spin\\\"></i>\\n              </div>\\n            {{else}}\\n              {{#if this.uploadedMediaItemId}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_photo\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeImage\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"upload_change_photo\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                <DipsImage\\n                  @dips-url={{@dipsUrl}}\\n                  @media-item-id={{this.uploadedMediaItemId}}\\n                  @width=\\\"600\\\"\\n                  width=\\\"600\\\"\\n                />\\n              {{/if}}\\n              {{#if (and this.uploadedVideoId this.showVideoPreview)}}\\n                <div class=\\\"ssFormPart has-image\\\">\\n                  <div class=\\\"ssFormFieldText\\\">\\n                    <span class=\\\"ssLabelText\\\">\\n                      {{i18n-t (if this.allowAllMediaUpload \\\"Your_Media\\\" \\\"your_video\\\")}}\\n                    </span>\\n                    {{#if this.canChangeUpload}}\\n                      <span class=\\\"ssLabelText template-color-primary-color\\\">\\n                        <span class=\\\"remove-photo\\\" {{action \\\"removeVideo\\\" this.entryFormPage}}>\\n                          {{i18n-t (if this.allowAllMediaUpload \\\"change_media_button_text\\\" \\\"change_video_button_text\\\")}}\\n                        </span>\\n                      </span>\\n                    {{/if}}\\n                  </div>\\n                </div>\\n                {{#if this.videoUploadedByUrl}}\\n                  <YoutubeVideo\\n                    @width=\\\"600\\\"\\n                    @height=\\\"315\\\"\\n                    width=\\\"600\\\"\\n                    height=\\\"315\\\"\\n                    @video-id={{this.uploadedVideoId}}\\n                  />\\n                {{else}}\\n                  <DipsVideo\\n                    @dips-url={{@dipsUrl}}\\n                    @media-item-id={{this.uploadedVideoId}}\\n                    @alt-src=\\\"/Images/video-removed-by-user.png\\\"\\n                    @blobUrl={{this.blobUrl}}\\n                    @width=\\\"600\\\"\\n                    width=\\\"600\\\"\\n                  />\\n                {{/if}}\\n              {{/if}}\\n            {{/if}}\\n          </div>\\n        {{/if}}\\n        {{#if (and this.shouldShowEntryPreview this.entryCaptionFormField)}}\\n          {{ss-form-field-textarea form-field=this.entryCaptionFormField disabled=true}}\\n        {{/if}}\\n      </div>\\n      <div class=\\\"form-pages {{if this.isBallot 'ballot-form'}}\\\">\\n        {{#if this.emailAddressThatIsAlreadyInUse}}\\n          <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{this.promotion-name}} />\\n        {{else if this.emailAddressThatRequiresVerification}}\\n          <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n        {{else}}\\n          {{#if this.shouldShowEntryForm}}\\n            <SsFormPageEntryRegistration\\n              @page={{this.entryFormPage}}\\n              @googlePlaceField={{this.googlePlaceField}}\\n              @entryNameField={{this.entryTitleFormField}}\\n              @isSaving={{this.isSaving}}\\n              @isBallotForm={{this.isBallot}}\\n              @suggestedValues={{this.suggestedValues}}\\n              @matchupClassificationType={{@matchupClassificationType}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @uploadedMediaItemId={{this.uploadedMediaItemId}}\\n              @uploadedVideoId={{this.uploadedVideoId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @beginUpload={{this.beginUpload}}\\n              @uploadImage={{this.uploadImage}}\\n              @uploadVideo={{this.uploadVideo}}\\n              @uploadMedia={{this.uploadMedia}}\\n              @uploadVideoByUrl={{this.uploadVideo}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @promotionType={{@promotionType}}\\n              @autoFocus={{@autoFocus}}\\n              @storeFieldValues={{this.isPersistingEntryData}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              @mediaId={{or this.uploadedMediaItemId this.uploadedVideoId}}\\n              @urlTextbox={{this.urlTextbox}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.useCurrentFormPage}}\\n            {{#if this.isBallot}}\\n              <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n                {{i18n-t \\\"register\\\"}}\\n              </div>\\n              <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n                {{i18n-t \\\"write-in_information_text\\\"}}\\n              </div>\\n            {{/if}}\\n\\n            <SsFormPageEntryRegistration\\n              @page={{this.currentFormPage}}\\n              @isSaving={{this.isSaving}}\\n              @formSubmissionId={{this.formSubmissionId}}\\n              @referrer={{@referrer}}\\n              @referrerUrl={{@referrerUrl}}\\n              @languageCode={{this.languageCode}}\\n              @submitFormPage={{perform this.submitFormPageTask}}\\n              @setTurnstileRunningState={{this.setTurnstileRunningState}}\\n              @promotionType={{this.promotionType}}\\n              @autoFocus={{this.autoFocus}}\\n              @updateStoredFormFields={{this.updateStoredFormFields}}\\n              class={{if this.isSaving \\\"pointer-events-none\\\"}}\\n            />\\n          {{/if}}\\n          {{#if this.isLastPage}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if\\n                    this.isBallot\\n                    'vote-button ssFormVoteButton'\\n                    'ssButtonPrimary template-color-primary-background-color template-color-primary-color-contrast'\\n                  )\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t this.submitButtonText}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{else}}\\n            <button\\n              disabled={{this.isSaving}}\\n              class=\\\"ssButton\\n                {{unless this.isBallot 'ssFormButton'}}\\n                {{if\\n                  this.isSaving\\n                  'ssButtonDisabled'\\n                  (if @changeToWriteIn 'vote-button ssFormVoteButton' 'ssButtonPrimary bg-primary text-primary-text')\\n                }}\\n                {{if this.currentFormPage.errors.length 'form-error'}}\\n                {{if @changeToWriteIn 'ssButtonNormalWidth' 'ssButtonContinue'}}\\\"\\n              type=\\\"submit\\\"\\n            >\\n              {{i18n-t (if @changeToWriteIn (if this.isNominationBallot \\\"change_nomination\\\" \\\"change_vote\\\") \\\"continue\\\")}}\\n              {{#unless @changeToWriteIn}}\\n                <i class=\\\"ssIcon-chevron-right\\\"></i>\\n              {{/unless}}\\n              {{#if this.isSaving}}\\n                <i class=\\\"ssIcon-spinner ssIcon-spin\\\"></i>\\n              {{/if}}\\n            </button>\\n          {{/if}}\\n          {{#if @changeToWriteIn}}\\n            <button\\n              type=\\\"button\\\"\\n              class=\\\"ssButton ssButtonFlat ssButtonNormalWidth\\\"\\n              {{on \\\"click\\\" this.closeChangeWriteIn}}\\n            >\\n              {{i18n-t \\\"video_upload_cancel\\\"}}\\n            </button>\\n          {{/if}}\\n        {{/if}}\\n        {{#unless this.isBallot}}\\n          <div class=\\\"cancel-entry\\\">\\n            <div role=\\\"button\\\" class=\\\"back-to-gallery back-to-gallery--enter\\\" {{on \\\"click\\\" this.cancel}}>\\n              {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n            </div>\\n          </div>\\n        {{/unless}}\\n      </div>\\n    </form>\\n  {{/if}}\\n</div>\",\"moduleName\":\"consumer-sweepstakes/components/ss-form-entry-registration.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form-entry-registration.hbs\"}});\n/* eslint-disable @typescript-eslint/restrict-template-expressions, ember/no-computed-properties-in-native-classes */\nimport { debounce, later, next } from '@ember/runloop';\nimport SsFormNewComponent, { Error } from './ss-form';\nimport { DeveloperError } from 'secondstreet-common/utils/errors';\nimport { service } from '@ember/service';\nimport EnumsService from 'ember-cli-ss-enums/services/enums';\nimport RouterService from '@ember/routing/router-service';\nimport ScrollerService from 'consumer/services/scroller';\nimport Store from '@ember-data/store';\nimport { tracked } from '@glimmer/tracking';\nimport { isBlank, isEmpty, isNone, isPresent } from '@ember/utils';\nimport { capitalize } from '@ember/string';\nimport FormPageSubmissionModel from 'consumer/models/form-page-submission';\nimport clearFormFieldValues from 'consumer/utils/clear-form-field-values';\nimport MatchupEntryModel from 'consumer/models/matchup-entry';\nimport VoteModel from 'consumer/models/vote';\nimport FormPageModel from 'consumer/models/form-page';\nimport MediaItemModel from 'consumer/models/media-item';\nimport { action, computed } from '@ember/object';\nimport FormFieldModel from 'consumer/models/form-field';\nimport { task } from 'ember-concurrency';\n\nexport default class SsFormEntryRegistrationComponent extends SsFormNewComponent {\n  @service declare entries: any;\n  @service declare enums: EnumsService;\n  @service declare router: RouterService;\n  @service declare scroller: ScrollerService;\n  @service declare session: any;\n  @service declare store: Store;\n  @service declare votes: any;\n\n  @tracked blobUrl = '';\n  @tracked uploadedMediaItemId = '';\n  @tracked uploadedVideoId = '';\n\n  @tracked isUploadingImage = false;\n  @tracked placeObject: any = null;\n\n  get isPersistingEntryData() {\n    return this.args.persistEntryData || this.args.isEditingSubmission;\n  }\n\n  get formPageFields() {\n    return this.args.entryForm?.formPages?.toArray()?.[0]?.formFields || [];\n  }\n\n  get showVideoPreview() {\n    return this.formPageFields\n      .toArray()\n      .some(\n        field => field.fieldType === 'VideoSelect' || (field.fieldType === 'ImageSelect' && field.allowVideoUpload)\n      );\n  }\n\n  get allowAllMediaUpload() {\n    return this.formPageFields\n      .toArray()\n      .some(\n        field =>\n          (field.fieldType === 'ImageSelect' && field.allowVideoUpload) ||\n          (field.fieldType === 'VideoSelect' && field.allowPhotoUpload)\n      );\n  }\n\n  get nextRegistrationPageToComplete() {\n    return this.session.isLoggedIn\n      ? undefined\n      : this.form?.formPages\n          .toArray()\n          .sortBy('pageNumber')\n          .find(page => page.hasFormFields);\n  }\n\n  get shouldShowEntryForm() {\n    return this.currentFormPage?.pageNumber && !this.entryFormSubmissionId;\n  }\n\n  get shouldShowEntryPreview() {\n    return this.currentFormPage?.pageNumber && !!this.entryFormSubmissionId && this.args.promotionType === 'Ballot';\n  }\n\n  get urlTextbox() {\n    return this.formPageFields.find(field => field.fieldType == 'UrlTextbox');\n  }\n\n  @computed('urlTextbox.value')\n  get videoUploadedByUrl() {\n    return this.urlTextbox?.value;\n  }\n\n  get entryTitleFormField() {\n    return this.formPageFields.find(\n      formField => formField.fieldId == this.enums.findWhere('FIELD', { name: 'PhotoTitle' }).toString()\n    );\n  }\n\n  get entryCaptionFormField() {\n    return this.formPageFields.find(\n      formField => formField.fieldId == this.enums.findWhere('FIELD', { name: 'PhotoCaption' }).toString()\n    );\n  }\n\n  get googlePlaceField() {\n    return this.formPageFields.find(formField => formField.fieldType == 'GooglePlace');\n  }\n\n  get isBallot() {\n    return this.args.promotionType == 'Ballot';\n  }\n\n  get isNominationBallot() {\n    return this.args.promotionSubType == 'NominationAndVotingBallot';\n  }\n\n  get submitButtonText() {\n    if (this.isBallot) {\n      if (this.args.changeToWriteIn) {\n        return this.isNominationBallot ? 'change_nomination' : 'change_vote';\n      }\n      return this.isNominationBallot ? 'nominate' : 'vote_button_vote';\n    }\n    return 'submit';\n  }\n\n  get hasStartedRegistration() {\n    if (this.session.thirdPartyAuthProvider && this.session.thirdPartyUsesExternalLogin) {\n      return false;\n    }\n\n    if (!this.currentFormPage) {\n      return false;\n    }\n\n    return this.args.splitSubmission\n      ? this.entryFormSubmissionId\n      : this.currentFormPage?.pageNumber == 1\n      ? false\n      : !isEmpty(this.session.accessToken);\n  }\n\n  get isLastPage() {\n    if (this.args.splitSubmission && !this.entryFormSubmissionId) {\n      return !this.nextRegistrationPageToComplete;\n    }\n    return this.form?.formPagesCount == this.currentFormPage?.pageNumber;\n  }\n\n  get entryFormPage() {\n    return this.args.entryForm?.formPages?.toArray()?.[0];\n  }\n\n  get useCurrentFormPage() {\n    return !(this.session.isLoggedIn || (this.args.splitSubmission && !this.entryFormSubmissionId));\n  }\n\n  get capitalizedCategoryName() {\n    return this.args.matchupName ? this.args.matchupName.split(' ').filter(isPresent).map(capitalize).join(' ') : '';\n  }\n\n  get isSaving() {\n    return (\n      this.submitFormPagesTask.isRunning ||\n      this.submitFormPageTask.isRunning ||\n      this.isTurnstileChecking ||\n      this.isUploadingImage ||\n      this.args.freezeFormState\n    );\n  }\n\n  captureFormSubmissionDetails(formPageSubmission: FormPageSubmissionModel) {\n    super.captureFormSubmissionDetails(formPageSubmission);\n    const { formSubmissionId } = formPageSubmission;\n    if (formSubmissionId) {\n      const { formType } = formPageSubmission.form;\n      switch (formType) {\n        case 'EntrySubmission':\n          this.entryFormSubmissionId = formSubmissionId;\n          this.localStorage.setItem(this.prefix('entryFormSubmissionId'), formSubmissionId);\n          break;\n        case 'Registration':\n          break;\n        default:\n          throw new DeveloperError(`Unexpected Form type ${formType} when capturing FormSubmission`);\n      }\n      this.matchupEntryId = `${formPageSubmission.matchupEntryId}` || this.matchupEntryId || undefined;\n      this.entryId = formPageSubmission.entryId || this.entryId || undefined;\n    }\n  }\n\n  clearFormRelatedLocalStorage(excludedItems: string[] = []) {\n    const { localStorage } = this;\n    super.clearFormRelatedLocalStorage(excludedItems);\n    localStorage.removeItem(this.prefix('entryFormSubmissionId'));\n    localStorage.removeItem(`FORM_${this.args.entryForm?.id}_formValues`);\n    localStorage.removeItem(`FORM_${this.args.entryForm?.id}_mediaItemId`);\n    localStorage.removeItem(`FORM_${this.args.entryForm?.id}_videoId`);\n  }\n\n  /////\n\n  clearFormPageErrors() {\n    (this.form?.formPages || []).forEach(fp => {\n      fp.errors.clear();\n    });\n    this.entryFormPage?.errors.clear();\n  }\n\n  async restoreProgress() {\n    if (!this.isPersistingEntryData) {\n      clearFormFieldValues(this.args.entryForm);\n    }\n\n    await super.restoreProgress();\n    const { localStorage } = this;\n    const [mediaItemId, videoId, entryFormSubmissionId] = await Promise.all([\n      localStorage.getItem(this.prefix('mediaItemId')),\n      localStorage.getItem(this.prefix('videoId')),\n      localStorage.getItem(this.prefix('entryFormSubmissionId')),\n    ]);\n    if (this.isDestroyed) {\n      return;\n    }\n    this.entryFormSubmissionId = entryFormSubmissionId || null;\n    this.uploadedVideoId = videoId || this.storedFormFields?.['videoId'] || null;\n    this.uploadedMediaItemId = mediaItemId || this.storedFormFields?.['mediaItemId'] || null;\n\n    const { currentFormPage } = this;\n    if (currentFormPage) {\n      if (!this.videoUploadedByUrl) {\n        this.formPageFields\n          .filter(formField => formField.fieldType == 'ImageSelect')\n          .forEach(x => {\n            x.value = x.allowVideoUpload ? mediaItemId || videoId || null : mediaItemId || null;\n          });\n      }\n      this.formPageFields\n        .filter(formField => formField.fieldType == (this.videoUploadedByUrl ? 'UrlTextbox' : 'VideoSelect'))\n        .forEach(x => (x.value = videoId || null));\n    }\n    if (!this.isPersistingEntryData) {\n      this.syncFormWithStoredValues();\n    }\n  }\n\n  async restoreFormValues() {\n    await super.restoreFormValues();\n    const json = await this.localStorage.getItem(`FORM_${this.args.entryForm?.id}_formValues`);\n    const values = JSON.parse(json);\n    if (values && this.formPageFields) {\n      this.formPageFields.forEach(formField => {\n        const value = values[formField.id];\n        formField.value = isNone(value) ? '' : value;\n      });\n    }\n    if (!this.isPersistingEntryData) {\n      this.syncFormWithStoredValues();\n    }\n    // After we go through local storage, set the values to default if they are currently blank\n    this.setValuesToDefaultIfBlank();\n  }\n\n  syncFormWithStoredValues() {\n    this.formPageFields.forEach(x => {\n      x.value = this.storedFormFields?.[x.id];\n    });\n  }\n\n  setValuesToDefaultIfBlank() {\n    super.setValuesToDefaultIfBlank();\n    const { formPageFields } = this;\n    if (formPageFields) {\n      formPageFields.forEach(formField => {\n        if (isBlank(formField.value)) {\n          formField.value = formField.defaultValue;\n        }\n      });\n    }\n  }\n\n  clearFormFieldValues() {\n    super.clearFormFieldValues();\n    clearFormFieldValues(this.args.entryForm);\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"EntryLimitReached\".\n   * @param {ForbiddenError} error\n   */\n  entryLimitReached(error: Error) {\n    const formPage = this.useCurrentFormPage ? this.currentFormPage : this.entryFormPage;\n\n    formPage?.forceDirty();\n    formPage?.errors.add('value', error?.message?.errors?.[0]?.message as string);\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"VoteLimitReached\".\n   * @param {ForbiddenError} error\n   */\n  voteLimitReached(error: Error) {\n    const formPage = this.currentFormPage;\n    if (this.session.isLoggedIn) {\n      formPage?.forceDirty();\n      formPage?.errors.add('value', error?.message?.errors?.[0]?.message as string);\n    } else {\n      this.session.on('ActiveSession', this, 'recastVote');\n      next(this, this.recastVote);\n    }\n  }\n\n  async changeVote(\n    currentEntry: MatchupEntryModel,\n    currentVote: VoteModel,\n    formPageSubmission: FormPageSubmissionModel\n  ) {\n    try {\n      if (currentVote) {\n        await this.votes.unVote(currentVote);\n      }\n      if (currentEntry && currentEntry.entry) {\n        const { entry } = currentEntry;\n        await entry.destroyRecord();\n      }\n\n      await formPageSubmission.save();\n      await Promise.all([this.votes.loadVotes(), this.entries.loadEntries()]);\n      const finishedAction = this.args.finished;\n      finishedAction?.(this.args.matchup, this.matchupEntryId, this.entryId);\n    } finally {\n      this.setVotesServiceAttributes('recastingVote', false);\n      this.clearFormPageErrors();\n      this.session.off('ActiveSession', this, 'recastVote');\n    }\n  }\n  /**\n   * Called to recast the attempted vote after they receive with \"VoteLimitReached\" Error.\n   * Only applicable to consumer-entry-showcase\n   * @private\n   */\n  recastVote = async () => {\n    if (!this.session.isLoggedIn) {\n      debounce(this, this.recastVote, 150);\n    }\n    if (!this.entryFormPage) {\n      return;\n    }\n    const formPageSubmission = this.createFormSubmission(this.entryFormPage);\n    if (this.votes.recastingVote) {\n      return;\n    }\n    if (isEmpty(this.votes.currentVotes) || isEmpty(this.entries.userEntries)) {\n      this.setVotesServiceAttributes('loadingVote', true);\n      this.setVotesServiceAttributes('recastingVote', true);\n      await Promise.all([this.votes.loadVotes(), this.entries.loadEntries()]);\n    }\n    if (isEmpty(this.votes.currentVotes) && isEmpty(this.entries.userEntries)) {\n      this.setVotesServiceAttributes('recastingVote', false);\n      debounce(this, this.recastVote, 150);\n      return;\n    }\n    const { entry: currentEntry, vote: voteToDelete } = this.findCurrentVoteAndEntry();\n    if (isBlank(currentEntry) && isBlank(voteToDelete)) {\n      this.session.off('ActiveSession', this, 'recastVote');\n      return;\n    }\n    this.setVotesServiceAttributes('recastingVote', true);\n    this.setVotesServiceAttributes('loadingVote', false);\n\n    await this.changeVote(currentEntry, voteToDelete, formPageSubmission);\n  };\n\n  setVotesServiceAttributes(attribute: string, value: any) {\n    /* if (get(getOwner(this), 'isDestroyed')) {\n      return;\n    } */\n\n    this.votes[attribute] = value;\n  }\n\n  async ensureBallotStateLoaded() {\n    if (!this.session.isLoggedIn) {\n      return;\n    }\n\n    const waitForInFlightVotes = this.votes.isLoading\n      ? new Promise(resolve => {\n          const startedAt = Date.now();\n          const timer = setInterval(() => {\n            if (!this.votes.isLoading || Date.now() - startedAt > 5000) {\n              clearInterval(timer);\n              resolve(undefined);\n            }\n          }, 25);\n        })\n      : isEmpty(this.votes.userVotes)\n      ? this.votes.loadVotes()\n      : Promise.resolve();\n\n    const entriesPromise =\n      this.entries.isLoadingEntries || !this.entries.isLoaded ? this.entries.loadEntries() : Promise.resolve();\n\n    await Promise.all([waitForInFlightVotes, entriesPromise]);\n  }\n\n  /**\n   * Called to locate the matchup's vote and entry, if they exist.\n   * @private\n   * @returns {Entry,Vote}\n   */\n  findCurrentVoteAndEntry() {\n    const { matchup } = this.args;\n    const [writeInEntry] = this.entries.filterWriteinNominationsForThisCategoryAndInterval(matchup);\n    const matchupId = matchup ? `${matchup.id}` : '';\n    const matchupEntries = (this.entries.userEntries || []).filter(\n      (entry: MatchupEntryModel) => `${entry.matchupId}` === matchupId\n    );\n    const userMatchupEntry = [...matchupEntries].sort((a, b) => Number(a.id) - Number(b.id)).pop();\n    const currentEntry = writeInEntry || userMatchupEntry;\n    const { entryFormPage } = this;\n    const vote =\n      this.votes.findVoteWithinMatchupForCurrentInterval(matchup) ||\n      (this.args.currentMatchupEntry && this.votes.currentVoteForMatchupEntry(this.args.currentMatchupEntry));\n    if (\n      isPresent(currentEntry) &&\n      isPresent(vote) &&\n      vote.get('matchupEntry.entry.id') === currentEntry.get('entry.id')\n    ) {\n      const entry = currentEntry.get('entry');\n      const pageFields = entryFormPage?.get('formFields');\n\n      if (pageFields && pageFields.find(pageField => pageField.get('value') === entry.get('name'))) {\n        return { entry: null, vote: null };\n      }\n    }\n    return { entry: currentEntry, vote };\n  }\n\n  /**\n   * Called when a user receives a {@link DS.InvalidError}.\n   * @private\n   * @param {Error} invalidError\n   */\n  validationFailure(invalidError: any) {\n    super.validationFailure(invalidError);\n    const formFields = this.formPageFields;\n    formFields.forEach((ff: FormFieldModel) => ff.field.errors.clear());\n    invalidError.errors.forEach((error: any) => {\n      if (error.source.pointer.match('matchup_id')) {\n        // It's an error on the matchup\n        const formPage = this.currentFormPage;\n        formPage?.errors.add('value', error.detail);\n      }\n      if (error.source.pointer.match(/\\d+/)) {\n        // It's a Field ID\n        const formField = this.formPageFields.find(\n          (formField: FormFieldModel) => formField.fieldId == error.source.pointer.split('/').pop()\n        );\n\n        // Twitter authorization tokens expire after one use, so the API gives us a fresh one.\n        if (error.data && formField?.fieldType === 'TwitterFollowApi') {\n          // Allows the user to try authorizing again\n          formField.value = false;\n\n          formField.field.twitterAuthorizationRedirect = error.data;\n        }\n\n        if (formField) {\n          formField.forceDirty();\n          formField.errors.add('value', error.detail);\n        }\n      }\n    });\n    next(() => this.scrollToError());\n  }\n\n  scrollToError() {\n    const el = document.querySelector('.ssError')?.parentNode as HTMLElement;\n    if (el) {\n      this.scroller.scrollTo(el);\n    }\n  }\n  /**\n   * @private\n   * @param {FormPage} page\n   * @returns {FormPageSubmission}\n   */\n  createFormSubmission(page: FormPageModel) {\n    const formSubmission = super.createFormSubmission(page);\n    if (page.form.formType == 'Registration') {\n      formSubmission.entryFormSubmissionId = this.entryFormSubmissionId;\n    }\n    return formSubmission;\n  }\n  /**\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  async submissionSuccess(formPageSubmission: FormPageSubmissionModel) {\n    this.captureSession(formPageSubmission);\n    this.captureFormSubmissionDetails(formPageSubmission);\n    this.sendFormPageSubmissionSDKEvent(formPageSubmission, [\n      ...(this.currentFormPage?.formFields?.toArray() || []),\n      ...this.formPageFields.toArray(),\n    ]);\n    const isSubmittingRegistrationPage = formPageSubmission.form.formType == 'Registration';\n\n    if (isSubmittingRegistrationPage || (this.args.splitSubmission && !this.nextRegistrationPageToComplete)) {\n      await this.nextPage(formPageSubmission);\n    }\n\n    /*  if (isSubmittingRegistrationPage || this.args.splitSubmission) {\n      this.isSaving = false;\n    } */\n    this.hasMismatchErrored = false;\n    return formPageSubmission;\n  }\n  /**\n   * When you are editing your most recently submitted write-in or nomination, we want to prefill the entry form with the\n   * values of the existing write-in or nomination that you will be replacing.\n   */\n  prefillEntryFormValues() {\n    // clear local storage form values because they will override the prefills\n    this.clearFormRelatedLocalStorage();\n\n    const entry = this.args.currentMatchupEntry;\n    const entryTitle = entry && entry.get('mediaTitle') ? entry.get('mediaTitle')?.value || '' : '';\n    const entryPhotoId = entry && entry.get('photoUpload') ? entry.get('photoUpload')?.value || '' : '';\n    const entryCaption = entry && entry.get('mediaCaption') ? entry.get('mediaCaption')?.value || '' : '';\n    const entryMediaReleaseConsent =\n      entry && entry.get('mediaReleaseConsent') ? entry.get('mediaReleaseConsent')?.value || '' : '';\n\n    const getField = (id: number) => this.formPageFields.find(({ field }) => +field.id == id);\n\n    const prefillField = (fieldType: string, value: string | number) => {\n      const field = getField(this.enums.findWhere('ENTRY_FIELD', { name: fieldType }, 'id'));\n      if (field) {\n        field.value = value;\n      }\n    };\n\n    prefillField('Media Title', entryTitle);\n    prefillField('Photo Upload', entryPhotoId);\n    prefillField('Media Caption', entryCaption);\n    prefillField('Media Release Consent', entryMediaReleaseConsent);\n    if (isPresent(entryPhotoId)) {\n      this.localStorage.setItem(this.prefix('mediaItemId'), entryPhotoId);\n    }\n  }\n  //endregion\n\n  //region Methods\n  uploadImage = (mediaItem: MediaItemModel) => {\n    this.isUploadingImage = false;\n\n    const mediaItemId = mediaItem.id;\n    this.uploadedMediaItemId = mediaItemId;\n\n    if (this.isPersistingEntryData) {\n      this.localStorage.setItem(this.prefix('mediaItemId'), mediaItemId);\n    }\n    if (this.storedFormFields) {\n      Object.assign(this.storedFormFields, { mediaItemId });\n    }\n  };\n\n  uploadVideo = (mediaItem: MediaItemModel) => {\n    this.isUploadingImage = false;\n    // if uploading by URL, the first argument passed into this method is already just an ID\n    // but for dips uploaded videos, we must extract an ID from the media item\n    const videoId = typeof mediaItem == 'string' ? mediaItem : (mediaItem.id as string);\n\n    this.uploadedVideoId = videoId;\n\n    if (this.isPersistingEntryData) {\n      this.localStorage.setItem(this.prefix('videoId'), videoId);\n    }\n    if (this.storedFormFields) {\n      Object.assign(this.storedFormFields, { videoId });\n    }\n  };\n\n  uploadMedia = (mediaItem: MediaItemModel) => {\n    this.isUploadingImage = false;\n    this.localStorage.removeItem(this.prefix('videoId'));\n    this.localStorage.removeItem(this.prefix('mediaItemId'));\n\n    if (mediaItem.mediaTypeId === 1) {\n      const mediaItemId = mediaItem.id;\n      this.uploadedMediaItemId = mediaItemId;\n      this.uploadedVideoId = '';\n      this.localStorage.setItem(this.prefix('mediaItemId'), mediaItemId);\n      if (this.storedFormFields) {\n        Object.assign(this.storedFormFields, { mediaItemId });\n      }\n    } else if (mediaItem.mediaTypeId === 3) {\n      const videoId = mediaItem.id;\n      this.uploadedVideoId = videoId;\n      this.uploadedMediaItemId = '';\n      this.localStorage.setItem(this.prefix('videoId'), videoId);\n      if (this.storedFormFields) {\n        Object.assign(this.storedFormFields, { videoId });\n      }\n    }\n  };\n\n  createVideoBlob(file: File) {\n    if (file?.type?.startsWith('video')) {\n      const blobUrl = URL.createObjectURL(file);\n      this.blobUrl = `${blobUrl}#t=0.1`;\n    }\n  }\n  /////\n\n  //actions below\n\n  beginUpload = (file: File) => {\n    this.isUploadingImage = true;\n    this.createVideoBlob(file);\n  };\n\n  removeImage(formPage: FormPageModel) {\n    this.uploadedMediaItemId = '';\n    const imageField = formPage.formFields.find(formField => formField.fieldType === 'ImageSelect');\n    if (imageField) {\n      imageField.value = null;\n    }\n  }\n\n  removeVideo(formPage: FormPageModel) {\n    this.uploadedVideoId = '';\n    const videoFields = formPage.formFields.filter(formField =>\n      ['UrlTextbox', 'VideoSelect'].includes(formField.fieldType)\n    );\n    videoFields.forEach(formField => (formField.value = null));\n  }\n\n  submitFormPagesTask = task({ drop: true }, async () => {\n    const { closeChangeWriteIn } = this.args;\n    if (this.isBallot) {\n      await this.ensureBallotStateLoaded();\n    }\n    const { entry: currentEntry, vote: voteToDelete } = this.findCurrentVoteAndEntry();\n    if (this.isBallot) {\n      try {\n        if (voteToDelete) {\n          await voteToDelete.destroyRecord();\n        }\n      } catch (e) {\n        console.error(e);\n      }\n\n      try {\n        const _currentEntry = currentEntry?.entry;\n        if (_currentEntry) {\n          await _currentEntry.destroyRecord();\n        }\n      } catch (e) {\n        console.error(e);\n      }\n    }\n    if (!this.isDestroyed) {\n      const { currentFormPage } = this;\n      const { entryFormPage } = this;\n      const currentEntry = this.args.currentMatchupEntry?.entry;\n\n      if (this.args.splitSubmission) {\n        // For UGC, entry and registration are submitted individually, based on if you've already submitted entry\n        try {\n          if (!this.entryFormSubmissionId) {\n            if (entryFormPage) {\n              await this.submitFormPageTask.perform(entryFormPage);\n            }\n          } else {\n            if (currentFormPage) {\n              await this.submitFormPageTask.perform(currentFormPage);\n            }\n          }\n        } catch (e: any) {\n          if (isPresent(e)) {\n            // this can be blank\n            this.submissionFailure(e);\n          }\n        }\n      } else {\n        if (currentFormPage?.isPageOne) {\n          try {\n            if (this.args.isEditingSubmission && currentEntry) {\n              await currentEntry.destroyRecord();\n            }\n            if (entryFormPage) {\n              await this.submitFormPageTask.perform(entryFormPage);\n            }\n            if (currentFormPage.id !== entryFormPage?.id) {\n              await this.submitFormPageTask.perform(currentFormPage);\n            }\n\n            if (closeChangeWriteIn) {\n              closeChangeWriteIn();\n            }\n          } catch (e: any) {\n            if (isPresent(e)) {\n              // this can be blank\n              this.submissionFailure(e);\n            }\n          }\n        } else {\n          //We don't need to submit the entry form again\n          if (currentFormPage) {\n            await this.submitFormPageTask.perform(currentFormPage);\n          }\n          if (closeChangeWriteIn) {\n            closeChangeWriteIn();\n          }\n        }\n      }\n    }\n  });\n\n  setEntryName = (name: string, { forceRerender } = { forceRerender: false }) => {\n    if (this.entryTitleFormField) {\n      if (!forceRerender) {\n        this.entryTitleFormField.value = name;\n        return;\n      }\n\n      // Need to always force Ember to re-render the input by resetting its value\n      // This fixes an issue where if you change the Google Place to a different address but with the same name,\n      // Ember does not see a change so it does not re-render the input.\n      const entryTitleFormFieldValue = this.entryTitleFormField?.value;\n      this.entryTitleFormField.value = null;\n      const entryTitleId = this.entryTitleFormField?.id;\n      if (entryTitleId && this.storedFormFields) {\n        this.storedFormFields[entryTitleId] = entryTitleFormFieldValue;\n      }\n      name ? (this.entryTitleFormField.value = name) : (this.entryTitleFormField.value = entryTitleFormFieldValue);\n    }\n  };\n\n  setPlaceObject = (place: any) => {\n    this.placeObject = place;\n  };\n\n  closeChangeWriteIn = () => {\n    this.args.closeChangeWriteIn?.();\n  };\n\n  @action\n  async logout(reason?: string) {\n    this.entryFormSubmissionId = undefined;\n    this.formSubmissionId = undefined;\n    this.uploadedMediaItemId = '';\n    this.uploadedVideoId = '';\n    await super.logout(reason);\n  }\n\n  @action\n  async cancel() {\n    const shouldClearAccessToken = await this.localStorage.getItem('probablyHasNotFinishedRegistration');\n    if (this.args.matchup) {\n      void this.router.transitionTo(\n        'rounds.round.matchup',\n        this.args.matchup.iteration,\n        this.args.matchup.normalizedName\n      );\n    }\n    this.clearStoredValues();\n    this.clearFormRelatedLocalStorage();\n\n    if (shouldClearAccessToken) {\n      await this.logout();\n    }\n\n    if (this.args.matchup) {\n      void this.router.transitionTo(\n        'rounds.round.matchup',\n        this.args.matchup.iteration,\n        this.args.matchup.normalizedName\n      );\n    }\n  }\n\n  ///////\n  @action\n  async setup(el: HTMLElement) {\n    this.storedFormFields = {};\n\n    if (!this.args.persistEntryData) {\n      this.clearFormRelatedLocalStorage(['formValues']);\n    }\n\n    await super.setup(el);\n\n    if (this.args.isEditingSubmission) {\n      this.prefillEntryFormValues();\n    }\n\n    // we need to wait for the fade transition to complete (400ms) and then target the first input field\n\n    later(() => {\n      const firstInput = this.container\n        ?.querySelector('.ssFormPart')\n        ?.querySelector('input, textarea, select') as HTMLElement;\n      if (firstInput) {\n        firstInput?.focus();\n      }\n    }, 500);\n  }\n\n  cleanup = () => {\n    super.cleanup();\n    URL.revokeObjectURL(this.blobUrl);\n  };\n}\n","import { action, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport ENV from 'ember-get-config';\nimport { loadScript } from 'secondstreet-common/utils/load-script';\nimport { later } from '@ember/runloop';\nimport duration from 'secondstreet-common/utils/duration';\nimport FormField from './ss-form-field';\nimport type ScrollerService from 'consumer/services/scroller';\n\n// Testing keys -> https://developers.cloudflare.com/turnstile/reference/testing/#dummy-sitekeys-and-secret-keys\n// Always pass -> 1x00000000000000000000AA\n// Always fail -> 2x00000000000000000000AB\n\nexport default class SsFormFieldCaptchaComponent extends FormField {\n  @service declare scroller: ScrollerService;\n\n  // Args\n  declare formField: any;\n  declare submitFormPage?: () => void;\n  declare setTurnstileRunningState?: (running: boolean) => void;\n\n  @tracked failed = false;\n\n  scrollToTurnstileWidget() {\n    later(() => {\n      const widgetElement = document.querySelector('#turing-target');\n      if (widgetElement) {\n        this.scroller.scrollTo(widgetElement, { center: true });\n      }\n    }, duration(100));\n  }\n\n  @action\n  async setup() {\n    try {\n      this.setTurnstileRunningState?.(true);\n      await loadScript('https://challenges.cloudflare.com/turnstile/v0/api.js');\n\n      window.turnstile?.render('#turing-target', {\n        sitekey: ENV.consumer.TURNSTILE_KEY,\n        theme: 'light',\n        callback: (token: string) => {\n          this.failed = false;\n          set(this.formField, 'value', token);\n          this.setTurnstileRunningState?.(false);\n          this.submitFormPage?.();\n        },\n        'error-callback': () => {\n          this.failed = true;\n          this.setTurnstileRunningState?.(true);\n        },\n        'challenge-callback': () => {\n          this.scrollToTurnstileWidget();\n        },\n      });\n    } catch (e) {\n      console.error(e);\n      this.setTurnstileRunningState?.(true);\n    }\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { get, set, computed } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  //region Methods\n  ensureValueArray() {\n    if (!Array.isArray(get(this, 'formField.value'))) {\n      set(this, 'formField.value', []);\n    }\n  },\n  isAnswerLimitReached: computed('formField.value.[]', function () {\n    return this.formField.isLimitSelection && this.formField.answerLimit <= this.formField.value?.length;\n  }),\n  removeUncheckedItem(fields, fieldOptionId) {\n    const selectedFieldOptions = fields.filter(field => get(field, 'fieldOptionId') !== fieldOptionId);\n    set(this, 'formField.value', isEmpty(selectedFieldOptions) ? null : selectedFieldOptions);\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    valueChanged(fieldOption, event) {\n      this.ensureValueArray();\n\n      const fieldOptionId = get(fieldOption, 'id');\n      const isChecked = get(event, 'target.checked');\n      const valueArray = get(this, 'formField.value');\n      set(fieldOption, 'isChecked', isChecked);\n      const existing = valueArray.find(val => get(val, 'fieldOptionId') === fieldOptionId);\n      return existing\n        ? isChecked\n          ? set(existing, 'value', true)\n          : this.removeUncheckedItem(valueArray, fieldOptionId)\n        : valueArray.addObject({ fieldOptionId, value: true });\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components */\nimport mobileOperatingSystem from 'secondstreet-common/utils/mobile-operating-system';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  isBrowserWithBadNativeDateUX: ['ios', 'android'].includes(mobileOperatingSystem()),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed, get, set } from '@ember/object';\nimport { readOnly } from '@ember/object/computed';\n\nimport FormField from '../components/ss-form-field';\nimport ReferralShareList from '../mixins/referral-share-list';\n\nconst getPropertyNumber = (computedStyle, name) => Number.parseFloat(computedStyle.getPropertyValue(name));\n\nexport default FormField.extend(ReferralShareList, {\n  //region Attributes\n  /**\n   * URL for sharing the promotion for extra chances\n   * @type {String}\n   */\n  'referral-url': null,\n  //endregion\n\n  //region Ember Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    // Bind the `this` value of the method and save a copy for use by window.removeEventListener\n    this.boundRecalculate = this.recalculateIsTooWide.bind(this);\n\n    this.mutationObserver = new MutationObserver(this.boundRecalculate);\n    this.mutationObserver.observe(this.element, { childList: true, attributes: true, subtree: true });\n    window.addEventListener('resize', this.boundRecalculate);\n  },\n  willDestroyElement() {\n    this._super(...arguments);\n    this.mutationObserver?.disconnect();\n    window.removeEventListener('resize', this.boundRecalculate);\n  },\n  //endregion\n\n  //region Properties\n  mutationObserver: null,\n  isTooWide: false,\n  //endregion\n\n  //region Computed Properties\n  referralLabel: readOnly('formField.labelText'),\n  /**\n   * This specifies whether to ask the user for referrals to get extra chances\n   * @returns {boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  areReferralsEnabled: computed('formField.extraChances', 'referral-url', function () {\n    return get(this, 'formField.extraChances') > 0 && get(this, 'referral-url');\n  }),\n  //endregion\n\n  //region Methods\n  recalculateIsTooWide() {\n    const parent = this.element.parentNode;\n    const pCS = window.getComputedStyle(parent);\n\n    const [pBL, pBR] = [getPropertyNumber(pCS, 'border-left-width'), getPropertyNumber(pCS, 'border-right-width')];\n    const [pPL, pPR] = [getPropertyNumber(pCS, 'padding-left'), getPropertyNumber(pCS, 'padding-right')];\n    const parentInnerBoxWidth = parent.offsetWidth - pBL - pBR - pPL - pPR;\n\n    // We're never setting isTooWide back to false here because if we do, we could get into an infinite loop.\n    if (this.element.scrollWidth > parentInnerBoxWidth) {\n      set(this, 'isTooWide', true);\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from '../components/ss-form-field';\n\nexport default class SsFormFieldFacebookLink extends FormField {}\n","import { action } from '@ember/object';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport { tracked } from '@glimmer/tracking';\nimport { task, timeout } from 'ember-concurrency';\nimport duration from 'secondstreet-common/utils/duration';\nimport FormField from '../components/ss-form-field';\n\nconst PLACES_DEBOUNCE = duration(1000); // ms\n\nexport default class SsFormFieldGooglePlace extends FormField {\n  @service googleMaps;\n  @service settings;\n  @service store;\n  @service current;\n\n  @tracked predictions = [];\n  @tracked googleSuggestionPreference = false;\n  @tracked isLoadingSuggestions = false;\n  @tracked showPredictions = false;\n\n  @action\n  setupMaps() {\n    if (this.googleMaps.google === undefined || this.googleMaps.google.maps === undefined) {\n      this.googleMaps.instantiateGoogleMaps(this.promotionLanguageCode);\n    }\n  }\n\n  get googleIntegrationSetting() {\n    return this.settings.getValueFor('enable_google_integration');\n  }\n\n  get displayPredictions() {\n    return this.googleSuggestionPreference ? this.showPredictions && isPresent(this.predictions) : this.showPredictions;\n  }\n\n  get isLoading() {\n    return this.fetchSuggestionsTask.isRunning || this.isLoadingSuggestions;\n  }\n\n  @action\n  selectPrediction(prediction) {\n    // We don't want to re-render the input field if the user types in a custom (i.e. not from Google) entry\n    if (prediction.place_id) {\n      this.setEntryName(prediction.structured_formatting.main_text, { forceRerender: true });\n      this.setPlaceObject({ google: prediction });\n    } else if (prediction.name) {\n      this.setEntryName(prediction.name, { forceRerender: true });\n      this.setPlaceObject({ internal: prediction });\n    }\n\n    this.showPredictions = false;\n  }\n\n  @action\n  preventFormSubmitOnEnter(event) {\n    if (event.key == 'Enter') event.preventDefault();\n  }\n\n  handleInputTask = task({ restartable: true }, async event => {\n    const placeName = event.target.value;\n    this.setPlaceObject(null);\n    this.setEntryName(placeName);\n\n    if (placeName.length < 3 || !this.googleIntegrationSetting) {\n      this.isLoadingSuggestions = false;\n      this.showPredictions = false;\n      this.predictions = [];\n\n      return;\n    }\n\n    await timeout(duration(250));\n    await this.fetchSuggestionsTask.perform();\n  });\n\n  fetchSuggestionsTask = task({ restartable: true }, async () => {\n    if (this.googleSuggestionPreference) {\n      this.isLoadingSuggestions = true;\n\n      await this.queryPlacesTask.perform();\n    } else {\n      const entryNames = await this.store.query('entry-name', {\n        searchValue: this.placeName,\n        pageSize: 10,\n      });\n\n      this.showPredictions = true;\n      this.predictions = entryNames.toArray();\n    }\n  });\n\n  togglePredictionsTask = task({ restartable: true }, async (showPredictions = false) => {\n    if (isEmpty(this.placeName) || this.placeName?.length < 3 || !this.googleIntegrationSetting) return;\n\n    await timeout(PLACES_DEBOUNCE);\n\n    this.showPredictions = showPredictions;\n  });\n\n  queryPlacesTask = task({ restartable: true }, async () => {\n    await timeout(PLACES_DEBOUNCE);\n\n    if (!isPresent(this.placeName)) {\n      this.predictions = [];\n      return;\n    }\n\n    this.isLoadingSuggestions = false;\n    this.showPredictions = true;\n\n    const geographicArea = this.store.peekAll('geographic-area')?.firstObject;\n\n    const callback = (predictions, status) => {\n      if (status !== this.googleMaps.google.maps.places.PlacesServiceStatus.OK) {\n        predictions = [];\n      }\n\n      if (this.isDestroying || this.isDestroyed) return;\n\n      run(() => (this.predictions = predictions));\n    };\n\n    if (geographicArea) {\n      this.googleMaps.getPlacePredictions(this.placeName, ['establishment'], geographicArea, callback);\n    } else {\n      this.googleMaps.getPlacePredictions(this.placeName, ['establishment'], callback);\n    }\n  });\n\n  @action\n  async switchToGooglePlacesSuggestions() {\n    this.googleSuggestionPreference = !this.googleSuggestionPreference;\n    await this.fetchSuggestionsTask.perform();\n  }\n}\n","import { action, get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\n\nimport FormField from '../components/ss-form-field';\nimport ENV from '../config/environment';\n\nimport { VIDEO_FILE_FORMATS } from 'consumer/utils/constants';\n\nexport default class SsFormFieldImageSelectComponent extends FormField {\n  //region Dependencies\n  @service\n  store;\n  //endregion\n\n  get isMobile() {\n    return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n  }\n\n  get accepts() {\n    return this.formField.allowAllMediaUpload ? `${VIDEO_FILE_FORMATS},image/*` : 'image/*';\n  }\n\n  //region Properties\n  isTestEnvironment = ENV.environment === 'test';\n  //endregion\n\n  //region Methods\n  /**\n   * Logic for handling a new MediaItem that was just uploaded\n   * @param {MediaItem} newMediaItem\n   */\n  _addMediaItem(newMediaItem) {\n    set(this, 'formField.value', get(newMediaItem, 'id'));\n    this['upload-image'](newMediaItem);\n  }\n  //endregion\n\n  //region Actions\n  @action\n  startUpload(file) {\n    this['begin-upload'](file);\n  }\n\n  @action\n  addMediaItem(newMediaItem) {\n    this._addMediaItem(newMediaItem);\n    this.onChange?.();\n  }\n\n  /**\n   * This is used to acceptance uploading an image.\n   * Needed because we can't set the value of a file input dynamically.\n   */\n  @action\n  automateImageUploadForTesting() {\n    const testMediaItem = this.store.createRecord('media-item', {\n      contentType: 'image/jpeg',\n      currentVersionNumber: 1,\n      dipsUrl: 'https://mediadev.secondstreetapp.com/5019',\n      id: 5019,\n      mediaTypeId: 1,\n      size: 260289,\n    });\n    this._addMediaItem(testMediaItem);\n  }\n}\n","import FormField from '../components/ss-form-field';\n\nexport default class SsFormFieldInstagram extends FormField {}\n","/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport { action, computed } from '@ember/object';\nimport { delayFormFieldValueChanged } from 'consumer/utils/delay-form-field-value-changed';\nimport FormField from '../components/ss-form-field';\n\nconst GOOGLE_PLAY_BADGE = {\n  1: '/Images/Logos/google_play_badge_1.svg',\n  2: '/Images/Logos/google_play_badge_2.svg',\n  3: '/Images/Logos/google_play_badge_3.svg',\n};\n\nconst APPLE_APP_STORE_BADGE = {\n  1: '/Images/Logos/apple_app_store_1.svg',\n  2: '/Images/Logos/apple_app_store_2.svg',\n  3: '/Images/Logos/apple_app_store_3.svg',\n};\n\nexport default class extends FormField {\n  // Returns the image source for the google play store badge based on the regional code\n  @computed('organizationPromotion.defaultLanguageId')\n  get androidImageSource() {\n    return GOOGLE_PLAY_BADGE[this.organizationPromotion.defaultLanguageId];\n  }\n\n  // Returns the image source for the apple app store badge based on the regional code\n  @computed('organizationPromotion.defaultLanguageId')\n  get iosImageSource() {\n    return APPLE_APP_STORE_BADGE[this.organizationPromotion.defaultLanguageId];\n  }\n\n  @action\n  valueChanged(value) {\n    delayFormFieldValueChanged(this, value, 3000);\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from '../components/ss-form-field';\n\nexport default class SsFormFieldOptin extends FormField {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { delayFormFieldValueChanged } from 'consumer/utils/delay-form-field-value-changed';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  //region Computed\n  alexaSkillImageSource: '/Images/Logos/alexa_skill_badge.svg',\n  //endregion\n\n  //region Actions\n  actions: {\n    valueChanged(value) {\n      delayFormFieldValueChanged(this, value, 3000);\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/use-ember-get-and-set, ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport $ from 'jquery';\n\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({\n  //region Ember Hooks\n  didRender() {\n    this._super(...arguments);\n    const nativeDataList =\n      !!('list' in document.createElement('input')) &&\n      !!(document.createElement('datalist') && window.HTMLDListElement);\n\n    // For browsers that do not support HTML datalists, we must use jQuery UI's Autocomplete widget in order to render suggested values\n    // For browsers that DO support it however, do not run this widget\n\n    if (this['show-suggested-values'] && !nativeDataList) {\n      const availableTags = $('#suggestions')\n        .find('option')\n        .map(function () {\n          return this.value;\n        })\n        .get();\n      $('.autocomplete-input').autocomplete({ source: availableTags });\n    }\n  },\n  //endregion\n});\n","import FormField from './ss-form-field';\n\nexport default class SsFormFieldTikTokLink extends FormField {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nexport { default } from 'consumer/components/ss-form-field-url-textbox';\n","import { action, get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\n\nimport FormField from '../components/ss-form-field';\nimport { VIDEO_FILE_FORMATS } from 'consumer/utils/constants';\n\nexport default class SsFormFieldVideoSelectComponent extends FormField {\n  //region Dependencies\n  @service\n  i18n;\n  //endregion\n\n  //region Properties\n  /**\n   * Whether a Video Upload is currently in-progress\n   * @type {Boolean}\n   */\n  currentlyUploading = false;\n\n  @tracked\n  isFlyoutOpen;\n  //endregion\n\n  get accepts() {\n    return this.formField.allowAllMediaUpload ? `${VIDEO_FILE_FORMATS},image/*` : VIDEO_FILE_FORMATS;\n  }\n  //region Actions\n  @action\n  switchToYoutubeUpload() {\n    if (this.currentlyUploading) {\n      return;\n    }\n    this.isFlyoutOpen = false;\n    set(this, 'formField.value', null);\n    this.toggleAddByVideoUrl(true);\n  }\n\n  @action\n  startUpload(file) {\n    this['begin-upload'](file);\n  }\n\n  @action\n  addMediaItem(newMediaItem) {\n    this.isFlyoutOpen = false;\n    set(this, 'formField.value', get(newMediaItem, 'id'));\n    this['upload-video'](newMediaItem);\n    this.onChange?.();\n  }\n\n  //endregion\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport FormField from '../components/ss-form-field';\n\nexport default FormField.extend({});\n","import FormField from './ss-form-field';\n\nexport default class SsFormFieldXLink extends FormField {}\n","import FormField from './ss-form-field';\n\nexport default class SsFormFieldYouTubeLink extends FormField {}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nexport { default } from 'consumer/components/ss-form-field';\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action simple-unless }}\\n<div {{did-insert this.setup}} class=\\\"hidden\\\">\\n</div>\\n{{#each this.sortedFormFields as |formField|}}\\n  {{#if (and (eq formField.field.fieldType \\\"ImageSelect\\\") formField.allowVideoUpload)}}\\n    {{#unless (or @mediaId this.addingVideoByUrl)}}\\n      <div>\\n        {{#if @urlTextbox}}\\n          <SsFormFieldVideoSelect\\n            @form-field={{formField}}\\n            @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n            @referrerUrl={{@referrerUrl}}\\n            @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n            @begin-upload={{@beginUpload}}\\n            @upload-video={{@uploadMedia}}\\n            @onChange={{this.onFormFieldChange}}\\n          />\\n        {{else}}\\n          {{component\\n            formField.field.registrationComponent\\n            form-field=formField\\n            hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n            referrerUrl=@referrerUrl\\n            begin-upload=@beginUpload\\n            upload-image=@uploadMedia\\n            submitFormPage=this.submitFormPage\\n            onChange=this.onFormFieldChange\\n          }}\\n        {{/if}}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"ImageSelect\\\")}}\\n    {{#unless @uploadedMediaItemId}}\\n      <div>\\n        {{component\\n          formField.field.registrationComponent\\n          form-field=formField\\n          hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n          referrerUrl=@referrerUrl\\n          begin-upload=@beginUpload\\n          upload-image=@uploadMedia\\n          submitFormPage=this.submitFormPage\\n          onChange=this.onFormFieldChange\\n        }}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"UrlTextbox\\\")}}\\n    {{#if (and (not @uploadedVideoId) this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldUrlTextbox\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video-by-url={{@uploadVideoByUrl}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/if}}\\n  {{else if (eq formField.field.fieldType \\\"VideoSelect\\\")}}\\n    {{#unless (or @uploadedVideoId this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldVideoSelect\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video={{@uploadVideo}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/unless}}\\n  {{else}}\\n    {{#unless (and @isBallotForm (or (eq formField @entryNameField) (eq formField @googlePlaceField)))}}\\n      {{component\\n        formField.field.registrationComponent\\n        form-field=formField\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=@beginUpload\\n        upload-image=@uploadImage\\n        submitFormPage=this.submitFormPage\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/unless}}\\n  {{/if}}\\n{{/each}}\\n\\n{{#if @page.errors.messages}}\\n  {{#each @page.errors.messages as |message|}}\\n    <span class=\\\"ssDanger\\\">\\n      {{message}}\\n    </span>\\n  {{/each}}\\n{{/if}}\", {\"contents\":\"{{! template-lint-disable no-action simple-unless }}\\n<div {{did-insert this.setup}} class=\\\"hidden\\\">\\n</div>\\n{{#each this.sortedFormFields as |formField|}}\\n  {{#if (and (eq formField.field.fieldType \\\"ImageSelect\\\") formField.allowVideoUpload)}}\\n    {{#unless (or @mediaId this.addingVideoByUrl)}}\\n      <div>\\n        {{#if @urlTextbox}}\\n          <SsFormFieldVideoSelect\\n            @form-field={{formField}}\\n            @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n            @referrerUrl={{@referrerUrl}}\\n            @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n            @begin-upload={{@beginUpload}}\\n            @upload-video={{@uploadMedia}}\\n            @onChange={{this.onFormFieldChange}}\\n          />\\n        {{else}}\\n          {{component\\n            formField.field.registrationComponent\\n            form-field=formField\\n            hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n            referrerUrl=@referrerUrl\\n            begin-upload=@beginUpload\\n            upload-image=@uploadMedia\\n            submitFormPage=this.submitFormPage\\n            onChange=this.onFormFieldChange\\n          }}\\n        {{/if}}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"ImageSelect\\\")}}\\n    {{#unless @uploadedMediaItemId}}\\n      <div>\\n        {{component\\n          formField.field.registrationComponent\\n          form-field=formField\\n          hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n          referrerUrl=@referrerUrl\\n          begin-upload=@beginUpload\\n          upload-image=@uploadMedia\\n          submitFormPage=this.submitFormPage\\n          onChange=this.onFormFieldChange\\n        }}\\n      </div>\\n    {{/unless}}\\n  {{else if (eq formField.field.fieldType \\\"UrlTextbox\\\")}}\\n    {{#if (and (not @uploadedVideoId) this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldUrlTextbox\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video-by-url={{@uploadVideoByUrl}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/if}}\\n  {{else if (eq formField.field.fieldType \\\"VideoSelect\\\")}}\\n    {{#unless (or @uploadedVideoId this.addingVideoByUrl)}}\\n      <div>\\n        <SsFormFieldVideoSelect\\n          @form-field={{formField}}\\n          @hasRequiredTwitterFollow={{this.hasRequiredTwitterFollow}}\\n          @referrerUrl={{@referrerUrl}}\\n          @toggleAddByVideoUrl={{this.toggleAddByVideoUrl}}\\n          @begin-upload={{@beginUpload}}\\n          @upload-video={{@uploadVideo}}\\n          @onChange={{this.onFormFieldChange}}\\n        />\\n      </div>\\n    {{/unless}}\\n  {{else}}\\n    {{#unless (and @isBallotForm (or (eq formField @entryNameField) (eq formField @googlePlaceField)))}}\\n      {{component\\n        formField.field.registrationComponent\\n        form-field=formField\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=@beginUpload\\n        upload-image=@uploadImage\\n        submitFormPage=this.submitFormPage\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/unless}}\\n  {{/if}}\\n{{/each}}\\n\\n{{#if @page.errors.messages}}\\n  {{#each @page.errors.messages as |message|}}\\n    <span class=\\\"ssDanger\\\">\\n      {{message}}\\n    </span>\\n  {{/each}}\\n{{/if}}\",\"moduleName\":\"consumer-sweepstakes/components/ss-form-page-entry-registration.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form-page-entry-registration.hbs\"}});\nimport { action } from '@ember/object';\n\nimport SsFormPageComponent from './ss-form-page';\nimport { tracked } from '@glimmer/tracking';\n\nexport default class SsFormPageEntryRegistrationComponent extends SsFormPageComponent {\n  suggestedValues = this.args.suggestedValues || [];\n\n  @tracked addingVideoByUrl = this.args.addingVideoByUrl || false;\n\n  setup = () => {\n    // If there is a Google Place field, its label should appear the same as the entry name field's label text\n    if (this.args.googlePlaceField && this.args.entryNameField) {\n      this.args.googlePlaceField.labelText = this.args.entryNameField.labelText;\n    }\n  };\n\n  @action\n  toggleAddByVideoUrl(bool: boolean) {\n    this.addingVideoByUrl = bool;\n  }\n}\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action }}\\n<form\\n  {{on \\\"submit\\\" (prevent-default (if this.isExtraChancesForm (noop) this.submitFormPage))}}\\n  class=\\\"form {{if @noBottomWhitespace 'no-bottom-whitespace'}}\\\"\\n>\\n  {{#if this.sortedFormFields.length}}\\n    {{#if @registrationPrompt}}\\n      {{#if (current \\\"organizationPromotion.promotion.isBallot\\\")}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{i18n-t \\\"register\\\"}}\\n        </div>\\n        <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n          {{i18n-t \\\"write-in_information_text\\\"}}\\n        </div>\\n      {{else}}\\n        <div class=\\\"registration-prompt\\\">\\n          <hr class=\\\"registration-ruler\\\" />\\n          <span class=\\\"registration-text\\\">\\n            {{this.registrationPrompt}}\\n          </span>\\n          <hr class=\\\"registration-ruler\\\" />\\n        </div>\\n      {{/if}}\\n    {{/if}}\\n    {{#each this.sortedFormFields as |formField|}}\\n      {{component\\n        formField.field.registrationComponent\\n        organizationPromotion=(current \\\"organizationPromotion\\\")\\n        form-field=formField\\n        form-type=this.formType\\n        dips-url=@dipsUrl\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=this.beginUpload\\n        upload-image=this.uploadImage\\n        referral-url=@referralUrl\\n        auto-focus=(and @autoFocus (eq this.sortedFormFields.firstObject formField))\\n        submit-form-field=this.submitFormField\\n        submitFormPage=this.submitFormPage\\n        isSaving=(and @isSaving (eq this.currentSubmittingField formField))\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/each}}\\n  {{/if}}\\n  {{#if @submissionErrorMessage}}\\n    <div class=\\\"submission-error-message\\\">\\n      {{@submissionErrorMessage}}\\n    </div>\\n  {{/if}}\\n  {{#unless this.isExtraChancesForm}}\\n    {{#if @showCancelButton}}\\n      <div\\n        role=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" @cancel}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </div>\\n    {{/if}}\\n    <button\\n      disabled={{this.isSaving}}\\n      class=\\\"ssButton\\n        {{if\\n          (and (or @isNominating @isVoting) this.isLastPage)\\n          'vote-button ssFormVoteButton'\\n          'ssFormButton ssButtonPrimary bg-primary text-primary-text template-color-primary-background-color'\\n        }}\\n        {{if this.isLastPage 'ssButtonContinue'}}\\n        {{if this.isSaving 'ssButtonDisabled'}}\\n        {{if @engagementStyle 'engagement-button'}}\\n        {{if (and (or @isNominating @isVoting) @isBallot) 'w-full'}}\\n        \\\"\\n      type=\\\"submit\\\"\\n    >\\n      {{#if this.isLastPage}}\\n        {{i18n-t this.submitButtonText}}\\n      {{else}}\\n        {{i18n-t \\\"continue\\\"}}\\n        <i aria-hidden=\\\"true\\\" class=\\\"ssIcon-chevron-right\\\"></i>\\n      {{/if}}\\n    </button>\\n    {{#if @showCancelPaymentButton}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" (queue @clearForm @cancel)}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </button>\\n    {{/if}}\\n    {{#if @optionalRegistration}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        {{on \\\"click\\\" @skip}}\\n        class=\\\"ssButton ssButtonSkip\\n          {{if this.isSaving 'ssButtonDisabled' 'ssButtonSecondary'}}\\n          {{if @engagementStyle 'engagement-button'}}\\\"\\n      >\\n        {{i18n-t \\\"skip\\\"}}\\n      </button>\\n    {{/if}}\\n  {{/unless}}\\n</form>\", {\"contents\":\"{{! template-lint-disable no-action }}\\n<form\\n  {{on \\\"submit\\\" (prevent-default (if this.isExtraChancesForm (noop) this.submitFormPage))}}\\n  class=\\\"form {{if @noBottomWhitespace 'no-bottom-whitespace'}}\\\"\\n>\\n  {{#if this.sortedFormFields.length}}\\n    {{#if @registrationPrompt}}\\n      {{#if (current \\\"organizationPromotion.promotion.isBallot\\\")}}\\n        <div class=\\\"entry-registration-form__header text-center !text-gray-450\\\">\\n          {{i18n-t \\\"register\\\"}}\\n        </div>\\n        <div class=\\\"text-sm pb-2 text-center text-gray-450\\\">\\n          {{i18n-t \\\"write-in_information_text\\\"}}\\n        </div>\\n      {{else}}\\n        <div class=\\\"registration-prompt\\\">\\n          <hr class=\\\"registration-ruler\\\" />\\n          <span class=\\\"registration-text\\\">\\n            {{this.registrationPrompt}}\\n          </span>\\n          <hr class=\\\"registration-ruler\\\" />\\n        </div>\\n      {{/if}}\\n    {{/if}}\\n    {{#each this.sortedFormFields as |formField|}}\\n      {{component\\n        formField.field.registrationComponent\\n        organizationPromotion=(current \\\"organizationPromotion\\\")\\n        form-field=formField\\n        form-type=this.formType\\n        dips-url=@dipsUrl\\n        hasRequiredTwitterFollow=this.hasRequiredTwitterFollow\\n        referrerUrl=@referrerUrl\\n        promotion-language-code=@languageCode\\n        begin-upload=this.beginUpload\\n        upload-image=this.uploadImage\\n        referral-url=@referralUrl\\n        auto-focus=(and @autoFocus (eq this.sortedFormFields.firstObject formField))\\n        submit-form-field=this.submitFormField\\n        submitFormPage=this.submitFormPage\\n        isSaving=(and @isSaving (eq this.currentSubmittingField formField))\\n        setTurnstileRunningState=this.setTurnstileRunningState\\n        onChange=this.onFormFieldChange\\n      }}\\n    {{/each}}\\n  {{/if}}\\n  {{#if @submissionErrorMessage}}\\n    <div class=\\\"submission-error-message\\\">\\n      {{@submissionErrorMessage}}\\n    </div>\\n  {{/if}}\\n  {{#unless this.isExtraChancesForm}}\\n    {{#if @showCancelButton}}\\n      <div\\n        role=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" @cancel}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </div>\\n    {{/if}}\\n    <button\\n      disabled={{this.isSaving}}\\n      class=\\\"ssButton\\n        {{if\\n          (and (or @isNominating @isVoting) this.isLastPage)\\n          'vote-button ssFormVoteButton'\\n          'ssFormButton ssButtonPrimary bg-primary text-primary-text template-color-primary-background-color'\\n        }}\\n        {{if this.isLastPage 'ssButtonContinue'}}\\n        {{if this.isSaving 'ssButtonDisabled'}}\\n        {{if @engagementStyle 'engagement-button'}}\\n        {{if (and (or @isNominating @isVoting) @isBallot) 'w-full'}}\\n        \\\"\\n      type=\\\"submit\\\"\\n    >\\n      {{#if this.isLastPage}}\\n        {{i18n-t this.submitButtonText}}\\n      {{else}}\\n        {{i18n-t \\\"continue\\\"}}\\n        <i aria-hidden=\\\"true\\\" class=\\\"ssIcon-chevron-right\\\"></i>\\n      {{/if}}\\n    </button>\\n    {{#if @showCancelPaymentButton}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        class=\\\"ssButton ssButtonFlat ssButtonMuted {{if this.isSaving 'ssButtonDisabled'}}\\\"\\n        {{on \\\"click\\\" (queue @clearForm @cancel)}}\\n      >\\n        {{i18n-t \\\"ugc_sweeps_round_switcher_cancel\\\"}}\\n      </button>\\n    {{/if}}\\n    {{#if @optionalRegistration}}\\n      <button\\n        type=\\\"button\\\"\\n        disabled={{this.isSaving}}\\n        {{on \\\"click\\\" @skip}}\\n        class=\\\"ssButton ssButtonSkip\\n          {{if this.isSaving 'ssButtonDisabled' 'ssButtonSecondary'}}\\n          {{if @engagementStyle 'engagement-button'}}\\\"\\n      >\\n        {{i18n-t \\\"skip\\\"}}\\n      </button>\\n    {{/if}}\\n  {{/unless}}\\n</form>\",\"moduleName\":\"consumer-sweepstakes/components/ss-form-page.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form-page.hbs\"}});\n/* eslint-disable  ember/no-get, @typescript-eslint/restrict-template-expressions */\nimport Component from '@glimmer/component';\nimport { action, get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport { isBlank } from '@ember/utils';\nimport { tracked } from '@glimmer/tracking';\nimport CurrentService from 'consumer/services/current';\nimport FormFieldModel from 'consumer/models/form-field';\n\nexport interface SSFormPageSignature {\n  Element: HTMLDivElement;\n  Args: {\n    form: any;\n    page: any;\n    isSaving: boolean;\n    isVoting: boolean;\n    isNominating: boolean;\n    dipsUrl: string;\n    formSubmissionId: string;\n    optionalRegistration: boolean;\n    skip: () => void;\n    referrer: string;\n    referrerUrl: string;\n    languageCode: string;\n    beginUpload: (file: File, formField: any) => void;\n    uploadImage: (file: File, formField: any) => void;\n    showCancelButton: boolean;\n    showCancelPaymentButton: boolean;\n    cancel: () => void;\n    submitFormPage: (page: any, formField?: any) => void;\n    registrationPrompt: string;\n    autoFocus: boolean;\n    engagementStyle: string;\n    updateStoredFormFields: (fields: Record<string, any>) => void;\n    referralUrl: string;\n    noBottomWhitespace: boolean;\n    submissionErrorMessage: string;\n    continueToPayment: boolean;\n    clearForm: () => void;\n    storeFieldValues?: boolean;\n    uploadedMediaItemId: string | null;\n    uploadedVideoId: string | null;\n    isBallotForm: boolean;\n    suggestedValues: Array<string> | null;\n    matchupClassificationType: string | null;\n    entryNameField: any;\n    googlePlaceField: any;\n    promotionType: string | null;\n    addingVideoByUrl: boolean;\n    setTurnstileRunningState?: (isTurnstileChecking: boolean) => void;\n  };\n}\n\nexport default class SsFormPageComponent extends Component<SSFormPageSignature> {\n  @service declare current: CurrentService;\n  @service declare localStorage: any;\n  @service declare session: any;\n  @service declare enums: any;\n  @service declare store: any;\n\n  @tracked isTurnstileChecking = false;\n  @tracked currentSubmittingField: any = null;\n\n  storeFieldValues = this.args.storeFieldValues ?? true;\n\n  get formType() {\n    return this.args.form?.formType;\n  }\n\n  get isExtraChancesForm() {\n    return this.formType === 'ExtraChances';\n  }\n\n  get isSaving() {\n    return this.isTurnstileChecking || this.args.isSaving;\n  }\n\n  get isLastPage() {\n    return this.args.form?.formPagesCount === this.args.page?.pageNumber;\n  }\n\n  get sortedFormFields() {\n    const organizationId = get(this, 'current.organizationPromotion.organization.id');\n    const formFields = (get(this, 'args.page.formFields') as Array<any>) || [];\n\n    if (get(this, 'current.organizationPromotion.isSyndicatedFrom')) {\n      return formFields.toArray().sort((a, b) => {\n        const aMatches = a.field.organizationId == organizationId;\n        const bMatches = b.field.organizationId == organizationId;\n\n        if (aMatches && !bMatches) return 1;\n        if (!aMatches && bMatches) return -1;\n\n        return a.displayOrder - b.displayOrder;\n      });\n    }\n\n    return formFields.toArray().sort((a, b) => {\n      return a.displayOrder - b.displayOrder;\n    });\n  }\n\n  get hasRequiredTwitterFollow() {\n    const formFields = get(this, 'args.page.formFields') as Array<any>;\n    if (formFields) {\n      const requiredFormFields = formFields.filter(fomField => fomField.isRequired);\n      return !!requiredFormFields.filterBy('fieldType', 'TwitterFollowApi').length;\n    }\n    return false;\n  }\n\n  get submitButtonText() {\n    return this.args.isNominating\n      ? 'nominate'\n      : this.args.isVoting\n      ? 'vote_button_vote'\n      : this.args.continueToPayment\n      ? 'continue_to_payment'\n      : 'submit';\n  }\n\n  //endregion\n\n  //region Methods\n\n  prefix = (str: string) => {\n    const form = this.args.form || this.args.page.form;\n    return `FORM_${form.id}_${str}`;\n  };\n\n  falsifyUndefinedFormFields = (formField: any) => {\n    const falsifiableFields = ['TwitterFollowApi', 'TwitterTweetApi'];\n    if (falsifiableFields.includes(get(formField, 'field.fieldType')) && isBlank(formField.value)) {\n      set(formField, 'value', false);\n    }\n  };\n\n  @action\n  submitFormPage() {\n    if (!this.isSaving) {\n      this.args.submitFormPage(this.args.page);\n    }\n  }\n\n  @action\n  skip() {\n    if (!this.isSaving) {\n      this.args.skip();\n    }\n  }\n\n  @action\n  submitFormField(formField: any) {\n    if (!this.isSaving) {\n      this.currentSubmittingField = formField;\n      this.args.submitFormPage(this.args.page, formField);\n    }\n  }\n\n  @action\n  setTurnstileRunningState(isTurnstileChecking: boolean) {\n    this.isTurnstileChecking = isTurnstileChecking;\n    this.args.setTurnstileRunningState?.(isTurnstileChecking);\n  }\n\n  @action\n  onFormFieldChange() {\n    const obj = {};\n    const storedFormFields = {};\n    const formFields = (this.args.page.formFields?.toArray() as Array<any>) || [];\n    if (formFields.some(field => field.value) && !this.isSaving) {\n      formFields.forEach((formField: FormFieldModel) => {\n        const key = formField.id as never;\n        const value = formField.value as never;\n        if (this.storeFieldValues && formField.fieldType !== 'Checkboxes') {\n          set(obj, key, value);\n        }\n        set(storedFormFields, key, value);\n      });\n      this.args.updateStoredFormFields?.(storedFormFields);\n      this.localStorage.setItem(this.prefix('formValues'), JSON.stringify(obj));\n    }\n    return this.storeFieldValues ? obj : {};\n  }\n}\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{! template-lint-disable no-action }}\\n<div\\n  {{did-insert this.setup}}\\n  {{!-- {{did-update this.updateFormPage this.desiredPageNumber}} --}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.emailAddressThatIsAlreadyInUse}}\\n      <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{@promotionName}} />\\n    {{else if this.emailAddressThatRequiresVerification}}\\n      <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n    {{else}}\\n      {{#if this.isLogoutVisible}}\\n        <div class=\\\"form-user\\\">\\n          <a href=\\\"javascript:;\\\" class=\\\"ssStartFormOver\\\" {{action (queue this.clearStoredValues this.logout)}}>\\n            {{i18n-t \\\"start_form_over\\\"}}\\n          </a>\\n        </div>\\n      {{/if}}\\n      {{#if this.currentFormPage}}\\n        <SsFormPage\\n          @organizationPromotion={{@organizationPromotion}}\\n          @form={{this.form}}\\n          @page={{this.currentFormPage}}\\n          @isSaving={{this.submitFormPageTask.isRunning}}\\n          @isVoting={{@isVoting}}\\n          @isNominating={{@isNominating}}\\n          @isBallot={{@isBallot}}\\n          @dipsUrl={{@dipsUrl}}\\n          @formSubmissionId={{this.formSubmissionId}}\\n          @optionalRegistration={{@optionalRegistration}}\\n          @skip={{@skip}}\\n          @referrer={{@referrer}}\\n          @referrerUrl={{@referrerUrl}}\\n          @languageCode={{this.languageCode}}\\n          @beginUpload={{optional @beginUpload}}\\n          @uploadImage={{optional @uploadImage}}\\n          @showCancelButton={{@showCancelButton}}\\n          @showCancelPaymentButton={{@showCancelPaymentButton}}\\n          @cancel={{@cancel}}\\n          @submitFormPage={{perform this.submitFormPageTask}}\\n          @registrationPrompt={{@registrationPrompt}}\\n          @autoFocus={{@autoFocus}}\\n          @engagementStyle={{@engagementStyle}}\\n          @persistEntryData={{true}}\\n          @updateStoredFormFields={{this.updateStoredFormFields}}\\n          @referralUrl={{@referralUrl}}\\n          @noBottomWhitespace={{@noBottomWhitespace}}\\n          @submissionErrorMessage={{this.submissionErrorMessage}}\\n          @continueToPayment={{@continueToPayment}}\\n          @clearForm={{this.clearForm}}\\n        />\\n      {{/if}}\\n    {{/if}}\\n  {{/if}}\\n</div>\", {\"contents\":\"{{! template-lint-disable no-action }}\\n<div\\n  {{did-insert this.setup}}\\n  {{!-- {{did-update this.updateFormPage this.desiredPageNumber}} --}}\\n  {{will-destroy this.cleanup}}\\n  class=\\\"ssForm {{this.formTypeClass}}\\\"\\n  ...attributes\\n>\\n  {{#if\\n    (and this.session.thirdPartyAuthProvider (not this.session.isLoggedIn) this.session.thirdPartyUsesExternalLogin)\\n  }}\\n    <div>\\n      <button type=\\\"button\\\" class=\\\"ssButton third-party-login\\\" {{on \\\"click\\\" this.launchThirdPartyRequestLogin}}>\\n        {{i18n-t \\\"login\\\"}}\\n      </button>\\n    </div>\\n  {{else}}\\n    {{#if this.emailAddressThatIsAlreadyInUse}}\\n      <EmailAlreadyInUse @email={{this.emailAddressThatIsAlreadyInUse}} @promotion-name={{@promotionName}} />\\n    {{else if this.emailAddressThatRequiresVerification}}\\n      <EmailVerificationRequired @email={{this.emailAddressThatRequiresVerification}} />\\n    {{else}}\\n      {{#if this.isLogoutVisible}}\\n        <div class=\\\"form-user\\\">\\n          <a href=\\\"javascript:;\\\" class=\\\"ssStartFormOver\\\" {{action (queue this.clearStoredValues this.logout)}}>\\n            {{i18n-t \\\"start_form_over\\\"}}\\n          </a>\\n        </div>\\n      {{/if}}\\n      {{#if this.currentFormPage}}\\n        <SsFormPage\\n          @organizationPromotion={{@organizationPromotion}}\\n          @form={{this.form}}\\n          @page={{this.currentFormPage}}\\n          @isSaving={{this.submitFormPageTask.isRunning}}\\n          @isVoting={{@isVoting}}\\n          @isNominating={{@isNominating}}\\n          @isBallot={{@isBallot}}\\n          @dipsUrl={{@dipsUrl}}\\n          @formSubmissionId={{this.formSubmissionId}}\\n          @optionalRegistration={{@optionalRegistration}}\\n          @skip={{@skip}}\\n          @referrer={{@referrer}}\\n          @referrerUrl={{@referrerUrl}}\\n          @languageCode={{this.languageCode}}\\n          @beginUpload={{optional @beginUpload}}\\n          @uploadImage={{optional @uploadImage}}\\n          @showCancelButton={{@showCancelButton}}\\n          @showCancelPaymentButton={{@showCancelPaymentButton}}\\n          @cancel={{@cancel}}\\n          @submitFormPage={{perform this.submitFormPageTask}}\\n          @registrationPrompt={{@registrationPrompt}}\\n          @autoFocus={{@autoFocus}}\\n          @engagementStyle={{@engagementStyle}}\\n          @persistEntryData={{true}}\\n          @updateStoredFormFields={{this.updateStoredFormFields}}\\n          @referralUrl={{@referralUrl}}\\n          @noBottomWhitespace={{@noBottomWhitespace}}\\n          @submissionErrorMessage={{this.submissionErrorMessage}}\\n          @continueToPayment={{@continueToPayment}}\\n          @clearForm={{this.clearForm}}\\n        />\\n      {{/if}}\\n    {{/if}}\\n  {{/if}}\\n</div>\",\"moduleName\":\"consumer-sweepstakes/components/ss-form.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/ss-form.hbs\"}});\n/* eslint-disable @typescript-eslint/restrict-template-expressions, ember/no-get */\nimport Component from '@glimmer/component';\nimport { get, set, action } from '@ember/object';\nimport { later, scheduleOnce } from '@ember/runloop';\nimport { next, run } from '@ember/runloop';\nimport duration from 'secondstreet-common/utils/duration';\nimport { inject as service } from '@ember/service';\nimport { camelize } from '@ember/string';\nimport { isBlank, isEmpty, isNone, isPresent } from '@ember/utils';\nimport { tracked } from '@glimmer/tracking';\nimport clearFormFieldValues from 'consumer/utils/clear-form-field-values';\nimport specialEncode from 'consumer/utils/special-encode';\nimport talker from 'consumer/utils/talker';\nimport flatten from 'lodash/flatten';\nimport { ForbiddenError } from 'secondstreet-common/utils/errors';\nimport Errors from 'secondstreet-common/utils/errors';\nimport { focusFirstIn } from '../utils/accessibility';\nimport EnumsService from 'ember-cli-ss-enums/services/enums';\nimport RouterService from '@ember/routing/router-service';\nimport ScrollerService from 'consumer/services/scroller';\nimport DesignSettingsService from 'consumer/services/design-settings';\nimport Store from '@ember-data/store';\nimport FormFieldModel from 'consumer/models/form-field';\nimport FormPageModel from 'consumer/models/form-page';\nimport MatchupModel from 'consumer/models/matchup';\nimport FormPageSubmissionModel from 'consumer/models/form-page-submission';\nimport FormModel from 'consumer/models/form';\nimport { task } from 'ember-concurrency';\nimport MatchupEntryModel from 'consumer/models/matchup-entry';\nimport { InvalidError } from '@ember-data/adapter/error';\n\nconst isMultipleCheckbox = (formField: FormFieldModel) => formField.fieldType === 'Checkboxes';\n\nconst splitCheckedIntoFormFields = (formField: FormFieldModel) => {\n  const { value } = formField;\n  if (!Array.isArray(value)) {\n    return [];\n  }\n  return value.map(({ fieldOptionId }) => ({ field: formField.field, value: fieldOptionId }));\n};\n\nconst CAPTCHA_FORM_PAGE_ID = -9999;\n\nexport type Error = {\n  message: {\n    errors: Array<{\n      key?: string;\n      detail?: string;\n      data?: any;\n      message?: string;\n    }>;\n    meta?: {\n      form_submission_id?: string;\n      sessions?: {\n        access_token?: string;\n      };\n    };\n  };\n  errors?: Array<{\n    detail: string;\n  }>;\n  source: {\n    pointer: string;\n  };\n  detail: string;\n  data: any;\n};\n\nexport interface SsFormSignature {\n  Element: HTMLDivElement;\n  Args: {\n    form?: FormModel;\n    matchup?: MatchupModel;\n    referrer: string;\n    disqualify: () => void;\n    languageCode: string;\n    finished?: (matchup?: MatchupModel, matchupEntryId?: string, entryId?: string) => void;\n    scrollToTopOfForm: boolean;\n    logout(): Promise<void>;\n    promotionName: string;\n    registrationPrompt: string;\n    optionalRegistration: boolean;\n    skip: () => void;\n    engagementStyle: string;\n    hideThirdPartyRequestOnLoad: boolean;\n    delayClearFormFieldValues: boolean;\n    referrerUrl: string;\n    lastPageSubmitted: string;\n    isQuiz: boolean;\n    continueToPayment: boolean;\n    showCancelPaymentButton: boolean;\n    cancel: () => void;\n    showCancelButton: boolean;\n    isVoting: boolean;\n    isNominating?: boolean;\n    isBallot?: boolean;\n    autoFocus: boolean;\n    promotionType: string;\n    promotionSubType: string;\n    organizationPromotion: string;\n    dipsUrl: string;\n    referralUrl: string;\n    extraChancesAdded: (extraChances: number) => void;\n    noBottomWhitespace: boolean;\n    entryForm?: FormModel;\n    registrationForm?: FormModel;\n    currentMatchupEntry: MatchupEntryModel;\n    googleMapsApiKey: string;\n    beginSubmission: () => void;\n    freezeFormState: boolean;\n    suggestedValues: string[];\n    transformLoginEmailRedirectPath: (str: string) => string;\n    isEditingSubmission: boolean;\n    changeToWriteIn: boolean;\n    closeChangeWriteIn: () => void;\n    labelTextOverride: string;\n    disableWriteinAutocomplete: boolean;\n    matchupClassificationType: string;\n    persistEntryData: boolean;\n    clearEntryFormSubmission: boolean;\n    showFormHeaders: boolean;\n    splitSubmission: boolean;\n    hasCategories: boolean;\n    matchupName: string;\n    storeFieldValues: boolean;\n  };\n}\n\nexport default class SsFormNewComponent extends Component<SsFormSignature> {\n  @service declare enums: EnumsService;\n  @service declare localStorage: any;\n  @service declare loginRequest: any;\n  @service declare router: RouterService;\n  @service declare scroller: ScrollerService;\n  @service declare session: any;\n  @service declare store: Store;\n  @service('design-settings') declare designSettings: DesignSettingsService;\n\n  @tracked currentFormPage?: FormPageModel;\n  @tracked storedFormFields?: Record<string, unknown>;\n  @tracked isStarted = false;\n  @tracked isFinished = false;\n  @tracked forceDisableForm = false;\n  @tracked hasMismatchErrored = false;\n  @tracked desiredPageNumber = '';\n  @tracked formSubmissionId?: number;\n  @tracked entryFormSubmissionId?: number;\n  @tracked failedFormSubmissionId?: string;\n  @tracked matchupEntryId?: string;\n  @tracked entryId?: string;\n  @tracked emailAddressThatIsAlreadyInUse?: string;\n  @tracked emailAddressThatRequiresVerification?: string;\n  @tracked submissionErrorMessage?: string;\n  @tracked placeObject: { google?: any; internal?: any } = {};\n\n  @tracked isTurnstileChecking = false;\n\n  container?: HTMLElement;\n\n  transformLoginEmailRedirectPath = this.args.transformLoginEmailRedirectPath || (str => str);\n\n  languageCode = this.args.languageCode || 'en-US';\n\n  clearEntryFormSubmission = this.args.clearEntryFormSubmission ?? true;\n\n  get form() {\n    return this.args.form || this.args.registrationForm;\n  }\n\n  get formTypeClass() {\n    return `ssForm${this.form?.formType}`;\n  }\n\n  get isLogoutVisible() {\n    if (!this.session.usesSecondStreetLogin) {\n      return false;\n    }\n    return this.currentFormPage?.pageNumber == 1 ? false : this.session.isRegistered;\n  }\n\n  get isFirstPage() {\n    return this.currentFormPage?.pageNumber == 1;\n  }\n\n  get canChangeUpload() {\n    return (\n      this.args.splitSubmission ||\n      (this.isFirstPage &&\n        isEmpty(this.emailAddressThatIsAlreadyInUse) &&\n        isEmpty(this.emailAddressThatRequiresVerification))\n    );\n  }\n\n  get isLastPage() {\n    return this.form?.formPagesCount === this.currentFormPage?.pageNumber;\n  }\n\n  get emailFormField(): FormFieldModel | undefined {\n    if (!this.currentFormPage?.formFields) {\n      return undefined;\n    }\n\n    return this.currentFormPage.formFields\n      ?.toArray()\n      .find(formField => formField.fieldId == this.enums.findWhere('FIELD', { name: 'Email' }).toString());\n  }\n\n  get nextRegistrationPageToComplete() {\n    return undefined as FormPageModel | undefined;\n  }\n\n  get formFields() {\n    return this.currentFormPage?.formFields.toArray() || [];\n  }\n\n  @action\n  async setup(el: HTMLElement) {\n    this.container = el;\n    this.acknowledgeForm();\n    this.sessionRelatedSetup();\n    await this.restoreState();\n  }\n\n  @action\n  cleanup() {\n    if (!this.isFinished) {\n      void talker.send('event', { type: 'form:abandoned', detail: null });\n    }\n    this.forceDisableForm = false;\n    this.clearFormPageErrors();\n  }\n\n  /* didUpdateAttrs() {\n    this.forceDisableForm = false;\n    this.clearFormPageErrors();\n  } */\n\n  @action\n  clearStoredValues() {\n    this.storedFormFields = {};\n  }\n\n  clearFormPageErrors() {\n    this.form?.formPages?.forEach(fp => {\n      fp.errors?.clear();\n    });\n  }\n\n  restoreState = async () => {\n    await this.session.loadStoredSession();\n    await this.restoreProgress();\n    await this.restoreFormValues();\n    await this.restoreMinimumAgeRestriction();\n  };\n\n  acknowledgeForm = () => {\n    this.session.acknowledgeForm(this.form?.id);\n    if (this.args.entryForm) {\n      this.session.acknowledgeForm(this.args.entryForm.id);\n    }\n  };\n\n  sessionRelatedSetup = () => {\n    if (this.session.thirdPartyAuthProvider) {\n      this.addThirdPartyCancelHandler();\n    } else {\n      this.session.one('thirdPartyAuthProviderDetected', () => this.addThirdPartyCancelHandler());\n    }\n    if (this.form?.formPages.length === 1 && this.form?.formPages?.firstObject?.pageNumber === 1) {\n      this.currentFormPage = this.form.formPages.firstObject;\n    }\n    this.storedFormFields = {};\n    if (!this.args.storeFieldValues) {\n      void this.clearProgress();\n    }\n\n    void talker.send('event', { type: 'form:visible', detail: null });\n  };\n\n  addThirdPartyCancelHandler = () => {\n    if (!this.session.thirdPartyUsesExternalLogin) {\n      return;\n    }\n    if (this.args.hideThirdPartyRequestOnLoad !== true && this.session.isLoggedIn) {\n      this.launchThirdPartyRequestLogin();\n    }\n\n    if (this.args.optionalRegistration) {\n      this.session.on('thirdPartyLoginCanceled', () => this.args.skip?.());\n    }\n  };\n\n  clearProgress = async () => {\n    if (this.clearEntryFormSubmission) {\n      const localStorage = await this.localStorage;\n      localStorage.removeItem(this.prefix('entryFormSubmissionId'));\n    }\n  };\n\n  prefix = (str: string) => {\n    return `FORM_${this.form?.id}_${str}`;\n  };\n\n  launchThirdPartyRequestLogin = () => {\n    void talker.send('thirdParty', {\n      event: 'requestThirdPartyLogin',\n    });\n  };\n\n  ///fix below\n  submitFormPageTask = task({ drop: true }, async (page: FormPageModel, formField?: FormFieldModel) => {\n    let result;\n    const formPageSubmission = this.createFormSubmission(page, formField);\n\n    if (this.placeObject?.google) {\n      formPageSubmission.googlePlaceId = this.placeObject.google.place_id;\n      formPageSubmission.googlePlaceName = this.placeObject.google.structured_formatting.main_text;\n    } else if (this.placeObject?.internal) {\n      formPageSubmission.locationId = this.placeObject.internal.locationId;\n    }\n\n    const extraChances = this.sumExtraChances(page, formField);\n    if (this.currentFormPage) {\n      const { formFields } = this.currentFormPage;\n\n      try {\n        result = await formPageSubmission.save();\n        await this.submissionSuccess(result, extraChances, formFields.toArray());\n      } catch (error: any) {\n        this.submissionFailure(error);\n      }\n    }\n    return result;\n  });\n  /**\n   * @private\n   * @param {formFields} page\n   * @returns {Array}\n   */\n  createFormFieldsForMultipleCheckboxes(formFields: FormFieldModel[]) {\n    return [\n      ...formFields.filter(ff => !isMultipleCheckbox(ff)),\n      ...flatten(formFields.filter(isMultipleCheckbox).map(splitCheckedIntoFormFields)),\n    ];\n  }\n  /**\n   * @private\n   * @param {FormPage} page\n   * @returns {FormPageSubmission}\n   */\n  createFormSubmission(page: FormPageModel, formField?: FormFieldModel) {\n    return this.store.createRecord('formPageSubmission', {\n      form: page.form,\n      formPageId: page.isCaptchaPage ? CAPTCHA_FORM_PAGE_ID : page.id,\n      fields: this.createFormFieldsForMultipleCheckboxes(formField ? [formField] : page.formFields.toArray()),\n      matchup: this.args.matchup,\n      matchupClassificationTypeId: this.args.matchup ? this.args.matchup.get('matchupClassificationTypeId') : undefined,\n      referrer: this.args.referrer,\n      formSubmissionId: page.form.formType === 'EntrySubmission' ? undefined : this.formSubmissionId || undefined,\n    });\n  }\n\n  setTurnstileRunningState = (isTurnstileChecking: boolean) => {\n    this.isTurnstileChecking = isTurnstileChecking;\n  };\n\n  @action\n  async updateFormPage() {\n    if (this.desiredPageNumber == '-9999') {\n      this.setTurnstileRunningState(true);\n      // if user was on Captcha, back-end expects the request differently\n      const formId = await this.localStorage.getItem('formIds');\n      const captchaPage = await this.store.findRecord('formPage', `${CAPTCHA_FORM_PAGE_ID}|${formId.split(',')[0]}`);\n      if (captchaPage && !this.isDestroying) {\n        this.currentFormPage = captchaPage;\n        this.scrollToCaptchaPage();\n      }\n    } else {\n      const formPage = await this.store.queryRecord('form-page', {\n        formId: this.form?.id,\n        pageNumber: this.desiredPageNumber,\n      });\n      if (isPresent(formPage) && !this.isDestroying) {\n        this.currentFormPage = formPage;\n\n        if (!formPage?.isPageOne || this.args.scrollToTopOfForm) {\n          this.scrollToTopOfForm();\n        }\n        if (this.desiredPageNumber != '1') {\n          this.setValuesToDefaultIfBlank();\n        }\n      }\n    }\n  }\n  /**\n   * Returns a count of all the extra chances to be added if the form page submission succeeds.\n   * @param page\n   * @param formField\n   * @returns {number}\n   */\n  sumExtraChances(page: FormPageModel, formField?: FormFieldModel) {\n    const formFields = formField ? [formField] : page.formFields.toArray();\n    return formFields.map(x => x.get('extraChances') || 0).reduce((a, b) => a + b, 0);\n  }\n  /**\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  async submissionSuccess(\n    formPageSubmission: FormPageSubmissionModel,\n    extraChances: number,\n    formFields: FormFieldModel[]\n  ) {\n    this.captureSession(formPageSubmission);\n    this.captureFormSubmissionDetails(formPageSubmission);\n    this.sendFormPageSubmissionSDKEvent(formPageSubmission, formFields);\n    await this.nextPage(formPageSubmission);\n\n    if (extraChances && this.args.extraChancesAdded) {\n      this.args.extraChancesAdded(extraChances);\n      this.formSubmissionId = undefined; // clear out the form submission ID after each extra chance submission\n    }\n\n    this.hasMismatchErrored = false;\n    this.submissionErrorMessage = undefined;\n    return formPageSubmission;\n  }\n  /**\n   * @private\n   * @param {Error} error\n   */\n  submissionFailure(error: Error) {\n    if (error?.errors?.firstObject?.detail === 'Captcha is required to complete this form.') {\n      void this.updateFormPage();\n    }\n\n    const method = camelize(error.message?.errors?.[0]?.key || '');\n\n    this.failedFormSubmissionId = error?.message?.meta?.form_submission_id;\n    const accessToken = error.message?.meta?.sessions?.access_token;\n    if (accessToken) {\n      this.session.loginUsingAccessToken(accessToken);\n    }\n    talker.send('event', { type: 'formpage:error', detail: null });\n    if (error instanceof ForbiddenError) {\n      // Check out the Errors region for these methods.\n      this.forceDisableForm = true;\n      // @ts-ignore\n      throw this[method](error);\n      // @ts-ignore\n    } else if (error instanceof InvalidError) {\n      throw this.validationFailure(error);\n    } else {\n      // @ts-ignore\n      if (error instanceof Errors.UnauthorizedError && method === 'emailAddressAlreadyInUse') {\n        void this.emailAddressAlreadyInUse();\n        // @ts-ignore\n      } else if (error instanceof Errors.UnauthorizedError && method === 'emailVerificationRequired') {\n        this.emailVerificationRequired(error?.message?.errors[0]?.data);\n      } else {\n        throw error;\n      }\n    }\n  }\n  /**\n   * When we submit the first {@link FormPageSubmission} a {@link Session} will be generated by the API.\n   * We need to capture that and log the user in with it.\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  captureSession(formPageSubmission: FormPageSubmissionModel) {\n    const session = formPageSubmission.userSession;\n    if (session) {\n      this.session.useExistingSession(session);\n    }\n  }\n  /**\n   * When we submit the first {@link FormPageSubmission} a {@link FormSubmission} ID will be generated by the API.\n   * We need to capture that and return it with each subsequent {@link FormPageSubmission}.\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  captureFormSubmissionDetails(formPageSubmission: FormPageSubmissionModel) {\n    const { formSubmissionId } = formPageSubmission;\n\n    if (formSubmissionId && formPageSubmission.form.formType !== 'EntrySubmission') {\n      this.formSubmissionId = formSubmissionId;\n      this.localStorage.setItem(this.prefix('formSubmissionId'), formSubmissionId);\n    }\n  }\n  /**\n   * @param {FormPageSubmission} formPageSubmission\n   * @private\n   */\n  sendFormPageSubmissionSDKEvent(formPageSubmission: FormPageSubmissionModel, formFields: FormFieldModel[]) {\n    const detail = {\n      fields: formPageSubmission.fields.map(({ fieldId: id, fieldValue: value }) => {\n        const formField = formFields.find(field => +field.id == id);\n\n        return {\n          id,\n          type: formField?.field.fieldType,\n          label: formField?.labelText,\n          name: formField?.field.name,\n          value,\n          valueText: formField?.field.fieldOptions?.length\n            ? formField?.field.fieldOptions.find(option => option.id == value)?.text\n            : value,\n        };\n      }),\n    };\n\n    talker.send('event', { type: 'formpage:submitted', detail });\n  }\n  /**\n   * @private\n   * @param {FormPageSubmission} formPageSubmission\n   */\n  async nextPage(formPageSubmission: FormPageSubmissionModel) {\n    const nextFormPage = await formPageSubmission.nextFormPage;\n    if (nextFormPage) {\n      if (nextFormPage.isCaptchaPage && !this.isDestroying) {\n        if (!nextFormPage.form) {\n          nextFormPage.reload();\n        }\n        this.currentFormPage = nextFormPage;\n        this.scrollToCaptchaPage();\n      } else {\n        this.desiredPageNumber = nextFormPage.pageNumber.toString();\n        await this.updateFormPage();\n      }\n      const { pageNumber } = nextFormPage;\n      this.localStorage.setItem(this.prefix('currentPageNumber'), pageNumber);\n      this.localStorage.setItem('probablyHasNotFinishedRegistration', true);\n    } else {\n      run(() => this.args.beginSubmission?.());\n      this.storeEligibilityDate(this.getEntryEligibilityDate(formPageSubmission));\n      this.clearFormRelatedLocalStorage([], this.args.delayClearFormFieldValues);\n      this.isFinished = true;\n      talker.send('event', { type: 'form:submitted', detail: null });\n      this.designSettings.handleKioskMode();\n      this.designSettings.handleThanksPageRedirection();\n      this.args.finished?.(this.args.matchup, this.matchupEntryId, this.entryId);\n    }\n  }\n  scrollToTopOfForm() {\n    const target = document.querySelector(this.args.isQuiz ? '.ssQuiz' : '.ssForm');\n    const ad = target?.closest('.gallery-display')?.querySelector('[data-ballot-category-ad]');\n    let additionalOffset = -24;\n\n    if (target && ad) {\n      const { top: targetTop } = target.getBoundingClientRect();\n      const { height, bottom } = ad.getBoundingClientRect();\n      const offset = Math.min(height, 240);\n\n      if (targetTop - offset < bottom) {\n        additionalOffset -= offset;\n      }\n    }\n\n    if (target) {\n      this.scroller.scrollTo(target, { additionalOffset, behavior: 'smooth' });\n    }\n  }\n\n  scrollToCaptchaPage() {\n    later(() => {\n      const target = document.querySelector('#turing-target');\n      if (target) {\n        this.scroller.scrollTo(target, { center: true });\n      }\n    }, duration(300));\n  }\n\n  /**\n   * Get the next entry eligibility date for the user\n   * @param formPageSubmission\n   * @returns {*}\n   */\n  getEntryEligibilityDate(formPageSubmission: FormPageSubmissionModel) {\n    return formPageSubmission.entryEligibilityDate;\n  }\n\n  /**\n   * @private\n   */\n  clearFormFieldValues() {\n    clearFormFieldValues(this.form);\n  }\n\n  /**\n   * @private\n   */\n  clearFormRelatedLocalStorage(excludedItems: string[] = [], delayClearFormFieldValues = false) {\n    // some applications re-route the user to a new page after submitting the final page of the form (e.g. a thanks page)\n    // if that page has to load data, form field values will be cleared BEFORE the new template is rendered,\n    // which can be confusing on slower connections because it looks like your form inputs were erased\n    // IF YOU DELAY CLEARING THE FORM FIELD VALUES HERE, PLEASE MAKE SURE TO CLEAR THEM ON THE LANDING ROUTE\n    // AFTER ITS MODEL RESOLVES (e.g. in a didTransition hook)\n    if (!delayClearFormFieldValues) {\n      this.clearFormFieldValues();\n    }\n    const removeUnlessExcluded = (str: string) =>\n      excludedItems.includes(str) || this.localStorage.removeItem(this.prefix(str));\n    ['formSubmissionId', 'formValues', 'currentPageNumber', 'mediaItemId', 'videoId'].forEach(removeUnlessExcluded);\n    this.localStorage.removeItem('probablyHasNotFinishedRegistration');\n  }\n\n  /**\n   * @private\n   */\n  async restoreProgress() {\n    const [currentPageNumber, formSubmissionId] = await Promise.all([\n      this.localStorage.getItem(this.prefix('currentPageNumber')),\n      this.localStorage.getItem(this.prefix('formSubmissionId')),\n    ]);\n\n    if (!this.isDestroyed) {\n      this.desiredPageNumber =\n        currentPageNumber ||\n        (this.args.splitSubmission && this.nextRegistrationPageToComplete\n          ? this.nextRegistrationPageToComplete.pageNumber\n          : 1);\n      this.formSubmissionId = formSubmissionId;\n      await this.updateFormPage();\n    }\n  }\n\n  /**\n   * @private\n   */\n  restoreMinimumAgeRestriction() {\n    return this.localStorage.getItem('MinimumAgeRestriction').then((value: string) => {\n      if (value) {\n        return this.args.disqualify();\n      }\n    });\n  }\n\n  /**\n   * @private\n   */\n  async restoreFormValues() {\n    const json = await this.localStorage.getItem(this.prefix('formValues'));\n    const values = JSON.parse(json);\n    if (values && this.formFields) {\n      this.formFields.forEach(formField => {\n        const value = values[formField.id];\n        formField.value = isNone(value) || formField.field.fieldType === 'Captcha' ? '' : value;\n      });\n    }\n    this.setValuesToDefaultIfBlank();\n  }\n\n  setValuesToDefaultIfBlank() {\n    const { formFields } = this;\n\n    if (formFields) {\n      formFields.forEach(formField => {\n        if (!isBlank(formField.value)) return;\n\n        formField.value = formField.fieldTypeId == 23 ? this.session.username : formField.defaultValue;\n      });\n    }\n  }\n\n  /**\n   * @private\n   */\n  storeEligibilityDate(iso8601: string) {\n    const toSet = iso8601\n      ? `${iso8601.replace(/Z$/, '')}Z` // API Bug Workaround: It sometimes sends times with Z, sometimes without\n      : null;\n    return this.localStorage.setItem('entryEligibilityDate', toSet);\n  }\n\n  /**\n   * Certain characters require special handling because iframes/browsers decode them when we don't want them to\n   * @param {string} routeUrl\n   * @returns {string}\n   * @private\n   */\n  escapeRedirectPath(routeUrl: string) {\n    return specialEncode.encode(routeUrl);\n  }\n\n  /**\n   * This returns a url without a query string param beginning with a particular prefix\n   **/\n  removeUtmQueryParams(routeUrl: string) {\n    return routeUrl.replace(/&?utm_[^=]*?=([^&]$|[^&]*)/gi, '');\n  }\n\n  /**\n   * This cleans up query string parameters on a url before submitting it to the API\n   */\n  sanitizeRedirectPath(routeUrl: string) {\n    return this.escapeRedirectPath(this.removeUtmQueryParams(routeUrl));\n  }\n  //endregion\n\n  //region Errors\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"MinimumAgeRestriction\".\n   * @param {ForbiddenError} error\n   * @returns {Promise}\n   */\n  minimumAgeRestriction() {\n    this.localStorage.setItem('MinimumAgeRestriction', 'true');\n    void this.args.logout();\n    this.clearFormRelatedLocalStorage();\n    this.args.disqualify();\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"EntryLimitReached\".\n   * @param {ForbiddenError} error\n   */\n  entryLimitReached(error: Error) {\n    this.setErrorOnEmailField(error);\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"ValidationSignUpLimitHasBeenReached\".\n   * @param {ForbiddenError} error\n   */\n  validationSignUpLimitHasBeenReached(error: Error) {\n    this.setErrorOnEmailField(error);\n  }\n\n  setErrorOnEmailField(error: Error) {\n    const emailField = this.emailFormField;\n    const errorMessage = error?.message?.errors?.[0]?.message;\n    if (emailField && isPresent(errorMessage)) {\n      //@ts-ignore\n      this.emailFormField.errors.add('value', errorMessage as string);\n    } else {\n      this.submissionErrorMessage = errorMessage;\n    }\n  }\n  /**\n   * Called when a user receives a {@link ForbiddenError} with \"ValidationAlreadyRegisteredForThisEvent\".\n   * @param {ForbiddenError} error\n   */\n  validationAlreadyRegisteredForThisEvent(error: Error) {\n    this.emailFormField?.errors.add('value', error?.message?.errors?.[0]?.message as string);\n  }\n  /**\n   * Called when a user receives a {@link DS.InvalidError}.\n   * @private\n   * @param {Error} invalidError\n   */\n\n  validationFailure(invalidError: any) {\n    const { formFields } = this;\n    formFields.forEach((ff: FormFieldModel) => ff.field.errors.clear());\n    invalidError.errors.forEach((error: any) => {\n      if (get(error, 'source.pointer').match(/\\d+/)) {\n        const formField = this.formFields.findBy(\n          // @ts-ignore\n          'field.id',\n          get(error, 'source.pointer').split('/').lastObject\n        );\n        if (error.data && get(formField, 'field.fieldType') === 'TwitterFollowApi') {\n          // @ts-ignore\n          set(formField, 'value', false);\n          // @ts-ignore\n          set(formField, 'field.twitterAuthorizationRedirect', error.data);\n        }\n        if (formField) {\n          formField.forceDirty();\n          formField.errors.add('value', error.detail);\n        }\n      } else {\n        this.clearStoredValues();\n        this.clearFormRelatedLocalStorage([], this.args.delayClearFormFieldValues);\n        void this.logout('There was a problem submitting your entry. Please try again.');\n      }\n    });\n    // @ts-ignore\n    scheduleOnce('afterRender', this, this.focusFirstErrorField);\n    // @ts-ignore\n    if (window.grecaptcha) {\n      // @ts-ignore\n      window.grecaptcha.reset();\n    }\n  }\n\n  focusFirstErrorField = () => {\n    focusFirstIn(this.container?.querySelector('.ssFailedValidation'));\n  };\n\n  /**\n   * Called when a registration form is submitted with an email that is already in use.\n   */\n  async emailAddressAlreadyInUse() {\n    const emailFieldId = this.enums.findWhere('FIELD', { name: 'Email' }).toString();\n    let email = this.emailFormField?.value;\n    if (!email) {\n      try {\n        const json = await this.localStorage.getItem(this.prefix('formValues'));\n        const values = JSON.parse(json || '{}');\n        // try current page field id first, then email field id\n        email = values?.[this.emailFormField?.id as unknown as string] || values?.[emailFieldId];\n      } catch (e) {\n        /* ignore parse errors */\n      }\n    }\n    if (!email) {\n      email = this.session.username;\n    }\n\n    const routeUrl = this.router.currentURL;\n    const redirectPath = this.sanitizeRedirectPath(this.transformLoginEmailRedirectPath(routeUrl));\n    if (this.args.promotionType === 'Ballot') {\n      this.clearFormRelatedLocalStorage();\n    }\n    const entryFormSubmissionId = this.args.promotionType === 'Ballot' ? this.entryFormSubmissionId : undefined;\n    const encodedPath = encodeURIComponent(redirectPath);\n    const { loginRequest } = this;\n\n    // Persist pending modal context so we can reopen after magic login\n    try {\n      const pending = {\n        formType: this.args.entryForm ? 'EntrySubmission' : 'Registration',\n        matchupId: this.args.matchup?.id ?? null,\n        matchupEntryId: this.matchupEntryId ?? this.args.currentMatchupEntry?.id ?? null,\n        isVoting: Boolean(this.args.isVoting),\n        isNominating: Boolean(this.args.isNominating),\n        changeToWriteIn: Boolean(this.args.changeToWriteIn),\n        isEditingSubmission: Boolean(this.args.isEditingSubmission),\n        redirectPath,\n        returnTo: routeUrl,\n        timestamp: Date.now(),\n      };\n      this.localStorage.setItem('pendingPromoModal', JSON.stringify(pending));\n\n      if (window.parent && window.parent !== window && typeof window.parent.postMessage === 'function') {\n        window.parent.postMessage({ type: 'ss-modal', action: 'pending-promo', context: pending }, '*');\n      }\n    } catch (e) {\n      // ignore persistence failures\n    }\n\n    const emailSubmittedCallback = () => run(() => (this.emailAddressThatIsAlreadyInUse = email as string));\n    const loginRequestPromise = loginRequest.requestLoginEmail(encodedPath, email, {\n      entryFormSubmissionId,\n      emailSubmittedCallback,\n    });\n    if (this.args.entryForm) {\n      this.localStorage.removeItem(this.prefix('entryFormSubmissionId'));\n    }\n    next(() => (this.emailAddressThatIsAlreadyInUse = email as string));\n    const [session] = await loginRequestPromise;\n    void this.router.transitionTo('login.token', session.accessToken, encodedPath);\n  }\n  /**\n   * Called when the user needs to verify their identity by clicking a link in an email.\n   * Example of this is when we suspect fraud because the user's browser fingerprint\n   * is already associated to multiple entries/votes.\n   * @private\n   * @param {string} verificationRequestToken\n   */\n  emailVerificationRequired(verificationRequestToken: string) {\n    //Get the email from the session if error occurred on form page that does not have email field\n    const email = this.emailFormField?.value || this.session.username;\n    const routeUrl = `${this.router.currentURL}`;\n\n    const redirectPath = this.sanitizeRedirectPath(this.transformLoginEmailRedirectPath(routeUrl));\n\n    this.clearFormRelatedLocalStorage();\n\n    const entryFormSubmissionId = this.failedFormSubmissionId || null;\n\n    this.store\n      .createRecord('loginEmailRequest', {\n        sendTo: email,\n        redirectPath: encodeURIComponent(redirectPath),\n        verificationRequestToken,\n        entryFormSubmissionId,\n      })\n      .save()\n      .then(() => {\n        this.emailAddressThatRequiresVerification = email;\n      });\n    next(() => (this.emailAddressThatIsAlreadyInUse = email));\n  }\n\n  @action\n  clearForm() {\n    this.clearFormRelatedLocalStorage();\n  }\n\n  @action\n  updateStoredFormFields(formFields: FormFieldModel[]) {\n    if (!this.isStarted) {\n      this.isStarted = true;\n      talker.send('event', { type: 'form:started', detail: null });\n    }\n    if (this.storedFormFields) Object.assign(this.storedFormFields, formFields);\n  }\n\n  @action\n  async logout(reason?: string) {\n    this.clearFormPageErrors();\n    if (typeof this.args.logout === 'function') {\n      await this.args.logout();\n    }\n\n    this.clearFormRelatedLocalStorage();\n    this.formSubmissionId = undefined;\n    this.entryFormSubmissionId = undefined;\n    this.emailAddressThatIsAlreadyInUse = undefined;\n    this.emailAddressThatRequiresVerification = undefined;\n    this.submissionErrorMessage = undefined;\n    this.isStarted = false;\n    this.isFinished = false;\n    this.desiredPageNumber = '1';\n    await this.updateFormPage();\n    await this.restoreFormValues();\n\n    if (reason) {\n      window.alert(reason);\n    }\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { getProperties, observer } from '@ember/object';\nimport $ from 'jquery';\n\n/**\n * Creates <img> with the given src. If img fails to load the img.src is changed to the altSrc.\n * Example:\n *    {{ss-img classNames=\"ssClassYouWant\"\n *             src=urlThatMayNotWork\n *             altSrc=knownWorkingImageUrl\n *             title=\"\"}}\n */\nexport default Component.extend({\n  tagName: 'img',\n  alt: '',\n  attributeBindings: ['alt', 'src', 'width', 'height', 'role'],\n\n  //region Ember Hooks\n  willInsertElement() {\n    this._super(...arguments);\n    this._setAttributes();\n  },\n  //endregion\n\n  //region Observers\n  setEmptySrc: observer('src', function () {\n    this._setAttributes();\n  }),\n  //endregion\n\n  //region Methods\n  _setAttributes() {\n    let alreadyAttempted = false;\n    const { src, altSrc, element, title, height } = getProperties(this, 'src', 'altSrc', 'element', 'title', 'height');\n    const $img = $(element);\n    $img.attr('src', src);\n    if (title) {\n      $img.attr('title', title);\n    }\n    if (height) {\n      $img.attr('height', height);\n    }\n    if (altSrc) {\n      //if there is a problem with the img.src it will be replaced with the altSrc\n      $img.on('error', function () {\n        const $this = $(this);\n        // count prevents infinite loop that is created if the altSrc also doesn't exist\n        if (!alreadyAttempted) {\n          $this.attr('src', altSrc);\n          $this.attr('title', 'Image no longer available from source.');\n          alreadyAttempted = true;\n        } else {\n          $this.attr('alt', 'No image available');\n          $this.attr('title', 'Image no longer available from source.');\n        }\n      });\n      if (!src) {\n        this.element.setAttribute('src', altSrc);\n        this.element.setAttribute('title', 'Image no longer available from source.');\n      }\n    }\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-on-calls-in-components, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components */\nimport Component from '@ember/component';\nimport { observer } from '@ember/object';\nimport { on } from '@ember/object/evented';\n\n/**\n * ss-radio component\n * @type {Ember.Component}\n */\nexport default Component.extend({\n  //region Ember Hooks\n  classNames: ['ssRadio', 'ssFieldOptionInput'],\n  tagName: 'input',\n  attributeBindings: ['type', 'checked:checked', 'disabled', 'tabindex', 'name', 'autofocus', 'form', 'value'],\n  //endregion\n\n  //region Properties\n  type: 'radio',\n  checked: false,\n  disabled: false,\n  //endregion\n\n  //region Events\n  onDomChange: on('click', function () {\n    this.set('selection', this.value);\n  }),\n  //endregion\n\n  //region Observers\n  onDataChange: on(\n    'init',\n    observer('selection', 'value', function () {\n      this.set('checked', this.selection === this.value);\n    })\n  ),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { deprecate } from '@ember/debug';\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\n\n/**\n * select component that sends a action when the value is changed\n */\nexport default Component.extend({\n  content: null,\n  selectedValue: null,\n  tagName: 'ss-select',\n  'two-way': true,\n  changed() {},\n  classNameBindings: ['hasErrors'],\n\n  //region Computed Properties\n  hasErrors: computed('errors.[]', 'attribute', function () {\n    const { errors } = this;\n    if (!errors) {\n      return false;\n    }\n    return errors.has(this.attribute);\n  }),\n  //endregion\n\n  init() {\n    this._super(...arguments);\n    const { content } = this;\n\n    if (!content) {\n      set(this, 'content', []);\n    }\n  },\n\n  actions: {\n    change() {\n      const selectedEl = this.element.querySelector('select');\n      const selectedIndex = selectedEl.selectedIndex - (this.prompt ? 1 : 0);\n      const { content } = this;\n      let selectedValue = content.objectAt(selectedIndex);\n      if (this.optionValuePath) {\n        selectedValue = get(selectedValue, this.optionValuePath);\n      }\n\n      if (get(this, 'two-way')) {\n        set(this, 'selectedValue', selectedValue);\n        deprecate('Please refrain from using {{ss-select}} without two-way=false in the future', false, {\n          id: 'ss-select-two-way',\n          until: 'Ember 4',\n          for: 'ss-select',\n          since: '0.0.0',\n        });\n      }\n      this.changed(selectedValue);\n\n      // clear away any errors from the select input\n      if (this.errors) {\n        this.errors.clear();\n      }\n    },\n  },\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\n/* globals twttr */\nimport Component from '@ember/component';\nimport { computed, set } from '@ember/object';\nimport { isEmpty } from '@ember/utils';\nconst enc = x => window.encodeURIComponent(x);\n\nexport default Component.extend({\n  //region Properties\n  disableInteraction: false,\n  classNameBindings: [':ssTwitterTweet', 'isCustomButton'],\n  /**\n   * This should be the hashtag without the # sign\n   */\n  hashtag: '',\n  isCustomButton: computed('hashtag', () => {\n    const { userAgent } = navigator;\n    const goodBrowserRegex = /Chrome|Firefox|Safari/;\n    const mobileRegex = /Mobile|Android|iPad|iPod|iPhone/;\n    //the only way to NOT get a custom button is if you are using desktop chrome, safari, or firefox\n    return !(goodBrowserRegex.test(userAgent) && !mobileRegex.test(userAgent));\n  }),\n  /**\n   * This is the URL to twitter's tweet API\n   * @returns {string}\n   */\n  buttonUrl: computed('hashtag', 'referrerUrl', 'isCustomButton', function () {\n    let queryString = '';\n\n    const { isCustomButton } = this;\n    let url = 'https://twitter.com/intent/tweet?';\n\n    const { hashtag } = this;\n    if (hashtag) {\n      const rawHashtag = hashtag.replace('#', '');\n      queryString += isCustomButton ? `&text=${enc(`#${rawHashtag}`)}` : `&button_hashtag=${enc(rawHashtag)}`;\n    } else {\n      if (isCustomButton) {\n        queryString += '&text=%20';\n      } else {\n        url = 'https://twitter.com/share?';\n        queryString += '&text=%20';\n      }\n    }\n\n    const { referrerUrl } = this;\n    if (referrerUrl) {\n      queryString += `&url=${enc(referrerUrl)}`;\n    }\n\n    queryString = queryString.substring(1); // Every piece will have an ampersand, but the first one shouldn't.\n    if (!isEmpty(queryString)) {\n      url += queryString;\n    }\n\n    return url;\n  }),\n  /**\n   * This determines the appropriate css class with which to render the button\n   * @returns {string}\n   */\n  buttonCssClass: computed('hashtag', 'isCustomButton', function () {\n    return this.hashtag ? 'twitter-hashtag-button' : 'twitter-share-button';\n  }),\n  //endregion\n\n  //region Component Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    twttr.widgets.load();\n\n    //listens to twitter tweet events\n    //@see https://dev.twitter.com/docs/tfw/events\n    twttr.events.bind('tweet', this.tweetHandler.bind(this));\n  },\n  //endregion\n\n  //region Methods\n  tweetHandler(twitterEvent) {\n    if (twitterEvent.target && twitterEvent.target.parentNode === this.element) {\n      set(this, 'hasTweeted', true);\n    }\n  },\n  //endregion\n\n  //region Actions\n  actions: {\n    customClick() {\n      set(this, 'hasTweeted', true);\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-jquery, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { tracked } from '@glimmer/tracking';\n\nexport default Component.extend({\n  //region Attributes\n  width: 300,\n  /**\n   * The URL for the video\n   */\n  src: null,\n  /**\n   * Thumbnail image URL to be displayed if the video is broken\n   */\n  altSrc: '/Images/video-removed-by-user.png',\n  /**\n   * The image URL representing the initial frame displayed for the video before clicking play\n   */\n  poster: null,\n  /**\n   * Pass in string \"autoplay\" in handlebars if you would like the video to auto-play on page load\n   */\n  autoPlay: '',\n  /**\n   * Set to true if there is a problem with the video\n   */\n  error: tracked({ value: false }),\n  //endregion\n\n  didInsertElement() {\n    this._super(...arguments);\n    // if there is a problem with the video.src, the poster image will be replaced with the alt-src image\n    this.element.querySelector('video source').onerror = () => {\n      this.error = true;\n    };\n  },\n});\n","/* eslint-disable @typescript-eslint/restrict-template-expressions */\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport type CheckoutService from 'consumer/services/checkout';\nimport PromotionProductModel from 'secondstreet-common/models/promotion-product';\nimport { tracked } from '@glimmer/tracking';\nimport { adjustColor } from 'consumer/utils/fix-color-contrast';\n\ninterface StripeFormSignature {\n  Element: HTMLDivElement;\n  Args: {\n    emailAddress: string;\n    entryId: number | string;\n    onPaymentComplete: () => void;\n    promotionProduct: PromotionProductModel;\n    packages: PromotionProductModel[];\n  };\n}\n\nexport default class StripeFormComponent extends Component<StripeFormSignature> {\n  @service declare checkout: CheckoutService;\n  promotionProducts = [\n    ...(this.args.promotionProduct ? [this.args.promotionProduct] : []),\n    ...(this.args.packages || []),\n  ].sort((a, b) => a.displayOrder - b.displayOrder);\n\n  @tracked selectedPromotionProduct = this.promotionProducts[0];\n\n  showPackages = this.promotionProducts.length > 1 || this.args.packages?.length > 0;\n\n  setup = async () => {\n    if (this.selectedPromotionProduct) {\n      await this.checkout.createStripeSession({\n        productId: `${this.selectedPromotionProduct?.productId}`,\n        emailAddress: this.args.emailAddress,\n        entryId: `${this.args.entryId}`,\n        promotionProductId: `${this.selectedPromotionProduct?.id}`,\n      });\n      await this.checkout.initializeCheckout(this.onComplete);\n    }\n  };\n\n  cleanup = () => {\n    this.checkout.destroyInstance();\n  };\n\n  onComplete = async () => {\n    await this.checkout.updateTransactionStatus();\n\n    this.args.onPaymentComplete();\n  };\n\n  normalizedTextColor(promotionProduct: PromotionProductModel) {\n    return adjustColor('#000000', promotionProduct?.color?.value || '#838FA0');\n  }\n}\n","import { hbs } from 'ember-cli-htmlbars';\nconst __COLOCATED_TEMPLATE__ = hbs(\"{{#if this.beforeContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"intro_before_start\\\" date=this.nextMatchupStartDate}} {{this.timeZone}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.duringContestMatchupOpen}}\\n  {{#if this.hasEntryLimitReachedForCurrentRound}}\\n    <div class=\\\"promotion-not-open\\\">\\n      {{if\\n        (gt @matchups.length 1)\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_round\\\")\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_promotion\\\")\\n      }}\\n    </div>\\n  {{else}}\\n    {{yield this.currentMatchup}}\\n  {{/if}}\\n{{/if}}\\n\\n{{#if this.duringContestMatchupClosed}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"sign_up_for_next_round_header\\\" date=this.nextMatchupStartDate}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.afterContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"promo_header_after_over\\\" PromotionTypeName=@promotionName}}\\n  </div>\\n{{/if}}\\n\", {\"contents\":\"{{#if this.beforeContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"intro_before_start\\\" date=this.nextMatchupStartDate}} {{this.timeZone}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.duringContestMatchupOpen}}\\n  {{#if this.hasEntryLimitReachedForCurrentRound}}\\n    <div class=\\\"promotion-not-open\\\">\\n      {{if\\n        (gt @matchups.length 1)\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_round\\\")\\n        (i18n-t \\\"the_entry_limit_has_been_reached_for_this_promotion\\\")\\n      }}\\n    </div>\\n  {{else}}\\n    {{yield this.currentMatchup}}\\n  {{/if}}\\n{{/if}}\\n\\n{{#if this.duringContestMatchupClosed}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"sign_up_for_next_round_header\\\" date=this.nextMatchupStartDate}}\\n  </div>\\n{{/if}}\\n\\n{{#if this.afterContest}}\\n  <div class=\\\"promotion-not-open\\\">\\n    {{i18n-t \\\"promo_header_after_over\\\" PromotionTypeName=@promotionName}}\\n  </div>\\n{{/if}}\\n\",\"moduleName\":\"consumer-sweepstakes/components/sweepstakes-matchup.hbs\",\"parseOptions\":{\"srcName\":\"consumer-sweepstakes/components/sweepstakes-matchup.hbs\"}});\nimport Component from '@glimmer/component';\nimport moment from 'moment';\nimport getTimeZone from 'consumer/utils/timezone-name';\nimport { firstObject } from 'secondstreet-common/utils/array';\nimport { isEmpty } from '@ember/utils';\n\nexport default class SweepstakesMatchup extends Component {\n  //region Computed Properties\n  get previousMatchup() {\n    const now = new Date();\n\n    return this.args.matchups\n      .map(matchup => {\n        const { endDate } = matchup;\n        return endDate && endDate < now ? matchup : null;\n      })\n      .filter(matchup => !isEmpty(matchup))\n      .reduce((bestChoice, matchup) => {\n        if (!bestChoice) {\n          return matchup;\n        }\n\n        // Best choice is the one whose end date is closest to now, because it ended most recently.\n        return now - bestChoice.endDate < now - matchup.endDate ? bestChoice : matchup;\n      }, null);\n  }\n\n  get currentMatchup() {\n    const now = new Date();\n\n    const relevantMatchups = this.args.matchups.map(matchup => {\n      const { startDate } = matchup;\n      const { endDate } = matchup;\n      return !endDate || (startDate < now && endDate > now) ? matchup : null;\n      // Best choice is whatever, because there should always be eithor 0 or 1 possible current round.\n    });\n\n    return firstObject(relevantMatchups.filter(matchup => !isEmpty(matchup))) || null;\n  }\n\n  get nextMatchup() {\n    const now = new Date();\n\n    return this.args.matchups\n      .map(matchup => {\n        const startDate = matchup.endDate;\n        return startDate > now ? matchup : null;\n      })\n      .filter(matchup => !isEmpty(matchup))\n      .reduce((bestChoice, matchup) => {\n        if (!bestChoice) {\n          return matchup;\n        }\n\n        // Best choice is the one whose start date is closest to now, because it starts the soonest.\n        return now - bestChoice.startDate > now - matchup.startDate ? bestChoice : matchup;\n      }, null);\n  }\n  /**\n   * Is the contest not yet open?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get beforeContest() {\n    return !this.previousMatchup && !this.currentMatchup;\n  }\n\n  get hasEntryLimitReachedForCurrentRound() {\n    return this.args.matchupSummary?.entryLimitReached;\n  }\n  /**\n   * Is the contest open, and a matchup is open?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get duringContestMatchupOpen() {\n    return !!this.currentMatchup;\n  }\n  /**\n   * Is the contest open, but no matchup is open?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get duringContestMatchupClosed() {\n    return this.previousMatchup && !this.currentMatchup && this.nextMatchup;\n  }\n  /**\n   * Is the contest over?\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get afterContest() {\n    return !this.currentMatchup && !this.nextMatchup;\n  }\n  /**\n   * Pretty start date for the next round, or false if no next round\n   * @returns {String|Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  get nextMatchupStartDate() {\n    return this.nextMatchup ? moment(this.nextMatchup.startDate).format('L [@] h:mm A') : false;\n  }\n  /**\n   * The timezone of the user\n   * @return {String}\n   * @type {Ember.ComputedProperty}\n   */\n  get timeZone() {\n    return getTimeZone();\n  }\n  //endregion\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\n/* globals twttr */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Properties\n  classNames: ['ssTwitterFollowButton'],\n  /**\n   * The Twitter handle to follow\n   */\n  handle: '',\n  //endregion\n\n  //region Component Hooks\n  didInsertElement() {\n    this._super(...arguments);\n    twttr.widgets.load();\n  },\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\n\nexport default Component.extend({\n  //region Attributes\n  classNames: ['material-spinner'],\n  /**\n   * Size in pixels\n   * @type {Number}\n   */\n  size: 15,\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set } from '@ember/object';\n\n/**\n * Intended to be used in tandem with {@link IndividualEntryView}\n * to wrap up common vote button state logic\n * @class {Ember.Component} VoteButton\n */\nexport default Component.extend({\n  //region Ember Hooks\n  init() {\n    this._super(...arguments);\n\n    set(this, 'vote-state', this['vote-state'] || {});\n  },\n\n  tagName: '',\n  //endregion\n\n  //region Attributes\n  /**\n   * @property {VoteState}\n   */\n  'vote-state': null,\n  /**\n   * @property {Boolean}\n   */\n  'is-loading': false,\n  /**\n   * @property {Boolean}\n   */\n  'flat-change-vote-button': false,\n  /**\n   * @property {Boolean}\n   */\n  'show-icon': true,\n  /**\n   * @property {!MatchupEntry}\n   */\n  'matchup-entry': null,\n  /**\n   * @type {Function}\n   */\n  'begin-adding-write-in': x => x,\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { set } from '@ember/object';\nimport $ from 'jquery';\n\nexport default Component.extend({\n  willInsertElement() {\n    this._super(...arguments);\n    // https://github.com/yapplabs/ember-wormhole/pull/52\n    const $destination = $(`#${this.to}`);\n    if ($destination.length > 0) {\n      $destination.empty();\n      set(this, 'hasDestination', true);\n    }\n  },\n  hasDestination: false,\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport Component from '@ember/component';\nimport { computed, get, set } from '@ember/object';\n\nconst ON = 1;\nconst OFF = 0;\n\nexport default Component.extend({\n  //region Attributes\n  'video-id': null,\n  'auto-play': false,\n  /**\n   * Due to a change in YouTube's API, disabling this will only prevent user from being recommended related\n   * videos from other channels. The user will still see related videos from the same channel this video belongs to.\n   */\n  'show-related-videos': true,\n  'disable-seeking': false,\n  'video-ended'() {},\n  //endregion\n\n  //region Properties\n  youtubeVideo: null,\n  internalVideoTimer: null,\n  timerCount: 0,\n  highestTimerCount: 0,\n  //endregion\n\n  //region Computed Properties\n  playerVars: computed('auto-play', 'show-related-videos', 'disable-seeking', function () {\n    return {\n      autoplay: get(this, 'auto-play') ? ON : OFF,\n      playsinline: get(this, 'disable-seeking') ? ON : OFF,\n      rel: get(this, 'show-related-videos') ? ON : OFF,\n    };\n  }),\n  //endregion\n\n  //region Actions\n  actions: {\n    videoPaused() {\n      if (this['disable-seeking'] && this.internalVideoTimer) {\n        clearInterval(this.internalVideoTimer);\n        set(this, 'internalVideoTimer', null);\n      }\n    },\n    videoPlaying() {\n      if (!this['disable-seeking']) {\n        return;\n      }\n\n      const { player } = this.youtubeVideo;\n\n      if (!this.internalVideoTimer) {\n        set(\n          this,\n          'internalVideoTimer',\n          setInterval(() => {\n            const oldTime = this.timerCount;\n            const newTime = player.getCurrentTime();\n            if (newTime - oldTime > 1.5 && newTime > this.highestTimerCount) {\n              player.seekTo(oldTime);\n            } else {\n              set(this, 'timerCount', player.getCurrentTime());\n              if (this.timerCount > this.highestTimerCount) {\n                set(this, 'highestTimerCount', this.timerCount);\n              }\n\n              // 1 second margin of error accounting for browser differences in calculating video details\n              if (Math.abs(player.getDuration() - player.getCurrentTime()) <= 1) {\n                if (this.internalVideoTimer) {\n                  clearInterval(this.internalVideoTimer);\n                  set(this, 'internalVideoTimer', null);\n                }\n                get(this, 'video-ended')();\n              }\n            }\n          }, 500)\n        );\n      }\n    },\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-mixins */\nimport Controller from '@ember/controller';\nimport { inject as service } from '@ember/service';\nimport ReferralShareList from 'consumer-sweepstakes/mixins/referral-share-list';\nimport localFullUrl from 'consumer-sweepstakes/utils/local-full-url';\nimport talker from 'consumer-sweepstakes/utils/talker';\n\nexport default class ApplicationController extends Controller.extend(ReferralShareList) {\n  @service('router') router;\n  @service('store') store;\n\n  constructor() {\n    super(...arguments);\n\n    this.router.on('routeDidChange', () => {\n      this.updateReferringUrlHeader();\n    });\n  }\n\n  updateReferringUrlHeader() {\n    if (!this.router.currentRouteName) return;\n\n    let routePath = this.router.currentRouteName.replace('.', '/').replace('index', '/');\n\n    if (routePath === '/') {\n      routePath = '';\n    }\n\n    talker\n      .send('fullUrl')\n      .then(\n        message => message.data.url,\n        () => localFullUrl()\n      )\n      .then(url => {\n        this.store.adapterFor('application').addHeaders({\n          'X-Referring-Url': `${url}${routePath}`,\n        });\n      });\n  }\n}\n","/* eslint-disable @typescript-eslint/restrict-template-expressions */\nimport Controller from '@ember/controller';\nimport { tracked } from '@glimmer/tracking';\nimport { inject as service } from '@ember/service';\n\nexport default class extends Controller {\n  @service declare session: any;\n\n  queryParams = ['reenter'];\n\n  @tracked reenter = false;\n\n  get referrerUrl() {\n    const guid = this.session?.referrerUserGuid;\n    const { rootUrl } = this.session;\n    return guid ? `${rootUrl}referrals/${guid}` : rootUrl;\n  }\n}\n","/* eslint-disable ember/no-classic-classes, ember/no-actions-hash */\nimport Controller, { inject as controller } from '@ember/controller';\nimport { computed, get, set } from '@ember/object';\nimport { alias, not } from '@ember/object/computed';\nimport { run } from '@ember/runloop';\nimport { inject as service } from '@ember/service';\nimport { isPresent } from '@ember/utils';\nimport specialEncode from 'consumer/utils/special-encode';\n\nexport default Controller.extend({\n  //region Dependencies\n  application: controller(),\n  loginRequest: service(),\n  router: service(),\n  //endregion\n\n  // region properties\n  emailFieldValue: '',\n  submitted: false,\n  errorMessages: null,\n  // endregion\n\n  // region computed properties\n  redirectPath: computed('model.referrer{Url,Route}', function () {\n    // if the user was not coming from another route\n    // model.referrerUrl will return the current route\n    return this.model.referrerRoute ? this.model.referrerUrl : '/';\n  }),\n  emailFieldIsEmpty: not('emailFieldValue.length'),\n  organizationPromotionName: alias('application.model.organizationPromotion.name'),\n  // endregion\n\n  init() {\n    this._super(...arguments);\n\n    set(this, 'errorMessages', this.errorMessages || []);\n  },\n\n  // region Methods\n  /**\n   * This returns a url without a query string param beginning with a particular prefix\n   **/\n  removeUtmQueryParams(url) {\n    return url.replace(/&?utm_[^=]*?=([^&]$|[^&]*)/gi, '');\n  },\n  // endregion\n\n  // region actions\n  actions: {\n    async loginUser(email, redirectTo) {\n      const sanitizedRedirectPath = specialEncode.encode(this.removeUtmQueryParams(redirectTo));\n      const redirectPath = encodeURIComponent(sanitizedRedirectPath);\n      try {\n        const { loginRequest } = this;\n        const emailSubmittedCallback = () => run(() => this.toggleProperty('submitted'));\n        const loginRequestWork = loginRequest.requestLoginEmail(redirectPath, email, { emailSubmittedCallback });\n        const sessions = await loginRequestWork;\n        if (isPresent(sessions)) {\n          const session = get(sessions, 'firstObject');\n          this.router.transitionTo('login.token', get(session, 'accessToken'), redirectPath);\n        }\n      } catch (exception) {\n        const { errorMessages } = this;\n        errorMessages.clear();\n        run(() => errorMessages.addObjects(exception.errors || [exception.message]));\n      }\n    },\n  },\n  // endregion\n});\n","/* eslint-disable ember/no-mixins, ember/no-computed-properties-in-native-classes */\nimport Controller, { inject as controller } from '@ember/controller';\nimport { computed } from '@ember/object';\nimport { action } from '@ember/object';\nimport { alias, readOnly } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\nimport { tracked } from '@glimmer/tracking';\nimport { task, timeout } from 'ember-concurrency';\nimport ReferralShareList from 'consumer-sweepstakes/mixins/referral-share-list';\nimport config from 'consumer-sweepstakes/utils/config';\nimport socialSettingUtils from 'consumer-sweepstakes/utils/social-setting-utils';\nimport { getOwner } from '@ember/application';\nimport duration from 'secondstreet-common/utils/duration';\nimport { firstObject } from 'secondstreet-common/utils/array';\n\nconst FIELD_TYPE_IDS_WITHOUT_VALUES = [\n  8, // DisplayText\n  19, // FacebookLike\n  20, // TwitterFollow\n  39, // InstagramLink\n  40, // FacebookLink\n  42, // XLink\n  43, // TikTokLink\n  44, // YouTubeLink\n];\n\nexport default class ThanksController extends Controller.extend(ReferralShareList) {\n  @service('router') router;\n  @service('session') session;\n  @service('store') store;\n  @controller('application') application;\n\n  @tracked isReenterFormVisible = false;\n  @tracked reenteredSuccessfully = false;\n\n  /**\n   * Share Link\n   * The URL for this OrganizationPromotion, including the referral\n   * Set in ThanksRoute#setupController until DataBoundPromises are a thing\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  shareLink = '';\n\n  @alias('model.extraChancesForm')\n  extraChancesForm;\n\n  @readOnly('application.model.organizationPromotion')\n  organizationPromotion;\n\n  @readOnly('shareLink')\n  shareUrl;\n\n  /**\n   * This overrides the pinterestEnabled in ReferralShareList, because pinterest was previously disabled in sweeps.\n   * @type {bool}\n   */\n  get pinterestEnabled() {\n    return socialSettingUtils.isSocialSettingEnabledNew('ss-rehydrate-pinterest-enabled', false);\n  }\n\n  get thanksMessageDisabled() {\n    return socialSettingUtils.isSocialSettingDisabledNew('ss-rehydrate-thankYouMessage-enabled');\n  }\n\n  get thanksMessage() {\n    return socialSettingUtils.getSocialSettingNew('thanks_sub_messaging', 'ss-rehydrate-thankYouMessage-value');\n  }\n\n  /**\n   * Checks if the reenter form can be submitted automatically\n   * @type {bool}\n   */\n  get canSubmitFormAutomatically() {\n    const ignoredFieldTypeIds = [\n      ...FIELD_TYPE_IDS_WITHOUT_VALUES,\n      23, // EmailTextbox\n    ];\n\n    return (\n      this.model.reenter.form.formPages.length == 1 &&\n      firstObject(this.model.reenter.form.formPages)?.pageNumber == 1 &&\n      this.model.reenter.form.formPages\n        .map(formPage => formPage.formFields.toArray())\n        .flat()\n        .filter(formField => !ignoredFieldTypeIds.includes(formField.fieldTypeId)).length == 0\n    );\n  }\n\n  @computed('thanksMessage')\n  get thanksMessageSafe() {\n    return htmlSafe(this.thanksMessage);\n  }\n\n  get facebookApiKey() {\n    return config().facebookApiKey;\n  }\n\n  @computed('thanksMessage', 'thanksMessageDisabled')\n  get showThanksMessage() {\n    return this.thanksMessage && !this.thanksMessageDisabled;\n  }\n\n  get extraChancesFirstObject() {\n    return firstObject(this.extraChancesForm?.formPages);\n  }\n\n  /**\n   * If all that is rendered in the extra chances component is the thanks, combine the custom thanks message with it\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  @computed('showReferrals', 'showThanksMessage', 'extraChancesFirstObject.formFields.length')\n  get combineThanksWithExtraChances() {\n    return !this.showReferrals && this.showThanksMessage && !this.extraChancesFirstObject?.formFields.length;\n  }\n\n  get reenter() {\n    if (!this.model.reenter.meta.entryEligibilityMetaData || !this.model.reenter.form) return {};\n\n    const [{ entry_eligibility_date, entry_matchup_id, matchup_id }] = this.model.reenter.meta.entryEligibilityMetaData;\n    const date = entry_eligibility_date ? new Date(entry_eligibility_date) : 0;\n\n    return {\n      date,\n      // entry_matchup_id is null when this is the last round\n      isNextRound: entry_matchup_id && entry_matchup_id != matchup_id,\n    };\n  }\n\n  reenterTask = task({ drop: true }, async () => {\n    this.#setEmailFieldValue(this.model.reenter.form, this.session.username);\n\n    if (!this.canSubmitFormAutomatically) {\n      return this.router.transitionTo('index', { queryParams: { reenter: true } });\n    }\n\n    const formPage = firstObject(this.model.reenter.form.formPages);\n    const formPageSubmission = this.store.createRecord('form-page-submission', {\n      form: this.model.reenter.form,\n      formPageId: formPage.id,\n      fields: formPage.formFields,\n      matchup: this.model.matchup,\n    });\n\n    try {\n      await formPageSubmission.save();\n      await getOwner(this).lookup('route:thanks').refresh().promise;\n\n      this.reenteredSuccessfully.perform();\n    } catch (e) {\n      console.error(e);\n    }\n  });\n\n  reenteredSuccessfully = task({ restartable: true }, async () => {\n    await timeout(duration(5000));\n  });\n\n  @action\n  logoutAction() {\n    // Unload all the form fields as they contain the user's input\n    this.store.unloadAll('form-field');\n\n    this.send('logout', true);\n  }\n\n  #setEmailFieldValue(form, email) {\n    form.formPages.forEach(formPage =>\n      formPage.formFields.forEach(formField => {\n        if (formField.fieldTypeId === 23) {\n          formField.value = email;\n        }\n      })\n    );\n  }\n}\n","import { helper } from '@ember/component/helper';\nimport config from '../config/environment';\nimport {\n  shaRegExp,\n  versionRegExp,\n  versionExtendedRegExp,\n} from 'ember-cli-app-version/utils/regexp';\n\nexport function appVersion(_, hash = {}) {\n  const version = config.APP.version;\n  // e.g. 1.0.0-alpha.1+4jds75hf\n\n  // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility\n  let versionOnly = hash.versionOnly || hash.hideSha;\n  let shaOnly = hash.shaOnly || hash.hideVersion;\n\n  let match = null;\n\n  if (versionOnly) {\n    if (hash.showExtended) {\n      match = version.match(versionExtendedRegExp); // 1.0.0-alpha.1\n    }\n    // Fallback to just version\n    if (!match) {\n      match = version.match(versionRegExp); // 1.0.0\n    }\n  }\n\n  if (shaOnly) {\n    match = version.match(shaRegExp); // 4jds75hf\n  }\n\n  return match ? match[0] : version;\n}\n\nexport default helper(appVersion);\n","import { helper } from '@ember/component/helper';\n\nexport function compare([first, operator, second]) {\n  switch (operator) {\n    case '===':\n      return first === second;\n    case '!==':\n      return first !== second;\n    case '>':\n      return first > second;\n    case '>=':\n      return first >= second;\n    case '<':\n      return first < second;\n    case '<=':\n      return first <= second;\n    case '&&':\n      return first && second;\n    case '||':\n      return first || second;\n  }\n}\n\nexport default helper(compare);\n","import { helper } from '@ember/component/helper';\nimport { get } from '@ember/object';\nimport { htmlSafe } from '@ember/template';\n\n/**\n * Echos a property from an object\n * The first argument is the object instance to read\n * The second argument is the name of the property to read on the object\n * The optional third argument is a boolean. If true, renders any HTML in the property unsafely.\n *\n * Examples:\n *      {{get-property this propName safeString}}\n */\nexport function getProperty([obj, propName, safeString]) {\n  const string = obj && propName ? get(obj, propName) : '';\n  return safeString ? new htmlSafe(string) : string;\n}\n\nexport default helper(getProperty);\n","/* eslint-disable ember/no-classic-classes */\nimport Helper from '@ember/component/helper';\nimport { inject as service } from '@ember/service';\nimport { htmlSafe } from '@ember/template';\n\n/**\n *\n * Examples:\n *   {{i18n-t \"social_boost_per_friend_heading\" count=extraChancesCount safeString=false}}\n *\n * @see http://emberjs.com/api/classes/Ember.Handlebars.html#toc_example-with-bound-options\n */\nexport default Helper.extend({\n  //region Dependencies\n  i18n: service(),\n  //endregion\n\n  compute([value], { safeString, ...options }) {\n    let string = '';\n\n    if (this.i18n.exists(value)) {\n      string = this.i18n.t(value, options);\n    }\n\n    return safeString ? htmlSafe(string) : string;\n  },\n});\n","import { helper } from '@ember/component/helper';\n\n/**\n * Do math! Supports addition, subtraction, division, multiplication, and exponents.\n * If you try to divide by zero, it'll just return zero.\n * @param {Number} first\n * @param {String} operator\n * @param {Number} second\n * @returns {Number}\n */\nexport function math([first, operator, second]) {\n  switch (operator) {\n    case '+':\n      return first + second;\n    case '-':\n      return first - second;\n    case '/':\n      return second === 0 ? 0 : first / second;\n    case '*':\n      return first * second;\n    case '**':\n      return first ** second; //jshint ignore:line\n  }\n}\n\nexport default helper(math);\n","import pageTitle from 'ember-page-title/helpers/page-title';\n\nexport default pageTitle;\n","import pluralize from 'ember-inflector/lib/helpers/pluralize';\nexport default pluralize;\n","import singularize from 'ember-inflector/lib/helpers/singularize';\nexport default singularize;\n","import initializerFactory from 'ember-cli-app-version/initializer-factory';\nimport config from '../config/environment';\n\nlet name, version;\nif (config.APP) {\n  name = config.APP.name;\n  version = config.APP.version;\n}\n\nexport default {\n  name: 'App Version',\n  initialize: initializerFactory(name, version),\n};\n","import ContainerDebugAdapter from 'ember-resolver/resolvers/classic/container-debug-adapter';\n\nexport default {\n  name: 'container-debug-adapter',\n\n  initialize() {\n    let app = arguments[1] || arguments[0];\n\n    app.register('container-debug-adapter:main', ContainerDebugAdapter);\n  }\n};\n","\n        export default {\n          name: 'ember-cli-mirage',\n          initialize() {}\n        };\n      ","import 'ember-data';\n\nimport setupContainer from 'ember-data/setup-container';\n\n/*\n  This code initializes EmberData in an Ember application.\n*/\nexport default {\n  name: 'ember-data',\n  initialize: setupContainer,\n};\n","import Ember from 'ember';\nimport config from '../config/environment';\n\nexport function initialize() {\n  var application = arguments[1] || arguments[0];\n  if (config.exportApplicationGlobal !== false) {\n    var theGlobal;\n    if (typeof window !== 'undefined') {\n        theGlobal = window;\n    } else if (typeof global !== 'undefined') {\n        theGlobal = global\n    } else if (typeof self !== 'undefined') {\n        theGlobal = self;\n    } else {\n       // no reasonable global, just bail\n       return;\n    }\n\n    var value = config.exportApplicationGlobal;\n    var globalName;\n\n    if (typeof value === 'string') {\n      globalName = value;\n    } else {\n      globalName = Ember.String.classify(config.modulePrefix);\n    }\n\n    if (!theGlobal[globalName]) {\n      theGlobal[globalName] = application;\n\n      application.reopen({\n        willDestroy: function() {\n          this._super.apply(this, arguments);\n          delete theGlobal[globalName];\n        }\n      });\n    }\n  }\n}\n\nexport default {\n  name: 'export-application-global',\n\n  initialize: initialize\n};\n","/* eslint-disable ember/no-jquery */\nimport { camelize } from '@ember/string';\nimport $ from 'jquery';\nimport { Promise as EmberPromise } from 'rsvp';\n\nimport ENV from '../config/environment';\nimport isLocalhost from 'secondstreet-common/utils/is-localhost';\nimport talker from '../utils/talker';\nimport { Arc } from '@ss/arc';\nimport isValidJSON from 'secondstreet-common/utils/is-valid-json';\nimport insertFontsToDom from 'secondstreet-common/utils/insert-fonts-to-dom';\n\nfunction getCustomContent(arc) {\n  let str = '';\n  const { socialElement, promotionElement } = arc;\n\n  if (socialElement) {\n    str = `${str}\n          <div id=\"ss-rehydrate-social-enabled\" data-enabled=\"true\" ></div>\n          <div id=\"ss-rehydrate-pinterest-enabled\" ></div>\n        ${\n          socialElement.data.facebook\n            ? `<div id=\"ss-rehydrate-facebook-enabled\" data-enabled=\"true\" ></div>`\n            : `<div id=\"ss-rehydrate-facebook-enabled\" ></div>`\n        }\n\n         ${\n           socialElement.data.x\n             ? `<div id=\"ss-rehydrate-twitter-enabled\" data-enabled=\"true\" ></div>\n                <div id=\"ss-rehydrate-twitter-value\" >${socialElement.data.xDescription || ''}</div>`\n             : `<div id=\"ss-rehydrate-twitter-enabled\" ></div>`\n         }\n\n         ${\n           socialElement.data.email\n             ? `<div id=\"ss-rehydrate-email-enabled\" data-enabled=\"true\" ></div>\n                <div id=\"ss-rehydrate-email-title\" >${socialElement.data.emailSubject || ''}</div>\n                <div id=\"ss-rehydrate-email-value\" >${socialElement.data.emailDescription || ''}</div>   \n             `\n             : `<div id=\"ss-rehydrate-email-enabled\" ></div>`\n         }\n      `;\n  }\n\n  if (promotionElement && promotionElement.data?.metadata) {\n    const { thanksMessage } = promotionElement.data.metadata;\n    if (thanksMessage) {\n      str = `${str}\n        <div id=\"ss-rehydrate-thankYouMessage-value\">${thanksMessage}</div>\n      `;\n    }\n  }\n\n  return str;\n}\n\nfunction findCssVariableValue(html, variableName) {\n  if (!html || typeof html !== 'string') return '';\n  const varMatch = new RegExp(`${variableName}\\\\s*:\\\\s*([^;]+);`).exec(html);\n  const value = varMatch?.[1]?.trim() || '';\n  return value && value !== 'undefined' ? value : '';\n}\n\nfunction findTemplatePrimaryBackgroundColor(html) {\n  if (!html || typeof html !== 'string') return '';\n\n  const rulePattern = /\\.template-color-primary-background-color(?![\\w-])[^{]*\\{[^}]*background-color\\s*:\\s*([^;}]+)/gi;\n  let lastConcreteColor = '';\n  let match;\n\n  while ((match = rulePattern.exec(html))) {\n    const value = match[1].trim();\n    if (value && value !== 'undefined' && !/^var\\(/i.test(value)) {\n      lastConcreteColor = value;\n    }\n  }\n\n  return lastConcreteColor;\n}\n\nfunction resolvePrimaryColor(arc, theme, designContentHtml) {\n  return (\n    arc?.promotionElement?.data?.color ||\n    findTemplatePrimaryBackgroundColor(designContentHtml) ||\n    theme?.color_element ||\n    theme?.colorElement ||\n    findCssVariableValue(designContentHtml, '--mdc-theme-primary')\n  );\n}\n\nfunction getCustomStyles(arc, theme, designContentHtml) {\n  let str = '';\n\n  const { promotionElement } = arc;\n  const primaryColor = resolvePrimaryColor(arc, theme, designContentHtml);\n\n  if (primaryColor || theme) {\n    str = `#ssFrontApp.ssApplicationContainer {\n            ${primaryColor ? `--mdc-theme-primary: ${primaryColor}; --colors-primary: ${primaryColor};` : ''}\n            ${\n              theme\n                ? `--arc-ss-color-primary: ${theme.color_element || theme.colorElement};\n              --arc-ss-color-background: ${theme.color_background || theme.colorBackground};\n              --arc-ss-color-text: ${theme.color_text || theme.colorText};\n              --arc-ss-color-button: ${theme.color_button || theme.colorButton};\n              --arc-ss-font-heading: ${theme.font_heading || theme.fontHeading};\n              --arc-ss-font-paragraph: ${theme.font_paragraph || theme.fontParagraph};`\n                : ''\n            }\n  }\n            `;\n  }\n\n  str = `${str} #ssFrontApp.ssApplicationContainer .template-color-primary-color { color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-color-contrast { color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-fill { fill: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-fill-contrast { fill: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-background-color { background-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-background-color-contrast { background-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-color { border-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-color-contrast { border-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-top-color { border-top-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-top-color-contrast { border-top-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-right-color { border-right-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-right-color-contrast { border-right-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-bottom-color { border-bottom-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-bottom-color-contrast { border-bottom-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-left-color { border-left-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-border-left-color-contrast { border-left-color: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-stroke { stroke: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-stroke-contrast { stroke: ; }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-outline-color { outline-color: var(--mdc-theme-primary); }\n\t\t\t\t\t#ssFrontApp.ssApplicationContainer .template-color-primary-outline-color-contrast { outline-color: ; }\n          `;\n\n  if (promotionElement) {\n    str = `${str} \n        #ssFrontApp.ssApplicationContainer .template-color-system-text { color: ${\n          promotionElement.styles?.font?.foregroundColor || '#000000'\n        } ; }\n        #ssFrontApp.ssApplicationContainer { --mdc-color-system-text: ${\n          promotionElement.styles?.font?.foregroundColor || '#000000'\n        };  }\n\n        .ssLabelText,.ssFormFieldText,.ssFieldOptionLabel,.ssRequiredLabel,.ssFieldOptionList,.ssCheckboxLabel,.ssStartFormOver,.help-text {color: var(--mdc-color-system-text, black) !important;}\n      `;\n  }\n\n  return str;\n}\n\n/**\n * @param {Object} config\n * @returns {String}\n */\nfunction promotionContentsUrl(config) {\n  const params = (() => {\n    const matchEmbedUrl = window.location.pathname.match(/(\\/embed\\/([A-Za-z0-9-]+)\\/)/i);\n    if (matchEmbedUrl) {\n      return { value: matchEmbedUrl[2], type: 'organizationPromotionUniqueId' };\n    }\n    if (config.organizationPromotionUniqueId) {\n      return { value: config.organizationPromotionUniqueId, type: 'organizationPromotionUniqueId' };\n    }\n    if (isLocalhost()) {\n      return {\n        value: window.location.href.split('/').slice(0, 4).join('/'),\n        type: 'promotionUrl',\n      };\n    }\n    throw new Error('Could not determine which promotion to use.');\n  })();\n\n  return `${config.apiHost || '/'}${config.apiNamespace || ''}/promotion_contents?${params.type}=${params.value}`;\n}\n\n/**\n * WARNING - Destructive! This method will modify the `contents` param and delete its `design_content` and/or `master_page_template_content` property.\n * @param {Object} contents\n * @returns {String}\n */\nfunction designContent(contents) {\n  const html = (() => {\n    if (!!contents['design_content'] && contents['design_content'].length) {\n      return contents['design_content'];\n    }\n\n    return `\n<div id=\"ssFrontApp\" class=\"ssApplicationContainer ssApplicationContainerDefault font-body\">\n  <div class=\"ssAffContentArea ssAffContentAreaMiddle\">\n    <div class=\"ssAppContentArea\">\n      ${contents['master_page_template_content']}\n    </div>\n  </div>\n</div>\n`;\n  })();\n\n  delete contents['design_content'];\n  delete contents['master_page_template_content'];\n\n  return html;\n}\n\nfunction insertCustomFontLinks(strValues = []) {\n  if (!strValues.length) {\n    return;\n  }\n  insertFontsToDom(strValues);\n}\n\nfunction isModalFormShell() {\n  return /\\/promo-form\\/?$/.test(window.location.pathname);\n}\n\nfunction showPromotionLoading(message = 'Your promotion is loading...') {\n  $('#second-street-app-container').html(`\n      <div\n          class=\"loading-container\"\n          style=\"display: flex;justify-content: center;align-items: center;width: 100vw;gap: 16px;padding: 20px;\"\n        >\n          <div\n            class=\"loading-spinner\"\n            style=\"flex-shrink: 0; display: inline-block;width: 50px;height: 50px;border: 3px solid #ccc;border-top-color: #333;border-radius: 50%;animation: spin 1s linear infinite;\"\n          >\n          </div>\n          <div class=\"loading-text\" style=\"font-family: sans-serif; font-size: 24px;font-weight: bold;color: #333;\">\n            ${message}\n          </div>\n        </div>\n    `);\n}\n\nexport function initialize(application) {\n  const { config } = ENV.APP;\n  if (ENV.environment === 'test') {\n    return;\n  }\n\n  application.deferReadiness();\n\n  if (!isModalFormShell()) {\n    try {\n      talker.send('resize', { height: 100 });\n    } catch (e) {\n      console.warn('Could not send talker resize', e);\n    }\n  }\n\n  let promotionContentsRequestUrl;\n  try {\n    promotionContentsRequestUrl = promotionContentsUrl(config);\n  } catch (error) {\n    console.error('Could not GET /promotion_contents', error);\n    showPromotionLoading('Unable to load this promotion.');\n    return;\n  }\n\n  let hasSettled = false;\n  if (!isModalFormShell()) {\n    // Wait until this script finishes executing before replacing the container.\n    // iOS Safari can abort boot if we remove the running script tag first.\n    setTimeout(() => {\n      if (!hasSettled) {\n        showPromotionLoading();\n      }\n    }, 0);\n  }\n\n  return EmberPromise.resolve(\n    $.ajax({\n      url: promotionContentsRequestUrl,\n      crossDomain: !!config.apiHost,\n      timeout: 20000,\n      headers: {\n        'X-Api-Key': config.apiKey,\n      },\n    })\n  ).then(\n    response => {\n      hasSettled = true;\n      const [contents] = response['promotion_contents'];\n\n      insertCustomFontLinks(contents?.font_links);\n\n      const rawDesignContent = contents['design_content'];\n      const json = isValidJSON(rawDesignContent);\n\n      if (isModalFormShell()) {\n        $('#second-street-app-container').html(`\n          <style>${getCustomStyles(json ? new Arc(json) : {}, contents.theme, rawDesignContent)}</style>\n          <div id=\"ssFrontApp\" class=\"ssApplicationContainer ssApplicationContainerDefault font-body\">\n            <div class=\"ssAffContentArea ssAffContentAreaMiddle\">\n              <div class=\"ssAppContentArea\">\n                <div class=\"ssAppContentAreaContent\"></div>\n              </div>\n            </div>\n          </div>\n        `);\n\n        delete contents['design_content'];\n        delete contents['master_page_template_content'];\n      } else {\n        let html = '';\n\n        if (json) {\n          const arc = new Arc(json);\n          html = arc.srcDoc;\n          html = html.replace('{{custom-styles}}', getCustomStyles(arc, contents.theme, rawDesignContent));\n          html = html.replace('{{custom-content}}', getCustomContent(arc));\n        } else {\n          html = designContent(contents);\n        }\n\n        $('#second-street-app-container').html(html);\n        $(ENV.APP.rootElement).empty();\n      }\n\n      // Modify the object imported from `config/environment` so other files can get at the data\n      Object.keys(contents).forEach(key => (config[camelize(key)] = contents[key]));\n      // needed to only load stripe.js when a payment form is present. Also allows for dynamic connected account ids.\n      if (contents.stripe_publishable_key && ENV.stripe) {\n        ENV.stripe.publishableKey = contents.stripe_publishable_key;\n        ENV.stripe.lazyLoad = true;\n      }\n\n      application.advanceReadiness();\n    },\n    error => {\n      hasSettled = true;\n      console.error('Could not GET /promotion_contents', error);\n      showPromotionLoading('Unable to load this promotion.');\n      throw error;\n    }\n  );\n}\n\nexport default {\n  name: 'promotion-contents',\n  initialize,\n};\n","/* exists only for things that historically used \"after\" or \"before\" */\nexport default {\n  name: 'ember-data',\n  initialize() {},\n};\n","/* globals FB */\nimport ENV from '../config/environment';\n\nexport function initialize(/* appInstance */) {\n  try {\n    // Firefox seems to die here without try/catch when FB is undefined\n    if (FB) {\n      FB.init({\n        appId: ENV.APP.config.facebookApiKey,\n        status: true,\n        cookie: true,\n        xfbml: true,\n        version: 'v2.3',\n      });\n\n      if (FB.Canvas) {\n        FB.Canvas.setAutoGrow();\n      }\n    }\n  } catch (e) {\n    // No need to do anything here\n  }\n}\n\nexport default {\n  name: 'facebook',\n  initialize,\n};\n","/* eslint-disable ember/use-ember-get-and-set */ // FIXME\n// We chose grow here instead of the alternatives, because some browsers gave some choices too little height.\n// It's better to sometimes have a little extra height than to sometimes have not enough and be cut off.\nimport { bodyScroll } from '../utils/height';\nimport { loadableChildren, loadingWorkaround } from 'secondstreet-common/utils/loaded-elements';\nimport talker from '../utils/talker';\n\nexport default {\n  name: 'iframe',\n\n  initialize(application) {\n    // Remove overflow: hidden if not in iframe\n    const isInIframe = window.self !== window.parent;\n    if (!isInIframe) {\n      const [htmlEl] = document.getElementsByTagName('html');\n      if (htmlEl.style.overflow === 'hidden') {\n        htmlEl.style.removeProperty('overflow');\n      }\n    }\n\n    /**\n     * ResizeObserver has a lower support than MutationObserver,\n     * hence we use MutationObserver to track resize events.\n     * At the point of writing this MutationObserver is supported\n     * by 98% of the used browsers, while ResizeObserver is supported\n     * by 96%\n     * @see https://caniuse.com/resizeobserver\n     * @see https://caniuse.com/mutationobserver\n     */\n    if (typeof ResizeObserver != 'undefined') {\n      trackHeightViaResizeObserver();\n    } else {\n      trackHeightViaMutationObserver();\n    }\n\n    // Send and receive route changes\n    talker.on('message', message => {\n      const router = application.lookup('router:main');\n      switch (message.namespace) {\n        case 'route':\n          router.get('location').setURL(message.data.url);\n          router.handleURL(message.data.url);\n          break;\n        case 'thirdParty':\n          this.thirdParty(message, application);\n          break;\n        case 'adgagement':\n          this.adgagement(message, application);\n          break;\n        case 'sdk':\n          this.sdk(message, application);\n          break;\n      }\n    });\n  },\n\n  thirdParty(message, application) {\n    const router = application.lookup('service:router');\n    const session = application.lookup('service:session');\n    switch (message.data.event) {\n      case 'auth':\n        session.handleThirdPartyConnection(message.data.info);\n        break;\n      case 'present':\n        session.isThirdPartyEnabledViaAPI(message);\n        break;\n      case 'loginCanceled':\n        session.trigger('thirdPartyLoginCanceled');\n        break;\n      case 'logout':\n        session.logout();\n        router.transitionTo('index');\n        break;\n    }\n  },\n\n  sdk(message, application) {\n    const router = application.lookup('service:router');\n    switch (message.data.method) {\n      case 'logout':\n        return application\n          .lookup('service:session')\n          .logout()\n          .then(\n            () => message.respond({ logout: true }),\n            () => message.respond({ logout: false })\n          );\n      case 'visit':\n        return router.transitionTo(message.data.data.url).then(() => message.respond({ visit: router.currentURL }));\n      default:\n        console.error(`Unsupported SDK Method ${message.data.method} called with data:`, message.data.data);\n        break;\n    }\n  },\n\n  adgagement(message, application) {\n    const session = application.lookup('service:session');\n    switch (message.data.event) {\n      case 'declare':\n        session.declareAdgagement();\n        document.getElementsByTagName('html')[0].classList.add('embedded-adgagement');\n        break;\n    }\n  },\n};\n\nfunction trackHeightViaResizeObserver() {\n  new ResizeObserver(() => {\n    talker.send('resize', { height: document.documentElement.getBoundingClientRect().height });\n  }).observe(document.documentElement);\n}\n\nfunction trackHeightViaMutationObserver() {\n  let previousHeight = 0;\n\n  // Resize on height change.\n  // Note: documentElementScroll accurately tells when the content initially expands, but use bodyScroll to detect\n  // when the content height shrinks in case a background element is set to 100% of the body height.\n  function handleBodyHeightChange() {\n    const currentHeight =\n      previousHeight === 0 || document.documentElement.getBoundingClientRect().height < bodyScroll()\n        ? document.documentElement.getBoundingClientRect().height\n        : bodyScroll();\n    if (previousHeight !== currentHeight) {\n      previousHeight = currentHeight;\n      talker.send('resize', { height: currentHeight });\n    }\n  }\n  new MutationObserver(mutations => {\n    handleBodyHeightChange();\n    const childSelectors = 'img, video, iframe';\n    mutations.forEach(\n      mutation =>\n        mutation.addedNodes &&\n        [...mutation.addedNodes]\n          .filter(\n            el =>\n              //{{{img}}} does not register as new img tag when displayed so the mutation observer was not fired\n              ['IMG', 'IFRAME'].includes(el.tagName) || loadableChildren(el, childSelectors).length\n          )\n          .forEach(el => {\n            handleBodyHeightChange();\n            let loadedElements = [];\n            if (loadableChildren(el, childSelectors).length) {\n              loadedElements = loadableChildren(el, childSelectors);\n            } else {\n              loadedElements = [el];\n            }\n\n            loadingWorkaround(loadedElements, handleBodyHeightChange);\n          })\n    );\n  }).observe(document.documentElement, {\n    childList: true,\n    subtree: true,\n    attributes: true,\n  });\n\n  // Check if all images have fully loaded and then resize the iframe height\n  function checkAllImagesLoaded() {\n    let imagesLoaded = 0;\n    const images = document.getElementsByClassName('logo');\n    const totalImages = images.length;\n    function imageLoaded() {\n      imagesLoaded++;\n      if (imagesLoaded === totalImages) {\n        handleBodyHeightChange();\n      }\n    }\n\n    for (let i = 0; i < images.length; i++) {\n      const cloneImage = document.createElement('img');\n      cloneImage.onload = imageLoaded;\n      cloneImage.src = images[i].firstChild.firstChild.src;\n    }\n  }\n\n  checkAllImagesLoaded();\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports, ember/no-new-mixins */\nimport { get, set } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\nimport { inject as service } from '@ember/service';\nimport { camelize } from '@ember/string';\nimport DS from 'ember-data';\nimport { ForbiddenError } from 'secondstreet-common/utils/errors';\n\nconst { keys } = Object;\n\nexport default Mixin.create({\n  store: service(),\n\n  /**\n   * Enables enter/continue button if they were disabled because of save event.\n   * This is a manual disabling because using model.isSaving was not feasible because of validation errors\n   */\n  enableButtons() {\n    set(this, 'controller.buttonDisabled', false);\n  },\n  /**\n   * Delegates to various error-handling methods named for the Error's key, or re-throws\n   * @private\n   * @param error\n   */\n  handleFormSubmissionError(error) {\n    let method;\n\n    this.enableButtons();\n\n    if (error instanceof ForbiddenError) {\n      method = camelize(error.key);\n      this[method](error);\n    } else if (error instanceof DS.InvalidError) {\n      this.validationFailure(error);\n    } else {\n      throw error;\n    }\n  },\n  /**\n   * @private\n   * @param error\n   */\n  validationFailure(invalidError) {\n    const pageModel = this.modelFor(\n      'organizations.organization.organization-promotions.organization-promotion.setup.pages.page'\n    );\n    const formFields = get(pageModel, 'formFields');\n    formFields.forEach(formField => {\n      get(formField, 'field.errors').clear();\n    });\n    keys(invalidError.errors).forEach(async function (fieldId) {\n      const error = invalidError.errors[fieldId];\n      const field = await this.store.findRecord('field', fieldId);\n\n      field.forceDirty();\n      get(field, 'errors').add('value', error.message);\n      // Twitter authorization tokens expire after one use, so the API gives us a fresh one.\n      if (error.data && get(field, 'fieldType') === 'TwitterFollowApi') {\n        set(field, 'twitterAuthorizationRedirect', error.data);\n      }\n    }, this);\n  },\n  //endregion\n});\n","/* eslint-disable ember/named-functions-in-promises, ember/no-mixins, ember/no-new-mixins, ember/no-jquery, ember/no-get */ // FIXME\nimport { computed, get } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\nimport { inject as service } from '@ember/service';\nimport { isEmpty } from '@ember/utils';\nimport $ from 'jquery';\nimport RSVP from 'rsvp';\n\nimport RehydratedSetting from '../mixins/rehydrated-setting';\nimport localFullUrl from '../utils/local-full-url';\nimport socialSettingUtils from '../utils/social-setting-utils';\n\nexport default Mixin.create(RehydratedSetting, {\n  //region Dependencies\n  i18n: service(),\n  session: service(),\n  store: service(),\n  //endregion\n\n  //region Computed Properties\n  shareUrl: localFullUrl(),\n  facebookEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-facebook-enabled'),\n  twitterEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-twitter-enabled'),\n  pinterestEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-pinterest-enabled'),\n  emailEnabled: socialSettingUtils.isSocialSettingEnabled('ss-rehydrate-email-enabled'),\n  twitterText: socialSettingUtils.getSocialSetting('referral_tweet_body', 'ss-rehydrate-twitter-value'),\n  emailSubject: socialSettingUtils.getSocialSetting('referral_email_link_subject', 'ss-rehydrate-email-title'),\n  emailBody: socialSettingUtils.getSocialSetting('referral_email_link_body', 'ss-rehydrate-email-value'),\n  /**\n   * @type {Promise} - that resolves to a url\n   */\n  get pinterestImage() {\n    const htmlSource = $('#ss-rehydrate-pinterest-srcUrl').html();\n    if (htmlSource) {\n      return RSVP.resolve(htmlSource);\n    }\n\n    const customMediaItemId = this.i18n.t('referral_pinterest_image_media_item_id');\n    const mediaItemId = isEmpty(customMediaItemId)\n      ? this.i18n.t('referral_pinterest_default_image_media_item_id')\n      : customMediaItemId;\n    const promise = this.store.findRecord('mediaItem', mediaItemId);\n    return promise.then(p => (p ? get(p, 'croppedRetinaFacesUrl') : null));\n  },\n  pinterestText: socialSettingUtils.getSocialSetting('referral_pinterest_description', 'ss-rehydrate-pinterest-value'),\n  tokenContext: computed('model.organizationPromotion.{name,organizationName}', 'shareUrl', function () {\n    return {\n      Promotion: {\n        Name: get(this, 'model.organizationPromotion.name'),\n      },\n      Organization: {\n        Name: get(this, 'model.organizationPromotion.organizationName'),\n      },\n      User: {\n        ReferralUrl: this.shareUrl,\n      },\n    };\n  }),\n  //endregion\n});\n","/* eslint-disable ember/no-jquery, ember/no-mixins, ember/no-new-mixins */\nimport { computed } from '@ember/object';\nimport Mixin from '@ember/object/mixin';\n\nexport default Mixin.create({\n  //region Computed Properties\n  /**\n   * @type {Bool}\n   */\n  usingRehydration: computed(() => !!document.querySelectorAll('div[id^=\"ss-rehydrate-\"]').length),\n  //endregion\n\n  //region Methods\n  /**\n   * Concat a setting in front of a string.\n   * @param {String} value\n   * @param {String} prefixSettingKey\n   * @param {Object} [options]\n   * @returns {String}\n   */\n  prefixSettingValue(value, prefixSettingKey, options = null) {\n    const prefix = options ? this.i18n.t(prefixSettingKey, options) : this.i18n.t(prefixSettingKey);\n    return `${prefix} ${value}`;\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-mixins */\nimport SocialSharer from 'consumer/mixins/social-sharer';\n\nexport default SocialSharer;\n","import { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class DesignTemplateModel extends BaseModel {\n  @attr('number') declare designTemplateTypeId: number;\n  @attr('string') declare redirectLink: string;\n  @attr('boolean') declare isCustomUrl: boolean;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'design-template': DesignTemplateModel;\n  }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class DesignTokenContent extends BaseModel {\n  @attr('boolean') isPlaceholder;\n  @attr('boolean') isDisabled;\n  @attr('string') value;\n  @attr('string') linkUrl;\n  @attr('string') altText;\n  @attr('string') title;\n  @attr('number') mediaItemId;\n  @attr('number') fieldId;\n  @attr('boolean') isInherited;\n  @attr('number') sourceTypeId;\n  @attr('number') sourceTypeChartId;\n  @attr('string') suggestedChartType;\n  @attr('string') organizationId;\n\n  @belongsTo({ async: false }) design;\n  @belongsTo({ async: false }) designToken;\n\n  get isEnabled() {\n    return !this.isDisabled;\n  }\n\n  get token() {\n    return this.designToken;\n  }\n\n  get tokenCategory() {\n    return this.token.category;\n  }\n}\n","import { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class DesignToken extends BaseModel {\n  @attr('string') key;\n  @attr('string') name;\n  @attr('string') category;\n  @attr('number') tokenContentTypeId;\n}\n","import { attr, hasMany, belongsTo, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport DesignTemplateModel from './design-template';\n\nexport default class DesignModel extends BaseModel {\n  @attr('string') declare name: string;\n  @attr('string', { defaultValue: '' }) declare renderedContent: string;\n\n  @belongsTo('design-template') declare designTemplate: DesignTemplateModel;\n  @hasMany('design-token-content', { async: false }) declare designTokenContents: SyncHasMany<any>;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    design: DesignModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr } = DS;\n\nexport default BaseModel.extend({\n  //region Properties\n  hostname: attr('string'),\n  domainTypeId: attr('number'),\n  name: attr('string'),\n  statusTypeId: attr('number'),\n  isPrimary: attr('boolean'),\n  //endregion\n\n  // Computed Properties\n  subdomain: computed('hostname', function () {\n    let subdomain = '';\n    const { hostname } = this;\n    if (hostname.includes('.secondstreetapp.com')) {\n      subdomain = hostname.replace('.secondstreetapp.com', '');\n    }\n    return subdomain;\n  }),\n  isOldPlatform: computed('hostname', function () {\n    return this.hostname.includes('.upickem.net');\n  }),\n  //endregion\n});\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport OutcomeModel from './outcome';\n\nexport default class EntryOutcomeModel extends BaseModel {\n  @attr('number') declare percentagePoints: number;\n  @belongsTo('outcome', { async: false }) declare outcome: OutcomeModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'entry-outcome': EntryOutcomeModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  name: DS.attr('string'),\n  displayOrder: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  form: DS.belongsTo('form', { async: false }),\n  formFields: DS.hasMany('form-field', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  formSubmissionId: DS.attr('number'),\n  referrer: DS.attr('string'),\n  //endregion\n\n  //region Relationships\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class GameModel extends BaseModel {\n  //region Properties\n  @attr('number') entriesPerMatchupMax;\n  //endregion\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * @typedef {DS.Model} ImportFile\n */\nexport default BaseModel.extend({\n  //region Properties\n  importFileTypeId: DS.attr('number'),\n  fileName: DS.attr('string'),\n  originalFileName: DS.attr('string'),\n  size: DS.attr('number'),\n  contentType: DS.attr('string'),\n  //endregion\n});\n","import BaseModel from 'secondstreet-common/models/base';\nimport { attr } from '@ember-data/model';\nimport MatchupModel from './matchup';\n\nexport default class KeywordAssignmentModel extends BaseModel {\n  tempMatchup?: MatchupModel;\n\n  @attr('number') declare entityId: number;\n  @attr('number') declare entityTypeId: number;\n  @attr('number') declare keywordId: number;\n  @attr('string') declare keywordText: string;\n  @attr('number') declare statusTypeId: number;\n  @attr('date') declare dateCreated: Date;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'keyword-assignment': KeywordAssignmentModel;\n  }\n}\n","import BaseModel from 'secondstreet-common/models/base';\nimport { attr } from '@ember-data/model';\n\nexport default class KeywordModel extends BaseModel {\n  @attr('number') declare organizationId: number;\n  @attr('string') declare organizationName: string;\n  @attr('number') declare organizationPhoneNumber: number;\n  @attr('string') declare campaignLastUsed: string;\n  @attr('string') declare keywordText: string;\n  @attr('boolean') declare isInherited: boolean;\n  @attr('date') declare dateLastUsed: Date;\n  @attr('boolean') declare isActive: boolean;\n\n  get name() {\n    return this.keywordText;\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    keyword: KeywordModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\nexport default BaseModel.extend({\n  //region Properties\n  loginRequestToken: attr('string'),\n  /**\n   * Do NOT send in a full URL. Only the specific path/route that\n   * will be appended to the consumer url by the API.\n   * @example\n   *   '/enter'\n   * @type {string}\n   */\n  redirectPath: attr('string'),\n  sendTo: attr('string'),\n  verificationRequestToken: attr('string'),\n  /**\n   * ID of a recent entry form submission.\n   * If passed in, the API will complete that form submission as the current user once logged in\n   */\n  entryFormSubmissionId: attr('number'),\n  //endregion\n  //region Relationships\n  session: belongsTo('session', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { alias } from '@ember/object/computed';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { belongsTo } = DS;\n\nexport default BaseModel.extend({\n  //region Relationships\n  sessions: belongsTo('session', { async: false }),\n  //endregion\n\n  //region Computed Properties\n  session: alias('sessions'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Ember Hooks\n  enums: service(),\n  //endregion\n\n  //region Properties\n  logicTypeId: DS.attr('number'),\n  value: DS.attr('string'),\n  //endregion\n\n  //region Relationships\n  matchupLogic: DS.belongsTo('matchup-logic', { async: true }),\n  //endregion\n\n  //region Computed Properties\n  isExtraChances: computed('logicTypeId', function () {\n    return this.logicTypeId === this.enums.findWhere('LOGIC_TYPE', { name: 'ReferredUserEntry' });\n  }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  logicActionTypeId: DS.attr('number'),\n  statusTypeId: DS.attr('number'),\n  pointsPerMatch: DS.attr(),\n  maximumMatches: DS.attr('number'),\n  matchupPlacingCriteriaId: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  matchupLogicConditions: DS.hasMany('matchup-logic-condition', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\n/**\n * @typedef {DS.Model} MatchupPlace\n */\nexport default BaseModel.extend({\n  //region Properties\n  startRank: attr('number'),\n  endRank: attr('number'),\n  name: attr('string'),\n  ownerEntityType: attr('number'),\n  ownerEntityId: attr('number'),\n  dateCreated: attr('date'),\n  dateModified: attr('date'),\n  isInherited: attr('boolean'),\n  //endregion\n\n  // Relationships\n  matchupPlacingCriteria: belongsTo('matchup-placing-criteria', { async: true }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport enums from 'ember-cli-ss-enums/services/enums';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr } = DS;\n\nexport default BaseModel.extend({\n  //region Properties\n  name: attr('string'),\n  ownerEntityType: attr('number'),\n  ownerEntityId: attr('number'),\n  tieBreakLogicTypeId: attr('number'),\n  winnerMethodTypeId: attr('number'),\n  winnerMethodType: enums.computed('name', 'winnerMethodTypeId'),\n  tieBreakingLogicValue: attr('string'),\n  isInherited: attr('boolean'),\n  //endregion\n});\n","import { attr } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default class MatchupSummary extends BaseModel {\n  @attr('boolean') entryLimitReached;\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * @typedef {DS.Model} NominationEntriesSummary\n */\nexport default BaseModel.extend({\n  count: DS.attr('number'),\n  name: DS.attr('string'),\n  matchup: DS.belongsTo('matchup'),\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * @typedef {DS.Model} Nomination\n */\nexport default BaseModel.extend({\n  //region Relationships\n  matchup: DS.belongsTo('matchup'),\n  matchupEntry: DS.belongsTo('matchupEntry'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  status: DS.attr('number'),\n  uniqueId: DS.attr('string'),\n  //endregion\n\n  //region Relationships\n  organizationPromotionId: DS.attr('number'),\n  organizationUserId: DS.attr('number'),\n  //endregion\n\n  //region Computed Properties\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Dependencies\n  enums: service(),\n  //endregion\n\n  //region Properties\n  emailAddress: DS.attr('string'),\n  birthDay: DS.attr('number'),\n  birthMonth: DS.attr('number'),\n  birthYear: DS.attr('number'),\n  firstName: DS.attr('string'),\n  middleName: DS.attr('string'),\n  gender: DS.attr('string'),\n  lastActivityDate: DS.attr('date'),\n  lastName: DS.attr('string'),\n  organizationId: DS.attr('number'),\n  statusTypeId: DS.attr('number'),\n  userId: DS.attr('number'),\n  userTypeId: DS.attr('number'),\n  username: DS.attr('string'),\n  addressSummary: DS.attr('string'), // Calculated on the server side for the winners page\n  //endregion\n\n  //region Computed Properties\n  isActive: computed('statusTypeId', function () {\n    return this.statusTypeId === this.enums.findWhere('STATUS_TYPE', { name: 'Active' }, 'id');\n  }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { computed } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\n/**\n * Uses EMBEDDING instead of side loading.\n * @see OrganizationSerializer\n */\nexport default BaseModel.extend({\n  //region Ember Hooks\n  enums: service(),\n  //endregion\n\n  //region Properties\n  affiliateId: DS.attr('string'),\n  name: DS.attr('string'),\n  organizationGuid: DS.attr('string'),\n  organizationTypeId: DS.attr('number'),\n  statusTypeId: DS.attr('number'),\n  timeZoneId: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  organizationPromotions: DS.hasMany('organization-promotion', { async: true }),\n  //endregion\n\n  //region Computed Properties\n  timeZone: computed('timeZoneId', function () {\n    return this.enums.findWhere('TIME_ZONES', { id: this.timeZoneId }, {});\n  }),\n  //endregion\n});\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport MediaItemModel from './media-item';\nimport Promotion from './promotion';\nimport QuestionOptionOutcomeWeightModel from './question-option-outcome-weight';\n\nexport default class OutcomeModel extends BaseModel {\n  //region Properties\n  @attr('string') declare name: string;\n  @attr('string') declare description: string;\n  @attr('number') declare outcomeTypeId: number;\n  @attr('number') declare gameId: number;\n  @attr('number') declare statusTypeId: number;\n  @attr('number') declare displayOrder: number;\n  @attr('number') declare percentagePointsAverage: number;\n\n  //endregion\n\n  //region Relationships\n  @belongsTo('promotion', { async: false }) declare promotion: Promotion;\n  @belongsTo('media-item', { async: false }) declare mediaItem: MediaItemModel;\n  @hasMany('question-option-outcome-weight', { async: false })\n  declare questionOptionOutcomeWeights: SyncHasMany<QuestionOptionOutcomeWeightModel>;\n  //endregion\n\n  get formattedCumulativePercent() {\n    return Math.round(this.percentagePointsAverage);\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    outcome: OutcomeModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionModel from './question';\nimport QuestionOptionResultModel from './question-option-result';\n\nexport default class PollSubmissionEntryResult extends BaseModel {\n  @attr('number') declare organizationUserId: number;\n  @attr('number') declare pickedQuestionOptionId: number;\n  @attr('number') declare pollSubmissionEntryId: number;\n  @attr('number') declare questionId: number;\n\n  @belongsTo('question', { async: false }) declare question: QuestionModel;\n\n  @hasMany('question-option-result', { async: false })\n  declare questionOptionResults: SyncHasMany<QuestionOptionResultModel>;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'poll-submission-entry-result': PollSubmissionEntryResult;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo, hasMany } = DS;\n\n/**\n * @typedef {DS.Model} PollSubmission\n */\nexport default BaseModel.extend({\n  //region Properties\n  pollSubmissionEntryId: attr('number'),\n  //endregion\n\n  // Relationships\n  question: belongsTo('question', { async: true }),\n  questionOption: belongsTo('question-option', { async: true }),\n  questionOptionResults: hasMany('question-option-result', { async: false }),\n  matchupId: attr('number'),\n  //endregion\n});\n","/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport { attr } from '@ember-data/model';\nimport { or } from '@ember/object/computed';\nimport { makeBooleanProperties } from 'ember-cli-ss-enums/enums-decorator';\nimport enums from 'ember-cli-ss-enums/services/enums';\nimport BaseModel from 'secondstreet-common/models/base';\n\n@makeBooleanProperties('PROMOTION_SUB_TYPE')\n@makeBooleanProperties('PROMOTION_TYPE')\nexport default class Promotion extends BaseModel {\n  @attr('string') declare name: string;\n  @attr('number') declare promotionTypeId: number;\n  @attr('number') declare promotionSubTypeId: number;\n  @attr('number') declare promotionTypeCategoryId: number;\n  @attr('number') declare organizationId: number;\n\n  @enums.computed('name', 'promotionTypeId') declare promotionType: string;\n  @enums.computed('name', 'promotionSubTypeId') declare promotionSubType: string;\n\n  @or('isVideoVotingStandard', 'isUGCSweepstakesVideo') declare isVideo: boolean;\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport type OutcomeModel from './outcome';\nimport type QuestionOptionModel from './question-option';\n\nexport default class QuestionOptionOutcomeWeightModel extends BaseModel {\n  @attr('number', { defaultValue: 0 }) declare selectionWeight: number;\n  @attr('string') declare outcomeId: string;\n  @attr('string') declare questionOptionId: string;\n\n  @belongsTo('question-option', { async: false }) declare questionOption: QuestionOptionModel;\n  @belongsTo('outcome', { async: false }) declare outcome: OutcomeModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option-outcome-weight': QuestionOptionOutcomeWeightModel;\n  }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionModel from './question';\nimport QuestionOptionModel from './question-option';\nimport QuizSubmissionModel from './quiz-submission';\n\nexport default class QuestionOptionPickModel extends BaseModel {\n  //region Relationships\n  @belongsTo('question', { async: false }) declare question: QuestionModel;\n  @belongsTo('question-option', { async: false }) declare questionOption: QuestionOptionModel;\n  @belongsTo('quiz-submission', { async: false }) declare quizSubmission: QuizSubmissionModel;\n  //endregion\n\n  //region Properties\n  @attr('number') declare organizationUserId: number;\n  //endregion\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option-pick': QuestionOptionPickModel;\n  }\n}\n","import { attr, belongsTo } from '@ember-data/model';\nimport { tracked } from '@glimmer/tracking';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionOptionModel from './question-option';\n\nexport default class QuestionOptionResultModel extends BaseModel {\n  @tracked percentage = 0;\n  @tracked remainder = 0;\n  @tracked isLeader = false;\n\n  @attr('number') declare count: number;\n  @belongsTo('question-option', { async: false }) declare questionOption: QuestionOptionModel;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option-result': QuestionOptionResultModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport MediaItemModel from './media-item';\nimport QuestionModel from './question';\nimport QuestionOptionResultModel from './question-option-result';\nimport { tracked } from '@glimmer/tracking';\nimport TransitionModel from './transition';\n\nexport default class QuestionOptionModel extends BaseModel {\n  @tracked picked = false;\n  @tracked pointsEarned?: number;\n\n  @attr('string') declare name: string;\n  @attr('number') declare displayOrder: number;\n  @attr('number') declare statusTypeId: number;\n  @attr('boolean') declare isCorrect: boolean;\n  @attr('number') declare promotionId: number;\n  @attr('string') declare nextQuestionId: string;\n  @attr('number') declare mediaItemId: number;\n\n  @belongsTo('media-item', { async: false }) declare mediaItem: MediaItemModel;\n  @belongsTo('question', { async: false }) declare question: QuestionModel;\n\n  @hasMany('question-option-result', { async: false })\n  declare questionOptionResults: SyncHasMany<QuestionOptionResultModel>;\n\n  get quizTransition(): TransitionModel | null {\n    const { quizTransitions } = this.question;\n    return quizTransitions.find(t => t.questionOptions.find(id => id == this.id)) || null;\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'question-option': QuestionOptionModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport MediaItemModel from './media-item';\nimport Promotion from './promotion';\nimport QuestionOptionModel from './question-option';\nimport QuestionOptionResultModel from './question-option-result';\nimport { service } from '@ember/service';\nimport SettingsService from 'consumer/services/settings';\nimport { tracked } from '@glimmer/tracking';\nimport TransitionModel from './transition';\nimport enums from 'ember-cli-ss-enums/services/enums';\nimport Store from '@ember-data/store';\n\nconst adMatchupTypeId = enums.findWhere('MATCHUP_TYPE', { name: 'Ad' });\nexport default class QuestionModel extends BaseModel {\n  @service declare store: Store;\n  @service declare settings: SettingsService;\n  @service('quiz-question-responses') declare quizQuestionResponses: any;\n\n  @tracked hasPicked = false;\n\n  @attr('string') declare name: string;\n  @attr('number') declare displayOrder: number;\n  @attr('number') declare statusTypeId: number;\n  @attr('number') declare gameId: number;\n  @attr('number') declare mediaItemId: number;\n  @attr('string') declare videoUrl: string;\n  @attr('number') declare questionType: number;\n\n  @belongsTo('media-item', { async: false }) declare mediaItem: MediaItemModel;\n  @belongsTo('promotion', { async: false }) declare promotion: Promotion;\n  @hasMany('question-option', { async: false }) declare questionOptions: SyncHasMany<QuestionOptionModel>;\n\n  @hasMany('question-option-result', { async: false })\n  declare questionOptionResults: SyncHasMany<QuestionOptionResultModel>;\n\n  @hasMany('transition', { async: false }) declare quizTransitions: SyncHasMany<TransitionModel>;\n\n  get hasYoutubeVideo() {\n    return !!this.videoUrl;\n  }\n\n  get hasVideoMediaItem() {\n    return this.mediaItem?.contentType?.startsWith('video');\n  }\n\n  get hasAudioMediaItem() {\n    return this.mediaItem?.contentType?.startsWith('audio');\n  }\n\n  get useFadeInAnimation() {\n    return this.settings.getValueFor('quiz_questions_animation_style') == 2;\n  }\n\n  get displayOrderTransition() {\n    return this.settings.getValueFor('quiz_questions_randomize')\n      ? this.quizQuestionResponses.questions.indexOf(this)\n      : this.displayOrder;\n  }\n\n  get isMultiChoiceQuestion() {\n    return this.questionOptions.filter(q => q.isCorrect).length > 1;\n  }\n\n  get markedCorrectOptionIds() {\n    const correctOptionIds = this.questionOptions\n      .filter(q => q.isCorrect)\n      .map(q => q.id)\n      .sort();\n    const pickedOptionIds = this.questionOptions\n      .filter(q => q.picked)\n      .map(q => q.id)\n      .sort();\n    return JSON.stringify(correctOptionIds) === JSON.stringify(pickedOptionIds);\n  }\n\n  get isAd() {\n    return this.questionType === adMatchupTypeId;\n  }\n\n  get sponsoredPost() {\n    return this.store.peekAll('sponsored-post').find(sp => sp.ownerEntityId == +this.id);\n  }\n\n  get isBannerAd() {\n    return this.sponsoredPost?.isBannerAd;\n  }\n\n  get isProgrammaticAd() {\n    return this.sponsoredPost?.isProgrammaticAd;\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    question: QuestionModel;\n  }\n}\n","import { attr, belongsTo, hasMany, SyncHasMany, AsyncBelongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport OutcomeModel from './outcome';\nimport QuestionOptionPickModel from './question-option-pick';\n\nexport default class QuizSubmissionModel extends BaseModel {\n  @hasMany('question-option-pick', { async: false })\n  declare questionOptionPicks: SyncHasMany<QuestionOptionPickModel>;\n\n  @belongsTo('outcome', { async: true })\n  declare outcome: AsyncBelongsTo<OutcomeModel>;\n\n  @attr('number') declare percentCorrect: number;\n  @attr('number') declare picksCorrect: number;\n  @attr('number') declare outcomePoints: number;\n  @attr('number') declare timeTaken: number;\n  @attr('number') declare statusTypeId: number;\n  //For gamification\n  @attr('number') declare points: number;\n  @attr('number') declare longestStreak: number;\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    'quiz-submission': QuizSubmissionModel;\n  }\n}\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n\n  referrer: DS.attr('string'),\n  referredEntityTypeId: DS.attr('number'),\n  referredEntityId: DS.attr('number'),\n  //endregion\n\n  //region Relationships\n  organizationPromotionUser: DS.belongsTo('organization-promotion-user', { async: false }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\n/**\n * @typedef {DS.Model} Session\n */\nexport default BaseModel.extend({\n  //region Properties\n  username: attr('string'),\n  password: attr('string'),\n  accessToken: attr('string'),\n  expiresInSeconds: attr('number'),\n  organizationUserId: attr('number'),\n  organizationUserGuid: attr('string'),\n  organizationPromotionUserId: attr('number'),\n  organizationPromotionUserGuid: attr('string'),\n  isNewPlatformJoyrideComplete: attr('boolean'),\n  thirdPartyId: attr('number'),\n  thirdPartyUniqueUserId: attr('string'),\n  //endregion\n\n  //region Relationships\n  organizationUsers: belongsTo('organization-user', { async: false }),\n  organizationPromotion: belongsTo('organization-promotion', { async: true }),\n  organization: belongsTo('organization', { async: true }),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport { not } from '@ember/object/computed';\nimport DS from 'ember-data';\nimport Inflector from 'ember-inflector';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\nInflector.inflector.uncountable('sweepstakes');\n\nexport default BaseModel.extend({\n  //region Properties\n  isEnabled: attr('boolean', { defaultValue: false }),\n  startDate: attr('date'),\n  endDate: attr('date'),\n  numberOfWinners: attr('number'),\n  //endregion\n\n  //region Relationships\n  promotion: belongsTo('promotion', { async: true }),\n  matchup: belongsTo('matchup', { async: true }),\n  //endregion\n\n  //region Computed Properties\n  isDisabled: not('isEnabled'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nexport default BaseModel.extend({\n  //region Properties\n  name: DS.attr('string'),\n  token: DS.attr('string'),\n  templateTypeId: DS.attr('number'),\n  //endregion\n});\n","/* eslint-disable ember/closure-actions, ember/use-ember-data-rfc-395-imports, ember/no-jquery, ember/no-new-mixins, ember/no-mixins, ember/no-get, ember/no-observers, ember/no-classic-classes, ember/require-tagless-components, ember/no-classic-components, ember/no-actions-hash, ember/no-component-lifecycle-hooks */\nimport DS from 'ember-data';\nimport BaseModel from 'secondstreet-common/models/base';\n\nconst { attr, belongsTo } = DS;\n\n/**\n * @typedef {DS.Model} Session\n */\nexport default BaseModel.extend({\n  //region Properties\n  thirdPartyId: attr('number'),\n  thirdPartyUniqueUserId: attr('string'),\n  userDataEmailAddress: attr('string'),\n  userDataFirstName: attr('string'),\n  userDataLastName: attr('string'),\n  userDataCity: attr('string'),\n  userDataAddress1: attr('string'),\n  userDataAddress2: attr('string'),\n  userDataStateProvince: attr('string'),\n  userDataPostalCode: attr('string'),\n  userDataCountry: attr('string'),\n  userDataGender: attr('number'),\n  userDataPhone: attr('string'),\n  userDataBirthDate: attr('string'),\n  //endregion\n\n  //region Relationships\n  session: belongsTo('session', {\n    async: false,\n  }),\n  //endregion\n});\n","import { attr, belongsTo } from '@ember-data/model';\nimport BaseModel from 'secondstreet-common/models/base';\nimport QuestionModel from './question';\nimport Store from '@ember-data/store';\nimport { service } from '@ember/service';\n\nexport default class TransitionModel extends BaseModel {\n  @service declare store: Store;\n  @attr('string', { defaultValue: '' }) declare description: string;\n  @attr('string') declare icon: string;\n  @attr('boolean') declare forCorrect: boolean;\n\n  @attr() declare questionOptions: string[];\n\n  @belongsTo('question', { async: false }) declare question?: QuestionModel;\n\n  get options() {\n    return (this.questionOptions || []).map(id => this.store.peekRecord('question-option', id));\n  }\n}\n\ndeclare module 'ember-data/types/registries/model' {\n  export default interface ModelRegistry {\n    transition: TransitionModel;\n  }\n}\n","import TalkerRouter from 'consumer/router';\nimport config from 'consumer-sweepstakes/config/environment';\n\nimport rootURL from './utils/root-url';\n\nexport default class Router extends TalkerRouter {\n  location = config.locationType;\n  rootURL = rootURL();\n}\n\nRouter.map(function () {\n  this.route('thanks');\n  this.route('ineligible');\n\n  this.route('referrals', function () {\n    this.route('referral', { path: '/:referrer_user_guid' });\n  });\n\n  this.route('enter', { path: '/Enter' }, function () {\n    this.route('account');\n  });\n\n  this.route('old-thanks', { path: '/Thanks' });\n\n  this.route('login', function () {\n    this.route('token', { path: ':token/:destination' });\n  });\n});\n","import ConsumerApplicationRoute from 'consumer/routes/application';\n\nexport default class ApplicationRoute extends ConsumerApplicationRoute {}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class EnterRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class EnterAccountRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class EnterRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\n\nexport default class HelpRoute extends Route {}\n","import { action } from '@ember/object';\nimport Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport RSVP from 'rsvp';\nimport { currentMatchup } from 'consumer-sweepstakes/utils/matchups';\nimport { firstObject } from 'secondstreet-common/utils/array';\n\nexport default class IndexRoute extends Route {\n  @service enums;\n  @service localStorage;\n  @service router;\n  @service session;\n  @service store;\n\n  queryParams = {\n    reenter: {},\n  };\n\n  async model(params) {\n    const { matchups, forms } = await RSVP.hash({\n      matchups: this.store.query('matchup', { excludeSecondaryMatchups: true }),\n      forms: this.store.query('form', {\n        formTypeId: this.enums.findWhere('FORM_TYPE', { name: 'Registration' }),\n        excludeFormPages: true,\n      }),\n    });\n\n    const currentRound = currentMatchup(matchups);\n    const matchupSummary = currentRound\n      ? await this.store.findRecord('matchup-summary', currentRound.id, { reload: true })\n      : null;\n\n    return {\n      matchups,\n      registrationForm: firstObject(forms),\n      matchupSummary,\n      isReentering: params.reenter,\n    };\n  }\n\n  async afterModel(model) {\n    const { minimumAgeRestriction, formValues } = await RSVP.hash({\n      minimumAgeRestriction: this.localStorage.getItem('MinimumAgeRestriction'),\n      formValues: this.localStorage.getItem(`FORM_${model.registrationForm.id}_formValues`),\n    });\n\n    if (minimumAgeRestriction) {\n      return this.router.replaceWith('ineligible');\n    }\n\n    if (this.session?.isLoggedIn && this.session?.usesSecondStreetLogin && !(model.isReentering || formValues)) {\n      return this.router.replaceWith('thanks');\n    }\n  }\n\n  @action\n  formSubmitted() {\n    this.router.transitionTo('thanks');\n  }\n}\n","import Route from '@ember/routing/route';\n\nexport default class IneligibleRoute extends Route {}\n","import Route from '@ember/routing/route';\n\nexport default class LoginRoute extends Route {}\n","import LoginRoute from 'consumer/routes/login/index';\n\nexport default LoginRoute;\n","import TokenRoute from 'consumer/routes/login/token';\n\nexport default class LoginTokenRoute extends TokenRoute {}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class OldThanksRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('thanks');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class ReferralsIndexRoute extends Route {\n  @service router;\n\n  redirect() {\n    this.router.replaceWith('index');\n  }\n}\n","import { set } from '@ember/object';\nimport Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\n\nexport default class ReferralRoute extends Route {\n  @service router;\n  @service session;\n\n  model(params) {\n    const referrerUserGuid = params.referrer_user_guid;\n\n    if (referrerUserGuid) {\n      set(this, 'session.referrerUserGuid', referrerUserGuid);\n    }\n\n    this.router.replaceWith('index');\n  }\n}\n","import Route from '@ember/routing/route';\nimport { action, setProperties } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport clearFormFieldValues from 'consumer-sweepstakes/utils/clear-form-field-values';\nimport { mostRecentMatchup } from 'consumer-sweepstakes/utils/matchups';\nimport localFullUrl from 'consumer-sweepstakes/utils/local-full-url';\nimport talker from 'consumer-sweepstakes/utils/talker';\nimport RSVP from 'rsvp';\nimport { get } from '@ember/object';\nimport { extractArray, firstObject } from 'secondstreet-common/utils/array';\nimport { lastObject } from 'secondstreet-common/utils/array';\n\nconst ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS = 77;\n\nexport default class ThanksRoute extends Route {\n  @service('enums') enums;\n  @service('local-storage') localStorage;\n  @service('router') router;\n  @service('session') session;\n  @service('social-url-shortener') socialUrlShortener;\n  @service('store') store;\n  @service current;\n\n  async beforeModel() {\n    if (await this.localStorage.getItem('MinimumAgeRestriction')) {\n      return this.router.replaceWith('ineligible');\n    }\n\n    if (!this.session.isLoggedIn) {\n      this.router.replaceWith('enter');\n    }\n  }\n\n  async model() {\n    const { organizationPromotion } = this.current;\n    const matchups = await this.store.query('matchup', { excludeSecondaryMatchups: true });\n    const matchup = mostRecentMatchup(matchups);\n\n    const { reenterFormResult, ...rest } = await RSVP.hash({\n      matchup,\n      dipsUrl: this.store.queryRecord('setting', { key: 'dips_url' }),\n      extraChancesForm: this.store\n        .query('form', {\n          formTypeId: this.enums.findWhere('FORM_TYPE', { name: 'ExtraChances' }),\n        })\n        .then(form => lastObject(extractArray(form))),\n      reenterFormResult: this.store.query('form', {\n        onlyCodeWordOrEmailPage: true,\n        matchupId: matchup.id,\n      }),\n      userAttributeTypes:\n        this.session.isLoggedIn &&\n        (get(organizationPromotion, 'promotion.isSweepstakesCodeword') ||\n          get(organizationPromotion, 'promotion.isSweepstakesSimple'))\n          ? await this.store.queryRecord('organization-user-attribute', {\n              organizationPromotionId: organizationPromotion.id,\n              organizationUserId: this.session.organizationUserId,\n              userAttributeTypeId: ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS,\n            })\n          : null,\n    });\n\n    this.current.update({\n      reminderEmailOptin: rest.userAttributeTypes,\n      isReminderEmailConfirmed: organizationPromotion.isReminderEmailConfirmed,\n    });\n\n    return {\n      ...rest,\n      reenter: {\n        form: firstObject(reenterFormResult),\n        meta: reenterFormResult.meta,\n      },\n      hasMultipleMatchups: matchups && matchups.length > 1,\n    };\n  }\n\n  async setupController(controller) {\n    super.setupController(...arguments);\n\n    const [matchupLogics, referrals, shortenedLink] = await RSVP.all([\n      this.store.findAll('matchupLogic'),\n      this.store.findAll('referral'),\n      this.referralLinks(),\n    ]);\n\n    setProperties(controller, {\n      referrals,\n      matchupLogics,\n      shortenedLink,\n    });\n  }\n\n  async referralLinks() {\n    const shortener = this.socialUrlShortener;\n    const { organizationPromotion } = this.modelFor('application');\n    // TODO: Move the following into a computed property as soon as DataBoundPromise exists.\n    const referralRoute = `referrals/${this.session.organizationPromotionUserGuid}`;\n\n    let referralUrl = '';\n\n    try {\n      const message = await talker.send('fullUrl', { route: referralRoute });\n      referralUrl = message.data.url;\n    } catch (_exception) {\n      referralUrl = localFullUrl() + referralRoute;\n    }\n\n    return shortener.shorten(\n      { url: referralUrl, pathname: `/${referralRoute}` },\n      organizationPromotion.organization.get('id'),\n      organizationPromotion.uniqueId\n    );\n  }\n\n  @action\n  didTransition() {\n    // clear the previous route's registration form AFTER this route resolves for better UX\n    clearFormFieldValues(this.store.peekAll('form').find(form => form.formType == 'Registration'));\n  }\n\n  @action\n  loading() {\n    return false;\n  }\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    designToken: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n\nimport ApplicationSerializer from './application';\n\nexport default class DesignSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {\n  attrs = {\n    designTokenContents: {\n      embedded: 'always',\n    },\n  };\n  keyForRelationship(key) {\n    if (key === 'designTokenContents') {\n      return 'default_design_token_contents';\n    }\n    return super.keyForRelationship(...arguments);\n  }\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    entryFieldValues: { embedded: 'always' },\n    organizationUsers: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    fieldOptions: { embedded: 'always' },\n    mediaItems: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  //  normalize: function(type, hash, prop) {\n  //    hash['value'] = hash['default_value'];\n  //    return this._super(type, hash, prop);\n  //  },\n  attrs: {\n    fields: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    if (payload.form_page_submissions && payload.form_page_submissions[0] && payload.meta) {\n      payload.form_page_submissions[0].entry_eligibility_date = payload.meta.entry_eligibility_date;\n    }\n    return this._super(store, primaryModelClass, payload, id, requestType);\n  },\n  attrs: {\n    sessions: { embedded: 'always' },\n    entries: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    formPages: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default class LoginEmailRequestSerializer extends SecondStreetSerializer.extend(EmbeddedRecordsMixin) {\n  attrs = {\n    session: { embedded: 'always' },\n  };\n\n  normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType) {\n    if (payload.login_email_requests && payload.login_email_requests[0]) {\n      if (payload.meta) {\n        payload.login_email_requests[0].session = payload.meta.sessions;\n      }\n\n      if (payload.login_email_requests[0].id === 0) {\n        // sometimes the api sends back 0 for an id\n        payload.login_email_requests[0].id = Math.floor(Math.random() * 1000);\n      }\n    }\n\n    return super.normalizeCreateRecordResponse(store, primaryModelClass, payload, id, requestType);\n  }\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport { computed } from '@ember/object';\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: computed(() => ({\n    sessions: { embedded: 'always' },\n  })),\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    mediaItems: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(EmbeddedRecordsMixin, {\n  attrs: {\n    orderLineItems: { embedded: 'always' },\n    ordersTransactions: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    promotions: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    organizationPromotions: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    questionOptionResults: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    questionOptionResults: { embedded: 'always' },\n  },\n});\n","import { EmbeddedRecordsMixin } from '@ember-data/serializer/rest';\nimport ApplicationSerializer from 'consumer/serializers/application';\n\nexport default class PromotionProductSerializer extends ApplicationSerializer.extend(EmbeddedRecordsMixin) {\n  attrs = {\n    promotionProductAttributes: { embedded: 'always' },\n  };\n}\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    questionOptionPicks: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    organizationUsers: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/use-ember-data-rfc-395-imports */\nimport DS from 'ember-data';\n\nimport SecondStreetSerializer from '../serializers/application';\n\nexport default SecondStreetSerializer.extend(DS.EmbeddedRecordsMixin, {\n  attrs: {\n    session: { embedded: 'always' },\n  },\n});\n","/* eslint-disable ember/no-get, ember/no-classic-classes */\nimport { computed, get, set, setProperties } from '@ember/object';\nimport { empty, filter, mapBy, not, readOnly, uniqBy } from '@ember/object/computed';\nimport Evented, { on } from '@ember/object/evented';\nimport { run } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { isBlank, isEmpty, isPresent } from '@ember/utils';\nimport RSVP from 'rsvp';\n\nconst entryAtIndex = i =>\n  computed('userEntries.@each.dateCreated', function () {\n    return this.userEntries.sortBy('id').reverse().objectAt(i);\n  });\n\n/**\n * @typedef {Ember.Service} EntriesService\n * @mixes {Ember.Evented}\n */\nexport default Service.extend(Evented, {\n  //region Dependency Injection\n  session: service(),\n  store: service(),\n  votes: service(),\n  //endregion\n\n  //region Ember Hooks\n  watchSession: on('init', function () {\n    if (get(this.session, 'isLoggedIn')) {\n      this.loadEntries();\n    }\n    this.session.on('NewSession', this, 'loadEntries');\n  }),\n  //endregion\n\n  //region Properties\n  /**\n   * When accessing this outside the service, only use this for computed property dependent keys or read its contents.\n   * Do not push items into it, replace it, etc.\n   * @readonly\n   * @type {MatchupEntry[]}\n   */\n  userEntries: null,\n  /**\n   * This is set by the Entries.loadEntries method.\n   * @type {Boolean}\n   **/\n  isLoaded: false,\n  /**\n   * @type {Boolean}\n   * @private\n   */\n  isLoadingEntries: false,\n  /**\n   * While changing a nomination, holds the previous nomination entry so UI state stays stable\n   * after the old entry is deleted and before entries reload.\n   * @type {?Object}\n   * @private\n   */\n  changingNominationFromEntry: null,\n  /**\n   * @type {?String}\n   * @private\n   */\n  changingNominationToEntryId: null,\n  /**\n   * @type {?String}\n   * @private\n   */\n  nominatingOnMatchupEntryId: null,\n  //endregion\n\n  //region Computed Properties\n  /**\n   * Whether the user has any entries at all\n   * @returns {Boolean}\n   */\n  hasEntries: not('hasNoEntries'),\n  hasNoEntries: empty('userEntries'),\n  entriesCount: readOnly('userEntries.length'),\n  currentEntry: entryAtIndex(0),\n  previousEntry: entryAtIndex(1),\n  matchups: mapBy('userEntries', 'matchup'),\n  matchupFromUserEntries: filter('matchups', isPresent),\n  matchupsWithUserSubmissions: uniqBy('matchupFromUserEntries', 'id'),\n  //endregion\n\n  init() {\n    this._super(...arguments);\n\n    set(this, 'userEntries', this.userEntries || []);\n  },\n\n  //region Methods\n  /**\n   * Loads the current user's MatchupEntries for the OrganizationPromotion.\n   * If a network request to load entries is already pending, it will _not_ fire another.\n   *\n   * @fires EntriesService#entriesLoaded\n   * @returns {RSVP.Promise}\n   */\n  loadEntries(force = false) {\n    const { userEntries } = this;\n\n    if (get(this, 'session.accessToken')) {\n      const organizationUserId = get(this, 'session.session.organizationUserId');\n      const isAlreadyLoading = this.isLoadingEntries;\n      set(this, 'isLoadingEntries', true);\n      if (!force && isAlreadyLoading) {\n        return new RSVP.Promise(resolve => this.on('entriesLoaded', () => resolve(userEntries)));\n      }\n      return this.store\n        .query('matchup-entry', { organizationUserId, filterByOrganizationPromotion: true })\n        .then(matchupEntries => {\n          userEntries.clear();\n          userEntries.addObjects(matchupEntries.toArray());\n          this.votes?.refreshReminderEmailsUserAttributeTask?.perform();\n          if (isPresent(userEntries)) {\n            this.session.trigger('ActiveSession');\n          }\n          set(this, 'isLoaded', true);\n          const entryEligibilityMetaData = get(matchupEntries, 'meta.entryEligibilityMetaData') || [];\n          set(this, 'entryEligibilityMetaData', entryEligibilityMetaData);\n          this.trigger('entriesLoaded');\n          return matchupEntries;\n        })\n        .finally(ret => {\n          set(this, 'isLoadingEntries', false);\n          return ret;\n        });\n    }\n    return RSVP.resolve(userEntries);\n  },\n  filterWriteinNominationsForThisCategoryAndInterval(selectedMatchup, nominationEntries = []) {\n    const entryEligibilityMetaData = this.entryEligibilityMetaData || [];\n    const matchupId = get(selectedMatchup, 'id');\n    const writeinNominationsEligibility = entryEligibilityMetaData.findBy('matchup_id', parseInt(matchupId)); //this needs to be an int\n    if (isBlank(writeinNominationsEligibility)) {\n      return [];\n    }\n    const startDate = new Date(get(writeinNominationsEligibility, 'entry_interval_start_date'));\n    const endDate = new Date(get(writeinNominationsEligibility, 'entry_interval_end_date'));\n    return this.userEntries.filter(e => {\n      const dateCreated = new Date(get(e, 'entries.dateCreated'));\n      return (\n        writeinNominationsEligibility &&\n        `${get(e, 'matchup.id')}` === get(selectedMatchup, 'id') &&\n        dateCreated < endDate &&\n        dateCreated > startDate &&\n        (!get(e, 'entries.masterEntryId') || get(e, 'entry.entryFieldValues')) &&\n        isEmpty(nominationEntries.findBy('entries.id', `${get(e, 'entries.masterEntryId')}`))\n      );\n    });\n  },\n  clearEntries() {\n    run(() => this.userEntries.clear());\n  },\n  hasCurrentNomination(isNominationAndVotingBallot, matchupId) {\n    const entriesEligibilityMetaData = this.entryEligibilityMetaData;\n    if (isNominationAndVotingBallot && get(this, 'session.isLoggedIn') && isPresent(entriesEligibilityMetaData)) {\n      const entryEligibilityMetaData = entriesEligibilityMetaData.findBy('matchup_id', parseInt(matchupId));\n      const userEntries = this.userEntries\n        .filterBy('matchup.id', matchupId)\n        .sortBy('entries.dateCreated', 'dateCreated');\n      const lastUserEntry = get(userEntries, 'lastObject.entry');\n      if (\n        entryEligibilityMetaData &&\n        lastUserEntry &&\n        get(lastUserEntry, 'dateCreated') > new Date(get(entryEligibilityMetaData, 'entry_interval_start_date')) &&\n        get(lastUserEntry, 'dateCreated') < new Date(get(entryEligibilityMetaData, 'entry_interval_end_date'))\n      ) {\n        return lastUserEntry;\n      }\n    }\n  },\n\n  beginChangingNomination(previousNominationEntry, toEntryId) {\n    setProperties(this, {\n      changingNominationFromEntry: previousNominationEntry,\n      changingNominationToEntryId: toEntryId,\n    });\n  },\n\n  endChangingNomination() {\n    setProperties(this, {\n      changingNominationFromEntry: null,\n      changingNominationToEntryId: null,\n    });\n  },\n\n  beginNominating(matchupEntryId) {\n    set(this, 'nominatingOnMatchupEntryId', matchupEntryId);\n  },\n\n  endNominating() {\n    set(this, 'nominatingOnMatchupEntryId', null);\n  },\n\n  isOptimisticNominationForEntry(entryId) {\n    const fromEntry = this.changingNominationFromEntry;\n    if (!fromEntry) return false;\n\n    const normalizedEntryId = parseInt(entryId, 10);\n    return (\n      parseInt(get(fromEntry, 'id'), 10) === normalizedEntryId ||\n      parseInt(get(fromEntry, 'masterEntryId'), 10) === normalizedEntryId\n    );\n  },\n\n  relevantMatchupEntryForMatchup(matchupId) {\n    return this.userEntries.find(matchupEntry => get(matchupEntry, 'matchup.id') === matchupId);\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-classic-classes */\nimport Service, { service } from '@ember/service';\nimport { loadScript } from 'secondstreet-common/utils/load-script';\n\nexport default Service.extend({\n  settings: service(),\n  autocompleteService: null,\n  placesService: null,\n\n  // For easier testing\n  get google() {\n    return window.google;\n  },\n\n  instantiateGoogleMaps(languageCode) {\n    // Load Google maps API\n    // non-prod KEY comes from the nathan.dauber@secondstreet.com Google account\n    const GOOGLE_MAPS_API_KEY = this.settings.getValueFor('google_maps_api_key');\n    const url = `https://maps.googleapis.com/maps/api/js?key=${GOOGLE_MAPS_API_KEY}&libraries=places&language=${languageCode}&v=weekly`;\n\n    return loadScript(url);\n  },\n\n  getBoundsFromRadius(center, radiusMeters) {\n    const earthRadius = 6378137; // meters, WGS84 Earth radius\n    const { lat } = center;\n    const { lng } = center;\n\n    //degrees of latitude you need to move north or south from the center to reach the edge of the circle.\n    //1 degree of latitude is roughly the same distance anywhere on Earth (~111.32 km or ~69 miles)\n    //radiusMeters / earthRadius = angular distance in radians.\n    //Multiply by (180 / Math.PI) to convert radians → degrees.\n    const dLat = (radiusMeters / earthRadius) * (180 / Math.PI);\n\n    //degrees of longitude you need to move east or west from the center to reach the edge of the circle.\n    //Longitude lines converge at the poles.\n    //At the equator, 1 degree of longitude is the widest (~111.32 km).Near the poles, 1 degree of longitude gets very small.\n    //how far 1° of longitude goes depends on latitude.\n    //Math.cos(lat) accounts for how longitude spacing shrinks as you go north/south.\n    const dLng = (radiusMeters / (earthRadius * Math.cos((Math.PI * lat) / 180))) * (180 / Math.PI);\n\n    // the minimum latitude and longitude.Southwest Bottom-left corner in a given radial area.\n    const sw = new this.google.maps.LatLng(lat - dLat, lng - dLng);\n\n    //the maximum latitude and longitude. Top-right corner in a given radial area.\n    const ne = new this.google.maps.LatLng(lat + dLat, lng + dLng);\n\n    return new this.google.maps.LatLngBounds(sw, ne);\n  },\n\n  async getPlacePredictions(input, types, promotionLocationRestriction, callback) {\n    const { AutocompleteSuggestion, PlacesServiceStatus } = this.google.maps.places;\n    try {\n      const request = { input };\n\n      if (types && types.length > 0) {\n        request.includedPrimaryTypes = types;\n      }\n\n      if (promotionLocationRestriction?.radius) {\n        const center = { lat: promotionLocationRestriction.latitude, lng: promotionLocationRestriction.longitude };\n        const radiusMeters = promotionLocationRestriction?.radius * 1609.344;\n        const bounds = this.getBoundsFromRadius(center, radiusMeters);\n        request.locationRestriction = bounds;\n      }\n\n      const { suggestions } = await AutocompleteSuggestion.fetchAutocompleteSuggestions(request);\n\n      // Convert suggestions to match old format for callback\n      const predictions = suggestions.map(suggestion => ({\n        description: suggestion.placePrediction?.text?.text,\n        place_id: suggestion.placePrediction?.placeId,\n        structured_formatting: {\n          main_text: suggestion.placePrediction?.mainText?.text,\n          secondary_text: suggestion.placePrediction?.secondaryText?.text || '',\n        },\n        types: suggestion.placePrediction?.types,\n      }));\n      callback(predictions, PlacesServiceStatus.OK);\n    } catch (error) {\n      console.error('Error fetching autocomplete suggestions:', error);\n      callback(null, PlacesServiceStatus.ERROR);\n    }\n  },\n});\n","/* eslint-disable ember/no-observers, ember/no-classic-classes */\nimport { computed, observer } from '@ember/object';\nimport Service from '@ember/service';\nimport { isBlank } from '@ember/utils';\nimport i18n from 'i18next';\n\n/**\n * Internationalization Manager wraps i18next for Second Street's purposes.\n * @class\n */\nexport default Service.extend({\n  //region Ember Hooks\n  init() {\n    this._super();\n    this.i18nextInit();\n  },\n\n  unknownProperty(keyName) {\n    const blankMatch = keyName.match(/is_(.*)_blank/);\n\n    if (blankMatch) {\n      return this.blank(blankMatch[1]);\n    }\n  },\n  //endregion\n\n  //region Properties\n  /**\n   * Options for i18next#init\n   * @private\n   */\n  options: computed(() => ({\n    lng: 'en',\n    interpolationPrefix: '{{',\n    interpolationSuffix: '}}',\n  })),\n  /**\n   * Holds a reference to the actual i18next library.\n   */\n  i18next: i18n,\n  /**\n   * Holds the translation resources to pass into i18next. To be overridden.\n   */\n  resources: Object.freeze({\n    dev: {\n      translation: {\n        key: 'value',\n      },\n    },\n    en: {\n      translation: {\n        key: 'value',\n      },\n    },\n  }),\n  //endregion\n\n  //region Methods\n  /**\n   * Translate\n   * This mirrors the API for i18next#t\n   * @see http://i18next.com/pages/doc_features.html\n   * @param key - The translation key to look up\n   * @param options - An object containing options, variables, etc.\n   * @returns {string} - Returns the translated string\n   */\n  t(key, options) {\n    // Handblebars already escapes HTML for us.\n    const unsafeOptions = Object.assign({ interpolation: { escapeValue: false } }, options);\n    return this.i18next.t(key, unsafeOptions);\n  },\n  /**\n   * Key Existence Check\n   * This mirrors the API for i18next#exists\n   * @see http://i18next.com/pages/doc_features.html\n   * @param key - The translation key to look up\n   * @param [options] - An object containing options, variables, etc.\n   * @returns {string} - Returns the translated string\n   */\n  exists(key, options) {\n    return this.i18next.exists(key, options);\n  },\n\n  /**\n   * Adds one key/value. Useful in test when you need to add a translation\n   * This mirrors the API for i18next#addResource\n   * @see https://www.i18next.com/overview/api#addresource\n   * @param lng - The translation language\n   * @param namespace - The namespace of the translation\n   * @param key - The translation key\n   * @param value - The value of the translation key\n   * @param [options] - An object containing options, variables, etc.\n   */\n  addResource(lng, namespace, key, value, options) {\n    return this.i18next.addResource(lng, namespace, key, value, options);\n  },\n\n  /**\n   * Adds multiple resource. Useful in test when you need to add a translation\n   * This mirrors the API for i18next#addResources\n   * @see https://www.i18next.com/overview/api#addresources\n   * @param lng - The translation language\n   * @param namespace - The namespace of the translation\n   * @param resources - An object with key/value pairs\n   * @param deep - If true, resources will be merged recursively, default: false\n   * @param overwrite - If true, existing keys will be overwritten, default: false\n   */\n  addResources(lng, namespace, resources, deep, overwrite) {\n    return this.i18next.addResources(lng, namespace, resources, deep, overwrite);\n  },\n\n  /**\n   * Key Blank check\n   * We don't necessarily know if the key is blank if it has variables unless you pass in options\n   * @param key - The translation key to look up\n   * @param [options] - An object containing options, variables, etc.\n   * @returns {Boolean}\n   */\n  blank(key, options) {\n    return this.exists(key) ? isBlank(this.t(key, options)) : false;\n  },\n  /**\n   * @private\n   */\n  i18nextInit() {\n    this.i18next.init({\n      ...this.options,\n      resources: this.resources,\n    });\n  },\n  //endregion\n\n  //region Observers\n  /**\n   * Any time things change that have to be passed into i18next#init, call it again.\n   */\n  optionsChanged: observer('options', 'resources', function () {\n    this.i18nextInit();\n  }),\n  //endregion\n\n  //region Computed Properties\n  /**\n   * Detect Current Language\n   * This returns the result from i18next#lng\n   * @see http://i18next.com/pages/doc_init.html\n   * @type {Ember.ComputedProperty}\n   * @returns {string} - Returns the translated string\n   */\n  get lng() {\n    return this.i18next.language;\n  },\n  //endregion\n});\n","import Service from '@ember/service';\nimport Ember from 'ember';\n\nimport talker from '../utils/talker';\n\ntype LocalStorageActionPayload =\n  | { action: 'getItem'; key: string }\n  | { action: 'setItem'; key: string; value: string }\n  | { action: 'removeItem'; key: string }\n  | { action: 'clear' };\n\ntype Talker = {\n  get(prop: 'handshaken'): boolean | undefined;\n  send(channel: 'localStorage', payload: LocalStorageActionPayload): PromiseLike<{ data?: { value?: string | null } }>;\n};\n\ntype StorageLike = {\n  getItem(key: string): Promise<string | null | undefined>;\n  setItem(key: string, value: string): Promise<void>;\n  removeItem(key: string): Promise<void>;\n  clear(): Promise<void>;\n};\n\nclass InMemoryStorage implements StorageLike {\n  inMemoryData: Record<string, string> = {};\n\n  getItem(key: string): Promise<string | null> {\n    const value = this.inMemoryData[key];\n    return Promise.resolve(value === undefined ? null : value);\n  }\n\n  setItem(key: string, value: string): Promise<void> {\n    this.inMemoryData[key] = value;\n    return Promise.resolve();\n  }\n\n  removeItem(key: string): Promise<void> {\n    delete this.inMemoryData[key];\n    return Promise.resolve();\n  }\n\n  clear(): Promise<void> {\n    this.inMemoryData = {};\n    return Promise.resolve();\n  }\n}\n\nclass BrowserStorage implements StorageLike {\n  getItem(key: string): Promise<string | null> {\n    return Promise.resolve(window.localStorage.getItem(key));\n  }\n\n  setItem(key: string, value: string): Promise<void> {\n    window.localStorage.setItem(key, value);\n    return Promise.resolve();\n  }\n\n  removeItem(key: string): Promise<void> {\n    window.localStorage.removeItem(key);\n    return Promise.resolve();\n  }\n\n  clear(): Promise<void> {\n    window.localStorage.clear();\n    return Promise.resolve();\n  }\n}\n\n/**\n * A Class that gets or sets local storage values\n * @type {Ember.Service}\n */\nexport default class LocalStorageService extends Service {\n  namespace = '';\n  tempStorage: Record<string, string | undefined> = {};\n  storage: StorageLike;\n\n  /**\n   * This is used to store things in memory, to simulate localStorage when unavailable,\n   * e.g. third-party cookie blocking makes it unavailable\n   */\n  constructor(...args: any[]) {\n    super(...args);\n    this.storage = Ember.testing ? new InMemoryStorage() : new BrowserStorage();\n  }\n\n  /**\n   * The namespace for local storage\n   */\n  /**\n   * @private\n   * @param key\n   */\n  namespacedKey(key: string): string {\n    return `${this.namespace}_${key}`;\n  }\n\n  /**\n   * Get an item from local storage\n   * @param {String} key - The key you used when the data was set\n   * @returns {Promise} - Resolves with a String of the data that was stored\n   */\n  getItem(key: string): Promise<string | null | undefined> {\n    let promisify: string | null | undefined | PromiseLike<string | null | undefined>;\n    const tempString = this.tempStorage[key];\n    if (tempString) {\n      promisify = tempString;\n    } else if ((talker as Talker).get('handshaken')) {\n      promisify = (talker as Talker)\n        .send('localStorage', {\n          action: 'getItem',\n          key: this.namespacedKey(key),\n        })\n        .then(\n          (message: { data?: { value?: string | null } }) => message.data?.value,\n          () => {\n            try {\n              return this.storage.getItem(this.namespacedKey(key));\n            } catch (e) {\n              return null;\n            }\n          }\n        );\n    } else {\n      promisify = this.storage.getItem(this.namespacedKey(key)).catch(() => null);\n    }\n\n    return Promise.resolve(promisify);\n  }\n\n  /**\n   * Set an item in local storage\n   * @param {String} key - The key which you'll want to later use to retrieve the data\n   * @param {String} value - The data to be stored\n   * @returns {String} - Returns the data that was stored\n   */\n  setItem(key: string, value: string | null): string {\n    const namespacedKey = this.namespacedKey(key);\n    if (value === null) {\n      value = 'null';\n    } // Simulate localStorage's string coercion for temp storage.\n    this.tempStorage[key] = value;\n    if ((talker as Talker).get('handshaken')) {\n      void (talker as Talker).send('localStorage', { action: 'setItem', key: namespacedKey, value });\n    }\n    try {\n      void this.storage.setItem(namespacedKey, value);\n    } catch (e) {\n      console.error(e);\n    }\n    return value;\n  }\n\n  /**\n   * Remove an item from local storage\n   * @param {String} key - The key you used when the data was set\n   */\n  removeItem(key: string): void {\n    const namespacedKey = this.namespacedKey(key);\n    if (this.tempStorage[key] !== undefined) {\n      this.tempStorage[key] = undefined;\n    }\n    if ((talker as Talker).get('handshaken')) {\n      void (talker as Talker).send('localStorage', { action: 'removeItem', key: namespacedKey });\n    }\n    try {\n      void this.storage.removeItem(this.namespacedKey(key));\n    } catch (e) {\n      console.error(e);\n    }\n  }\n\n  /**\n   * Remove all items from local storage\n   */\n  clear(): void {\n    this.tempStorage = {};\n\n    if ((talker as Talker).get('handshaken')) {\n      void (talker as Talker).send('localStorage', { action: 'clear' });\n    }\n\n    try {\n      void this.storage.clear();\n    } catch (e) {\n      console.error(e);\n    }\n  }\n}\n","/* eslint-disable ember/no-classic-classes, ember/no-get */\nimport { get, getProperties } from '@ember/object';\nimport { run } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { isBlank, isPresent } from '@ember/utils';\nimport duration from 'secondstreet-common/utils/duration';\n\nexport default Service.extend({\n  //region Dependencies\n  localStorage: service(),\n  session: service(),\n  store: service(),\n  //endregion\n\n  //region Methods\n  /**\n   * Generates a login email request, and listens for the login request token to be authenticated\n   * @public\n   * @returns {Promise<[Session]>}\n   * @param redirectPath - encoded location of where the person is in the application\n   * @param email - who is trying to log in\n   * @param optional? - optional entry form submission id & login email request callback\n   */\n  async requestLoginEmail(redirectPath, email, optional = {}) {\n    const { entryFormSubmissionId = null, emailSubmittedCallback = () => {} } = optional;\n    const { localStorage, session, store } = getProperties(this, 'localStorage', 'session', 'store');\n    const sessions = await this.attemptToLoadSessionWithLoginRequestToken();\n    if (isPresent(sessions)) {\n      return sessions;\n    }\n    const loginEmailRequest = await run(() =>\n      store.createRecord('loginEmailRequest', { redirectPath, entryFormSubmissionId, sendTo: email }).save()\n    );\n    emailSubmittedCallback();\n    const loadedSession = get(loginEmailRequest, 'session');\n    if (isPresent(loadedSession)) {\n      return [loadedSession];\n    }\n    const loginRequestToken = get(loginEmailRequest, 'loginRequestToken');\n    localStorage.setItem('loginRequestToken', loginRequestToken);\n    const initialQueryDelay = duration(5000);\n    return session.attemptLoginUsing(loginRequestToken, undefined, initialQueryDelay);\n  },\n  /**\n   * Tries to log in the user using the loginRequestToken within localStorage.\n   * @private\n   * @returns {Promise<[Session]>}\n   */\n  async attemptToLoadSessionWithLoginRequestToken() {\n    const { localStorage, session } = getProperties(this, 'localStorage', 'session');\n    try {\n      const requestToken = await localStorage.getItem('loginRequestToken');\n      return isBlank(requestToken) ? [] : await session.loadStoredSession('', requestToken);\n    } catch (_error) {\n      return [];\n    }\n  },\n  //endregion\n});\n","import MomentService from 'ember-moment/services/moment';\nimport config from '../config/environment';\n\nexport default class MomentOverride extends MomentService {\n  defaultFormat = (config.moment && config.moment.outputFormat) || null;\n}\n","import EmberScreen, { breakpoint } from 'ember-screen';\n\nexport default EmberScreen.extend({\n  isSmallAndUp: breakpoint('(min-width: 34em)'),\n  isMediumAndUp: breakpoint('(min-width: 48em)'),\n  isLargeAndUp: breakpoint('(min-width: 62em)'),\n  isExtraLargeAndUp: breakpoint('(min-width: 75em)'),\n\n  isExtraSmallAndDown: breakpoint('(max-width: 33.9999em)'),\n  isSmallAndDown: breakpoint('(max-width: 47.9999em)'),\n  isMediumAndDown: breakpoint('(max-width: 61.9999em)'),\n  isLargeAndDown: breakpoint('(max-width: 74.9999em)'),\n});\n","/* eslint-disable ember/no-get, ember/use-ember-data-rfc-395-imports, ember/no-classic-classes */\nimport { computed, get, set } from '@ember/object';\nimport { alias, not, readOnly } from '@ember/object/computed';\nimport Evented from '@ember/object/evented';\nimport { run } from '@ember/runloop';\nimport Service, { inject as service } from '@ember/service';\nimport { isEmpty, isPresent } from '@ember/utils';\nimport DS from 'ember-data';\nimport RSVP from 'rsvp';\nimport { spreadIf } from 'secondstreet-common/utils/functional';\n\nimport ENV from '../config/environment';\nimport localFullUrl from '../utils/local-full-url';\nimport { wait } from '../utils/promises';\nimport talker from '../utils/talker';\n\nconst { keys } = Object;\nconst NO_LOGIN_STRATEGY_ID = 0;\n\nconst userDataMapping = {\n  email: 'userDataEmailAddress',\n  firstName: 'userDataFirstName',\n  lastName: 'userDataLastName',\n  city: 'userDataCity',\n  address1: 'userDataAddress1',\n  address2: 'userDataAddress2',\n  stateProvince: 'userDataStateProvince',\n  postalCode: 'userDataPostalCode',\n  country: 'userDataCountry',\n  gender: 'userDataGender',\n  phone: 'userDataPhone',\n  birthdate: 'userDataBirthDate',\n};\n\n/**\n * Session Manager handles authentication with the Second Street Promotions API\n * @class\n * @fires thirdPartyAuthProviderDetected\n * @fires thirdPartyLoginCanceled\n */\nexport default Service.extend(Evented, {\n  //region Dependencies\n  store: service(),\n  localStorage: service(),\n  //endregion\n\n  // A helper for skipping the login attempt recursion in tests.\n  __skipLoginAttempts: ENV.environment == 'test',\n\n  //region Ember Hooks\n  async init() {\n    this._super(...arguments);\n\n    set(this, 'formIdQueue', this.formIdQueue || []);\n    set(this, 'applicationAdapter', this.store.adapterFor('application'));\n\n    let rootUrl = localFullUrl();\n\n    try {\n      const message = await talker.send('fullUrl', { route: '' });\n      rootUrl = message.data.url;\n    } catch (e) {\n      console.error(e);\n    }\n\n    run(() => !this.isDestroyed && set(this, 'rootUrl', rootUrl));\n  },\n  //endregion\n\n  //region Properties\n  /**\n   * The Session model itself\n   * @private\n   */\n  session: null,\n  referrerUserGuid: null,\n  lastAction: null,\n  hasRecentAction: false,\n  isAdgagement: false,\n  thirdPartyUsesExternalLogin: true,\n  /**\n   * Null if no third party is present, or the ID of the third party if one is present.\n   * @type {?Number}\n   */\n  thirdPartyAuthProvider: null,\n  /**\n   * The third party auth request could come down from the top a few times in a row,\n   * so we need something to track whether we're currently busy trying to fulfill the first one.\n   * @private\n   */\n  isHandlingThirdPartyConnection: false,\n  /**\n   * @property {String[]} - A queue of form ids to be stored in local storage.\n   */\n  formIdQueue: null,\n  //endregion\n\n  //region Methods\n  /**\n   * Call this method any time we know about a Form that the user might be filling out.\n   * Stores form ids in local storage, which will then be used to clear out local storage when the user logs out.\n   * The Session Service will appropriately clear sensitive Form data for all acknowledged forms.\n   * @param formId\n   */\n  async acknowledgeForm(formId) {\n    const { localStorage } = this;\n    const { formIdQueue } = this;\n\n    set(this, 'formIdQueue', formIdQueue || []);\n    formIdQueue.addObject(formId);\n    const formIds = await localStorage.getItem('formIds');\n    if (isEmpty(formIdQueue)) {\n      return;\n    }\n    if (formIds) {\n      run(() => {\n        const ids = [formIdQueue].concat(formIds.split(',')).uniq().compact().join(',');\n        localStorage.setItem('formIds', ids);\n        formIdQueue.clear();\n      });\n    } else {\n      run(() => localStorage.setItem('formIds', formIdQueue.join(',')));\n    }\n  },\n  /**\n   * @private\n   */\n  clearSession() {\n    if (this.session) {\n      this.session.rollbackAttributes();\n      this.store.unloadRecord(this.session);\n      set(this, 'session', null);\n    }\n  },\n  /**\n   * @private\n   * @param {Session} session\n   * @returns {String} - Returns the new session's access token\n   */\n  handleNewSession(session) {\n    if (get(session, 'accessToken') === get(this, 'session.accessToken')) {\n      return get(this, 'session.accessToken');\n    }\n\n    const accessToken = get(session, 'accessToken');\n    this.applicationAdapter.addHeaders({ Authorization: accessToken });\n    run(() => set(this, 'session', session));\n    this.localStorage.setItem('accessToken', accessToken);\n    this.trigger('NewSession');\n    return accessToken;\n  },\n  /**\n   * @private\n   * @param error\n   */\n  handleFailedSession(error) {\n    const errors = keys(error.errors);\n    const isValidationError = error instanceof DS.InvalidError;\n    const isUsernameErrorOnly = errors.length === 1 && errors[0] === 'username';\n    if (isValidationError && isUsernameErrorOnly) {\n      // Swallow errors. TODO: Anything else useful here?\n      return false;\n    }\n    throw error; // TODO: Handle more errors?\n  },\n\n  /**\n   * @private\n   */\n  async handleDeletedSession() {\n    this.clearSession();\n    this.applicationAdapter.removeHeader('Authorization');\n    set(this, 'session', null);\n    set(this, 'hasRecentAction', false);\n    const { localStorage } = this;\n    const storedFormIds = await localStorage.getItem('formIds');\n\n    (storedFormIds || '')\n      .split(',')\n      .uniq()\n      .forEach(formId => {\n        [\n          `FORM_${formId}_currentPageNumber`,\n          `FORM_${formId}_formValues`,\n          `FORM_${formId}_formSubmissionId`,\n          `FORM_${formId}_entryFormSubmissionId`,\n          `FORM_${formId}_mediaItemId`,\n          `FORM_${formId}_videoId`,\n        ].forEach(x => localStorage.removeItem(x));\n      });\n    ['accessToken', 'entryEligibilityDate', 'probablyHasNotFinishedRegistration', 'formIds', 'paymentDetails'].forEach(\n      x => localStorage.removeItem(x)\n    );\n    this.trigger('Logout');\n  },\n\n  /**\n   * Login\n   * @param {String} username\n   * @param {String} [password]\n   * @returns {Ember.RSVP.Promise} - Returns a promise that will either:\n   *                 - resolve with an access Token\n   *                 - reject with the reason the API rejected the login\n   */\n  async login(username, password) {\n    this.clearSession();\n    const session = this.store.createRecord('session', { username, password });\n    try {\n      const result = await session.save();\n      return this.handleNewSession(result);\n    } catch (error) {\n      return this.handleFailedSession(error);\n    }\n  },\n  /**\n   * useExistingSession\n   * @param {Session} session\n   * @returns {String|null} - Returns the session's access token\n   */\n  useExistingSession(session) {\n    return session ? this.handleNewSession(session) : null;\n  },\n  /**\n   * Logout\n   * @returns {Ember.RSVP.Promise}\n   */\n  async logout() {\n    return this.handleDeletedSession();\n  },\n  /**\n   * This turns the session JSON object into a model, calls other session handlers, and makes it available.\n   * @private\n   * @param sessionJson\n   * @returns {Session}\n   */\n  pushSession(sessionJson) {\n    const { store } = this;\n    const sessionModel = store.push(store.serializerFor('session').normalize(store.modelFor('session'), sessionJson));\n    this.handleNewSession(sessionModel);\n    return sessionModel;\n  },\n\n  /**\n   * This turns the session JSON object into a model, calls other session handlers, and makes it available.\n   * @private\n   * @returns {[Session]}\n   * @param store\n   * @param storedToken\n   * @param loginRequestToken\n   */\n  async querySessions(storedToken, loginRequestToken) {\n    const sessions = [];\n\n    if (isPresent(storedToken)) {\n      this.applicationAdapter.addHeaders({ Authorization: storedToken });\n      const loadedSessions = await this.store.query('session', {});\n      sessions.addObjects(loadedSessions.filterBy('organizationUsers'));\n    }\n\n    if (isEmpty(sessions) && isPresent(loginRequestToken)) {\n      try {\n        const loginEmailRequests = await this.store.queryRecord('login-request-session', { loginRequestToken });\n        sessions.addObject(get(loginEmailRequests, 'sessions'));\n        this.localStorage.removeItem('loginRequestToken');\n      } catch (e) {\n        console.error(e);\n      }\n    }\n\n    return sessions;\n  },\n  /**\n   * Load Stored Session or authenticate using passed in accessToken\n   * @param {String?} accessToken - If passed in use this accessToken instead of checking local storage.\n   * @param {String?} emailLoginRequestToken - If passed in use this loginRequestToken instead of checking local storage.\n   * @returns {Ember.RSVP.Promise} - Resolves if there was a valid stored session, rejects if there was not.\n   */\n  async loadStoredSession(accessToken = null, emailLoginRequestToken = null) {\n    const { localStorage } = this;\n    const storedToken = isPresent(accessToken) ? accessToken : await localStorage.getItem('accessToken');\n    const loginRequestToken = emailLoginRequestToken || (await localStorage.getItem('loginRequestToken'));\n    if (get(this, 'session.accessToken') === storedToken && get(this, 'session.organizationUsers')) {\n      return this.store.peekAll('session');\n    }\n\n    try {\n      const sessions = await this.querySessions(storedToken, loginRequestToken);\n      const session = get(sessions, 'lastObject');\n\n      if (session) {\n        if (get(session, 'organizationUsers')) {\n          this.registerAction('return');\n        }\n        this.handleNewSession(session);\n      }\n\n      return sessions;\n    } catch (error) {\n      localStorage.removeItem('accessToken');\n      this.applicationAdapter.removeHeader('Authorization');\n      throw error;\n    }\n  },\n  /**\n   * Login using accessToken\n   * @param {String} accessToken - token that will be used for a login attempt\n   * @returns {Ember.RSVP.Promise} - Resolves if there was a valid stored session, rejects if there was not.\n   */\n  loginUsingAccessToken(accessToken) {\n    return this.loadStoredSession(accessToken);\n  },\n  /**\n   * Login using accessToken :warning: this is recursive\n   * @public\n   * @param {String} loginRequestToken - token that will be used for a login attempt\n   * @param {Date} startTime - time at which the querying started\n   * @param {Number} queryDelay - milliseconds to delay processing the query against the login request\n   * @returns {Ember.RSVP.Promise} for attempting to login\n   */\n  async attemptLoginUsing(loginRequestToken = '', startTime = new Date(), queryDelay = 2000) {\n    if (this.__skipLoginAttempts) return;\n\n    const fiveMinutes = ENV.environment == 'test' ? 500 : 5 * 60 * 1000;\n\n    if (this.isLoggedIn) {\n      return RSVP.resolve([this.session]);\n    }\n    if (new Date() - startTime >= fiveMinutes) {\n      throw new Error('Logging in with login request token ran out of time :(');\n    }\n    if (isEmpty(loginRequestToken)) {\n      throw new Error('missing login request token');\n    }\n\n    let sessions = [];\n\n    try {\n      await wait(ENV.environment === 'test' ? 1 : queryDelay);\n      sessions = await this.loadStoredSession(null, loginRequestToken);\n    } catch (e) {\n      console.error(e);\n    }\n\n    return isPresent(sessions) ? sessions : this.attemptLoginUsing(loginRequestToken, startTime);\n  },\n  registerAction(action) {\n    set(this, 'lastAction', action);\n    set(this, 'hasRecentAction', true);\n  },\n  async isThirdPartyEnabledViaAPI(message) {\n    const thirdPartyAuthSetting =\n      this.store.peekAll('setting').findBy('key', 'third_party_id') ||\n      (await this.store.queryRecord('setting', { key: 'third_party_id' }));\n    if (get(thirdPartyAuthSetting, 'value')) {\n      set(this, 'thirdPartyAuthProvider', message.data.info);\n\n      if (this.thirdPartyAuthProvider.thirdPartyLoginStrategy === NO_LOGIN_STRATEGY_ID) {\n        set(this, 'thirdPartyUsesExternalLogin', false);\n      }\n\n      this.trigger(this, 'thirdPartyAuthProviderDetected');\n    }\n  },\n  declareAdgagement() {\n    set(this, 'isAdgagement', true);\n  },\n  async handleThirdPartyConnection({ uuid, thirdPartyId, ...additionalFields }) {\n    if (this.isHandlingThirdPartyConnection) {\n      return;\n    }\n\n    const matchesUUID = `${get(this, 'session.thirdPartyUniqueUserId')}` === uuid;\n    const matchesThirdParty = get(this, 'session.thirdPartyId') === thirdPartyId;\n    if (matchesUUID && matchesThirdParty) {\n      return;\n    }\n\n    const done = x => {\n      set(this, 'isHandlingThirdPartyConnection', false);\n      return x;\n    };\n    set(this, 'isHandlingThirdPartyConnection', true);\n    const record = this.store.createRecord('thirdPartyUserConnection', {\n      thirdPartyId,\n      thirdPartyUniqueUserId: uuid,\n      ...spreadIf(!uuid && Object.keys(additionalFields).length, {\n        userDataEmailAddress: additionalFields.email,\n        userDataFirstName: additionalFields.firstName,\n        userDataLastName: additionalFields.lastName,\n        userDataCity: additionalFields.city,\n        userDataAddress1: additionalFields.address1,\n        userDataAddress2: additionalFields.address2,\n        userDataStateProvince: additionalFields.stateProvince,\n        userDataPostalCode: additionalFields.postalCode,\n        userDataCountry: additionalFields.country,\n        userDataGender: additionalFields.gender,\n        userDataPhone: additionalFields.phone,\n        userDataBirthDate: additionalFields.birthdate,\n      }),\n    });\n    try {\n      const thirdPartyConnection = await record.save();\n      if (additionalFields) {\n        Object.keys(additionalFields).forEach(prop => {\n          if (additionalFields[prop] && !thirdPartyConnection[userDataMapping[prop]]) {\n            window.console.error(\n              `The \"${prop}\" property sent to Upland Second Street via ClientSideLoginData was invalid. We skipped this property for this user.`\n            );\n          }\n        });\n      }\n      this.registerAction('return');\n      this.handleNewSession(get(thirdPartyConnection, 'session'));\n    } catch (error) {\n      // If we failed this request, it's probably because we don't have\n      // the partner's third party credentials. If that's the case,\n      // we should just pretend like it's not even available.\n      set(this, 'thirdPartyAuthProvider', null);\n      throw error;\n    } finally {\n      done();\n    }\n  },\n  //endregion\n\n  //region Computed Properties\n  /**\n   * The user's username (read-only)\n   * @type {Ember.ComputedProperty}\n   */\n  username: readOnly('session.username'),\n  referrerUrl: computed('rootUrl', 'session.organizationPromotionUserGuid', function () {\n    const guid = get(this, 'session.organizationPromotionUserGuid');\n    const { rootUrl } = this;\n    return guid ? `${rootUrl}referrals/${guid}` : rootUrl;\n  }),\n  /**\n   * Access Token\n   * @returns {String} - The Access Token for the Second Street Promotions API\n   * @type {Ember.ComputedProperty}\n   */\n  accessToken: alias('session.accessToken'),\n  /**\n   * Current Organization Promotion User's Id\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationPromotionUserId: computed('session.organizationPromotionUserId', function () {\n    return `${get(this, 'session.organizationPromotionUserId')}`;\n  }),\n  /**\n   * Current User's First Name\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationUserFirstName: computed('session.organizationUsers.firstName', function () {\n    return get(this, 'session.organizationUsers.firstName');\n  }),\n  /**\n   * The user's organization user id (read-only)\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationUserId: computed('session.organizationUserId', function () {\n    return `${get(this, 'session.organizationUserId')}`;\n  }).readOnly(),\n  /**\n   * Current Organization User's Guid\n   * @returns {String}\n   * @type {Ember.ComputedProperty}\n   */\n  organizationPromotionUserGuid: alias('session.organizationPromotionUserGuid'),\n  /**\n   * Is Registered\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  isRegistered: computed('session', 'session.{isNew,isLoaded,isValid}', function () {\n    const { session } = this;\n    return !!session && get(session, 'isValid') && get(session, 'isLoaded') && !get(session, 'isNew');\n  }),\n  /**\n   * Is Logged In\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  isLoggedIn: computed('session.organizationUsers', function () {\n    return this.isRegistered && get(this, 'session.organizationUsers');\n  }),\n  /**\n   * Reads the status type of the session's organization user to determine if the session is authorized (read-only)\n   * @type {Ember.ComputedProperty}\n   */\n  isAuthorized: readOnly('session.organizationUsers.isActive'),\n  isThirdParty: computed('isLoggedIn', 'session.{thirdPartyId,thirdPartyUniqueUserId}', function () {\n    if (this.isLoggedOut) {\n      return false;\n    }\n    return !!this.session.thirdPartyId;\n  }),\n  /**\n   * Is Logged Out\n   * @returns {Boolean}\n   * @type {Ember.ComputedProperty}\n   */\n  isLoggedOut: not('isLoggedIn'),\n  usesSecondStreetLogin: computed('thirdPartyAuthProvider', 'thirdPartyUsesExternalLogin', function () {\n    return !this.thirdPartyAuthProvider || !this.thirdPartyUsesExternalLogin;\n  }),\n  //endregion\n});\n","/* eslint-disable ember/no-classic-classes */\nimport { get, set } from '@ember/object';\nimport Service, { inject as service } from '@ember/service';\nimport { isBlank } from '@ember/utils';\nconst isEmbeddedRegex = /facebook.+\\.secondstreetapp\\.com\\/(\\d+)(\\/.*)?/i;\n\nconst getLocation = (href = '') => {\n  //Create a link for the url to have the browser tokenize the url for us.\n  const link = document.createElement('a');\n  link.href = href.startsWith('http') ? href : `http://${href}`;\n  return `${link.pathname}${link.search}`;\n};\n/*\n * A Class that gets a social service shorten URL containing OpenGraph tags for a relevant consumer site.\n * @type {Ember.Service}\n */\nexport default Service.extend({\n  store: service('store'),\n\n  //region Properties\n  /**\n   * @private\n   * @property {Promise<DS.AdapterPopulatedRecordArray>?}\n   */\n  domainQuery: null,\n  //endregion\n\n  //region Methods\n  organizationPromotionDomain(url) {\n    const isEmbedded = isEmbeddedRegex.test(url);\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec\n    const [, regexResult] = isEmbeddedRegex.exec(url) || []; // Anything after the first element is the parenthesized substring matches, if any\n\n    return isEmbedded ? `/fb-${regexResult}` : '';\n  },\n\n  async findPrimaryDomain(organizationId) {\n    let domains = this.store.peekAll('domain').filterBy('domainTypeId', 1);\n\n    if (isBlank(domains)) {\n      const existingDomainQuery = this.domainQuery;\n\n      if (existingDomainQuery) {\n        domains = await existingDomainQuery;\n      } else {\n        const domainQuery = this.store.query('domain', { organizationId });\n        set(this, 'domainQuery', domainQuery);\n\n        domains = await domainQuery;\n\n        set(this, 'domainQuery', null);\n      }\n    }\n\n    return get(domains.findBy('isPrimary'), 'hostname');\n  },\n\n  async shorten({ url, pathname }, organizationId, organizationPromotionId) {\n    const path = pathname || getLocation(url);\n    let primaryDomain = await this.findPrimaryDomain(organizationId);\n\n    if (primaryDomain?.indexOf('.secondstreetapp.com') < 0) {\n      primaryDomain = 'consumers.secondstreetapp.com';\n    }\n\n    const facebook = this.organizationPromotionDomain(url);\n\n    return `${primaryDomain}/og${facebook}/${organizationPromotionId}${path}`;\n  },\n  //endregion\n});\n","/* eslint-disable ember/no-computed-properties-in-native-classes */\nimport { computed, get, set, setProperties } from '@ember/object';\nimport { gt, readOnly, sort } from '@ember/object/computed';\nimport Service, { inject as service } from '@ember/service';\nimport { underscore } from '@ember/string';\nimport { isPresent } from '@ember/utils';\nimport { task, timeout } from 'ember-concurrency';\nimport ENV from 'ember-get-config';\nimport moment from 'moment';\nimport RSVP from 'rsvp';\nimport duration from 'secondstreet-common/utils/duration';\n\nconst ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS = 77;\nexport default class VotesService extends Service {\n  @service entries;\n  @service logger;\n  @service session;\n  @service store;\n  @service current;\n\n  constructor() {\n    super(...arguments);\n\n    if (this.session.isLoggedIn) this.loadVotes();\n    this.session.on('NewSession', this, 'loadVotes');\n  }\n\n  /**\n   * Only use this for computed property dependent keys. Do not access it directly outside the service.\n   * @private\n   * @property {Vote[]}\n   */\n  userVotes = [];\n\n  /**\n   * Used internally to track whether we are in the middle of a vote submission.\n   * Exposed as the read-only `isDeletingVoteForMatchupEntryId` property.\n   * @private\n   * @property {?String}\n   */\n  _isDeletingVoteForMatchupEntryId = null;\n\n  /**\n   * Used internally to track whether we are in the middle of a vote submission.\n   * Exposed as the read-only `isVotingOnMatchupEntryId` property.\n   * @private\n   * @property {?String}\n   */\n  _isVotingOnMatchupEntryId = null;\n\n  /**\n   * The order votes are sorted to get the most current.\n   * @private\n   */\n  voteSortingDesc = ['id:desc'];\n\n  /**\n   * The date when the voting period begins.\n   * @private\n   * @property {?Date}\n   */\n  voteIntervalStartDate = null;\n\n  /**\n   * The date when the voting period ends.\n   * @private\n   * @property {?Date}\n   */\n  voteIntervalEndDate = null;\n\n  /**\n   * @property {Boolean}\n   */\n  isLoading = false;\n\n  /**\n   * This is set by the `ss-form-entry-registration` when it needs load vote data for a matchup\n   * @type {Boolean}\n   */\n  loadingVote = false;\n\n  /**\n   * This is set by the `ss-form-entry-registration` when it needs delete vote data for a matchup in order to cast a new vote\n   * @type {Boolean}\n   */\n  recastingVote = false;\n\n  /**\n   * Returns votes for the current user made within the current voting interval,\n   * or if there is no current voting interval, within the interval in which the user most recently voted in that matchup.\n   * Note: This does *not* update with the clock, so it may get out of date since it's time-based.\n   * @property {Vote[]}\n   * @readonly\n   * @public\n   **/\n  @computed('userVotes.[]', 'voteIntervalStartDate', 'voteIntervalEndDate', 'session.isLoggedIn')\n  get currentVotes() {\n    const { userVotes } = this;\n    if (this.voteIntervalStartDate && this.voteIntervalEndDate) {\n      return userVotes.filter(vote =>\n        this.isVoteInInterval(vote, this.voteIntervalStartDate, this.voteIntervalEndDate)\n      );\n    }\n    return userVotes.sortBy('createDate').uniqBy('matchupEntry.matchup.id');\n  }\n\n  /**\n   * Returns currentVotes in order of the newest to the oldest\n   * @property {Vote[]}\n   * @readonly\n   * @public\n   */\n  @sort('currentVotes', 'voteSortingDesc') sortedCurrentVotes;\n\n  /**\n   * Whether the user has ever voted in the entire contest, regardless of intervals.\n   * @property {Boolean}\n   * @readonly\n   * @public\n   */\n  @gt('userVotes.length', 0) hasEverVoted;\n\n  /**\n   * If currently deleting a vote, returns its matchupEntry ID. Otherwise, null.\n   * @property {?String}\n   * @readonly\n   * @public\n   */\n  @readOnly('_isDeletingVoteForMatchupEntryId') isDeletingVoteForMatchupEntryId;\n\n  /**\n   * If currently creating a vote, returns its matchupEntry ID. Otherwise, null.\n   * @property {?String}\n   * @readonly\n   * @public\n   */\n  @readOnly('_isVotingOnMatchupEntryId') isVotingOnMatchupEntryId;\n\n  /**\n   * The most recent vote the user has created.\n   * @property {Vote}\n   * @readonly\n   * @public\n   */\n  @readOnly('sortedCurrentVotes.firstObject') currentVote;\n\n  /**\n   * If the current date is within the voting date range\n   * @property {Boolean}\n   * @readonly\n   * @public\n   */\n  @computed('voteIntervalStartDate', 'voteIntervalEndDate')\n  get isVotingOpen() {\n    const today = new Date();\n    return this.voteIntervalStartDate <= today && today < this.voteIntervalEndDate;\n  }\n\n  /**\n   * Can the user vote again for a given {@link Matchup}?\n   * Note: There can only ever be one vote per matchup per interval.\n   * @public\n   * @param {Matchup} matchup\n   * @returns {Boolean}\n   */\n  canVoteAgain(matchup) {\n    const existingVote = this.currentVotes.find(v => `${v.matchupId}` === get(matchup, 'id'));\n    return !existingVote;\n  }\n\n  getVotes(bypassCache = false) {\n    return this.store.query('vote', { allowPending: true, BypassCache: bypassCache });\n  }\n\n  async loadVotes(bypassCache = false) {\n    const { organizationPromotion } = this.current.data;\n    if (!this.session.isLoggedIn) return;\n\n    set(this, 'isLoading', true);\n\n    try {\n      const { userVotes } = this;\n      userVotes.clear();\n      if (get(organizationPromotion, 'promotion.isBallot')) {\n        this.refreshReminderEmailsUserAttributeTask.perform();\n      }\n      const votes = await this.getVotes(bypassCache);\n      userVotes.addObjects(votes.toArray());\n      this.session.trigger('ActiveSession');\n      this.extractDatesFromMeta(votes);\n    } catch (e) {\n      // This is most likely a UGC promotion type\n      // That doesn't use voting resulting\n      // in a 501 from the server\n      console.warn(e);\n    } finally {\n      set(this, 'isLoading', false);\n      this.previouslyRefreshedAt = new Date();\n      this.refreshVotesTask.perform();\n    }\n  }\n\n  refreshReminderEmailsUserAttributeTask = task({ drop: true }, async () => {\n    let orgUserAttribute;\n    orgUserAttribute = this.store\n      .peekAll('organization-user-attribute')\n      .filterBy('organizationuserId', this.session.organizationUserId);\n\n    if (!orgUserAttribute?.firstObject) {\n      orgUserAttribute = await this.store.query('organization-user-attribute', {\n        organizationPromotionId: this.current.organizationPromotion.id,\n        organizationUserId: this.session.organizationUserId,\n        userAttributeTypeId: ATTRIBUTE_TYPE_ID_FOR_REMINDER_EMAILS,\n      });\n    }\n    this.current.update({\n      reminderEmailOptin: orgUserAttribute.firstObject ? orgUserAttribute.firstObject : null,\n    });\n  });\n\n  refreshVotesTask = task({ drop: true }, async () => {\n    while (ENV.environment != 'test') {\n      await timeout(duration(60 * 1000));\n\n      const nextRefresh = moment(this.previouslyRefreshedAt).add(1, 'hour').startOf('hour').toDate();\n\n      this.logger.log('Should refresh votes?', nextRefresh, new Date());\n\n      if (nextRefresh < new Date()) {\n        await this.loadVotes();\n      }\n    }\n  });\n\n  /**\n   * @private\n   */\n  clearVotes() {\n    this.userVotes.clear();\n  }\n\n  /**\n   * Note: If we want to make this public, we'll have to re-think how we handle `isDeletingVoteForMatchupEntryId`\n   * @private\n   * @param {Vote} vote\n   * @returns {Promise}\n   */\n  unVote(vote, isBallot) {\n    const noop = () => {};\n\n    // Ballot write-in entries are deleted, so no need to delete vote directly\n    if (isBallot && this.isVoteWrittenIn(vote)) {\n      return vote;\n    }\n\n    return vote.destroyRecord().catch(noop);\n  }\n\n  /**\n   * @public\n   */\n  isVoteWrittenIn(vote) {\n    const entries = this.entries.userEntries.findBy('matchupId', get(vote, 'matchupId').toString());\n    return entries && isPresent(vote) && [entries].flat().isAny('id', get(vote, 'matchupEntry.id'));\n  }\n\n  /**\n   * Note that there should only ever be one vote per matchup per interval. When submitting a vote,\n   * any existing votes that match the current interval and the submitted matchupEntry's  matchup will be deleted.\n   * @public\n   * @param {MatchupEntry} matchupEntry - The MatchupEntry you'd like to vote for in the current interval\n   * @returns {Promise} - Resolves with the created Vote\n   */\n  async submitVote(matchupEntry, { allowMultipleVotes = false, isBallot = false, count = 1 } = {}) {\n    let newVoteResult;\n    const matchupEntryId = matchupEntry.id;\n    const voteToDelete = this.findVoteWithinMatchupForCurrentInterval(matchupEntry.matchup);\n    if (!allowMultipleVotes && voteToDelete && get(voteToDelete, 'matchupEntry.id') === matchupEntryId && !isBallot) {\n      this.session.registerAction('vote'); // still register an action to get the login info to display\n      return voteToDelete; // if voting for the vote that we just found, just return it\n    }\n    const promise =\n      !allowMultipleVotes && voteToDelete && !(get(voteToDelete, 'matchupEntry.id') === matchupEntryId && isBallot)\n        ? this.unVote(voteToDelete, isBallot)\n        : RSVP.resolve();\n\n    setProperties(this, {\n      _isDeletingVoteForMatchupEntryId:\n        !allowMultipleVotes && voteToDelete && !(get(voteToDelete, 'matchupEntry.id') === matchupEntryId && isBallot)\n          ? get(voteToDelete, 'matchupEntry.id')\n          : null,\n      _isVotingOnMatchupEntryId: matchupEntryId,\n      isSaving: true,\n    });\n\n    const [deletedVote] = await RSVP.all([promise, timeout(1250)]);\n    const { userVotes } = this;\n    userVotes.removeObject(deletedVote);\n\n    try {\n      const vote = this.store.createRecord('vote', { matchupId: get(matchupEntry, 'matchup.id') });\n      set(vote, 'matchupEntry', matchupEntry);\n      if (count > 1) {\n        set(vote, 'voteWeight', count);\n      }\n      this.session.registerAction('vote');\n\n      newVoteResult = await vote.save();\n\n      this.userVotes.addObjects(userVotes);\n      this.userVotes.addObject(vote);\n\n      if (!this.voteIntervalStartDate && !this.voteIntervalEndDate) {\n        // in odd scenarios where somehow there are no vote interval dates set, rerun the logic to extract dates from meta\n        const votes = await this.getVotes();\n        this.extractDatesFromMeta(votes);\n      }\n    } finally {\n      set(this, '_isVotingOnMatchupEntryId', null);\n      set(this, '_isDeletingVoteForMatchupEntryId', null);\n      set(this, 'isSaving', false);\n    }\n\n    return newVoteResult;\n  }\n\n  currentVotesForMatchupEntry(matchupEntry) {\n    const startDate = this.voteIntervalStartDate;\n    const endDate = this.voteIntervalEndDate;\n\n    return this.currentVotes.filter(item => {\n      let ret = this.isVoteForMatchupEntry(item, matchupEntry);\n      if (startDate && endDate) {\n        ret = ret && this.isVoteInInterval(item, startDate, endDate);\n      }\n      return ret;\n    });\n  }\n\n  currentVoteForMatchupEntry(matchupEntry) {\n    const votes = this.currentVotesForMatchupEntry(matchupEntry);\n    return votes.length > 0 ? votes[0] : null;\n  }\n\n  isCurrentlyVotedFor(matchupEntry) {\n    const votes = this.currentVotesForMatchupEntry(matchupEntry);\n    return votes.length > 0;\n  }\n\n  findVoteWithinMatchupForCurrentInterval(matchup) {\n    return this.currentVotes.find(\n      vote => `${vote.matchupId}` === get(matchup, 'id') && vote.dateCreated > this.voteIntervalStartDate\n    );\n  }\n\n  /**\n   * Shortcut method to extract the vote eligibility date and vote interval dates from the meta Object\n   * @private\n   * @param {Object} meta\n   */\n  extractDatesFromMeta(recordWithMeta) {\n    const { meta } = recordWithMeta;\n\n    set(this, 'voteIntervalStartDate', this.extractDateFromMeta(meta, 'voteIntervalStartDate'));\n    set(this, 'voteIntervalEndDate', this.extractDateFromMeta(meta, 'voteIntervalEndDate'));\n  }\n\n  /**\n   * Get a specified date from the meta object.\n   * Since Entry Showcase promotions' Matchups will always have matching dates, we can just pick one.\n   * @private\n   * @param {Object} meta\n   * @param {string} property\n   */\n  extractDateFromMeta(meta, property) {\n    try {\n      const eligibilityMetadata = meta.voteEligibilityMetaData;\n\n      if (eligibilityMetadata) {\n        return new Date(eligibilityMetadata[0][underscore(property)]);\n      }\n    } catch (e) {\n      console.error('Problem with meta property: ', property);\n    }\n\n    return null;\n  }\n\n  /**\n   * Returns true if the any vote for any category was made within a given interval.\n   * @private\n   * @param {Vote} vote\n   * @param {Date} startDate\n   * @param {Date} endDate\n   */\n  isVoteInInterval(vote, startDate, endDate) {\n    const { dateCreated } = vote;\n    return startDate <= dateCreated && dateCreated <= endDate;\n  }\n\n  /**\n   * Returns true if the vote was made for a given matchupEntryId.\n   * @private\n   * @param {Vote} vote\n   * @param {MatchupEntry} matchupEntry\n   * @returns {Boolean}\n   */\n  isVoteForMatchupEntry(vote, matchupEntry) {\n    return matchupEntry.id === get(vote, 'matchupEntry.id');\n  }\n\n  /**\n   * Returns true if the vote was made for a given matchupEntryId.\n   * @private\n   * @param {Vote} vote\n   * @param {Matchup} matchup\n   * @returns {Boolean}\n   */\n  isVoteForMatchup(vote, matchup) {\n    return get(vote, 'matchupEntry.matchup.id') === get(matchup, 'id');\n  }\n}\n","import { TAB } from './keycodes';\n\nconst focusableSelector = [\n  'button:not(:disabled)',\n  'a[href]',\n  'area[href]',\n  'input:not(:disabled)',\n  'select:not(:disabled)',\n  'textarea:not(:disabled)',\n  'iframe',\n  'object',\n  'embed',\n  '[contenteditable]',\n  '[tabindex]:not([tabindex=\"-1\"])',\n  '[role=\"button\"]',\n].join(', ');\n\nexport const focusFirstIn = el => {\n  if (!el) {\n    return;\n  }\n  (el.querySelector(focusableSelector) || el).focus();\n};\n\n// dir: 1 (next) | -1 (previous)\nconst focusNextPrevIn = dir => el => {\n  const focusableElements = [...el.querySelectorAll(focusableSelector)];\n  const focusIndex = focusableElements.indexOf(document.activeElement);\n  const wasNotFocusedInModal = focusIndex < 0;\n  const isFocusedAtBounds = dir > 0 ? focusIndex === focusableElements.length - 1 : focusIndex === 0;\n\n  if (wasNotFocusedInModal) {\n    return focusFirstIn(el);\n  }\n\n  // This \"wraps\" at the beginning/end.\n  if (isFocusedAtBounds) {\n    if (dir > 0) {\n      return focusFirstIn(el);\n    }\n    if (dir < 0) {\n      return (focusableElements[focusableElements.length - 1] || el).focus();\n    }\n  }\n\n  return focusableElements[focusIndex + dir].focus();\n};\nexport const focusNextIn = focusNextPrevIn(1);\nexport const focusPreviousIn = focusNextPrevIn(-1);\n\n/**\n * @class FocusConstrainer\n * @property {HTMLElement?} lastFocus\n */\nexport class FocusConstrainer {\n  /**\n   * @param {HTMLElement} element\n   * @returns {FocusConstrainer}\n   */\n  constructor(element) {\n    this.element = element;\n    this.lastFocus = null;\n    this.keydownListener = this.keydownListener.bind(this);\n    return this;\n  }\n\n  /**\n   * When the modal is inserted, it listens for attempted TAB keydowns. This\n   * function only fires when the user tries to TAB to an element. When the\n   * user tries to TAB to an element, this listener focuses the next focusable\n   * element inside the modal, and at the end, we \"wrap\" their focus back to the\n   * first focusable element in the modal.\n   *\n   * This ensures that users cannot \"lose\" their focus behind the modal by\n   * focusing on something that's covered up. It also ensures that if we're in\n   * an iframe, the user can't \"jump\" out of the iframe using TAB.\n   *\n   * @param {KeydownEvent}\n   * @private\n   */\n  keydownListener(event) {\n    if (event.keyCode === TAB) {\n      event.preventDefault();\n      event.stopPropagation();\n      event.shiftKey ? focusPreviousIn(this.element) : focusNextIn(this.element);\n      return false;\n    }\n    return true;\n  }\n\n  /**\n   * @param {HTMLElement} element\n   * @returns {FocusConstrainer}\n   * @public\n   */\n  configure(element) {\n    this.element = element;\n    return this;\n  }\n\n  /**\n   * @public\n   * @returns {FocusConstrainer}\n   */\n  begin() {\n    this.lastFocus = document.activeElement || null;\n    // For the reasons documented at `keydownListener`, move focus to the modal\n    focusFirstIn(this.element);\n    document.addEventListener('keydown', this.keydownListener);\n    return this;\n  }\n\n  /**\n   * @public\n   * @returns {FocusConstrainer}\n   */\n  end() {\n    document.removeEventListener('keydown', this.keydownListener);\n    this.lastFocus && this.lastFocus.focus();\n    return this;\n  }\n}\n\n/**\n * @class KeyListener\n */\nexport class KeyListener {\n  /**\n   * @param {Object<string, (KeyboardEvent) => null>} [config]\n   * @returns {KeyListener}\n   */\n  constructor(config = {}) {\n    this.listeners = config;\n    this.keycodeListener = this.keycodeListener.bind(this);\n    return this;\n  }\n\n  /**\n   * @private\n   * @param {KeyboardEvent} [event]\n   */\n  keycodeListener(event) {\n    if (this.listeners[event.keyCode]) {\n      this.listeners[event.keyCode](event);\n    }\n  }\n\n  /**\n   * @param {Object<string, (KeyboardEvent) => null>} [config]\n   * @returns {KeyListener}\n   * @public\n   */\n  configure(config = {}) {\n    this.listeners = config;\n    return this;\n  }\n\n  /**\n   * @returns {KeyListener}\n   * @public\n   */\n  begin() {\n    document.addEventListener('keydown', this.keycodeListener);\n    return this;\n  }\n\n  /**\n   * @returns {KeyListener}\n   * @public\n   */\n  end() {\n    document.removeEventListener('keydown', this.keycodeListener);\n    return this;\n  }\n}\n","/**\n * Crappy logic for a crappy problem of browser detection.\n * Taken straight from: http://stackoverflow.com/questions/5916900/detect-version-of-browser\n * @returns {String}\n */\nexport default function browserVersion() {\n  const ua = navigator.userAgent;\n  let tem = null;\n\n  let M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n  if (/trident/i.test(M[1])) {\n    tem = /\\brv[ :]+(\\d+)/g.exec(ua) || [];\n    return `IE ${tem[1] || ''}`;\n  }\n  if (M[1] === 'Chrome') {\n    tem = ua.match(/\\bOPR\\/(\\d+)/);\n    if (tem !== null) {\n      return `Opera ${tem[1]}`;\n    }\n  }\n  M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];\n  if ((tem = ua.match(/version\\/(\\d+)/i)) !== null) {\n    M.splice(1, 1, tem[1]);\n  }\n  return M.join(' ');\n}\n","import { computed, get } from '@ember/object';\n\n/**\n * For a given array, determine whether the current date falls between the supplied start and end date values.\n *\n * @param arrayPath {String} - The array holding the objects or values you want to search\n * @param beginDatePath {String} - The property containing the start date\n * @param endDatePath {String} - The property containing the end date\n */\nexport const isNowBetweenAnyDates = (arrayPath, beginDatePath, endDatePath) =>\n  computed(`${arrayPath}.@each.{${beginDatePath},${endDatePath}}`, function () {\n    const arr = get(this, arrayPath) || [];\n    const now = new Date();\n    return arr.some(item => now >= get(item, beginDatePath) && now <= get(item, endDatePath));\n  });\n\nexport default {\n  isNowBetweenAnyDates,\n};\n","import ConfigUtil from 'consumer/utils/config';\n\nexport default ConfigUtil;\n","export * from 'consumer/utils/encode';\n","import fixColorContrast from 'consumer/utils/fix-color-contrast';\n\nexport default fixColorContrast;\n","/*!\n * Based on David J Bradshaw's iFrame Resizer\n * https://github.com/davidjbradshaw/iframe-resizer/\n * Copyright © 2013-14 David J. Bradshaw. Licensed under the MIT license.\n */\nconst base = 10;\n// document.documentElement.offsetHeight is not reliable, so\n// we have to jump through hoops to get a better value.\nfunction getBodyOffsetHeight() {\n  function getComputedBodyStyle(prop) {\n    function convertUnitsToPxForIE8(value) {\n      const PIXEL = /^\\d+(px)?$/i;\n\n      if (PIXEL.test(value)) {\n        return parseInt(value, base);\n      }\n\n      const style = el.style.left;\n      const runtimeStyle = el.runtimeStyle.left;\n\n      el.runtimeStyle.left = el.currentStyle.left;\n      el.style.left = value || 0;\n      value = el.style.pixelLeft;\n      el.style.left = style;\n      el.runtimeStyle.left = runtimeStyle;\n\n      return value;\n    }\n\n    const el = document.body;\n    let retVal = 0;\n\n    if ('defaultView' in document && 'getComputedStyle' in document.defaultView) {\n      retVal = document.defaultView.getComputedStyle(el, null);\n      retVal = retVal !== null ? retVal[prop] : 0;\n    } else {\n      //IE8\n      retVal = convertUnitsToPxForIE8(el.currentStyle[prop]);\n    }\n\n    return parseInt(retVal, base);\n  }\n\n  return document.body.offsetHeight + getComputedBodyStyle('marginTop') + getComputedBodyStyle('marginBottom');\n}\n\nfunction getBodyScrollHeight() {\n  return document.body.scrollHeight;\n}\n\nfunction getDEOffsetHeight() {\n  return document.documentElement.offsetHeight;\n}\n\nfunction getDEScrollHeight() {\n  return document.documentElement.scrollHeight;\n}\n\n//From https://github.com/guardian/iframe-messenger\nfunction getLowestElementHeight() {\n  const allElements = document.querySelectorAll('body *');\n  const allElementsLength = allElements.length;\n  let maxBottomVal = 0;\n\n  for (let i = 0; i < allElementsLength; i++) {\n    if (allElements[i].getBoundingClientRect().bottom > maxBottomVal) {\n      maxBottomVal = allElements[i].getBoundingClientRect().bottom;\n    }\n  }\n\n  return maxBottomVal;\n}\n\nfunction getAllHeights() {\n  return [getBodyOffsetHeight(), getBodyScrollHeight(), getDEOffsetHeight(), getDEScrollHeight()];\n}\n\nfunction getMaxHeight() {\n  return Math.max.apply(null, getAllHeights());\n}\n\nfunction getMinHeight() {\n  return Math.min.apply(null, getAllHeights());\n}\n\nfunction getBestHeight() {\n  return Math.max(getBodyOffsetHeight(), getLowestElementHeight());\n}\n\nexport const offset = getBodyOffsetHeight; //Backward compatability\nexport const bodyOffset = getBodyOffsetHeight;\nexport const bodyScroll = getBodyScrollHeight;\nexport const documentElementOffset = getDEOffsetHeight;\nexport const documentScroll = getDEScrollHeight; //Backward compatability\nexport const documentElementScroll = getDEScrollHeight;\nexport const max = getMaxHeight;\nexport const min = getMinHeight;\nexport const grow = getMaxHeight;\nexport const lowestElement = getBestHeight;\n","export const BACKSPACE = 8;\nexport const TAB = 9;\nexport const ENTER = 13;\nexport const SHIFT = 16;\nexport const CTRL = 17;\nexport const ALT = 18;\nexport const PAUSE_BREAK = 19;\nexport const CAPS_LOCK = 20;\nexport const ESC = 27;\nexport const SPACE = 32;\nexport const PAGE_UP = 33;\nexport const PAGE_DOWN = 34;\nexport const END = 35;\nexport const HOME = 36;\nexport const LEFT = 37;\nexport const UP = 38;\nexport const RIGHT = 39;\nexport const DOWN = 40;\nexport const INSERT = 45;\nexport const DELETE = 46;\nexport const COMMAND = 91;\nexport const LEFT_COMMAND = 91;\nexport const RIGHT_COMMAND = 93;\nexport const NUMPAD_ASTERISK = 106;\nexport const NUMPAD_PLUS = 107;\nexport const NUMPAB_MINUS = 109;\nexport const NUMPAD_DOT = 110;\nexport const NUMPAD_SLASH = 111;\nexport const NUM_LOCK = 144;\nexport const SCROLL_LOCK = 145;\nexport const MY_COMPUTER = 182;\nexport const MY_CALCULATOR = 183;\nexport const SEMICOLON = 186; // ;\nexport const EQUALS = 187; // =\nexport const COMMA = 188; // ,\nexport const MINUS = 189; // -\nexport const DOT = 190; // .\nexport const SLASH = 191; // /\nexport const GRAVE = 192; // `\nexport const LEFT_BRACKET = 219; // [\nexport const BACKSLASH = 220; // \\\nexport const RIGHT_BRACKET = 221; // ]\nexport const QUOTE = 222; // '\n","import rootUrl from '../utils/root-url';\n\n/**\n * Returns the local window url excluding any additional routing or parameters.\n * @returns {String}\n */\nexport default function localFullUrl() {\n  if (window.location.origin) {\n    return window.location.origin + rootUrl();\n  }\n\n  const origin = `${window.location.protocol}//${window.location.hostname}${\n    window.location.port ? `:${window.location.port}` : ''\n  }`;\n\n  return origin + rootUrl();\n}\n","import { firstObject } from 'secondstreet-common/utils/array';\nimport { isEmpty } from '@ember/utils';\nimport { lastObject } from 'secondstreet-common/utils/array';\n\n// TODO: Use the model type once converted to TypeScript\ntype MatchupModel = {\n  id: string;\n  startDate: Date;\n  endDate?: Date;\n};\n\nexport function currentMatchup(matchups: MatchupModel[]) {\n  const now = new Date();\n\n  const relevantMatchups = matchups.map(matchup => {\n    const { startDate, endDate } = matchup;\n\n    // Best choice is whatever, because there should always be either 0 or 1 possible current round.\n    return !endDate || (startDate < now && endDate > now) ? matchup : null;\n  });\n\n  return firstObject(relevantMatchups.filter(matchup => !isEmpty(matchup))) || null;\n}\n\nexport function mostRecentMatchup(matchups: MatchupModel[]) {\n  const now = new Date();\n\n  return lastObject(\n    matchups.filter(matchup => matchup.startDate < now).sort((a, b) => a.startDate.getTime() - b.startDate.getTime())\n  );\n}\n","import { get } from '@ember/object';\n\n/**\n * Determines the correct matchup to show the user based on the current state of the contest.\n * Prefer the current matchup. If we're between rounds, prefer the soonest to begin. If we're after the contest, simply show the last.\n * @param matchups {Matchup[]}\n * @returns {Matchup}\n */\nexport default function mostCurrentMatchup(matchups) {\n  const today = new Date();\n  const sortedMatchups = matchups.sortBy('startDate');\n  const currentMatchup = sortedMatchups.find(\n    matchup => today >= get(matchup, 'startDate') && today <= get(matchup, 'endDate')\n  );\n  if (currentMatchup) {\n    return currentMatchup;\n  }\n  const nextMatchup = sortedMatchups.find(matchup => today < get(matchup, 'startDate'));\n  if (nextMatchup) {\n    return nextMatchup;\n  }\n  return get(sortedMatchups.reverse(), 'lastObject');\n}\n","import { Promise as EmberPromise } from 'rsvp';\n\nexport const wait = function (ms) {\n  return new EmberPromise(resolve => window.setTimeout(resolve, ms));\n};\n\nexport default { wait };\n","import config from '../config/environment';\nimport isLocalhost from 'secondstreet-common/utils/is-localhost';\n\n// Warning: When making changes to this function, make sure you test\n// in the facebook in-app browser on a mobile phone.\nexport default function rootUrl() {\n  let match = window.location.pathname.match(/(\\/embed\\/([A-Za-z0-9-]+)\\/)/i);\n  if (match) {\n    return match[1];\n  }\n\n  match = window.location.href.match(/facebook.+\\.secondstreetapp\\.com(\\/\\d+\\/)/);\n  if (match) {\n    return match[1];\n  }\n\n  if (isLocalhost()) {\n    return `/${window.location.href.split('/').slice(3, 4).join('/')}/`;\n  }\n\n  if (config.APP.config.organizationPromotionUniqueId) {\n    return '/';\n  }\n\n  throw new Error('Could not determine which promotion to use.');\n}\n","//NOTE: This is duplicate code found also in ss-consumer-entry-showcase\n\nimport EmberObject from '@ember/object';\n\nexport default function (meta) {\n  let metaFix;\n  if (meta) {\n    // Work around bug in Ember Data Beta 9 that leads to objects with no prototype coming back from metadataFor\n    // https://github.com/emberjs/data/commit/f376db36f33fcd67793931f4d8cf2926956a8183\n    metaFix = {};\n    for (const key in meta) {\n      metaFix[key] = meta[key];\n    } // jshint ignore:line\n    // DS.Store.metadataFor ONLY returns simple js objects, we need a Ember.Object\n    return EmberObject.create(metaFix);\n  }\n  return null;\n}\n","import theDefault from 'consumer/utils/talker';\nexport * from 'consumer/utils/talker';\nexport default theDefault;\n","define('consumer-sweepstakes/config/environment', [], function() {\n  var prefix = 'consumer-sweepstakes';\ntry {\n  var metaName = prefix + '/config/environment';\n  var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n  var config = JSON.parse(decodeURIComponent(rawConfig));\n\n  var exports = { 'default': config };\n\n  Object.defineProperty(exports, '__esModule', { value: true });\n\n  return exports;\n}\ncatch(err) {\n  throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n});\n","\n          if (!runningTests) {\n            require(\"consumer-sweepstakes/app\")[\"default\"].create({\"config\":{\"apiKey\":65032887,\"apiHost\":\"\",\"assetHost\":\"\",\"apiNamespace\":\"api\"},\"rootElement\":\".ssAppContentAreaContent\",\"name\":\"consumer-sweepstakes\",\"version\":\"0.0.0+c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