Файловый менеджер - Редактировать - /home/harasnat/www/labour/wp-content/plugins/google-listings-and-ads/js/build/index.js
Назад
(()=>{"use strict";var e,t,n={6023:(e,t,n)=>{n.d(t,{E1:()=>_,om:()=>E,tY:()=>d});var a=n(1609),s=n(7723),i=n(6427),r=n(6087),o=n(3905);const c=Symbol("sharedMax"),d=[{maxCharacterCount:15,capitalizedName:(0,s._x)("The first display URL path","Capitalized asset field name as the start of an error message","google-listings-and-ads")},{maxCharacterCount:15,capitalizedName:(0,s._x)("The second display URL path","Capitalized asset field name as the start of an error message","google-listings-and-ads")}],l=[{key:o.Ms.MARKETING_IMAGE,min:1,imageConfig:{minWidth:600,minHeight:314,suggestedWidth:1200,suggestedHeight:628},heading:(0,s._x)("Landscape images","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("We recommend adding at least 4 landscape images. A single image is required.","google-listings-and-ads"),helpSubheading:(0,s._x)("Landscape image (1.91:1)","Asset field name with its aspect ratio as the subheading within a help tip","google-listings-and-ads"),lowercaseName:(0,s._x)("landscape","Lowercase asset field name","google-listings-and-ads")},{key:o.Ms.SQUARE_MARKETING_IMAGE,min:1,imageConfig:{minWidth:300,minHeight:300,suggestedWidth:1200,suggestedHeight:1200},heading:(0,s._x)("Square images","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("We recommend adding at least 4 square images. A single image is required.","google-listings-and-ads"),helpSubheading:(0,s._x)("Square image (1:1)","Asset field name with its aspect ratio as the subheading within a help tip","google-listings-and-ads"),lowercaseName:(0,s._x)("square","Lowercase asset field name","google-listings-and-ads")},{key:o.Ms.PORTRAIT_MARKETING_IMAGE,min:0,imageConfig:{minWidth:480,minHeight:600,suggestedWidth:960,suggestedHeight:1200},heading:(0,s._x)("Portrait images","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("Improve campaign performance with at least 2 portrait images.","google-listings-and-ads"),helpSubheading:(0,s._x)("Portrait image (4:5)","Asset field name with its aspect ratio as the subheading within a help tip","google-listings-and-ads"),lowercaseName:(0,s._x)("portrait","Lowercase asset field name","google-listings-and-ads")}],g=[{key:o.Ms.LOGO,min:1,imageConfig:{minWidth:128,minHeight:128,suggestedWidth:1200,suggestedHeight:1200},heading:(0,s._x)("Logo","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("At least 1 version of your logo is required.","google-listings-and-ads"),helpSubheading:(0,s._x)("Logo (1:1)","Asset field name with its aspect ratio as the subheading within a help tip","google-listings-and-ads"),lowercaseName:(0,s._x)("logo","Lowercase asset field name","google-listings-and-ads")}];l[c]=20,g[c]=5;const u=[l,g],E=u.flat(),_=[{key:o.Ms.BUSINESS_NAME,min:1,max:1,maxCharacterCounts:25,heading:(0,s._x)("Business name","Plural asset field name as the heading","google-listings-and-ads"),capitalizedName:(0,s._x)("Business name","Capitalized asset field name as the placeholder or the start of an error message","google-listings-and-ads"),lowercaseSingularName:(0,s._x)("business name","Singular and lowercase asset field name","google-listings-and-ads"),help:(0,s.__)("The business name is the name of your business or brand. In certain layouts, it may appear in the text of your ad.","google-listings-and-ads")},{key:o.Ms.HEADLINE,min:3,max:5,maxCharacterCounts:[15,30,30,30,30],heading:(0,s._x)("Headlines","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("For the best results, add at least 5 headlines. A minimum of 3 are required.","google-listings-and-ads"),extraSubheading:(0,a.createElement)(i.ExternalLink,{href:"https://support.google.com/google-ads/answer/6167101"},(0,s.__)("Learn how to write effective ads","google-listings-and-ads")),addButtonText:(0,s.__)("Add headline","google-listings-and-ads"),capitalizedName:(0,s._x)("Headline","Capitalized asset field name as the placeholder or the start of an error message","google-listings-and-ads"),lowercaseSingularName:(0,s._x)("headline","Singular and lowercase asset field name","google-listings-and-ads"),lowercasePluralName:(0,s._x)("headlines","Plural and lowercase asset field name","google-listings-and-ads"),help:(0,s.__)("The headline is the first line of your ad and is most likely the first thing people notice, so consider including words that people may have entered in their Google search.","google-listings-and-ads")},{key:o.Ms.LONG_HEADLINE,min:1,max:5,maxCharacterCounts:90,heading:(0,s._x)("Long headlines","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("We recommend using 5 long headlines. A single long headline is required.","google-listings-and-ads"),addButtonText:(0,s.__)("Add long headline","google-listings-and-ads"),capitalizedName:(0,s._x)("Long headline","Capitalized asset field name as the placeholder or the start of an error message","google-listings-and-ads"),lowercaseSingularName:(0,s._x)("long headline","Singular and lowercase asset field name","google-listings-and-ads"),lowercasePluralName:(0,s._x)("long headlines","Plural and lowercase asset field name","google-listings-and-ads"),help:(0,a.createElement)(r.Fragment,null,(0,a.createElement)("div",null,(0,s.__)("The long headline is the first line of your ad, and appears instead of your short headline in larger ads. Long headlines can be up to 90 characters, and may appear with or without your description.","google-listings-and-ads")),(0,a.createElement)("div",null,(0,s.__)("The length of the rendered headline will depend on the site it appears on. If shortened, it will end with an ellipsis(…).","google-listings-and-ads")))},{key:o.Ms.DESCRIPTION,min:2,max:5,maxCharacterCounts:[60,90,90,90,90],heading:(0,s._x)("Descriptions","Plural asset field name as the heading","google-listings-and-ads"),subheading:(0,s.__)("We recommend adding at least 5 different descriptions. At least 2 are required.","google-listings-and-ads"),addButtonText:(0,s.__)("Add description","google-listings-and-ads"),capitalizedName:(0,s._x)("Description","Capitalized asset field name as the placeholder or the start of an error message","google-listings-and-ads"),lowercaseSingularName:(0,s._x)("description","Singular and lowercase asset field name","google-listings-and-ads"),lowercasePluralName:(0,s._x)("descriptions","Plural and lowercase asset field name","google-listings-and-ads"),help:(0,a.createElement)(r.Fragment,null,(0,a.createElement)("div",null,(0,s.__)("The description adds to the headline and provides additional context or details. It can be up to 90 characters, and may appear after the headline.","google-listings-and-ads")),(0,a.createElement)("div",null,(0,s.__)("The length of the rendered description will depend on the site it appears on. If it's shortened, it will end with an ellipsis(…). The description doesn't show in all sizes and formats.","google-listings-and-ads")))}];{function p(e){const t=(0,s._x)(", ","The separator for concatenating the types of assets","google-listings-and-ads");return(0,s.sprintf)( // translators: 1: Concatenated text for the types of assets except for the last one. 2: The last type of assets. // translators: 1: Concatenated text for the types of assets except for the last one. 2: The last type of assets. (0,s.__)("%1$s and %2$s","google-listings-and-ads"),e.slice(0,-1).join(t),e.at(-1))}function h(e,t){const{helpSubheading:n,imageConfig:i}=e,o=(0,a.createElement)("ul",null,(0,r.createInterpolateElement)((0,s.sprintf)( // translators: 1: Recommended width. 2: Recommended height. 3: Minimal width. 4: Minimal height. // translators: 1: Recommended width. 2: Recommended height. 3: Minimal width. 4: Minimal height. (0,s.__)("<listItem>Recommended size: %1$d x %2$d</listItem><listItem>Min. size: %3$d x %4$d</listItem>","google-listings-and-ads"),i.suggestedWidth,i.suggestedHeight,i.minWidth,i.minHeight),{listItem:(0,a.createElement)("li",null)}));return(0,a.createElement)(r.Fragment,{key:e.key},(0,a.createElement)("div",null,(0,a.createElement)("strong",null,n),t&&o),!t&&o)}function m(e){const t=e.map((e=>e.lowercaseName)),n=(0,s.sprintf)( // translators: 1: The maximum number of this image assets. 2: Text for the types of image assets. // translators: 1: The maximum number of this image assets. 2: Text for the types of image assets. (0,s.__)("You can add up to a maximum of %1$d image assets, which can be a combination of %2$s images.","google-listings-and-ads"),e[c],p(t));return(0,a.createElement)("div",null,n)}function C(e,t){const n=e.map((e=>h(e,t)));return(0,a.createElement)(r.Fragment,null,t&&m(e),(0,a.createElement)("div",null,(0,s.__)("Add images that meet or can be cropped to the recommended sizes. Note: The maximum file size for any image is 5120 KB.","google-listings-and-ads")),n)}function S(e,t,n){return t.reduce(((e,t)=>t.key===this.key?e:e-Math.max(t.min,n[t.key].length)),e)}function A(e,t,n){if(t.reduce(((e,t)=>e+n[t.key].length),0)===e)return(0,s.sprintf)( // translators: The shared maximum number of the grouped types of image assets. // translators: The shared maximum number of the grouped types of image assets. (0,s.__)("The maximum number of images that can be uploaded is %d.","google-listings-and-ads"),e);const a=t.filter((e=>e.min>0)).map((e=>(0,s.sprintf)( // translators: 1: The minimum number of this asset field. 2: Asset field name. // translators: 1: The minimum number of this asset field. 2: Asset field name. (0,s.__)("%1$d %2$s","google-listings-and-ads"),e.min,e.lowercaseName)));return(0,s.sprintf)( // translators: 1: The shared maximum number of the grouped types of image assets. 2: Text for the minimum number and type of each image asset. // translators: 1: The shared maximum number of the grouped types of image assets. 2: Text for the minimum number and type of each image asset. (0,s.__)("Maximum %1$d images can be uploaded, with a minimum of %2$s image.","google-listings-and-ads"),e,p(a))}u.forEach((e=>{const t=e.length>1,n=e[c],a=C(e,t);e.forEach((s=>{!t&&Number.isInteger(n)&&(s.max=n),s.help=a,s.getMax=S.bind(s,n,e),s.getMaxNumberTip=t?A.bind(null,n,e):()=>null}))})),_.forEach((e=>{e.requiredSingleValue=1===e.min&&1===e.max}))}},3905:(e,t,n)=>{n.d(t,{$g:()=>N,Ab:()=>U,CX:()=>R,DA:()=>i,K4:()=>g,Ms:()=>G,Mx:()=>r,Q:()=>s,Th:()=>a,Tj:()=>C,WR:()=>T,Wn:()=>I,X4:()=>A,Z3:()=>h,Z7:()=>D,ZD:()=>O,aL:()=>y,ac:()=>w,ds:()=>m,iH:()=>E,k1:()=>o,km:()=>p,ll:()=>P,m9:()=>b,mQ:()=>M,r6:()=>c,rS:()=>u,s_:()=>d,tt:()=>l,vL:()=>f,zU:()=>S});const a=window.glaData,s=(window.glaProductData,0),i="report-source",r="paid",o="free",c=r,d="programs",l=86400,g={SUBMISSION_SUCCESS:"submission-success",CAMPAIGN_CREATION_SUCCESS:"campaign-creation-success"},u={CAN_ONBOARDING_SETUP_CES_PROMPT_OPEN:"gla-can-onboarding-setup-ces-prompt-open"},E={WPCOM_DISCONNECTED:"JETPACK_DISCONNECTED",GOOGLE_DISCONNECTED:"GOOGLE_DISCONNECTED"},_=[["CAMPAIGN","campaign"],["ASSET_GROUP","asset-group"]],p=Object.fromEntries(_),h=_.reduce(((e,t,n)=>{const a=(n+1).toString();return e[t[1]]=a,e}),{}),m="product",C="account",S="request-review",A=5,I={CONNECTED:"connected",DISCONNECTED:"disconnected",INCOMPLETE:"incomplete"},T={CONNECTED:"connected",DISCONNECTED:"disconnected",INCOMPLETE:"incomplete"},R={UNKNOWN:"unknown",PENDING:"pending",APPROVED:"approved",CANCELLED:"cancelled"},y={ALL:"ALL",EXCEPT:"EXCEPT",ONLY:"ONLY"},f=5,N="performance_max",O={BUSINESS_NAME:"business_name",MARKETING_IMAGE:"marketing_image",SQUARE_MARKETING_IMAGE:"square_marketing_image",PORTRAIT_MARKETING_IMAGE:"portrait_marketing_image",LOGO:"logo",HEADLINE:"headline",LONG_HEADLINE:"long_headline",DESCRIPTION:"description",CALL_TO_ACTION_SELECTION:"call_to_action_selection",YOUTUBE_VIDEO:"youtube_video"},P={FINAL_URL:"final_url",DISPLAY_URL_PATH:"display_url_path"},G={...O,...P},w={APPROVED:"approved",DISAPPROVED:"disapproved",ERROR:"error",DISABLED:"disabled"},M="app_ratings_banner",b={LOWER:"#42b1af",SIMILAR:"#6d89d3",HIGHER:"#caa76f",UNKNOWN:"#e0e0e0"},D="woocommerce/google-listings-and-ads",U="IMPROVE_PERFORMANCE_MAX_AD_STRENGTH"},6520:(e,t,n)=>{n.d(t,{RV:()=>i,Ui:()=>s,W1:()=>o,fP:()=>c,mY:()=>r});var a=n(3905);const s="wc/gla",i="/wc/gla",r="core/notices",o={DELETE:"DELETE",POST:"POST"},c={assets:{},[a.ll.FINAL_URL]:"",[a.ll.DISPLAY_URL_PATH]:[]}},2434:(e,t,n)=>{n.d(t,{U:()=>g.Ui,j:()=>mn});var a={};n.r(a),n.d(a,{createAdsCampaign:()=>te,createCampaignAssetGroup:()=>re,createMappingRule:()=>Ae,deleteAdsCampaign:()=>ie,deleteMappingRule:()=>Te,deleteShippingRates:()=>P,deleteShippingTimes:()=>M,disconnectAllAccounts:()=>j,disconnectGoogleAccount:()=>B,disconnectGoogleAdsAccount:()=>H,fetchAdsIncentiveCredits:()=>ee,fetchExistingGoogleAdsAccounts:()=>K,fetchExistingGoogleMCAccounts:()=>k,fetchGoogleAccount:()=>v,fetchGoogleAdsAccount:()=>$,fetchGoogleAdsAccountBillingStatus:()=>W,fetchGoogleAdsAccountStatus:()=>Oe,fetchGoogleMCAccount:()=>F,fetchJetpackAccount:()=>V,fetchMCSetup:()=>le,fetchSettings:()=>b,fetchShippingRates:()=>N,fetchShippingTimes:()=>G,fetchTargetAudience:()=>Y,fetchWPComAppAuthorizationUrl:()=>L,hydratePrefetchedData:()=>f,receiveAdsAccount:()=>J,receiveAdsRecommendations:()=>Ge,receiveEnhancedConversionsStatus:()=>ae,receiveGoogleAccountAccess:()=>x,receiveGoogleAdsAccountBillingStatus:()=>q,receiveGoogleMCContactInformation:()=>z,receiveGtinMigrationStatus:()=>Ne,receiveMCAccount:()=>X,receiveMCIssues:()=>Ee,receiveMCProductFeed:()=>_e,receiveMCProductStatistics:()=>ge,receiveMCReviewRequest:()=>ue,receiveMCSetup:()=>de,receiveMappingAttributes:()=>me,receiveMappingRules:()=>Se,receiveMappingSources:()=>Ce,receivePriceBenchmarkSuggestionsProductPrice:()=>Pe,receiveReport:()=>ce,receiveStoreCategories:()=>Re,receiveTour:()=>ye,saveSettings:()=>D,saveTargetAudience:()=>Z,sendMCReviewRequest:()=>he,syncSettings:()=>U,updateAdsCampaign:()=>ne,updateCampaignAssetGroup:()=>oe,updateEnhancedConversionsStatus:()=>se,updateGoogleMCContactInformation:()=>Q,updateMCProductVisibility:()=>pe,updateMappingRule:()=>Ie,upsertShippingRates:()=>O,upsertShippingTimes:()=>w,upsertTour:()=>fe});var s={};n.r(s),n.d(s,{getAdsBudgetMetrics:()=>ht,getAdsBudgetRecommendations:()=>pt,getAdsCampaigns:()=>Je,getAdsRecommendations:()=>It,getCampaignAssetGroups:()=>et,getDashboardPerformance:()=>ct,getEnableEnhancedConversions:()=>Ze,getExistingGoogleAdsAccounts:()=>ze,getExistingGoogleMCAccounts:()=>qe,getGeneral:()=>Le,getGoogleAccount:()=>Be,getGoogleAccountAccess:()=>He,getGoogleAdsAccount:()=>We,getGoogleAdsAccountBillingStatus:()=>Ke,getGoogleAdsAccountStatus:()=>_t,getGoogleMCAccount:()=>je,getGoogleMCContactInformation:()=>Qe,getGtinMigrationStatus:()=>mt,getJetpackAccount:()=>$e,getMCCountriesAndContinents:()=>Ye,getMCIssues:()=>st,getMCProductFeed:()=>it,getMCProductStatistics:()=>nt,getMCReviewRequest:()=>at,getMCSetup:()=>tt,getMappingAttributes:()=>dt,getMappingRules:()=>gt,getMappingSources:()=>lt,getPriceBenchmarkSuggestion:()=>At,getPriceBenchmarkSuggestions:()=>St,getPriceBenchmarkSummary:()=>Ct,getReport:()=>ot,getReportByApiQuery:()=>rt,getSettings:()=>ke,getShippingRates:()=>xe,getShippingTimes:()=>Fe,getStoreCategories:()=>ut,getTargetAudience:()=>Xe,getTour:()=>Et});var i={};n.r(i),n.d(i,{getAdsBudgetMetrics:()=>sn,getAdsBudgetRecommendations:()=>an,getAdsCampaigns:()=>Bt,getAdsRecommendations:()=>ln,getCampaignAssetGroups:()=>Ht,getEnableEnhancedConversions:()=>on,getExistingGoogleAdsAccounts:()=>xt,getExistingGoogleMCAccounts:()=>Vt,getGoogleAccount:()=>bt,getGoogleAccountAccess:()=>Dt,getGoogleAdsAccount:()=>vt,getGoogleAdsAccountBillingStatus:()=>Lt,getGoogleAdsAccountStatus:()=>nn,getGoogleMCAccount:()=>Ut,getGoogleMCContactInformation:()=>Ft,getGtinMigrationStatus:()=>rn,getJetpackAccount:()=>Mt,getMCCountriesAndContinents:()=>kt,getMCIssues:()=>Kt,getMCProductFeed:()=>zt,getMCProductStatistics:()=>qt,getMCReviewRequest:()=>Wt,getMCSetup:()=>jt,getMappingAttributes:()=>Xt,getMappingRules:()=>Zt,getMappingSources:()=>Jt,getPriceBenchmarkSuggestions:()=>dn,getPriceBenchmarkSummary:()=>cn,getReportByApiQuery:()=>Yt,getSettings:()=>wt,getShippingRates:()=>Pt,getShippingTimes:()=>Gt,getStoreCategories:()=>en,getTargetAudience:()=>$t,getTour:()=>tn});var r=n(7143),o=n(1455),c=n.n(o),d=n(6476),l=n(3905),g=n(6520);const u=window.wp.dataControls;var E=n(3832),_=n(7723);const p={RECEIVE_SHIPPING_RATES:"RECEIVE_SHIPPING_RATES",UPSERT_SHIPPING_RATES:"UPSERT_SHIPPING_RATES",DELETE_SHIPPING_RATES:"DELETE_SHIPPING_RATES",RECEIVE_SHIPPING_TIMES:"RECEIVE_SHIPPING_TIMES",UPSERT_SHIPPING_TIMES:"UPSERT_SHIPPING_TIMES",DELETE_SHIPPING_TIMES:"DELETE_SHIPPING_TIMES",RECEIVE_SETTINGS:"RECEIVE_SETTINGS",SAVE_SETTINGS:"SAVE_SETTINGS",RECEIVE_ACCOUNTS_JETPACK:"RECEIVE_ACCOUNTS_JETPACK",RECEIVE_ACCOUNTS_GOOGLE:"RECEIVE_ACCOUNTS_GOOGLE",RECEIVE_ACCOUNTS_GOOGLE_ACCESS:"RECEIVE_ACCOUNTS_GOOGLE_ACCESS",RECEIVE_ACCOUNTS_GOOGLE_MC:"RECEIVE_ACCOUNTS_GOOGLE_MC",RECEIVE_ACCOUNTS_GOOGLE_MC_EXISTING:"RECEIVE_ACCOUNTS_GOOGLE_MC_EXISTING",RECEIVE_ACCOUNTS_GOOGLE_ADS:"RECEIVE_ACCOUNTS_GOOGLE_ADS",DISCONNECT_ACCOUNTS_GOOGLE:"DISCONNECT_ACCOUNTS_GOOGLE",DISCONNECT_ACCOUNTS_GOOGLE_ADS:"DISCONNECT_ACCOUNTS_GOOGLE_ADS",DISCONNECT_ACCOUNTS_ALL:"DISCONNECT_ACCOUNTS_ALL",RECEIVE_ACCOUNTS_GOOGLE_ADS_BILLING_STATUS:"RECEIVE_ACCOUNTS_GOOGLE_ADS_BILLING_STATUS",RECEIVE_ACCOUNTS_GOOGLE_ADS_EXISTING:"RECEIVE_ACCOUNTS_GOOGLE_ADS_EXISTING",RECEIVE_MC_CONTACT_INFORMATION:"RECEIVE_MC_CONTACT_INFORMATION",RECEIVE_MC_COUNTRIES_AND_CONTINENTS:"RECEIVE_MC_COUNTRIES_AND_CONTINENTS",RECEIVE_TARGET_AUDIENCE:"RECEIVE_TARGET_AUDIENCE",SAVE_TARGET_AUDIENCE:"SAVE_TARGET_AUDIENCE",RECEIVE_ADS_CAMPAIGNS:"RECEIVE_ADS_CAMPAIGNS",CREATE_ADS_CAMPAIGN:"CREATE_ADS_CAMPAIGN",UPDATE_ADS_CAMPAIGN:"UPDATE_ADS_CAMPAIGN",DELETE_ADS_CAMPAIGN:"DELETE_ADS_CAMPAIGN",RECEIVE_ADS_ENHANCED_CONVERSIONS:"RECEIVE_ADS_ENHANCED_CONVERSIONS",RECEIVE_CAMPAIGN_ASSET_GROUPS:"RECEIVE_CAMPAIGN_ASSET_GROUPS",CREATE_CAMPAIGN_ASSET_GROUP:"CREATE_CAMPAIGN_ASSET_GROUP",UPDATE_CAMPAIGN_ASSET_GROUP:"UPDATE_CAMPAIGN_ASSET_GROUP",RECEIVE_MC_SETUP:"RECEIVE_MC_SETUP",RECEIVE_REPORT:"RECEIVE_REPORT",RECEIVE_MC_PRODUCT_STATISTICS:"RECEIVE_MC_PRODUCT_STATISTICS",RECEIVE_MC_REVIEW_REQUEST:"RECEIVE_MC_REVIEW_REQUEST",RECEIVE_MC_ISSUES:"RECEIVE_MC_ISSUES",RECEIVE_MC_PRODUCT_FEED:"RECEIVE_MC_PRODUCT_FEED",UPDATE_MC_PRODUCTS_VISIBILITY:"UPDATE_MC_PRODUCTS_VISIBILITY",RECEIVE_MAPPING_ATTRIBUTES:"RECEIVE_MAPPING_ATTRIBUTES",RECEIVE_MAPPING_SOURCES:"RECEIVE_MAPPING_SOURCES",RECEIVE_MAPPING_RULES:"RECEIVE_MAPPING_RULES",UPSERT_MAPPING_RULE:"UPSERT_MAPPING_RULE",DELETE_MAPPING_RULE:"DELETE_MAPPING_RULE",RECEIVE_STORE_CATEGORIES:"RECEIVE_STORE_CATEGORIES",RECEIVE_TOUR:"RECEIVE_TOUR",UPSERT_TOUR:"UPSERT_TOUR",HYDRATE_PREFETCHED_DATA:"HYDRATE_PREFETCHED_DATA",RECEIVE_GOOGLE_ADS_ACCOUNT_STATUS:"RECEIVE_GOOGLE_ADS_ACCOUNT_STATUS",RECEIVE_ADS_BUDGET_RECOMMENDATIONS:"RECEIVE_ADS_BUDGET_RECOMMENDATIONS",RECEIVE_ADS_BUDGET_METRICS:"RECEIVE_ADS_BUDGET_METRICS",RECEIVE_GTIN_MIGRATION_STATUS:"RECEIVE_GTIN_MIGRATION_STATUS",RECEIVE_PRICE_BENCHMARK_SUMMARY:"RECEIVE_PRICE_BENCHMARK_SUMMARY",RECEIVE_PRICE_BENCHMARK_SUGGESTIONS:"RECEIVE_PRICE_BENCHMARK_SUGGESTIONS",RECEIVE_PRICE_BENCHMARK_SUGGESTIONS_PRODUCT_PRICE:"RECEIVE_PRICE_BENCHMARK_SUGGESTIONS_PRODUCT_PRICE",RECEIVE_ADS_RECOMMENDATIONS:"RECEIVE_ADS_RECOMMENDATIONS"};var h=n(6876),m=n(6023),C=n(399),S=n(7692);function A(e){const{budget:t,...n}=e;return n.dailyBudget=t,(0,S.xG)(n)}function I(e){const t=e.targeted_locations.length>0,n=t?e.targeted_locations:[e.country];return{...e,allowMultiple:t,displayCountries:n}}function T(e){const t=new Map;m.E1.forEach((e=>{const{maxCharacterCounts:n}=e;if(Array.isArray(n)){const[a,s]=n;a<s&&t.set(e.key,a)}}));const n=(0,C.A)("google-ads"),a={...e.assets};return t.forEach(((e,t)=>{const s=a[t];if(s&&!(s.length<2)&&n(s[0].content)>e){const i=s.findIndex((({content:t})=>n(t)<=e));i>0&&(s.unshift(...s.splice(i,1)),a[t]=s)}})),{...e,assets:a}}const R=()=>window.navigator.userAgent.toLowerCase().includes("wc-ios"),y=()=>window.navigator.userAgent.toLowerCase().includes("wc-android");function f(e){return{type:p.HYDRATE_PREFETCHED_DATA,data:e}}function*N(){try{const e=(yield(0,u.apiFetch)({path:`${g.RV}/mc/shipping/rates`})).map((e=>({...e,rate:Number(e.rate)})));return{type:p.RECEIVE_SHIPPING_RATES,shippingRates:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading shipping rates.","google-listings-and-ads"))}}function*O(e){const t=(yield(0,u.apiFetch)({path:`${g.RV}/mc/shipping/rates/batch`,method:"POST",data:{rates:e}})).success.map((e=>({...e.rate,rate:Number(e.rate.rate)})));return{type:p.UPSERT_SHIPPING_RATES,shippingRates:t}}function*P(e){return yield(0,u.apiFetch)({path:`${g.RV}/mc/shipping/rates/batch`,method:"DELETE",data:{ids:e}}),{type:p.DELETE_SHIPPING_RATES,ids:e}}function*G(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/shipping/times`}),t=Object.values(e).map((e=>({countryCode:e.country_code,time:Number(e.time),maxTime:Number(e.max_time)})));return{type:p.RECEIVE_SHIPPING_TIMES,shippingTimes:t}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading shipping times.","google-listings-and-ads"))}}function*w(e){const{countries:t,time:n,maxTime:a}=e;return yield(0,u.apiFetch)({path:`${g.RV}/mc/shipping/times/batch`,method:"POST",data:{country_codes:t,time:n,max_time:a}}),{type:p.UPSERT_SHIPPING_TIMES,shippingTime:e}}function*M(e){return yield(0,u.apiFetch)({path:`${g.RV}/mc/shipping/times/batch`,method:"DELETE",data:{country_codes:e}}),{type:p.DELETE_SHIPPING_TIMES,countryCodes:e}}function*b(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/settings`});return{type:p.RECEIVE_SETTINGS,settings:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading merchant center settings.","google-listings-and-ads"))}}function*D(e){return yield(0,u.apiFetch)({path:`${g.RV}/mc/settings`,method:"POST",data:e}),{type:p.SAVE_SETTINGS,settings:e}}function*U(){yield(0,u.apiFetch)({path:`${g.RV}/mc/settings/sync`,method:"POST"})}function*V(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/jetpack/connected`});return{type:p.RECEIVE_ACCOUNTS_JETPACK,account:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading Jetpack account info.","google-listings-and-ads"))}}function*v(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/google/connected`});return{type:p.RECEIVE_ACCOUNTS_GOOGLE,account:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading Google account info.","google-listings-and-ads"))}}function*L(e){const t={next_page_name:e},n=(0,E.addQueryArgs)(`${g.RV}/rest-api/authorize`,t);return(yield(0,u.apiFetch)({path:n})).auth_url}function x(e){return{type:p.RECEIVE_ACCOUNTS_GOOGLE_ACCESS,data:e}}function*F(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/connection`}),t=e.id||null;return yield f({mcId:t}),{type:p.RECEIVE_ACCOUNTS_GOOGLE_MC,account:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading Google Merchant Center account info.","google-listings-and-ads"))}}function*k(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/accounts`});return{type:p.RECEIVE_ACCOUNTS_GOOGLE_MC_EXISTING,accounts:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting your Google Merchant Center accounts.","google-listings-and-ads"))}}function*$(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/ads/connection`}),t=e.id||null;return yield f({adsId:t}),{type:p.RECEIVE_ACCOUNTS_GOOGLE_ADS,account:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading Google Ads account info.","google-listings-and-ads"))}}function*B(){try{return yield(0,u.apiFetch)({path:`${g.RV}/google/connect`,method:"DELETE"}),{type:p.DISCONNECT_ACCOUNTS_GOOGLE}}catch(e){throw(0,h.h)(e,(0,_.__)("Unable to disconnect your Google account.","google-listings-and-ads")),e}}function*H(e=!1){try{return yield(0,u.apiFetch)({path:`${g.RV}/ads/connection`,method:"DELETE"}),{type:p.DISCONNECT_ACCOUNTS_GOOGLE_ADS,invalidateRelatedState:e}}catch(e){throw(0,h.h)(e,(0,_.__)("Unable to disconnect your Google Ads account.","google-listings-and-ads")),e}}function*j(){try{return yield(0,u.apiFetch)({path:`${g.RV}/connections`,method:"DELETE"}),{type:p.DISCONNECT_ACCOUNTS_ALL}}catch(e){if(e.errors[`${g.RV}/rest-api/authorize`])return{type:p.DISCONNECT_ACCOUNTS_ALL};throw(0,h.h)(e,(0,_.__)("Unable to disconnect all your accounts.","google-listings-and-ads")),e}}function q(e){return{type:p.RECEIVE_ACCOUNTS_GOOGLE_ADS_BILLING_STATUS,billingStatus:e}}function*W(){try{return q(yield(0,u.apiFetch)({path:`${g.RV}/ads/billing-status`}))}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting the billing status of your Google Ads account.","google-listings-and-ads"))}}function*K(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/ads/accounts`});return{type:p.RECEIVE_ACCOUNTS_GOOGLE_ADS_EXISTING,accounts:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting your Google Ads accounts.","google-listings-and-ads"))}}function z(e){return{type:p.RECEIVE_MC_CONTACT_INFORMATION,data:e}}function*Q(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/contact-information`,method:"POST"});yield z(e)}catch(e){throw(0,h.h)(e,(0,_.__)("Unable to update your Google Merchant Center contact information.","google-listings-and-ads")),e}}function*Y(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/target_audience`});return{type:p.RECEIVE_TARGET_AUDIENCE,target_audience:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading target audience.","google-listings-and-ads"))}}function X(e){return{type:p.RECEIVE_ACCOUNTS_GOOGLE_MC,account:e}}function J(e){return{type:p.RECEIVE_ACCOUNTS_GOOGLE_ADS,account:e}}function*Z(e){return yield(0,u.apiFetch)({path:`${g.RV}/mc/target_audience`,method:"POST",data:e}),{type:p.SAVE_TARGET_AUDIENCE,target_audience:e}}function*ee(){const e=`${g.RV}/ads/incentive-credits`,t=yield(0,u.apiFetch)({path:e});return(0,S.xG)(t)}function*te(e,t){let n="wc-web";R()?n="wc-ios":y()&&(n="wc-android");try{const a=yield(0,u.apiFetch)({path:`${g.RV}/ads/campaigns`,method:"POST",data:{amount:e,targeted_locations:t,label:n}});return{type:p.CREATE_ADS_CAMPAIGN,createdCampaign:I(a)}}catch(e){throw(0,h.h)(e),e}}function*ne(e,t){try{return yield(0,u.apiFetch)({path:`${g.RV}/ads/campaigns/${e}`,method:"PATCH",data:t}),{type:p.UPDATE_ADS_CAMPAIGN,id:e,data:t}}catch(e){throw(0,h.h)(e),e}}function ae(e){return{type:p.RECEIVE_ADS_ENHANCED_CONVERSIONS,status:e}}function*se(e){try{return yield(0,u.apiFetch)({path:`${g.RV}/ads/settings`,method:"POST",data:{enhanced_conversions_enabled:e}}),ae(e)}catch(e){throw(0,h.h)(e,(0,_.__)("There was an error updating the enhanced conversions status.","google-listings-and-ads")),e}}function*ie(e){try{return yield(0,u.apiFetch)({path:`${g.RV}/ads/campaigns/${e}`,method:"DELETE"}),{type:p.DELETE_ADS_CAMPAIGN,id:e}}catch(e){throw(0,h.h)(e),e}}function*re(e){try{const t=yield(0,u.apiFetch)({path:`${g.RV}/ads/campaigns/asset-groups`,method:"POST",data:{campaign_id:e}});return{type:p.CREATE_CAMPAIGN_ASSET_GROUP,campaignId:e,assetGroup:{...g.fP,id:t.id}}}catch(e){const t=(0,_.__)("There was an error creating the assets of the campaign.","google-listings-and-ads");throw(0,h.h)(e,null,t),e}}function*oe(e,t){try{return yield(0,u.apiFetch)({path:`${g.RV}/ads/campaigns/asset-groups/${e}`,method:"PUT",data:t}),{type:p.UPDATE_CAMPAIGN_ASSET_GROUP,assetGroupId:e}}catch(e){const t=(0,_.__)("There was an error updating the assets of the campaign.","google-listings-and-ads");throw(0,h.h)(e,null,t),e}}function ce(e,t){return{type:p.RECEIVE_REPORT,reportKey:e,data:t}}function*de(e){return{type:p.RECEIVE_MC_SETUP,mcSetup:e}}function*le(){try{return de(yield(0,u.apiFetch)({path:`${g.RV}/mc/setup`}))}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading your merchant center setup status.","google-listings-and-ads"))}}function*ge(e){return{type:p.RECEIVE_MC_PRODUCT_STATISTICS,mcProductStatistics:e}}function*ue(e){return{type:p.RECEIVE_MC_REVIEW_REQUEST,mcReviewRequest:e}}function*Ee(e,t){return{type:p.RECEIVE_MC_ISSUES,query:e,data:t}}function*_e(e,t){return{type:p.RECEIVE_MC_PRODUCT_FEED,query:e,data:t}}function*pe(e,t){try{return yield(0,u.apiFetch)({path:`${g.RV}/mc/product-visibility`,method:"POST",data:{ids:e,visible:t}}),{type:p.UPDATE_MC_PRODUCTS_VISIBILITY}}catch(e){throw(0,h.h)(e,(0,_.__)("Unable to update the channel visibility of products.","google-listings-and-ads")),e}}function*he(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/review`,method:"POST"});return yield ue(e)}catch(e){throw(0,h.h)(e),e}}function*me(e){return{type:p.RECEIVE_MAPPING_ATTRIBUTES,attributes:e}}function*Ce(e,t){return{type:p.RECEIVE_MAPPING_SOURCES,sources:e,attributeKey:t}}function*Se(e,t){return{type:p.RECEIVE_MAPPING_RULES,rules:e,pagination:t}}function*Ae(e){try{const t=yield(0,u.apiFetch)({path:`${g.RV}/mc/mapping/rules`,method:"POST",data:e});return{type:p.UPSERT_MAPPING_RULE,rule:t}}catch(e){throw(0,h.h)(e,(0,_.__)("There was an error creating the rule.","google-listings-and-ads")),e}}function*Ie(e){try{const t=yield(0,u.apiFetch)({path:`${g.RV}/mc/mapping/rules/${e.id}`,method:g.W1.POST,data:e});return{type:p.UPSERT_MAPPING_RULE,rule:t}}catch(e){throw(0,h.h)(e,(0,_.__)("There was an error updating the rule.","google-listings-and-ads")),e}}function*Te(e){try{const t=yield(0,u.apiFetch)({path:`${g.RV}/mc/mapping/rules/${e.id}`,method:g.W1.DELETE,data:e});return{type:p.DELETE_MAPPING_RULE,rule:t}}catch(e){throw(0,h.h)(e,(0,_.__)("There was an error deleting the rule.","google-listings-and-ads")),e}}function*Re(e){return{type:p.RECEIVE_STORE_CATEGORIES,storeCategories:e}}function*ye(e){return{type:p.RECEIVE_TOUR,tour:e}}function*fe(e,t=!1){const n=[(0,u.apiFetch)({path:`${g.RV}/tours`,method:g.W1.POST,data:e})],a={type:p.UPSERT_TOUR,tour:e};!0===t?n.unshift(a):n.push(a);try{for(const e of n)yield e}catch(e){(0,h.h)(e,(0,_.__)("There was an error updating the tour.","google-listings-and-ads"))}}function*Ne(e){return{type:p.RECEIVE_GTIN_MIGRATION_STATUS,data:e}}function*Oe(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/ads/account-status`});return{type:p.RECEIVE_GOOGLE_ADS_ACCOUNT_STATUS,data:e}}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting the status of your Google Ads account.","google-listings-and-ads"))}}function*Pe(e,t){return{type:p.RECEIVE_PRICE_BENCHMARK_SUGGESTIONS_PRODUCT_PRICE,data:{productId:e,productPrice:t}}}function*Ge(e,t){return{type:p.RECEIVE_ADS_RECOMMENDATIONS,recommendations:e,recommendationType:t}}var we={};function Me(e){return[e]}function be(e,t,n){var a;if(e.length!==t.length)return!1;for(a=n;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function De(e,t){var n,a=t||Me;function s(){n=new WeakMap}function i(){var t,s,i,r,o,c=arguments.length;for(r=new Array(c),i=0;i<c;i++)r[i]=arguments[i];for(t=function(e){var t,a,s,i,r,o=n,c=!0;for(t=0;t<e.length;t++){if(!(r=a=e[t])||"object"!=typeof r){c=!1;break}o.has(a)?o=o.get(a):(s=new WeakMap,o.set(a,s),o=s)}return o.has(we)||((i=function(){var e={clear:function(){e.head=null}};return e}()).isUniqueByDependants=c,o.set(we,i)),o.get(we)}(o=a.apply(null,r)),t.isUniqueByDependants||(t.lastDependants&&!be(o,t.lastDependants,0)&&t.clear(),t.lastDependants=o),s=t.head;s;){if(be(s.args,r,1))return s!==t.head&&(s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=t.head,s.prev=null,t.head.prev=s,t.head=s),s.val;s=s.next}return s={val:e.apply(null,r)},r[0]=null,s.args=r,t.head&&(t.head.prev=s,s.next=t.head),t.head=s,s.val}return i.getDependants=a,i.clear=s,s(),i}var Ue=n(8468);function Ve(e,t=""){const n=(0,Ue.sortBy)((0,Ue.toPairs)(e),(([e])=>e));return(0,Ue.flatMap)(n,(([e,n])=>{const a=t?`${t}.${e}`:e;return(0,Ue.isArray)(n)?[a,...(0,Ue.map)(n,String)]:(0,Ue.isPlainObject)(n)?Ve(n,a):[a,String(n)]}))}function ve(e){if(!e||0===Object.keys(e).length)return"empty";const t=Ve(e);return(0,Ue.join)((0,Ue.filter)(t,(e=>""!==e)),"-")}const Le=e=>e.general,xe=e=>e.mc.shipping.rates,Fe=e=>e.mc.shipping.times,ke=e=>e.mc.settings,$e=e=>e.mc.accounts.jetpack,Be=e=>e.mc.accounts.google,He=e=>e.mc.accounts.google_access,je=e=>e.mc.accounts.mc,qe=e=>e.mc.accounts.existing_mc,We=e=>e.mc.accounts.ads,Ke=e=>e.mc.accounts.ads_billing_status,ze=e=>e.mc.accounts.existing_ads,Qe=e=>e.mc.contact,Ye=De((e=>{const{countries:t,continents:n}=e.mc;return{countries:t,continents:n}}),(e=>[e.mc.countries,e.mc.continents])),Xe=e=>e.mc.target_audience,Je=(e,t)=>!1===t?.exclude_removed?e.all_ads_campaigns:e.ads_campaigns,Ze=e=>e.ads.enable_enhanced_conversions,et=(e,t)=>e.campaign_asset_groups[t]||null,tt=e=>e.mc_setup,nt=e=>e.mc_product_statistics,at=e=>e.mc_review_request,st=De(((e,t)=>{const n=e.mc_issues[t.issue_type];if(!n)return n;const a=(t.page-1)*t.per_page,s=a+t.per_page;return{issues:n.issues.slice(a,s),total:n.total}}),(e=>[e.mc_issues])),it=(e,t)=>e.mc_product_feed?{products:e.mc_product_feed.pages[t.page],total:e.mc_product_feed.total}:e.mc_product_feed,rt=(e,t,n,a)=>{const s=(0,S.kj)(t,n,a);return e.report[s]||null},ot=(0,r.createRegistrySelector)((e=>(t,n,a,s,i)=>{const r=e(g.Ui),o=(0,S.dh)(n,a,s,i),c=[n,a,o];return{reportQuery:o,loaded:r.hasFinishedResolution("getReportByApiQuery",c),data:r.getReportByApiQuery(...c)}})),ct=(0,r.createRegistrySelector)((e=>(t,n,a,s)=>{const i=e(g.Ui),r=["programs",n,(0,S.N2)(n,a,s)],o=i.getReportByApiQuery(...r);return{data:o?o.totals:null,loaded:i.hasFinishedResolution("getReportByApiQuery",r)}})),dt=e=>e.mc.mapping.attributes,lt=(e,t)=>e.mc.mapping.sources[t],gt=De(((e,t)=>{const n={...e.mc.mapping.rules},{page:a,perPage:s}=t,i=(a-1)*s,r=i+s;return{rules:n?.items.slice(i,r)||[],total:n.total,pages:n.pages}}),(e=>[e.mc.mapping.rules])),ut=e=>e.store_categories,Et=(e,t)=>e.tours[t]||null,_t=e=>e.ads.accountStatus,pt=(e,t=[])=>{const n=(0,S.eT)(t);return e.ads.budgetRecommendations[n]||null},ht=(e,t,n)=>{const a=(0,S.Gj)(t,n);return e.ads.budgetMetrics[a]||null},mt=e=>e.gtinMigrationStatus,Ct=e=>e.price_benchmark.summary,St=De(((e,t)=>{if(t.product_id)return e.price_benchmark.suggestions.items[t.product_id];const n=ve(t),a=e.price_benchmark.suggestions.items;return{items:(e.price_benchmark.suggestions.queries[n]?.items||[]).map((e=>a[e])).filter(Boolean),meta:e.price_benchmark.suggestions.queries[n]?.meta}}),((e,t)=>[e.price_benchmark.suggestions,ve(t)])),At=(e,t)=>e.price_benchmark.suggestions.items[t],It=(e,t)=>e.ads.recommendations[t]||null;var Tt=n(6473);const Rt=e=>({type:"FETCH_WITH_HEADERS",options:e}),yt=e=>({type:"GLA_AWAIT_PROMISE",promise:e}),ft=(e,t)=>{const n=t instanceof Response;return{type:"GLA_RECORD_DATA_EVENT",actionType:e,data:n?null:t,response:n?t.clone():null}},Nt={...u.controls,FETCH_WITH_HEADERS:({options:e})=>c()({...e,parse:!1}).then((e=>Promise.all([e.headers,e.status,e.json()]))).then((([e,t,n])=>({headers:e,status:t,data:n}))),GLA_AWAIT_PROMISE:({promise:e})=>e,GLA_RECORD_DATA_EVENT:function({actionType:e,data:t,response:n}){switch(e){case p.RECEIVE_ADS_BUDGET_RECOMMENDATIONS:(0,Tt.ce)("gla_ads_budget_recommendations_received",t.eventProps);break;case p.RECEIVE_ADS_BUDGET_METRICS:Promise.resolve(t||n.json()).then((({budget:e,currency:t,country:n,country_codes:a,metrics:s})=>{(0,Tt.ce)("gla_ads_budget_metrics_received",{budget:e,currency:t,country:n||a.at(0),available:Boolean(s)})}))}}};function*Ot(e,t){const n=e?.json()||e?.text(),a=yield yt(n);(0,h.h)(a,t)}function*Pt(){yield N()}function*Gt(){yield G()}function*wt(){yield b()}function*Mt(){yield V()}function*bt(){yield v()}function*Dt(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/google/reconnected`});yield x(e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading Google account access info.","google-listings-and-ads"))}}function*Ut(){yield F()}function*Vt(){yield k()}function*vt(){yield $()}function*Lt(){yield W()}function*xt(){yield K()}function*Ft(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/contact-information`});yield z(e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading Google Merchant Center contact information.","google-listings-and-ads"))}}function*kt(){try{const e={continents:!0},t=(0,E.addQueryArgs)(`${g.RV}/mc/countries`,e),n=yield(0,u.apiFetch)({path:t});return{type:p.RECEIVE_MC_COUNTRIES_AND_CONTINENTS,data:n}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading supported country details.","google-listings-and-ads"))}}function*$t(){yield Y()}function*Bt(e){try{const t=yield(0,u.apiFetch)({path:(0,E.addQueryArgs)(`${g.RV}/ads/campaigns`,e)});return{type:p.RECEIVE_ADS_CAMPAIGNS,query:e,adsCampaigns:t.map(I)}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading ads campaigns.","google-listings-and-ads"))}}function*Ht(e){const t=`${g.RV}/ads/campaigns/asset-groups`,n={campaign_id:e},a=(0,E.addQueryArgs)(t,n);try{const t=yield(0,u.apiFetch)({path:a});return{type:p.RECEIVE_CAMPAIGN_ASSET_GROUPS,campaignId:e,assetGroups:t.map(T)}}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading the assets of the campaign.","google-listings-and-ads"))}}function*jt(){yield le()}function*qt(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/product-statistics`});yield ge(e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading your merchant center product statistics.","google-listings-and-ads"))}}function*Wt(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/review`});yield ue(e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading your merchant center product review request status.","google-listings-and-ads"))}}function*Kt(e){try{const{issue_type:t,...n}=e,a=yield(0,u.apiFetch)({path:(0,E.addQueryArgs)(`${g.RV}/mc/issues/${t||l.Tj}`,n)});yield Ee(e,a)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading issues to resolve.","google-listings-and-ads"))}}function*zt(e){try{const t=yield(0,u.apiFetch)({path:(0,E.addQueryArgs)(`${g.RV}/mc/product-feed`,e)});yield _e(e,t)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading product feed.","google-listings-and-ads"))}}bt.shouldInvalidate=e=>e.type===p.DISCONNECT_ACCOUNTS_GOOGLE,Dt.shouldInvalidate=e=>e.type===p.DISCONNECT_ACCOUNTS_GOOGLE,vt.shouldInvalidate=e=>e.type===p.DISCONNECT_ACCOUNTS_GOOGLE_ADS&&e.invalidateRelatedState,Lt.shouldInvalidate=e=>e.type===p.RECEIVE_ACCOUNTS_GOOGLE_ADS,xt.shouldInvalidate=vt.shouldInvalidate,Bt.shouldInvalidate=(e,t)=>(e.type===p.UPDATE_ADS_CAMPAIGN||e.type===p.DELETE_ADS_CAMPAIGN||e.type===p.CREATE_ADS_CAMPAIGN)&&!1===t?.exclude_removed,Kt.shouldInvalidate=e=>e.type===p.UPDATE_MC_PRODUCTS_VISIBILITY,zt.shouldInvalidate=(e,t)=>e.type===p.UPDATE_MC_PRODUCTS_VISIBILITY||e.type===p.RECEIVE_MC_PRODUCT_FEED&&(e.query.per_page!==t.per_page||e.query.orderby!==t.orderby||e.query.order!==t.order);const Qt=new Map([[l.k1,"mc"],[l.Mx,"ads"]]);function*Yt(e,t,n){const a=Qt.get(t),s=`${g.RV}/${a}/reports/${e}`,i=(0,E.addQueryArgs)(s,n);try{const a=yield(0,u.apiFetch)({path:i}),s=(0,S.kj)(e,t,n);yield ce(s,a)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading report.","google-listings-and-ads"))}}function*Xt(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/mapping/attributes`});yield me(e.data)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading the mapping attributes.","google-listings-and-ads"))}}function*Jt(e){try{if(!e)return;const t=yield(0,u.apiFetch)({path:(0,E.addQueryArgs)(`${g.RV}/mc/mapping/sources`,{attribute:e})});yield Ce(t.data,e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading the mapping sources for the selected attribute.","google-listings-and-ads"))}}function*Zt(e){try{const t=yield Rt({path:(0,E.addQueryArgs)(`${g.RV}/mc/mapping/rules`,{page:e.page,per_page:e.perPage})}),n=parseInt(t.headers.get("x-wp-total"),10),a=parseInt(t.headers.get("x-wp-totalpages"),10),s=t.data;yield Se(s,{...e,total:n,pages:a})}catch(e){(0,h.h)(e,(0,_.__)("There was an error loading the mapping rules.","google-listings-and-ads"))}}function*en(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/mc/mapping/categories`});yield Re(e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting the store categories.","google-listings-and-ads"))}}function*tn(e){try{const{data:t}=yield Rt({path:`${g.RV}/tours/${e}`});yield ye(t)}catch(e){if(404===e.status)return;yield Ot(e,(0,_.__)("There was an error getting the tour.","google-listings-and-ads"))}}function*nn(){yield Oe()}function*an(e){if(!e||!e.length)return;const t=(0,S.eT)(e),n=`${g.RV}/ads/campaigns/budget-recommendation`,a={country_codes:e},s=(0,E.addQueryArgs)(n,a);try{let{data:e}=yield Rt({path:s});return e=function(e){const t=["recommended","high","low"],n=[],{currency:a,source:s,recommendations:i,...r}=(0,S.xG)(e);return function(e){const t=e.filter((e=>e.metrics));if(t.length<=1)return e;let n=t[0];for(let a=1;a<t.length;a+=1){const s=t[a];if(s.metrics.conversions!==n.metrics.conversions||s.metrics.conversionsValue!==n.metrics.conversionsValue)return e;s.dailyBudget<n.dailyBudget&&(n=s)}return[{...n,level:"recommended"}]}(i).forEach((e=>{const{level:s,...i}=e,o=s.toLowerCase();t.includes(o)&&(n.push(i.metrics),i.currency=a,r[o]=i)})),r.recommendedDailyBudget=r.recommended.dailyBudget,r.eventProps={source:s,recommended_budget:r.recommendedDailyBudget,metrics_availability:"all"},0===n.filter(Boolean).length?r.eventProps.metrics_availability="none":n.every(Boolean)||(r.eventProps.metrics_availability="partial"),r}(e),yield ft(p.RECEIVE_ADS_BUDGET_RECOMMENDATIONS,e),{type:p.RECEIVE_ADS_BUDGET_RECOMMENDATIONS,countryCodesKey:t,data:e}}catch(e){if(404===e.status)return;yield Ot(e,(0,_.__)("There was an error getting the budget recommendation.","google-listings-and-ads"))}}function*sn(e,t){try{const{data:n}=yield Rt({path:(0,E.addQueryArgs)(`${g.RV}/ads/campaigns/budget-metrics`,{country_codes:e,budget:t})});return yield ft(p.RECEIVE_ADS_BUDGET_METRICS,n),{type:p.RECEIVE_ADS_BUDGET_METRICS,key:(0,S.Gj)(e,t),data:A(n)}}catch(e){if(404===e.status)return void(yield ft(p.RECEIVE_ADS_BUDGET_METRICS,e));yield Ot(e,(0,_.__)("There was an error getting the budget metrics.","google-listings-and-ads"))}}function*rn(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/gtin-migration`});yield Ne(e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting the GTIN Migration Status.","google-listings-and-ads"))}}function*on(){try{const e=yield(0,u.apiFetch)({path:`${g.RV}/ads/settings`});yield ae(Boolean(e.enhanced_conversions_enabled))}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting the enhanced conversions status.","google-listings-and-ads"))}}function*cn(){try{const{data:e}=yield Rt({path:`${g.RV}/mc/price-benchmarks/summary`});return{type:p.RECEIVE_PRICE_BENCHMARK_SUMMARY,data:e}}catch(e){if(403===e.status)return{type:p.RECEIVE_PRICE_BENCHMARK_SUMMARY,data:[]};const t=e?.json()||e?.text(),n=yield yt(t);(0,h.h)(n,(0,_.__)("There was an error getting the price benchmark summary.","google-listings-and-ads"))}}function*dn(e){try{let t=`${g.RV}/mc/price-benchmarks`;t=e.product_id?`${t}/${e.product_id}`:(0,E.addQueryArgs)(t,e);const{data:n}=yield Rt({path:t});return{type:p.RECEIVE_PRICE_BENCHMARK_SUGGESTIONS,data:n,args:e}}catch(e){if(403===e.status)return{type:p.RECEIVE_PRICE_BENCHMARK_SUGGESTIONS,data:[]};const t=e?.json()||e?.text(),n=yield yt(t);(0,h.h)(n,(0,_.__)("There was an error getting the price benchmark suggestions.","google-listings-and-ads"))}}function*ln(e){try{const t=yield(0,u.apiFetch)({path:(0,E.addQueryArgs)(`${g.RV}/ads/recommendations`,{type:e})});yield Ge(t,e)}catch(e){(0,h.h)(e,(0,_.__)("There was an error getting the Ads recommendations.","google-listings-and-ads"))}}Zt.shouldInvalidate=e=>e.type===p.UPSERT_MAPPING_RULE||e.type===p.DELETE_MAPPING_RULE,nn.shouldInvalidate=e=>e.type===p.DISCONNECT_ACCOUNTS_GOOGLE_ADS,an.shouldInvalidate=e=>e.type===p.DISCONNECT_ACCOUNTS_GOOGLE_ADS,sn.shouldInvalidate=e=>e.type===p.DISCONNECT_ACCOUNTS_GOOGLE_ADS;const gn={general:{version:null,mcId:null,adsId:null},mc:{target_audience:null,countries:null,continents:null,shipping:{rates:[],times:[]},settings:null,accounts:{jetpack:null,google:null,mc:null,ads:null,existing_mc:null,existing_ads:null,ads_billing_status:null,google_access:null},contact:null,mapping:{attributes:[],sources:{},rules:{items:[],total:null,pages:null}}},ads_campaigns:null,all_ads_campaigns:null,campaign_asset_groups:{},mc_setup:null,mc_product_statistics:null,mc_issues:{account:null,product:null},mc_review_request:{status:null,cooldown:null,issues:null,reviewEligibleRegions:[]},mc_product_feed:null,report:{},store_categories:[],tours:{},ads:{accountStatus:{hasAccess:null,inviteLink:null,step:null},budgetRecommendations:{},recommendations:{},enable_enhanced_conversions:!1,budgetMetrics:{}},gtinMigrationStatus:null,price_benchmark:{suggestions:{items:{},queries:{}},summary:{}}};function un(e,t=""){const n=Object.assign(e.constructor(),e),a=e=>null==e?{}:(0,Ue.clone)(e);return{setIn(e,s){const i=(e=>t?Array.isArray(t)||Array.isArray(e)?[].concat(t,e):`${t}.${e}`:e)(e);return(0,Ue.setWith)(n,i,s,a),this},end:()=>n}}function En(e,t,n){return un(e).setIn(t,n).end()}function pn(e,t){return t?e.json?e.json():Promise.reject(e):e}var hn=n(3666);(0,r.registerStore)(g.Ui,{actions:a,selectors:s,resolvers:i,controls:Nt,reducer:(e=gn,t)=>{switch(t.type){case p.RECEIVE_SHIPPING_RATES:return En(e,"mc.shipping.rates",t.shippingRates);case p.UPSERT_SHIPPING_RATES:{const{shippingRates:n}=t,a=[...e.mc.shipping.rates];return n.forEach((e=>{const t=a.findIndex((t=>t.id===e.id));t>=0?a[t]=e:a.push(e)})),En(e,"mc.shipping.rates",a)}case p.DELETE_SHIPPING_RATES:{const{ids:n}=t,a=e.mc.shipping.rates.filter((e=>!n.includes(e.id)));return En(e,"mc.shipping.rates",a)}case p.RECEIVE_SHIPPING_TIMES:return En(e,"mc.shipping.times",t.shippingTimes);case p.UPSERT_SHIPPING_TIMES:{const{countries:n,time:a,maxTime:s}=t.shippingTime,i=[...e.mc.shipping.times];return n.forEach((e=>{const t={countryCode:e,time:a,maxTime:s},n=i.findIndex((t=>t.countryCode===e));n>=0?i[n]=t:i.push(t)})),En(e,"mc.shipping.times",i)}case p.DELETE_SHIPPING_TIMES:{const n=new Set(t.countryCodes),a=e.mc.shipping.times.filter((e=>!n.has(e.countryCode)));return En(e,"mc.shipping.times",a)}case p.RECEIVE_SETTINGS:return En(e,"mc.settings",t.settings);case p.SAVE_SETTINGS:return En(e,"mc.settings",{...e.mc.settings,...t.settings});case p.RECEIVE_ACCOUNTS_JETPACK:return En(e,"mc.accounts.jetpack",t.account);case p.RECEIVE_ACCOUNTS_GOOGLE:return En(e,"mc.accounts.google",t.account);case p.RECEIVE_ACCOUNTS_GOOGLE_ACCESS:return En(e,"mc.accounts.google_access",t.data);case p.RECEIVE_ACCOUNTS_GOOGLE_MC:return En(e,"mc.accounts.mc",t.account);case p.RECEIVE_ACCOUNTS_GOOGLE_MC_EXISTING:return En(e,"mc.accounts.existing_mc",t.accounts);case p.RECEIVE_ACCOUNTS_GOOGLE_ADS:return En(e,"mc.accounts.ads",t.account);case p.DISCONNECT_ACCOUNTS_GOOGLE_ADS:return En(e,"mc.accounts.ads",gn.mc.accounts.ads);case p.RECEIVE_ACCOUNTS_GOOGLE_ADS_BILLING_STATUS:return En(e,"mc.accounts.ads_billing_status",t.billingStatus);case p.RECEIVE_ACCOUNTS_GOOGLE_ADS_EXISTING:return En(e,"mc.accounts.existing_ads",t.accounts);case p.RECEIVE_MC_CONTACT_INFORMATION:return En(e,"mc.contact",t.data);case p.RECEIVE_MC_COUNTRIES_AND_CONTINENTS:{const{data:n}=t;return un(e,"mc").setIn("countries",n.countries).setIn("continents",n.continents).end()}case p.RECEIVE_TARGET_AUDIENCE:case p.SAVE_TARGET_AUDIENCE:return En(e,"mc.target_audience",t.target_audience);case p.RECEIVE_ADS_CAMPAIGNS:return!1===t.query?.exclude_removed?En(e,"all_ads_campaigns",t.adsCampaigns):En(e,"ads_campaigns",t.adsCampaigns);case p.CREATE_ADS_CAMPAIGN:return En(e,"ads_campaigns",[...e.ads_campaigns||[],t.createdCampaign]);case p.UPDATE_ADS_CAMPAIGN:{const{id:n,data:a}=t,s=e.ads_campaigns.findIndex((e=>e.id===n)),i={...e.ads_campaigns[s],...a},r=[...e.ads_campaigns];return r[s]=i,En(e,"ads_campaigns",r)}case p.DELETE_ADS_CAMPAIGN:{const{id:n}=t,a=e.ads_campaigns.filter((e=>e.id!==n));return En(e,"ads_campaigns",a)}case p.RECEIVE_CAMPAIGN_ASSET_GROUPS:return En(e,["campaign_asset_groups",t.campaignId],t.assetGroups);case p.CREATE_CAMPAIGN_ASSET_GROUP:{const{campaignId:n,assetGroup:a}=t;return En(e,["campaign_asset_groups",n],[...e.campaign_asset_groups[n]||[],a])}case p.RECEIVE_MC_SETUP:return En(e,"mc_setup",t.mcSetup);case p.RECEIVE_MC_PRODUCT_STATISTICS:return En(e,"mc_product_statistics",t.mcProductStatistics);case p.RECEIVE_MC_REVIEW_REQUEST:return En(e,"mc_review_request",t.mcReviewRequest);case p.RECEIVE_MC_ISSUES:{const{query:n,data:a}=t,s=e.mc_issues[n.issue_type]?.issues.slice()||[];return s.splice((n.page-1)*n.per_page,n.per_page,...a.issues),un(e,`mc_issues.${n.issue_type}`).setIn("issues",s).setIn("total",a.total).end()}case p.RECEIVE_MC_PRODUCT_FEED:{const{query:n,data:a}=t,s=e.mc_product_feed||{},i=un(e,"mc_product_feed");return s.per_page===n.per_page&&s.order===n.order&&s.orderby===n.orderby||i.setIn("pages",{}),i.setIn(["pages",n.page],a.products).setIn("per_page",n.per_page).setIn("order",n.order).setIn("orderby",n.orderby).setIn("total",a.total).end()}case p.RECEIVE_REPORT:{const{reportKey:n,data:a}=t;return En(e,["report",n],a)}case p.RECEIVE_MAPPING_ATTRIBUTES:return En(e,"mc.mapping.attributes",t.attributes);case p.RECEIVE_MAPPING_SOURCES:{const{attributeKey:n,sources:a}=t;return En(e,["mc","mapping","sources",n],a)}case p.RECEIVE_MAPPING_RULES:{const{rules:n,pagination:a}=t,s=[...e.mc.mapping.rules.items],i=(a.page-1)*a.perPage,r=a.perPage;return s.splice(i,r,...n),un(e,"mc.mapping.rules").setIn("items",s).setIn("total",a.total).setIn("pages",a.pages).end()}case p.UPSERT_MAPPING_RULE:{const{rule:n}=t,a=[...e.mc.mapping.rules.items],s=a.findIndex((e=>e.id===n.id));return s>=0?a[s]=n:a.push(n),En(e,"mc.mapping.rules.items",a)}case p.DELETE_MAPPING_RULE:{const n=e.mc.mapping.rules.items.filter((e=>e.id!==t.rule.id));return En(e,"mc.mapping.rules.items",n)}case p.RECEIVE_STORE_CATEGORIES:{const{storeCategories:n}=t;return En(e,"store_categories",n)}case p.RECEIVE_TOUR:case p.UPSERT_TOUR:{const{tour:n}=t;return En(e,["tours",n.id],n)}case p.HYDRATE_PREFETCHED_DATA:{const n=un(e,"general");return["version","mcId","adsId"].forEach((e=>{t.data.hasOwnProperty(e)&&n.setIn(e,t.data[e])})),n.end()}case p.RECEIVE_GOOGLE_ADS_ACCOUNT_STATUS:{const{data:{has_access:n,invite_link:a,step:s}}=t;return un(e,"ads.accountStatus").setIn("hasAccess",n).setIn("inviteLink",a).setIn("step",s).end()}case p.RECEIVE_ADS_BUDGET_RECOMMENDATIONS:{const{countryCodesKey:n,data:a}=t;return En(e,["ads","budgetRecommendations",n],a)}case p.RECEIVE_ADS_BUDGET_METRICS:{const{key:n,data:a}=t;return En(e,["ads","budgetMetrics",n],a)}case p.RECEIVE_GTIN_MIGRATION_STATUS:{const{data:n}=t;return En(e,"gtinMigrationStatus",n?.status)}case p.RECEIVE_ADS_ENHANCED_CONVERSIONS:{const{status:n}=t;return En(e,"ads.enable_enhanced_conversions",n)}case p.RECEIVE_PRICE_BENCHMARK_SUMMARY:{const{data:n}=t;return En(e,"price_benchmark.summary",n)}case p.RECEIVE_PRICE_BENCHMARK_SUGGESTIONS:{const{data:n,args:a={}}=t,s=ve(a);if(!n&&!n.results)return a.product_id?e:un(e,["price_benchmark","suggestions"]).setIn(["queries",[s],"items"],[]).setIn(["queries",[s],"meta","totalItems"],0).end();if(a.product_id)return En(e,["price_benchmark","suggestions","items",[a.product_id]],n);const i=(0,Ue.keyBy)(n.results,(e=>e.product.id));return un(e,["price_benchmark","suggestions"]).setIn(["queries",[s],"items"],n.results.map((e=>e.product.id))).setIn(["queries",[s],"meta","totalItems"],n.total).setIn("items",{...e.price_benchmark.suggestions.items,...i}).end()}case p.RECEIVE_PRICE_BENCHMARK_SUGGESTIONS_PRODUCT_PRICE:{const{data:{productId:n,productPrice:a}}=t;return En(e,"price_benchmark.suggestions.items",{...e.price_benchmark.suggestions.items,[n]:{...e.price_benchmark.suggestions.items[n],product_price:a}})}case p.RECEIVE_ADS_RECOMMENDATIONS:{const{recommendations:n,recommendationType:a}=t;return En(e,["ads","recommendations",a],n)}case p.DISCONNECT_ACCOUNTS_ALL:default:return e}}}),(0,r.dispatch)(g.Ui).hydratePrefetchedData(l.Th.initialWpData),c().use(function(e){const t=new RegExp(`^${g.RV}/`);return function(n,a){if(!t.test(n.path))return a(n);const{parse:s=!0}=n;return a({...n,parse:!1}).catch(e).catch((async e=>Promise.reject(await pn(e,s)))).then((e=>s&&204===e.status?null:pn(e,s)))}}((e=>{if(l.Th.mcSetupComplete&&401===e.status)return(e.json||e.text).call(e).then((e=>"string"==typeof e?{message:e}:e)).then((e=>{const t=(0,hn.Ke)(e.code);return t&&(0,d.getHistory)().replace(t),e})).then((t=>Promise.reject({...t,statusCode:e.status})));throw e})));const mn=()=>(0,r.useDispatch)(g.Ui)},7692:(e,t,n)=>{n.d(t,{Gj:()=>m,N2:()=>d,XQ:()=>c,YK:()=>o,bM:()=>p,dh:()=>l,eT:()=>h,jr:()=>_,kj:()=>u,xG:()=>C});var a=n(8443),s=n(7374),i=n(5854);const r=["clicks","impressions"],o=["sales","conversions","spend",...r],c=Object.freeze({NONE:0,FOR_METRIC:1,FOR_REQUEST:2});function d(e,t,n){const i=(0,s.getCurrentDates)(t);return{after:(0,a.format)("Y-m-d",i[n].after),before:(0,a.format)("Y-m-d",i[n].before),fields:"free"===e?r:o}}function l(e,t,n,a){const s=d(t,n,a),{order:i="desc"}=n;let{orderby:r}=n;r&&s.fields.includes(r)||(r=s.fields[0]);const o={...s,interval:"day",orderby:r,order:i};return"programs"===e&&n.programs?o.ids=n.programs:"products"===e&&n.products&&(o.ids=n.products.replace(/\d+/g,"gla_$&")),o}function g(e,t){if(t){if(Array.isArray(t))return[...t].sort();if("object"==typeof t)return Object.fromEntries(Object.entries(t).sort())}return t}function u(e,t,n){return`${e}:${t}:${JSON.stringify(n,g)}`}function E(e,t){let n=null;if("number"==typeof e&&"number"==typeof t&&(n=0,e!==t)){const a=(e-t)/t*100;n=Number.isFinite(a)?(0,i.A)(a):null}return n}const _=(e,t,n)=>({value:e,delta:E(e,t),prevValue:t,missingFreeListingsData:n});function p(e={},t={},n){return(n||Object.keys(e)).reduce(((n,a)=>({...n,[a]:_(e[a],t[a],e[a]&&t[a]?c.NONE:c.FOR_REQUEST)})),{})}function h(e=[]){return e.join("_").toLowerCase()}function m(e,t){return`${h(e)}::${t.toString().replace(".","#")}`}function C(e){return Array.isArray(e)?e.map(C):"[object Object]"!==Object.prototype.toString.call(e)?e:Object.entries(e).reduce(((e,[t,n])=>(e[t.replace(/(?<=[a-z\d])_([a-z])/g,((e,t)=>t.toUpperCase()))]=C(n),e)),{})}},399:(e,t,n)=>{n.d(t,{A:()=>s});const a=new Map;function s(e){if(a.has(e))return a.get(e);throw new Error(`The given \`kind\` of character counter is an unknown kind: ${e}`)}a.set("google-ads",function(){const e=[/[\u0000-\u04F9]/,/[\u1E00-\u20BF]/,/[\uFF61-\uFFDC]/,/[\u0E00-\u0E7F]/,/[\u2100-\u213A]/,/[\u0600-\u06FF]/,/[\u0750-\u077F]/,/[\uFB50-\uFDFF]/,/[\uFE70-\uFEFF]/,/[\u05D0-\u05EA]/,/\u05BE|\u05F3|\u05F4/],t=new Set(["ऀ","ँ","ं","ऺ","़","ु","ू","ृ","ॄ","ॅ","ॆ","े","ै","्","॑","॒","॓","॔","ॕ","ॖ","ॗ","ॢ","ॣ"]);return function(n){return n.split("").reduce(((n,a)=>n+function(n){return e.some((e=>e.test(n)))?1:/[\u0900-\u0D7F]/.test(n)?t.has(n)?0:1:2}(a)),0)}}())},6876:(e,t,n)=>{n.d(t,{h:()=>r});var a=n(7143),s=n(7723),i=n(6520);function r(e,t,n){if(401!==e?.statusCode){const r=function(e,t,n){const a=[],i=e?.message;return t&&a.push(t),i&&"string"==typeof i?a.push(i):n&&a.push(n),0===a.length&&a.push((0,s.__)("Unknown error occurred.","google-listings-and-ads")),a.join((0,s._x)(" ","The spacing between sentences. It's a space in English. Please use an empty string if no spacing is needed in that language.","google-listings-and-ads"))}(e,t,n);(0,a.dispatch)(i.mY).createNotice("error",r)}!function(...e){console.error(...e)}(e)}},5854:(e,t,n)=>{function a(e,t=2){const n=Math.pow(10,t);return Math.round(e*n)/n}n.d(t,{A:()=>a})},6473:(e,t,n)=>{n.d(t,{lr:()=>_,GH:()=>E,eB:()=>g,T1:()=>l,CU:()=>d,qX:()=>p,E$:()=>u,JL:()=>c,Ff:()=>m,ce:()=>h,dQ:()=>A,T:()=>S,Xh:()=>C});const a=window.wc.tracks;var s=n(7143),i=n(2619),r=n(3905),o=n(2434);const c=(0,i.createHooks)(),d="tracking",l="FILTER_ONBOARDING",g="FILTER_BUDGET_RECOMMENDATIONS",u=new Map;u.set(l,["context","step"]),u.set(g,["source","recommended_budget"]);const E="setup-mc",_="setup-ads";function p(e){const{slug:t}=r.Th,{version:n,adsId:a,mcId:i}=(0,s.select)(o.U).getGeneral(),c={...e,[`${t}_version`]:n};return i&&(c[`${t}_mc_id`]=i),a&&(c[`${t}_ads_id`]=a),c}function h(e,t){(0,a.recordEvent)(e,p(t))}function m(e,t){(0,a.queueRecordEvent)(e,p(t))}const C=(e,t,n)=>{const a={context:e};let s;"goto"===n?(s="gla_table_go_to_page",a.page=t):(s="gla_table_page_click",a.direction=n),h(s,a)};function S(e,t,n){h(e,{triggered_by:`stepper-step${t}-button`,action:`go-to-step${t}`,context:n})}function A(e,t,n,a){h(e,{triggered_by:`step${t}-continue-button`,action:`go-to-step${n}`,context:a})}},3666:(e,t,n)=>{n.d(t,{$K:()=>i,FN:()=>_,Ke:()=>m,Q4:()=>c,Qk:()=>p,XG:()=>l,Xb:()=>h,hP:()=>E,uB:()=>d,uZ:()=>u,xP:()=>g});var a=n(6476),s=n(3905);const i={editCampaign:"/campaigns/edit",createCampaign:"/campaigns/create",editStoreAddress:"/edit-store-address",reconnectWPComAccount:"/reconnect-wpcom-account",reconnectGoogleAccount:"/reconnect-google-account"},r="/google/dashboard",o="/google/settings",c=(e,t)=>(0,a.getNewPath)({subpath:i.editCampaign,programId:e,step:t},r),d=()=>(0,a.getNewPath)({subpath:i.createCampaign},r),l=()=>(0,a.getNewPath)(null,"/google/start",null),g=()=>(0,a.getNewPath)(null,"/google/setup-mc",null),u=(e=null)=>(0,a.getNewPath)(e,r,null),E=(e=null)=>(0,a.getNewPath)(e,"/google/product-feed",null),_=()=>(0,a.getNewPath)(null,o,null),p=()=>(0,a.getNewPath)(null,"/google/shipping",null),h=()=>(0,a.getNewPath)({subpath:i.editStoreAddress},o,null),m=e=>{let t;switch(e){case s.iH.WPCOM_DISCONNECTED:t=i.reconnectWPComAccount;break;case s.iH.GOOGLE_DISCONNECTED:t=i.reconnectGoogleAccount;break;default:return}return(0,a.getNewPath)({subpath:t},o,null)}},1609:e=>{e.exports=window.React},5795:e=>{e.exports=window.ReactDOM},8468:e=>{e.exports=window.lodash},8846:e=>{e.exports=window.wc.components},4111:e=>{e.exports=window.wc.currency},7752:e=>{e.exports=window.wc.customerEffortScore},314:e=>{e.exports=window.wc.data},7374:e=>{e.exports=window.wc.date},6476:e=>{e.exports=window.wc.navigation},3577:e=>{e.exports=window.wc.number},5703:e=>{e.exports=window.wc.wcSettings},1455:e=>{e.exports=window.wp.apiFetch},6427:e=>{e.exports=window.wp.components},9491:e=>{e.exports=window.wp.compose},7143:e=>{e.exports=window.wp.data},8443:e=>{e.exports=window.wp.date},8107:e=>{e.exports=window.wp.dom},6087:e=>{e.exports=window.wp.element},2619:e=>{e.exports=window.wp.hooks},8537:e=>{e.exports=window.wp.htmlEntities},7723:e=>{e.exports=window.wp.i18n},1233:e=>{e.exports=window.wp.preferences},5573:e=>{e.exports=window.wp.primitives},3832:e=>{e.exports=window.wp.url},6873:e=>{e.exports=window.wp.viewport}},a={};function s(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return n[e](i,i.exports,s),i.exports}s.m=n,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,n)=>(s.f[n](e,t),t)),[])),s.u=e=>({61:"product-feed",96:"vendors",207:"get-started-page",223:"commons",352:"onboarding",456:"attribute-mapping",472:"settings",528:"reports",553:"shipping",663:"ads-onboarding",844:"price-benchmark",945:"dashboard"}[e]+".js?ver="+{61:"cfedb9180c34eeb70bc6",96:"f6d9fd9cef717af3da93",207:"a1d0a6ce987f4070d423",223:"aacbe039fb644faea990",352:"19dd09d4133564c758f4",456:"7640d757c98537307218",472:"ddae678cb1ef27db46ae",528:"3b8635a4188b36252da0",553:"5b084f5062345805415e",663:"90217d901093730b7ffc",844:"e8bb04b91757f85e0bd8",945:"a951d33a01dae39a2169"}[e]),s.miniCssF=e=>({61:"product-feed",96:"vendors",207:"get-started-page",352:"onboarding",456:"attribute-mapping",472:"settings",528:"reports",553:"shipping",663:"ads-onboarding",844:"price-benchmark",945:"dashboard"}[e]+".css?ver="+{61:"cfedb9180c34eeb70bc6",96:"f6d9fd9cef717af3da93",207:"a1d0a6ce987f4070d423",352:"19dd09d4133564c758f4",456:"7640d757c98537307218",472:"ddae678cb1ef27db46ae",528:"3b8635a4188b36252da0",553:"5b084f5062345805415e",663:"90217d901093730b7ffc",844:"e8bb04b91757f85e0bd8",945:"a951d33a01dae39a2169"}[e]),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="google-listings-and-ads:",s.l=(n,a,i,r)=>{if(e[n])e[n].push(a);else{var o,c;if(void 0!==i)for(var d=document.getElementsByTagName("script"),l=0;l<d.length;l++){var g=d[l];if(g.getAttribute("src")==n||g.getAttribute("data-webpack")==t+i){o=g;break}}o||(c=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,s.nc&&o.setAttribute("nonce",s.nc),o.setAttribute("data-webpack",t+i),o.src=n),e[n]=[a];var u=(t,a)=>{o.onerror=o.onload=null,clearTimeout(E);var s=e[n];if(delete e[n],o.parentNode&&o.parentNode.removeChild(o),s&&s.forEach((e=>e(a))),t)return t(a)},E=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),c&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var a=n.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=n[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{if("undefined"!=typeof document){var e={57:0};s.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{61:1,96:1,207:1,352:1,456:1,472:1,528:1,553:1,663:1,844:1,945:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var a=s.miniCssF(e),i=s.p+a;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),a=0;a<n.length;a++){var s=(r=n[a]).getAttribute("data-href")||r.getAttribute("href");if("stylesheet"===r.rel&&(s===e||s===t))return r}var i=document.getElementsByTagName("style");for(a=0;a<i.length;a++){var r;if((s=(r=i[a]).getAttribute("data-href"))===e||s===t)return r}})(a,i))return t();((e,t,n,a,i)=>{var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",s.nc&&(r.nonce=s.nc),r.onerror=r.onload=n=>{if(r.onerror=r.onload=null,"load"===n.type)a();else{var s=n&&n.type,o=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+s+": "+o+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=s,c.request=o,r.parentNode&&r.parentNode.removeChild(r),i(c)}},r.href=t,document.head.appendChild(r)})(e,i,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={57:0};s.f.j=(t,n)=>{var a=s.o(e,t)?e[t]:void 0;if(0!==a)if(a)n.push(a[2]);else{var i=new Promise(((n,s)=>a=e[t]=[n,s]));n.push(a[2]=i);var r=s.p+s.u(t),o=new Error;s.l(r,(n=>{if(s.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+r+")",o.name="ChunkLoadError",o.type=i,o.request=r,a[1](o)}}),"chunk-"+t,t)}};var t=(t,n)=>{var a,i,[r,o,c]=n,d=0;if(r.some((t=>0!==e[t]))){for(a in o)s.o(o,a)&&(s.m[a]=o[a]);c&&c(s)}for(t&&t(n);d<r.length;d++)i=r[d],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunkgoogle_listings_and_ads=globalThis.webpackChunkgoogle_listings_and_ads||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=s(7723),r=s(6087),o=s(2619),c=s(5703),d=s(1609);const l=(0,s(9491).createHigherOrderComponent)((e=>t=>(0,d.createElement)("div",{className:"gla-admin-page"},(0,d.createElement)(e,{...t}))),"withAdminPageShell");s(2434);var g=s(6473);const u=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(945)]).then(s.bind(s,6905)))),E=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(207)]).then(s.bind(s,494)))),_=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(352)]).then(s.bind(s,2813)))),p=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(663)]).then(s.bind(s,923)))),h=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(528)]).then(s.bind(s,6831)))),m=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(61)]).then(s.bind(s,9061)))),C=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(456)]).then(s.bind(s,8885)))),S=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(844)]).then(s.bind(s,5928)))),A=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(472)]).then(s.bind(s,2379)))),I=(0,r.lazy)((()=>Promise.all([s.e(223),s.e(96),s.e(553)]).then(s.bind(s,6343)))),T=new Set,R=(0,c.getSetting)("admin")?.woocommerceTranslation||(0,i.__)("WooCommerce","google-listings-and-ads"),y="woocommerce_admin_pages_list";let f=!1;const N=()=>{(0,o.addFilter)(y,"woocommerce/google-listings-and-ads/add-page-routes",(e=>{const t=[["",R],["/marketing",(0,i.__)("Marketing","google-listings-and-ads")],(0,i.__)("Google for WooCommerce","google-listings-and-ads")],n=[{breadcrumbs:[...t],container:E,path:"/google/start",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Setup Merchant Center","google-listings-and-ads")],container:_,path:"/google/setup-mc"},{breadcrumbs:[...t,(0,i.__)("Setup Google Ads","google-listings-and-ads")],container:p,path:"/google/setup-ads"},{breadcrumbs:[...t,(0,i.__)("Dashboard","google-listings-and-ads")],container:u,path:"/google/dashboard",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Reports","google-listings-and-ads")],container:h,path:"/google/reports",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Product Feed","google-listings-and-ads")],container:m,path:"/google/product-feed",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Price Benchmark","google-listings-and-ads")],container:S,path:"/google/price-benchmark",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Attribute Mapping","google-listings-and-ads")],container:C,path:"/google/attribute-mapping",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Settings","google-listings-and-ads")],container:A,path:"/google/settings",wpOpenMenu:"toplevel_page_woocommerce-marketing"},{breadcrumbs:[...t,(0,i.__)("Shipping","google-listings-and-ads")],container:I,path:"/google/shipping",wpOpenMenu:"toplevel_page_woocommerce-marketing"}];return n.forEach((e=>{e.container=l(e.container);const t=e.path.substring(1).replace(/\//g,"_");T.add(t)})),f=!0,e.concat(n)}))},O=()=>(0,o.hasAction)("hookAdded",`woocommerce/woocommerce/watch_${y}`);if((0,o.didFilter)(y)>0&&!O()&&!f){const e=Date.now(),t=setInterval((()=>{if(O())return clearInterval(t),void N();Date.now()-e>3e3&&clearInterval(t)}),10)}else N();(0,o.addFilter)("woocommerce_tracks_client_event_properties","woocommerce/google-listings-and-ads/add-base-event-properties-to-page-view",((e,t)=>"wcadmin_page_view"===t&&T.has(e.path)?(0,g.qX)(e):e))})();
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка