{"size": 269244, "ext": "js", "max_stars_repo_path": "public/images/(3) Jay Tseng_files/bQLqXNeAr2Z.js", "max_stars_repo_name": "jay-tseng/Personal-App-1", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/images/(3) Jay Tseng_files/bQLqXNeAr2Z.js", "max_issues_repo_name": "jay-tseng/Personal-App-1", "max_issues_repo_issues_event_min_datetime": "2020-07-17T10:35:19.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-09T08:58:26.000Z", "max_forks_repo_path": "public/images/(3) Jay Tseng_files/bQLqXNeAr2Z.js", "max_forks_repo_name": "jay-tseng/Personal-App-1", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 2361.7894736842, "max_line_length": 33927, "alphanum_fraction": 0.8168167164}
if (self.CavalryLogger) { CavalryLogger.start_js(["cQd\/3"]); }

__d("AdsBisonUtils",["AdsAPIBidStrategies","AdsAPIOptimizationGoals","BinarySearch"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=2.5,h=2,i=6,j={getReachEstimateByBudget:function(a,b,c,d,e){__p&&__p();e===void 0&&(e=!1);var f=this.getEmptyPoint();if(b<=0)return f;if(!a||a.length===0||!a[0])return f;if(e)return this.getReachEstimateByTargetCPA(a,b,c);(d||!c)&&(c=Number.MAX_SAFE_INTEGER);for(e=0;e<a.length;e++)if(a[e].spend>b||c&&a[e].bid>c)break;if(e===0){d=a[0];var g=b/d.spend;c&&(g=Math.min(g,c/d.bid));g=g*d.spend;return this.interpolatePoint(g,f,d,"spend")}if(e===a.length)return a[a.length-1];g=a[e-1];f=a[e];d=(b-g.spend)/(f.spend-g.spend);c&&(d=Math.min(d,(c-g.bid)/(f.bid-g.bid)));a=g.spend+d*(f.spend-g.spend);return this.interpolatePoint(a,g,f,"spend")},interpolateCBOCampaignGroupByBudget:function(a,b){var c=this.getEmptyPoint();if(a==null||a.length===0)return c;if(b>a[a.length-1].spend)return a[a.length-1];c=this.interpolateCBOOutcome(a,null,b);return c},interpolateCBOOutcome:function(a,b,c){var d=this.getEmptyPoint(),e;for(var f=0;f<a.length-1;f++){if(a[f].spend>c||c>a[f+1].spend)continue;e=a[f+1].spend-a[f].spend==0?0:(c-a[f].spend)/(a[f+1].spend-a[f].spend);d=this.interpolatedPointOnSelectedCampaignCurve(e,f,f+1,(e=b)!=null?e:a)}return d},interpolateCBOCampaignByBudget:function(a,c,d,e){var f=this.getEmptyPoint();if(e!==b("AdsAPIBidStrategies").LOWEST_COST_WITHOUT_CAP)return f;if(a==null||a.length===0||c==null||c.length===0)return f;if(d>a[a.length-1].spend)return c[c.length-1];f=this.interpolateCBOOutcome(a,c,d);return f},interpolatedPointOnSelectedCampaignCurve:function(a,b,c,d){var e=d[b],f=d[c];b=function(b){return e[b]==null||f[b]==null?0:e[b]+a*(f[b]-e[b])};d=j.getEmptyPoint();for(var g in d)d[g]=b(g);return d},getInterpolatedPointByTargetCPA:function(a,b){__p&&__p();var c=this.getEmptyPoint();if(!b||b<=0)return c;var d;for(d=0;d<a.length;d++){var e=a[d].spend,f=a[d].actions;if(f!==0&&e/f>=b)break}e=Object.assign({},a[a.length-1]);if(d<a.length){f=d===0?c:a[d-1];c=a[d];a=f.spend;d=c.spend;var g=f.actions,h=c.actions,i=b*g-a;b=b*(g-h)-(a-d);g=b>0?i/b:0;h=a+g*(d-a);e=this.interpolatePoint(h,f,c,"spend")}return e},getReachEstimateByTargetCPA:function(a,b,c){a=this.getInterpolatedPointByTargetCPA(a,c);return j.scalePointByBudgetFactor(a,b)},getReachEstimateForBidStrategy:function(a,c,d,e){switch(e){case b("AdsAPIBidStrategies").LOWEST_COST_WITHOUT_CAP:return j.getReachEstimateByBudget(a,c,d,!0,!1);case b("AdsAPIBidStrategies").TARGET_COST:return j.getReachEstimateByBudget(a,c,d,!1,!0);case b("AdsAPIBidStrategies").LOWEST_COST_WITH_BID_CAP:return j.getReachEstimateByBudget(a,c,d,!1,!1);case b("AdsAPIBidStrategies").COST_CAP:return j.getReachEstimateForCostCap(a,c,d);default:return this.getEmptyPoint()}},getBoundsWithErrorPrediction:function(a,b,c,d,e){b<0&&(b=2*a);if(e)return{max:d||b,mid:a,min:c||0};else{e=Math.max(c||0,a/g);c=Math.min(d||Number.MAX_SAFE_INTEGER,Math.min(a*g,b));e=Math.max(0,Math.min(a-i/2,e));c=Math.max(e+i,c);return{max:c,mid:a,min:e}}},getLastAcceptableConfidence:function(a,b){if(!Array.isArray(a)||a.length==0)return j.getEmptyPoint();var c=b==="reach"?"predicted_errors_reach":"predicted_errors_conversions";b=a.findIndex(function(a){return a[c]>g});b=b>0?a[b-1]:a[a.length-1];return b},checkBudgetConfidenceMultiplier:function(a,b,c){__p&&__p();if(!Array.isArray(a)||a.length<2)return!1;var d=b==="reach"?"predicted_errors_reach":"predicted_errors_conversions";b=a.findIndex(function(a){return a[d]>g});if(b<=0)return!0;var e=h*c;if(a[b-1].spend>e)return!0;else if(a[b].spend<e)return!1;else{b=j.getPointFromSpend(h*c,a);return b[d]<g}},getPointFromSpend:function(a,c){__p&&__p();if(c.length===0)return j.getEmptyPoint();var d=j.getEmptyPoint();d.spend=a;d=b("BinarySearch").findBoundInArray(c,d,function(a,b){return a.spend-b.spend},b("BinarySearch").LEAST_UPPER_BOUND);if(d>=c.length)return c[c.length-1];var e=d===0?j.getEmptyPoint():c[d-1];c=c[d];return j.interpolatePoint(a,e,c,"spend")},interpolatePoint:function(a,b,c,d){__p&&__p();var e=b[d],f=c[d];if(e===f)return b;d=function(d){if(b[d]==null||c[d]==null)return 0;var g=(c[d]-b[d])/(f-e);return b[d]+g*(a-e)};var g=j.getEmptyPoint();for(var h in g)g[h]=d(h);return g},scalePointByBudgetFactor:function(a,b){var c=b<a.spend?b/a.spend:1;for(var d in a)a[d]==null?a[d]=0:d==="spend"?a[d]=Math.min(a[d],b):d!=="bid"&&(a[d]*=c);return a},getLastPointOfEstimate:function(a,b){b=(b=b)!=null?b:a.daily_outcomes_curve;return b.length===0?this.getEmptyPoint():b[b.length-1]},getLastPointPredictionForCampaign:function(a){a=a.curve;return!a||a.length===0?this.getEmptyPoint():a[a.length-1]},getEmptyPoint:function(){return{actions:0,bid:0,impressions:0,reach:0,spend:0,predicted_errors_conversions:1,predicted_errors_reach:1,reach_lower_bound:0,reach_upper_bound:0,actions_lower_bound:0,actions_upper_bound:0}},getEstimatedCVR:function(a,b){return b===0?0:a/b},shouldShowActions:function(a,c){switch(a){case b("AdsAPIOptimizationGoals").APP_INSTALLS:case b("AdsAPIOptimizationGoals").EVENT_RESPONSES:case b("AdsAPIOptimizationGoals").LANDING_PAGE_VIEWS:case b("AdsAPIOptimizationGoals").LEAD_GENERATION:case b("AdsAPIOptimizationGoals").LINK_CLICKS:case b("AdsAPIOptimizationGoals").OFFER_CLAIMS:case b("AdsAPIOptimizationGoals").OFFSITE_CONVERSIONS:case b("AdsAPIOptimizationGoals").PAGE_ENGAGEMENT:case b("AdsAPIOptimizationGoals").PAGE_LIKES:case b("AdsAPIOptimizationGoals").POST_ENGAGEMENT:case b("AdsAPIOptimizationGoals").VIDEO_VIEWS:return!0;case b("AdsAPIOptimizationGoals").THRUPLAY:case b("AdsAPIOptimizationGoals").TWO_SECOND_CONTINUOUS_VIDEO_VIEWS:return c;default:return!1}},getReachEstimateForCostCap:function(a,b,c){__p&&__p();var d=this.getEmptyPoint();if(b<=0)return d;if(!a||a.length===0||!a[0])return d;if(!c)return d;var e;for(e=0;e<a.length;e++)if(a[e].spend>b)break;if(e===0){var f=a[0];d=this.interpolatePoint(b,d,f,"spend")}else if(e===a.length)d=a[a.length-1];else{f=a[e-1];e=a[e];d=this.interpolatePoint(b,f,e,"spend")}b=d.spend/d.actions;f=c>=b;return f?d:this.getInterpolatedPointByTargetCPA(a,c)}};e.exports=j}),null);
__d("BoostedComponentConstraintStoreData",["BoostedComponentBaseStoreData","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={blacklist_countries:b("immutable").List([]),max_age:0,max_city_num:0,max_country_num:0,max_daily_budget:0,max_lifetime_budget_per_day:0,max_monthly_budget:0,max_region_num:0,min_age:0,min_call_now_age:0,min_daily_budget:0,min_lifetime_budget:0,min_lifetime_budget_per_day:0,suggested_min_daily_budget:0,suggested_min_lifetime_budget:0,whitelist_countries:b("immutable").List([])};c=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getMaxAge=function(){return this.max_age};c.getMinAge=function(){return this.min_age};c.getBlacklistCountries=function(){return this.blacklist_countries};c.getWhitelistCountries=function(){return this.whitelist_countries};c.getMaxDailyBudget=function(){return this.max_daily_budget};c.getMaxLifetimeBudgetPerDay=function(){return this.max_lifetime_budget_per_day};c.getMinDailyBudget=function(){return this.min_daily_budget};c.getMinLifetimeBudget=function(){return this.min_lifetime_budget};c.getMinLifetimeBudgetPerDay=function(){return this.min_lifetime_budget_per_day};c.getSuggestedMinLifetimeBudget=function(){return this.suggested_min_lifetime_budget};c.getMinCallNowAge=function(){return this.min_call_now_age};return b}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("AdsLWIAdAccountInfoField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ID:"accountID",NAME:"name",CURRENCY:"currency",HAS_ADMIN_PERMISSION:"hasAdminPermission",HAS_BILLING_WRITE_PERMISSION:"hasBillingWritePermission",HAS_CREATED_ADS_BEFORE:"hasCreatedAdsBefore",PAYMENT_INFO:"paymentInfo",CAN_UPDATE_CURRENCY:"canUpdateCurrency",TOS_ACCEPTED:"tos_accepted",OFFSITE_PIXELS_TOS_ACCEPTED:"offsitePixelsTOSAccepted",STATUS:"status",BALANCE:"balance",TIMEZONE_ID:"timezone_id",EMAIL:"email",SPEND_CAP:"spend_cap",AMOUNT_SPENT:"amount_spent",AUTHORIZED_FOR_POLITICAL_ADS:"authorizedForPoliticalAds",AD_ACCOUNT_COUNTRY_FOR_POLITICAL_ADS:"adAccountCountryForPoliticalAds",ELIGIBLE_FOR_ASSET_ONBOARDING:"eligible_for_asset_onboarding",TAX_ID:"tax_id"})}),null);
__d("AdsLWIBusinessInfoField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ID:"id",PAYMENT_ACCOUNT_ID:"paymentAccountID",NAME:"name"})}),null);
__d("AdsLWICheckoutInfoField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({CHECKOUT_AD_CREDIT:"checkout_ad_credit",CHECKOUT_STATE:"checkout_state",GRADUATION_REASON:"graduation_reason",SHOULD_DISPLAY_GRADUATION_HOOKS:"should_display_graduation_hooks"})}),null);
__d("AdsLWICouponInfoField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({BALANCE:"balance",EXPIRY:"expiry"})}),null);
__d("AdsLWIPaymentInfoField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({AD_COUPON:"adCoupon",BUSINESS_INFO:"businessInfo",CHECKOUT_INFO:"checkout_info",EXTENDED_CREDIT_INFO:"extendedCreditInfo",EXTENDED_CREDIT_STATUS:"extendedCreditStatus",FUNDING_SOURCE_STRING:"fundingSourceString",HAS_CREDIT:"hasCredit",HAS_FUNDING_SOURCE:"hasFundingSource",ID:"id",IS_CORPORATE_ACCOUNT:"isCorporateAccount",IS_PREPAY_ACCOUNT:"isPrepayAccount",PAYMENT_METHODS:"paymentMethods",PENDING_PAYMENTS:"pendingPayments",PREPAY_BALANCE:"prepayBalance",PRIMARY_PAYMENT_METHOD:"primaryPaymentMethod",TAX_RATE:"taxRate",TAX_COUNTRY:"taxCountry",INDIA_CURRENCY_RESTRICTION:"indiaCurrencyRestriction"})}),null);
__d("AdsLWIPrepayBalanceField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({AMOUNT:"amount",CURRENCY:"currency"})}),null);
__d("PartnerIntegrationSelectedAdAccountIDReducerPlugin",[],(function(a,b,c,d,e,f){"use strict";a={reduce:function(a,b){return b.accountID}};e.exports=a}),null);
__d("BoostedComponentAdAccountStoreData",["AdsLWIAdAccountRecord","AdsLWIPaymentInfoField","AdsPaymentName","BoostedComponentBaseStoreData","FBLogger","PartnerIntegrationSelectedAdAccountIDAction","immutable","setImmediate"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={accounts:b("immutable").Map(),disableAdAccountSelector:!1,selectedAccountID:"",defaultAccountID:"",businessID:""};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getAccounts=function(){return this.accounts};d.getAdAccountNameByID=function(a){a=this.accounts.get(a);return a?a.get("name"):null};d.getAdAccountSpendCapByID=function(a){a=this.accounts.get(a);return a?a.get("spend_cap"):null};d.getAdAccountAmountSpentByID=function(a){a=this.accounts.get(a);return a?a.get("amount_spent"):null};d.getSelectedAccountID=function(){return this.selectedAccountID};d.getSelectedAccountData=function(){var a=this.accounts.get(this.selectedAccountID);a||b("FBLogger")("boosted_component").warn("Failed getting selected ad account data, selected account ID: %s",this.selectedAccountID);return a||new(b("AdsLWIAdAccountRecord"))()};d.getSelectedAccountName=function(){return this.getSelectedAccountData().get("name")};d.getSelectedAccountSpendCap=function(){return this.getSelectedAccountData().get("spend_cap")};d.getSelectedAccountAmountSpent=function(){return this.getSelectedAccountData().get("amount_spent")};d.getSelectedAccountHasBillingWritePermission=function(){return this.getSelectedAccountData().get("hasBillingWritePermission")};d.getSelectedAccountTimezoneID=function(){return this.getSelectedAccountData().get("timezone_id")};d.getSelectedAccountStatus=function(){return this.getSelectedAccountData().get("status")};d.getCurrency=function(){return this.getSelectedAccountData().get("currency")||""};d.getPaymentInfo=function(){return this.getSelectedAccountData().get("paymentInfo")||b("immutable").Map()};d.getSelectedAccountPrimaryPMDisplayString=function(){return b("AdsPaymentName").getPaymentName(this.getPaymentInfo().toJS(),!1)};d.getSelectedAccountHasFundingSource=function(){var a=this.getSelectedAccountData().get("paymentInfo");return!!a.get("hasFundingSource")};d.getSelectedAccountFundingSourceString=function(){return this.getPaymentInfo().get(b("AdsLWIPaymentInfoField").FUNDING_SOURCE_STRING)};d.getAccountEmail=function(){return this.getSelectedAccountData().get("email")};d.getIsAccountAuthorizedForPoliticalAds=function(){return this.getSelectedAccountData().get("authorizedForPoliticalAds")||!1};d.isAdAccountSelectorDisabled=function(){return this.disableAdAccountSelector&&!!this.selectedAccountID};d.setDisableAdAccountSelector=function(a){return this.set("disableAdAccountSelector",a)};d.canUpdateCurrency=function(){return!!this.getSelectedAccountData().get("canUpdateCurrency")};d.setSelectedAccountID=function(a){if(this.isAdAccountSelectorDisabled())return this;b("setImmediate")(function(){return b("PartnerIntegrationSelectedAdAccountIDAction").dispatch({accountID:a},{line:"161",module:"BoostedComponentAdAccountStoreData.js"})});return this.set("selectedAccountID",a)};d.setSelectedAccountInfo=function(a,b){if(!this.dataLoaded)return this;var c=this.getAccounts();c=c.set(a,b);return this.set("accounts",c)};d.setSelectedAccountSpendCap=function(a){a=this.getSelectedAccountData().set("spend_cap",a);a=this.accounts.set(this.selectedAccountID,a);return this.set("accounts",a)};d.resetSelectedAccountAmountSpent=function(){var a=this.getSelectedAccountData().set("amount_spent",0);a=this.accounts.set(this.selectedAccountID,a);return this.set("accounts",a)};d.setCurrency=function(a){a=this.getSelectedAccountData().set("currency",a);a=this.accounts.set(this.selectedAccountID,a);return this.set("accounts",a)};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("PromotionsHubCommonActionTypes",["keyMirror"],(function(a,b,c,d,e,f){"use strict";a=b("keyMirror")({SET_ACTIVE_NAVIGATION_SECTION:"",SET_PAGE_ID_AND_ENTRY_POINT:"",SET_SELECTED_AD_ACCOUNT:""});e.exports=a}),null);
__d("AdsLWISpecsStoreDataProviderPlugin",["immutable"],(function(a,b,c,d,e,f){"use strict";a={initialState:b("immutable").Map()};e.exports=a}),null);
__d("AdsLWIPackageBudgetConstraintDataProviderPlugin",["AdsLWIPackageBudgetConstraintDataRecord"],(function(a,b,c,d,e,f){"use strict";a={initialState:new(b("AdsLWIPackageBudgetConstraintDataRecord"))()};e.exports=a}),null);
__d("XAdsLWIRecommendationDataController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ads_lwi/fetch_recommendation_data/",{page_id:{type:"FBID",required:!0}})}),null);
__d("AdsLWIRecommendationDataProviderPlugin",["Promise","AdsLWIPackagePromotionDataRecord","AdsLWIProductDataRecord","AdsLWIRecommendationDataRecord","AdsLWIRecommendedPackageDataRecord","AsyncRequest","FBLogger","LoadObjectMap","LoadObjectMapMutationUtil","XAdsLWIRecommendationDataController","immutable","promiseDone","promiseLoadObjectsFromKeys","uuid"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a){__p&&__p();return new(b("Promise"))(function(c,d){return b("XAdsLWIRecommendationDataController").getURIBuilder().setFBID("page_id",a).getRequest(new(b("AsyncRequest"))()).setPayloadHandler(c).setErrorHandler(d).send()}).then(function(a){var c=b("immutable").fromJS(a.recommendedPackages);if(c.size===0)return new(b("AdsLWIRecommendationDataRecord"))();c=c.map(function(a){return new(b("AdsLWIRecommendedPackageDataRecord"))({recommendedPackage:b("immutable").OrderedMap(a.map(function(a){return[b("uuid")(),new(b("AdsLWIPackagePromotionDataRecord"))({objective:a.objective,ctaType:a.ctaType})]}))})});return new(b("AdsLWIRecommendationDataRecord"))({recommendedAAPackageList:c,recommendedLWIPromotionList:b("immutable").fromJS(a.recommendedLWIProductList).map(function(a){return new(b("AdsLWIProductDataRecord"))({description:a.description,objective:a.objective,product:a.product,targetID:a.target_id,title:a.title})}),selectedAAPackage:c.first(),selectedAAPromotionID:c.first().get("recommendedPackage").keySeq().first(),selectedLWIPromotion:null})},function(a){b("FBLogger")("boosted_component").catching(a.toError()).mustfix("Unable to fetch recommendation information");return null})}a={initialState:function(a){return b("LoadObjectMap").create(function(c){a(function(a){return b("LoadObjectMapMutationUtil").setValueListToLoading(a,c)}),b("promiseDone")(b("promiseLoadObjectsFromKeys")(c,g),function(b){a(function(a){return a.merge(b)})})})}};e.exports=a}),null);
__d("BoostedComponentPackageQuestions",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({BUSINESS_CATEGORIES:"business_categories",CUSTOMER_INTERESTS:"customer_interests",COMPLETE_TRANSACTION:"complete_transaction",CONTACT_METHOD:"contact_method",HAS_LEAD_GEN_FORM:"has_lead_gen_form",HAS_LOCAL_BUSINESS:"has_local_business",NEEDS_CUSTOMER_CONTACT:"needs_customer_contact",BUSINESS_WEBSITE:"business_website",CONTACT_METHODS_APPLIED:"contact_methods_applied",LOCAL_BUSINESS:"local_business",INFO_COLLECTION:"info_collection",NEEDS_CONTACT:"needs_contact",WEBSITE_INFO_COLLECTION:"website_info_collection",WEBSITE_PRODUCTS:"website_products",WEBSITE_SERVICE:"website_service"})}),null);
__d("XAdsLWIQuestionnaireDataController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ads_lwi/fetch_questionnaire_data/",{page_id:{type:"FBID",required:!0}})}),null);
__d("AdsLWIQuestionnaireDataProviderPlugin",["Promise","AdsLWIQuestionStoreDataRecord","AsyncRequest","BoostedComponentPackageQuestions","FBLogger","LoadObjectMap","LoadObjectMapMutationUtil","SearchableEntry","XAdsLWIQuestionnaireDataController","immutable","promiseDone","promiseLoadObjectsFromKeys"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("BoostedComponentPackageQuestions").COMPLETE_TRANSACTION;function h(a){return new(b("Promise"))(function(c,d){return b("XAdsLWIQuestionnaireDataController").getURIBuilder().setFBID("page_id",a).getRequest(new(b("AsyncRequest"))()).setPayloadHandler(c).setErrorHandler(d).send()}).then(function(a){return new(b("AdsLWIQuestionStoreDataRecord"))({answeredQuestions:b("immutable").List(),currentPackageQuestion:g,customerInterests:b("immutable").Set(a.customerInterests&&a.customerInterests.map(function(a){return new(b("SearchableEntry"))({uniqueID:a.id,title:a.name})})),initialLocation:a.initialLocation,initialPhoneNumber:a.initialPhoneNumber,initialWebsiteURL:a.initialWebsiteURL,isEligibleForConversion:a.isEligibleForConversion,isEligibleForPackagePromotion:a.isEligibleForPackagePromotion,locationCountry:a.locationCountry,pageCategories:b("immutable").Set(a.pageCategories&&a.pageCategories.map(function(a){return new(b("SearchableEntry"))({uniqueID:a.id,title:a.name})})),phoneNumberError:null,recoverable:!0,selectionsForCompleteTransaction:b("immutable").List(a.selectionsForCompleteTransaction),selectionForContactMethod:a.selectionForContactMethod,selectionForHasLeadGenForm:a.selectionForHasLeadGenForm,selectionForHasLocalBusiness:a.selectionForHasLocalBusiness,selectionForNeedsCustomerContact:a.selectionForNeedsCustomerContact,urlErrors:b("immutable").List()})},function(a){b("FBLogger")("boosted_component").catching(a.toError()).mustfix("Unable to fetch questionnaire information");return null})}a={initialState:function(a){return b("LoadObjectMap").create(function(c){a(function(a){return b("LoadObjectMapMutationUtil").setValueListToLoading(a,c)}),b("promiseDone")(b("promiseLoadObjectsFromKeys")(c,h),function(b){a(function(a){return a.merge(b)})})})}};e.exports=a}),null);
__d("BoostedComponentCreativeCategory",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({VIDEO:"video",IMAGE:"image"})}),null);
__d("BoostedComponentValidationStrings",["fbt","AdsCallToActionTypes","BoostedComponentAppID"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h={NO_IMAGE_ERROR:g._("Please add an image."),NO_CREATIVE_BODY_ERROR:g._("Please write something about your ad in the text field."),NO_VIDEO_ERROR:g._("Please add a video."),NO_VIDEO_IN_AD_PREVIEW_ERROR:g._("You haven't added a video yet."),INVALID_URL_ERROR:g._("Please add a valid URL."),INVALID_FBURL_ERROR:g._("Your ad cannot promote a Facebook destination. Please add another URL."),INVALID_CTA_FBURL_ERROR:g._("Your ad cannot promote a Facebook destination. Please edit your call to action destination URL."),INVALID_WHATSAPP_NUMBER_ERROR:g._("Please add a valid WhatsApp number."),INVALID_WHATSAPP_BUSINESS_NUMBER_ERROR:g._("Please add a valid WhatsApp Business number."),PHONE_NUMBER_AGE_ERROR:g._("There are age restrictions in place for this type of promotion. You can only target people 18 years and older"),PHONE_NUMBER_TARGETING_COUNTRY_ERROR:g._("You can't target an entire country if you have a Call Now button on your post"),PHONE_NUMBER_NOT_VALID_ERROR:g._("Please make sure to provide a valid phone number."),PHONE_NUMBER_IS_PREMIUM_ERROR:g._("Premium phone numbers are not allowed."),PHONE_NUMBER_IS_NOT_LOCAL_ERROR:g._("Only local phone numbers are allowed."),PHONE_NUMBER_REGION_ERROR:g._("The phone number must be for a number local to where you're targeting. You can only target one country at a time."),CALL_TO_ACTION_ADDRESS_INVALID:g._("Please set a valid address for the \"{=Get Directions}\" Call to Action.",[g._param("=Get Directions",b("AdsCallToActionTypes").TYPES.GET_DIRECTIONS.text)]),getCallToActionAgeTooLowError:function(a){return g._("Age is too low for this Call To Action (minimum age is {minAge}).",[g._param("minAge",a)])},getCallToActionPhoneNumberRegionError:function(a){switch(a){case b("BoostedComponentAppID").BOOSTED_POST:return h.PHONE_NUMBER_REGION_ERROR;default:return h.PHONE_NUMBER_IS_NOT_LOCAL_ERROR}},getCallToActionPhoneNumberAgeError:function(a,c){switch(c){case b("BoostedComponentAppID").BOOSTED_POST:return h.PHONE_NUMBER_AGE_ERROR;default:return h.getCallToActionAgeTooLowError(a)}}};e.exports=h}),null);
__d("BoostedComponentCallToActionField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({APP_NAME:"component_flow_app_name",CATEGORY:"call_to_action_category",CTA_DATA:"call_to_action_data",CTA_TYPE:"call_to_action_type"})}),null);
__d("BoostedComponentObjective",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({POST_ENGAGEMENT:0,LINK_CLICKS:1,VIDEO_VIEWS:2,REACH:3,SEND_MESSAGE:4,WEBSITE_CONVERSIONS:5,LEAD_GENERATION:6,GET_BOOKINGS:7,EVENT_RESPONSES:8,PROFILE_VISITS:9,BRAND_AWARENESS:10})}),null);
__d("BoostedComponentWhatsAppValidationUtils",["AdsWhatsAppStrings","PhoneCodes","WhatsAppNumberVerificationResult"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsWhatsAppStrings").getInvalidPhoneNumberErrorMessage;function a(a){var b=a!=null?a.replace(/[-+()\s]/g,""):0;return a==null||isNaN(b)?g():null}function c(a,c){c=c.replace(/[-+()\s]/g,"");return"+"+b("PhoneCodes")[a].phone_code+c}function d(a){return a===b("WhatsAppNumberVerificationResult").VERIFICATION_CODE_SEND_SUCCESS||a===b("WhatsAppNumberVerificationResult").VERIFICATION_CODE_NOT_SENT||a===b("WhatsAppNumberVerificationResult").VERIFICATION_CODE_EXPIRED||a===b("WhatsAppNumberVerificationResult").VERIFICATION_CODE_TOO_FAST||a===b("WhatsAppNumberVerificationResult").INVALID_VERIFICATION_CODE||a===b("WhatsAppNumberVerificationResult").VERIFICATION_CODE_SENT_AGAIN}e.exports={getInvalidPhoneNumberError:a,getFormattedPhoneNumber:c,shouldShowVerificationDialog:d}}),null);
__d("BoostedComponentWhatsAppCTADataType",["immutable"],(function(a,b,c,d,e,f){"use strict";a=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(b("immutable").Record({isReadOnlyMode:!1,isValidatingVerificationCode:!1,isVerifyingWhatsAppNumberOnServer:!1,showSendWhatsAppBusinessDownloadLinkDialog:!1,showSuccessBanner:!1,verificationStatus:null,verificationDialogShown:!1,verifiedNumber:null,verifiedNumberType:null,errorMessage:null}));e.exports=a}),null);
__d("BoostedComponentShareAndBoostElementType",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({SHARE_ATTACHMENT:"share_attachment",SHARE_OWNER_NAME:"share_owner_name",SHARE_TYPE:"share_type"})}),null);
__d("BoostedPostCreativeStoreData",["AdsCallToActionTypes","ApiAdCreativeFields","ApiAdCreativeStorySpecFields","ApiCallToActionFields","ApiObjectStorySpecLinkFields","BoostedComponentBaseStoreData","BoostedComponentCreativeCategory","BoostedComponentShareAndBoostElementType","CallToActionValueFields","FBLogger","PostAttachmentTypes","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="www.example.com",h="tel:+16505434800";a={adgroupID:null,ads_cta_options_specs:b("immutable").Map(),default_creative_spec:b("immutable").Map(),default_creative_spec_for_ad_preview:null,display_phone_number_cache:b("immutable").Map(),instagram_actor_id:null,instagram_validation_exception:null,instant_workflow_cta_options_specs:null,is_page_messaging_disabled:void 0,is_validating_message_page_cta:!1,placements:[],post_type_eligible_for_cta:null,share_and_boost_spec:null,video_detailes:null,ctaLink:null,whatsapp_cta_specs:null,audienceNetworkPlacementEligible:!1,instagramPlacementEligible:!1,instagramPlacementRemoved:!1};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getCreativeSpec=function(){return this.default_creative_spec};d.setCreativeSpec=function(a){return this.set("default_creative_spec",a)};d.setCreativeSpecField=function(a,b){var c=this.getCreativeSpec();c=c.set(a,b);return this.setCreativeSpec(c).set("adgroupID",null)};d.setAuthorizationCategory=function(a){var c=this.getCreativeSpecForAdPreview();c=c&&c.setIn([b("ApiAdCreativeFields").AUTHORIZATION_CATEGORY],a);return this.setCreativeSpecForAdPreview(c).setCreativeSpecField(b("ApiAdCreativeFields").AUTHORIZATION_CATEGORY,a)};d.getAuthorizationCategory=function(){return this.getCreativeSpec().get(b("ApiAdCreativeFields").AUTHORIZATION_CATEGORY)};d.getCreativeSpecForAdPreview=function(){return this.default_creative_spec_for_ad_preview};d.setCreativeSpecForAdPreview=function(a){return this.set("default_creative_spec_for_ad_preview",a)};d.setCreativeSpecForAdPreviewField=function(a,b){var c=this.getCreativeSpecForAdPreview();c=c&&c.set(a,b);return this.setCreativeSpecForAdPreview(c)};d.getValidatedCreativeSpecForAdPreview=function(){__p&&__p();var a=this.getPostTypeEligibleForCTA(),c=this.getCreativeSpecForAdPreview(),d=this.getCallToAction();if(!c||!d||!a)return c;var e=d.get(b("ApiCallToActionFields").TYPE);if(!e)return c;d=d.get(b("ApiCallToActionFields").VALUE)?d.get(b("ApiCallToActionFields").VALUE):b("immutable").Map();if(this.getPostTypeEligibleForCTA()===b("PostAttachmentTypes").MULTI_PHOTO){c.setIn([b("ApiAdCreativeFields").CALL_TO_ACTION,b("ApiCallToActionFields").TYPE],e);c.setIn([b("ApiAdCreativeFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE],d);return c}switch(e){case b("AdsCallToActionTypes").TYPES.BOOK_TRAVEL.name:case b("AdsCallToActionTypes").TYPES.LEARN_MORE.name:case b("AdsCallToActionTypes").TYPES.SHOP_NOW.name:case b("AdsCallToActionTypes").TYPES.SIGN_UP.name:if(a===b("PostAttachmentTypes").SINGLE_SHARE)return c;d=this.$BoostedPostCreativeStoreData1(d,a);break;case b("AdsCallToActionTypes").TYPES.CALL_NOW.name:d=this.$BoostedPostCreativeStoreData2(d);break;default:break}e=this.getObjectStorySpecDataType();return c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,e,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE],d)};d.$BoostedPostCreativeStoreData1=function(a,c){var d=a.get(b("CallToActionValueFields").LINK);(!d||d.length===0)&&(a=a.set(b("CallToActionValueFields").LINK,g),c===b("PostAttachmentTypes").SINGLE_VIDEO&&(a=a.set(b("CallToActionValueFields").CAPTION,g)));return a};d.$BoostedPostCreativeStoreData2=function(a){return a.set(b("CallToActionValueFields").LINK,h)};d.getIsUnpublishedSlideshow=function(){return!!(this.video_detailes&&this.video_detailes.get("is_unpublished_slideshow"))};d.getCreativeCategory=function(){var a=this.getCreativeSpecForAdPreview();if(!a)return null;a=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA]);return a?b("BoostedComponentCreativeCategory").VIDEO:b("BoostedComponentCreativeCategory").IMAGE};d.getInstagramActorID=function(){return this.instagram_actor_id};d.setInstagramActorID=function(a){return this.set("instagram_actor_id",a)};d.getInstagramValidationExceptionMessage=function(){return this.instagram_validation_exception};d.getAdsCallToActionOptionsSpecs=function(){return this.ads_cta_options_specs};d.getInstantWorkflowOptionsSpecs=function(){return this.instant_workflow_cta_options_specs};d.getObjectStorySpecDataType=function(){switch(this.getPostTypeEligibleForCTA()){case b("PostAttachmentTypes").SINGLE_SHARE:return b("ApiAdCreativeStorySpecFields").LINK_DATA;case b("PostAttachmentTypes").SINGLE_VIDEO:return b("ApiAdCreativeStorySpecFields").VIDEO_DATA;case b("PostAttachmentTypes").SINGLE_PHOTO:return b("ApiAdCreativeStorySpecFields").PHOTO_DATA;default:b("FBLogger")("boosted_component").warn("Invalid Post type eligible for adding action buttons");return null}};d.getCallToActionType=function(){var a=this.getCallToAction();return a?a.get(b("ApiCallToActionFields").TYPE):null};d.getCallToActionValue=function(){var a=this.getCallToAction();return a?a.get(b("ApiCallToActionFields").VALUE):null};d.getCallToAction=function(){var a=this.getCreativeSpecForAdPreview();if(!a)return null;if(this.getPostTypeEligibleForCTA()===b("PostAttachmentTypes").MULTI_PHOTO)return a.getIn([b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],null);var c=this.getObjectStorySpecDataType();return a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,c,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],null)};d.setCallToActionInCreativeSpec=function(a){__p&&__p();var c=this.getCreativeSpecForAdPreview();if(!c)return this;var d;if(this.getPostTypeEligibleForCTA()===b("PostAttachmentTypes").MULTI_PHOTO)d=c.setIn([b("ApiAdCreativeFields").CALL_TO_ACTION],a);else{var e=this.getObjectStorySpecDataType();d=c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,e,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],a)}return this.setCreativeSpecForAdPreview(d)};d.setWelcomeMessageInCreativeSpec=function(a){var c=this.getCreativeSpecForAdPreview();if(!c)return this;var d=this.getObjectStorySpecDataType();c=c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,d,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE],a);return this.setCreativeSpecForAdPreview(c)};d.setInstagramActorInCreativeSpec=function(a){var c=this.getCreativeSpec();return!c?this:this.setCreativeSpecField(b("ApiAdCreativeFields").INSTAGRAM_ACTOR_ID,a)};d.setInstagramActorInCreativeSpecForAdPreview=function(a){var c=this.getCreativeSpecForAdPreview();return!c?this:this.setCreativeSpecForAdPreviewField(b("ApiAdCreativeFields").INSTAGRAM_ACTOR_ID,a)};d.getCTALink=function(){return this.ctaLink};d.setCTALink=function(a){return this.set("ctaLink",a)};d.getIsPageMessagingDisabled=function(){return this.is_page_messaging_disabled};d.setIsPageMessagingDisabled=function(a){return this.set("is_page_messaging_disabled",a)};d.getIsValidatingMessagePageCTA=function(){return this.is_validating_message_page_cta};d.setIsValidatingMessagePageCTA=function(a){return this.set("is_validating_message_page_cta",a)};d.getPostTypeEligibleForCTA=function(){return this.post_type_eligible_for_cta};d.getIsEligibleForCTA=function(){return this.getIsEligibleForAdsCTA()||this.getIsEligibleForInstantWorkflowCTA()};d.getIsEligibleForAdsCTA=function(){if(!this.getPostTypeEligibleForCTA())return!1;switch(this.getPostTypeEligibleForCTA()){case b("PostAttachmentTypes").SINGLE_SHARE:case b("PostAttachmentTypes").SINGLE_VIDEO:case b("PostAttachmentTypes").SINGLE_PHOTO:case b("PostAttachmentTypes").MULTI_PHOTO:return!0;default:b("FBLogger")("boosted_component").warn("Invalid Post type eligible for adding action buttons");return!1}};d.getIsEligibleForInstantWorkflowCTA=function(){var a=this.getInstantWorkflowOptionsSpecs();return!!(this.getPostTypeEligibleForCTA()&&a&&!a.isEmpty())};d.getDisplayPhoneNumberCache=function(){return this.display_phone_number_cache};d.getShareAttachment=function(){return this.share_and_boost_spec&&this.share_and_boost_spec.get(b("BoostedComponentShareAndBoostElementType").SHARE_ATTACHMENT)};d.getShareOwnerName=function(){return this.share_and_boost_spec&&this.share_and_boost_spec.get(b("BoostedComponentShareAndBoostElementType").SHARE_OWNER_NAME)};d.getShareType=function(){return this.share_and_boost_spec&&this.share_and_boost_spec.get(b("BoostedComponentShareAndBoostElementType").SHARE_TYPE)};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("AdsWhatsAppUIEvents",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({CTW_LWI_WHATSAPP_CTA_ADDED:"ctw_lwi_whatsapp_cta_added",CTW_LWI_COUNTRY_CODE_CHANGE:"ctw_lwi_country_code_change",CTW_LWI_PHONE_NUMBER_CHANGE:"ctw_lwi_phone_number_change",CTW_LWI_VERIFICATION_CODE_CHANGE:"ctw_lwi_verification_code_change",CTW_LWI_ADD_WHATSAPP_NUMBER_CLICK:"ctw_lwi_add_whatsapp_number_click",CTW_LWI_VALIDATE_WHATSAPP_VERIFICATION_CODE_CLICK:"ctw_lwi_validate_whatsapp_verification_code_click",CTW_LWI_VERIFICATION_DIALOG_CLOSE:"ctw_lwi_verification_dialog_close",CTW_LWI_BUSINESS_DOWNLOAD_DIALOG_CLOSE:"ctw_lwi_business_download_dialog_close",CTW_LWI_SUCCESS_BANNER_CLOSE:"ctw_lwi_success_banner_close"})}),null);
__d("BoostedPostCreativeStoreV2",["AdCreativeAuthorizationCategory","AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux","AdsBoostedComponentAdAccountV2UpdatePoliticalAuthorizationDataActionFlux","AdsBoostedComponentCommonV2CreateSuccessWithBoostIdDataActionFlux","AdsBoostedComponentCommonV2FetchDialogDataDataActionFlux","AdsBoostedComponentCommonV2LoadDialogDataDataActionFlux","AdsCallToActionTypes","AdsDataAtom","AdsLWIFetchBoostedPostCreativeDataActionFlux","AdsLWILoadBoostedPostCreativeDataActionFlux","AdsLWIUpdateCallToActionLinkActionFlux","AdsWhatsAppUIEvents","AdsWhatsAppUtils","ApiCallToActionFields","BoostedComponentAdAccountStoreV2","BoostedComponentAppIDUtils","BoostedComponentCommonActionTypesV2","BoostedComponentCreativeV2ClearWhatsappVerificationStatusActionFlux","BoostedComponentCreativeV2CloseWhatsappLinkSuccessBannerActionFlux","BoostedComponentCreativeV2GetPageMessageSettingFailActionFlux","BoostedComponentCreativeV2GetPageMessageSettingSubmitActionFlux","BoostedComponentCreativeV2GetPageMessageSettingSuccessActionFlux","BoostedComponentCreativeV2PageMessagingEnableRequestFailActionFlux","BoostedComponentCreativeV2PageMessagingEnableRequestSubmitActionFlux","BoostedComponentCreativeV2PageMessagingEnableRequestSuccessActionFlux","BoostedComponentCreativeV2ToggleWhatsappNumberReadEditModeActionFlux","BoostedComponentCreativeV2UpdateCallToActionActionFlux","BoostedComponentCreativeV2ValidateWhatsappVerificationCodeFailActionFlux","BoostedComponentCreativeV2ValidateWhatsappVerificationCodeSubmitActionFlux","BoostedComponentFetchActionTypesV2","BoostedComponentFluxReduceStore","BoostedComponentInstagramActionTypesV2","BoostedComponentStoreState","BoostedComponentV2Utils","BoostedComponentWhatsAppCTADataType","BoostedPostCreativeStoreData","CallToActionValueFields","createObjectBy","filterObject","immutable","isEmpty","AdsLWIBoostedPostCreativeStoreActionHandlers"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("BoostedComponentStoreState").BoostedComponentState,h=b("BoostedComponentStoreState").getKey,i=b("BoostedComponentV2Utils").getKeyData,j="BoostedPostCreativeStoreV2",k=b("createObjectBy")(b("AdsLWIBoostedPostCreativeStoreActionHandlers"),function(a){return a.type});a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.storeName=j,b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.getInitialState=function(){return new g({storeName:j})};d.getDataByKey=function(a){return this.getState().getDataByKey(a)};d.reduce=function(a,c){__p&&__p();var d=c.action;c=i(d);var e=c.appID,f=c.boostID;c=c.targetID;if(!e||!b("BoostedComponentAppIDUtils").isBoostedPostFamily(e))return a;f=h(e,c,f);var g=a.getDataByKey(f);switch(d.type){case b("AdsBoostedComponentCommonV2FetchDialogDataDataActionFlux").actionType:case b("AdsLWIFetchBoostedPostCreativeDataActionFlux").actionType:case b("BoostedComponentFetchActionTypesV2").FETCH_ALL_DATA:return g.dataLoaded?a:a.setDataByKey(f,new(b("BoostedPostCreativeStoreData"))());case b("AdsBoostedComponentCommonV2LoadDialogDataDataActionFlux").actionType:case b("AdsLWILoadBoostedPostCreativeDataActionFlux").actionType:case b("BoostedComponentFetchActionTypesV2").LOAD_ALL_DATA:var j=g.getInstagramActorID(),l=d.data,m=l.creative_store_data,n=l.ad_account_store_data;l=l.existing_ad_info_store_data;var o=babelHelpers["extends"]({dataLoaded:!0},b("filterObject")({ads_cta_options_specs:m.ads_cta_options_specs,default_creative_spec:m.default_creative_spec,default_creative_spec_for_ad_preview:m.default_creative_spec_for_ad_preview,instagram_actor_id:m.instagram_actor_id,instagram_validation_exception:m.instagram_validation_exception,instant_workflow_cta_options_specs:m.instant_workflow_cta_options_specs,post_type_eligible_for_cta:m.post_type_eligible_for_cta,share_and_boost_spec:m.share_and_boost_spec,video_detailes:m.video_detailes},function(a,b){return b in m}));j&&(o=babelHelpers["extends"]({},o,{instagram_actor_id:j,default_creative_spec:babelHelpers["extends"]({},o.default_creative_spec,{instagram_actor_id:j}),default_creative_spec_for_ad_preview:babelHelpers["extends"]({},o.default_creative_spec_for_ad_preview,{instagram_actor_id:j})}));g=new(b("BoostedPostCreativeStoreData"))(b("immutable").fromJS(o));g=g.set("whatsapp_cta_specs",new(b("BoostedComponentWhatsAppCTADataType"))({isReadOnlyMode:!0,verifiedNumber:(j=m)!=null?(j=j.page_whatsapp_data)!=null?j.whatsapp_number:j:j,verifiedNumberType:(o=m)!=null?(o=o.page_whatsapp_data)!=null?o.whatsapp_number_type:o:o}));if(d.type===b("AdsLWILoadBoostedPostCreativeDataActionFlux").actionType)return a.setDataByKey(f,g);j=n.selectedAccountInfo;o=n.selectedAccountID;n=n.accounts;var p=!1;j?p=j.authorizedForPoliticalAds:o&&n[o]&&(p=n[o].authorizedForPoliticalAds);l.is_boosted&&l.adgroup_id&&g.getAuthorizationCategory()&&g.getAuthorizationCategory()===b("AdCreativeAuthorizationCategory").POLITICAL?g=g.set("adgroupID",l.adgroup_id):p||(g=g.setAuthorizationCategory(null));return a.mergeDataByKey(f,g);case b("AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux").actionType:b("AdsDataAtom").waitFor([b("BoostedComponentAdAccountStoreV2").getDispatchToken()]);j=b("BoostedComponentAdAccountStoreV2").getState();!j.getIsAccountAuthorizedForPoliticalAds()?g=g.setAuthorizationCategory(null):g=g.setAuthorizationCategory(b("AdCreativeAuthorizationCategory").POLITICAL);return a.setDataByKey(f,g);case b("BoostedComponentCreativeV2UpdateCallToActionActionFlux").actionType:n=d.callToActionUpdate;g=g.setCallToActionInCreativeSpec(n);if(!n)return a.setDataByKey(f,g);o=n.get(b("ApiCallToActionFields").TYPE);if(o===b("AdsCallToActionTypes").TYPES.WHATSAPP_MESSAGE.name){l=g.get("whatsapp_cta_specs");g=g.set("whatsapp_cta_specs",new(b("BoostedComponentWhatsAppCTADataType"))({isReadOnlyMode:!!n.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").WHATSAPP_NUMBER]),verifiedNumber:l!=null?l.verifiedNumber:null,verifiedNumberType:l!=null?l.verifiedNumberType:null}));b("AdsWhatsAppUtils").logWhatsAppExposuresWhenCTAIsClickedOnLWI();b("AdsWhatsAppUtils").logWhatsAppLWIUIEvent(b("AdsWhatsAppUIEvents").CTW_LWI_WHATSAPP_CTA_ADDED)}return a.setDataByKey(f,g);case b("AdsLWIUpdateCallToActionLinkActionFlux").actionType:p=d.link;g=g.setCTALink(p);return a.setDataByKey(f,g);case b("BoostedComponentCreativeV2GetPageMessageSettingSubmitActionFlux").actionType:case b("BoostedComponentCreativeV2PageMessagingEnableRequestSubmitActionFlux").actionType:g=g.setIsValidatingMessagePageCTA(!0);return a.setDataByKey(f,g);case b("BoostedComponentCreativeV2PageMessagingEnableRequestSuccessActionFlux").actionType:case b("BoostedComponentCreativeV2GetPageMessageSettingSuccessActionFlux").actionType:j=d.isMessagingEnabled;g=g.setIsValidatingMessagePageCTA(!1).setIsPageMessagingDisabled(!j);return a.setDataByKey(f,g);case b("BoostedComponentCreativeV2PageMessagingEnableRequestFailActionFlux").actionType:case b("BoostedComponentCreativeV2GetPageMessageSettingFailActionFlux").actionType:g=g.setIsValidatingMessagePageCTA(!1).setIsPageMessagingDisabled(!1);return a.setDataByKey(f,g);case b("BoostedComponentInstagramActionTypesV2").LOAD_CONNECTED_INSTAGRAM_ACCOUNT_DATA:var q=d.data.instagramAccountID;g=g.withMutations(function(a){a.setInstagramActorID(q).setInstagramActorInCreativeSpec(q).setInstagramActorInCreativeSpecForAdPreview(q)});return a.setDataByKey(f,g);case b("AdsBoostedComponentCommonV2CreateSuccessWithBoostIdDataActionFlux").actionType:o=d.data.creative_store_data;n=d.oldBoostID;l=h(e,c,n);a=a.copyData(f,e,c,n);b("isEmpty")(o)||(a=a.mergeDataByKey(l,{post_type_eligible_for_cta:o.post_type_eligible_for_cta}));return a;case b("BoostedComponentCommonActionTypesV2").DELETE_SUCCESS:return a.copyData(f,e,c,d.boostID);case b("BoostedComponentCreativeV2ClearWhatsappVerificationStatusActionFlux").actionType:p=g.get("whatsapp_cta_specs");if(!p)return a;else{p=p.withMutations(function(a){return a.set("verificationStatus",null).set("verificationDialogShown",!1).set("errorMessage",null).set("showSendWhatsAppBusinessDownloadLinkDialog",!1)});g=g.set("whatsapp_cta_specs",p);return a.setDataByKey(f,g)}case b("BoostedComponentCreativeV2ValidateWhatsappVerificationCodeSubmitActionFlux").actionType:j=g.get("whatsapp_cta_specs");if(!j)return a;else{g=g.setIn(["whatsapp_cta_specs","isValidatingVerificationCode"],!0);return a.setDataByKey(f,g)}case b("BoostedComponentCreativeV2ValidateWhatsappVerificationCodeFailActionFlux").actionType:n=g.get("whatsapp_cta_specs");if(!n)return a;else{n=n.withMutations(function(a){return a.set("isValidatingVerificationCode",!1).set("verificationStatus",d.verificationStatus).set("errorMessage",d.errorMessage)});g=g.set("whatsapp_cta_specs",n);return a.setDataByKey(f,g)}case b("BoostedComponentCreativeV2CloseWhatsappLinkSuccessBannerActionFlux").actionType:l=g.get("whatsapp_cta_specs");if(!l)return a;else{g=g.setIn(["whatsapp_cta_specs","showSuccessBanner"],!1);return a.setDataByKey(f,g)}case b("BoostedComponentCreativeV2ToggleWhatsappNumberReadEditModeActionFlux").actionType:o=g.get("whatsapp_cta_specs");if(!o)return a;else{g=g.setIn(["whatsapp_cta_specs","isReadOnlyMode"],d.isReadOnlyMode);return a.setDataByKey(f,g)}case b("AdsBoostedComponentAdAccountV2UpdatePoliticalAuthorizationDataActionFlux").actionType:g=g.setAuthorizationCategory(d.checked?b("AdCreativeAuthorizationCategory").POLITICAL:b("AdCreativeAuthorizationCategory").NONE);return a.setDataByKey(f,g);default:e=k[d.type];if(e){c=e.genExtraData&&e.genExtraData(d,a);return e.mutate(d,a,c)}return a}};return c}(b("BoostedComponentFluxReduceStore"));e.exports=new a(b("AdsDataAtom"))}),null);
__d("BoostedComponentsCallToActionValidator",["AdproObjectiveType","AdsAppUtils","AdsCallToActionGeoUtils","AdsCallToActionTypes","ApiCallToActionFields","BoostedComponentAppID","BoostedComponentCreativeSectionUtils","BoostedComponentStringsV2","BoostedComponentValidationStrings","CallToActionValueFields","PostAttachmentTypes","URI","WhatsAppNumberType","ads-lib-urllib","adsLWIBoostedPostCreativeStoreDataSelector","immutable","isFacebookURI"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=function(a,c,d){var e=new(b("URI"))(d);if(h(e,a))return null;else if(!d||!b("ads-lib-urllib").isUrl(d)&&e.getProtocol()!=="mailto"||b("AdsAppUtils").isItunesURL(e.toString())||b("AdsAppUtils").isGooglePlayURL(e.toString()))return[b("BoostedComponentValidationStrings").INVALID_URL_ERROR];else if(!c&&b("isFacebookURI")(e)&&(a===b("BoostedComponentAppID").BOOSTED_WEBSITE||a===b("BoostedComponentAppID").BOOSTED_PURCHASE))return[b("BoostedComponentValidationStrings").INVALID_FBURL_ERROR];return null},h=function(a,c){return c!==b("BoostedComponentAppID").BOOSTED_CCTA?!1:b("isFacebookURI")(a)&&(new RegExp("^/iw/").test(a.getPath())||new RegExp("^/pages/platform/first-party-cta/").test(a.getPath()))},i=function(a){return/tel:(\+)?[\d,-]{9,15}$/.test(a)};a=function(a,c,d,e,f,h,k,l,m,n){__p&&__p();n===void 0&&(n=!0);if(!c||a===b("BoostedComponentAppID").BOOSTED_LEAD_GEN||a===b("BoostedComponentAppID").BOOSTED_APP_INSTALL)return null;var o=c.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]);switch(c.get(b("ApiCallToActionFields").TYPE)){case b("AdsCallToActionTypes").TYPES.CALL_NOW.name:if(l<k){l=a===b("BoostedComponentAppID").BOOSTED_POST?b("BoostedComponentValidationStrings").PHONE_NUMBER_AGE_ERROR:b("BoostedComponentValidationStrings").getCallToActionAgeTooLowError(k);return[l]}k=c.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]);return!i(k)?[b("BoostedComponentStringsV2").INVALID_PHONE_NUMBER_ERROR]:null;case b("AdsCallToActionTypes").TYPES.GET_DIRECTIONS.name:return!o||!b("AdsCallToActionGeoUtils").isValidGeoLink(o)?[b("BoostedComponentValidationStrings").CALL_TO_ACTION_ADDRESS_INVALID]:null;case b("AdsCallToActionTypes").TYPES.WHATSAPP_MESSAGE.name:return j(c,d);case b("AdsCallToActionTypes").TYPES.BUY_TICKETS.name:l=c.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").EVENT_ID]);return a===b("BoostedComponentAppID").BOOSTED_POST&&!!l&&!m?[b("BoostedComponentStringsV2").INVALID_TICKET_EVENT_ERROR]:null;case b("AdsCallToActionTypes").TYPES.BOOK_TRAVEL.name:case b("AdsCallToActionTypes").TYPES.LEARN_MORE.name:case b("AdsCallToActionTypes").TYPES.SHOP_NOW.name:case b("AdsCallToActionTypes").TYPES.SIGN_UP.name:case b("AdsCallToActionTypes").TYPES.GET_OFFER.name:return h===b("PostAttachmentTypes").SINGLE_SHARE||b("BoostedComponentCreativeSectionUtils").isBoostedWebsiteWithMediaCategory(a,e)||!n?null:g(a,f,o);default:return null}};var j=function(a,c){var d=b("adsLWIBoostedPostCreativeStoreDataSelector")();d=d.get("whatsapp_cta_specs");a=a.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").WHATSAPP_NUMBER]);d=a!=null&&d.verifiedNumberType===b("WhatsAppNumberType").BIZ;d=c===b("AdproObjectiveType").MESSAGES?d:a!=null;return!d?[c!==b("AdproObjectiveType").MESSAGES?b("BoostedComponentValidationStrings").INVALID_WHATSAPP_NUMBER_ERROR:b("BoostedComponentValidationStrings").INVALID_WHATSAPP_BUSINESS_NUMBER_ERROR]:null};e.exports={getValidateURLError:g,getValidateCallToActionError:a,getValidateWhatsAppCallToActionError:j}}),null);
__d("BoostedComponentAppInstallAppSelectorValidator",["AdsAppUtils","BoostedComponentAppID","BoostedComponentAppInstallAppSelectorStrings","URI","immutable"],(function(a,b,c,d,e,f){"use strict";function a(a,c){if(c!==b("BoostedComponentAppID").BOOSTED_APP_INSTALL)return null;c={};a=new(b("URI"))(a);!b("AdsAppUtils").isItunesURL(a.toString())&&!b("AdsAppUtils").isGooglePlayURL(a.toString())&&(c[0]=b("BoostedComponentAppInstallAppSelectorStrings").INVALID_APP_URL_ERROR);return b("immutable").fromJS(c)}e.exports={getValidateAppInstallAppURLErrors:a}}),null);
__d("AdsLWIAudienceStoreField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({AUDIENCES:"audiences",SELECTED_AUDIENCE_ID:"selectedAudienceID",DEFAULT_TARGET_SPEC:"defaultTargetSpec",AD_ACCOUNT_ID:"adAccountID",CUSTOM_LOCATION_COUNTRY:"custom_location_country",HAS_USER_REMOVED_INSTAGRAM_PLACEMENT:"has_user_removed_instagram_placement",IS_ELIGIBLE_FOR_FACEBOOK_INSTREAM_PLACEMENT:"is_eligible_for_facebook_instream_placement",IS_ELIGIBLE_FOR_INSTAGRAM_PLACEMENT:"is_eligible_for_instagram_placement",PLACEMENTS:"placements",CUSTOM_AUDIENCES:"custom_audiences",EXCEPTIONS:"exceptions",AUDIENCE_MANAGER:"audienceManager",EDITOR_MODE:"editor_mode",ERROR_MESSAGE:"errorMessage",FIRST_FETCH_DONE:"first_fetch_done",LAST_ID:"lastID",SAVED_AUDIENCES:"saved_audiences",SPECIAL_AUDIENCES:"specialAudiences",SHOW_DIALOG:"show_dialog",TARGETING:"targeting",SELECTED_AUDIENCE_TYPE:"selected_audience_type"})}),null);
__d("AdsLWIExistingAdInfoStoreField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ADGROUP_ID:"adgroup_id",AD_STATUS:"ad_status",AUDIENCE:"audience",AUDIENCE_NAME:"audience_name",BUDGET:"budget",BUDGET_TYPE:"budget_type",CAMPAIGN_AD_ACCOUNT_ID:"campaign_ad_account_id",CAMPAIGN_AD_ACCOUNT_NAME:"campaign_ad_account_name",CAMPAIGN_GROUP_ID:"campaign_group_id",CAMPAIGN_IDS_TO_ADGROUP_IDS_MAP:"campaign_ids_to_adgroup_ids_map",CHECKOUT_PAYMENTS:"checkout_payments",CREATION_TIME:"creation_time",CREATOR_NAME:"creator_name",CURRENCY:"currency",DEFAULT_AD_ACCOUNT_ID:"default_ad_account_id",DURATION_COMPLETED:"duration_completed",IS_BOOSTED:"is_boosted",IS_CAMPAIGN_AD_ACCOUNT_ADMIN:"is_campaign_ad_account_admin",IS_MODIFIED_IN_ADS_MANAGER:"is_modified_in_ads_manager",MONTHLY_BUDGET:"monthly_budget",OBJECTIVE:"objective",PACKAGE_ID:"package_id",PAYMENT_SOURCE_INFO:"payment_source_info",PIXEL:"pixel",SELECTED_CAMPAIGN_LENGTH:"selected_campaign_length",SELECTED_CAMPAIGN_STOP_TIME:"selected_campaign_stop_time",NUM_OF_DAYS_RUNNING:"num_of_days_running",SPENT:"spent",TARGETING:"targeting",UNSUPPORTED_EDITING_REASONS:"unsupported_editing_reasons"})}),null);
__d("AdsLWIErrorCode",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({INELIGIBLE_GRAY_ACCOUNT:1667081,INELIGIBLE_UNPUBLISHED_PAGE:1667082,AUDIENCE_SIZE_TOO_LOW:1870015,PHONE_NUMBER_IS_INTERNATIONAL:1885233,CANNOT_USE_INVALID_TARGETING_FIELDS:1815746,CANOT_EXCLUDE_INTERESTED_IN:1870022,CANNOT_USE_INTERESED_IN_TARGETING:1359170,CANNOT_USE_INVALID_DETAILED_TARGETING_FIELDS:1815752,JOB_TARGETING_TOO_FEW_LOCATIONS:1487132,BOOSTED_ACTION_INELIGIBLE_UNPUBLISHED_PAGE:1860012,BOOSTED_POST_INELIGIBLE_OLD_COVER_PHOTO:1667078,BOOSTED_POST_INELIGIBLE_POST_TYPE:1667079,BOOSTED_POST_INELIGIBLE_PROFILE_PICTURE:1667077,BOOSTED_POST_TARGET_COUNTRY_RESTRICTED:1667061})}),null);
__d("BoostedComponentAudienceStoreData",["AdsAPITargetFields","AdsLWIErrorCode","BoostedPostAudienceOptions","GeoCoordinates","getByPath","immutable","isEmpty"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsAPITargetFields").AGE_MAX,h=b("AdsAPITargetFields").AGE_MIN,i=b("AdsAPITargetFields").CONNECTIONS,j=b("AdsAPITargetFields").FRIENDS_OF_CONNECTIONS,k=b("AdsAPITargetFields").GENDERS,l=b("AdsAPITargetFields").PAGE_TYPES,m=b("AdsAPITargetFields").INTERESTS,n=b("BoostedPostAudienceOptions").AUTO_LOOKALIKE,o=b("BoostedPostAudienceOptions").FANS,p=b("BoostedPostAudienceOptions").GROUPER,q=b("BoostedPostAudienceOptions").NCPP,r=["desktopfeed","mobilefeed"],s=18,t=65;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.setSelectedAudienceID=function(a){return a==="0"||!this.audiences.has(a)?this.set("selectedAudienceID",q):this.set("selectedAudienceID",a)};d.setAudiences=function(a,c){__p&&__p();if(!a)return this;c=b("immutable").OrderedMap(a.map(function(a){__p&&__p();var b=a.audienceID,c=a.audienceType;if(c===q){var d=a.targetSpec;delete d[i];delete d[j]}if(c===o||c===p){d=a.targetSpec;delete d[k];delete d[g];delete d[h]}d=b==="0"?c:b;a.id=d;return[d,a]}));return this.set("audiences",c)};d.deleteAudience=function(a){a=(a=a)!=null?a:this.selectedAudienceID;var b=this.audiences;b=b["delete"](a);a=b.get(q)!=null?q:n;return this.setSelectedAudienceID(a).set("audiences",b)};d.updateTargetSpec=function(a,b){var c=this.getSelectedAudience(),d=this.audiences;c=babelHelpers["extends"]({},c);b!=null&&(c.name=b);c.targetSpec=a;d=d.set(this.selectedAudienceID,c);return this.set("audiences",d)};d.setCustomLocation=function(a){var b=this.getTargetSpec();b=babelHelpers["extends"]({},b);if(b.geo_locations){b.geo_locations.custom_locations=[a];return this.updateTargetSpec(b)}return this};d.getCustomLocation=function(){var a;return(a=this.getTargetSpec())!=null?(a=a.geo_locations)!=null?(a=a.custom_locations)!=null?a[0]:a:a:a};d.getCustomLocationCoordinates=function(){var a=this.getCustomLocation();return a==null?null:a.latitude!=null&&a.longitude!=null?new(b("GeoCoordinates"))(a.latitude,a.longitude):null};d.setMinAge=function(a){var b=this.getTargetSpec();b=babelHelpers["extends"]({},b);b.age_min=a;return this.updateTargetSpec(b)};d.getMinAge=function(){return this.getTargetSpec().age_min||s};d.setMaxAge=function(a){var b=this.getTargetSpec();b=babelHelpers["extends"]({},b);b.age_max=a;return this.updateTargetSpec(b)};d.getMaxAge=function(){return this.getTargetSpec().age_max||t};d.setGender=function(a){a=[a];var b=this.getTargetSpec();b=babelHelpers["extends"]({},b);b.genders=a;return this.updateTargetSpec(b)};d.getGender=function(){var a=this.getTargetSpec();return a.genders?a.genders[0]:0};d.setHasUserRemovedInstagramPlacement=function(a){return this.set("instagramPlacementRemoved",a)};d.getInterests=function(){return this.getTargetSpec()[m]};d.setInterests=function(a){var b=this.getTargetSpec();b=babelHelpers["extends"]({},b);b[m]=a;return this.updateTargetSpec(b)};d.getLocationsNum=function(){var a=this.getTargetSpec();a=a.geo_locations;if(b("isEmpty")(a))return 0;var c=b("getByPath")(a,["cities"],[]),d=b("getByPath")(a,["countries"],[]),e=b("getByPath")(a,["regions"],[]),f=b("getByPath")(a,["zips"],[]);a=b("getByPath")(a,["custom_locations"],[]);return c.length+d.length+e.length+f.length+a.length};d.getSelectedAudience=function(){return this.audiences.get(this.selectedAudienceID)||{}};d.getIsClientEditable=function(){return this.getSelectedAudience().isClientEditable};d.getAudienceType=function(){return this.getSelectedAudience().audienceType};d.getSavedAudienceID=function(){return this.getSelectedAudience().audienceID};d.getSelectedAudienceName=function(){return this.getSelectedAudience().name};d.getTargetSpec=function(){return this.getSelectedAudience().targetSpec};d.getAudienceTag=function(){return this.getSelectedAudience().tag};d.getDefaultSpec=function(){return this.audiences.get(q)?this.audiences.get(q).targetSpec:this.getTargetSpec()};d.getJobTargetSpec=function(){return this.jobTargetingSpec};d.getAssociatedAdsCount=function(){return this.getSelectedAudience().adCampaigns.length};d.toggleSeeAll=function(){return this.set("seeAll",!this.seeAll)};d.getPlacements=function(){return this.placements||r};d.getHasUserRemovedInstagramPlacement=function(){return this.instagramPlacementRemoved};d.getIsInstagramPlacementEligible=function(){return this.instagramPlacementEligible};d.getIsAudienceNetworkPlacementEligible=function(){return this.audienceNetworkPlacementEligible};d.getUserOS=function(){return this.userOS};d.getUserDevice=function(){return this.userDevice};d.getPageTypes=function(){return this.getTargetSpec()[l]};d.hasInvalidPhoneNumber=function(){return this.exceptions!=null&&this.exceptions.indexOf(b("AdsLWIErrorCode").PHONE_NUMBER_IS_INTERNATIONAL)>=0};d.getAudienceErrorCode=function(){return this.exceptions!=null&&this.exceptions.length>0?this.exceptions[0]:null};return c}(b("immutable").Record({dataLoaded:!1,appID:null,accountID:"",audiences:b("immutable").OrderedMap(),customAudiences:b("immutable").OrderedMap(),defaultTargetSpec:{},editMode:!1,exceptions:null,instagramPlacementEligible:!1,instagramPlacementRemoved:!1,audienceNetworkPlacementEligible:!1,facebookInstreamPlacementEligible:!1,isFetching:!0,isUpdating:!1,jobTargetingSpec:{},placements:[],rendered:!1,seeAll:!1,selectedAudienceID:"",showAudienceManager:!1,userOS:[],userDevice:[]}));e.exports=a}),null);
__d("BoostedComponentContextStorePostType",[],(function(a,b,c,d,e,f){"use strict";a={VIDEO_POST:1};e.exports=a}),null);
__d("BoostedComponentAttachmentType",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({LIVE_VIDEO:"live_video",JOB_OPENING:"job_opening"})}),null);
__d("BoostedComponentContextStoreData",["BoostedComponentAppID","BoostedComponentAttachmentType","BoostedComponentBaseStoreData","BoostedComponentProduct","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={access_token:"",boost_id:"",campaign_additional_settings:null,can_viewer_edit:!1,client_id:"",composer_id:null,is_eligible:!1,is_job_opening:!1,is_unpublished_slideshow:!1,page_connected_instagram_account_id:null,fan_count:0,flow_id:"",page_access_token:"",page_id:"",page_info:b("immutable").Map(),page_uri:"",placement:"",post_info:b("immutable").Map(),source_app_id:b("BoostedComponentAppID").BOOSTED_POST,product:b("BoostedComponentProduct").BOOSTED_POST,target_id:"",upsell_type:null,user_id:"",user_hash:""};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getAppID=function(){return this.source_app_id};d.getAttachmentType=function(){return this.post_info?this.post_info.get("attachment_type"):null};d.getAttachmentsInfo=function(){return this.post_info?this.post_info.get("attachments_info"):null};d.getStoryDomID=function(){return this.post_info?this.post_info.get("story_dom_id"):null};d.getCampaignAdditionalSettings=function(){return this.campaign_additional_settings};d.getNullableInstagramAccountID=function(){return this.page_connected_instagram_account_id};d.getFlowID=function(){return this.flow_id};d.getUserID=function(){return this.user_id};d.getUserHash=function(){return this.user_hash};d.getPageID=function(){return this.page_id};d.getFanCount=function(){return this.fan_count};d.getAccessToken=function(){return this.access_token};d.getPageAccessToken=function(){return this.page_access_token};d.getClientID=function(){return this.client_id};d.getBoostID=function(){return this.boost_id};d.getPostID=function(){return this.post_info?this.post_info.get("id"):null};d.getPostType=function(){return this.post_info?this.post_info.get("type"):null};d.getEventPostInfo=function(){return this.post_info?this.post_info.get("eventInfo"):null};d.getHotnessPercentile=function(){return this.post_info?this.post_info.get("hotness_percentile"):null};d.getCallToActionType=function(){return this.post_info?this.post_info.get("call_to_action_type"):null};d.getPlacement=function(){return this.placement};d.getLocalAwareness=function(){return this.page_info?this.page_info.get("local_awareness"):null};d.getAutomatedAdsPageInfo=function(){return this.page_info?this.page_info.get("automated_ads"):null};d.getBoostedPostPageInfo=function(){return this.page_info?this.page_info.get("boosted_post"):null};d.getFeedContext=function(){return this.post_info?this.post_info.get("feed_context"):null};d.getIsEntPost=function(){return this.post_info?!!this.post_info.get("is_ent_post"):!1};d.getIsUnpublishedSlideshow=function(){return!!this.is_unpublished_slideshow};d.getUpsellType=function(){return this.upsell_type};d.getComposerID=function(){return this.composer_id};d.getCanViewerEdit=function(){return this.can_viewer_edit};d.getPhotoCount=function(){return this.post_info?this.post_info.get("photo_count"):null};d.getIsEligible=function(){return this.is_eligible};d.getPageURI=function(){return this.page_uri};d.getTargetID=function(){return this.target_id};d.getIsJobOpening=function(){return this.is_job_opening};d.isJobPost=function(){return this.getAttachmentType()===b("BoostedComponentAttachmentType").JOB_OPENING};d.isLiveVideo=function(){return this.getAttachmentType()===b("BoostedComponentAttachmentType").LIVE_VIDEO};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("AdsLWIAdproObjectivesDataProviderPlugin",["immutable"],(function(a,b,c,d,e,f){"use strict";a=b("immutable").Map;c={initialState:a()};e.exports=c}),null);
__d("BoostedComponentObjectiveUtils",["AdproObjectiveType","BoostedComponentObjective"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function a(a){__p&&__p();if(a===null)return null;switch(a){case b("BoostedComponentObjective").POST_ENGAGEMENT:return b("AdproObjectiveType").POST_ENGAGEMENT;case b("BoostedComponentObjective").LINK_CLICKS:case b("BoostedComponentObjective").PROFILE_VISITS:return b("AdproObjectiveType").LINK_CLICKS;case b("BoostedComponentObjective").VIDEO_VIEWS:return b("AdproObjectiveType").VIDEO_VIEWS;case b("BoostedComponentObjective").REACH:return b("AdproObjectiveType").REACH;case b("BoostedComponentObjective").SEND_MESSAGE:return b("AdproObjectiveType").MESSAGES;case b("BoostedComponentObjective").LEAD_GENERATION:return b("AdproObjectiveType").LEAD_GENERATION;case b("BoostedComponentObjective").WEBSITE_CONVERSIONS:return b("AdproObjectiveType").WEBSITE_CONVERSIONS;case b("BoostedComponentObjective").EVENT_RESPONSES:return b("AdproObjectiveType").EVENT_RESPONSES;case b("BoostedComponentObjective").GET_BOOKINGS:return b("AdproObjectiveType").WEBSITE_CONVERSIONS;default:return null}}e.exports={getAdproObjectiveType:a}}),null);
__d("BoostedAutomatedAdsProgramAdvertisingGoalFields",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({LOCATION_LINK:"location_link",PHONE_NUMBER_LINK:"phone_number_link",PROGRAM_CTA_TYPE:"program_cta_type",PROGRAM_CTA_SPECS:"program_cta_specs",PROGRAM_OBJECTIVE:"program_objective",WEBSITE_LINK:"website_link"})}),null);
__d("AdsLWIObjectiveStoreField",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({CONVERSIONS_ELIGIBLE_ADACCOUNTS:"conversions_eligible_adaccounts",HAS_EXISTING_PACKAGE:"has_existing_package",IS_ADDING_PROMOTION:"is_adding_promotion",IS_PAGE_LIKE_ELIGIBLE:"is_page_like_eligible",IS_SKIP_QUESTIONNAIRE_ELIGIBLE:"is_skip_questionnaire_eligible",PIXEL_FIRING_DOMAINS:"pixel_firing_domains",PROGRAM_ADVERTISING_GOAL:"program_advertising_goal"})}),null);
__d("BoostedComponentNewAdInfoStoreData",["BoostedComponentBaseStoreData","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={eligible_objectives:b("immutable").List(),selected_objective:null,selectedObjectiveRadioItem:null,defaultObjective:null};c=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getEligibleObjectives=function(){return this.eligible_objectives};c.getSelectedObjective=function(){return this.selected_objective};c.getSelectedObjectiveRadioItem=function(){return this.selectedObjectiveRadioItem};c.setSelectedObjective=function(a){return this.set("selected_objective",a)};return b}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("BoostedPostInstagramUtils",["AdproObjectiveType","AdsDataAtom","AdsSelectorUtils","BoostedComponentAppID","BoostedComponentContextStoreV2","BoostedComponentExistingAdInfoStoreV2","BoostedComponentQEs","BoostedComponentQEUtils","BoostedPostCreativeStoreV2","adsLWIAdproObjectiveDataSelector","adsLWIAdproObjectiveSelector","adsLWINewAdInfoStoreDataSelector","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("immutable").Set([b("AdproObjectiveType").LINK_CLICKS,b("AdproObjectiveType").VIDEO_VIEWS,b("AdproObjectiveType").REACH,b("AdproObjectiveType").MESSAGES,b("AdproObjectiveType").WEBSITE_CONVERSIONS]);function a(a,c,d){__p&&__p();if(a!==b("BoostedComponentAppID").BOOSTED_POST||!d)return d;b("AdsDataAtom").waitFor([b("BoostedComponentContextStoreV2").getDispatchToken()]);a=b("BoostedComponentContextStoreV2").getDataByKey(c);var e=!!a.get("page_connected_instagram_account_id");if(e)return d;b("AdsDataAtom").waitFor([].concat(b("AdsSelectorUtils").getStoreDispatchTokens([b("adsLWINewAdInfoStoreDataSelector"),b("adsLWIAdproObjectiveDataSelector")]),[b("BoostedComponentExistingAdInfoStoreV2").getDispatchToken(),b("BoostedPostCreativeStoreV2").getDispatchToken()]));e=b("BoostedPostCreativeStoreV2").getDataByKey(c);d=!!e.getCallToActionType()||!!a.getCallToActionType();return h(b("adsLWIAdproObjectiveSelector")(),d)}function h(a,c){c=a===b("AdproObjectiveType").POST_ENGAGEMENT&&c;if(g.has(a))return b("BoostedComponentQEUtils").getQE(b("BoostedComponentQEs").BOOSTED_POST_IG_PBIA_ON_BOOSTED_POST).getParamBool("allow_pbia_on_boosted_post",!1);return c?b("BoostedComponentQEUtils").getQE(b("BoostedComponentQEs").BOOSTED_POST_IG_PBIA_ON_BOOSTED_POST_WITH_CTA).getParamBool("allow_pbia_on_boosted_post_with_cta",!1):!1}e.exports={isInstagramEligible:a,shouldIncludeIgPlacementInBoostedPost:h}}),null);
__d("BoostedComponentAudienceValidator",["fbt","AdsLWIErrorCode"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(a){switch(a){case b("AdsLWIErrorCode").BOOSTED_POST_TARGET_COUNTRY_RESTRICTED:return[g._("You can't boost a post to countries where your Page isn't visible. Please edit your location targeting or change the country restrictions in your Page's settings.")];case b("AdsLWIErrorCode").CANNOT_USE_INVALID_TARGETING_FIELDS:return[g._("One or more of the selections used in any of the following fields: \"Fields of Study\", \"Schools\", \"Employers\" and \"Job Titles\" are no longer available. Please select from available options and try again.")];case b("AdsLWIErrorCode").CANOT_EXCLUDE_INTERESTED_IN:return[g._("You cannot exclude \"Interested In\" Targeting. Please update your targeting accordingly and try again")];case b("AdsLWIErrorCode").CANNOT_USE_INTERESED_IN_TARGETING:return[g._("You cannot use \"Interested In\" Targeting. Please update your targeting accordingly and try again.")];case b("AdsLWIErrorCode").CANNOT_USE_INVALID_DETAILED_TARGETING_FIELDS:return[g._("One or more of the selections used in detailed targeting are not valid for ads targeting. Please select from available options and try again.")];case b("AdsLWIErrorCode").AUDIENCE_SIZE_TOO_LOW:return[g._("The estimated reach of this promotion is too low. The reach must be greater than 20. Please expand the targeting and try again.")];case b("AdsLWIErrorCode").JOB_TARGETING_TOO_FEW_LOCATIONS:return[g._("Please pick at least one location for your audience.")];default:return null}};c=function(){return[g._("The phone number for your Call Now button can't be reached from the location that's selected for this promotion. Edit the location of your audience or edit your Call Now button on your Page.")]};e.exports={getAudienceValidationErrors:a,getAudienceInvalidPhoneError:c}}),null);
__d("BoostedComponentBudgetEstimationStoreData",["AdsCurrencyFormatter","BoostedComponentBaseStoreData","BoostedComponentBudgetType","BoostedComponentClientExceptionsTypedLogger","immutable","isEmpty"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={reachEstimatesFetched:!1,added_budget_value:500,add_budget_added:!1,add_budget_est_options:b("immutable").Map(),audience_size:0,add_budget_and_duration_est_options:b("immutable").Map(),add_budget_and_duration_est_selection:0,budget_est_type:null,budget_est_options:b("immutable").Map(),budgetList:null,budget_system_recommendations:b("immutable").List([]),budget_type:"",current_month_spend:null,eligible_budget_types:null,experiment_exposures:null,hasUserUpdated:!1,high_budget_threshold:0,initialSelectedBudgetValue:500,max_reach_possible:0,min_budget_recommendation:0,selected_add_budget_value:500,selected_add_duration_value:0,selected_budget_value:500,selected_monthly_budget_value:0,suggested_daily_budget:null,currency:"",has_custom_selected_value:!1,average_budgets:null,shouldExposeSmartDefaultsExp:!1};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getAddedBudgetValue=function(){return this.added_budget_value};d.getAddBudgetAdded=function(){return this.add_budget_added};d.getAudienceSize=function(){return this.audience_size};d.getBudgetEstOptions=function(){return this.budget_est_options};d.getAddBudgetEstOptions=function(){return this.add_budget_est_options};d.getAddBudgetAndDurationEstOptions=function(){return this.add_budget_and_duration_est_options};d.getAddBudgetAndDurationEstSelection=function(){return this.add_budget_and_duration_est_selection};d.getBudgetType=function(){return this.budget_type||b("BoostedComponentBudgetType").LIFETIME_BUDGET};d.getEligibleBudgetTypes=function(){return this.eligible_budget_types};d.getReachEstimatesFetched=function(){return this.reachEstimatesFetched};d.getSelectedBudgetValue=function(){return this.selected_budget_value};d.getSelectedMonthlyBudgetValue=function(){return this.selected_monthly_budget_value};d.getInitialSelectedBudgetValue=function(){return this.initialSelectedBudgetValue};d.getSelectedAddBudgetValue=function(){return this.selected_add_budget_value||0};d.getSelectedAddDurationValue=function(){return this.selected_add_duration_value||0};d.getHighBudgetThreshold=function(){return this.high_budget_threshold};d.getSelectedAddBudgetOptions=function(){return this.add_budget_est_options&&this.add_budget_est_options.get(String(this.selected_add_budget_value))||null};d.getSelectedBudgetOptions=function(){var a=this.getBudgetOptions(this.selected_budget_value);return!a||!(a instanceof b("immutable").Map)?null:a};d.getBudgetOptions=function(a){return this.budget_est_options&&this.budget_est_options.get(a)||null};d.getBudgetLowerEstimates=function(a){a=this.getBudgetOptions(a);return a?Number(a.get("estimates_lower"))||0:0};d.getBudgetUpperEstimates=function(a){a=this.getBudgetOptions(a);return a?Number(a.get("estimates_upper"))||0:0};d.getCurrency=function(){return this.currency};d.getSelectedAddBudgetLowerEstimates=function(){var a=this.getSelectedAddBudgetOptions();return a?a.get("estimates_lower")||0:0};d.getSelectedAddBudgetUpperEstimates=function(){var a=this.getSelectedAddBudgetOptions();return a?a.get("estimates_upper")||0:0};d.getSelectedBudgetLowerEstimates=function(){var a=this.getSelectedBudgetOptions();return a?Number(a.get("estimates_lower"))||0:0};d.getSelectedBudgetUpperEstimates=function(){var a=this.getSelectedBudgetOptions();return a?Number(a.get("estimates_upper"))||0:0};d.getSelectedBudgetBisonEstimate=function(){if(!this.hasSelectedBudgetOptions())return null;var a=this.getSelectedBudgetOptions();return a?Number(a.get("bison_estimate")):null};d.getSelectedBudgetLabel=function(){return b("AdsCurrencyFormatter").formatCurrencyWithOptionalDecimals(this.currency,this.selected_budget_value)};d.getBudgetSystemRecommendations=function(){return this.budget_system_recommendations};d.hasSelectedBudgetOptions=function(){return!!this.getSelectedBudgetOptions()};d.setAddBudgetValue=function(a){return this.set("added_budget_value",a)};d.setAddBudgetAdded=function(a){return this.set("add_budget_added",a)};d.setSelectedBudgetValue=function(a){return this.set("selected_budget_value",a)};d.setSelectedAddBudgetValue=function(a){return!a?this:this.set("selected_add_budget_value",a)};d.setSelectedAddDurationValue=function(a){return!a?this:this.set("selected_add_duration_value",a)};d.setBudgetEstOptions=function(a,c){__p&&__p();if(b("isEmpty")(a))return this;var d=b("immutable").fromJS(a);if(b("immutable").Map.isMap(d))a=b("immutable").fromJS(a).mapKeys(function(a){return parseInt(a,10)});else{d=new(b("BoostedComponentClientExceptionsTypedLogger"))().setEvent("data_error").setExceptionMessage("budgetEstOptions is not a Map: \n"+JSON.stringify(a));d.log();return this}return c?this.mergeDeep({budget_est_options:a}):this.merge({budget_est_options:a})};d.setAddBudgetEstOptions=function(a,b){if(!a)return this;return b?this.mergeDeep({add_budget_est_options:a}):this.merge({add_budget_est_options:a})};d.setAddBudgetAndDurationEstOptions=function(a,b){if(!a)return this;return b?this.mergeDeep({add_budget_and_duration_est_options:a}):this.merge({add_budget_and_duration_est_options:a})};d.setAddBudgetAndDurationEstSelection=function(a){return a==null?this:this.set("add_budget_and_duration_est_selection",a)};d.setBudgetSystemRecommendations=function(a){return a===null?this:this.set("budget_system_recommendations",a)};d.setCurrency=function(a){return a===null?this:this.set("currency",a)};d.setAudienceSize=function(a){return this.set("audience_size",a)};d.setReachEstimatesFetched=function(){return this.set("reachEstimatesFetched",!0)};d.hasChanged=function(){return this.initialSelectedBudgetValue!==this.selected_budget_value};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("BoostedComponentDurationStoreData",["BoostedComponentBaseStoreData","DateConsts","DateTime","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={campaign_length_options:b("immutable").List([]),campaign_start_time:null,can_run_continuously:!0,run_continuously:!1,selected_campaign_length:b("DateConsts").SEC_PER_WEEK,initialSelectedCampaignLength:b("DateConsts").SEC_PER_WEEK,latest_allowed_end_timestamp:0,is_scheduled_post:!1,shouldExposeSmartDefaultsExp:!1,scheduled_post_start_time:null};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getLatestAllowedCampaignEndTimestamp=function(){return this.latest_allowed_end_timestamp};d.getCampaignLength=function(){return this.selected_campaign_length};d.getCampaignLengthInDays=function(){return this.selected_campaign_length/b("DateConsts").SEC_PER_DAY};d.getCampaignStartTimeRaw=function(){return this.campaign_start_time};d.getCampaignStartTime=function(){var a=this.getCampaignStartTimeRaw();if(a)return a;a=b("DateTime").localNow().getUnixTimestampSeconds();if(!this.getIsScheduledPost())return a;var c=this.getScheduledPostStartTime();return!c?a:c>a?c:a};d.getCampaignEndTimestamp=function(){var a=this.getCampaignStartTime();return a+this.selected_campaign_length};d.getCampaignLengthOptions=function(){return this.campaign_length_options.map(function(a){return{duration:a.get("duration"),title:a.get("title")}})};d.getRunContinuously=function(){return this.run_continuously};d.getHideRunContinuously=function(){return this.can_run_continuously};d.setCampaignLengthInDays=function(a){return this.set("selected_campaign_length",a*b("DateConsts").SEC_PER_DAY)};d.setCampaignStartTime=function(a){return this.set("campaign_start_time",a)};d.setRunContinuously=function(a){return this.set("run_continuously",a)};d.getIsScheduledPost=function(){return this.is_scheduled_post};d.getScheduledPostStartTime=function(){return this.scheduled_post_start_time};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("XBoostedComponentFetchMinimumBudgetAndDurationDataController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ads/boosted_components/fetch_minimum_budget_data/",{currency:{type:"String",required:!0}})}),null);
__d("AdsLWIObjectiveMinimumBudgetDataProviderPlugin",["AdsLWIObjectiveMinimumBudgetDataLoader","LoadObjectMap","LoadObjectMapMutationUtil","promiseDone","promiseLoadObjectsFromKeys"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a,b){a(function(a){return a.merge(b.objectiveMinimumBudgetData)})}a={initialState:function(a){return b("LoadObjectMap").create(function(c){a(function(a){return b("LoadObjectMapMutationUtil").setValueListToLoading(a,c)}),b("promiseDone")(b("promiseLoadObjectsFromKeys")(c,function(a){return b("AdsLWIObjectiveMinimumBudgetDataLoader").fetchMinimumBudgets(a)}),function(b){g(a,{objectiveMinimumBudgetData:b})})})}};e.exports=a}),null);
__d("BoostedComponentAdgroupRunStatusSets",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ADGROUP_PAUSED:"ADGROUP_PAUSED",NOT_ARCHIVED_OR_DELETED:"NOT_ARCHIVED_OR_DELETED",NOT_ARCHIVED_OR_DELETED_OR_ADGROUP_PAUSED:"NOT_ARCHIVED_OR_DELETED_OR_ADGROUP_PAUSED"})}),null);
__d("BoostedAutomatedAdsCreativeRefreshState",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ACTIVE:1,INACTIVE:2})}),null);
__d("AdsLWICreativeRefreshDataProviderPlugin",["AdsLWICommonStoreState","AdsLWICreativeRefreshStoreDataRecord"],(function(a,b,c,d,e,f){"use strict";a="AdsLWICreativeRefreshStore";c={initialState:new(b("AdsLWICommonStoreState"))({storeName:a,emptyRecord:new(b("AdsLWICreativeRefreshStoreDataRecord"))()})};e.exports=c}),null);
__d("AdproRunStatus",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ACTIVE:1,ARCHIVED:3,NEW_DELETED:16,DISABLED:4,CAMPAIGN_GROUP_PAUSED:15,CAMPAIGN_PAUSED:7,ADGROUP_PAUSED:8,PENDING_REVIEW:9,PREAPPROVED:10,EDITED_NEVER_APPROVED:11,EDITED_AFTER_APPROVED:12,CREDIT_CARD_NEEDED:13,PENDING_PROCESS:17,WITH_ISSUES:18})}),null);
__d("BoostedComponentImageCreativeUtils",["AdsAdgroupPostTypeMutatorsUtils","AdsAPIAdgroupPaths","AdsCallToActionGeoUtils","AdsUEditorAdgroupAssetFeedMutators","AdsUnifiedCreativeAPIFieldMappings","ApiAdCreativeFields","ApiAdCreativeStorySpecFields","ApiAdObjectTypes","ApiCallToActionFields","ApiObjectStorySpecLinkChildFields","ApiObjectStorySpecLinkFields","ApiObjectStorySpecVideoFields","ApiPlaceDataTypes","BoostedComponentAppID","CallToActionAppDestination","CallToActionValueFields","immutable","keyMirror"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsUnifiedCreativeAPIFieldMappings").LINK_MAPPING,h=b("AdsUnifiedCreativeAPIFieldMappings").VIDEO_MAPPING,i=b("keyMirror")({INSTAGRAM:null,OTHER:null,PAGE:null,STOCK:null,UPLOAD:null});function a(a){if(a.getImageType()==="PAGE")return i.PAGE;else if(a.isStockImage())return i.STOCK;else if(a.getImageType()==="INSTAGRAM")return i.INSTAGRAM;else return i.OTHER}function c(a,c,d,e,f,g){var h={};h[b("ApiObjectStorySpecLinkFields").LINK]=a;h[b("ApiObjectStorySpecLinkFields").MESSAGE]=c;h[b("ApiObjectStorySpecLinkFields").NAME]=d;h[b("ApiObjectStorySpecLinkFields").PICTURE]=e;h[b("ApiObjectStorySpecLinkFields").IMAGE_HASH]=f;g&&(h[b("ApiObjectStorySpecLinkFields").IMAGE_CROPS]=g);return b("immutable").fromJS(h)}function d(a,c,d){__p&&__p();var e=!!c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA]);if(e){e=c||b("immutable").Map();var f=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").MESSAGE]),g=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]),h=c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS]);if(h&&!h.isEmpty()){h=h.map(function(a){return a.set(b("ApiObjectStorySpecLinkChildFields").LINK,g)});e=e.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS],h)}e=e.withMutations(function(a){return a.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").MESSAGE],f).setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").LINK],g)});h=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").APP_DESTINATION],null);(d===b("BoostedComponentAppID").BOOSTED_EVENT||d===b("BoostedComponentAppID").BOOSTED_LEAD_GEN||h&&h===b("CallToActionAppDestination").MESSENGER&&d===b("BoostedComponentAppID").BOOSTED_PAGE)&&(e=e.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,b("ApiCallToActionFields").TYPE],a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").TYPE])));h&&h===b("CallToActionAppDestination").MESSENGER&&d===b("BoostedComponentAppID").BOOSTED_PAGE&&(e=e.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").APP_DESTINATION],h));d=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE]);d&&(e=e.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE],d));return e}else return c.set(b("ApiAdCreativeFields").BODY,a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").MESSAGE]))}function f(a,c,d){c=b("AdsCallToActionGeoUtils").parseGeoLink(c.get("value").get("link"));if(!c||a.size===0)return a;d=b("immutable").fromJS({link:a.get(0).get("link"),name:a.get(0).get("name"),place_data:{type:b("ApiPlaceDataTypes").SINGLE,address_string:c.get("name"),label:d,latitude:c.get("coordinates").latitude,longitude:c.get("coordinates").longitude}});c=1;return a.splice(c,0,d)}function j(a){return a.filter(function(a){return a&&!a.get("place_data")})}function k(a,c,d,e,f,i){if(i)return b("AdsUEditorAdgroupAssetFeedMutators").convertToAssetFeedSpec(b("ApiAdObjectTypes").VIDEO,a);else{i=a;f==="boosted_website"&&(i=i.deleteIn(h.linkURL));a=b("AdsAdgroupPostTypeMutatorsUtils").convertPostTypeInAdgroupRecord(b("ApiAdObjectTypes").VIDEO,b("ApiAdObjectTypes").SHARE,i,c,b("immutable").List([b("AdsAPIAdgroupPaths").CREATIVE.OBJECT_STORY_SPEC.VIDEO_DATA.path]));(a.getIn(g.imageURL)==null||a.getIn(g.imageURL)==="")&&(a.getIn(g.imageHash)==null||a.getIn(g.imageHash)==="")&&(a=a.setIn(g.imageURL,d));(a.getIn(g.linkURL)==null||a.getIn(g.linkURL)==="")&&(a=a.setIn(g.linkURL,e));return a}}e.exports={addMapCard:f,removeMapCards:j,BoostedComponentImageTypeEnum:i,getImageTypeForLogging:a,buildObjectStorySpecLinkDataSpec:c,getImageCreativeSpecFromVideoCreativeSpec:d,convertVideoAdgroupSpecToImageAdgroupSpec:k}}),null);
__d("BoostedComponentVideoElement",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({IMAGE_URL:"image_url",VIDEO_ID:"video_id",IS_UNPUBLISHED_SLIDESHOW:"is_unpublished_slideshow",VIDEO_NAME:"video_name",VIDEO_SOURCE:"video_source",VIDEO_THUMBNAILS:"video_thumbnails",VIDEO_PREFERRED_THUMBNAIL_INDEX:"video_preferred_thumbnail_index"})}),null);
__d("BoostedComponentVideoCreativeUtils",["Promise","AdproObjectiveType","AdsAdgroupPostTypeMutatorsUtils","AdsAPIAdgroupPaths","AdsAPIObjectives","AdsCallToActionTypes","AdsUEditorAdgroupAssetFeedMutators","AdsUnifiedCreativeAPIFieldMappings","AdsVideoFetcher","ApiAdCreativeFields","ApiAdCreativeStorySpecFields","ApiAdObjectTypes","ApiCallToActionFields","ApiObjectStorySpecLinkFields","ApiObjectStorySpecVideoFields","BoostedComponentAppID","BoostedComponentCreativeV2UpdateVideoLibraryAction","BoostedComponentProduct","BoostedComponentVideoElement","CallToActionAppDestination","CallToActionValueFields","immutable","nullthrows","promiseDone"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsUnifiedCreativeAPIFieldMappings").LINK_MAPPING,h=b("AdsUnifiedCreativeAPIFieldMappings").PAGE_MAPPING,i=b("AdsUnifiedCreativeAPIFieldMappings").VIDEO_MAPPING;c=function(a,c,d,e,f){a=[b("AdsVideoFetcher").genAdAccountVideos(a)];c&&a.unshift(b("AdsVideoFetcher").genPageVideos(c));b("promiseDone")(b("Promise").all(a).then(function(a){return Array.prototype.concat.apply([],a)}),function(a){b("BoostedComponentCreativeV2UpdateVideoLibraryAction").dispatch({videoData:b("immutable").fromJS(a),pageID:c,appID:d,targetID:e,boostID:f},{line:"69",module:"BoostedComponentVideoCreativeUtils.js"})})};d=function(a,c,d,e){__p&&__p();if(d){var f;d=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").APP_DESTINATION],null);var g;e===b("BoostedComponentAppID").BOOSTED_EVENT||e===b("BoostedComponentAppID").BOOSTED_LEAD_GEN||d&&d===b("CallToActionAppDestination").MESSENGER&&e===b("BoostedComponentAppID").BOOSTED_PAGE?g=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,b("ApiCallToActionFields").TYPE]):g=c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").TYPE]);var h=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]);h||(h=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").LINK]));var i=c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_TITLE]),j=b("immutable").fromJS((f={},f[b("ApiCallToActionFields").TYPE]=g,f[b("ApiCallToActionFields").VALUE]=(g={},g[b("CallToActionValueFields").LINK]=h,g[b("CallToActionValueFields").LINK_TITLE]=i,g),f));h=c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LEAD_GEN_FORM_ID],null);h&&(j=j.setIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LEAD_GEN_FORM_ID],h));i=c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_FORMAT],null);i&&(j=j.setIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_FORMAT],i));d&&d===b("CallToActionAppDestination").MESSENGER&&e===b("BoostedComponentAppID").BOOSTED_PAGE&&(j=j.setIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").APP_DESTINATION],d));g=c.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").EVENT_ID],null);g&&(j=j.setIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").EVENT_ID],g));f=c.withMutations(function(c){return c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").MESSAGE],a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").MESSAGE])).setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],j)});h=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE]);h&&(f=f.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE],h));return f}else return c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").MESSAGE],a.get(b("ApiAdCreativeFields").BODY))};function j(a,c,d){return c?c.setIn(i.message,a.getIn(h.message)):a.withMutations(function(c){return c.removeIn(b("AdsAPIAdgroupPaths").CREATIVE.path).setIn(b("AdsAPIAdgroupPaths").CREATIVE.OBJECT_TYPE,b("ApiAdObjectTypes").VIDEO).setIn(i.pageID,a.getIn(h.pageID)).setIn(i.message,a.getIn(h.message)).setIn(i.videoID,d&&d.get(b("BoostedComponentVideoElement").VIDEO_ID)).setIn(i.videoThumbnailURL,d&&d.get(b("BoostedComponentVideoElement").IMAGE_URL)).setIn(i.callToActionType,b("AdsCallToActionTypes").TYPES.LIKE_PAGE.name).setIn(b("nullthrows")(i.callToActionValue).concat(b("CallToActionValueFields").PAGE),a.getIn(h.pageID))})}var k=b("immutable").Set([b("BoostedComponentProduct").BOOSTED_REAL_ESTATE_LISTING,b("BoostedComponentProduct").BOOSTED_WEBSITE,b("BoostedComponentProduct").BOOSTED_PURCHASE]);function a(a,c,d,e,f,h){var i=a.getIn(b("AdsAPIAdgroupPaths").CREATIVE.OBJECT_TYPE);if(i===b("ApiAdObjectTypes").PAGE)return j(a,c,d);else if(h)return b("AdsUEditorAdgroupAssetFeedMutators").convertFromAssetFeedSpec(b("ApiAdObjectTypes").VIDEO,a,b("AdsAPIObjectives").LINK_CLICKS,c);else{i=a;!k.contains(f)&&(e!==b("AdproObjectiveType").LINK_CLICKS||i.getIn(g.callToActionType)===b("AdsCallToActionTypes").TYPES.CALL_NOW.name)&&e!==b("AdproObjectiveType").WEBSITE_CONVERSIONS&&(i=i.deleteIn(g.linkURL));return b("AdsAdgroupPostTypeMutatorsUtils").convertPostTypeInAdgroupRecord(b("ApiAdObjectTypes").SHARE,b("ApiAdObjectTypes").VIDEO,i,c,b("immutable").List([b("AdsAPIAdgroupPaths").CREATIVE.OBJECT_STORY_SPEC.LINK_DATA.path]))}}e.exports={getVideoLibrary:c,getVideoCreativeSpecFromImageCreativeSpec:d,convertImageAdgroupSpecToVideoAdgroupSpec:a}}),null);
__d("AdsVideoChunkedUploader",["AdsGraphAPI","AdsVideoUploadEvents","AdsVideoUploadSession","AdsVideoUploadUtil","URI","VideoUploader","VideoUploadProgressBar","gkx"],(function(a,b,c,d,e,f){__p&&__p();var g="graph-video";a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c){__p&&__p();var d=c.config,e="/v"+b("AdsGraphAPI").getVersion();e=new(b("URI"))(e+"/act_"+c.target_id+"/advideos?access_token="+c.access_token).setSubdomain(g).toString();if(b("gkx")("780478")){var f=d;f.start_uri=e;f.receive_uri=e;f.post_uri=e;f.chunk_start_uri=e;f.chunk_receive_uri=e;f.chunk_post_uri=e;f.max_size=Number.MAX_VALUE;f.max_length=Number.MAX_VALUE;f.target_id="act_"+c.target_id;f.target_type=c.target_type;f.source=c.source;f.max_aspect_ratio=Number.MAX_VALUE;f.min_aspect_ratio=0;c.waterfall_id!=null&&(f.waterfall_id=c.waterfall_id);f=a.call(this,f)||this}else{e={start_uri:e,receive_uri:e,post_uri:e,chunk_start_uri:e,chunk_receive_uri:e,chunk_post_uri:e,min_size:d.min_size,min_width:d.min_width,min_height:d.min_height,min_length:d.min_length,max_size:Number.MAX_VALUE,max_length:Number.MAX_VALUE,extensions:d.extensions,logging_delay:d.logging_delay,max_transport_retries:d.max_transport_retries,transport_retry_interval_base:d.transport_retry_interval_base,max_server_retries:d.max_server_retries,server_retry_interval_base:d.server_retry_interval_base,default_chunk_size:d.default_chunk_size,parallel_chunk_upload_filesize:d.parallel_chunk_upload_filesize,parallel_chunk_uploads:d.parallel_chunk_uploads,background_upload:d.background_upload,composer_entry_point_ref:d.composer_entry_point_ref,max_response_timeout_retries:d.max_response_timeout_retries,monitor_crashes:d.monitor_crashes,receive_errors_force_retry:d.receive_errors_force_retry,response_timeout_enabled:d.response_timeout_enabled,response_timeout_speed_variation_factor_ppt:d.response_timeout_speed_variation_factor_ppt,silent_file_validation:d.silent_file_validation,skip_upload_enabled:d.skip_upload_enabled,skip_upload_file_size_limit:d.skip_upload_file_size_limit,source:c.source,target_id:"act_"+c.target_id,target_type:c.target_type,access_token:d.access_token,resumability_enabled:d.resumability_enabled,change_default_chunk_size:d.change_default_chunk_size,client_chunk_size:d.client_chunk_size};c.waterfall_id!=null&&(e.waterfall_id=c.waterfall_id);f=a.call(this,e)||this}return babelHelpers.assertThisInitialized(f)}var d=c.prototype;d.getUploadTime=function(){return this.__getSession()!==null?this.__getSession().getUploadTime():null};d.getEncodingTime=function(){return this.__getSession()!==null?this.__getSession().getEncodingTime():null};d.abort=function(){this.cancel()};d.upload=function(c){var d=c.getFile();this.$AdsVideoChunkedUploader1=b("AdsVideoUploadUtil").getVideoTitle(d);a.prototype.upload.call(this,c)};d.__getVideoUploadSession=function(a){return new(b("AdsVideoUploadSession"))(a)};d.getVideoTitle=function(){return this.$AdsVideoChunkedUploader1};d.__createSession=function(a){return new(b("AdsVideoUploadSession"))(a)};d.__getEventsWhichShouldListenFromSession=function(){var c=a.prototype.__getEventsWhichShouldListenFromSession.call(this);c.push(b("AdsVideoUploadEvents").ENCODING_SUCCESS,b("AdsVideoUploadEvents").ENCODING_ERROR);return c};d.__getEventsForWhichSessionShouldBeSetToNull=function(){return["upload-failed",b("AdsVideoUploadEvents").ENCODING_SUCCESS,b("AdsVideoUploadEvents").ENCODING_ERROR]};d.__delegateEvent=function(c,d){if(c==="upload-progressed"){var e=b("VideoUploadProgressBar").computeProgress(d.start_offset,d.sent_bytes,d.file_size,0,0);d=e/100}else c==="upload-finished"?this.post({}):c==="post-finished"?d=d.video_id:c==="post-failed"&&(c="upload-failed");a.prototype.__delegateEvent.call(this,c,d)};return c}(b("VideoUploader"));e.exports=a}),null);
__d("AdsVideoUploadErrorTypes",["keyMirror"],(function(a,b,c,d,e,f){"use strict";a=b("keyMirror")({CONNECTION:null,API:null});e.exports=a}),null);
__d("Stopwatch",["performanceNow"],(function(a,b,c,d,e,f){__p&&__p();a=function(){"use strict";function a(){this.reset()}var c=a.prototype;c.reset=function(){this.$1=b("performanceNow")()};c.read=function(){return b("performanceNow")()-this.$1};return a}();e.exports=a}),null);
__d("AdsVideoUploader",["AdsVideoEncodingAsyncNotifier","AdsVideoUploadErrorTypes","AdsVideoUploadEvents","AdsVideoUploadUtil","ArbiterMixin","Stopwatch","VideoAdCreationLoggerEvent","VideoUploadLogger","WaterfallIDGenerator","curry","gkx","mixin","setTimeout"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=12e4;function h(a){return a>=200&&a<=299}a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c,d,e,f){__p&&__p();var g;g=a.call(this)||this;g.$AdsVideoUploader22=function(a){__p&&__p();g.$AdsVideoUploader4=g.$AdsVideoUploader5.read();if(g.$AdsVideoUploader13&&!h(g.$AdsVideoUploader13.status)){g.$AdsVideoUploader23({reason:b("AdsVideoUploadErrorTypes").API,status:g.$AdsVideoUploader13.status,message:g.$AdsVideoUploader13.responseText});return}g.$AdsVideoUploader7=new(b("Stopwatch"))();g.$AdsVideoUploader10=g.$AdsVideoUploader13?JSON.parse(g.$AdsVideoUploader13.responseText).id:"";g.$AdsVideoUploader13=null;g.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_FINISHED_UPLOADING,{elapsed_time:Math.round(g.$AdsVideoUploader4)});g.inform(b("AdsVideoUploadEvents").UPLOAD_SUCCESS,g.$AdsVideoUploader10);g.$AdsVideoUploader26()};g.$AdsVideoUploader23=function(a){g.$AdsVideoUploader13=null,g.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_FAILED_UPLOADING),g.inform(b("AdsVideoUploadEvents").UPLOAD_ERROR,a)};g.$AdsVideoUploader24=function(a){if(a.lengthComputable){a=a.loaded/a.total;g.inform(b("AdsVideoUploadEvents").UPLOAD_PROGRESS,a)}};g.$AdsVideoUploader1=c;g.$AdsVideoUploader2=d;g.$AdsVideoUploader3=0;g.$AdsVideoUploader4=0;g.$AdsVideoUploader6=0;g.$AdsVideoUploader8=e;g.$AdsVideoUploader17=f;return g}var d=c.prototype;d.remoteUpload=function(a,c){this.$AdsVideoUploader9=c;var d=b("WaterfallIDGenerator").generate();this.$AdsVideoUploader18(d,!0);var e=new FormData();e.append("waterfall_id",d);e.append("name",c);e.append("file_url",a);this.$AdsVideoUploader19(e)};d.uploadInstagramVideo=function(a,c){this.$AdsVideoUploader9="";var d=b("WaterfallIDGenerator").generate();this.$AdsVideoUploader18(d,!0);var e=new FormData();e.append("waterfall_id",d);e.append("description",c);e.append("instagram_story_id",a);this.$AdsVideoUploader19(e)};d.uploadSourceInstagramMediaVideo=function(a,c){this.$AdsVideoUploader9="";var d=b("WaterfallIDGenerator").generate();this.$AdsVideoUploader18(d,!0);var e=new FormData();e.append("waterfall_id",d);e.append("description",c);e.append("source_instagram_media_id",a);this.$AdsVideoUploader19(e)};d.uploadMessengerVideo=function(a){this.$AdsVideoUploader9=a.getFile().name;this.$AdsVideoUploader11=a;var c=b("WaterfallIDGenerator").generate();this.$AdsVideoUploader18(c,!1);var d=new FormData();d.append("waterfall_id",c);d.append("source",a.getFile(),this.$AdsVideoUploader9);this.$AdsVideoUploader19(d)};d.upload=function(a){var c=a.getFile();this.$AdsVideoUploader9=b("AdsVideoUploadUtil").getVideoTitle(c)||"";this.$AdsVideoUploader11=a;this.$AdsVideoUploader17==null&&(this.$AdsVideoUploader17=b("WaterfallIDGenerator").generate());this.$AdsVideoUploader18(this.$AdsVideoUploader17,!1);a=new FormData();a.append("waterfall_id",this.$AdsVideoUploader17);a.append("source",c,this.$AdsVideoUploader9);this.$AdsVideoUploader19(a)};d.$AdsVideoUploader18=function(a,c){this.$AdsVideoUploader12=new(b("VideoUploadLogger"))({source:this.$AdsVideoUploader8,waterfall_id:a,target_id:"act_"+this.$AdsVideoUploader1,delay:1e3,is_chunked_upload:!1,is_remote_upload:c})};d.$AdsVideoUploader19=function(a){var c=b("AdsVideoUploadUtil").getPostEndpoint(this.$AdsVideoUploader2,this.$AdsVideoUploader1,this.$AdsVideoUploader9);this.$AdsVideoUploader5=new(b("Stopwatch"))();this.$AdsVideoUploader13=new XMLHttpRequest();this.$AdsVideoUploader20();this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_STARTED_UPLOADING);this.$AdsVideoUploader13&&this.$AdsVideoUploader13.open("POST",c,!0);this.$AdsVideoUploader13&&this.$AdsVideoUploader13.send(a)};d.$AdsVideoUploader20=function(){this.$AdsVideoUploader13&&this.$AdsVideoUploader13.addEventListener("load",this.$AdsVideoUploader22),this.$AdsVideoUploader13&&this.$AdsVideoUploader13.addEventListener("error",b("curry")(this.$AdsVideoUploader23,{reason:b("AdsVideoUploadErrorTypes").CONNECTION})),this.$AdsVideoUploader13&&this.$AdsVideoUploader13.upload.addEventListener("progress",this.$AdsVideoUploader24)};d.$AdsVideoUploader25=function(){this.$AdsVideoUploader13&&this.$AdsVideoUploader13.removeEventListener("load",this.$AdsVideoUploader22),this.$AdsVideoUploader13&&this.$AdsVideoUploader13.removeEventListener("error",b("curry")(this.$AdsVideoUploader23,{reason:b("AdsVideoUploadErrorTypes").CONNECTION})),this.$AdsVideoUploader13&&this.$AdsVideoUploader13.upload.removeEventListener("progress",this.$AdsVideoUploader24)};d.abort=function(){this.$AdsVideoUploader14=!0,this.$AdsVideoUploader13&&(this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_CANCELED_UPLOADING),this.$AdsVideoUploader25(),this.$AdsVideoUploader13&&this.$AdsVideoUploader13.abort(),this.$AdsVideoUploader13=null)};d.getVideoTitle=function(){return this.$AdsVideoUploader9};d.getUploadTime=function(){return this.$AdsVideoUploader4};d.getEncodingTime=function(){return this.$AdsVideoUploader6};d.$AdsVideoUploader26=function(){__p&&__p();var a=this;this.$AdsVideoUploader15=!1;this.$AdsVideoUploader16=!1;var c=new(b("AdsVideoEncodingAsyncNotifier"))(this.$AdsVideoUploader10);c.setOnStatusUpdateListener(function(){return a.$AdsVideoUploader27()});c.setOnFailedListener(function(){return a.$AdsVideoUploader28()});c.setOnSuccessListener(function(b){return a.$AdsVideoUploader29(b)});c.setOnEncodingStatusFetchStartListener(function(){return a.$AdsVideoUploader30()});c.setOnEncodingStatusFetchFinishListener(function(){return a.$AdsVideoUploader31()});c.setOnFetchFailedListener(function(){return a.$AdsVideoUploader32()});b("gkx")("914548")?(this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_ENCODING_SUBSCRIBE_TO_VIDEO_STATUS),c.subscribeToAdsVideoStatus(),b("setTimeout")(function(){return a.$AdsVideoUploader33(c)},g)):c.start()};d.$AdsVideoUploader33=function(a){if(this.$AdsVideoUploader15)return;this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_ENCODING_POLLING_FALLBACK);a.start()};d.$AdsVideoUploader32=function(){this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_FETCH_FAIL_OBSERVED)};d.$AdsVideoUploader28=function(){this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_ENCODING_FAIL_OBSERVED)};d.$AdsVideoUploader29=function(a){if(this.$AdsVideoUploader14){this.$AdsVideoUploader21(b("VideoAdCreationLoggerEvent").EVENT_ENCODING_ABORT_OBSERVED);return}this.$AdsVideoUploader15||(this.$AdsVideoUploader15=!0,this.$AdsVideoUploader6=this.$AdsVideoUploader7.read(),this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_ENCODING_SUCCESS_OBSERVED,{elapsed_time:Math.round(this.$AdsVideoUploader6)}),this.inform(b("AdsVideoUploadEvents").ENCODING_SUCCESS,a))};d.$AdsVideoUploader27=function(){if(this.$AdsVideoUploader14){this.$AdsVideoUploader21(b("VideoAdCreationLoggerEvent").EVENT_ENCODING_ABORT_OBSERVED);return}this.$AdsVideoUploader16||(this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_ENCODING_START_OBSERVED),this.$AdsVideoUploader16=!0)};d.$AdsVideoUploader30=function(){this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_STARTED_FETCHING_STATUS,{})};d.$AdsVideoUploader31=function(){this.$AdsVideoUploader21(b("VideoUploadLogger").EVENT_FINISHED_FETCHING_STATUS,{})};d.$AdsVideoUploader21=function(a,b){if(!this.$AdsVideoUploader12)return;b=b||{};this.$AdsVideoUploader11&&(b=babelHelpers["extends"]({},b,{file_size:this.$AdsVideoUploader11.getSize(),file_extension:this.$AdsVideoUploader11.getExtension()}));this.$AdsVideoUploader12.logEvent(a,b)};return c}(b("mixin")(b("ArbiterMixin")));e.exports=a}),null);
__d("BoostedComponentVideoSource",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({UPLOAD:"upload",BROWSE_LIBRARY:"browse_library",PRELOAD_VIDEO:"preload_video"})}),null);
__d("BoostedComponentVideoUploaderV2",["AdsVideoChunkedUploader","AdsVideoUploadConfig","AdsVideoUploader","AdsVideoUploadEvents","BoostedComponentCreativeV2VideoEncodingSuccessAction","BoostedComponentCreativeV2VideoUploadErrorAction","BoostedComponentCreativeV2VideoUploadProgressAction","BoostedComponentCreativeV2VideoUploadSuccessAction","BoostedComponentVideoSource","VideoUploadFeatureDetector","VideoUploadTargetType"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="boosted_component";a=function(){__p&&__p();function a(a,c,d,e){__p&&__p();var f=this;e===void 0&&(e=!1);this.$8=function(a,c){b("BoostedComponentCreativeV2VideoUploadSuccessAction").dispatch({instanceID:f.$3},{line:"130",module:"BoostedComponentVideoUploaderV2.js"})};this.$9=function(a,c){b("BoostedComponentCreativeV2VideoUploadErrorAction").dispatch({details:c,instanceID:f.$3},{line:"137",module:"BoostedComponentVideoUploaderV2.js"})};this.$10=function(a,c){b("BoostedComponentCreativeV2VideoUploadProgressAction").dispatch({progressValue:c,instanceID:f.$3},{line:"143",module:"BoostedComponentVideoUploaderV2.js"})};this.$11=function(a,c){b("BoostedComponentCreativeV2VideoEncodingSuccessAction").dispatch({video:c,videoSource:b("BoostedComponentVideoSource").UPLOAD,instanceID:f.$3},{line:"149",module:"BoostedComponentVideoUploaderV2.js"})};this.$1=a;this.$2=c;this.$3=d;this.$4=e}var c=a.prototype;c.upload=function(a){b("AdsVideoUploadConfig").use_chunked_upload&&b("VideoUploadFeatureDetector").supportsChunking()&&!this.$4?this.$5=this.$6():this.$5=this.$7(),this.$5.upload(a)};c.remoteUpload=function(a,b){this.$5=this.$7(),this.$5.remoteUpload(a,b)};c.$6=function(){__p&&__p();var a=this,c=new(b("AdsVideoChunkedUploader"))({config:b("AdsVideoUploadConfig"),source:g,target_id:this.$2,target_type:b("VideoUploadTargetType").ADMARKET_ACCOUNT,access_token:this.$1});c.subscribe("post-finished",function(b,c){return a.$8(b,c)});c.subscribe("upload-failed",function(b,c){return a.$9(b,c)});c.subscribe("upload-progressed",function(b,c){return a.$10(b,c)});c.subscribe(b("AdsVideoUploadEvents").ENCODING_SUCCESS,function(b,c){return a.$11(b,c)});return c};c.$7=function(){var a=new(b("AdsVideoUploader"))(this.$2,this.$1,g);a.subscribe(b("AdsVideoUploadEvents").UPLOAD_SUCCESS,this.$8);a.subscribe(b("AdsVideoUploadEvents").UPLOAD_ERROR,this.$9);a.subscribe(b("AdsVideoUploadEvents").UPLOAD_PROGRESS,this.$10);a.subscribe(b("AdsVideoUploadEvents").ENCODING_SUCCESS,this.$11);return a};c.abort=function(){this.$5.abort()};c.getUploader=function(){return this.$5};return a}();e.exports=a}),null);
__d("BoostedActionCreativeStoreData_DEPRECATED",["invariant","AdsAPIAdgroupCreativeRecord","AdsCallToActionGeoUtils","AdsCallToActionTypes","AdsImageLegacy","AdsImageStore","AdsUIMediaFormat","AdsVideoUploadStatus","ApiAdCreativeFields","ApiAdCreativeStorySpecFields","ApiCallToActionFields","ApiObjectStorySpecLinkChildFields","ApiObjectStorySpecLinkFields","ApiObjectStorySpecVideoFields","BoostedComponentAppID","BoostedComponentBaseStoreData","BoostedComponentCreativeCategory","BoostedComponentImageCreativeUtils","BoostedComponentVideoCreativeUtils","BoostedComponentVideoElement","BoostedComponentVideoUploaderV2","CallToActionValueFields","FBLogger","ShutterstockImageUtils","VideoUploadFile","immutable","nullthrows"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("BoostedComponentImageCreativeUtils").getImageCreativeSpecFromVideoCreativeSpec,i=b("BoostedComponentVideoCreativeUtils").getVideoCreativeSpecFromImageCreativeSpec;function j(a,c){c=b("AdsImageStore").getImageByHash_DEPRECATED(c,a);return c?c.url:null}a={adgroupID:null,currentVideoThumbnail:null,initialValue:new(b("AdsAPIAdgroupCreativeRecord"))(),isSlideshowProcessing:!1,isSlideshowSelected:!1,isUnpublishedSlideShow:!1,selectedAttachmentIndex:0,pageLink:"",selectedAccountID:"",stockImageMap:b("immutable").Map(),videoIDForNameFallback:null,videoLibrary:b("immutable").List(),videoLibraryMap:b("immutable").Map(),videoLibraryUpToDate:!1,videoName:null,videoSource:null,videoThumbnails:b("immutable").List(),videoUploader:null,videoUploadError:!1,videoUploadProgress:0,videoUploadStatus:b("AdsVideoUploadStatus").NONE,ads_cta_options_specs:b("immutable").Map(),default_creative_spec:new(b("AdsAPIAdgroupCreativeRecord"))(),default_image_creative_spec:new(b("AdsAPIAdgroupCreativeRecord"))(),default_video_creative_spec:new(b("AdsAPIAdgroupCreativeRecord"))(),display_phone_number_cache:b("immutable").Map(),instagram_actor_id:null,instagram_validation_exception:null,is_page_messaging_disabled:void 0,is_validating_message_page_cta:!1,page_name:"",placements:[],preload_video_creative_spec:new(b("AdsAPIAdgroupCreativeRecord"))(),audienceNetworkPlacementEligible:!1,instagramPlacementEligible:!1,instagramPlacementRemoved:!1,selectedMediaFormat:b("AdsUIMediaFormat").SINGLE_IMAGE};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getCreativeSpec=function(){return this.default_creative_spec};d.setCreativeSpec=function(a){return this.set("default_creative_spec",a).set("adgroupID",null)};d.setCreativeSpecField=function(a,b){var c=this.getCreativeSpec();c=c.set(a,b);return this.setCreativeSpec(c)};d.setAuthorizationCategory=function(a){return this.setCreativeSpecField(b("ApiAdCreativeFields").AUTHORIZATION_CATEGORY,a)};d.getAuthorizationCategory=function(){return this.getCreativeSpec().get(b("ApiAdCreativeFields").AUTHORIZATION_CATEGORY)};d.setInstagramActorIDInCreativeSpec=function(){if(this.instagram_actor_id!=null&&this.instagram_actor_id!==""){var a=this.getCreativeSpec();a=a.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").INSTAGRAM_ACTOR_ID],this.instagram_actor_id);var c=this.getDefaultCreativeSpecForImage(),d=this.getDefaultCreativeSpecForVideo();c&&(c=c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").INSTAGRAM_ACTOR_ID],this.instagram_actor_id));d&&(d=d.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").INSTAGRAM_ACTOR_ID],this.instagram_actor_id));return this.setCreativeSpec(a).setDefaultImageCreativeSpec(c).setDefaultVideoCreativeSpec(d)}return this};d.getDefaultCreativeSpecForImage=function(){return this.default_image_creative_spec};d.setDefaultImageCreativeSpec=function(a){return this.set("default_image_creative_spec",a)};d.getDefaultCreativeSpecForVideo=function(){return this.default_video_creative_spec};d.setDefaultVideoCreativeSpec=function(a){return this.set("default_video_creative_spec",a)};d.getCreativeCategory=function(){return this.getIsStorySpecVideoDataCreative()?b("BoostedComponentCreativeCategory").VIDEO:b("BoostedComponentCreativeCategory").IMAGE};d.getObjectStorySpec=function(){var a=this.getCreativeSpec();return a.get(b("ApiAdCreativeFields").OBJECT_STORY_SPEC)};d.getObjectStorySpecLinkData=function(){var a=this.getObjectStorySpec();return!a?null:a.get(b("ApiAdCreativeStorySpecFields").LINK_DATA)};d.getIsStorySpecLinkDataCreative=function(){return!!this.getObjectStorySpecLinkData()};d.setObjectStorySpecLinkDataField=function(a,c,d){d=this.getObjectStorySpecLinkData();if(!d)return this;d=d.set(a,c);return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").LINK_DATA,d)};d.getChildAttachmentDataByField=function(a){var b=this.getProductsSpec();b&&b.size>1||g(0,1648);return b.getIn([this.getSelectedAttachmentIndex(),a],null)};d.getObjectStorySpecVideoData=function(){var a=this.getObjectStorySpec();return!a?null:a.get(b("ApiAdCreativeStorySpecFields").VIDEO_DATA)};d.setObjectStorySpecVideoDataField=function(a,c){var d=this.getObjectStorySpecVideoData();if(!d)return this;d=d.set(a,c);return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").VIDEO_DATA,d)};d.deleteObjectStorySpecVideoDataField=function(a,c){c=this.getObjectStorySpecVideoData();if(!c)return this;c=c["delete"](a);return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").VIDEO_DATA,c)};d.getIsStorySpecVideoDataCreative=function(){return!!this.getObjectStorySpecVideoData()};d.setObjectStorySpecDataSpec=function(a,c){var d=this.getCreativeSpec();d=d.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,a],this.$CreativeStoreData1(a,c));return this.setCreativeSpec(d)};d.$CreativeStoreData1=function(a,c){var d=c.get(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS);if(a!==b("ApiAdCreativeStorySpecFields").LINK_DATA||!this.$CreativeStoreData2()||!d||d.size===0)return c;a=d.get(0).merge((a={},a[b("ApiObjectStorySpecLinkChildFields").DESCRIPTION]=c.get(b("ApiObjectStorySpecLinkFields").DESCRIPTION),a[b("ApiObjectStorySpecLinkChildFields").NAME]=c.get(b("ApiObjectStorySpecLinkFields").NAME),a[b("ApiObjectStorySpecLinkChildFields").LINK]=c.get(b("ApiObjectStorySpecLinkFields").LINK),a[b("ApiObjectStorySpecLinkChildFields").IMAGE_HASH]=c.get(b("ApiObjectStorySpecLinkFields").IMAGE_HASH),a[b("ApiObjectStorySpecLinkChildFields").PICTURE]=c.get(b("ApiObjectStorySpecLinkFields").PICTURE),a));d=d.set(0,a);return c.set(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,d)};d.setCurrentObjectStorySpecDataSpec=function(a,c){__p&&__p();var d=this.getCreativeSpec();switch(a){case b("BoostedComponentCreativeCategory").VIDEO:var e=this.getDefaultCreativeSpecForVideo()||b("immutable").Map();e=i(d,e,this.getIsStorySpecLinkDataCreative(),c);var f=this.getPreloadVideoSpec(),g=this;if(e&&f&&!this.getVideoID()){var j=f.get(b("BoostedComponentVideoElement").VIDEO_THUMBNAILS),k=f.get(b("BoostedComponentVideoElement").VIDEO_PREFERRED_THUMBNAIL_INDEX),l=j.get(k);e=e.withMutations(function(a){return a.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").VIDEO_ID],f.get(b("BoostedComponentVideoElement").VIDEO_ID)).setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").IMAGE_URL],l&&l.uri)});g=this.withMutations(function(a){return a.setVideoIDForNameFallBack(f.get(b("BoostedComponentVideoElement").VIDEO_ID)).setVideoName(f.get(b("BoostedComponentVideoElement").VIDEO_NAME)).setVideoThumbnails(j).setVideoSource(f.get(b("BoostedComponentVideoElement").VIDEO_SOURCE)).set("currentVideoThumbnail",l)})}c===b("BoostedComponentAppID").BOOSTED_APP_INSTALL&&(g=this.withMutations(function(a){return a.setDefaultVideoCreativeSpec(e)}));return g.withMutations(function(a){return a.setDefaultImageCreativeSpec(d).abortVideoUpload().setVideoUploader(null).setCreativeSpec(e)});case b("BoostedComponentCreativeCategory").IMAGE:var m=this.getDefaultCreativeSpecForImage()||b("immutable").Map();m=h(d,m,c);return this.withMutations(function(a){return a.setCreativeSpec(m).setDefaultVideoCreativeSpec(d).setVideoUploadError(!1)});default:b("FBLogger")("boosted_componenet").warn("Invalid creative category type: %s",a);return this}};d.getObjectStorySpecDataType=function(){var a=this.getCreativeCategory();switch(a){case b("BoostedComponentCreativeCategory").IMAGE:return b("ApiAdCreativeStorySpecFields").LINK_DATA;case b("BoostedComponentCreativeCategory").VIDEO:return b("ApiAdCreativeStorySpecFields").VIDEO_DATA;default:b("FBLogger")("boosted_componenet").warn("Invalid objectStorySpecData type: %s",a);return null}};d.getIsUnpublishedSlideshow=function(){return this.isUnpublishedSlideShow};d.setIsUnpublishedSlideshow=function(a){return this.set("isUnpublishedSlideShow",a)};d.getInstagramActorID=function(){return this.instagram_actor_id};d.getInstagramValidationExceptionMessage=function(){return this.instagram_validation_exception};d.getAdsCallToActionOptionsSpecs=function(){return this.ads_cta_options_specs};d.getCallToActionType=function(){var a=this.getCallToAction();return a?a.get(b("ApiCallToActionFields").TYPE):null};d.getCallToActionValue=function(){var a=this.getCallToAction();return a?a.get(b("ApiCallToActionFields").VALUE):null};d.setObjectStorySpecCallToActionValueField=function(a,c){var d=this.getCallToAction();if(!d)return this;d=d.setIn([b("ApiCallToActionFields").VALUE,a],c);return this.setCallToActionInCreativeSpec(d)};d.getCallToAction=function(){var a=this.getCreativeSpec();if(!a)return null;var c=this.getObjectStorySpecDataType();return a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,c,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],null)};d.getWelcomeMessage=function(){var a=this.getCreativeSpec();if(!a)return null;var c=this.getObjectStorySpecDataType();return a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,c,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE],null)};d.setWelcomeMessageInCreativeSpec=function(a){var c=this.getCreativeSpec();if(!c)return this;var d=this.getObjectStorySpecDataType();c=c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,d,b("ApiObjectStorySpecLinkFields").PAGE_WELCOME_MESSAGE],a);return this.setCreativeSpec(c)};d.setCallToActionInCreativeSpec=function(a){if(this.$CreativeStoreData3())return this.setCallToActionInCreativeSpecForCarouselAds(a);var c=this.getCreativeSpec();if(!c)return this;var d=this.getObjectStorySpecDataType();c=c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,d,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],a);return this.setCreativeSpec(c)};d.setCallToActionInCreativeSpecForCarouselAds=function(a){__p&&__p();var c=this,d=this.getCreativeSpec();if(!d)return this;var e=this.getObjectStorySpecDataType(),f=this.getLinkURL();this.$CreativeStoreData2()&&(f=a&&a.get(b("ApiCallToActionFields").TYPE)===b("AdsCallToActionTypes").TYPES.LEARN_MORE.name?a.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]):this.getPageLink());var g=b("nullthrows")(this.getProductsSpec()),h=g.map(function(b){return c.$CreativeStoreData4(b,a,f)});g=d.withMutations(function(c){return c.setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,e,b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION],a).setIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,e,b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS],h)});return this.setCreativeSpec(g)};d.$CreativeStoreData4=function(a,c,d){__p&&__p();if(!c)return a.withMutations(function(a){return a["delete"](b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION).set(b("ApiObjectStorySpecLinkFields").LINK,d)});if(!this.$CreativeStoreData5(a))return a.withMutations(function(a){return a.set(b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,c).set(b("ApiObjectStorySpecLinkFields").LINK,d)});if(c.get(b("ApiCallToActionFields").TYPE)===b("AdsCallToActionTypes").TYPES.GET_DIRECTIONS.name){var e=b("AdsCallToActionGeoUtils").parseGeoLink(c.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK])),f=a.get(b("ApiObjectStorySpecLinkChildFields").PLACE_DATA);if(e&&f!=null&&f instanceof b("immutable").Map){f=f.merge(b("immutable").fromJS({address_string:e.get("name"),latitude:e.get("coordinates").latitude,longitude:e.get("coordinates").longitude}));return a.set(b("ApiObjectStorySpecLinkChildFields").PLACE_DATA,f)}}return a};d.setCallToActionInCreativeSpecForLA=function(a){var c=this.setCallToActionInCreativeSpec(a);return a&&a.get(b("ApiCallToActionFields").TYPE)===b("AdsCallToActionTypes").TYPES.LEARN_MORE.name?c.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").LINK,a.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK])):c.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").LINK,this.getPageLink())};d.getIsPageMessagingDisabled=function(){return this.is_page_messaging_disabled};d.setIsPageMessagingDisabled=function(a){return this.set("is_page_messaging_disabled",a)};d.getIsValidatingMessagePageCTA=function(){return this.is_validating_message_page_cta};d.setIsValidatingMessagePageCTA=function(a){return this.set("is_validating_message_page_cta",a)};d.getDisplayPhoneNumberCache=function(){return this.display_phone_number_cache};d.getSelectedAttachmentIndex=function(){return this.selectedAttachmentIndex};d.setSelectedAttachmentIndex=function(a){return this.set("selectedAttachmentIndex",a)};d.getProductsSpec=function(){var a=this.getCreativeSpec();a=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS])||b("immutable").List();if(!a||!a.isEmpty())return a;var c=this.getDefaultChildAttachment();return a.push(c)};d.$CreativeStoreData3=function(){var a=this.getCreativeSpec();if(!a)return!1;a=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS]);return!!a&&a.size>1};d.getDefaultChildAttachment=function(){var a,c=this.getImageURL();c!=null&&c!==""&&b("ShutterstockImageUtils").isStockImageURL(c)&&(c=this.getDefaultImageURL());c=b("immutable").Map((a={},a[b("ApiObjectStorySpecLinkChildFields").LINK]=this.getLinkURL(),a[b("ApiObjectStorySpecLinkChildFields").NAME]=this.getHeadline(),a[b("ApiObjectStorySpecLinkChildFields").DESCRIPTION]=this.getDescription(),a[b("ApiObjectStorySpecLinkChildFields").PICTURE]=c,a[b("ApiObjectStorySpecLinkChildFields").IMAGE_HASH]=this.getImageHash(),a));this.getImageCrops()&&(c=c.set(b("ApiObjectStorySpecLinkChildFields").IMAGE_CROPS,this.getImageCrops()));this.getCallToAction()&&(c=c.set(b("ApiObjectStorySpecLinkChildFields").CALL_TO_ACTION,this.getCallToAction()));return c};d.getImageLegacy=function(a){var c=this.$CreativeStoreData6();if(c)return c;c=this.$CreativeStoreData7(a)||this.$CreativeStoreData8();return c?new(b("AdsImageLegacy"))(c):null};d.setURLInCreativeSpec=function(a){var c=this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").LINK,a);this.getIsStorySpecLinkDataCreative()&&this.$CreativeStoreData3()&&(c=c.setURLInCreativeSpecForCarouselAds(a));return c};d.setHeadlineInCreativeSpec=function(a,c){return this.getIsStorySpecLinkDataCreative()&&this.$CreativeStoreData3()?this.setHeadlineInCreativeSpecForCarouselAds(a,c):this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").NAME,a,c)};d.setURLInCreativeSpecForCarouselAds=function(a){var c=this.getProductsSpec();c&&c.size>1||g(0,1649);c=c.map(function(c){return c.set(b("ApiObjectStorySpecLinkFields").LINK,a)});return this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,c)};d.setHeadlineInCreativeSpecForCarouselAds=function(a,c){var d=this.getProductsSpec();d&&d.size>1||g(0,1650);var e=this.getSelectedAttachmentIndex(),f=d.get(this.getSelectedAttachmentIndex());f=f.set(b("ApiObjectStorySpecLinkFields").NAME,a);if(this.$CreativeStoreData2())return this.withMutations(function(g){return g.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").NAME,a,c).setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,d.set(e,f),c)});else return this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,d.set(e,f),c)};d.setImageLegacyInCreativeSpec=function(a,c,d){__p&&__p();var e=this,f=a.isStockImage()?null:a.getAdAccountHash(),g=a.getStockImageID();g=a.isStockImage()&&g!=null?b("ShutterstockImageUtils").idToURL(g):a.getUrl();var h=a.getCrops(),i=a.getImageType();if(e.getIsStorySpecLinkDataCreative()){var j=e.getProductsSpec();if(j&&j.size>1&&!this.$CreativeStoreData2()){e=e.setImageLegacyInCreativeSpecForCarouselAds(f,g,h,i,d);if(c==null)return e}j=e.getObjectStorySpecLinkData()||b("immutable").Map();i=a.getStockImageID();if(f!=null)j=j.set(b("ApiObjectStorySpecLinkFields").IMAGE_HASH,f).set(b("ApiObjectStorySpecLinkFields").PICTURE,null);else if(a.isStockImage()&&i!=null){d=b("ShutterstockImageUtils").idToURL(i);j=j.set(b("ApiObjectStorySpecLinkFields").IMAGE_HASH,null).set(b("ApiObjectStorySpecLinkFields").PICTURE,d);e=e.$CreativeStoreData9(d,a);a.hasFullSizeDimensions()||a.fetchFullSizeDimensions()}else j=j.set(b("ApiObjectStorySpecLinkFields").IMAGE_HASH,null).set(b("ApiObjectStorySpecLinkFields").PICTURE,g);j=j.set(b("ApiObjectStorySpecLinkFields").IMAGE_CROPS,h);return e.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").LINK_DATA,j)}else{c=this.getCreativeSpec();i=c.set(b("ApiAdCreativeFields").IMAGE_URL,g).set(b("ApiAdCreativeFields").IMAGE_CROPS,h).set(b("ApiAdCreativeFields").IMAGE_HASH,f);return this.setCreativeSpec(i)}};d.resetAdAccountImage=function(){__p&&__p();var a=this,c=a.getCreativeSpec(),d=a,e=d.selectedAccountID;d=a.getObjectStorySpecLinkData();if(d){d=d.get(b("ApiObjectStorySpecLinkFields").IMAGE_HASH);var f=a.getProductsSpec();f&&f.size>1&&(f=f.map(function(a){var c=a.getIn([b("ApiObjectStorySpecLinkFields").IMAGE_HASH],null);if(c!=null&&c!==""){var d=j(c,e);return a.withMutations(function(a){return a["delete"](b("ApiObjectStorySpecLinkFields").IMAGE_HASH).set(b("ApiObjectStorySpecLinkFields").PICTURE,d)})}return a}),a=a.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,f));if(d){f=j(d,e);(f==null||f==="")&&(f=a.initialValue.getIn(["default_creative_spec",b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").PICTURE]));return a.setImageLegacyInCreativeSpec(new(b("AdsImageLegacy"))({url:f}),!0)}}else{d=c.get(b("ApiAdCreativeFields").IMAGE_HASH);if(d){a=j(d,e);(a==null||a==="")&&(a=this.initialValue.getIn(["default_creative_spec",b("ApiAdCreativeFields").IMAGE_URL]));return this.setImageLegacyInCreativeSpec(new(b("AdsImageLegacy"))({url:a}))}}return this};d.updateAdAccount=function(a){var b=this.getCreativeCategory();return this.withMutations(function(c){return c.resetAdAccountImage().set("selectedAccountID",a).clearVideoCreative(b)})};d.clearVideoCreative=function(a){__p&&__p();var c=this;a===void 0&&(a=b("BoostedComponentCreativeCategory").VIDEO);var d=this.getDefaultCreativeSpecForVideo();return this.withMutations(function(e){e=e.setIsSlideShowProcessing(!1).setIsSlideShowSelected(!1).setVideoIDForNameFallBack(null).setVideoName(null).setVideoThumbnails(b("immutable").List()).setCurrentVideoThumbnail(null).setDefaultVideoCreativeSpec(c.initialValue.get("default_video_creative_spec"));if(a===b("BoostedComponentCreativeCategory").VIDEO){var f;return e.setCreativeSpec((f=d)!=null?f:{})}else return e})};d.setImageLegacyInCreativeSpecForCarouselAds=function(a,c,d,e,f){e=this.getProductsSpec();e&&e.size>1||g(0,1650);var h=this.getSelectedAttachmentIndex(),i=e.get(this.getSelectedAttachmentIndex());c!=null&&c!==""?i=i.withMutations(function(a){return a.set(b("ApiObjectStorySpecLinkChildFields").PICTURE,c)["delete"](b("ApiObjectStorySpecLinkChildFields").IMAGE_HASH)}):i=i.withMutations(function(c){return c.set(b("ApiObjectStorySpecLinkChildFields").IMAGE_HASH,a)["delete"](b("ApiObjectStorySpecLinkChildFields").PICTURE)});d?i=i.set(b("ApiObjectStorySpecLinkChildFields").IMAGE_CROPS,d):i=i["delete"](b("ApiObjectStorySpecLinkChildFields").IMAGE_CROPS);return this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,e.set(h,i),f)};d.$CreativeStoreData6=function(){var a=this.getImageURL();if(a==null||a===""||!b("ShutterstockImageUtils").isStockImageURL(a))return null;var c=this.$CreativeStoreData10();return c.get(a)};d.$CreativeStoreData7=function(a){var c=this.getImageHash();if(c==null||c==="")return null;a=b("AdsImageStore").getImageDataFromHash(a,c);if(a==null)return null;c=this.getImageCrops();c&&c instanceof b("immutable").Map&&(c=c.toJS());return babelHelpers["extends"]({},a,{crops:c})};d.$CreativeStoreData8=function(){var a=this.getImageURL();a=a!=null&&a!==""?b("AdsImageStore").getImageDimensionsByURL(a):null;if(!a)return null;var c=this.getImageCrops();c&&c instanceof b("immutable").Map&&(c=c.toJS());c={url:this.getImageURL(),crops:c};return Object.assign({},c,a)};d.$CreativeStoreData10=function(){return this.stockImageMap};d.$CreativeStoreData9=function(a,b){if(b==null)return this;var c=this.$CreativeStoreData10();c.set(a,b);return this.set("stockImageMap",c)};d.$CreativeStoreData5=function(a){return!!(a&&a.get("place_data"))};d.$CreativeStoreData2=function(){var a=this.getProductsSpec();return!a?!1:a.size===2&&!this.$CreativeStoreData5(a.get(0))&&this.$CreativeStoreData5(a.get(1))};d.setImageCropsForCarouselAds=function(a){var c=this.getProductsSpec();c&&c.size>1||g(0,1650);var d=this.getSelectedAttachmentIndex(),e=c.get(d);e=e.set(b("ApiObjectStorySpecLinkFields").IMAGE_CROPS,a);return this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,c.set(d,e))};d.setImageCrops=function(a){__p&&__p();if(this.getIsStorySpecLinkDataCreative()){if(this.$CreativeStoreData3())return this.setImageCropsForCarouselAds(a);if(this.$CreativeStoreData2()){var c=b("nullthrows")(this.getProductsSpec()),d=c.setIn([0,b("ApiObjectStorySpecLinkChildFields").IMAGE_CROPS],a);return this.withMutations(function(c){return c.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").IMAGE_CROPS,a).setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").CHILD_ATTACHMENTS,d)})}return this.setObjectStorySpecLinkDataField(b("ApiObjectStorySpecLinkFields").IMAGE_CROPS,a)}return this.setCreativeSpecField(b("ApiAdCreativeFields").IMAGE_CROPS,a)};d.getImageCrops=function(){__p&&__p();var a=null;if(this.getObjectStorySpecLinkData()){var c=this.getObjectStorySpecLinkData();if(!c)return null;this.$CreativeStoreData3()?a=this.getChildAttachmentDataByField(b("ApiObjectStorySpecLinkFields").IMAGE_CROPS):a=c.get(b("ApiObjectStorySpecLinkFields").IMAGE_CROPS)}else{c=this.getCreativeSpec();a=c.get(b("ApiAdCreativeFields").IMAGE_CROPS)}return Array.isArray(a)&&!a.length?null:a};d.getImageHash=function(){__p&&__p();if(this.getObjectStorySpecLinkData()){if(this.$CreativeStoreData3()){var a=this.getChildAttachmentDataByField(b("ApiObjectStorySpecLinkFields").IMAGE_HASH);return a?String(a):null}a=this.getObjectStorySpecLinkData();return!a?null:a.get(b("ApiObjectStorySpecLinkFields").IMAGE_HASH)}else{a=this.getCreativeSpec();return a.get(b("ApiAdCreativeFields").IMAGE_HASH)}};d.getImageURL=function(){__p&&__p();if(this.getObjectStorySpecLinkData()){if(this.$CreativeStoreData3()){var a=this.getChildAttachmentDataByField(b("ApiObjectStorySpecLinkFields").PICTURE);return a?String(a):null}a=this.getObjectStorySpecLinkData();return!a?null:a.get(b("ApiObjectStorySpecLinkFields").PICTURE)}else{a=this.getCreativeSpec();return a.get(b("ApiAdCreativeFields").IMAGE_URL)}};d.getDefaultImageURL=function(){var a=this.getDefaultCreativeSpecForImage();if(this.getObjectStorySpecLinkData())return a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").PICTURE]);else return a&&a.get(b("ApiAdCreativeFields").IMAGE_URL)};d.getLinkURL=function(){var a=this.getCreativeCategory();switch(a){case b("BoostedComponentCreativeCategory").IMAGE:var c=this.getObjectStorySpecLinkData();return!c?null:c.get(b("ApiObjectStorySpecLinkFields").LINK);case b("BoostedComponentCreativeCategory").VIDEO:c=this.getObjectStorySpecVideoData();return!c?null:c.getIn([b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]);default:b("FBLogger")("boosted_componenet").warn("Invalid objectStorySpecData type: %s",a);return null}};d.getHeadline=function(){var a=this.getCreativeCategory();switch(a){case b("BoostedComponentCreativeCategory").IMAGE:var c=this.getObjectStorySpecLinkData();return!c?null:c.get(b("ApiObjectStorySpecLinkFields").NAME);case b("BoostedComponentCreativeCategory").VIDEO:c=this.getObjectStorySpecVideoData();return!c?null:c.get(b("ApiObjectStorySpecVideoFields").TITLE);default:b("FBLogger")("boosted_componenet").warn("Invalid objectStorySpecData type: %s",a);return null}};d.getDescription=function(){var a=this.getCreativeCategory();switch(a){case b("BoostedComponentCreativeCategory").IMAGE:var c=this.getObjectStorySpecLinkData();return!c?null:c.get(b("ApiObjectStorySpecLinkFields").DESCRIPTION);case b("BoostedComponentCreativeCategory").VIDEO:c=this.getObjectStorySpecVideoData();return!c?null:c.getIn([b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_TITLE]);default:b("FBLogger")("boosted_componenet").warn("Invalid creative category type: %s",a);return null}};d.getMessage=function(){var a=this.getCreativeCategory();switch(a){case b("BoostedComponentCreativeCategory").IMAGE:var c=this.getObjectStorySpecLinkData();return!c?null:c.get(b("ApiObjectStorySpecLinkFields").MESSAGE);case b("BoostedComponentCreativeCategory").VIDEO:c=this.getObjectStorySpecVideoData();return!c?null:c.getIn([b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_TITLE]);default:b("FBLogger")("boosted_componenet").warn("Invalid creative category type: %s",a);return null}};d.setPageLink=function(a){if(a!==b("BoostedComponentAppID").BOOSTED_LOCAL_AWARENESS)return this;a=this.getCreativeSpec();if(!a)return this;a=a.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").LINK_DATA,b("ApiObjectStorySpecLinkFields").LINK])||"";return this.set("pageLink",a)};d.getPageLink=function(){return this.pageLink};d.getIsSlideshowProcessing=function(){return this.isSlideshowProcessing};d.setIsSlideShowProcessing=function(a){return this.set("isSlideshowProcessing",a)};d.getIsSlideshowSelected=function(){return this.isSlideshowSelected};d.setIsSlideShowSelected=function(a){return this.set("isSlideshowSelected",a)};d.getVideoDataBody=function(){var a=this.getObjectStorySpecVideoData();return!a?null:a.get(b("ApiObjectStorySpecVideoFields").MESSAGE)};d.getVideoID=function(){var a=this.getObjectStorySpecVideoData();if(!a)return null;a=a.get(b("ApiObjectStorySpecVideoFields").VIDEO_ID);return!a?null:String(a)};d.setVideoIDForNameFallBack=function(a){return this.set("videoIDForNameFallback",a)};d.getVideoName=function(){var a;return(a=(a=this.videoName)!=null?a:this.videoIDForNameFallback)!=null?a:""};d.setVideoName=function(a){return this.set("videoName",a)};d.getCurrentVideoThumbnail=function(){return this.currentVideoThumbnail};d.setCurrentVideoThumbnail=function(a){return!a?this.set("currentVideoThumbnail",null):this.withMutations(function(c){return c.set("currentVideoThumbnail",a).setObjectStorySpecVideoDataField(b("ApiObjectStorySpecVideoFields").IMAGE_URL,a&&a.uri).deleteObjectStorySpecVideoDataField(b("ApiObjectStorySpecVideoFields").IMAGE_HASH)})};d.getVideoThumbnails=function(){return this.videoThumbnails};d.setVideoThumbnails=function(a){return this.set("videoThumbnails",a)};d.getVideoSource=function(){return this.videoSource};d.setVideoSource=function(a){return this.set("videoSource",a)};d.getPreloadVideoSpec=function(){return this.preload_video_creative_spec};d.getVideoUploader=function(){return this.videoUploader};d.setVideoUploader=function(a){return this.set("videoUploader",a)};d.startVideoUpload=function(a,c,d,e,f,g){e=new(b("BoostedComponentVideoUploaderV2"))(e,f,g,(d==null||d==="")&&(c==null||c===""));a?e.upload(b("VideoUploadFile").fromFile(a.item(0))):d!=null&&d!==""&&c!=null&&c!==""&&e.remoteUpload(d,c);return this.set("videoUploader",e)};d.abortVideoUpload=function(){var a=this.getVideoUploader();a&&a.abort();return this};d.getVideoUploadError=function(){return this.videoUploadError};d.setVideoUploadError=function(a){return this.set("videoUploadError",a)};d.getVideoUploadProgress=function(){return this.videoUploadProgress};d.setVideoUploadProgress=function(a){return this.set("videoUploadProgress",a)};d.getVideoUploadStatus=function(){return this.videoUploadStatus};d.setVideoUploadStatus=function(a){return this.set("videoUploadStatus",a)};d.getVideoLibrary=function(){return this.videoLibrary};d.getVideoLibraryByID=function(){return this.videoLibraryMap};d.getVideoLibraryUpToDate=function(){return this.videoLibraryUpToDate};d.setVideoLibraryUpToDate=function(a){return this.set("videoLibraryUpToDate",a)};d.setVideoLibrary=function(a){var c=b("immutable").Map(a.map(function(a){return[a.get("id"),a]}));return this.withMutations(function(b){return b.set("videoLibrary",a).set("videoLibraryMap",c)})};d.setVideo=function(a){return this.withMutations(function(c){return c.setObjectStorySpecVideoDataField(b("ApiObjectStorySpecVideoFields").VIDEO_ID,a.id).setVideoIDForNameFallBack(a.id).setVideoName(a.title).setVideoThumbnails(a.thumbnails)})};d.getVideoDataDescription=function(){var a=this.getObjectStorySpecVideoData();return!a?null:a.get(b("ApiObjectStorySpecVideoFields").MESSAGE)};d.getCreativeSpecBody=function(){return this.getCreativeCategory()===b("BoostedComponentCreativeCategory").IMAGE?this.getCreativeSpec().get(b("ApiAdCreativeFields").BODY):this.getVideoDataDescription()};d.getLinkDataMessage=function(){var a=this.getObjectStorySpecLinkData();return!a?null:a.get(b("ApiObjectStorySpecLinkFields").MESSAGE)};d.getPageKeywords=function(){return null};d.getPageName=function(){return this.page_name};d.setEventCreativeSpec=function(a,c,d){__p&&__p();var e,f,g;a=this.getCreativeCategory();var h=this.getCallToAction();if(a===b("BoostedComponentCreativeCategory").IMAGE){a=this.getObjectStorySpecLinkData();if(!a||!h)return this;var i,j;switch(d){case b("AdsCallToActionTypes").TYPES.BUY_TICKETS.name:var k=c.get("description"),l=c.get("ticketLink");i=c.get("ctaType");var m=a.get(b("ApiObjectStorySpecLinkFields").EVENT_ID);j=b("immutable").fromJS((f={},f[b("ApiCallToActionFields").TYPE]=i,f[b("ApiCallToActionFields").VALUE]=(e={},e[b("CallToActionValueFields").EVENT_ID]=m,e[b("CallToActionValueFields").LINK]=l,e),f));m=a.withMutations(function(a){return a.set(b("ApiObjectStorySpecLinkFields").LINK,l).set(b("ApiObjectStorySpecLinkFields").DESCRIPTION,k).set(b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,j)});return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").LINK_DATA,m);case b("AdsCallToActionTypes").TYPES.EVENT_RSVP.name:var n=c.get("eventLink");i=d;j=b("immutable").fromJS((e={},e[b("ApiCallToActionFields").TYPE]=i,e));m=a.withMutations(function(a){return a.set(b("ApiObjectStorySpecLinkFields").LINK,n).set(b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,j)["delete"](b("ApiObjectStorySpecLinkFields").DESCRIPTION)});return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").LINK_DATA,m);default:return this}}else{f=this.getObjectStorySpecVideoData();if(!f||!h)return this;i=f.getIn([b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").EVENT_ID],null);var o;switch(d){case b("AdsCallToActionTypes").TYPES.BUY_TICKETS.name:e=c.get("ticketLink");a=c.get("ctaType");m=this.getDefaultCreativeSpecForVideo();h=m.getIn([b("ApiAdCreativeFields").OBJECT_STORY_SPEC,b("ApiAdCreativeStorySpecFields").VIDEO_DATA,b("ApiObjectStorySpecVideoFields").CALL_TO_ACTION,b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_FORMAT],null);o=b("immutable").fromJS((m={},m[b("ApiCallToActionFields").TYPE]=a,m[b("ApiCallToActionFields").VALUE]=(g={},g[b("CallToActionValueFields").EVENT_ID]=i,g[b("CallToActionValueFields").LINK]=e,g),m));h&&(o=o.setIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK_FORMAT],h));break;case b("AdsCallToActionTypes").TYPES.EVENT_RSVP.name:e=c.get("eventLink");a=d;o=b("immutable").fromJS((g={},g[b("ApiCallToActionFields").TYPE]=a,g[b("ApiCallToActionFields").VALUE]=(m={},m[b("CallToActionValueFields").EVENT_ID]=i,m[b("CallToActionValueFields").LINK]=e,m),g));break;default:return this}h=f.set(b("ApiObjectStorySpecLinkFields").CALL_TO_ACTION,o);return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").VIDEO_DATA,h)}};d.setLinkDataFromDestinationData=function(a){__p&&__p();var c=this.getObjectStorySpecLinkData();if(c){var d=a.title_fill,e=a.body_fill;a=a.images;var f={};d!=null&&(f[b("ApiObjectStorySpecLinkFields").NAME]=d);e!=null&&(f[b("ApiObjectStorySpecLinkFields").MESSAGE]=e);a&&a[0]&&(f[b("ApiObjectStorySpecLinkFields").PICTURE]=a[0],f[b("ApiObjectStorySpecLinkFields").IMAGE_HASH]=null);return this.setObjectStorySpecDataSpec(b("ApiAdCreativeStorySpecFields").LINK_DATA,c.merge(f))}return this};d.setSelectedMediaFormatFromCreative=function(){var a=b("AdsUIMediaFormat").SINGLE_IMAGE;this.$CreativeStoreData3()?a=this.$CreativeStoreData2()?b("AdsUIMediaFormat").SINGLE_IMAGE:b("AdsUIMediaFormat").CAROUSEL:this.getIsStorySpecVideoDataCreative()&&(a=b("AdsUIMediaFormat").SINGLE_VIDEO);return this.set("selectedMediaFormat",a)};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("BoostedComponentBudgetEstimationStoreValidator",["fbt","BoostedComponentAppID","BoostedComponentBudgetType","BoostedComponentBudgetValidationStrings"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("BoostedComponentBudgetValidationStrings").getMinDurationError,i=b("BoostedComponentBudgetValidationStrings").getSingleDayMinBudgetError,j=b("BoostedComponentBudgetValidationStrings").getMultiDaysMinBudgetError,k=b("BoostedComponentBudgetValidationStrings").getMaxBudgetError,l=b("BoostedComponentBudgetValidationStrings").getMaxBudgetErrorForRestrictedLeadGen,m=b("BoostedComponentBudgetValidationStrings").getMinTotalBudgetErrorForBoostedLeadGen,n=b("BoostedComponentBudgetValidationStrings").getMinTotalBudgetErrorForBoostedJobPost;function a(a,c,d,e,f,o,p,q,r,s,t,u,v,w,x,y){__p&&__p();if(r&&e===b("BoostedComponentBudgetType").LIFETIME_BUDGET&&d<w)return[g._("You can't make your budget less than the amount you've already spent promoting this post. If you don't want to spend more on this post you can pause or delete the promotion.")];if(y)return d<u?[i(p,u)]:null;c=[];q=f>=o;q||c.push(h(o));r=u;e===b("BoostedComponentBudgetType").LIFETIME_BUDGET&&(r=f*u);v!=null&&v!==0&&d<v&&v>=r?c.push(a===b("BoostedComponentAppID").BOOSTED_JOB_POST||a===b("BoostedComponentAppID").BOOSTED_JOB_POST_MOBILE?n(p,v):m(p,v)):d<r?c.push(f===1&&q||e===b("BoostedComponentBudgetType").DAILY_BUDGET?i(p,u):j(p,u,r)):d>s&&c.push(a===b("BoostedComponentAppID").BOOSTED_LEAD_GEN&&x?l(p,s,t):k(p,s));return c.length>0?c:null}e.exports={getValidateBudgetError:a}}),null);
__d("XAdsLWICreativeValidationController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ads_lwi/creative_validation/",{ad_account_id:{type:"FBID",required:!0},creative_spec:{type:"String",required:!0},instagram_actor_id:{type:"FBID"},objective:{type:"Enum",enumType:0},page_type:{type:"Enum",required:!0,enumType:1}})}),null);
__d("AdsLWICreativeValidationExceptionProviderPlugin",["AdsLWICreativeValidationDataLoader","AdsLWILoadCreativeValidationExceptionDataAction","LoadObjectMap","promiseDone","promiseLoadObjects"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a,b){a(function(a){var c=a;b.keys.forEach(function(b){var d=a.get(b);c=c.set(b,d.loading())});return c})}function h(a,b){a(function(a){var c=a;b.validationExceptions.forEach(function(a,b){c=c.set(b,a)});return c})}a={initialState:function(a){return b("LoadObjectMap").create(function(c){g(a,{keys:c});var d=new Map();c.forEach(function(a){d.set(a,b("AdsLWICreativeValidationDataLoader").validateCreative(a))});b("promiseDone")(b("promiseLoadObjects")(d),function(c){h(a,{validationExceptions:c}),b("AdsLWILoadCreativeValidationExceptionDataAction").dispatch({},{line:"79",module:"AdsLWICreativeValidationExceptionProviderPlugin.js"})})})}};e.exports=a}),null);
__d("BoostedComponentCreativeStoreValidator",["errorDesc","AdsAPIAdAssetFeedLinkURLsFields","AdsAppUtils","AdsAssetFeedMessageValidator","AdsAssetFeedUtils","AdsImageLegacy","AdsImageValidation","AdsLWIAdgroupUtils","AdsUIMediaFormat","AdsUnifiedCreativeAPIFieldMappings","BoostedComponentAppID","BoostedComponentAppInstallAppSelectorValidator","BoostedComponentCreativeSectionStrings","URI","ads-lib-urllib","adsLWIImageSpecsSelector","adsLWIImagesSelector","adsLWISelectedMediaFormatSelector","immutable","isEmpty","isFacebookURI"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("AdsLWIAdgroupUtils").getUnifiedCreativeAPIFieldMapping,i=b("AdsLWIAdgroupUtils").isVideoAd;function j(a,c){return c===b("BoostedComponentAppID").BOOSTED_PAGELIKE&&(a==null||a==="")?b("immutable").Map([[0,b("BoostedComponentCreativeSectionStrings").NO_CREATIVE_BODY_ERROR]]):b("immutable").Map()}function k(a,c){if(c===b("BoostedComponentAppID").BOOSTED_LOCAL_AWARENESS)return null;if(c===b("BoostedComponentAppID").BOOSTED_APP_INSTALL)return b("BoostedComponentAppInstallAppSelectorValidator").getValidateAppInstallAppURLErrors(a,c);var d={},e=b("URI").tryParseURI(a||"");a==null||!e||!b("ads-lib-urllib").isUrl(a)&&e.getProtocol()!=="mailto"?d[0]=b("BoostedComponentCreativeSectionStrings").INVALID_URL_ERROR:b("isFacebookURI")(e)&&c!==b("BoostedComponentAppID").BOOSTED_EVENT?d[0]=b("BoostedComponentCreativeSectionStrings").INVALID_FBURL_ERROR:(b("AdsAppUtils").isItunesURL(e.toString())||b("AdsAppUtils").isGooglePlayURL(e.toString()))&&(d[0]=g._(function(a,b){return a._("App Url is only supported by App Installs objective. Please either remove the App Url, or change objective to App Installs.")},{}));return b("immutable").fromJS(d)}function l(a,c){__p&&__p();if(b("AdsAssetFeedUtils").isAdgroupUsingAssetFeedFromRecord(a)){var d=b("AdsAssetFeedMessageValidator").validate({adgroup:a});return b("isEmpty")(d)?b("immutable").Map():b("immutable").Map([[0,d[0].message]])}else if(c===b("BoostedComponentAppID").BOOSTED_PAGELIKE){d=h(a);a=d.message?a.getIn(d.message):null;return j(a,c)}else return b("immutable").Map()}function m(a,c){if(c!==b("BoostedComponentAppID").BOOSTED_WEBSITE&&c!==b("BoostedComponentAppID").BOOSTED_PURCHASE&&c!==b("BoostedComponentAppID").BOOSTED_APP_INSTALL)return b("immutable").Map();var d;if(b("AdsAssetFeedUtils").isAdgroupUsingAssetFeedFromRecord(a))d=a.getIn([].concat(b("AdsUnifiedCreativeAPIFieldMappings").ASSET_FEED_MAPPING.linkURL,[0,b("AdsAPIAdAssetFeedLinkURLsFields").WEBSITE_URL]));else{var e=h(a);d=e.linkURL?a.getIn(e.linkURL):null}return k(d,c)}function n(a,c,d,e){__p&&__p();if(i(a)||c===b("BoostedComponentAppID").BOOSTED_DYNAMIC_PRODUCTS)return null;var f={};if(b("AdsAssetFeedUtils").isAdgroupUsingAssetFeedFromRecord(a)){d=b("adsLWIImagesSelector").adsLWIImagesDCOSelector();d.isEmpty()?f[0]=b("BoostedComponentCreativeSectionStrings").NO_IMAGE_ERROR:d.forEach(function(a){a={height:a.height,width:a.width};a=b("AdsImageValidation").getAdsErrorsForImage(new(b("AdsImageLegacy"))(a),(a=e)!=null?a:b("adsLWIImageSpecsSelector")());b("isEmpty")(a)||(f[0]=a[0].message)})}else{c=b("adsLWIImagesSelector").adsLWIAdgroupImageSelector(a);if(c){a=b("AdsImageValidation").getAdsErrorsForImage(c,(d=e)!=null?d:b("adsLWIImageSpecsSelector")());b("isEmpty")(a)||(f[0]=a[0].message)}}return b("immutable").fromJS(f)}function o(a,c){var d={};if(a==null||!i(a))return null;c&&(d[0]=b("BoostedComponentCreativeSectionStrings").VIDEO_UPLOAD_ERROR);c=h(a);var e=b("adsLWISelectedMediaFormatSelector")();(!c.videoID||!a.getIn(c.videoID))&&(d[0]=e===b("AdsUIMediaFormat").SLIDESHOW?b("BoostedComponentCreativeSectionStrings").NO_SLIDESHOW_ERROR:b("BoostedComponentCreativeSectionStrings").NO_VIDEO_ERROR);return b("immutable").fromJS(d)}function a(a,c,d,e){var f=b("immutable").Map({creativeBodyErrors:b("immutable").Map(),creativeURLErrors:b("immutable").Map(),creativeImageErrors:b("immutable").Map(),creativeVideoErrors:b("immutable").Map()});return a==null?f:f.withMutations(function(b){return b.set("creativeBodyErrors",l(a,c)).set("creativeURLErrors",m(a,c)).set("creativeImageErrors",n(a,c,d,null)).set("creativeVideoErrors",o(a,e))})}e.exports={getBodyErrors:l,getURLErrors:k,getCreativeErrors:a,getImageErrors:n,getVideoErrors:o}}),null);
__d("BoostedComponentDeliveryStoreData",["AdsAPIPacingType","BoostedComponentBaseStoreData"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={bid_amount:0,pacing_type:b("AdsAPIPacingType").STANDARD};c=function(a){__p&&__p();babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}var c=b.prototype;c.getBidAmount=function(){return this.bid_amount};c.getPacingType=function(){return this.pacing_type};c.setBidAmount=function(a){return this.set("bid_amount",a)};c.setPacingType=function(a){return this.set("pacing_type",a)};return b}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("BoostedComponentDeliveryStoreValidator",["fbt","AdsAPIPacingType"],(function(a,b,c,d,e,f,g){"use strict";a=function(a,c){return c===b("AdsAPIPacingType").NO_PACING&&a===0?[g._("Please enter a bid or switch to standard delivery type")]:null};e.exports={getValidateDeliveryTypeError:a}}),null);
__d("BoostedComponentDialogTabs",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({INSIGHTS:"insights",SETTINGS:"settings",SUMMARY:"summary",LEADS:"leads",OVERVIEW:"overview",EDIT_PROMOTION:"edit_promotion"})}),null);
__d("BoostedComponentDialogViewStates",[],(function(a,b,c,d,e,f){"use strict";a=Object.freeze({EDIT:"edit",RESULTS:"results"});e.exports=a}),null);
__d("BoostedComponentDialogUIStoreData",["fbt","BoostedComponentBaseStoreData","BoostedComponentDialogTabs","BoostedComponentDialogViewStates","immutable"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a={changeAdAccountConfirmationDialogShown:!1,checkoutDialogShown:!1,currentManagementTab:b("BoostedComponentDialogTabs").OVERVIEW,dialogShown:!1,dialogStyle:"dialog",submitAction:null,isSubmitting:!1,showChangeObjectiveDialog:!1,showErrorDialog:!1,active_automated_ads_dialog_tab:null,active_dialog_tab:null,auto_open_dialog:!1,confirmationDialogShown:!1,dialog_div_id:"",dialogRendered:!1,disable_data_prefetch:!0,informational_header_category:null,informational_header_data:b("immutable").Map(),leadGenTOSDialogShown:!1,log_localike_exposure:!1,msg_opt_in:!0,show_msg_entrypoint:!1,reactComposerID:"",show_creation_survey:!1,show_nux:!1,similar_promotions_exist:!1,upsell_div_id:"",upsell_icon_url:"",upsell_label:"",upsellLabelOverride:null,is_uploading_image:!1};c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getDialogShown=function(){return this.dialogShown};d.getCheckoutDialogShown=function(){return this.checkoutDialogShown};d.getActiveDialogTab=function(){return this.active_dialog_tab||b("BoostedComponentDialogViewStates").RESULTS};d.getAutoOpenDialog=function(){return this.auto_open_dialog};d.getMSGOptIn=function(){return this.msg_opt_in};d.getCurrentManagementTab=function(){return this.currentManagementTab};d.getDialogRendered=function(){return this.dialogRendered};d.getDialogStyle=function(){return this.dialogStyle};d.getShowMSGEntrypoint=function(){return this.show_msg_entrypoint};d.getShowNUX=function(){return this.show_nux};d.getDialogDivID=function(){return this.dialog_div_id};d.getConfirmationDialogShown=function(){return this.confirmationDialogShown};d.getChangeAdAccountConfirmationDialogShown=function(){return this.changeAdAccountConfirmationDialogShown};d.getSubmitAction=function(){return this.submitAction};d.getInformationalHeaderCategory=function(){return this.informational_header_category};d.getButtonLabel=function(){return this.upsellLabelOverride||this.upsell_label};d.getReactComposerID=function(){return this.reactComposerID};d.getShowChangeObjectiveDialog=function(){return this.showChangeObjectiveDialog};d.getLeadGenTOSDialogShown=function(){return this.leadGenTOSDialogShown};d.setBudgetLabelOverride=function(a){if(!a)return this.set("upsellLabelOverride",null);a=g._("Boost set for {budget}",[g._param("budget",a)]);return this.set("upsellLabelOverride",a)};d.getShowCreationSurvey=function(){return this.show_creation_survey};return c}(b("BoostedComponentBaseStoreData")(a));e.exports=c}),null);
__d("BoostedComponentDurationStoreValidator",["fbt","AdproObjectiveType","BoostedComponentConstants","BoostedComponentQEs","BoostedComponentQEUtils","adsLWIAdproObjectiveSelector"],(function(a,b,c,d,e,f,g){"use strict";a=function(a){var c=b("BoostedComponentQEUtils").getQE(b("BoostedComponentQEs").ADS_LWI_BOOSTED_LEAD_GEN_TEST).getParamBool("enable",!1),d=b("adsLWIAdproObjectiveSelector")()===b("AdproObjectiveType").WEBSITE_CONVERSIONS;d=d&&c?b("BoostedComponentConstants").LOWERED_MIN_DURATION_FOR_LEAD_GEN:b("BoostedComponentConstants").MIN_DURATION_FOR_LEAD_GEN;return a<d?[g._("The minimum duration for this type of promotion is {minDuration} days. This will help you spend your budget more efficiently, as it can take at least {sameParam} days to start seeing results.",[g._param("minDuration",d),g._param("sameParam",d)])]:null};e.exports={getValidateDurationErrors:a}}),null);
__d("BoostedComponentLeadGenUtils",["URI","requireCond","cr:936660"],(function(a,b,c,d,e,f){"use strict";__p&&__p();b("cr:936660");var g=new(b("URI"))("/business/help/114161868925832/"),h=new(b("URI"))("/business/help/528479170832814/"),i=function(a){return a!=="0"&&!!a};a=function(a,b){return j(a)&&i(b)};var j=function(a){return a!=="www_third_party_embedded_flow"};c=function(a){return j(a)?h:g};e.exports={isBoostFormStep:i,isConsolidatedBoostFormStep:a,isOnFacebookLeadGenPlacement:j,getHelpCenterURILink:c,ON_FACEBOOK_HELP_CENTER_URI_LINK:h}}),null);
__d("AdsLWIMessengerWelcomeMessagesProviderPlugin",["AdsLWICommonStoreState","AdsLWIMessengerWelcomeMessageRecord","immutable"],(function(a,b,c,d,e,f){"use strict";a="AdsLWIMessenger";c={initialState:new(b("AdsLWICommonStoreState"))({storeName:a,emptyRecord:new(b("AdsLWIMessengerWelcomeMessageRecord"))({messengerIcebreakers:b("immutable").List(),messengerIcebreakersEnabled:!1,messengerGreeting:"",messengerWelcomeMessageEnabled:!1})})};e.exports=c}),null);
__d("BoostedComponentMessengerWelcomeMessageValidator",["AdsDataAtom","AdsMessengerConstants","AdsSelectorUtils","adsLWICurrentMessengerWelcomeMessageSelector","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsMessengerConstants").EMPTY_GREETING_ERROR_MESSAGE,h=b("AdsMessengerConstants").EMPTY_ICEBREAKER_ERROR_MESSAGE,i=-1,j=b("AdsSelectorUtils").getStoreDispatchTokens([b("adsLWICurrentMessengerWelcomeMessageSelector")]);function k(a,b){return a.trim().length===0?b:null}function a(){__p&&__p();b("AdsDataAtom").waitFor(j);var a=b("adsLWICurrentMessengerWelcomeMessageSelector")();if(a==null)return b("immutable").Map();var c=b("immutable").Map(),d=k(a.messengerGreeting,g);d!=null&&(c=c.set(i,d));a.messengerIcebreakersEnabled&&a.messengerIcebreakers.forEach(function(a,b){a=a.title;a=k(a,h);a!=null&&(c=c.set(b,a))});return c}e.exports={getMessengerWelcomeMessageValidationErrors:a,GREETING_ERROR_INDEX:i}}),null);
__d("BoostedComponentValidationStoreData",["immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.setBudgetErrors=function(a){return this.set("budgetErrors",a)};d.getBudgetErrors=function(){return this.budgetErrors};d.getAddBudgetErrors=function(){return this.addBudgetErrors};d.getCreativeSectionErrors=function(){var a=this.creativeImageErrors?this.creativeImageErrors.toList():b("immutable").List(),c=this.creativeVideoErrors?this.creativeVideoErrors.toList():b("immutable").List(),d=this.creativeBodyErrors?this.creativeBodyErrors.toList():b("immutable").List(),e=this.creativeHeadlineErrors?this.creativeHeadlineErrors.toList():b("immutable").List(),f=this.creativeURLErrors?this.creativeURLErrors.toList():b("immutable").List();return b("immutable").List([this.callToActionErrors,d,e,f,a,c]).flatten()};d.getCallToActionErrors=function(){return this.callToActionErrors};d.getBodyErrors=function(){return this.creativeBodyErrors};d.getHeadlineErrors=function(){return this.creativeHeadlineErrors};d.getURLErrors=function(){return this.creativeURLErrors};d.getImageErrors=function(){return this.creativeImageErrors};d.getDeliveryTypeErrors=function(){return this.deliveryTypeErrors};d.getAudienceErrors=function(){return this.audienceErrors};d.getDurationErrors=function(){return this.durationErrors};d.getAllErrors=function(){var a=this.creativeImageErrors?this.creativeImageErrors.toList():b("immutable").List(),c=this.creativeVideoErrors?this.creativeVideoErrors.toList():b("immutable").List(),d=this.creativeBodyErrors?this.creativeBodyErrors.toList():b("immutable").List(),e=this.creativeHeadlineErrors?this.creativeHeadlineErrors.toList():b("immutable").List(),f=this.creativeURLErrors?this.creativeURLErrors.toList():b("immutable").List();d=b("immutable").List([this.budgetErrors,this.callToActionErrors,this.deliveryTypeErrors,d,e,f,a,c,this.audienceErrors,this.durationErrors,this.messengerWelcomeMessageErrors?this.messengerWelcomeMessageErrors.toList():b("immutable").List()]).flatten();return d};d.getHasErrors=function(){return!!this.getAllErrors().size};return c}(b("immutable").Record({callToActionErrors:b("immutable").List(),messengerWelcomeMessageErrors:null,creativeBodyErrors:b("immutable").Map(),creativeHeadlineErrors:b("immutable").Map(),creativeURLErrors:b("immutable").Map(),creativeImageErrors:b("immutable").Map(),creativeVideoErrors:b("immutable").Map(),addBudgetErrors:b("immutable").List(),budgetErrors:b("immutable").List(),deliveryTypeErrors:b("immutable").List(),durationErrors:b("immutable").List(),audienceErrors:b("immutable").List(),hasErrors:!1,websiteUrlErrors:b("immutable").List()}));e.exports=a}),null);
__d("PagesTicketingEventStoreData",["immutable"],(function(a,b,c,d,e,f){"use strict";a=b("immutable").Record({dataLoaded:!1,isFetching:!1,selectedEventEntry:null,storeDataList:b("immutable").List()});c=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(a);e.exports=c}),null);
__d("PagesTicketingEventProviderPlugin",["PagesTicketingEventStoreData"],(function(a,b,c,d,e,f){"use strict";a=function(){return new(b("PagesTicketingEventStoreData"))()};c={initialState:a()};e.exports=c}),null);
__d("BoostedComponentValidationStoreV2",["AdproObjectiveType","AdsAssetFeedUtils","AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux","AdsBoostedComponentAdAccountV2UpdateCurrencyDataActionFlux","AdsBoostedComponentAudienceV2CreateAudienceSubmitDataActionFlux","AdsBoostedComponentAudienceV2DeleteAudienceSubmitDataActionFlux","AdsBoostedComponentAudienceV2EditAudienceSubmitDataActionFlux","AdsBoostedComponentAudienceV2EditAudienceSuccessDataActionFlux","AdsBoostedComponentAudienceV2LoadAudiencesDataActionFlux","AdsBoostedComponentAudienceV2SetAudienceDataActionFlux","AdsBoostedComponentCommonV2ChangeAdproObjectiveActionFlux","AdsBoostedComponentCommonV2CreateSuccessWithBoostIdDataActionFlux","AdsBoostedComponentCommonV2FetchButtonDataDataActionFlux","AdsBoostedComponentCommonV2FetchDialogDataDataActionFlux","AdsBoostedComponentCommonV2LoadDialogChangeDataDataActionFlux","AdsBoostedComponentCommonV2LoadDialogDataDataActionFlux","AdsBoostedComponentLocalAwarenessV2UpdateAgeDataActionFlux","AdsBoostedComponentObjectiveV2UpdateObjectiveDataActionFlux","AdsCallToActionTypes","AdsDataAtom","AdsLomoGetTicketsCTAUpdateEventSelectionDataActionFlux","AdsLWIAdgroupUtils","AdsLWILoadCreativeValidationExceptionDataActionFlux","AdsLWIRemoveImageAssetAtIndexActionFlux","AdsLWISetImageCropsAtIndexActionFlux","AdsLWIToggleMessengerIcebreakersActionFlux","AdsLWIUpdateAdgroupLinkUrlActionFlux","AdsLWIUpdateCreativeBodyActionFlux","AdsLWIUpdateCreativeLinkDataBodyActionFlux","AdsLWIUpdateCreativeVideoDesciptionActionFlux","AdsLWIUpdateImageAssetsActionFlux","AdsLWIUpdateMessengerGreetingActionFlux","AdsLWIUpdateMessengerIcebreakerActionFlux","AdsSelectorUtils","ApiCallToActionFields","BoostedComponentAppID","BoostedComponentAppInstallActionTypesV2","BoostedComponentAppInstallAppSelectorValidator","BoostedComponentAudienceStoreV2","BoostedComponentAudienceValidator","BoostedComponentBudgetAndDurationActionTypesV2","BoostedComponentBudgetEstimationStoreV2","BoostedComponentBudgetEstimationStoreValidator","BoostedComponentBudgetType","BoostedComponentCommonActionTypesV2","BoostedComponentConstraintStoreV2","BoostedComponentContextStoreV2","BoostedComponentCreativeCategory","BoostedComponentCreativeStoreValidator","BoostedComponentCreativeV2GetPageMessageSettingFailActionFlux","BoostedComponentCreativeV2GetPageMessageSettingSuccessActionFlux","BoostedComponentCreativeV2PageMessagingEnableRequestFailActionFlux","BoostedComponentCreativeV2PageMessagingEnableRequestSuccessActionFlux","BoostedComponentCreativeV2PhoneNumberValidationFailAction","BoostedComponentCreativeV2PhoneNumberValidationFailActionFlux","BoostedComponentCreativeV2UpdateCallToActionAction","BoostedComponentCreativeV2UpdateCallToActionActionFlux","BoostedComponentCreativeV2UpdateImageActionFlux","BoostedComponentCreativeV2UpdateVideoDataUrlActionFlux","BoostedComponentCreativeV2UpdateVideoLibraryActionFlux","BoostedComponentCreativeV2UpdateVideoThumbnailActionFlux","BoostedComponentCreativeV2ValidateWhatsappVerificationCodeSuccessActionFlux","BoostedComponentCreativeV2VideoEncodingSuccessActionFlux","BoostedComponentCreativeV2VideoUploadCancelActionFlux","BoostedComponentCreativeV2VideoUploadErrorActionFlux","BoostedComponentCreativeV2VideoUploadProgressActionFlux","BoostedComponentCreativeV2VideoUploadStartActionFlux","BoostedComponentCreativeV2VideoUploadSuccessActionFlux","BoostedComponentDeliveryActionTypesV2","BoostedComponentDeliveryStoreV2","BoostedComponentDeliveryStoreValidator","BoostedComponentDialogUIStoreV2","BoostedComponentDurationStoreV2","BoostedComponentDurationStoreValidator","BoostedComponentExistingAdInfoStoreV2","BoostedComponentFetchActionTypesV2","BoostedComponentFluxReduceStore","BoostedComponentLeadGenUtils","BoostedComponentMessengerWelcomeMessageValidator","BoostedComponentsCallToActionValidator","BoostedComponentStoreState","BoostedComponentStringsV2","BoostedComponentV2Utils","BoostedComponentValidationStoreData","BoostedPostCreativeStoreV2","CallToActionTypes","CallToActionValueFields","FBLogger","PagesTicketingEventProvider","PhoneNumber","adsLWIAdproObjectiveSelector","adsLWICtaTypeSelector","adsLWIImageSpecsSelector","adsLWIIsVideoUploadErrorSelector","adsLWIObjectiveMinimumBudgetAndDurationSelector","adsLWISelectedAccountCurrencySelector","adsLWISelectedAccountIDSelector","adsLWISelectedAdgroupSelectors","createObjectBy","immutable","nullthrows","promiseDone","AdsLWIValidationStoreActionHandlers"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsLWIAdgroupUtils").getUnifiedCreativeAPIFieldMapping,h=b("AdsLWIAdgroupUtils").isVideoAd,i=b("BoostedComponentAppInstallAppSelectorValidator").getValidateAppInstallAppURLErrors,j=b("BoostedComponentAudienceValidator").getAudienceInvalidPhoneError,k=b("BoostedComponentAudienceValidator").getAudienceValidationErrors,l=b("BoostedComponentBudgetEstimationStoreValidator").getValidateBudgetError,m=b("BoostedComponentCreativeStoreValidator").getBodyErrors,n=b("BoostedComponentCreativeStoreValidator").getCreativeErrors,o=b("BoostedComponentCreativeStoreValidator").getImageErrors,p=b("BoostedComponentCreativeStoreValidator").getURLErrors,q=b("BoostedComponentCreativeStoreValidator").getVideoErrors,r=b("BoostedComponentDeliveryStoreValidator").getValidateDeliveryTypeError,s=b("BoostedComponentDurationStoreValidator").getValidateDurationErrors,t=b("BoostedComponentLeadGenUtils").isOnFacebookLeadGenPlacement,u=b("BoostedComponentMessengerWelcomeMessageValidator").getMessengerWelcomeMessageValidationErrors,v=b("BoostedComponentsCallToActionValidator").getValidateCallToActionError,w=b("BoostedComponentsCallToActionValidator").getValidateWhatsAppCallToActionError,x=b("BoostedComponentV2Utils").getKeyData,y=b("PagesTicketingEventProvider").toFluxStore(),z=b("adsLWISelectedAdgroupSelectors").adsLWISelectedAdgroupSelector,A=b("BoostedComponentStoreState").BoostedComponentState,B=b("BoostedComponentStoreState").getKey,C=b("createObjectBy")(b("AdsLWIValidationStoreActionHandlers"),function(a){return a.type}),D=[].concat(b("AdsSelectorUtils").getStoreDispatchTokens([b("adsLWICtaTypeSelector"),b("adsLWIObjectiveMinimumBudgetAndDurationSelector"),b("adsLWISelectedAccountCurrencySelector")]),[b("BoostedComponentAudienceStoreV2").getDispatchToken(),b("BoostedComponentBudgetEstimationStoreV2").getDispatchToken(),b("BoostedComponentConstraintStoreV2").getDispatchToken(),b("BoostedComponentDialogUIStoreV2").getDispatchToken(),b("BoostedComponentDurationStoreV2").getDispatchToken(),b("BoostedComponentExistingAdInfoStoreV2").getDispatchToken(),y.getDispatchToken()]),E="BoostedComponentValidationStoreV2";a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var b,c;for(var d=arguments.length,e=new Array(d),f=0;f<d;f++)e[f]=arguments[f];return(b=c=a.call.apply(a,[this].concat(e))||this,c.storeName=E,b)||babelHelpers.assertThisInitialized(c)}var d=c.prototype;d.getInitialState=function(){return new A({storeName:E})};d.getDataByKey=function(a){return this.getState().getDataByKey(a)};d.reduce=function(a,c){__p&&__p();c=c.action;var d=x(c),e=d.appID,f=d.boostID,A=d.targetID;if(!e||e===b("BoostedComponentAppID").BOOSTED_AUTOMATED_ADS)return a;d=B(e,A,f);var E;switch(c.type){case b("AdsBoostedComponentCommonV2FetchButtonDataDataActionFlux").actionType:case b("AdsBoostedComponentCommonV2FetchDialogDataDataActionFlux").actionType:case b("BoostedComponentFetchActionTypesV2").FETCH_ALL_DATA:return a.setDataByKey(d,new(b("BoostedComponentValidationStoreData"))());case b("AdsBoostedComponentCommonV2CreateSuccessWithBoostIdDataActionFlux").actionType:case b("BoostedComponentCommonActionTypesV2").EDIT_SUCCESS:case b("AdsBoostedComponentCommonV2LoadDialogDataDataActionFlux").actionType:case b("AdsBoostedComponentCommonV2LoadDialogChangeDataDataActionFlux").actionType:case b("BoostedComponentFetchActionTypesV2").LOAD_ALL_DATA:case b("BoostedComponentBudgetAndDurationActionTypesV2").INPUT_CUSTOM_ADD_BUDGET:case b("BoostedComponentBudgetAndDurationActionTypesV2").INPUT_CUSTOM_BUDGET:case b("BoostedComponentBudgetAndDurationActionTypesV2").UPDATE_BUDGET:case b("BoostedComponentBudgetAndDurationActionTypesV2").UPDATE_CAMPAIGN_LENGTH_IN_DAYS:case b("BoostedComponentBudgetAndDurationActionTypesV2").UPDATE_RUN_CONTINUOUSLY:case b("AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux").actionType:case b("AdsBoostedComponentAdAccountV2UpdateCurrencyDataActionFlux").actionType:case b("AdsBoostedComponentCommonV2ChangeAdproObjectiveActionFlux").actionType:b("AdsDataAtom").waitFor(D);this.$BoostedComponentValidationStoreV21(e);c.type===b("AdsBoostedComponentCommonV2CreateSuccessWithBoostIdDataActionFlux").actionType&&(a=a.copyData(d,e,A,c.oldBoostID));var F=b("BoostedComponentContextStoreV2").getDataByKey(d);E=b("BoostedComponentExistingAdInfoStoreV2").getDataByKey(d);var G=E.getIsBoosted();if(G&&!F.getCanViewerEdit())return a;var H=b("adsLWISelectedAccountCurrencySelector")(),I=b("BoostedComponentBudgetEstimationStoreV2").getDataByKey(d),J=b("BoostedComponentDurationStoreV2").getDataByKey(d),K=b("BoostedComponentDialogUIStoreV2").getDataByKey(d),L=b("BoostedComponentConstraintStoreV2").getDataByKey(d),M=G?E.getBudgetType():I.getBudgetType(),N=M===b("BoostedComponentBudgetType").LIFETIME_BUDGET?L.getMaxLifetimeBudgetPerDay():L.getMaxDailyBudget(),O=M===b("BoostedComponentBudgetType").LIFETIME_BUDGET?L.getMinLifetimeBudgetPerDay():L.getMinDailyBudget(),P=1;if(e===b("BoostedComponentAppID").BOOSTED_POST){var Q=b("adsLWIObjectiveMinimumBudgetAndDurationSelector")().getValue();if(Q!=null){var R;O=(R=Q.minimumBudget)!=null?R:O;P=(R=Q.minimumDuration)!=null?R:P}}Q=c.budget?c.type===b("BoostedComponentBudgetAndDurationActionTypesV2").INPUT_CUSTOM_ADD_BUDGET?c.budget+E.getRawTotalBudget():I.getSelectedBudgetValue():I.getSelectedBudgetValue();R=F.getPlacement();I=t(R);var S;(e===b("BoostedComponentAppID").BOOSTED_LEAD_GEN&&I||e===b("BoostedComponentAppID").BOOSTED_JOB_POST||e===b("BoostedComponentAppID").BOOSTED_JOB_POST_MOBILE||e===b("BoostedComponentAppID").BOOSTED_EVENT&&L.getMinLifetimeBudget()>0)&&(S=L.getMinLifetimeBudget());F=l(e,K.getActiveDialogTab(),Q,M,J.getCampaignLengthInDays(),P,H,E.getRawTotalBudget(),G,N,L.max_monthly_budget,O,S,E.getSpent(),I,J.getRunContinuously());c.type===b("BoostedComponentBudgetAndDurationActionTypesV2").INPUT_CUSTOM_ADD_BUDGET?R={addBudgetErrors:b("immutable").List(F)}:R={budgetErrors:b("immutable").List(F)};if(c.type===b("BoostedComponentBudgetAndDurationActionTypesV2").UPDATE_CAMPAIGN_LENGTH_IN_DAYS&&e===b("BoostedComponentAppID").BOOSTED_LEAD_GEN&&I){K=s(J.getCampaignLengthInDays());R=babelHelpers["extends"]({},R,{durationErrors:b("immutable").List(K)})}Q=b("BoostedComponentAudienceStoreV2").getDataByKey(d);M=k(Q.getAudienceErrorCode());R=babelHelpers["extends"]({},R,{audienceErrors:M?M:b("immutable").List()});if(e===b("BoostedComponentAppID").BOOSTED_POST){P=b("BoostedPostCreativeStoreV2").getDataByKey(d);H=P.getCallToAction();G=b("adsLWIAdproObjectiveSelector")();if(G===b("AdproObjectiveType").MESSAGES&&H&&H.get(b("ApiCallToActionFields").TYPE)===b("AdsCallToActionTypes").TYPES.WHATSAPP_MESSAGE.name){N=w(H,G);R=babelHelpers["extends"]({},R,{callToActionErrors:N?N:b("immutable").List()})}}if(this.$BoostedComponentValidationStoreV22(e)&&(c.type===b("AdsBoostedComponentCommonV2LoadDialogDataDataActionFlux").actionType||c.type===b("AdsBoostedComponentCommonV2LoadDialogChangeDataDataActionFlux").actionType)){Q.hasInvalidPhoneNumber()&&(R=babelHelpers["extends"]({},R,{audienceErrors:j()}));b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z,b("adsLWIIsVideoUploadErrorSelector"),b("adsLWISelectedAccountIDSelector")]));L=z({currentInstanceID:c.instanceID}).getValue();L==null&&b("FBLogger")("boosted_component").mustfix("Adgroup had not been loaded yet in action: %s of BoostedComponentValidationStore",c.type);R=babelHelpers["extends"]({},R,n(L,e,b("adsLWISelectedAccountIDSelector")({currentInstanceID:c.instanceID}),b("adsLWIIsVideoUploadErrorSelector")({currentInstanceID:c.instanceID})).toObject())}return a.mergeDataByKey(d,R);case b("AdsLWIUpdateImageAssetsActionFlux").actionType:case b("AdsLWIRemoveImageAssetAtIndexActionFlux").actionType:case b("AdsLWISetImageCropsAtIndexActionFlux").actionType:case b("BoostedComponentCreativeV2UpdateImageActionFlux").actionType:case b("AdsLWILoadCreativeValidationExceptionDataActionFlux").actionType:b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z,b("adsLWISelectedAccountIDSelector"),b("adsLWIImageSpecsSelector")]));O=z();if(O.isLoading()||!O.hasValue())return a;F=o(O.getValueEnforcing(),e,b("adsLWISelectedAccountIDSelector")(),b("adsLWIImageSpecsSelector")());R={creativeImageErrors:F};return a.mergeDataByKey(d,R);case b("BoostedComponentCreativeV2UpdateVideoLibraryActionFlux").actionType:case b("BoostedComponentCreativeV2VideoUploadSuccessActionFlux").actionType:case b("BoostedComponentCreativeV2VideoEncodingSuccessActionFlux").actionType:case b("BoostedComponentCreativeV2UpdateVideoThumbnailActionFlux").actionType:case b("BoostedComponentCreativeV2VideoUploadCancelActionFlux").actionType:case b("BoostedComponentCreativeV2VideoUploadErrorActionFlux").actionType:case b("BoostedComponentCreativeV2VideoUploadProgressActionFlux").actionType:case b("BoostedComponentCreativeV2VideoUploadStartActionFlux").actionType:b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z,b("adsLWIIsVideoUploadErrorSelector")]));I=z().getValue();I==null&&b("FBLogger")("boosted_component").mustfix("Adgroup had not been loaded yet in action: %s of BoostedComponentValidationStore",c.type);J=q(I,b("adsLWIIsVideoUploadErrorSelector")());R={creativeVideoErrors:J};return a.mergeDataByKey(d,R);case b("BoostedComponentCreativeV2PageMessagingEnableRequestSuccessActionFlux").actionType:case b("BoostedComponentCreativeV2GetPageMessageSettingSuccessActionFlux").actionType:return c.isMessagingEnabled?a:a.mergeDataByKey(d,{callToActionErrors:b("immutable").List([b("BoostedComponentStringsV2").PAGE_MESSAGES_DISABLED_ERROR])});case b("BoostedComponentCreativeV2PageMessagingEnableRequestFailActionFlux").actionType:case b("BoostedComponentCreativeV2GetPageMessageSettingFailActionFlux").actionType:K=[b("BoostedComponentStringsV2").CALL_TO_ACTION_VALIDATION_FAILED];R={callToActionErrors:b("immutable").List(K)};return a.mergeDataByKey(d,R);case b("BoostedComponentCreativeV2PhoneNumberValidationFailActionFlux").actionType:M=c.phoneNumberLink;P=null;if(e===b("BoostedComponentAppID").BOOSTED_POST){H=b("BoostedPostCreativeStoreV2").getDataByKey(d);P=H.getCallToAction()}else{b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z]));G=z();if(G.hasValue()){N=G.getValueEnforcing();Q=g(N);P=Q&&N.getIn(Q.callToAction)}}L=P&&P.get(b("ApiCallToActionFields").TYPE)===b("AdsCallToActionTypes").TYPES.CALL_NOW.name&&P.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK])===M;if(L){R={callToActionErrors:b("immutable").List([b("BoostedComponentStringsV2").INVALID_PHONE_NUMBER_ERROR])};return a.mergeDataByKey(d,R)}return a;case b("AdsBoostedComponentLocalAwarenessV2UpdateAgeDataActionFlux").actionType:case b("AdsBoostedComponentObjectiveV2UpdateObjectiveDataActionFlux").actionType:case b("BoostedComponentCreativeV2ValidateWhatsappVerificationCodeSuccessActionFlux").actionType:case b("AdsLomoGetTicketsCTAUpdateEventSelectionDataActionFlux").actionType:case b("BoostedComponentCreativeV2UpdateCallToActionActionFlux").actionType:b("AdsDataAtom").waitFor(D);this.$BoostedComponentValidationStoreV21(e);b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z,b("adsLWIIsVideoUploadErrorSelector")]));O=null;F=null;I=b("BoostedComponentCreativeCategory").IMAGE;if(e===b("BoostedComponentAppID").BOOSTED_POST){J=b("BoostedPostCreativeStoreV2").getDataByKey(d);F=J.getCallToAction();O=J.getPostTypeEligibleForCTA();I=J.getCreativeCategory()}else{K=z();if(K.hasValue()){H=K.getValueEnforcing();G=g(H);if(b("AdsAssetFeedUtils").isAdgroupUsingAssetFeedFromRecord(H)){N=G&&G.callToAction&&H.getIn(G.callToAction);F=N&&N.first()}else F=G&&H.getIn(G.callToAction);I=h(H)?b("BoostedComponentCreativeCategory").VIDEO:b("BoostedComponentCreativeCategory").IMAGE}}E=b("BoostedComponentExistingAdInfoStoreV2").getDataByKey(d);Q=b("BoostedComponentConstraintStoreV2").getDataByKey(d);P=b("BoostedComponentAudienceStoreV2").getDataByKey(d);M=y.getState();L=c.callToActionUpdate;var T=c.pageID;J=c.skipPhoneNumberValidation;var U=c.type===b("BoostedComponentCreativeV2UpdateCallToActionActionFlux").actionType?L:F;if(!U&&c.type!==b("BoostedComponentCreativeV2UpdateCallToActionActionFlux").actionType)return a;K=b("adsLWIAdproObjectiveSelector")();N=v(e,U,K,b("nullthrows")(I,"creativeCategory is null"),E.getIsBoosted(),O,Q.getMinCallNowAge(),P.getMinAge(),M.selectedEventEntry,a.getDataByKey(d).getURLErrors().isEmpty());var V=U&&U.get(b("ApiCallToActionFields").TYPE);if(!J&&!N&&U&&V===b("AdsCallToActionTypes").TYPES.CALL_NOW.name){var W=U.getIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK]);G=b("PhoneNumber").getRawNumberFromTelURI(W);G&&b("promiseDone")(b("PhoneNumber").parseNumber(G),function(a){a&&a.getURI()!==W&&b("BoostedComponentCreativeV2UpdateCallToActionAction").dispatch({callToActionUpdate:U.setIn([b("ApiCallToActionFields").VALUE,b("CallToActionValueFields").LINK],a.getURI()),pageID:T,callToActionType:V,appID:e,targetID:A,boostID:f,skipPhoneNumberValidation:!0,updateLinkUrl:!1},{line:"634",module:"BoostedComponentValidationStoreV2.js"})},function(a){b("BoostedComponentCreativeV2PhoneNumberValidationFailAction").dispatch({appID:e,targetID:A,boostID:f,phoneNumberLink:W},{line:"654",module:"BoostedComponentValidationStoreV2.js"})})}R={callToActionErrors:b("immutable").List(N),messengerWelcomeMessageErrors:V===b("CallToActionTypes").MESSAGE_PAGE?u():null};return a.mergeDataByKey(d,R);case b("BoostedComponentAppInstallActionTypesV2").CLEAR_SELECTED_APP:case b("BoostedComponentAppInstallActionTypesV2").SELECT_APP_STORE:case b("BoostedComponentAppInstallActionTypesV2").SELECT_APP_SUCCESS:H=c.appURL;L=i(H,e);R={creativeURLErrors:L};return a.mergeDataByKey(d,R);case b("AdsLWIUpdateCreativeBodyActionFlux").actionType:case b("AdsLWIUpdateCreativeVideoDesciptionActionFlux").actionType:case b("AdsLWIUpdateCreativeLinkDataBodyActionFlux").actionType:b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z]));F=z().getValue();K=F?m(F,e):b("immutable").Map();R={creativeBodyErrors:K};return a.mergeDataByKey(d,R);case b("BoostedComponentCreativeV2UpdateVideoDataUrlActionFlux").actionType:case b("AdsLWIUpdateAdgroupLinkUrlActionFlux").actionType:R={creativeURLErrors:p(c.url,e)};return a.mergeDataByKey(d,R);case b("BoostedComponentDeliveryActionTypesV2").UPDATE_BID_AMOUNT:case b("BoostedComponentDeliveryActionTypesV2").UPDATE_PACING_TYPE:b("AdsDataAtom").waitFor([b("BoostedComponentDeliveryStoreV2").getDispatchToken()]);I=b("BoostedComponentDeliveryStoreV2").getDataByKey(d);E=r(I.getBidAmount(),I.getPacingType());R={deliveryTypeErrors:b("immutable").List(E)};return a.mergeDataByKey(d,R);case b("BoostedComponentCommonActionTypesV2").DELETE_SUCCESS:a=a.copyData(d,e,A,c.boostID);case b("AdsBoostedComponentAudienceV2SetAudienceDataActionFlux").actionType:case b("AdsBoostedComponentAudienceV2CreateAudienceSubmitDataActionFlux").actionType:case b("AdsBoostedComponentAudienceV2DeleteAudienceSubmitDataActionFlux").actionType:case b("AdsBoostedComponentAudienceV2EditAudienceSubmitDataActionFlux").actionType:case b("AdsBoostedComponentAudienceV2LoadAudiencesDataActionFlux").actionType:case b("AdsBoostedComponentAudienceV2EditAudienceSuccessDataActionFlux").actionType:O=b("BoostedComponentAudienceStoreV2").getDataByKey(d);Q=k(O.getAudienceErrorCode());a=a.mergeDataByKey(d,{audienceErrors:Q?Q:b("immutable").List()});if(e!==b("BoostedComponentAppID").BOOSTED_PAGE)return a;b("AdsDataAtom").waitFor(D);this.$BoostedComponentValidationStoreV21(e);P=b("BoostedComponentCreativeCategory").IMAGE;M=null;J=z();if(J.hasValue()){G=J.getValueEnforcing();N=g(G);M=N&&G.getIn(N.callToAction);P=h(G)?b("BoostedComponentCreativeCategory").VIDEO:b("BoostedComponentCreativeCategory").IMAGE}if(M){H=b("BoostedComponentConstraintStoreV2").getDataByKey(d);L=b("BoostedComponentExistingAdInfoStoreV2").getDataByKey(d);F=b("adsLWIAdproObjectiveSelector")();K=v(e,M,F,P,L.getIsBoosted(),null,H.getMinCallNowAge(),O.getMinAge());return a.mergeDataByKey(d,{callToActionErrors:b("immutable").List(K)})}return a;case b("AdsLWIUpdateMessengerGreetingActionFlux").actionType:case b("AdsLWIUpdateMessengerIcebreakerActionFlux").actionType:case b("AdsLWIToggleMessengerIcebreakersActionFlux").actionType:return a.mergeDataByKey(d,{messengerWelcomeMessageErrors:u()});default:I=C[c.type];if(I){E=I.genExtraData&&I.genExtraData(c,a);return I.mutate(c,a,E)}return a}};d.$BoostedComponentValidationStoreV21=function(a){switch(a){case b("BoostedComponentAppID").BOOSTED_APP_INSTALL:case b("BoostedComponentAppID").BOOSTED_PAGELIKE:case b("BoostedComponentAppID").BOOSTED_WEBSITE:case b("BoostedComponentAppID").BOOSTED_PURCHASE:case b("BoostedComponentAppID").BOOSTED_LOCAL_AWARENESS:case b("BoostedComponentAppID").BOOSTED_CCTA:case b("BoostedComponentAppID").BOOSTED_PAGE:case b("BoostedComponentAppID").BOOSTED_EVENT:case b("BoostedComponentAppID").BOOSTED_LEAD_GEN:case b("BoostedComponentAppID").BOOSTED_REAL_ESTATE_LISTING:case b("BoostedComponentAppID").BOOSTED_MARKETPLACE_LISTING:b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([z]));break;case b("BoostedComponentAppID").BOOSTED_POST:case b("BoostedComponentAppID").BOOSTED_JOB_POST:case b("BoostedComponentAppID").BOOSTED_USER_POST:b("AdsDataAtom").waitFor([b("BoostedPostCreativeStoreV2").getDispatchToken()]);break;default:b("FBLogger")("boosted_component").warn("Invalid creative category type: %s",a)}};d.$BoostedComponentValidationStoreV22=function(a){return a===b("BoostedComponentAppID").BOOSTED_PAGELIKE||a===b("BoostedComponentAppID").BOOSTED_REAL_ESTATE_LISTING||a===b("BoostedComponentAppID").BOOSTED_WEBSITE||a===b("BoostedComponentAppID").BOOSTED_PURCHASE||a===b("BoostedComponentAppID").BOOSTED_LOCAL_AWARENESS||a===b("BoostedComponentAppID").BOOSTED_CCTA||a===b("BoostedComponentAppID").BOOSTED_PAGE||a===b("BoostedComponentAppID").BOOSTED_EVENT||a===b("BoostedComponentAppID").BOOSTED_APP_INSTALL};return c}(b("BoostedComponentFluxReduceStore"));e.exports=new a(b("AdsDataAtom"))}),null);
__d("BoostedComponentGeoTargetLevel",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({ANY:"any",COUNTRY:"country",COUNTRIES:"countries",REGION:"region",REGIONS:"regions",CITY:"city",CITIES:"cities"})}),null);
__d("BoostedComponentAudienceImmStoreData",["AdsAPITargetFields","AdsLWIDefaultConstants","AdsUtils","BoostedComponentGeoTargetLevel","BoostedPostAudienceOptions","adsTargetingLocationAreLocationSpecEqual","immutable","requireCond","cr:902520"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsAPITargetFields").AGE_MAX,h=b("AdsAPITargetFields").AGE_MIN,i=b("AdsAPITargetFields").CONNECTIONS,j=b("AdsAPITargetFields").CUSTOM_AUDIENCES,k=b("AdsAPITargetFields").FLEXIBLE_SPEC,l=b("AdsAPITargetFields").FRIENDS_OF_CONNECTIONS,m=b("AdsAPITargetFields").GENDERS,n=b("AdsAPITargetFields").GEO_LOCATIONS,o=b("AdsAPITargetFields").PAGE_TYPES,p=b("AdsAPITargetFields").TARGETING_RELAX_OPTION,q=b("BoostedPostAudienceOptions").FANS,r=b("BoostedPostAudienceOptions").GROUPER,s=b("BoostedPostAudienceOptions").NCPP;b("cr:902520");var t=b("immutable").List(),u=b("immutable").List(["desktopfeed","mobilefeed"]),v=3;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.setSelectedAudienceID=function(a){return a==="0"||!this.audiences.has(a)?this.set("selectedAudienceID",s):this.set("selectedAudienceID",a)};d.setAudiences=function(a,c){__p&&__p();var d=b("immutable").OrderedMap(a.map(function(a){__p&&__p();var c=a.get("audienceID"),d=a.get("audienceType");if(d===s){var e=a.get("targetSpec",b("immutable").Map()).withMutations(function(a){return a["delete"](i)["delete"](l)});a=a.set("targetSpec",e)}if(d===q||d===r){e=a.get("targetSpec",b("immutable").Map()).withMutations(function(a){return a["delete"](m)["delete"](g)["delete"](h)});a=a.set("targetSpec",e)}e=c==="0"?d:c;a=a.set("id",e);return[e,a]}));return this.withMutations(function(a){return a.set("audiences",d)})};d.setCustomAudiences=function(a){__p&&__p();if(a){var c=b("immutable").OrderedMap();a.forEach(function(a){var d=a.get("audienceID");a=a.get("name");c=c.set(d,b("immutable").Map([["audienceID",d],["name",a]]))});return this.withMutations(function(a){return a.set("customAudiences",c).set("customAudienceList",c.toList())})}return this};d.setCustomAudiencesListOrder=function(){var a=this,b=this.customAudienceList,c=this.getSelectedCustomAudienceList();c.forEach(function(c){var d=b.indexOf(a.customAudiences.get(c));b=b.splice(d,1).unshift(a.customAudiences.get(c))});return this.set("customAudienceList",b)};d.setFollowerTargetingSelected=function(a){return this.set("followerTargetingSelected",a)};d.setVisitorTargetingSelected=function(a){return this.set("visitorTargetingSelected",a)};d.deleteAudience=function(a){a=a||this.selectedAudienceID;var b=this.audiences["delete"](a);return this.withMutations(function(a){return a.setSelectedAudienceID(s).set("audiences",b)})};d.updateTargetSpec=function(a,b){var c=this.getSelectedAudience(),d=this.audiences;c=c.withMutations(function(c){b&&(c=c.set("name",b));c=c.set("targetSpec",a);return c});d=d.set(this.selectedAudienceID,c);return this.withMutations(function(a){return a.set("audiences",d)})};d.getLocationsNum=function(){var a=this.getImmTargetSpec().get("geo_locations",b("immutable").Map());if(a.isEmpty())return 0;var c=a.get("cities",b("immutable").List()),d=a.get("countries",b("immutable").List()),e=a.get("regions",b("immutable").List()),f=a.get("zips",b("immutable").List());a=a.get("custom_locations",b("immutable").List());return c.size+d.size+e.size+f.size+a.size};d.getCustomLocationCountry=function(){return this.customLocationCountry};d.getCustomLocations=function(){return this.getImmTargetSpec().getIn(["geo_locations","custom_locations"],b("immutable").List())};d.getFollowerTargetingSelected=function(){return this.followerTargetingSelected};d.getLocations=function(){var a=[],c=this.getImmTargetSpec().getIn(["geo_locations","cities"],b("immutable").List()),d=this.getImmTargetSpec().getIn(["geo_locations","regions"],b("immutable").List()),e=this.getImmTargetSpec().getIn(["geo_locations","countries"],b("immutable").List());c.map(function(c){a.push(babelHelpers["extends"]({},c.toJS(),{type:b("BoostedComponentGeoTargetLevel").CITIES}))});d.map(function(c){a.push(babelHelpers["extends"]({},c.toJS(),{type:b("BoostedComponentGeoTargetLevel").REGIONS}))});e.map(function(c){typeof c==="string"?a.push(c):a.push(babelHelpers["extends"]({},c.toJS(),{type:b("BoostedComponentGeoTargetLevel").COUNTRIES}))});return a};d.getCountry=function(){__p&&__p();var a=this.getCustomLocationCountry();if(!a){var c=this.getCustomLocations();c&&c.size&&(a=c.first().get("country"))}if(!a){c=this.getLocations();if(c&&c.length){c=c[0];a=b("AdsUtils").isObject(c)?c.country:c}}return a};d.getSelectedAudience=function(){return this.audiences.get(this.selectedAudienceID,b("immutable").Map())};d.getAudienceType=function(){return this.getSelectedAudience().get("audienceType","")};d.getSavedAudienceID=function(){return this.getSelectedAudience().get("audienceID","")};d.getSelectedAudienceName=function(){return this.getSelectedAudience().get("name","")};d.getTargetSpec=function(){var a=this.getSelectedAudience().get("targetSpec");return a!=null?a.toJS():b("AdsLWIDefaultConstants").DEFAULT_TARGETING_SPEC};d.getImmTargetSpec=function(){return this.getSelectedAudience().get("targetSpec",b("immutable").Map())};d.getDefaultSpec=function(){var a=this.audiences.getIn([s,"targetSpec"]);return a!=null?a.toJS():b("AdsLWIDefaultConstants").DEFAULT_TARGETING_SPEC};d.getJobTargetSpec=function(){return this.jobTargetingSpec};d.getAssociatedAdsCount=function(){return this.getSelectedAudience().get("adCampaigns",b("immutable").List()).size};d.toggleSeeAll=function(){var a=this.seeAll;return a?this.withMutations(function(b){return b.set("seeAll",!a).setCustomAudiencesListOrder()}):this.set("seeAll",!a)};d.getAccountID=function(){return this.accountID};d.getPlacements=function(){return this.placements||u};d.getHasUserRemovedInstagramPlacement=function(){return this.instagramPlacementRemoved};d.getIsInstagramPlacementEligible=function(){return this.instagramPlacementEligible};d.getIsAudienceNetworkPlacementEligible=function(){return this.audienceNetworkPlacementEligible};d.getPageTypes=function(){return this.getImmTargetSpec().get(o,b("immutable").List())};d.initTargetSpec=function(){return this.set("initialTargetSpec",this.getImmTargetSpec())};d.initVisitorTargetingSelected=function(){var a=!1,b=this.initialTargetSpec.get(j,t),c=this.filterCustomAudienceListByName(b,!0),d=this.getLookalikeCountries();a=c.size===b.size&&c.size===d.size+1;return this.withMutations(function(b){return b.set("initialVisitorTargetingSelected",a).set("visitorTargetingSelected",a)})};d.getLookalikeCountries=function(){var a=this.getImmTargetSpec().get("geo_locations",b("immutable").Map()),c=a.get("countries",b("immutable").List()),d=new Set(c.toJS());c=["cities","regions","zips","places","custom_locations"];c.forEach(function(c){c=a.get(c,b("immutable").List());c.forEach(function(a){d.add(a.get("country"))})});return d};d.initSelectedCustomAudiencesList=function(){var a=this.initialTargetSpec.get(j,t),c=b("immutable").List();a.forEach(function(a){a=a.get("id");c=c.push(String(a))});return this.withMutations(function(a){return a.set("initialSelectedCustomAudiencesList",c).set("selectedCustomAudiencesList",c)})};d.hasChanged=function(){__p&&__p();var a=this.getImmTargetSpec();if(a.get(h)!==this.initialTargetSpec.get(h))return!0;if(a.get(g)!==this.initialTargetSpec.get(g))return!0;if(a.get(m)!==this.initialTargetSpec.get(m))return!0;if(this.initialVisitorTargetingSelected!==this.getVisitorTargetingSelected())return!0;if(!this.initialSelectedCustomAudiencesList.equals(this.getSelectedCustomAudienceList()))return!0;if(a.get(p)!==this.initialTargetSpec.get(p))return!0;var c=a.get(k),d=this.initialTargetSpec.get(k),e=c&&d&&!c.equals(d);c=!!c!==!!d;if(e||c)return!0;d=a.get(n);e=this.initialTargetSpec.get(n);if(!d&&!e)return!1;else if(!d||!e)return!0;return!b("adsTargetingLocationAreLocationSpecEqual")(e.toJS(),d.toJS())};d.getMinAge=function(){return this.getImmTargetSpec().get(h)};d.getVisitorTargetingSelected=function(){return this.visitorTargetingSelected};d.getIsClientEditable=function(){return this.getSelectedAudience().get("isClientEditable",!0)};d.getIsFetching=function(){return this.isFetching};d.getCustomAudienceList=function(a){return this.seeAll?this.customAudienceList:this.customAudienceList.slice(0,v)};d.getEligibleCustomAudienceList=function(a){return this.customAudienceList};d.getSelectedCustomAudienceList=function(){return this.selectedCustomAudiencesList};d.resetSelectedCustomAudienceList=function(){var a=this.getSelectedAudience(),b=this.audiences,c=this.getImmTargetSpec();c=c.set(j,t);a=a.set("targetSpec",c);b=b.set(this.selectedAudienceID,a);return this.withMutations(function(a){return a.set("selectedCustomAudiencesList",t).set("audiences",b)})};d.updateSelectedCustomAudiencesList=function(a,b){var c=this,d=this.getSelectedAudience(),e=this.audiences,f=this.getSelectedCustomAudienceList(),g=this.getImmTargetSpec();a&&!f.includes(b)?f=f.push(b):!a&&f.includes(b)&&(f=f.remove(f.indexOf(b)));a=f.map(function(a){return{id:a,name:c.customAudiences.get(a).get("name","")}});g=g.set(j,a);d=d.set("targetSpec",g);e=e.set(this.selectedAudienceID,d);return this.withMutations(function(a){return a.set("selectedCustomAudiencesList",f).set("audiences",e)})};d.filterCustomAudienceListByName=function(a,c){var d=b("immutable").List();a.forEach(function(a){var b=a.get("id");a=a.get("name");var e=a.includes("Website Visitors")||a.includes("Conversions from");(c&&e||!c&&!e)&&(d=d.push({id:b,name:a}))});return d};d.isAudienceListReady=function(){return this.initialSelectedCustomAudiencesList.size!==0};return c}(b("immutable").Record({dataLoaded:!1,appID:null,accountID:"",audiences:b("immutable").OrderedMap(),customLocationCountry:null,customAudienceList:b("immutable").List(),customAudiences:b("immutable").OrderedMap(),defaultTargetSpec:b("immutable").Map(),editMode:!1,followerTargetingSelected:!0,initialSelectedCustomAudiencesList:b("immutable").List(),initialTargetSpec:b("immutable").Map(),initialVisitorTargetingSelected:!0,instagramPlacementEligible:!1,instagramPlacementRemoved:!1,audienceNetworkPlacementEligible:!1,isFetching:!0,isUpdating:!1,jobTargetingSpec:b("immutable").Map(),placements:b("immutable").List(),rendered:!1,seeAll:!1,selectedAudienceID:"",selectedCustomAudiencesList:b("immutable").List(),showAudienceManager:!1,userOS:null,userDevice:null,visitorTargetingSelected:!0}));e.exports=a}),null);
__d("BoostedComponentAudienceStoreKeyRecord",["AdsLWIBoostIDType","immutable"],(function(a,b,c,d,e,f){"use strict";a=b("immutable").Record({boostID:b("AdsLWIBoostIDType").NO_BOOST_ID,promotionID:null,product:void 0,targetID:void 0});c=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(a);e.exports=c}),null);
__d("AdsLWIAdAccountUtils",["AdmarketAccountStatusesJS"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function a(a){return a===b("AdmarketAccountStatusesJS").values.ADMARKET_ACCOUNT_STATUS_ACTIVE||a===b("AdmarketAccountStatusesJS").values.ADMARKET_ACCOUNT_STATUS_TEST||a===b("AdmarketAccountStatusesJS").values.ADMARKET_ACCOUNT_STATUS_IN_GRACE_PERIOD}function c(a){var b=[];a.forEach(function(a){var c=a.account_status,d=a.currency,e=a.legacy_account_id;a=a.name;e!=null&&d!=null&&a!=null&&c!=null&&c!=="DISABLED"&&c!=="CLOSED"&&b.push({legacy_account_id:e,currency:d,name:a,account_status:c})});return b}e.exports={getIsAdAccountStatusValid:a,getValidAdAccounts:c}}),null);
__d("BoostedComponentAudienceUtils",["immutable"],(function(a,b,c,d,e,f){"use strict";function a(a,b,c){if(c&&!a.includes(b))return a.push(b);else if(!c&&a.includes(b))return a.remove(a.indexOf(b));else return a}e.exports={addRemovePageType:a}}),null);
__d("CanvasCreationWaterfallTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:CanvasCreationWaterfallLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:CanvasCreationWaterfallLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:CanvasCreationWaterfallLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setAdAccountID=function(a){this.$1.ad_account_id=a;return this};c.setAdObjectiveName=function(a){this.$1.ad_objective_name=a;return this};c.setAymtChannel=function(a){this.$1.aymt_channel=a;return this};c.setAymtEventName=function(a){this.$1.aymt_event_name=a;return this};c.setAymtQe=function(a){this.$1.aymt_qe=a;return this};c.setAymtTip=function(a){this.$1.aymt_tip=a;return this};c.setCanvasID=function(a){this.$1.canvas_id=a;return this};c.setCanvasLoadType=function(a){this.$1.canvas_load_type=a;return this};c.setCanvasName=function(a){this.$1.canvas_name=a;return this};c.setCanvasTags=function(a){this.$1.canvas_tags=b("GeneratedLoggerUtils").serializeVector(a);return this};c.setDraftElementTypes=function(a){this.$1.draft_element_types=b("GeneratedLoggerUtils").serializeVector(a);return this};c.setDuplicateParentCanvasID=function(a){this.$1.duplicate_parent_canvas_id=a;return this};c.setEditorLineHeight=function(a){this.$1.editor_line_height=a;return this};c.setEditorPaddingBottom=function(a){this.$1.editor_padding_bottom=a;return this};c.setEditorPaddingTop=function(a){this.$1.editor_padding_top=a;return this};c.setEditorPhotoHeight=function(a){this.$1.editor_photo_height=a;return this};c.setEditorPhotoWidth=function(a){this.$1.editor_photo_width=a;return this};c.setEditorURL=function(a){this.$1.editor_url=a;return this};c.setElementPayload=function(a){this.$1.element_payload=a;return this};c.setElementType=function(a){this.$1.element_type=a;return this};c.setErrorCode=function(a){this.$1.error_code=a;return this};c.setErrorMessage=function(a){this.$1.error_message=a;return this};c.setEventDetails=function(a){this.$1.event_details=a;return this};c.setEventName=function(a){this.$1.event_name=a;return this};c.setFbtraceID=function(a){this.$1.fbtrace_id=a;return this};c.setHelpPageEventName=function(a){this.$1.help_page_event_name=a;return this};c.setIncompleteElements=function(a){this.$1.incomplete_elements=a;return this};c.setIsNewUser=function(a){this.$1.is_new_user=a;return this};c.setNuxTourStep=function(a){this.$1.nux_tour_step=a;return this};c.setPageCanvasCount=function(a){this.$1.page_canvas_count=a;return this};c.setPageID=function(a){this.$1.page_id=a;return this};c.setPageName=function(a){this.$1.page_name=a;return this};c.setPagePublishedCanvasCount=function(a){this.$1.page_published_canvas_count=a;return this};c.setPropertyList=function(a){this.$1.property_list=b("GeneratedLoggerUtils").serializeVector(a);return this};c.setPublishedURL=function(a){this.$1.published_url=a;return this};c.setReorderComponentDistance=function(a){this.$1.reorder_component_distance=a;return this};c.setSource=function(a){this.$1.source=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setVC=function(a){this.$1.vc=a;return this};c.setVideoID=function(a){this.$1.video_id=a;return this};c.setViewerID=function(a){this.$1.viewer_id=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};return a}();c={ad_account_id:!0,ad_objective_name:!0,aymt_channel:!0,aymt_event_name:!0,aymt_qe:!0,aymt_tip:!0,canvas_id:!0,canvas_load_type:!0,canvas_name:!0,canvas_tags:!0,draft_element_types:!0,duplicate_parent_canvas_id:!0,editor_line_height:!0,editor_padding_bottom:!0,editor_padding_top:!0,editor_photo_height:!0,editor_photo_width:!0,editor_url:!0,element_payload:!0,element_type:!0,error_code:!0,error_message:!0,event_details:!0,event_name:!0,fbtrace_id:!0,help_page_event_name:!0,incomplete_elements:!0,is_new_user:!0,nux_tour_step:!0,page_canvas_count:!0,page_id:!0,page_name:!0,page_published_canvas_count:!0,property_list:!0,published_url:!0,reorder_component_distance:!0,source:!0,time:!0,vc:!0,video_id:!0,viewer_id:!0,weight:!0};e.exports=a}),null);
__d("AdsCanvasInlineBuilderActions",["AdsCanvasInlineAdvancedBuilderBlankOpenDataAction","AdsCanvasInlineAdvancedBuilderBlankSaveDataAction","AdsCanvasInlineBuilderBuilderNuxTourCompleteDataAction","AdsCanvasInlineBuilderBuilderNuxTourXoutDataAction","AdsCanvasInlineBuilderHideProductTaggingOverlayDataAction","AdsCanvasInlineBuilderRemoveInlineCanvasDataAction","AdsCanvasInlineBuilderSaveCanvasDataAction","AdsCanvasInlineBuilderSelectRadioButtonDataAction","AdsCanvasInlineBuilderSetProductTaggingCoordinatesDataAction","AdsCanvasInlineBuilderShowInlineModalDataAction","AdsCanvasInlineBuilderShowProductTaggingOverlayDataAction","AdsCanvasInlineBuilderSwitchInlineTabsDataAction","AdsCanvasInlineDropdownCreateNewSelectDataAction","AdsCanvasInlineDropdownUseExistingSelectDataAction","AdsCanvasInlineTemplateBuilderDoneDataAction","AdsCanvasInlineTemplateBuilderMobilePreviewDataAction","AdsFullscreenExperienceRadioToggleDataAction","CanvasCreationWaterfallTypedLogger","requireCond","cr:936653"],(function(a,b,c,d,e,f){"use strict";__p&&__p();b("cr:936653");a={removeInlineCanvasData:function(){b("AdsCanvasInlineBuilderRemoveInlineCanvasDataAction").dispatch({},{line:"51",module:"AdsCanvasInlineBuilderActions.js"})},saveCurrentCanvas:function(a,c,d,e,f,g,h,i,j){new(b("CanvasCreationWaterfallTypedLogger"))().setEventName("editor.init_save").setDraftElementTypes(a.elements.map(function(a){return a.elementType})).log(),b("AdsCanvasInlineBuilderSaveCanvasDataAction").dispatch({canvasDocument:a,elements:c,productSetID:d,pageID:e,onSuccess:f,onError:g,hostID:h,adgroupIDs:i,canvasLeadForm:j},{line:"76",module:"AdsCanvasInlineBuilderActions.js"})},setShowInlineModal:function(a,c,d,e){b("AdsCanvasInlineBuilderShowInlineModalDataAction").dispatch({canvasID:c,showModal:a,templateID:d,sourceFormID:e},{line:"95",module:"AdsCanvasInlineBuilderActions.js"})},setInlineTab:function(a,c){b("AdsCanvasInlineBuilderSwitchInlineTabsDataAction").dispatch({tab:a,isUserInteracted:c},{line:"104",module:"AdsCanvasInlineBuilderActions.js"})},selectRadioButton:function(a){b("AdsCanvasInlineBuilderSelectRadioButtonDataAction").dispatch({newValue:a},{line:"111",module:"AdsCanvasInlineBuilderActions.js"})},inlineAdvancedBuilderBlankOpen:function(){b("AdsCanvasInlineAdvancedBuilderBlankOpenDataAction").dispatch({},{line:"117",module:"AdsCanvasInlineBuilderActions.js"})},inlineAdvancedBuilderBlankSave:function(){b("AdsCanvasInlineAdvancedBuilderBlankSaveDataAction").dispatch({},{line:"121",module:"AdsCanvasInlineBuilderActions.js"})},inlineBuilderNuxTourComplete:function(a,c){b("AdsCanvasInlineBuilderBuilderNuxTourCompleteDataAction").dispatch({nuxStep:a,templateID:c},{line:"125",module:"AdsCanvasInlineBuilderActions.js"})},inlineBuilderNuxTourXout:function(a,c){b("AdsCanvasInlineBuilderBuilderNuxTourXoutDataAction").dispatch({nuxStep:a,templateID:c},{line:"132",module:"AdsCanvasInlineBuilderActions.js"})},inlineTemplateBuilderDone:function(){b("AdsCanvasInlineTemplateBuilderDoneDataAction").dispatch({},{line:"139",module:"AdsCanvasInlineBuilderActions.js"})},inlineDropdownCreateNewSelect:function(){b("AdsCanvasInlineDropdownCreateNewSelectDataAction").dispatch({},{line:"143",module:"AdsCanvasInlineBuilderActions.js"})},inlineDropdownUseExistingSelect:function(){b("AdsCanvasInlineDropdownUseExistingSelectDataAction").dispatch({},{line:"147",module:"AdsCanvasInlineBuilderActions.js"})},inlineTemplateBuilderMobilePreview:function(){b("AdsCanvasInlineTemplateBuilderMobilePreviewDataAction").dispatch({},{line:"151",module:"AdsCanvasInlineBuilderActions.js"})},showProductTaggingOverlay:function(a,c,d){b("AdsCanvasInlineBuilderShowProductTaggingOverlayDataAction").dispatch({index:d,photoElementID:a,productID:c},{line:"159",module:"AdsCanvasInlineBuilderActions.js"})},hideProductTaggingOverlay:function(){b("AdsCanvasInlineBuilderHideProductTaggingOverlayDataAction").dispatch({},{line:"167",module:"AdsCanvasInlineBuilderActions.js"})},setProductTaggingCoordinates:function(a,c,d){b("AdsCanvasInlineBuilderSetProductTaggingCoordinatesDataAction").dispatch({coordinates:d,photoElementID:a,productID:c},{line:"175",module:"AdsCanvasInlineBuilderActions.js"})},toggleFullscreenExperienceRadioList:function(a){b("AdsFullscreenExperienceRadioToggleDataAction").dispatch({selectedOption:a},{line:"185",module:"AdsCanvasInlineBuilderActions.js"})}};e.exports=a}),null);
__d("AdAccountSelfCertificationDataActionType",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({SELF_CERTIFICATION_FAILURE:"self_certification_failure",SELF_CERTIFICATION_FETCH_COMPLETE:"self_certification_fetch_complete",SELF_CERTIFICATION_SUCCESS:"self_certification_success"})}),null);
__d("XBusinessIntegrityAdAccountSelfCertificationAsyncController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ads/integrity/account/self_cert/ajax/",{})}),null);
__d("AdAccountSelfCertificationDataLoader",["AdAccountSelfCertificationDataActionType","AdsAdAccountSelfCertificationDataSelfCertificationFetchCompleteDataAction","AdsDataAtom","AdsLWITargetIDType","AsyncRequest","XBusinessIntegrityAdAccountSelfCertificationAsyncController","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsLWITargetIDType").EMPTY_TARGET_ID,h={type:b("AdAccountSelfCertificationDataActionType").SELF_CERTIFICATION_FAILURE},i={type:b("AdAccountSelfCertificationDataActionType").SELF_CERTIFICATION_SUCCESS};a=function(){__p&&__p();function a(){}var c=a.prototype;c.certifyAccount=function(a,c,d,e,f,j,k,l,m,n){var o=b("XBusinessIntegrityAdAccountSelfCertificationAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))().setURI(o).setData({account_id:a,get_mode:!1,process_ads:c}).setMethod("POST").setAllowCrossPageTransition(!0).setHandler(function(c){c=c.payload;c?(b("AdsDataAtom").handleUpdateFromServerResponse(i),d&&e&&f!=null&&j&&k!=null&&k!==g&&l!=null&&l!==""&&m!=null&&m!==""&&n(e,l,m,k,f,a,j)):b("AdsDataAtom").handleUpdateFromServerResponse(h)}).send()};c.fetchAccountCertification=function(a){var c=b("XBusinessIntegrityAdAccountSelfCertificationAsyncController").getURIBuilder().getURI();new(b("AsyncRequest"))().setURI(c).setData({account_id:a,get_mode:!0}).setMethod("POST").setAllowCrossPageTransition(!0).setHandler(function(a){a=a.payload;a=b("immutable").Map().set("isAccountCertified",a);b("AdsAdAccountSelfCertificationDataSelfCertificationFetchCompleteDataAction").dispatch({data:a},{line:"104",module:"AdAccountSelfCertificationDataLoader.js"})}).send()};return a}();e.exports=new a()}),null);
__d("AdAccountSelfCertificationUIActionType",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({CLOSE_SELF_CERTIFICATION_DIALOG:"close_self_certification_dialog",OPEN_SELF_CERTIFICATION_DIALOG:"open_self_certification_dialog",REQUEST_MANUAL_REVIEW:"request_manual_review",SUBMIT_SELF_CERTIFICATION_REQUEST:"submit_self_certification_request",USER_AGREE_TO_TERMS:"user_agree_to_terms"})}),null);
__d("AdAccountSelfCertificationStore",["AdAccountSelfCertificationDataActionType","AdAccountSelfCertificationDataLoader","AdAccountSelfCertificationUIActionType","AdsAdAccountOpenSelfCertificationDialogWhenClickBoostButtonDataActionFlux","AdsAdAccountSelfCertificationDataSelfCertificationFetchCompleteDataActionFlux","AdsAdAccountSelfCertificationUiRequestManualReviewDataActionFlux","AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux","AdsDataAtom","AdsLoadState_LEGACY","AdsLWISteperOpenSelfCertificationDialogWhenClickBoostButtonDataActionFlux","FluxReduceStore","gkx"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("gkx")("779516");a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.getInitialState=function(){return{confirmTermsAcceptance:!1,loadState:b("AdsLoadState_LEGACY").LOADED,manualReviewRequested:!1,selfCertificationOpenFromStepperBoost:!1,selfCertificationSuccess:!1,shouldFetchSelfCertification:!0,shouldHideBanner:!1,shouldShowSelfCertificationDialog:!1}};d.__getActionTypes=function(){return g?[b("AdAccountSelfCertificationDataActionType").SELF_CERTIFICATION_FAILURE,b("AdAccountSelfCertificationDataActionType").SELF_CERTIFICATION_SUCCESS,b("AdAccountSelfCertificationUIActionType").CLOSE_SELF_CERTIFICATION_DIALOG,b("AdAccountSelfCertificationUIActionType").OPEN_SELF_CERTIFICATION_DIALOG,b("AdAccountSelfCertificationUIActionType").SUBMIT_SELF_CERTIFICATION_REQUEST,b("AdAccountSelfCertificationUIActionType").USER_AGREE_TO_TERMS,b("AdsAdAccountOpenSelfCertificationDialogWhenClickBoostButtonDataActionFlux").actionType,b("AdsAdAccountSelfCertificationDataSelfCertificationFetchCompleteDataActionFlux").actionType,b("AdsAdAccountSelfCertificationUiRequestManualReviewDataActionFlux").actionType,b("AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux").actionType,b("AdsLWISteperOpenSelfCertificationDialogWhenClickBoostButtonDataActionFlux").actionType]:null};d.reduce=function(a,c){__p&&__p();c=c.action;switch(c.type){case b("AdsAdAccountOpenSelfCertificationDialogWhenClickBoostButtonDataActionFlux").actionType:return babelHelpers["extends"]({},a,{confirmTermsAcceptance:!1,shouldShowSelfCertificationDialog:!0});case b("AdsLWISteperOpenSelfCertificationDialogWhenClickBoostButtonDataActionFlux").actionType:return babelHelpers["extends"]({},a,{selfCertificationOpenFromStepperBoost:!0});case b("AdAccountSelfCertificationUIActionType").OPEN_SELF_CERTIFICATION_DIALOG:return babelHelpers["extends"]({},a,{confirmTermsAcceptance:!1});case b("AdAccountSelfCertificationUIActionType").CLOSE_SELF_CERTIFICATION_DIALOG:return babelHelpers["extends"]({},a,{confirmTermsAcceptance:!1,shouldShowSelfCertificationDialog:!1});case b("AdAccountSelfCertificationUIActionType").USER_AGREE_TO_TERMS:return this.$AdAccountSelfCertificationStore1(a);case b("AdAccountSelfCertificationUIActionType").SUBMIT_SELF_CERTIFICATION_REQUEST:return this.$AdAccountSelfCertificationStore2(a,c.data.get("accountID"),!!c.data.get("shouldReprocessAds"),a.shouldShowSelfCertificationDialog||a.selfCertificationOpenFromStepperBoost,c.data.get("appID"),c.data.get("boostID"),c.data.get("instanceID"),c.data.get("targetID"),c.data.get("pageID"),c.data.get("placement"),c.onSuccess);case b("AdsAdAccountSelfCertificationUiRequestManualReviewDataActionFlux").actionType:return this.$AdAccountSelfCertificationStore3(a);case b("AdAccountSelfCertificationDataActionType").SELF_CERTIFICATION_SUCCESS:return this.$AdAccountSelfCertificationStore4(a,!0);case b("AdAccountSelfCertificationDataActionType").SELF_CERTIFICATION_FAILURE:return this.$AdAccountSelfCertificationStore4(a,!1);case b("AdsAdAccountSelfCertificationDataSelfCertificationFetchCompleteDataActionFlux").actionType:return babelHelpers["extends"]({},a,{shouldFetchSelfCertification:!1,shouldHideBanner:c.data.get("isAccountCertified")});case b("AdsBoostedComponentAdAccountV2UpdateAccountDataActionFlux").actionType:return this.getInitialState()}return a};d.getTermsAccepted=function(){return this.getState().confirmTermsAcceptance};d.getSelfCertificationSuccess=function(){return this.getState().selfCertificationSuccess};d.getLoadState=function(){return this.getState().loadState};d.getManualReviewRequested=function(){return this.getState().manualReviewRequested};d.getShouldHideBanner=function(a){var c=this.getState().shouldHideBanner;if(this.getState().shouldFetchSelfCertification){b("AdAccountSelfCertificationDataLoader").fetchAccountCertification(a);return!0}return c};d.getShouldShowSelfCertificationDialog=function(){return this.getState().shouldShowSelfCertificationDialog};d.$AdAccountSelfCertificationStore2=function(a,c,d,e,f,g,h,i,j,k,l){b("AdAccountSelfCertificationDataLoader").certifyAccount(c,d,e,f,g,h,i,j,k,l);return babelHelpers["extends"]({},a,{loadState:b("AdsLoadState_LEGACY").LOADING})};d.$AdAccountSelfCertificationStore3=function(a){return babelHelpers["extends"]({},a,{manualReviewRequested:!this.getState().manualReviewRequested})};d.$AdAccountSelfCertificationStore1=function(a){return babelHelpers["extends"]({},a,{confirmTermsAcceptance:!this.getState().confirmTermsAcceptance})};d.$AdAccountSelfCertificationStore4=function(a,c){return babelHelpers["extends"]({},a,{loadState:b("AdsLoadState_LEGACY").LOADED,selfCertificationSuccess:c})};return c}(b("FluxReduceStore"));a.__moduleID=e.id;e.exports=new a(b("AdsDataAtom"))}),null);
__d("AdsLeadGenFormEditorFunnelLoggerConstants",[],(function(a,b,c,d,e,f){"use strict";a=Object.freeze({ADD_CONSENT:"add_consent",ADD_CUSTOM_DISCLAIMER:"add_custom_disclaimer",ADD_LINK_IN_CUSTOM_DISCLAMER_CONTENT:"add_link_in_custom_disclaimer_content",CLICK_ADD_CUSTOM_QUESTION:"click_add_custom_question",CLICK_FORM_LOCALE_SELECTOR:"click_form_locale_selector",CLICK_HIDE_STANDARD_USER_INFO_QUESTIONS:"click_hide_standard_user_info_questions",CLICK_FORM_TYPE_LEARN_MORE_LINK:"click_form_type_learn_more_link",CLICK_PUBLISH_FORM:"click_publish_form",CLICK_SAVE_DRAFT:"click_save_draft",CLICK_SHOW_MORE_STANDARD_USER_INFO_QUESTIONS:"click_show_more_standard_user_info_questions",CLIENT_VALIDATION_BEFORE_PUBLISH_ERROR:"client_validation_before_publish_error",DISABLE_CONTEXT_CARD:"disable_context_card",DRAFT_SAVED:"draft_saved",DUPLICATE_FORM_ERROR:"duplicate_form_error",EDIT_ANSWER_KEY_INPUT:"edit_answer_key_input",EDIT_CONSENT_KEY_INPUT:"edit_consent_key_input",EDIT_CONTEXT_CONTENT_INPUT:"edit_context_content_input",EDIT_CONTEXT_HEADLINE_INPUT:"edit_context_headline_input",EDIT_CUSTOM_DISCLAIMER_TITLE_INPUT:"edit_custom_disclaimer_title_input",EDIT_FORM_NAME_INPUT:"edit_form_name_input",EDIT_PRIVACY_POLICY_LINK_LABEL_INPUT:"edit_privacy_policy_link_label_input",EDIT_PRIVACY_POLICY_LINK_URL_INPUT:"edit_privacy_policy_link_url_input",EDIT_QUESTION_HEADLINE_INPUT:"edit_question_headline_input",EDIT_QUESTION_KEY_INPUT:"edit_question_key_input",ENABLE_CONTEXT_CARD:"enable_context_card",ENABLE_FORM_TYPE_HIGHER_INTENT:"enable_higher_intent",ENABLE_FORM_TYPE_MORE_VOLUME:"enable_more_volume",EXPAND_CONFIGURATION_SECTION:"expand_configuration_section",EXPAND_CONTEXT_SECTION:"expand_context_section",EXPAND_FIELD_IDS_SECTION:"expand_field_ids_section",EXPAND_FORM_TYPE_SECTION:"expand_form_type_section",EXPAND_PRIVACY_POLICY_SECTION:"expand_privacy_policy_section",EXPAND_QUESTIONS_SECTION:"expand_questions_section",EXPAND_REVIEW_SCREEN_SECTION:"expand_review_screen_section",EXPAND_THANK_YOU_SECTION:"expand_thank_you_section",FOCUS_ANSWER_KEY_INPUT:"focus_answer_key_input",FOCUS_CONSENT_KEY_INPUT:"focus_consent_key_input",FOCUS_CONTEXT_CONTENT_INPUT:"focus_context_content_input",FOCUS_CONTEXT_HEADLINE_INPUT:"focus_context_headline_input",FOCUS_CUSTOM_DISCLAIMER_TITLE_INPUT:"focus_custom_disclaimer_title_input",FOCUS_FORM_NAME_INPUT:"focus_form_name_input",FOCUS_PRIVACY_POLICY_LINK_LABEL_INPUT:"focus_privacy_policy_link_label_input",FOCUS_PRIVACY_POLICY_LINK_URL_INPUT:"focus_privacy_policy_link_url_input",FOCUS_QUESTION_HEADLINE_INPUT:"focus_question_headline_input",FOCUS_QUESTION_KEY_INPUT:"focus_question_key_input",FORM_EDITOR_SHOWN:"form_editor_shown",FORM_PUBLISHED:"form_published",PUBLISH_FORM_ERROR:"publish_form_error",PUBLISH_FORM_SUCCESS:"publish_form_success",REMOVE_CONSENT:"remove_consent",REMOVE_CUSTOM_DISCLAIMER:"remove_custom_disclaimer",REMOVE_LINK_IN_CUSTOM_DISCLAIMER_CONTENT:"remove_link_in_custom_disclaimer_content",REMOVE_STANDARD_USER_INFO_QUESTION:"remove_standard_user_info_question",REORDERED_ATLEAST_ONE_QUESTION:"reordered_atleast_one_question",SAVE_DRAFT_ERROR:"save_draft_error",SELECT_CONTENT_TAB:"select_content_tab",SELECT_COVER_FROM_AD_CREATIVE:"select_cover_from_ad_creative",SELECT_CUSTOM_COVER_IMAGE:"select_custom_cover_image",SELECT_SETTINGS_TAB:"select_settings_tab",SELECT_SHARING_OPEN:"select_sharing_open",SELECT_SHARING_RESTRICTED:"select_sharing_restricted",SELECT_STANDARD_USER_INFO_QUESTION:"select_standard_user_info_question",SELECT_THANK_YOU_PAGE_VIEW_WEBSITE:"select_thank_you_page_view_website",SELECT_THANK_YOU_PAGE_DOWNLOAD:"select_thank_you_page_download",SELECT_THANK_YOU_PAGE_CALL_BUSINESS:"select_thank_you_page_call_business",SELECT_THANK_YOU_PAGE_MESSAGE_BUSINESS:"select_thank_you_page_message_business",SET_CONTEXT_CONTENT_STYLE_BULLET:"set_context_content_style_bullet",SET_CONTEXT_CONTENT_STYLE_PARAGRAPH:"set_context_content_style_paragraph",SET_FORM_LOCALE:"set_form_locale",START_CONDITIONAL_ANSWER_SET_UPLOAD:"start_conditional_answer_set_upload",START_CUSTOM_COVER_IMAGE_UPLOAD:"start_custom_cover_image_upload",UNFOCUS_ANSWER_KEY_INPUT:"unfocus_answer_key_input",UNFOCUS_CONSENT_KEY_INPUT:"unfocus_consent_key_input",UNFOCUS_CONTEXT_CONTENT_INPUT:"unfocus_context_content_input",UNFOCUS_CONTEXT_HEADLINE_INPUT:"unfocus_context_headline_input",UNFOCUS_CUSTOM_DISCLAIMER_TITLE_INPUT:"unfocus_custom_disclaimer_title_input",UNFOCUS_FORM_NAME_INPUT:"unfocus_form_name_input",UNFOCUS_PRIVACY_POLICY_LINK_LABEL_INPUT:"unfocus_privacy_policy_link_label_input",UNFOCUS_PRIVACY_POLICY_LINK_URL_INPUT:"unfocus_privacy_policy_link_url_input",UNFOCUS_QUESTION_HEADLINE_INPUT:"unfocus_question_headline_input",UNFOCUS_QUESTION_KEY_INPUT:"unfocus_question_key_input",UPLOAD_CONDITIONAL_ANSWER_SET_ERROR:"upload_conditional_answer_set_error",UPLOAD_CONDITIONAL_ANSWER_SET_SUCCESS:"upload_conditional_answer_set_sucess",UPLOAD_CUSTOM_COVER_IMAGE_ERROR:"upload_custom_cover_image_error",UPLOAD_CUSTOM_COVER_IMAGE_SUCCESS:"upload_custom_cover_image_success",NPC_ACCEPT_TERMS_OF_SERVICE_ERROR:"npc_accept_terms_of_service_error",NPC_CANCEL_TERMS_OF_SERVICE_DIALOG:"npc_cancel_terms_of_service_dialog",NPC_CLICK_ACCEPT_TERMS_OF_SERVICE:"npc_click_accept_terms_of_service",NPC_CLICK_OPEN_TERMS_OF_SERVICE_DIALOG:"npc_click_open_terms_of_service_dialog",NPC_TERMS_OF_SERVICE_ACCEPTED:"npc_terms_of_service_accepted",CANVAS_LEAD_FORM_TOGGLE_ENABLED:"canvas_lead_form_toggle_enabled",CANVAS_LEAD_FORM_TOGGLE_DISABLED:"canvas_lead_form_toggle_disabled",CANVAS_UNIFIED_BUILDER_FORM_ADDED:"canvas_unified_builder_form_added",CANVAS_UNIFIED_BUILDER_FORM_REMOVED:"canvas_unified_builder_form_removed"});b=Object.freeze({ADD_CUSTOM_QUESTION:"add_custom_question:",CAPABILITIES_NOTICE_SHOWN_UNDER:"capabilities_notice_shown_under:",CAPABILITIES_NOTICE_REMOVED_UNDER:"capabilities_notice_removed_under:",CONTENT_SECTION:"content_section_",DISABLE_PREVIEW_TAB:"disable_preview_tab:",REMOVE_CUSTOM_QUESTION:"remove_custom_question:",SELECT_PREVIEW_TAB:"select_preview_tab:"});c=Object.freeze({CREATE_NEW_FORM:"create_new_form",DUPLICATE_FORM:"duplicate_form",EDIT_DRAFT_FORM:"edit_draft_form",FIRST_FORM:"first_form",FORM_PREVIEW_TABS:"form_preview_tabs",CANVAS_UNIFIED_BUILDER:"canvas_unified_builder",NOT_FIRST_FORM:"not_first_form",FORM_EDITOR_REDESIGN_CONTROL:"form_editor_redesign_control",FORM_EDITOR_REDESIGN_TEST:"form_editor_redesign_test"});d=Object.freeze({AD_ACCOUNT_ID:"ad_account_id:",AD_MEDIA_FORMAT:"ad_media_format:",BROWSER_NAME:"browser_name:",BROWSER_VERSION:"browser_version:",CLIENT_VALIDATION_ERROR:"client_validation_error:",ERROR_CODE:"error_code:",PAGE_ID:"page_id:",CANVAS_TEMPLATE_ID:"canvas_template_id:",AD_OBJECTIVE:"ad_objective:",QE_NAME:"qe_name:",QE_GROUP:"qe_group:",TAB_SURFACE:"tab_surface:",HOST_ID:"host_id:"});e.exports={FUNNEL_NAME:"WWW_LEAD_GEN_FORM_EDITOR_FUNNEL",FUNNEL_LOGGING_TIMEOUT:999999,FUNNEL_LOGGING_EVENTS:a,FUNNEL_LOGGING_EVENT_PREFIXES:b,FUNNEL_LOGGING_TAG_PREFIXES:d,FUNNEL_LOGGING_TAGS:c}}),null);
__d("AdsLeadGenFormEditorValidationFields",[],(function(a,b,c,d,e,f){"use strict";e.exports=Object.freeze({CANVAS_ID:"canvas_id",CONTEXT_CARD_CONTENT:"context_card_content",CONTEXT_CARD_COVER_PHOTO:"context_card_cover_photo",CONTEXT_CARD_CTA:"context_cta",CONTEXT_CARD_LAYOUT:"context_card_layout",CONTEXT_CARD_TITLE:"context_title",CUSTOM_DISCLAIMER_BODY:"custom_disclaimer_body",CUSTOM_DISCLAIMER_CONSENTS:"custom_disclaimer_consents",CUSTOMIZED_QUESTION:"customized_question",FORM:"form",JUMP_TO_FORM_BUTTON:"jump_to_form_button",THANK_YOU_PAGE_BODY:"thank_you_page_body",THANK_YOU_PAGE_BUSINESS_PHONENUMBER:"thank_you_page_business_phonenumber",THANK_YOU_PAGE_BUTTON_TEXT:"thank_you_page_button_text",THANK_YOU_PAGE_HEADLINE:"thank_you_page_headline",THANK_YOU_PAGE_WEBSITE_URL:"thank_you_page_website_url"})}),null);
__d("AdsLeadGenFormEditorValidationErrors",["errorCode","errorDesc","fbt","AdsError"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();a=new(b("AdsError"))(1892093,i._("The form can't be published until all the errors are fixed"),{level:b("AdsError").Level.WARN});c=new(b("AdsError"))(1892094,i._("There are errors or missing fields in this section that need to be fixed"),{level:b("AdsError").Level.WARN});d=new(b("AdsError"))(1892119,i._("At least one question is required"),{level:b("AdsError").Level.WARN});f=new(b("AdsError"))(1892020,i._("Duplicate questions are found in lead form, which is not allowed"),{level:b("AdsError").Level.WARN});g=new(b("AdsError"))(1892096,i._("Please enter a valid Form custom question."),{level:b("AdsError").Level.WARN});var j=new(b("AdsError"))(1892106,i._("Conditional answer set is required. Please upload a CSV file."),{level:b("AdsError").Level.WARN}),k=new(b("AdsError"))(1892120,i._("One of the question relies on other question to provide more context (for example, store lookup question requires one of the other questions to have zip_code as the FieldID)")),l=new(b("AdsError"))(1892121,i._("Please provide a store lookup type to use store lookup question.")),m=new(b("AdsError"))(1892138,i._("Please select a canvas")),n=new(b("AdsError"))(1892139,i._("Button label is required for Canvas context card")),o=new(b("AdsError"))(1892144,i._("Please select a Canvas that do not have footer or link")),p=new(b("AdsError"))(1892070,i._("Cannot have two questions sharing the same field id"),{level:b("AdsError").Level.WARN}),q=new(b("AdsError"))(1892071,h._(function(a,b){return a._("Cannot have two options sharing the same key")},{}),{level:b("AdsError").Level.WARN}),r=new(b("AdsError"))(1892117,i._("Headline must be at least 5 characters long"),{level:b("AdsError").Level.WARN}),s=new(b("AdsError"))(1892161,i._("Both fields need info. Finish filling them in or delete the info in this row."),{level:b("AdsError").Level.WARN});i=new(b("AdsError"))(1892159,i._("No product set ID is selected"),{level:b("AdsError").Level.WARN});var t=new(b("AdsError"))(1892130,h._(function(a,b){return a._("There should be at least 2 options for a question. Please provide 2 or more options.")},{}),{level:b("AdsError").Level.WARN}),u=new(b("AdsError"))(1892162,h._(function(a,b){return a._("A Tracking Parameter has the same name as the Field ID of one of your questions. Please choose a unique name for each Field ID and Tracking Parameter.")},{}),{level:b("AdsError").Level.WARN}),v=new(b("AdsError"))(1892160,h._(function(a,b){return a._("Tracking Parameters for a Lead Form must each have a non-empty name and a non-empty value. Please ensure all your names and values are filled in.")},{}),{level:b("AdsError").Level.WARN});h=new(b("AdsError"))(1892171,h._(function(a,b){return a._("Tracking Parameters Name or Value is too long. Names or Values cannot exceed 256 characters. Shorten the name(s) or value(s) that exceed 256 characters and try again.")},{}),{level:b("AdsError").Level.WARN});e.exports={FORM_ERROR:a,SECTION_ERROR:c,NO_QUESTIONS_PROVIDED_ERROR:d,DUPLICATE_ANSWER_KEY_ERROR:q,DUPLICATE_QUESTION_ERROR:f,DUPLICATE_QUESTION_KEY_ERROR:p,EMPTY_CUSTOM_QUESTION_ERROR:g,MISSING_CONDITIONAL_ANSWER_SET_ERROR:j,MISSING_CONTEXT_PROVIDER_ERROR:k,MISSING_STORE_LOOKUP_TYPE_ERROR:l,CANVAS_IS_REQUIRED_FOR_CONTEXT_CARD_ERROR:m,JUMP_TO_FORM_BUTTON_LABEL_IS_REQUIRED_ERROR:n,CANVAS_SHOULD_NOT_HAVE_FOOTER_OR_LINK:o,QUESTIONS_HEADLINE_ERROR:r,INVALID_DYNAMIC_CANVAS_CONTENT:s,MISSING_PRODUCT_SET_ID:i,TOO_FEW_OPTIONS_FOR_MULTIPLE_CHOICE_QUESTION_ERROR:t,TRACKING_PARAMETERS_DUPLICATE_NAME_ERROR:u,TRACKING_PARMETERS_EMPTY_NAME_OR_VALUE_ERROR:v,TRACKING_PARAMETERS_NAME_OR_VALUE_TOO_LONG_ERROR:h}}),null);
__d("AdsLeadGenFromEditorCanvasValidationStore",["AdsDataAtom","AdsLeadGenFormEditorContextCardSetCanvasValidationResultActionFlux","AdsLeadGenFormEditorDataManager","FluxLoadObjectStore","gkx","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("gkx")("779516");a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.__getActionTypes=function(){return g?[this.getActionTypeStartLoad(),b("AdsLeadGenFormEditorContextCardSetCanvasValidationResultActionFlux").actionType]:null};d.reduce=function(a,c){c=c.action;switch(c.type){case b("AdsLeadGenFormEditorContextCardSetCanvasValidationResultActionFlux").actionType:return this.__handleOne(a,c.canvasID,c.validationResult);default:return a}};d.__load=function(a){b("AdsLeadGenFormEditorDataManager").validateCanvas(a)};return c}(b("FluxLoadObjectStore"));a.__moduleID=e.id;e.exports=new a(b("AdsDataAtom"))}),null);
__d("AdsLeadGenFormEditorValidationContextCardReducer",["errorCode","fbt","AdsAPILeadGenDataFields","AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux","AdsDataAtom","AdsError","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorContextCardSetCanvasActionFlux","AdsLeadGenFormEditorContextCardSetContentActionFlux","AdsLeadGenFormEditorContextCardSetCoverPhotoActionFlux","AdsLeadGenFormEditorContextCardSetDynamicCanvasContentLabelActionFlux","AdsLeadGenFormEditorContextCardSetDynamicCanvasContentValueActionFlux","AdsLeadGenFormEditorContextCardSetIsCoverPhotoSelectedActionFlux","AdsLeadGenFormEditorContextCardSetIsSelectedActionFlux","AdsLeadGenFormEditorContextCardSetJumpToFormButtonLabelActionFlux","AdsLeadGenFormEditorContextCardSetTitleActionFlux","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorUtils","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationUtils","AdsLeadGenFromEditorCanvasValidationStore","LeadGenDataContextCardFormat","immutable","nullthrows"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("AdsLeadGenFormEditorValidationErrors").CANVAS_IS_REQUIRED_FOR_CONTEXT_CARD_ERROR,j=b("AdsLeadGenFormEditorValidationErrors").CANVAS_SHOULD_NOT_HAVE_FOOTER_OR_LINK,k=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,l=b("AdsLeadGenFormEditorValidationErrors").INVALID_DYNAMIC_CANVAS_CONTENT,m=b("AdsLeadGenFormEditorValidationErrors").JUMP_TO_FORM_BUTTON_LABEL_IS_REQUIRED_ERROR,n=b("AdsLeadGenFormEditorValidationErrors").MISSING_PRODUCT_SET_ID,o=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR,p=b("AdsLeadGenFormEditorValidationUtils").isNonEmptyString;function a(a,c){__p&&__p();switch(c.type){case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:case b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType:var d=c.form;a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,null);d.get("context_card_is_selected")&&(a=q(a,d));return a;case b("AdsLeadGenFormEditorContextCardSetContentActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_CONTENT,null);case b("AdsLeadGenFormEditorContextCardSetCoverPhotoActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_COVER_PHOTO,z(c.coverPhoto,c.contextCardFormat));case b("AdsLeadGenFormEditorContextCardSetDynamicCanvasContentLabelActionFlux").actionType:d=b("AdsLeadGenFormEditorUtils").getDynamicCanvasLabelID(c.index);return d?a.set(d,null):a;case b("AdsLeadGenFormEditorContextCardSetDynamicCanvasContentValueActionFlux").actionType:d=b("AdsLeadGenFormEditorUtils").getDynamicCanvasContentID(c.index);return d?a.set(d,null):a;case b("AdsLeadGenFormEditorContextCardSetIsCoverPhotoSelectedActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_COVER_PHOTO,null);case b("AdsLeadGenFormEditorContextCardSetIsSelectedActionFlux").actionType:return!c.isSelected?a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_CONTENT,null).set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_COVER_PHOTO,null).set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_LAYOUT,null).set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_TITLE,null).set(b("AdsLeadGenFormEditorValidationFields").CANVAS_ID,null).set(b("AdsLeadGenFormEditorValidationFields").JUMP_TO_FORM_BUTTON,null).set(b("AdsAPILeadGenDataFields").CANVAS_TEMPLATE_SPEC,null):a;case b("AdsLeadGenFormEditorContextCardSetTitleActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_TITLE,x(c.title,c.contextCardFormat));case b("AdsLeadGenFormEditorContextCardSetCanvasActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").CANVAS_ID,null);case b("AdsLeadGenFormEditorContextCardSetJumpToFormButtonLabelActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").JUMP_TO_FORM_BUTTON,u(c.buttonLabel));default:return a}}function q(a,c){var d=c.get("context_card_format");switch(d){case b("LeadGenDataContextCardFormat").TEXT:return v(a,c);case b("LeadGenDataContextCardFormat").SIMPLE_TEXT:return w(a,c);case b("LeadGenDataContextCardFormat").CANVAS:return r(a,c);case b("LeadGenDataContextCardFormat").DYNAMIC_CANVAS:return t(a,c);default:return a}}function r(a,c){var d=s(c.get("canvas"));a=a.set(b("AdsLeadGenFormEditorValidationFields").CANVAS_ID,d);c=u(c.get("jump_to_form_button_label"));a=a.set(b("AdsLeadGenFormEditorValidationFields").JUMP_TO_FORM_BUTTON,c);d=!!d||!!c;d&&(a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,o).set(b("AdsLeadGenFormEditorValidationFields").FORM,k));return a}function s(a){if(!a||!a.get("id"))return i;a=a.get("id");b("AdsDataAtom").waitFor([b("AdsLeadGenFromEditorCanvasValidationStore").getDispatchToken()]);a=b("AdsLeadGenFromEditorCanvasValidationStore").get(a);return a.hasValue()&&a.value===!1?j:null}function t(a,c){__p&&__p();var d=c.get("product_set_id");if(!d)return a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,n).set(b("AdsLeadGenFormEditorValidationFields").FORM,k);d=c.get("dynamic_canvas_content_label");c=c.get("dynamic_canvas_content_value");for(var e=0;e<d.size;e++){var f=d.get(e),g=c.get(e),h=b("AdsLeadGenFormEditorUtils").getDynamicCanvasLabelID(e),i=b("AdsLeadGenFormEditorUtils").getDynamicCanvasContentID(e);!!g&&!f?a=a.set(b("nullthrows")(h),l).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,o).set(b("AdsLeadGenFormEditorValidationFields").FORM,k):!!f&&!g?a=a.set(b("nullthrows")(i),l).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,o).set(b("AdsLeadGenFormEditorValidationFields").FORM,k):a=a.set(b("nullthrows")(i),null).set(b("nullthrows")(h),null)}return a}function u(a){return p(a)?null:m}function v(a,c){var d=x(c.get("context_card_title"));a=a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_TITLE,d);var e=c.get("context_card_is_cover_photo_selected")?z(c.get("context_card_cover_photo")):null;a=a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_COVER_PHOTO,e);c=y(c.get("context_card_content"));a=a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_CONTENT,c);d=!!d||!!e||!!c;d&&(a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,o).set(b("AdsLeadGenFormEditorValidationFields").FORM,k));return a}function w(a,c){var d=x(c.get("context_card_title"),b("LeadGenDataContextCardFormat").SIMPLE_TEXT);a=a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_TITLE,d);c=c.get("context_card_is_cover_photo_selected")?z(c.get("context_card_cover_photo"),b("LeadGenDataContextCardFormat").SIMPLE_TEXT):null;a=a.set(b("AdsLeadGenFormEditorValidationFields").CONTEXT_CARD_COVER_PHOTO,c);d=!!d||!!c;d&&(a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.CONTEXT_CARD,o).set(b("AdsLeadGenFormEditorValidationFields").FORM,k));return a}function x(a,c){if(p(a))return null;return c===b("LeadGenDataContextCardFormat").SIMPLE_TEXT?new(b("AdsError"))(1892031,h._("Headline content is required"),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorContextCardSetTitleActionFlux").actionType}):new(b("AdsError"))(1892031,h._("Title content is required if context card is selected for lead ads"),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorContextCardSetTitleActionFlux").actionType})}function y(a){var c=new(b("AdsError"))(1892060,h._("Content is required if context card is selected for lead ads"),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorContextCardSetContentActionFlux").actionType});if(!a)return c;var d=!0;a.forEach(function(a){d=d&&!p(a)});return d?c:null}function z(a,c){if(a)return null;return c===b("LeadGenDataContextCardFormat").SIMPLE_TEXT?new(b("AdsError"))(1892053,h._("Image is required"),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorContextCardSetCoverPhotoActionFlux").actionType}):new(b("AdsError"))(1892053,h._("Image is required if user upload image is selected in context card for lead ads"),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorContextCardSetCoverPhotoActionFlux").actionType})}e.exports={reduce:a}}),null);
__d("AdsLeadGenFormEditorValidationCustomDisclaimerReducer",["errorCode","fbt","AdsError","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorCustomDisclaimerRemoveConsentActionFlux","AdsLeadGenFormEditorCustomDisclaimerSetConsentContentActionFlux","AdsLeadGenFormEditorCustomDisclaimerSetEditorStateActionFlux","AdsLeadGenFormEditorCustomDisclaimerSetIsSelectedActionFlux","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorUtils","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationUtils","ads-lib-urllib","emptyFunction","immutable"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("AdsLeadGenFormEditorValidationUtils").isNonEmptyString;function a(a,c){__p&&__p();switch(c.type){case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:var d=c.form;return!d.get("custom_disclaimer_is_selected")?a:k(a,d);case b("AdsLeadGenFormEditorCustomDisclaimerSetIsSelectedActionFlux").actionType:return c.isSelected?a:j(a);case b("AdsLeadGenFormEditorCustomDisclaimerRemoveConsentActionFlux").actionType:return a.set(c.consentID,null).set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_CONSENTS,null).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.PRIVACY_POLICY,null);case b("AdsLeadGenFormEditorCustomDisclaimerSetConsentContentActionFlux").actionType:if(c.content)return a.set(c.consentID,null).set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_CONSENTS,null);else return a.set(c.consentID,new(b("AdsError"))(1892097,h._("Please provide one nonempty custom disclaimer consent"),{level:b("AdsError").Level.WARN}));case b("AdsLeadGenFormEditorCustomDisclaimerSetEditorStateActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_BODY,l(c.editorState));default:return a}}function j(a){return a.set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_BODY,null).set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_CONSENTS,null)}function k(a,c){var d=l(c.get("custom_disclaimer_editor_state"));a=a.set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_BODY,d);a=q(a,c);return a}function l(a){if(!m(a))return n();return!o(a)?p():null}function m(a){return a&&a.getCurrentContent()&&i(a.getCurrentContent().getPlainText())}function n(){return new(b("AdsError"))(1892045,h._("Please provide the custom disclaimer body"),{level:b("AdsError").Level.WARN})}function o(a){var c=[];a&&a.getCurrentContent()&&a.getCurrentContent().getBlockMap().map(function(d){d.findEntityRanges(b("emptyFunction").thatReturnsTrue,function(b,e){e=d.getEntityAt(b);e&&a.getCurrentContent().getEntity(e).getData().url&&c.push(a.getCurrentContent().getEntity(e).getData().url)})});return c.every(function(a){return b("ads-lib-urllib").isUrl(a)})}function p(){return new(b("AdsError"))(1892045,h._("Please provide a valid Website URL"),{level:b("AdsError").Level.WARN})}function q(a,c){c=c.get("custom_disclaimer_consents");if(c.size===0)return a;var d=!1,e=b("immutable").Set();c.forEach(function(c){var f=b("AdsLeadGenFormEditorUtils").generateKeyFromText(c.get("content")||"");!i(f)?(a=a.set(c.get("id"),new(b("AdsError"))(1892097,h._("Please provide one nonempty custom disclaimer consent"),{level:b("AdsError").Level.WARN})),d=!0):e.has(f)?a=a.set(c.get("id"),new(b("AdsError"))(1892099,h._("Duplicate consents are found in lead form, which is not allowed"),{level:b("AdsError").Level.WARN})):e=e.add(f)});(d||e.size<c.size)&&(a=a.set(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_CONSENTS,new(b("AdsError"))(1892098,h._("There are empty and redundant custom disclaimer consents"),{level:b("AdsError").Level.WARN})));return a}e.exports={reduce:a}}),null);
__d("AdsLeadGenFormEditorValidationFormReducer",["errorCode","fbt","AdsAPILeadGenDataFields","AdsError","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorSetFormNameActionFlux","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationUtils","immutable"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,j=b("AdsLeadGenFormEditorValidationUtils").isNonEmptyString;function a(a,c){switch(c.type){case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:a=a.set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.CONFIGURATION,null);var d=c.form;d=k(d.get("name"));d&&(a=a.set(b("AdsAPILeadGenDataFields").NAME,d).set(b("AdsLeadGenFormEditorValidationFields").FORM,i));return a;case b("AdsLeadGenFormEditorSetFormNameActionFlux").actionType:return a.set(b("AdsAPILeadGenDataFields").NAME,k(c.formName));default:return a}}function k(a){return j(a)?null:new(b("AdsError"))(1892009,h._("Please enter a valid Form Name."),{level:b("AdsError").Level.WARN})}e.exports={reduce:a}}),null);
__d("AdsLeadGenFormEditorValidationPrivacyPolicyReducer",["errorCode","fbt","AdsAPILeadGenDataFields","AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux","AdsError","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorPrivacyPolicyEnableToggleActionFlux","AdsLeadGenFormEditorPrivacyPolicySetUrlActionFlux","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorViewStore","ads-lib-urllib","immutable"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,j=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR;function a(a,c){__p&&__p();switch(c.type){case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:case b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType:a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.PRIVACY_POLICY,null);var d=c.form;a=k(a,d);return a;case b("AdsLeadGenFormEditorPrivacyPolicySetUrlActionFlux").actionType:return a.set(b("AdsAPILeadGenDataFields").PRIVACY_POLICY_URL,l(c.url));case b("AdsLeadGenFormEditorPrivacyPolicyEnableToggleActionFlux").actionType:if(!c.isPrivacyPolicyEnabled)return a.set(b("AdsAPILeadGenDataFields").PRIVACY_POLICY_URL,null);else return a;default:return a}}function k(a,c){c=l(c.get("privacy_policy_url"));a=a.set(b("AdsAPILeadGenDataFields").PRIVACY_POLICY_URL,c);c&&(a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.PRIVACY_POLICY,j).set(b("AdsLeadGenFormEditorValidationFields").FORM,i));return a}function l(a){return!b("AdsLeadGenFormEditorViewStore").getIsPrivacyPolicyRequired()||b("ads-lib-urllib").isUrl(a)?null:new(b("AdsError"))(1892013,h._("Please provide a valid Business Privacy Policy URL"),{level:b("AdsError").Level.WARN})}e.exports={reduce:a}}),null);
__d("LeadGenDataUseCase",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({AUTOMATED_ADS:"automated_ads",CANVAS_LEAD_FORM_TEMPLATE:"canvas_lead_form_template",INSTANT_ARTICLES:"instant_articles",LWI:"LWI",MARKETPLACE_VERTICALS:"marketplace_verticals",MARKETPLACE_RENTALS:"marketplace_rentals",MARKETPLACE_HOME_SALES:"marketplace_home_sales",NEWS_FUNDING:"news_funding",MESSENGER:"messenger",OFFERS:"offers",PAGES_PLATFORM:"pages_platform",PRESCREEN:"prescreen",SERVICES_MASS_LEAD_GEN:"services_mass_lead_gen",NATIVE_LEAD_GEN:"native_lead_gen",MESSENGER_CONVERSATION:"messenger_conversation"})}),null);
__d("AdsLeadGenFormUserInfoQuestion",["immutable"],(function(a,b,c,d,e,f){"use strict";a=b("immutable").Record({id:void 0,fieldID:void 0,label:void 0,name:void 0});c=function(a){babelHelpers.inheritsLoose(b,a);function b(){return a.apply(this,arguments)||this}return b}(a);e.exports=c}),null);
__d("adsLeadGenFormEditorSelectedUserInfoQuestionsSelector",["AdsLeadGenFormEditorStore","AdsLeadGenFormEditorUserInfoQuestionStore","AdsLeadGenFormEditorViewStore","AdsLeadGenFormUserInfoQuestion","LoadObject","adsCreateSelector","adsCreateStoreSelector","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=b("adsCreateStoreSelector")([b("AdsLeadGenFormEditorStore"),b("AdsLeadGenFormEditorUserInfoQuestionStore"),b("AdsLeadGenFormEditorViewStore")],function(){var a=b("AdsLeadGenFormEditorStore").getForm(b("AdsLeadGenFormEditorViewStore").getFormID());return!a?b("LoadObject").loading():b("AdsLeadGenFormEditorUserInfoQuestionStore").get(a.get("locale"))},e.id+".availableUserInfoQuestionsSelector");c=b("adsCreateStoreSelector")([b("AdsLeadGenFormEditorStore"),b("AdsLeadGenFormEditorViewStore")],function(){return b("AdsLeadGenFormEditorStore").get(b("AdsLeadGenFormEditorViewStore").getFormID())},e.id+".formSelector");d=b("adsCreateSelector")([a,c],function(a,c){if(!a.hasValue()||!c.hasValue())return b("LoadObject").loading();var d=g(a.getValueEnforcing());a=c.getValueEnforcing().get("user_info_questions");c=a.filter(function(a,b){return d.get(b)}).map(function(a,b){b=d.get(b);return b.set("fieldID",a.get("fieldID"))});return b("LoadObject").withValue(c)},{name:e.id});function g(a){return a.map(function(a){return a.cms_objects}).reduce(function(a,b){return a.concat(b)},[]).reduce(function(a,c){return a.set(c.id,new(b("AdsLeadGenFormUserInfoQuestion"))({id:c.id,fieldID:null,label:c.label,name:c.name}))},b("immutable").Map([]))}e.exports=d}),null);
__d("AdsLeadGenFormEditorValidationQuestionsReducer",["errorCode","fbt","AdsAPILeadGenDataFields","AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux","AdsDataAtom","AdsError","AdsLeadGenFormConstants","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorQuestionsConditionalAnswerSetLoadedActionFlux","AdsLeadGenFormEditorQuestionsConditionalAnswerSetUploadStartActionFlux","AdsLeadGenFormEditorQuestionsDeleteQuestionActionFlux","AdsLeadGenFormEditorQuestionsSetUserInfoActionFlux","AdsLeadGenFormEditorQuestionsUpdateConditionalQuestionLabelActionFlux","AdsLeadGenFormEditorQuestionsUpdateQuestionActionFlux","AdsLeadGenFormEditorQuestionsUpdateQuestionPageHeadlineActionFlux","AdsLeadGenFormEditorUtils","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationUtils","AdsSelectorUtils","LeadGenDataUseCase","adsLeadGenFormEditorSelectedUserInfoQuestionsSelector","immutable"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();var i=b("AdsLeadGenFormEditorValidationErrors").DUPLICATE_QUESTION_ERROR,j=b("AdsLeadGenFormEditorValidationErrors").EMPTY_CUSTOM_QUESTION_ERROR,k=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,l=b("AdsLeadGenFormEditorValidationErrors").MISSING_CONDITIONAL_ANSWER_SET_ERROR,m=b("AdsLeadGenFormEditorValidationErrors").MISSING_CONTEXT_PROVIDER_ERROR,n=b("AdsLeadGenFormEditorValidationErrors").MISSING_STORE_LOOKUP_TYPE_ERROR,o=b("AdsLeadGenFormEditorValidationErrors").NO_QUESTIONS_PROVIDED_ERROR,p=b("AdsLeadGenFormEditorValidationErrors").QUESTIONS_HEADLINE_ERROR,q=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR,r=b("AdsLeadGenFormEditorValidationErrors").TOO_FEW_OPTIONS_FOR_MULTIPLE_CHOICE_QUESTION_ERROR,s=b("AdsLeadGenFormEditorValidationUtils").conditionalQuestionValidationKey,t=b("AdsLeadGenFormEditorValidationUtils").isNonEmptyString;function a(a,c){__p&&__p();b("AdsDataAtom").waitFor(b("AdsSelectorUtils").getStoreDispatchTokens([b("adsLeadGenFormEditorSelectedUserInfoQuestionsSelector")]));switch(c.type){case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS,null);return c.formUseCase===b("LeadGenDataUseCase").CANVAS_LEAD_FORM_TEMPLATE?x(a,c.form):w(a,c.form);case b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType:return x(a,c.form);case b("AdsLeadGenFormEditorQuestionsSetUserInfoActionFlux").actionType:return a["delete"](b("AdsAPILeadGenDataFields").QUESTIONS)["delete"](b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS);case b("AdsLeadGenFormEditorQuestionsUpdateQuestionActionFlux").actionType:var d=c.update,e=Object.prototype.hasOwnProperty.call(d,"label");if(!e)return a;if(d.label)return a.set(c.questionID,null).set(b("AdsAPILeadGenDataFields").QUESTIONS,null).set("FieldID_"+c.questionID,null).set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.FIELD_IDS,null);else return a.set(c.questionID,j);case b("AdsLeadGenFormEditorQuestionsUpdateConditionalQuestionLabelActionFlux").actionType:return D(a,c.questionID,c.conditionalQuestionIndex,c.conditionalQuestionLabel);case b("AdsLeadGenFormEditorQuestionsConditionalAnswerSetLoadedActionFlux").actionType:e=c.conditionalQuestionSet;var f=c.questionID;e.forEach(function(b,c){a=D(a,f,c,b.name)});return a;case b("AdsLeadGenFormEditorQuestionsConditionalAnswerSetUploadStartActionFlux").actionType:return a.set(c.questionID,null);case b("AdsLeadGenFormEditorQuestionsDeleteQuestionActionFlux").actionType:return a.set(c.question.get("id"),null).set(b("AdsAPILeadGenDataFields").QUESTIONS,null).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS,null);case b("AdsLeadGenFormEditorQuestionsUpdateQuestionPageHeadlineActionFlux").actionType:return a.set(b("AdsAPILeadGenDataFields").QUESTION_PAGE_CUSTOM_HEADLINE,null);default:return a}}function u(a,c){c=c.get("question_page_custom_headline")||"";return c&&c.length<5?a.set(b("AdsAPILeadGenDataFields").QUESTION_PAGE_CUSTOM_HEADLINE,p).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS,q).set(b("AdsLeadGenFormEditorValidationFields").FORM,k):a}function v(a,c){var d=c.get("context_card_is_selected");c=c.get("question_page_custom_headline")||"";return!d&&(!c||c.length<5)?a.set(b("AdsAPILeadGenDataFields").QUESTION_PAGE_CUSTOM_HEADLINE,p).set(b("AdsLeadGenFormEditorValidationFields").FORM,k):a}function w(a,b){return y(u(a,b),b)}function x(a,b){return y(v(a,b),b)}function y(a,c){if(!H(c))return a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS,o).set(b("AdsLeadGenFormEditorValidationFields").FORM,k);a=B(a,c);z(a,c)&&(a=a.set(b("AdsAPILeadGenDataFields").QUESTIONS,new(b("AdsError"))(1892095,h._("There are empty or duplicated custom questions"),{level:b("AdsError").Level.WARN})).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS,q).set(b("AdsLeadGenFormEditorValidationFields").FORM,k));G(a,c)&&(a=a.set(b("AdsAPILeadGenDataFields").QUESTIONS,new(b("AdsError"))(1892010,h._("There are invalid user info questions"),{level:b("AdsError").Level.WARN})).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.QUESTIONS,q).set(b("AdsLeadGenFormEditorValidationFields").FORM,k));return a}function z(a,c){return c.get("customized_questions").some(function(c){c=a.get(c.get("id"));return!!c&&c.level===b("AdsError").Level.WARN})}function A(a){a=b("adsLeadGenFormEditorSelectedUserInfoQuestionsSelector")();return!a.hasValue()?b("immutable").Set():a.getValueEnforcing().reduce(function(a,c){c=b("AdsLeadGenFormEditorUtils").generateKeyFromText(c.label||"");return a.add(c)},b("immutable").Set())}function B(a,c){__p&&__p();var d=c.get("customized_questions");if(d.size===0)return a;var e=A(c);d.forEach(function(c){if(c.get("questionTypeKey")==="conditional")return;var d=b("AdsLeadGenFormEditorUtils").generateKeyFromText(c.get("label")||""),f=K(d,e);a=a.set(c.get("id"),f);f==null&&(a=a.set(c.get("id"),F(c)));e=e.add(d)});var f=d.find(function(a){return a.get("questionTypeKey")==="conditional"});f!=null&&(a=E(a,f,e));f=d.find(function(a){return a.get("questionTypeKey")==="store-lookup"});if(f!=null){c=c.get("user_info_questions");a=C(a,f,c,d)}return a}function C(a,c,d,e){d=d.find(function(a){a=a.get("id");return a===b("AdsLeadGenFormEditorConstants").CMS_PII_MAP.ZIP||a===b("AdsLeadGenFormEditorConstants").CMS_PII_MAP.POST_CODE});d==null&&(d=e.find(function(a){return a.get("fieldID")==="zip_code"}));return c.get("storeLookupTypeKey")==null?a.set(c.get("id"),n):d==null?a.set(c.get("id"),m):a}function D(a,b,c,d){c=s(b,c);if(t(d))return a.set(c,null).set(b,null);else return a.set(c,j)}function E(a,c,d){__p&&__p();if(c.get("conditionalAnswerSetID")==null)return a.set(c.get("id"),l);var e=!1;c.get("conditionalQuestions").forEach(function(f,g){f=b("AdsLeadGenFormEditorUtils").generateKeyFromText(f.name||"");var h=K(f,d);e=e||h!=null;a=a.set(s(c.get("id"),g),h);d=d.add(f)});return a.set(c.get("id"),e?q:null)}function F(a){if(a.get("questionTypeKey")!=="multiple-choice")return null;a=a.get("answers");return a!=null&&a.size>=b("AdsLeadGenFormConstants").MIN_NUM_SELECTOR_OPTIONS?null:r}function G(a,c){return c.get("user_info_questions").some(function(c){c=a.get(c.get("id"));return!!c&&c.level===b("AdsError").Level.WARN})}function H(a){return I(a)+J(a)>0}function I(a){return a.get("user_info_questions").size}function J(a){return a.get("customized_questions").size}function K(a,b){if(!t(a))return j;return b.has(a)?i:null}e.exports={reduce:a}}),null);
__d("AdsLeadGenFormEditorValidationSettingsReducer",["AdsDataAtom","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorQuestionsAddQuestionActionFlux","AdsLeadGenFormEditorQuestionsDeleteQuestionActionFlux","AdsLeadGenFormEditorQuestionsSetFieldIdActionFlux","AdsLeadGenFormEditorQuestionsSetUserInfoActionFlux","AdsLeadGenFormEditorQuestionsUpdateQuestionActionFlux","AdsLeadGenFormEditorStore","AdsLeadGenFormEditorUtils","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","adsLeadGenFormEditorSelectedUserInfoQuestionsSelector","immutable","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsLeadGenFormEditorValidationErrors").DUPLICATE_ANSWER_KEY_ERROR,h=b("AdsLeadGenFormEditorValidationErrors").DUPLICATE_QUESTION_KEY_ERROR,i=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,j=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR;function a(a,c){switch(c.type){case b("AdsLeadGenFormEditorQuestionsAddQuestionActionFlux").actionType:case b("AdsLeadGenFormEditorQuestionsDeleteQuestionActionFlux").actionType:case b("AdsLeadGenFormEditorQuestionsSetUserInfoActionFlux").actionType:case b("AdsLeadGenFormEditorQuestionsUpdateQuestionActionFlux").actionType:b("AdsDataAtom").waitFor([b("AdsLeadGenFormEditorStore").getDispatchToken()]);return l(a,c.formID);case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:return l(a,c.formID);case b("AdsLeadGenFormEditorQuestionsSetFieldIdActionFlux").actionType:return a.set("FieldID_"+c.questionID,null);default:return a}}function k(a,c){__p&&__p();if(c.get("questionTypeKey")!=="multiple-choice")return a;var d=c.get("answers");if(d==null)return a;var e=!1,f=b("immutable").Set();d.forEach(function(d,h){h="FieldID_"+c.get("id")+"_"+d.answer;d=b("AdsLeadGenFormEditorUtils").generateKeyFromText(d.fieldID?d.fieldID:d.answer);f.has(d)?(e=!0,a=a.set(h,g)):(f=f.add(d),a=a.set(h,null))});e&&(a=a.set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.FIELD_IDS,j).set(b("AdsLeadGenFormEditorValidationFields").FORM,i));return a}function l(a,c){__p&&__p();a=a.set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.FIELD_IDS,null);c=b("nullthrows")(b("AdsLeadGenFormEditorStore").getForm(c));var d=b("immutable").Set(),e=!1,f=c.get("customized_questions");f.forEach(function(c){__p&&__p();a=k(a,c);if(c.get("questionTypeKey")==="conditional"){var f=c.get("conditionalQuestions");if(f==null)return;f.forEach(function(f,g){f=b("AdsLeadGenFormEditorUtils").generateKeyFromText(f.fieldKey||"conditional_question_"+(g+1));d.has(f)?(e=!0,a=a.set("FieldID_"+c.get("id")+"_"+g,h)):d=d.add(f)});return}f=b("AdsLeadGenFormEditorUtils").generateKeyFromText(c.get("fieldID")||b("AdsLeadGenFormEditorUtils").getDefaultFieldID(c.get("label")));var g=d.has(f);a=a.set("FieldID_"+c.get("id"),g?h:null);g?e=!0:d=d.add(f)});f=b("adsLeadGenFormEditorSelectedUserInfoQuestionsSelector")().getValue();!f?(f=c.get("user_info_questions"),f.map(function(b,c){c=b.get("fieldID");if(!c)return;var f=d.has(c);a=a.set("FieldID_"+b.get("id"),f?h:null);f?e=!0:d=d.add(c)})):f.map(function(c,f){f=b("AdsLeadGenFormEditorUtils").generateKeyFromText(c.get("fieldID")||b("AdsLeadGenFormEditorUtils").getDefaultFieldID(c.get("name")));var g=d.has(f);a=a.set("FieldID_"+c.get("id"),g?h:null);g?e=!0:d=d.add(f)});e&&(a=a.set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.FIELD_IDS,j).set(b("AdsLeadGenFormEditorValidationFields").FORM,i));return a}e.exports={reduce:a}}),null);
__d("AdsLeadGenFormEditorValidationThankYouScreenReducer",["errorCode","errorDesc","fbt","AdsAPILeadGenDataFields","AdsApiLeadGenThankYouPageButtonType","AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux","AdsError","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorFormPublishFailedActionFlux","AdsLeadGenFormEditorThankYouPageSetBodyActionFlux","AdsLeadGenFormEditorThankYouPageSetButtonTextActionFlux","AdsLeadGenFormEditorThankYouPageSetFollowUpActionUrlActionFlux","AdsLeadGenFormEditorThankYouPageSetPhoneNumberActionFlux","AdsLeadGenFormEditorThankYouPageSetTitleActionFlux","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationUtils","ads-lib-urllib","immutable"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,k=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR,l=b("AdsLeadGenFormEditorValidationUtils").isNonEmptyString;function a(a,c){__p&&__p();switch(c.type){case b("AdsLeadGenFormEditorThankYouPageSetTitleActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_HEADLINE,o(c.title));case b("AdsLeadGenFormEditorThankYouPageSetBodyActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BODY,p(c.body));case b("AdsLeadGenFormEditorThankYouPageSetButtonTextActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BUTTON_TEXT,q(c.buttonText));case b("AdsLeadGenFormEditorThankYouPageSetPhoneNumberActionFlux").actionType:return a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BUSINESS_PHONENUMBER,r(c.phoneNumber));case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:case b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType:a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.THANK_YOU_PAGE,null);var d=c.form;a=m(a,d);return a;case b("AdsLeadGenFormEditorThankYouPageSetFollowUpActionUrlActionFlux").actionType:return a.set(b("AdsAPILeadGenDataFields").FOLLOW_UP_ACTION_URL,n(c.followUpActionURL));case b("AdsLeadGenFormEditorFormPublishFailedActionFlux").actionType:return c.error.code===192?a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BUSINESS_PHONENUMBER,new(b("AdsError"))(c.error.code,i._("Please provide a valid phone number"))).set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.THANK_YOU_PAGE,k).set(b("AdsLeadGenFormEditorValidationFields").FORM,j):a;default:return a}}function m(a,c){var d=c.get("thank_you_page"),e=null,f=null,g=null;d&&(e=o(d.get("title")),f=p(d.get("body")),g=q(d.get("button_text")),a=a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_HEADLINE,e).set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BODY,f).set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BUTTON_TEXT,g));var h=null;d&&d.button_type===b("AdsApiLeadGenThankYouPageButtonType").CALL_BUSINESS&&(h=r(d.business_phone_number),a=a.set(b("AdsLeadGenFormEditorValidationFields").THANK_YOU_PAGE_BUSINESS_PHONENUMBER,h));var i=null;(!d||d.button_type===b("AdsApiLeadGenThankYouPageButtonType").VIEW_WEBSITE||d.button_type===b("AdsApiLeadGenThankYouPageButtonType").DOWNLOAD)&&(i=n(c.get("follow_up_action_url")),a=a.set(b("AdsAPILeadGenDataFields").FOLLOW_UP_ACTION_URL,i));(i||e||f||g||h)&&(a=a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.THANK_YOU_PAGE,k).set(b("AdsLeadGenFormEditorValidationFields").FORM,j));return a}function n(a){return b("ads-lib-urllib").isUrl(a)?null:new(b("AdsError"))(1892011,i._("Please provide a valid Website URL"),{level:b("AdsError").Level.WARN})}function o(a){return l(a)?null:new(b("AdsError"))(1892123,h._(function(a,b){return a._("Title is required for thank you page. Please add the title.")},{}),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorThankYouPageSetTitleActionFlux").actionType})}function p(a){return l(a)?null:new(b("AdsError"))(1892124,h._(function(a,b){return a._("A description is required for thank you page. Please add a description in thank you page.")},{}),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorThankYouPageSetBodyActionFlux").actionType})}function q(a){return l(a)?null:new(b("AdsError"))(1892125,h._(function(a,b){return a._("The button text is required for thank you page. Please add the button text in thank you page.")},{}),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorThankYouPageSetButtonTextActionFlux").actionType})}function r(a){return!a||!a.nationalNumber?new(b("AdsError"))(1892149,h._(function(a,b){return a._("Thank you page phone number is required. Please add a valid phone number.")},{}),{level:b("AdsError").Level.WARN,path:b("AdsLeadGenFormEditorThankYouPageSetPhoneNumberActionFlux").actionType}):null}e.exports={reduce:a}}),null);
__d("AdsLeadGenFormEditorValidationTrackingParametersReducer",["AdsAPILeadGenDataFields","AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux","AdsLeadGenForm","AdsLeadGenFormConstants","AdsLeadGenFormEditorAddTrackingParameterActionFlux","AdsLeadGenFormEditorChangeTrackingParametersActionFlux","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorDeleteTrackingParameterActionFlux","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorQuestionsSetFieldIdActionFlux","AdsLeadGenFormEditorStore","AdsLeadGenFormEditorUserInfoQuestionStore","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationUtils","AdsLeadGenFormUtils","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,h=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR,i=b("AdsLeadGenFormEditorValidationErrors").TRACKING_PARAMETERS_DUPLICATE_NAME_ERROR,j=b("AdsLeadGenFormEditorValidationErrors").TRACKING_PARAMETERS_NAME_OR_VALUE_TOO_LONG_ERROR,k=b("AdsLeadGenFormEditorValidationErrors").TRACKING_PARMETERS_EMPTY_NAME_OR_VALUE_ERROR,l=b("AdsLeadGenFormEditorValidationUtils").isNonEmptyString;function a(a,c){var d=function(a){return a.set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.TRACKING_PARAMETERS,null)};switch(c.type){case b("AdsLeadGenFormEditorValidateFormActionFlux").actionType:case b("AdsLeadGenFormEditorFormFinishActionFlux").actionType:case b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType:case b("AdsLeadGenFormEditorAddTrackingParameterActionFlux").actionType:case b("AdsLeadGenFormEditorChangeTrackingParametersActionFlux").actionType:case b("AdsLeadGenFormEditorDeleteTrackingParameterActionFlux").actionType:case b("AdsLeadGenFormEditorQuestionsSetFieldIdActionFlux").actionType:var e=c.form!=null?c.form:c.type===b("AdsLeadGenFormEditorQuestionsSetFieldIdActionFlux").actionType?b("AdsLeadGenFormEditorStore").get(c.formID).value:null;c=c.trackingParameters!=null?c.trackingParameters:e!=null&&e instanceof b("AdsLeadGenForm")?e.tracking_parameters:null;return c instanceof b("immutable").List&&e instanceof b("AdsLeadGenForm")?m(d(a),e,c):a;default:return a}}function m(a,c,d){__p&&__p();d=n(d,c);c=d.reduce(function(a,b){if(a===k||b.nameError===k||b.valueError===k)return k;else if(a===j||b.nameError===j||b.valueError===j)return j;else if(a===i||b.nameError===i)return i;return null},null);return c===null?a.set(b("AdsAPILeadGenDataFields").TRACKING_PARAMETERS,null):a.set(b("AdsAPILeadGenDataFields").TRACKING_PARAMETERS,c).set(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.TRACKING_PARAMETERS,h).set(b("AdsLeadGenFormEditorValidationFields").FORM,g)}function n(a,c){__p&&__p();var d=b("AdsLeadGenFormEditorUserInfoQuestionStore").getLookupMap(c.locale),e=c.user_info_questions.toSet().map(function(a){var c=a.get("fieldID");if(typeof c==="string")return c;if(d===null||d===void 0)return null;c=d.get(a.get("id"));return c!==void 0&&c!==null&&typeof c.name==="string"?b("AdsLeadGenFormUtils").getDefaultFieldID(c.name):null}).union(c.customized_questions.toSet().map(function(a){return a.get("fieldID")||b("AdsLeadGenFormUtils").getDefaultFieldID(a.get("label"))})),f=new Set();c=a.map(function(a){var c=a.name.trim();a=a.value.trim();var d=!l(c)&&!l(a),g=!l(c)&&!d?k:c.length>b("AdsLeadGenFormConstants").MAX_TRACKING_PARAMETER_LENGTH?j:e.contains(c)||f.has(c)?i:null;g==null&&!d&&f.add(c);c=d?null:a.length>b("AdsLeadGenFormConstants").MAX_TRACKING_PARAMETER_LENGTH?j:l(a)?null:k;return{nameError:g,valueError:c}});return c}e.exports={calculateTrackingParameterErrors:n,reduce:a}}),null);
__d("AdsLeadGenFormEditorFunnelLogger",["AdsLeadGenFormEditorFunnelLoggerConstants","FunnelLogger","UserAgentData"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_NAME,h=b("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_TIMEOUT,i=b("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_TAG_PREFIXES,j=b("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_TAGS,k={initAndStartFunnel:function(a,c,d,e,f,l,m){__p&&__p();b("FunnelLogger").startFunnel(g);b("FunnelLogger").setFunnelTimeout(g,h);a!=null&&a.account_id&&k.addFunnelTag(i.AD_ACCOUNT_ID+a.account_id);k.addFunnelTag(i.AD_MEDIA_FORMAT+(c==null?"unknown":c.toLowerCase()));k.addFunnelTag(i.PAGE_ID+e.id);a=f!=null?j.EDIT_DRAFT_FORM:l!=null?j.DUPLICATE_FORM:j.CREATE_NEW_FORM;k.addFunnelTag(a);k.addFunnelTag(d);k.addFunnelTag(i.BROWSER_NAME+b("UserAgentData").browserName);k.addFunnelTag(i.BROWSER_VERSION+b("UserAgentData").browserFullVersion);k.addFunnelTag(m?j.FIRST_FORM:j.NOT_FIRST_FORM)},endFunnel:function(){b("FunnelLogger").endFunnel(g)},addFunnelTag:function(a){b("FunnelLogger").addFunnelTag(g,a)},appendAction:function(a){b("FunnelLogger").appendAction(g,a)},appendActionIfNew:function(a){b("FunnelLogger").appendActionIfNew(g,a)},appendActionWithTag:function(a,c){b("FunnelLogger").appendActionWithTag(g,a,c)}};e.exports=k}),null);
__d("AdsLeadGenFormEditorValidationStore",["AdsCanvasInlineBuilderActions","AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux","AdsDataAtom","AdsError","AdsLeadGenFormEditorApiFormSaveActionFlux","AdsLeadGenFormEditorClearValidationStoreActionFlux","AdsLeadGenFormEditorConstants","AdsLeadGenFormEditorDataManager","AdsLeadGenFormEditorDraftFormSaveFailedActionFlux","AdsLeadGenFormEditorFormFinishActionFlux","AdsLeadGenFormEditorFormPublishFailedActionFlux","AdsLeadGenFormEditorFunnelLogger","AdsLeadGenFormEditorFunnelLoggerConstants","AdsLeadGenFormEditorUtils","AdsLeadGenFormEditorValidateFormActionFlux","AdsLeadGenFormEditorValidationContextCardReducer","AdsLeadGenFormEditorValidationCustomDisclaimerReducer","AdsLeadGenFormEditorValidationErrors","AdsLeadGenFormEditorValidationFields","AdsLeadGenFormEditorValidationFormReducer","AdsLeadGenFormEditorValidationPrivacyPolicyReducer","AdsLeadGenFormEditorValidationQuestionsReducer","AdsLeadGenFormEditorValidationSettingsReducer","AdsLeadGenFormEditorValidationThankYouScreenReducer","AdsLeadGenFormEditorValidationTrackingParametersReducer","AdsLeadGenFormEditorValidationUtils","AdsLeadGenFormEditorViewStore","FluxMapStore","LeadGenDataStatus","adsCreateStoreSelector","immutable"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("AdsLeadGenFormEditorValidationErrors").FORM_ERROR,h=b("AdsLeadGenFormEditorValidationErrors").SECTION_ERROR,i=b("AdsLeadGenFormEditorValidationUtils").conditionalQuestionValidationKey,j=b("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_EVENTS,k=b("AdsLeadGenFormEditorFunnelLoggerConstants").FUNNEL_LOGGING_TAG_PREFIXES;a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var f=arguments.length,g=new Array(f),h=0;h<f;h++)g[h]=arguments[h];return(c=d=a.call.apply(a,[this].concat(g))||this,d.getErrors=b("adsCreateStoreSelector")([babelHelpers.assertThisInitialized(d)],function(){return d.getState()},e.id),c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.reduce=function(a,c){__p&&__p();var d=c.action;if(d.type===b("AdsLeadGenFormEditorClearValidationStoreActionFlux").actionType)return b("immutable").Map();b("AdsDataAtom").waitFor([b("AdsLeadGenFormEditorViewStore").getDispatchToken()]);(d.type===b("AdsLeadGenFormEditorFormFinishActionFlux").actionType||d.type===b("AdsLeadGenFormEditorApiFormSaveActionFlux").actionType||b("AdsLeadGenFormEditorViewStore").getIsUnsaved())&&(a=a.set(b("AdsLeadGenFormEditorValidationFields").FORM,null));(d.type===b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType||b("AdsLeadGenFormEditorViewStore").getIsCanvasFormUnsaved())&&(a=a.set(b("AdsLeadGenFormEditorValidationFields").FORM,null));a=[b("AdsLeadGenFormEditorValidationContextCardReducer").reduce,b("AdsLeadGenFormEditorValidationCustomDisclaimerReducer").reduce,b("AdsLeadGenFormEditorValidationFormReducer").reduce,b("AdsLeadGenFormEditorValidationPrivacyPolicyReducer").reduce,b("AdsLeadGenFormEditorValidationQuestionsReducer").reduce,b("AdsLeadGenFormEditorValidationSettingsReducer").reduce,b("AdsLeadGenFormEditorValidationThankYouScreenReducer").reduce,b("AdsLeadGenFormEditorValidationTrackingParametersReducer").reduce].reduce(function(a,b){return b(a,d)},a);if(d.type===b("AdsLeadGenFormEditorFormFinishActionFlux").actionType){c=a.get(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_BODY);var e=a.get(b("AdsLeadGenFormEditorValidationFields").CUSTOM_DISCLAIMER_CONSENTS);(c||e)&&(a=a.withMutations(function(a){a.set(b("AdsLeadGenFormEditorConstants").CONTENT_TAB.SECTIONS.PRIVACY_POLICY,h).set(b("AdsLeadGenFormEditorValidationFields").FORM,g)}));c=a.get(b("AdsLeadGenFormEditorConstants").SETTINGS_TAB.SECTIONS.TRACKING_PARAMETERS);c&&(a=a.withMutations(function(a){return a.set(b("AdsLeadGenFormEditorValidationFields").FORM,g)}))}if((d.type===b("AdsLeadGenFormEditorFormPublishFailedActionFlux").actionType||d.type===b("AdsLeadGenFormEditorDraftFormSaveFailedActionFlux").actionType)&&a.get(b("AdsLeadGenFormEditorValidationFields").FORM)==null){e=b("AdsLeadGenFormEditorUtils").getErrorSpecFromError(d.error);e&&e.error_code&&e.error_message&&(a=a.set(b("AdsLeadGenFormEditorValidationFields").FORM,new(b("AdsError"))(e.error_code,e.error_message)))}d.type===b("AdsLeadGenFormEditorValidateFormActionFlux").actionType&&(d.onFormValidationDone!=null&&b("AdsDataAtom").addPostDispatchCallback(function(){d.onFormValidationDone(a.get(b("AdsLeadGenFormEditorValidationFields").FORM)==null)}));if(d.type!==b("AdsLeadGenFormEditorFormFinishActionFlux").actionType&&d.type!==b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType)return a;if(a.get(b("AdsLeadGenFormEditorValidationFields").FORM)!=null){this.$AdsLeadGenFormEditorValidationStore1(a);return a}d.type===b("AdsLeadGenFormEditorFormFinishActionFlux").actionType?b("AdsLeadGenFormEditorDataManager").publishForm(d.draftFormID,d.formID,d.form.set("status",b("LeadGenDataStatus").ACTIVE),d.pageID):d.type===b("AdsCanvasInlineBuilderFinishFormCanvasDataActionFlux").actionType&&b("AdsDataAtom").addPostDispatchCallback(function(){b("AdsCanvasInlineBuilderActions").saveCurrentCanvas(d.canvasDocument,d.elements,d.productSetID,d.pageID,d.onSuccess,d.onError,d.hostID,d.adgroupIDs,d.form)});return a};d.getError=function(a){a=this.get(a);return a instanceof b("AdsError")?a.message:null};d.getErrorsForConditionalQuestions=function(a){var b=a.get("conditionalQuestions");if(b==null)return null;var c=this.getState();return b.map(function(b,d){return c.get(i(a.get("id"),d))})};d.getHasErrors=function(){return this.getErrors().some(function(a,b){return a!==null})};d.$AdsLeadGenFormEditorValidationStore1=function(a){b("AdsLeadGenFormEditorFunnelLogger").appendAction(j.CLIENT_VALIDATION_BEFORE_PUBLISH_ERROR),a.forEach(function(a,c){if(a==null)return;b("AdsLeadGenFormEditorFunnelLogger").addFunnelTag(k.CLIENT_VALIDATION_ERROR+c+","+a.key)})};return c}(b("FluxMapStore"));a.__moduleID=e.id;e.exports=new a(b("AdsDataAtom"))}),null);
__d("BoostedComponentErrorBoundary.react",["BoostedComponentClientExceptionsTypedLogger","ErrorBoundary.react","ErrorUtils","FBLogger","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();c=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g<e;g++)f[g]=arguments[g];return(c=d=a.call.apply(a,[this].concat(f))||this,d.$1=function(a,c){b("FBLogger")("boosted_component").catching(a).mustfix("Render error in module: module: %s",c!=null?c:"unknown");a=b("ErrorUtils").normalizeError(a);a=new(b("BoostedComponentClientExceptionsTypedLogger"))().setEvent("render_error").setExceptionMessage(a.message).setExceptionTrace(a.stack).setModuleName(c).setEntryPoint(d.props.placement).setPageID(d.props.pageID).setBoostID(d.props.boostID).setTargetID(d.props.targetID).setFlowID(d.props.flowID).setSectionName(d.props.sectionName).setProduct(d.props.product);a.log()},c)||babelHelpers.assertThisInitialized(d)}var d=c.prototype;d.render=function(){var a=void 0;return b("React").createElement(b("ErrorBoundary.react"),{fallbackComponent:a,onHandleError:this.$1},this.props.children)};return c}(b("React").PureComponent);c.defaultProps={appID:null,placement:null,pageID:null,product:null,sectionName:null,boostID:null,targetID:null,flowID:null};function a(){return b("React").createElement("div",null,"Render Error. Check Console")}e.exports=c}),null);
__d("FBSimplePaneDialogUtils",["Vector"],(function(a,b,c,d,e,f){"use strict";var g=250;function a(a,c,d){d=d||g;d=Math.max(b("Vector").getViewportDimensions().y-d,a);return Math.min(d,c)}c={getDialogColumnMaxHeight:a};e.exports=c}),null);
__d("FBSimpleTwoPaneDialog.react",["cx","invariant","FBSimplePaneDialogUtils","LeftRight.react","React","ScrollableArea.react","joinClasses"],(function(a,b,c,d,e,f,g,h){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}var d=c.prototype;d.render=function(){var a=this.props.children;a&&b("React").Children.count(a)===2||h(0,1076);var c={},d="inherit",e="_4jyr";this.props.inheritHeight||(d=this.props.heightOverride||b("FBSimplePaneDialogUtils").getDialogColumnMaxHeight(this.props.minHeight,this.props.maxHeight,this.props.dialogMargin),c={maxHeight:d},e="_2vt0");return b("React").createElement("div",babelHelpers["extends"]({},this.props,{className:b("joinClasses")(this.props.className,e),style:c}),b("React").createElement(b("LeftRight.react"),{alignv:"top",className:"_2vt1"},b("React").createElement(b("ScrollableArea.react"),{className:"_2vt2",fade:this.props.fade,height:d,style:{width:this.props.leftPaneWidth+"px"},width:this.props.leftPaneWidth},a[0]),b("React").createElement(b("ScrollableArea.react"),{className:"_2vt3",height:d,style:{width:this.props.rightPaneWidth+"px"},width:this.props.rightPaneWidth,ref:"rightPane"},a[1])))};return c}(b("React").Component);e.exports=a}),null);
__d("BoostedActionStatsCategory",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({DAILY_BUDGET:"daily_budget",LIFETIME_BUDGET:"lifetime_budget",DURATION:"duration",LEAD:"lead",LIKE:"like",LINK_CLICK:"link_click",PAGE_VIEW:"page_view",REACH:"reach",RSVP:"rsvp",SPENT:"spent",STATUS:"ad_status",VIDEO_VIEW:"video_view",ENGAGEMENT:"engagement",PURCHASE:"purchase",LOCAL_ENGAGEMENT:"local_engagement",OFFSITE_CONVERSION:"offsite_conversion",OFFSITE_CONVERSION_FB_PIXEL_ADD_TO_CART:"offsite_conversion.fb_pixel_add_to_cart",OFFSITE_CONVERSION_FB_PIXEL_VIEW_CONTENT:"offsite_conversion.fb_pixel_view_content",OFFSITE_CONVERSION_FB_PIXEL_PURCHASE:"offsite_conversion.fb_pixel_purchase",ONSITE_CONVERSION_FLOW_COMPLETE:"onsite_conversion_flow_complete",ONSITE_CONVERSION_PURCHASE:"onsite_conversion_purchase",LOCAL_IMPRESSIONS:"local_impressions",UNIQUE_CLICK:"unique_click",CTA_GET_DIRECTIONS_CLICK:"cta_get_directions_click",CTA_CALL_NOW_CLICK:"cta_call_now_click",CTA_MESSAGE_PAGE_CLICK:"cta_message_page_click",CTA_MESSAGING_REPLY:"cta_messaging_reply",CTA_LEARN_MORE_CLICK:"cta_learn_more_click",CTA_SAVE_CLICK:"cta_save_click",CTA_MESSAGING_REPLY_THREADS:"cta_messaging_reply_threads",MULTIPLE_CTA_CLICK:"multiple_cta_click",INSTALLS:"installs",NO_OBJECTIVE:"no_objective",LEADGEN_OTHER:"actions:leadgen.other",POST_ENGAGEMENT:"actions:post_engagement",MOBILE_APP_INSTALL:"actions:mobile_app_install",APP_INSTALL:"actions:app_install",ONSITE_CONVERSION_MESSAGING_REPLY:"actions:onsite_conversion.messaging_reply",VIDEO_3_SEC_VIEWS:"actions:video_view",ACTIONS_RSVP:"actions:rsvp",ACTIONS_LINK_CLICK:"actions:link_click",ACTIONS_LIKES:"actions:like",ACTIONS_PIXEL_PURCHASE:"actions:offsite_conversion.fb_pixel_purchase",ACTIONS_ONSITE_PURCHASES:"actions:onsite_conversion.purchase",ACTIONS_ADD_TO_CART:"actions:offsite_conversion.fb_pixel_add_to_cart",ACTIONS_MESSAGING_CONVERSATION:"actions:onsite_conversion.messaging_conversation_started_7d",ACTIONS_LANDING_PAGE:"actions:landing_page_view",ACTIONS_ONSITE_CONVERSION_FLOW_COMPLETE:"actions:onsite_conversion.flow_complete",ONSITE_CONVERSION_SERVICE_BOOKING_REQUEST:"actions:onsite_conversion.service_booking_request",VIDEO_2_SEC_WATCHED_ACTIONS:"video_continuous_2_sec_watched_actions:video_view",VIDEO_10_SEC_WATCHED_ACTIONS:"video_10_sec_watched_actions",VIDEO_10_SEC_WATCHED_ACTIONS_VIDEO_VIEW:"video_10_sec_watched_actions:video_view",VIDEO_THRUPLAY_WATCHED_ACTIONS:"video_thruplay_watched_actions:video_view",ESTIMATED_AD_RECALLERS:"estimated_ad_recallers",ACTIONS_RECEIVE_OFFER:"actions:receive_offer",ACTIONS_OFFSITE_CONVERSIONS_PIXEL_LEAD:"actions:offsite_conversion.fb_pixel_lead",ACTIONS_OFFSITE_CONVERSIONS_PIXEL_VIEW_CONTENT:"actions:offsite_conversion.fb_pixel_view_content",ACTIONS_OFFSITE_CONVERSIONS_INITIATE_CHECKOUT:"actions:offsite_conversion.fb_pixel_initiate_checkout",UNKNOWN:"unknown"})}),null);