1import{a as Oe}from"./chunk-PFSSOXLF.js";import{a as Ee}from"./chunk-DVA36W7W.js";import"./chunk-MUNGOJTB.js";import{a as we}from"./chunk-ABEOKCRC.js";import"./chunk-RKR3PV64.js";import{d as ge}from"./chunk-OYWHTECT.js";import"./chunk-B6ML3TBS.js";import"./chunk-7VPF77TY.js";import"./chunk-4SSS2OJZ.js";import"./chunk-3XIPWIBB.js";import"./chunk-WAWFYPMX.js";import{a as Se,b as Me}from"./chunk-7MQTEMAJ.js";import"./chunk-HTCLQCOU.js";import"./chunk-6XPI5QYW.js";import"./chunk-YWMD53KQ.js";import"./chunk-A6AWQOXQ.js";import{C as Pe,c as _e,h as Ce,l as xe,n as fe,t as Ae,u as be,v as ve,w as he,x as ye}from"./chunk-PJ5GV7IK.js";import{s as me,x as pe}from"./chunk-EDUSMAQY.js";import{Ab as m,B as y,Bb as P,Cb as I,Db as G,E as se,Pa as B,Ra as v,Rb as L,Sa as h,Sb as V,Va as z,Wa as N,Xa as _,Ya as o,Za as i,_a as O,_b as T,fb as E,ia as d,jb as g,k as F,lb as s,p as f,q as A,xa as ce,xb as w,zb as a}from"./chunk-FFQQO7O7.js";import"./chunk-ID4WHIPA.js";import"./chunk-QUA7QOZA.js";import{a as C,b as x}from"./chunk-C6Q5SG76.js";var Qe="07:30",Le="08:00",Ve="02:00";var De="02:00",qe=/^(?:[01]\d|2[0-3]):[0-5]\d$/;function k(n){return typeof n=="string"&&qe.test(n)}function Ie(n,t){return!k(n)||!k(t)?!1:j(n)<j(t)}function Te(n){if(!k(n))return null;let t=Fe(n,30);return{queueTime:n,approvalTime:t,sendTime:De}}function H(n,t){return{schemaVersion:1,accountKey:String(n?.accountKey||""),orgId:t.orgId,connectionId:t.connectionId,profileId:t.profileId,accountName:String(t.accountName||n?.accountName||`Profile ${t.profileId}`),timezone:String(t.timezone||n?.timezone||"UTC"),scheduleRevision:Ge(n?.scheduleRevision),settingsHash:String(n?.settingsHash||""),scheduleState:n?.scheduleState==="pending"||n?.scheduleState==="partial"?n.scheduleState:"ready",autoQueueBidSuggestions:x(C({},Z(n?.autoQueueBidSuggestions,Qe)),{policy:$e(n?.autoQueueBidSuggestions?.policy)}),autoApproval:x(C({},Z(n?.autoApproval,Le)),{policy:Ue(n?.autoApproval?.policy)}),autoSend:Z(n?.autoSend,Ve),createdAt:R(n?.createdAt),updatedAt:R(n?.updatedAt),updatedBy:R(n?.updatedBy)}}function U(n){return x(C({},n),{autoQueueBidSuggestions:x(C({},n.autoQueueBidSuggestions),{policy:x(C({},n.autoQueueBidSuggestions.policy),{enabledCampaignIds:[...n.autoQueueBidSuggestions.policy.enabledCampaignIds]})}),autoApproval:x(C({},n.autoApproval),{policy:x(C({},n.autoApproval.policy),{enabledCampaignIds:[...n.autoApproval.policy.enabledCampaignIds]})}),autoSend:C({},n.autoSend)})}function ke(n,t){return!(!n||!t?.canManageSettings||!k(n.autoQueueBidSuggestions.time)||!k(n.autoApproval.time)||!k(n.autoSend.time)||n.autoQueueBidSuggestions.enabled&&!J(n.autoQueueBidSuggestions.policy)||n.autoApproval.enabled&&!X(n.autoApproval.policy)||n.autoQueueBidSuggestions.enabled&&!t.canEnableAutoQueue||n.autoApproval.enabled&&!t.canEnableAutoApproval||n.autoSend.enabled&&!t.canEnableAutoSend)}function W(n){return n?JSON.stringify({autoQueueBidSuggestions:{enabled:n.autoQueueBidSuggestions.enabled===!0,time:n.autoQueueBidSuggestions.time,policy:x(C({},n.autoQueueBidSuggestions.policy),{enabledCampaignIds:[...n.autoQueueBidSuggestions.policy.enabledCampaignIds].sort()})},autoApproval:{enabled:n.autoApproval.enabled===!0,time:n.autoApproval.time,policy:x(C({},n.autoApproval.policy),{enabledCampaignIds:[...n.autoApproval.policy.enabledCampaignIds].sort()})},autoSend:{enabled:n.autoSend.enabled===!0,time:n.autoSend.time}}):""}function Y(n){return n==="auto_queue_bid_suggestions"?"Auto Queue Bid Suggestions":n==="auto_approval"?"Auto-Approval":"Auto Send to Amazon"}function ze(n){return{scheduled:"Scheduled",cancelling:"Cancelling...",cancelled:"Cancelled",running:"Running",succeeded:"Succeeded",partial_success:"Partial success",no_items:"No items",failed:"Failed",skipped:"Skipped",missed:"Missed"}[n]||n}function Ue(n){return{mode:n?.mode==="approve_all"?"approve_all":"conditional",maxCampaignBudget:K(n?.maxCampaignBudget,5),maxBidChange:K(n?.maxBidChange,.15),approvePositiveKeywords:n?.approvePositiveKeywords===!0,approveNegativeKeywords:n?.approveNegativeKeywords===!0,enabledCampaignIds:D(n?.enabledCampaignIds)}}function $e(n){return{mode:n?.mode==="approve_all"?"approve_all":"conditional",maxCampaignBudget:K(n?.maxCampaignBudget,5),maxBidChange:K(n?.maxBidC
1hange,.15),enabledCampaignIds:D(n?.enabledCampaignIds)}}function X(n){return!n||n.mode!=="approve_all"&&n.mode!=="conditional"||!q(n.maxCampaignBudget)||!q(n.maxBidChange)||n.approvePositiveKeywords!==!0&&n.approvePositiveKeywords!==!1||n.approveNegativeKeywords!==!0&&n.approveNegativeKeywords!==!1||!Array.isArray(n.enabledCampaignIds)||n.enabledCampaignIds.length>500?!1:n.enabledCampaignIds.every(t=>{let e=String(t||"").trim();return e.length>0&&e.length<=128&&!e.includes("/")})}function J(n){return!n||n.mode!=="approve_all"&&n.mode!=="conditional"||!q(n.maxCampaignBudget)||!q(n.maxBidChange)||!Array.isArray(n.enabledCampaignIds)||n.enabledCampaignIds.length>500?!1:n.enabledCampaignIds.every(t=>{let e=String(t||"").trim();return e.length>0&&e.length<=128&&!e.includes("/")})}function $(n,t,e){let l=new Set(D(n)),r=D(t);for(let u of r)e?l.add(u):l.delete(u);return D([...l])}function K(n,t){return q(n)?Math.round(Number(n)*100)/100:t}function j(n){let[t,e]=n.split(":").map(Number);return t*60+e}function Fe(n,t){let e=(j(n)+t+1440)%1440;return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(e%60).padStart(2,"0")}`}function q(n){let t=Number(n);return Number.isFinite(t)&&t>=.01&&t<=1e5}function D(n){return Array.isArray(n)?[...new Set(n.map(t=>String(t||"").trim()).filter(t=>t&&t.length<=128&&!t.includes("/")))].slice(0,500):[]}function Z(n,t){return{enabled:n?.enabled===!0,time:k(n?.time)?n.time:t,enabledByUid:R(n?.enabledByUid),nextRunAt:R(n?.nextRunAt),taskId:R(n?.taskId),scheduleError:R(n?.scheduleError)}}function Ge(n){let t=Number(n);return Number.isFinite(t)&&t>=0?Math.floor(t):0}function R(n){return String(n||"").trim()||null}var Ke=(n,t)=>t.value,Re=(n,t)=>t.campaignId,Be=(n,t)=>t.key,He=(n,t)=>t.runId;function Ze(n,t){if(n&1&&(o(0,"option",8),a(1),i()),n&2){let e=t.$implicit;_("value",e.value),d(),I(" ",e.accountName,"",e.countryCode?" ("+e.countryCode+")":""," ")}}function je(n,t){if(n&1&&(o(0,"div",12)(1,"mat-icon",3),a(2,"error"),i(),o(3,"span"),a(4),i()()),n&2){let e=s();d(4),m(e.error())}}function We(n,t){if(n&1&&(o(0,"div",13)(1,"mat-icon",3),a(2,"check_circle"),i(),o(3,"span"),a(4),i()()),n&2){let e=s();d(4),m(e.message())}}function Ye(n,t){n&1&&(o(0,"div",15)(1,"mat-icon",3),a(2,"hourglass_empty"),i(),a(3,"Loading canonical automation settings\u2026"),i())}function Xe(n,t){n&1&&(o(0,"div",16)(1,"mat-icon",3),a(2,"lock"),i(),o(3,"span"),a(4,"The server rollout switch is off. All three automations remain disabled until it is deliberately enabled."),i()())}function Je(n,t){if(n&1){let e=E();o(0,"section",17)(1,"div",58)(2,"div")(3,"span",22),a(4,"Recommended daily sequence"),i(),o(5,"h2",59),a(6,"Suggested settings for this account"),i(),o(7,"p"),a(8,"These are the earliest guarded times based on when this account's Bid Suggestions are expected to be ready."),i()(),o(9,"button",57),g("click",function(){f(e);let r=s(3);return A(r.useRecommendedSchedule())}),o(10,"mat-icon",3),a(11,"auto_fix_high"),i(),a(12),i()(),o(13,"div",60)(14,"div")(15,"span"),a(16,"1 ? Auto Queue"),i(),o(17,"strong"),a(18),i(),o(19,"small"),a(20,"15 minutes after Bid Suggestions are expected ready."),i(),o(21,"button",36),g("click",function(){f(e);let r=s(3);return A(r.useRecommendedActionTime("auto_queue_bid_suggestions"))}),a(22),i()(),o(23,"div")(24,"span"),a(25,"2 ? Auto-Approval"),i(),o(26,"strong"),a(27),i(),o(28,"small"),a(29,"30 minutes after Auto Queue to allow staging to finish."),i(),o(30,"button",36),g("click",function(){f(e);let r=s(3);return A(r.useRecommendedActionTime("auto_approval"))}),a(31),i()(),o(32,"div")(33,"span"),a(34,"3 ? Auto Send"),i(),o(35,"strong"),a(36),i(),o(37,"small"),a(38,"Overnight the following morning, after the prior day's approved work has settled. Separate accounts use bounded parallel workers; each account's batches remain sequential."),i(),o(39,"button",36),g("click",function(){f(e);let r=s(3);return A(r.useRecommendedActionTime("auto_send"))}),a(40),i()()(),o(41,"p",61),a(42," Applying recommendations changes draft times only. It never enables a switch, changes a policy or campaign, saves settings, or contacts Amazon. "),i()()}if(n&2){let e,l,r,u,c=t,S=s(),M=s(2);d(9),_("disabled",!((e=M.eligibility())!=null&&e.canManageSettings)||M.recommendedScheduleApplied()),d(3),P(" ",M.recommendedScheduleApplied()?"Recommended schedule applied":"Use recommended schedule"," "),d(6),m(M.formatAutomationTime(c.queueTime)),d(3),_("disabled",!((l=M.eligibility())!=null&&l.canManageSettings)||S.autoQueueBidSuggestions.time===c.queueTime),d(),P(" ",S.autoQueueBidSuggestions.time===c.queueTime?"Applied":"Use this time"," "),d(5),m(M.formatAutomationTime(c.approvalTime)),d(3),_("disabled",!((r=M.eligibility())!=null&&r.canManageSettings)||S.autoApproval.time===c.approvalTime),d(),P(" ",S.autoApproval.time===c.approvalTime?"Applied":"Use this time"," "),d(5),m(M.formatAutomationTime(c.sendTime)),d(3),_("disabled",!((u=M.eligibility())!=null&&u.canManageSettings)||S.autoSend.time===c.sendTime),d(),P(" ",S.autoSend.time===c.sendTime?"Applied":"Use this time"," ")}}function et(n,t){n&1&&(o(0,"span",29),a(1,"Preview needs refresh"),i())}function tt(n,t){if(n&1){let e=E();o(0,"div",34)(1,"label",62)(2,"span"),a(3,"Maximum campaign daily budget"),i(),o(4,"div")(5,"b"),a(6,"$"),i(),o(7,"input",63),g("ngModelChange",function(r){f(e);let u=s(3);return A(u.setQueueLimit("maxCampaignBudget",r))}),i()(),o(8,"small"),a(9,"Default $5.00. Missing budget evidence stays out of the queue."),i()(),o(10,"label",62)(11,"span"),a(12,"Maximum absolute bid change"),i(),o(13,"div")(14,"b"),a(15,"$"),i(),o(16,"input",63),g("ngModelChange",function(r){f(e);let u=s(3);return A(u.setQueueLimit("maxBidChange",r))}),i()(),o(17,"small"),a(18,"Default $0.15 (15 cents). Bid changes must pass both limits."),i()()()}if(n&2){let e,l,r=s(),u=s(2);d(7),_("ngModel",r.autoQueueBidSuggestions.policy.maxCampaignBudget)("disabled",!((e=u.eligibility())!=null&&e.canManageSettings)),d(9),_("ngModel",r.autoQueueBidSuggestions.policy.maxBidChange)("disabled",!((l=u.eligibility())!=null&&l.canManageSettings))}}function nt(n,t){if(n&1&&(o(0,"div",37),a(1),i()),n&2){let e=s(3);d(),m(e.queuePreviewError())}}function it(n,t){if(n&1&&(o(0,"small"),a(1),i()),n&2){let e=s(),l=s(3);
1d(),P("Prepared ",l.formatDateTime(e.cacheCalculatedAt))}}function ot(n,t){if(n&1&&(o(0,"small"),a(1),i()),n&2){let e=s();d(),I("This occurrence will process a bounded window of ",e.evaluatedItemCount," rows and leave ",e.deferredItemCount," deferred. It will not abort or loop.")}}function at(n,t){if(n&1){let e=E();o(0,"button",70),g("click",function(){let r=f(e).$implicit,u=s(5);return A(u.toggleQueueCampaign(r.campaignId))}),o(1,"span",71)(2,"strong"),a(3),i(),o(4,"small"),a(5),i()(),o(6,"span",72),O(7,"span",3),o(8,"b"),a(9),i()()()}if(n&2){let e,l=t.$implicit,r=s(5);w("automation-campaign-option--selected",r.isQueueCampaignEnabled(l.campaignId)),_("disabled",!((e=r.eligibility())!=null&&e.canManageSettings)),B("aria-pressed",r.isQueueCampaignEnabled(l.campaignId)),d(3),m(l.campaignName),d(2),G("",r.formatCurrency(l.campaignBudgetAmount)," / ",l.itemCount," prepared / ",l.eligibleItemCount," eligible"),d(),w("automation-switch--checked",r.isQueueCampaignEnabled(l.campaignId)),d(3),m(r.isQueueCampaignEnabled(l.campaignId)?"Auto":"Manual")}}function lt(n,t){if(n&1){let e=E();o(0,"div",66)(1,"span")(2,"strong"),a(3),i(),a(4," campaigns set to Auto"),i(),o(5,"div")(6,"button",67),g("click",function(){f(e);let r=s(),u=s(3);return A(u.setQueueCampaignsEnabled(r.campaigns,!0))}),a(7,"Select all"),i(),o(8,"button",67),g("click",function(){f(e);let r=s(),u=s(3);return A(u.setQueueCampaignsEnabled(r.campaigns,!1))}),a(9,"Clear all"),i()()(),o(10,"div",68),z(11,at,10,11,"button",69,Re),i()}if(n&2){let e,l,r=s(),u=s(3);d(3),I("",u.queueCampaignSelectionCount(r.campaigns)," of ",r.campaigns.length),d(3),_("disabled",!((e=u.eligibility())!=null&&e.canManageSettings)||u.queueCampaignSelectionCount(r.campaigns)===r.campaigns.length),d(2),_("disabled",!((l=u.eligibility())!=null&&l.canManageSettings)||u.queueCampaignSelectionCount(r.campaigns)===0),d(3),N(r.campaigns)}}function rt(n,t){n&1&&(o(0,"div",38),a(1,"No fresh prepared Bid Suggestions are available for this account."),i())}function dt(n,t){if(n&1&&(o(0,"span"),a(1),o(2,"b"),a(3),i()()),n&2){let e=t.$implicit,l=s(5);d(),P("",l.previewReasonLabel(e.key)," "),d(2),m(e.value)}}function ut(n,t){if(n&1&&(o(0,"div",65),z(1,dt,4,2,"span",null,Be),L(3,"keyvalue"),i()),n&2){let e=s();d(),N(V(3,0,e.reasonCounts))}}function st(n,t){if(n&1&&(o(0,"div",64)(1,"strong"),a(2),i(),o(3,"span"),a(4),i(),o(5,"small"),a(6),i(),v(7,it,2,1,"small"),v(8,ot,2,2,"small"),i(),v(9,lt,13,4)(10,rt,2,0,"div",38),v(11,ut,4,2,"div",65),L(12,"keyvalue")),n&2){let e=t;w("automation-preview-summary--warning",e.deferredItemCount>0||e.sourceStatus!=="ready"),d(2),P("",e.eligibleItemCount," eligible to queue"),d(2),I("",e.heldItemCount," held from ",e.evaluatedItemCount," evaluated Bid Suggestions"),d(2),m(e.sourceMessage),d(),h(e.cacheCalculatedAt?7:-1),d(),h(e.deferredItemCount>0?8:-1),d(),h(e.campaigns.length?9:10),d(2),h(V(12,10,e.reasonCounts).length?11:-1)}}function ct(n,t){n&1&&(o(0,"div",38),a(1,"Reading a bounded snapshot of the latest prepared Bid Suggestions..."),i())}function mt(n,t){if(n&1&&(o(0,"small"),a(1),i()),n&2){let e=s(),l=s(3);d(),P("Latest completed snapshot: ",l.formatDateTime(e.cacheCalculatedAt))}}function pt(n,t){if(n&1){let e=E();o(0,"div",78)(1,"span"),a(2),i(),o(3,"button",36),g("click",function(){f(e);let r=s(4);return A(r.useRecommendedQueueTime())}),a(4),i()()}if(n&2){let e,l=s(),r=s(),u=s(2);d(2),I(" Your current ",u.formatAutomationTime(r.autoQueueBidSuggestions.time)," Auto Queue can run before Bid Suggestions are ready. Choose ",u.formatAutomationTime(l.recommendedQueueTimeLocal)," or later. "),d(),_("disabled",!((e=u.eligibility())!=null&&e.canManageSettings)),d(),P(" Use ",u.formatAutomationTime(l.recommendedQueueTimeLocal)," ")}}function gt(n,t){if(n&1&&(o(0,"section",73)(1,"div",74)(2,"mat-icon",3),a(3,"schedule"),i(),o(4,"div")(5,"span",22),a(6,"Daily Bid Suggestions timing"),i(),o(7,"h3",75),a(8,"When should Auto Queue run?"),i()()(),o(9,"div",76)(10,"div")(11,"span"),a(12,"Build starts"),i(),o(13,"strong"),a(14),i()(),o(15,"div")(16,"span"),a(17,"Expected ready by"),i(),o(18,"strong"),a(19),i()(),o(20,"div",77)(21,"span"),a(22,"Recommended Auto Queue"),i(),o(23,"strong"),a(24),i()()(),o(25,"p"),a(26),i(),v(27,mt,2,1,"small"),v(28,pt,5,4,"div",78),i()),n&2){let e=t,l=s(3);w("automation-timing-card--warning",l.queueScheduleTooEarly()),d(14),m(l.formatAutomationTime(e.sourceBuildStartTimeLocal)),d(5),m(l.formatAutomationTime(e.sourceReadyTimeLocal)),d(5),m(l.formatAutomationTime(e.recommendedQueueTimeLocal)),d(2),I(" The build starts first and may continue until the ready-by time. The recommendation adds ",e.recommendationBufferMinutes," minutes of safety. Times use ",e.sourceTimeZone,". "),d(),h(e.cacheCalculatedAt?27:-1),d(),h(l.queueScheduleTooEarly()?28:-1)}}function _t(n,t){if(n&1&&(o(0,"div",43)(1,"mat-icon",3),a(2,"lock"),i(),a(3),i()),n&2){let e=s(3);d(3),m(e.actionLockReason("auto_queue_bid_suggestions"))}}function Ct(n,t){if(n&1&&(o(0,"div",44)(1,"mat-icon",3),a(2,"error"),i(),a(3),i()),n&2){let e=s();d(3),m(e.autoQueueBidSuggestions.scheduleError)}}function xt(n,t){n&1&&(o(0,"span",29),a(1,"Preview needs refresh"),i())}function ft(n,t){if(n&1){let e=E();o(0,"div",34)(1,"label",62)(2,"span"),a(3,"Maximum campaign daily budget"),i(),o(4,"div")(5,"b"),a(6,"$"),i(),o(7,"input",63),g("ngModelChange",function(r){f(e);let u=s(3);return A(u.setApprovalLimit("maxCampaignBudget",r))}),i()(),o(8,"small"),a(9,"Default $5.00. Missing budget evidence stays manual."),i()(),o(10,"label",62)(11,"span"),a(12,"Maximum absolute bid change"),i(),o(13,"div")(14,"b"),a(15,"$"),i(),o(16,"input",63),g("ngModelChange",function(r){f(e);let u=s(3);return A(u.setApprovalLimit("maxBidChange",r))}),i()(),o(17,"small"),a(18,"Default $0.15 (15 cents). Bid changes must pass both limits."),i()()(),o(19,"div",79)(20,"label")(21,"span")(22,"strong"),a(23,"Positive exact keywords"),i(),o(24,"small"),a(25,"Allow staged CREATE_EXACT_KEYWORD recommendations."),i()(),o(26,"span",23)(27,"input",24),g("change",function(r){f(e);let u=s(3);return A(u.setApprovalKeywordToggle("approvePositiveKeywords",r.target.checked))}),i(),O(28,"span",3),o(29,"b"),a(30),i()()(),o(31,"label")(32,"span")(33,"strong"),a(34,"Negative keywords"),i(),o(35,"small"),a(36,"Allow staged add/source-negative keyword recommendations."),i()(),o(37,"span",23)(38,"input",24),g("change",function(r){f(e);let u=s(3);return A(u.setApprovalKeywordToggle("approveNegativeKeywords",r.target.checked))}),i(),O(39,"span",3),o(40,"b"),a(41),i()()()(),o(42,"div",46)(43,"mat-icon",3),a(44,"link"),i(),o(45,"span"),a(46,"Paired isolation actions are approved only when every ready action in the pair matches. Removing negative keywords remains manual-only."),i()()}if(n&2){let e,l,r,u,c=s(),S=s(2);d(7),_("ngModel",c.autoApproval.policy.maxCampaignBudget)("disabled",!((e=S.eligibility())!=null&&e.canManageSettings)),d(9),_("ngModel",c.autoApproval.policy.maxBidChange)("disabled",!((l=S.eligibility())!=null&&l.canManageSettings)),d(11),_("checked",c.autoApproval.policy.approvePositiveKeywords)("disabled",!((r=S.eligibility())!=null&&r.canManageSettings)),d(3),m(c.autoApproval.policy.approvePositiveKeywords?"Yes":"No"),d(8),_("checked",c.autoApproval.policy.approveNegativeKeywords)("disabled",!((u=S.eligibility())!=null&&u.canManageSettings)),d(3),m(c.autoApproval.policy.approveNegativeKeywords?"Yes":"No")}}function At(n,t){if(n&1&&(o(0,"div",37),a(1),i()),n&2){let e=s(3);d(),m(e.approvalPreviewError())}}function bt(n,t){if(n&1&&(o(0,"small"),a(1),i()),n&2){let e=s();d(),P("This occurrence will process the bounded evaluated set and leave ",e.deferredItemCountExact?e.deferredItemCount+" deferred":e.deferredItemCount>0?"at least "+e.deferredItemCount+" deferred":"additional items deferred (count unknown)"," without retrying this occurrence.")}}function vt(n,t){if(n&1){let e=E();o(0,"button",70),g("click",function(){let r=f(e).$implicit,u=s(5);return A(u.toggleCampaign(r.campaignId))}),o(1,"span",71)(2,"strong"),a(3),i(),o(4,"small"),a(5),i()(),o(6,"span",72),O(7,"span",3),o(8,"b"),a(9),i()()()}if(n&2){let e,l=t.$implicit,r=s(5);w("automation-campaign-option--selected",r.isCampaignEnabled(l.campaignId)),_("disabled",!((e=r.eligibility())!=null&&e.canManageSettings)),B("aria-pressed",r.isCampaignEnabled(l.campaignId)),d(3),m(l.campaignName),d(2),G("",r.formatCurrency(l.campaignBudgetAmount)," / ",l.itemCount," ready / ",l.eligibleItemCount," eligible"),d(),w("automation-switch--checked",r.isCampaignEnabled(l.campaignId)),d(3),m(r.isCampaignEnabled(l.campaignId)?"Auto":"Manual")}}function ht(n,t){if(n&1){let e=E();o(0,"div",81)(1,"span")(2,"strong"),a(3),i(),a(4," campaigns set to Auto"),i(),o(5,"div")(6,"button",67),g("click",function(){f(e);let r=s(),u=s(3);return A(u.setCampaignsEnabled(r.campaigns,!0))}),a(7,"Select all"),i(),o(8,"button",67),g("click",function(){f(e);let r=s(),u=s(3);return A(u.setCampaignsEnabled(r.campaigns,!1))}),a(9,"Clear all"),i()()(),o(10,"div",68),z(11,vt,10,11,"button",69,Re),i()}if(n&2){let e,l,r=s(),u=s(3);d(3),I("",u.campaignSelectionCount(r.campaigns)," of ",r.campaigns.length),d(3),_("disabled",!((e=u.eligibility())!=null&&e.canManageSettings)||u.campaignSelectionCount(r.campaigns)===r.campaigns.length),d(2),_("disabled",!((l=u.eligibility())!=null&&l.canManageSettings)||u.campaignSelectionCount(r.campaigns)===0),d(3),N(r.campaigns)}}function yt(n,t){n&1&&(o(0,"div",38),a(1,"No supported ready items are staged for this local day."),i())}function Pt(n,t){if(n&1&&(o(0,"span"),a(1),o(2,"b"),a(3),i()()),n&2){let e=t.$implicit,l=s(5);d(),P("",l.previewReasonLabel(e.key)," "),d(2),m(e.value)}}function St(n,t){if(n&1&&(o(0,"div",80),z(1,Pt,4,2,"span",null,Be),L(3,"keyvalue"),i()),n&2){let e=s();d(),N(V(3,0,e.reasonCounts))}}function Mt(n,t){if(n&1&&(o(0,"div",64)(1,"strong"),a(2),i(),o(3,"span"),a(4),i(),v(5,bt,2,1,"small"),i(),v(6,ht,13,4)(7,yt,2,0,"div",38),v(8,St,4,2,"div",80),L(9,"keyvalue")),n&2){let e=t;w("automation-preview-summary--warning",e.deferredItemCount>0||e.deferredItemCountExact===!1),d(2),P("",e.eligibleItemCount," eligible"),d(2),I("",e.heldItemCount," held from ",e.evaluatedItemCount," evaluated ready items"),d(),h(e.deferredItemCount>0||e.deferredItemCountExact===!1?5:-1),d(),h(e.campaigns.length?6:7),d(2),h(V(9,8,e.reasonCounts).length?8:-1)}}function wt(n,t){n&1&&(o(0,"div",38),a(1,"Reading a bounded snapshot of today's staged queue..."),i())}function Et(n,t){if(n&1&&(o(0,"div",43)(1,"mat-icon",3),a(2,"lock"),i(),a(3),i()),n&2){let e=s(3);d(3),m(e.actionLockReason("auto_approval"))}}function Ot(n,t){if(n&1&&(o(0,"div",44)(1,"mat-icon",3),a(2,"error"),i(),a(3),i()),n&2){let e=s();d(3),m(e.autoApproval.scheduleError)}}function It(n,t){if(n&1&&(o(0,"div",43)(1,"mat-icon",3),a(2,"lock"),i(),a(3),i()),n&2){let e=s(3);d(3),m(e.actionLockReason("auto_send"))}}function Tt(n,t){if(n&1&&(o(0,"div",44)(1,"mat-icon",3),a(2,"error"),i(),a(3),i()),n&2){let e=s();d(3),m(e.autoSend.scheduleError)}}function kt(n,t){if(n&1){let e=E();v(0,Xe,5,0,"div",16),v(1,Je,43,11,"section",17),o(2,"div",18)(3,"article",19)(4,"div",20)(5,"div",21)(6,"mat-icon",3),a(7,"playlist_add"),i()(),o(8,"div")(9,"span",22),a(10,"Prepared Bid Suggestions"),i(),o(11,"h2"),a(12,"Auto Queue Bid Suggestions"),i()(),o(13,"label",23)(14,"input",24),g("change",function(r){f(e);let u=s(2);return A(u.setActionEnabled("auto_queue_bid_suggestions",r.target.checked))}),i(),O(15,"span",3),o(16,"b"),a(17),i()()(),o(18,"p"),a(19,"Reads the latest complete Bid Suggestions snapshot and stages matching bid changes into the internal API Queue for review or later Auto-Approval."),i(),o(20,"div",25)(21,"mat-icon",3),a(22,"shield"),i(),o(23,"span"),a(24,"This step never approves queue items or contacts Amazon. Each occurrence evaluates a boun
1ded window of prepared rows and defers anything outside that window to future occurrences. Stale or incomplete snapshots stop without staging."),i()(),o(25,"section",26)(26,"div",27)(27,"div")(28,"span",22),a(29,"Queue policy"),i(),o(30,"h3",28),a(31,"Which Bid Suggestions may enter the API Queue?"),i()(),v(32,et,2,0,"span",29),i(),o(33,"p",30),a(34,"The policy mirrors Auto-Approval, but applies only to prepared bid changes before they enter the API Queue."),i(),o(35,"div",31)(36,"label")(37,"input",32),g("change",function(){f(e);let r=s(2);return A(r.setQueueMode("conditional"))}),i(),o(38,"span")(39,"strong"),a(40,"Conditional"),i(),o(41,"small"),a(42,"Apply budget, bid-change, and campaign rules."),i()()(),o(43,"label")(44,"input",33),g("change",function(){f(e);let r=s(2);return A(r.setQueueMode("approve_all"))}),i(),o(45,"span")(46,"strong"),a(47,"Approve all for queueing"),i(),o(48,"small"),a(49,"Queue high-risk rows for review; critical, invalid, inactive, and out-of-scope rows stay held."),i()()()(),v(50,tt,19,4,"div",34),o(51,"div",35)(52,"div")(53,"strong"),a(54,"Campaign controls"),i(),o(55,"small"),a(56,"Every campaign starts Manual. Turn Auto on only for campaigns allowed to stage Bid Suggestions."),i()(),o(57,"button",36),g("click",function(){f(e);let r=s(2);return A(r.loadQueuePreview())}),o(58,"mat-icon",3),a(59,"refresh"),i(),a(60),i()(),v(61,nt,2,1,"div",37)(62,st,13,12)(63,ct,2,0,"div",38),i(),v(64,gt,29,9,"section",39),o(65,"label",40)(66,"span"),a(67,"Queue time"),i(),o(68,"input",41),g("ngModelChange",function(r){f(e);let u=s(2);return A(u.setActionTime("auto_queue_bid_suggestions",r))}),i(),o(69,"small"),a(70),i()(),o(71,"div",42)(72,"span"),a(73,"Next scheduled"),i(),o(74,"strong"),a(75),i()(),v(76,_t,4,1,"div",43),v(77,Ct,4,1,"div",44),i(),o(78,"article",45)(79,"div",20)(80,"div",21)(81,"mat-icon",3),a(82,"task_alt"),i()(),o(83,"div")(84,"span",22),a(85,"Daily queue workflow"),i(),o(86,"h2"),a(87,"Auto-Approval"),i()(),o(88,"label",23)(89,"input",24),g("change",function(r){f(e);let u=s(2);return A(u.setActionEnabled("auto_approval",r.target.checked))}),i(),O(90,"span",3),o(91,"b"),a(92),i()()(),o(93,"p"),a(94,"Approves supported ready Bid Suggestion and keyword rows already staged in the API Queue. Blocked and note-required rows stay untouched."),i(),o(95,"div",46)(96,"mat-icon",3),a(97,"info"),i(),o(98,"span"),a(99,"Nothing is auto-staged. High-risk, inactive, incomplete paired actions, and rows missing required evidence always stay in manual review."),i()(),o(100,"section",47)(101,"div",27)(102,"div")(103,"span",22),a(104,"Approval policy"),i(),o(105,"h3",48),a(106,"What may be auto-approved?"),i()(),v(107,xt,2,0,"span",29),i(),o(108,"p",30),a(109,"Bid changes, positive exact keywords, and add-negative keyword actions are supported. All other queue actions stay manual."),i(),o(110,"div",49)(111,"label")(112,"input",50),g("change",function(){f(e);let r=s(2);return A(r.setApprovalMode("conditional"))}),i(),o(113,"span")(114,"strong"),a(115,"Conditional approval"),i(),o(116,"small"),a(117,"Apply budget, bid-change, keyword, and campaign rules."),i()()(),o(118,"label")(119,"input",51),g("change",function(){f(e);let r=s(2);return A(r.setApprovalMode("approve_all"))}),i(),o(120,"span")(121,"strong"),a(122,"Approve all supported"),i(),o(123,"small"),a(124,"Ignore numeric and keyword rules, but keep explicit campaign scope and safety holds."),i()()()(),v(125,ft,47,10),o(126,"div",35)(127,"div")(128,"strong"),a(129,"Campaign controls"),i(),o(130,"small"),a(131,"Every campaign starts Manual. Turn Auto on only for campaigns you explicitly approve."),i()(),o(132,"button",36),g("click",function(){f(e);let r=s(2);return A(r.loadApprovalPreview())}),o(133,"mat-icon",3),a(134,"refresh"),i(),a(135),i()(),v(136,At,2,1,"div",37)(137,Mt,10,10)(138,wt,2,0,"div",38),i(),o(139,"label",40)(140,"span"),a(141,"Approval time"),i(),o(142,"input",41),g("ngModelChange",function(r){f(e);let u=s(2);return A(u.setActionTime("auto_approval",r))}),i(),o(143,"small"),a(144),i()(),o(145,"div",42)(146,"span"),a(147,"Next scheduled"),i(),o(148,"strong"),a(149),i()(),v(150,Et,4,1,"div",43),v(151,Ot,4,1,"div",44),i(),o(152,"article",52)(153,"div",20)(154,"div",21)(155,"mat-icon",3),a(156,"send"),i()(),o(157,"div")(158,"span",22),a(159,"Amazon write"),i(),o(160,"h2"),a(161,"Auto Send to Amazon"),i()(),o(162,"label",23)(163,"input",24),g("change",function(r){f(e);let u=s(2);return A(u.setActionEnabled("auto_send",r.target.checked))}),i(),O(164,"span",3),o(165,"b"),a(166),i()()(),o(167,"p"),a(168,"Processes a rotating bounded page of Approved to Send items in guarded batches of 20. Rows rejected at preflight remain unchanged and are reconsidered only after the cursor completes a full pass."),i(),o(169,"div",53)(170,"mat-icon",3),a(171,"report"),i(),o(172,"span"),a(173,"Stops at the first failed or unknown batch. Errors are logged and that scheduled occurrence is never rerun."),i()(),o(174,"label",40)(175,"span"),a(176,"Send time"),i(),o(177,"input",41),g("ngModelChange",function(r){f(e);let u=s(2);return A(u.setActionTime("auto_send",r))}),i(),o(178,"small"),a(179),i()(),o(180,"div",42)(181,"span"),a(182,"Next scheduled"),i(),o(183,"strong"),a(184),i()(),v(185,It,4,1,"div",43),v(186,Tt,4,1,"div",44),i()(),o(187,"footer",54)(188,"div")(189,"
1strong"),a(190),i(),o(191,"span"),a(192),i()(),o(193,"div",55)(194,"button",36),g("click",function(){f(e);let r=s(2);return A(r.discardChanges())}),a(195,"Discard"),i(),o(196,"button",56),g("click",function(){f(e);let r=s(2);return A(r.pauseAllAutomation())}),o(197,"mat-icon",3),a(198,"pause_circle"),i(),a(199,"Pause all "),i(),o(200,"button",57),g("click",function(){f(e);let r=s(2);return A(r.save())}),o(201,"mat-icon",3),a(202,"save"),i(),a(203),i()()()}if(n&2){let e,l,r,u,c,S,M,Q,ee,te,ne,ie,oe,ae,le,re,de,ue,b=t,p=s(2);h((e=p.eligibility())!=null&&e.serverAutomationEnabled?-1:0),d(),h((l=p.scheduleRecommendation())?1:-1,l),d(13),_("checked",b.autoQueueBidSuggestions.enabled)("disabled",!p.canChangeAction("auto_queue_bid_suggestions",!b.autoQueueBidSuggestions.enabled)),d(3),m(b.autoQueueBidSuggestions.enabled?"Yes":"No"),d(15),h(p.queuePreviewStale()?32:-1),d(4),w("active",b.autoQueueBidSuggestions.policy.mode==="conditional"),d(),_("checked",b.autoQueueBidSuggestions.policy.mode==="conditional")("disabled",!((r=p.eligibility())!=null&&r.canManageSettings)),d(6),w("active",b.autoQueueBidSuggestions.policy.mode==="approve_all"),d(),_("checked",b.autoQueueBidSuggestions.policy.mode==="approve_all")("disabled",!((u=p.eligibility())!=null&&u.canManageSettings)),d(6),h(b.autoQueueBidSuggestions.policy.mode==="conditional"?50:-1),d(7),_("disabled",p.queuePreviewLoading()||!((c=p.eligibility())!=null&&c.canManageSettings)),d(3),P("",p.queuePreviewLoading()?"Loading...":"Refresh preview"," "),d(),h(p.queuePreviewError()?61:(S=p.queuePreview())?62:p.queuePreviewLoading()?63:-1,S),d(3),h((M=p.queuePreview())?64:-1,M),d(4),_("ngModel",b.autoQueueBidSuggestions.time)("disabled",!((Q=p.eligibility())!=null&&Q.canManageSettings)),d(2),m(b.timezone),d(5),m(b.autoQueueBidSuggestions.enabled?p.formatDateTime(b.autoQueueBidSuggestions.nextRunAt):"Off"),d(),h(!((ee=p.eligibility())!=null&&ee.canEnableAutoQueue)&&p.actionLockReason("auto_queue_bid_suggestions")?76:-1),d(),h(b.autoQueueBidSuggestions.scheduleError?77:-1),d(12),_("checked",b.autoApproval.enabled)("disabled",!p.canChangeAction("auto_approval",!b.autoApproval.enabled)),d(3),m(b.autoApproval.enabled?"Yes":"No"),d(15),h(p.approvalPreviewStale()?107:-1),d(4),w("active",b.autoApproval.policy.mode==="conditional"),d(),_("checked",b.autoApproval.policy.mode==="conditional")("disabled",!((te=p.eligibility())!=null&&te.canManageSettings)),d(6),w("active",b.autoApproval.policy.mode==="approve_all"),d(),_("checked",b.autoApproval.policy.mode==="approve_all")("disabled",!((ne=p.eligibility())!=null&&ne.canManageSettings)),d(6),h(b.autoApproval.policy.mode==="conditional"?125:-1),d(7),_("disabled",p.approvalPreviewLoading()||!((ie=p.eligibility())!=null&&ie.canManageSettings)),d(3),P("",p.approvalPreviewLoading()?"Loading...":"Refresh preview"," "),d(),h(p.approvalPreviewError()?136:(oe=p.approvalPreview())?137:p.approvalPreviewLoading()?138:-1,oe),d(6),_("ngModel",b.autoApproval.time)("disabled",!((ae=p.eligibility())!=null&&ae.canManageSettings)),d(2),m(b.timezone),d(5),m(b.autoApproval.enabled?p.formatDateTime(b.autoApproval.nextRunAt):"Off"),d(),h(!((le=p.eligibility())!=null&&le.canEnableAutoApproval)&&p.actionLockReason("auto_approval")?150:-1),d(),h(b.autoApproval.scheduleError?151:-1),d(12),_("checked",b.autoSend.enabled)("disabled",!p.canChangeAction("auto_send",!b.autoSend.enabled)),d(3),m(b.autoSend.enabled?"Yes":"No"),d(11),_("ngModel",b.autoSend.time)("disabled",!((re=p.eligibility())!=null&&re.canManageSettings)),d(2),m(b.timezone),d(5),m(b.autoSend.enabled?p.formatDateTime(b.autoSend.nextRunAt):"Off"),d(),h(!((de=p.eligibility())!=null&&de.canEnableAutoSend)&&p.actionLockReason("auto_send")?185:-1),d(),h(b.autoSend.scheduleError?186:-1),d(4),m(p.hasUnsavedChanges()?"Unsaved Automation changes":"Independent controls"),d(2),m(p.hasUnsavedChanges()?"Save or discard these changes before switching accounts.":"Each stage c
1an be enabled independently. Enabled stages are scheduled in dated Queue, Approval, then Send order."),d(2),_("disabled",!p.hasUnsavedChanges()||p.saving()),d(2),_("disabled",!p.hasEnabledAutomation()||!((ue=p.eligibility())!=null&&ue.canManageSettings)||p.saving()),d(4),_("disabled",!p.canSave()),d(3),P(" ",p.saving()?"Saving\u2026":"Save Automation Settings"," ")}}function zt(n,t){n&1&&(o(0,"div",15)(1,"mat-icon",3),a(2,"link_off"),i(),a(3,"Select a connected account to configure automation."),i())}function Nt(n,t){if(n&1&&(o(0,"div",14),v(1,Ye,4,0,"div",15)(2,kt,204,62)(3,zt,4,0,"div",15),i()),n&2){let e,l=s();d(),h(l.loading()?1:(e=l.draft())?2:3,e)}}function Rt(n,t){n&1&&(o(0,"div",15)(1,"mat-icon",3),a(2,"hourglass_empty"),i(),a(3,"Loading run history\u2026"),i())}function Bt(n,t){if(n&1&&(o(0,"small",88),a(1),i()),n&2){let e=s().$implicit;d(),m(e.error)}}function Qt(n,t){if(n&1&&(o(0,"small",88),a(1),i()),n&2){let e=s().$implicit;d(),P("Stopped by safety circuit: ",e.circuitBreakerReason)}}function Lt(n,t){if(n&1){let e=E();o(0,"button",92),g("click",function(){f(e);let r=s().$implicit,u=s(3);return A(u.cancelRun(r))}),o(1,"mat-icon",3),a(2,"event_busy"),i(),a(3),i()}if(n&2){let e=s().$implicit,l=s(3);_("disabled",l.cancellingRunId()!=null),d(3),P(" ",l.cancellingRunId()===e.runId?"Skipping...":e.status==="cancelling"?"Finish skip":"Skip occurrence"," ")}}function Vt(n,t){n&1&&(o(0,"span",91),a(1,"Not available"),i())}function Dt(n,t){if(n&1&&(o(0,"tr")(1,"td")(2,"strong"),a(3),i(),o(4,"small"),a(5),i()(),o(6,"td"),a(7),i(),o(8,"td")(9,"span",86),a(10),i()(),o(11,"td"),a(12),i(),o(13,"td",87)(14,"span"),a(15),i(),v(16,Bt,2,1,"small",88),v(17,Qt,2,1,"small",88),i(),o(18,"td",89),v(19,Lt,4,2,"button",90)(20,Vt,2,0,"span",91),i()()),n&2){let e,l=t.$implicit,r=s(3);d(3),m(r.formatDateTime(l.scheduledFor)),d(2),m(((e=r.draft())==null?null:e.timezone)||((e=r.selectedAccount())==null?null:e.timezone)||"UTC"),d(2),m(r.actionLabel(l.action)),d(2),B("data-status",l.status),d(),m(r.statusLabel(l)),d(2),m(r.runCounts(l)),d(3),m(l.summary||"No details recorded."),d(),h(l.error?16:-1),d(),h(l.circuitBreakerReason?17:-1),d(2),h(r.canCancelRun(l)?19:20)}}function qt(n,t){if(n&1){let e=E();o(0,"button",93),g("click",function(){f(e);let r=s(3);return A(r.loadRuns(!1))}),a(1),i()}if(n&2){let e=s(3);_("disabled",e.runsLoading()),d(),P(" ",e.runsLoading()?"Loading\u2026":"Load more runs"," ")}}function Ut(n,t){if(n&1&&(o(0,"div",83)(1,"table",84)(2,"thead")(3,"tr")(4,"th"),a(5,"Scheduled"),i(),o(6,"th"),a(7,"Automation"),i(),o(8,"th"),a(9,"Status"),i(),o(10,"th"),a(11,"Results"),i(),o(12,"th"),a(13,"Details"),i(),o(14,"th"),a(15,"Actions"),i()()(),o(16,"tbody"),z(17,Dt,21,10,"tr",null,He),i()()(),v(19,qt,2,2,"button",85)),n&2){let e=s(2);d(17),N(e.runs()),d(2),h(e.runsHasMore()?19:-1)}}function $t(n,t){n&1&&(o(0,"div",15)(1,"mat-icon",3),a(2,"event_note"),i(),o(3,"strong"),a(4,"No automation runs yet"),i(),o(5,"span"),a(6,"Runs appear here only after an action is explicitly enabled and scheduled."),i()())}function Ft(n,t){if(n&1){let e=E();o(0,"div",14)(1,"div",82)(2,"div")(3,"span",22),a(4,"Read-only history"),i(),o(5,"h2"),a(6,"Automation Run Monitor"),i(),o(7,"p"),a(8,"Review scheduled and completed occurrences. A future occurrence can be skipped without disabling its daily automation or contacting Amazon."),i()(),o(9,"button",36),g("click",function(){f(e);let r=s();return A(r.refreshRuns())}),o(10,"mat-icon",3),a(11,"refresh"),i(),a(12),i()(),v(13,Rt,4,0,"div",15)(14,Ut,20,1)(15,$t,7,0,"div",15),i()}if(n&2){let e=s();d(9),_("disabled",e.runsLoading()),d(3),P(" ",e.runsLoading()?"Refreshing\u2026":"Refresh"," "),d(),h(!e.runsLoaded()&&e.runsLoading()?13:e.runs().length?14:15)}}var Ne=class n{api=F(we);orgService=F(ge);accountContext=F(Ee);activeTab=y("settings");loading=y(!1);saving=y(!1);runsLoading=y(!1);cancellingRunId=y(null);error=y(null);message=y(null);settings=y(null);draft=y(null);eligibility=y(null);runs=y([]);runsLoaded=y(!1);runsHasMore=y(!1);runsCursor=y(null);queuePreview=y(null);queuePreviewLoading=y(!1);queuePreviewError=y(null);queuePreviewStale=y(!1);approvalPreview=y(null);approvalPreviewLoading=y(!1);approvalPreviewError=y(null);approvalPreviewStale=y(!1);selectedAccount=T(()=>this.accountContext.selected());scheduleRecommendation=T(()=>Te(this.queuePreview()?.recommendedQueueTimeLocal));recommendedScheduleApplied=T(()=>{let t=this.draft(),e=this.scheduleRecommendation();return t!=null&&e!=null&&t.autoQueueBidSuggestions.time===e.queueTime&&t.autoApproval.time===e.approvalTime&&t.autoSend.time===e.sendTime});queueScheduleTooEarly=T(()=>{let t=this.draft(),e=this.queuePreview();return t?.autoQueueBidSuggestions.enabled===!0&&Ie(t.autoQueueBidSuggestions.time,e?.recommendedQueueTimeLocal)});hasUnsavedChanges=T(()=>W(this.draft())!==W(this.settings()));hasEnabledAutomation=T(()=>{let t=this.draft();return t?.autoQueueBidSuggestions.enabled===!0||t?.autoApproval.enabled===!0||t?.autoSend.enabled===!0});canSave=T(()=>ke(this.draft(),this.eligibility())&&!this.queueScheduleTooEarly()&&(this.hasUnsavedChanges()||this.draft()?.scheduleState==="partial")&&!this.loading()&&!this.saving());selectedAccountStatus=T(()=>{let t=this.selectedAccount();return t?t.accessMode==="update"?"Update mode":"Read only":"No account selected"});orgId="";selectedAccountKey="";initialized=!1;loadToken=0;runLoadToken=0;queuePreviewLoadToken=0;previewLoadToken=0;orgSubscription;accountEffect=se(()=>{let t=this.accountContext.selected(),e=t?`${t.connectionId}::${t.profileId}`:"";!this.initialized||e===this.selectedAccountKey||(this.selectedAccountKey=e,this.resetQueuePreview(),this.resetApprovalPreview(),this.resetRuns(),this.loadSettings(),this.activeTab()==="monitor"&&this.loadRuns(!0))});async ngOnInit(){this.orgSubscription=this.orgService.currentOrgId$.subscribe(e=>{let l=String(e||"");l!==this.orgId&&(this.orgId=l,this.resetRuns(),this.resetQueuePreview(),this.resetApprovalPreview(),this.initialized&&(this.loadSettings(),this.activeTab()==="monitor"&&this.loadRuns(!0)))}),await this.accountContext.refresh();let t=this.accountContext.selected();this.selectedAccountKey=t?`${t.connectionId}::${t.profileId}`:"",this.initialized=!0,await this.loadSettings()}ngOnDestroy(){this.loadToken+=1,this.runLoadToken+=1,this.queuePreviewLoadToken+=1,this.previewLoadToken+=1,this.orgSubscription?.unsubscribe(),this.accountEffect.destroy()}selectAccount(t){this.hasUnsavedChanges()&&!window.confirm("Discard unsaved Automation changes and switch accounts?")||this.accountContext.selectByValue(t)}async refreshAccounts(){await this.accountContext.refresh(!0)}async loadSettings(){let t=++this.loadToken,e=this.selectedAccount();if(!this.orgId||!e){this.settings.set(null),this.draft.set(null),this.eligibility.set(null),this.resetQueuePreview(),this.resetApprovalPreview(),this.error.set(this.orgId?"Select a connected Amazon Ads account.":null),this.loading.set(!1);return}let l=e.value;this.loading.set(!0),this.error.set(null),this.message.set(null);try{let r=await this.api.getAmazonAdsAutomationSettings({orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId});if(t!==this.loadToken||this.accountContext.selectedValue()!==l)return;let u=H(r.settings,{orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,accountName:r.settings?.accountName||e.accountName,timezone:r.settings?.timezone||e.timezone||"UTC"});this.settings.set(u),this.draft.set(U(u)),this.eligibility.set(r.eligibility),this.loadQueuePreview(),this.loadApprovalPreview()}catch(r){if(t!==this.loadToken)return;this.settings.set(null),this.draft.set(null),this.eligibility.set(null),this.resetQueuePreview(),this.resetApprovalPreview(),this.error.set(r?.message||"Automation settings could not be loaded.")}finally{t===this.loadToken&&this.loading.set(!1)}}setTab(t){this.activeTab.set(t),this.error.set(null),this.message.set(null),t==="monitor"&&!this.runsLoaded()&&this.loadRuns(!0)}setActionEnabled(t,e){let l=this.draft();if(!l||!this.canChangeAction(t,e))return;let r=t==="auto_queue_bid_suggestions"?"autoQueueBidSuggestions":t==="auto_approval"?"autoApproval":"autoSend";this.draft.set(x(C({},l),{[r]:x(C({},l[r]),{enabled:e===!0})})),this.message.set(null)}setActionTime(t,e){let l=this.draft();if(!l||!this.eligibility()?.canManageSettings)return;let r=t==="auto_queue_bid_suggestions"?"autoQueueBidSuggestions":t==="auto_approval"?"autoApproval":"autoSend";this.draft.set(x(C({},l),{[r]:x(C({},l[r]),{time:e})})),this.message.set(null)}useRecommendedActionTime(t){let e=this.scheduleRecommendation();if(!e)return;let l=t==="auto_queue_bid_suggestions"?e.queueTime:t==="auto_approval"?e.approvalTime:e.sendTime;this.setActionTime(t,l)}useRecommendedQueueTime(){this.useRecommendedActionTime("auto_queue_bid_suggestions")}useRecommendedSchedule(){let t=this.draft(),e=this.scheduleRecommendation();!t||!e||!this.eligibility()?.canManageSettings||(this.draft.set(x(C({},t),{autoQueueBidSuggestions:x(C({},t.autoQueueBidSuggestions),{time:e.queueTime}),autoApproval:x(C({},t.autoApproval),{time:e.approvalTime}),autoSend:x(C({},t.autoSend),{time:e.sendTime})})),this.message.set(null))}formatAutomationTime(t){if(!k(t))return"Unavailable";let[e,l]=t.split(":").map(Number),r=e>=12?"PM":"AM";return`${e%12||12}:${String(l).padStart(2,"0")} ${r}`}setApprovalMode(t){this.updateApprovalPolicy(e=>x(C({},e),{mode:t}))}setQueueMode(t){this.updateQueuePolicy(e=>x(C({},e),{mode:t}))}setQueueLimit(t,e){this.updateQueuePolicy(l=>x(C({},l),{[t]:Number(e)}))}setQueueCampaignEnabled(t,e){let l=String(t||"").trim();l&&this.updateQueuePolicy(r=>x(C({},r),{enabledCampaignIds:$(r.enabledCampaignIds,[l],e)}))}isQueueCampaignEnabled(t){return this.draft()?.autoQueueBidSuggestions.policy.enabledCampaignIds.includes(t)===!0}toggleQueueCampaign(t){this.setQueueCampaignEnabled(t,!this.isQueueCampaignEnabled(t))}setQueueCampaignsEnabled(t,e){let l=t.map(r=>r.campaignId);this.updateQueuePolicy(r=>x(C({},r),{enabledCampaignIds:e?$(r.enabledCampaignIds,l,!0):[]}))}queueCampaignSelectionCount(t){let e=new Set(this.draft()?.autoQueueBidSuggestions.policy.enabledCampaignIds||[]);return new Set(t.map(l=>l.campaignId).filter(l=>e.has(l))).size}async loadQueuePreview(){let t=this.selectedAccount(),e=this.draft();if(!t||!e||!this.orgId||!J(e.autoQueueBidSuggestions.policy))return;let l=++this.queuePreviewLoadToken,r=t.value;this.queuePreviewLoading.set(!0),this.queuePreviewError.set(null);try{let u=await this.api.getAmazonAdsAutomationQueuePreview({orgId:this.orgId,connectionId:t.connectionId,profileId:t.profileId,policy:x(C({},e.autoQueueBidSuggestions.policy),{enabledCampaignIds:[...e.autoQueueBidSuggestions.policy.enabledCampaignIds]})});if(l!==this.queuePreviewLoadToken||this.accountContext.selectedValue()!==r)return;this.queuePreview.set(u),this.queuePreviewStale.set(!1)}catch(u){l===this.queuePreviewLoadToken&&this.queuePreviewError.set(u?.message||"Bid Suggestion queue preview could not be loaded.")}finally{l===this.queuePreviewLoadToken&&this.queuePreviewLoading.set(!1)}}setApprovalLimit(t,e){this.updateApprovalPolicy(l=>x(C({},l),{[t]:Number(e)}))}setApprovalKeywordToggle(t,e){this.updateApprovalPolicy(l=>x(C({},l),{[t]:e===!0}))}setCampaignEnabled(t,e){let l=String(t||"").trim();l&&this.updateApprovalPolicy(r=>x(C({},r),{enabledCampaignIds:$(r.enabledCampaignIds,[l],e)}))}isCampaignEnabled(t){return this.draft()?.autoApproval.policy.enabledCampaignIds.includes(t)===!0}toggleCampaign(t){this.setCampaignEnabled(t,!this.isCampaignEnabled(t))}setCampaignsEnabled(t,e){let l=t.map(r=>r.campaignId);this.updateApprovalPolicy(r=>x(C({},r),{enabledCampaignIds:e?$(r.enabledCampaignIds,l,!0):[]}))}campaignSelectionCount(t){let e=new Set(this.draft()?.autoApproval.policy.enabledCampaignIds||[]);return new Set(t.map(l=>l.campaignId).filter(l=>e.has(l))).size}async loadApprovalPreview(){let t=this.selectedAccount(),e=this.draft();if(!t||!e||!this.orgId||!X(e.autoApproval.policy))return;let l=++this.previewLoadToken,r=t.value;this.approvalPreviewLoading.set(!0),this.approvalPreviewError.set(null);try{let u=await this.api.getAmazonAdsAutomationApprovalPreview({orgId:this.orgId,connectionId:t.connectionId,profileId:t.profileId,policy:x(C({},e.autoApproval.policy),{enabledCampaignIds:[...e.autoApproval.policy.enabledCampaignIds]})});if(l!==this.previewLoadToken||this.accountContext.selectedValue()!==r)return;this.approvalPreview.set(u),this.approvalPreviewStale.set(!1)}catch(u){l===this.previewLoadToken&&this.approvalPreviewError.set(u?.message||"Approval preview could not be loaded.")}finally{l===this.previewLoadToken&&this.approvalPreviewLoading.set(!1)}}canChangeAction(t,e){let l=this.eligibility();return l?.canManageSettings?e?t==="auto_queue_bid_suggestions"?l.canEnableAutoQueue:t==="auto_approval"?l.canEnableAutoApproval:l.canEnableAutoSend:!0:!1}actionLockReason(t){let e=this.eligibility();return e?t==="auto_queue_bid_suggestions"?e.autoQueueReason||e.reason:t==="auto_
1send"&&e.autoSendReason||e.reason:null}async save(){let t=this.draft(),e=this.selectedAccount();if(!t||!e||!this.orgId||!this.canSave())return;let l=this.loadToken,r=e.value;this.saving.set(!0),this.error.set(null),this.message.set(null);try{let u=await this.api.saveAmazonAdsAutomationSettings({orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,expectedScheduleRevision:t.scheduleRevision,settings:{autoQueueBidSuggestions:{enabled:t.autoQueueBidSuggestions.enabled,time:t.autoQueueBidSuggestions.time,policy:x(C({},t.autoQueueBidSuggestions.policy),{enabledCampaignIds:[...t.autoQueueBidSuggestions.policy.enabledCampaignIds]})},autoApproval:{enabled:t.autoApproval.enabled,time:t.autoApproval.time,policy:x(C({},t.autoApproval.policy),{enabledCampaignIds:[...t.autoApproval.policy.enabledCampaignIds]})},autoSend:{enabled:t.autoSend.enabled,time:t.autoSend.time}}});if(l!==this.loadToken||this.accountContext.selectedValue()!==r)return;let c=H(u.settings,{orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,accountName:u.settings.accountName||e.accountName,timezone:u.settings.timezone||e.timezone||"UTC"});if(this.settings.set(c),this.draft.set(U(c)),this.eligibility.set(u.eligibility),c.scheduleState==="partial"){let S=Object.entries(u.scheduleResults||{}).filter(([,M])=>!!M?.error).map(([M])=>Y(M));this.error.set(`Automation settings were saved, but ${S.length?S.join(", "):"one or more enabled actions"} could not be scheduled. No Amazon call was made. Review the schedule errors below and retry Save.`)}else this.message.set(u.noOp?"Automation settings were already saved and the schedule is healthy.":"Automation settings saved and every enabled action was scheduled. No Amazon call was made by this save.");this.resetRuns(),this.loadQueuePreview(),this.loadApprovalPreview()}catch(u){l===this.loadToken&&this.accountContext.selectedValue()===r&&this.error.set(u?.message||"Automation settings could not be saved.")}finally{this.saving.set(!1)}}discardChanges(){let t=this.settings();!t||this.saving()||(this.draft.set(U(t)),this.error.set(null),this.message.set("Unsaved Automation changes discarded."))}async pauseAllAutomation(){let t=this.draft(),e=this.selectedAccount();if(!t||!e||!this.orgId||!this.eligibility()?.canManageSettings||this.saving()||!window.confirm(`Pause all Automation for this account? 2 3This disables Queue, Approval, and Send, and cancels their currently scheduled occurrences. It does not contact Amazon.`))return;let l=this.loadToken,r=e.value;this.saving.set(!0),this.error.set(null),this.message.set(null);try{let u=await this.api.saveAmazonAdsAutomationSettings({orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,expectedScheduleRevision:t.scheduleRevision,pauseAll:!0});if(l!==this.loadToken||this.accountContext.selectedValue()!==r)return;let c=H(u.settings,{orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,accountName:u.settings.accountName||e.accountName,timezone:u.settings.timezone||e.timezone||"UTC"});this.settings.set(c),this.draft.set(U(c)),this.eligibility.set(u.eligibility),this.message.set("All Automation is paused for this account. Scheduled occurrences were superseded; no Amazon call was made."),this.resetRuns()}catch(u){l===this.loadToken&&this.accountContext.selectedValue()===r&&this.error.set(u?.message||"Automation could not be paused.")}finally{this.saving.set(!1)}}async loadRuns(t=!1){let e=this.selectedAccount();if(!e||!this.orgId||this.runsLoading())return;let l=++this.runLoadToken,r=e.value,u=t?null:this.runsCursor();this.runsLoading.set(!0),this.error.set(null);try{let c=await this.api.getAmazonAdsAutomationRuns({orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,limit:25,cursor:u});if(l!==this.runLoadToken||this.accountContext.selectedValue()!==r)return;this.runs.set(t?c.runs:[...this.runs(),...c.runs]),this.runsCursor.set(c.nextCursor),this.runsHasMore.set(c.hasMore),this.runsLoaded.set(!0)}catch(c){if(l!==this.runLoadToken)return;this.error.set(c?.message||"Automation runs could not be loaded.")}finally{l===this.runLoadToken&&this.runsLoading.set(!1)}}refreshRuns(){this.loadRuns(!0)}canCancelRun(t){let e=this.eligibility(),l=this.selectedAccount(),r=Date.parse(t.scheduledFor);return(t.status==="cancelling"||t.status==="scheduled"&&Number.isFinite(r)&&r>Date.now())&&e?.canManageSettings===!0&&e.accountAllowed===!0&&e.exactAllowlistConfigured===!0&&e.profileAccessMode==="update"&&l?.accessMode==="update"}async cancelRun(t){let e=this.selectedAccount();if(!e||!this.orgId||!this.canCancelRun(t)||this.cancellingRunId()!=null)return;let l=t.status==="cancelling"?"Finish skipping ":"Skip ";if(!window.confirm(l+this.actionLabel(t.action)+" scheduled for "+this.formatDateTime(t.scheduledFor)+`? 4 5This skips only this occurrence. It does not disable the automation or run it now. If the automation remains enabled, its next daily occurrence will be scheduled.`))return;let u=e.value;this.cancellingRunId.set(t.runId),this.error.set(null),this.message.set(null);try{let c=await this.api.cancelAmazonAdsAutomationRun({orgId:this.orgId,connectionId:e.connectionId,profileId:e.profileId,runI
5d:t.runId});if(this.accountContext.selectedValue()!==u||(this.runs.update(M=>M.map(Q=>Q.runId===t.runId?c.run:Q)),await this.loadSettings(),await this.loadRuns(!0),this.accountContext.selectedValue()!==u))return;let S=c.replacementScheduledFor?" The next occurrence is "+this.formatDateTime(c.replacementScheduledFor)+".":"";this.message.set("Scheduled occurrence skipped. It will not run and no Amazon call was made."+S)}catch(c){this.accountContext.selectedValue()===u&&this.error.set(c?.message||"Scheduled occurrence could not be cancelled.")}finally{this.cancellingRunId()===t.runId&&this.cancellingRunId.set(null)}}actionLabel(t){return Y(t)}statusLabel(t){return ze(t.status)}formatDateTime(t){if(!t)return"Not scheduled";let e=new Date(t);return Number.isNaN(e.getTime())?t:new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short",timeZone:this.draft()?.timezone||void 0}).format(e)}runCounts(t){let e=Math.max(0,Number(t.deferredItemCount||0)),l=t.deferredItemCountExact===!1,r=l?e>0?`at least ${e} deferred`:"deferred count unknown":`${e} deferred`;if(t.action==="auto_queue_bid_suggestions"){let c=[`${t.queuedItemCount||0} queued`,`${t.policyHeldItemCount||0} policy held`,`${t.failedItemCount||0} staging blocked`];return(t.unknownOutcomeCount||0)>0&&c.push(`${t.unknownOutcomeCount} staging outcome unknown`),(e>0||l)&&c.push(r),(t.summarySyncPendingCount||0)>0&&c.push(`${t.summarySyncPendingCount} summary refresh pending`),c.join(" / ")}if(t.action==="auto_approval"){let c=[`${t.approvedItemCount||0} approved`,`${t.policyHeldItemCount||0} policy held`,`${t.failedItemCount||0} revalidation skipped`];return(e>0||l)&&c.push(r),(t.summarySyncPendingCount||0)>0&&c.push(`${t.summarySyncPendingCount} summary refresh pending`),c.join(" / ")}let u=[`${t.sentItemCount||0} sent`,`${t.failedItemCount||0} failed`,`${t.skippedItemCount||0} skipped`];return(t.unknownOutcomeCount||0)>0&&u.push(`${t.unknownOutcomeCount} unknown outcome`),(e>0||l)&&u.push(r),(t.amazonWriteAttemptCount||0)>0&&u.push(`${t.amazonWriteAttemptCount} Amazon attempt${t.amazonWriteAttemptCount===1?"":"s"}${t.amazonWriteAttemptCountExact===!1?" (estimate)":""}`),u.join(" / ")}formatCurrency(t){return t==null||!Number.isFinite(Number(t))?"Budget unavailable":new Intl.NumberFormat(void 0,{style:"currency",currency:"USD"}).format(Number(t))}previewReasonLabel(t){return{CAMPAIGN_NOT_ENABLED:"Campaign manual-only",MISSING_CAMPAIGN_BUDGET:"Budget unavailable",CAMPAIGN_BUDGET_TOO_HIGH:"Budget over limit",MISSING_BID_CHANGE:"Bid change unavailable",MISSING_CURRENT_BID:"Current bid unavailable",MISSING_CURRENT_BID_SOURCE:"Current bid evidence unavailable",UNTRUSTED_CURRENT_BID_SOURCE:"Current bid evidence untrusted",BID_CHANGE_TOO_HIGH:"Bid change over limit",POSITIVE_KEYWORDS_OFF:"Positive keywords off",NEGATIVE_KEYWORDS_OFF:"Negative keywords off",HIGH_RISK:"High risk",CRITICAL_RISK:"Critical risk",APPROVAL_NOTE_REQUIRED:"Approval note required",KEYWORD_REVIEW_REQUIRED:"Keyword review required",QUEUE_REVIEW_REQUIRED:"Queue review required",DATA_NOT_READY:"Suggestion data not ready",BID_SUGGESTION_DISABLED:"Bid Suggestions disabled",MISSING_TARGET_ID:"Target ID unavailable",HARD_SAFETY_BLOCKER:"Safety blocker",TRANSACTION_GROUP_PARTIAL:"Paired action held"}[t]||t.toLowerCase().replaceAll("_"," ")}updateApprovalPolicy(t){let e=this.draft();!e||!this.eligibility()?.canManageSettings||(this.draft.set(x(C({},e),{autoApproval:x(C({},e.autoApproval),{policy:t(e.autoApproval.policy)})})),this.approvalPreviewStale.set(!0),this.message.set(null))}updateQueuePolicy(t){let e=this.draft();!e||!this.eligibility()?.canManageSettings||(this.draft.set(x(C({},e),{autoQueueBidSuggestions:x(C({},e.autoQueueBidSuggestions),{policy:t(e.autoQueueBidSuggestions.policy)})})),this.queuePreviewStale.set(!0),this.message.set(null))}resetQueuePreview(){this.queuePreviewLoadToken+=1,this.queuePreview.set(null),this.queuePreviewError.set(null),this.queuePreviewLoading.set(!1),this.queuePreviewStale.set(!1)}resetApprovalPreview(){this.previewLoadToken+=1,this.approvalPreview.set(null),this.approvalPreviewError.set(null),this.approvalPreviewLoading.set(!1),this.approvalPreviewStale.set(!1)}resetRuns(){this.runLoadToken+=1,this.runs.set([]),this.runsCursor.set(null),this.runsHasMore.set(!1),this.runsLoaded.set(!1),this.runsLoading.set(!1),this.cancellingRunId.set(null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ce({type:n,selectors:[["app-amazon-automation-page"]],decls:41,vars:17,consts:[[1,"automation-page"],["title","Automation","description","Schedule Bid Suggestions into the API Queue, approve eligible queue work, and send approved work for one connected Amazon Ads account. Every action starts off and failures are logged without retrying.","icon","schedule_send"],["role","note",1,"automation-safety-banner"],["aria-hidden","true"],["aria-labelledby","automation-account-title",1,"automation-account-card"],["id","automation-account-title",1,"automation-kicker"],[1,"automation-account-actions"],[3,"ngModelChange","ngModel","disabled"],[3,"value"],["type","button","aria-label","Refresh connected accounts",1,"automation-icon-button",3,"click","disabled"],["role","tablist","aria-label","Automation sections",1,"automation-tabs"],["type","button","role","tab",3,"click"],["role","alert",1,"automation-alert","automation-alert--error"],["role","status",1,"automation-alert","automation-alert--success"],["role","tabpanel",1,"automation-panel"],[1,"automation-empty"],["role","status",1,"automation-alert","automation-alert--warning"],["aria-labelledby","recommended-schedule-title",1,"automation-recommended-schedule"],[1,"automation-setting-grid"],[1,"automation-setting-card","automation-setting-card--queue"],[1,"automation-setting-heading"],[1,"automation-setting-icon"],[1,"automation-kicker"],[1,"automation-switch"],["type","checkbox","role","switch",3,"change","checked","disabled"],[1,"automation-scope-note","automation-scope-note--queue"],["aria-labelledby","queue-policy-title",1,"automation-policy"],[1,"automation-policy-heading"],["id","queue-policy-title"],[1,"automation-stale-badge"],[1,"automation-policy-intro"],["role","radiogroup","aria-label","Auto Queue Bid Suggestions policy mode",1,"automation-mode-options"],["type","radio","name","queue-mode","value","conditional",3,"change","checked","disabled"],["type","radio","name","queue-mode","value","approve_all",3,"change","checked","disabled"],[1,"automation-rule-grid"],[1,"automation-campaign-heading"],["type","button",1,"automation-secondary-button",3,"click","disabled"],[1,"automation-preview-error"],[1,"automation-preview-empty"],["aria-labelledby","queue-timing-title",1,"automation-timing-card",3,"automation-timing-card--warning"],[1,"automation-time-field"],["type","time",3,"ngModelChange","ngModel","disabled"],[1,"automation-next-run"],[1,"automation-lock-reason"],[1,"automation-lock-reason","automation-lock-reason--error"],[1,"automation-setting-card","automation-setting-card--approval"],[1,"automation-scope-note"],["aria-labelledby","approval-policy-title",1,"automation-policy"],["id","approval-policy-title"],["role","radiogroup","aria-label","Auto-Approval policy mode",1,"automation-mode-options"],["type","radio","name","approval-mode","value","conditional",3,"change","checked","disabled"],["type","radio","name","approval-mode","value","approve_all",3,"change","checked","disabled"],[1,"automation-setting-card","automation-setting-card--send"],[1,"automation-scope-note","automation-scope-note--send"],[1,"automation-save-bar"],[1,"automation-save-actions"],["type","button",1,"automation-secondary-button","automation-danger-button",3,"click","disabled"],["type","button",1,"automation-primary-button",3,"click","disabled"],[1,"automation-recommended-schedule__heading"],["id","recommended-schedule-title"],[1,"automation-recommended-schedule__steps"],[1,"automation-recommended-schedule__note"],[1,"automation-number-field"],["type","number","min","0.01","max","100000","step","0.01",3,"ngModelChange","ngModel","disabled"],[1,"automation-preview-summary"],["aria-label","Held Bid Suggestion reasons",1,"automation-reason-list"],["role","group","aria-label","Auto Queue campaign selection",1,"automation-campaign-selection"],["type","button",3,"click","disabled"],[1,"automation-campaign-list"],["type","button",1,"automation-campaign-option",3,"automation-campaign-option--selected","disabled"],["type","button",1,"automation-campaign-option",3,"click","disabled"],[1,"automation-campaign-name"],["aria-hidden","true",1,"automation-switch","automation-switch--display"],["aria-labelledby","queue-timing-title",1,"automation-timing-card"],[1,"automation-timing-heading"],["id","queue-timing-title"],[1,"automation-timing-grid"],[1,"automation-timing-recommended"],["role","alert",1,"automation-timing-warning"],[1,"automation-keyword-rules"],["aria-label","Held item reasons",1,"automation-reason-list"],["role","group","aria-label","Auto-Approval campaign selection",1,"automation-campaign-selection"],[1,"automation-monitor-header"],[1,"automation-run-table-wrap"],[1,"automation-run-table"],["type","button",1,"automation-secondary-button","automation-load-more",3,"disabled"],[1,"automation-status"],[1,"automation-run-details"],[1,"automation-run-error"],[1,"automation-run-actions"],["type","button",1,"automation-danger-button",3,"disabled"],[1,"automation-run-action-muted"],["type","button",1,"automation-danger-button",3,"click","disabled"],["type","button",1,"automation-secondary-button","automation-load-more",3,"click","disabled"]],template:function(e,l){if(e&1&&(o(0,"section",0),O(1,"app-ads-manager-page-header",1),o(2,"div",2)(3,"mat-icon",3),a(4,"verified_user"),i(),o(5,"div")(6,"strong"),a(7,"Locked rollout"),i(),o(8,"span"),a(9,"Only the exact allowlisted Formline Supply and OC Product profiles in Update mode can be enabled. Saving this page never contacts Amazon."),i()()(),o(10,"section",4)(11,"div")(12,"span",5),a(13,"Connected account"),i(),o(14,"strong"),a(15),i(),o(16,"small"),a(17
5),i()(),o(18,"div",6)(19,"label")(20,"span"),a(21,"Select account"),i(),o(22,"select",7),g("ngModelChange",function(u){return l.selectAccount(u)}),z(23,Ze,2,3,"option",8,Ke),i()(),o(25,"button",9),g("click",function(){return l.refreshAccounts()}),o(26,"mat-icon",3),a(27),i()()()(),o(28,"nav",10)(29,"button",11),g("click",function(){return l.setTab("settings")}),o(30,"mat-icon",3),a(31,"tune"),i(),a(32," Settings "),i(),o(33,"button",11),g("click",function(){return l.setTab("monitor")}),o(34,"mat-icon",3),a(35,"fact_check"),i(),a(36," Run Monitor "),i()(),v(37,je,5,1,"div",12),v(38,We,5,1,"div",13),v(39,Nt,4,1,"div",14)(40,Ft,16,3,"div",14),i()),e&2){let r,u;d(15),m(((r=l.selectedAccount())==null?null:r.accountName)||"No connected account selected"),d(2),G(" ",((u=l.selectedAccount())==null?null:u.countryCode)||"Marketplace unavailable"," \xB7 ",((u=l.draft())==null?null:u.timezone)||((u=l.selectedAccount())==null?null:u.timezone)||"UTC"," \xB7 ",l.selectedAccountStatus()," "),d(5),_("ngModel",l.accountContext.selectedValue())("disabled",l.accountContext.loading()||l.saving()),d(),N(l.accountContext.options()),d(2),_("disabled",l.accountContext.loading()||l.saving()),d(2),m(l.accountContext.loading()?"hourglass_empty":"refresh"),d(2),w("active",l.activeTab()==="settings"),B("aria-selected",l.activeTab()==="settings"),d(4),w("active",l.activeTab()==="monitor"),B("aria-selected",l.activeTab()==="monitor"),d(4),h(l.error()?37:-1),d(),h(l.message()?38:-1),d(),h(l.activeTab()==="settings"?39:40)}},dependencies:[pe,Pe,be,ve,_e,fe,Ae,Ce,ye,he,xe,Me,Se,Oe,me],styles:['[_nghost-%COMP%]{display:block}.automation-page[_ngcontent-%COMP%]{--automation-ink: #172536;--automation-muted: #64748b;--automation-line: #dbe3ec;--automation-teal: #0f766e;--automation-teal-soft: #ecfdf5;--automation-blue: #2563eb;--automation-blue-soft: #eff6ff;--automation-orange: #c2410c;--automation-orange-soft: #fff7ed;color:var(--automation-ink);padding:24px}.automation-safety-banner[_ngcontent-%COMP%], .automation-account-card[_ngcontent-%COMP%], .automation-alert[_ngcontent-%COMP%], .automation-setting-card[_ngcontent-%COMP%], .automation-save-bar[_ngcontent-%COMP%], .automation-monitor-header[_ngcontent-%COMP%], .automation-empty[_ngcontent-%COMP%]{border:1px solid var(--automation-line);border-radius:14px;background:#fff}.automation-safety-banner[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:flex-start;margin:18px 0 14px;padding:14px 16px;border-color:#a7f3d0;background:var(--automation-teal-soft);color:#14532d}.automation-safety-banner[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .automation-save-bar[_ngcontent-%COMP%] div[_ngcontent-%COMP%], .automation-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3px}.automation-safety-banner[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .automation-save-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .automation-monitor-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .automation-empty[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--automation-muted)}.automation-account-card[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:16px 18px}.automation-account-card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{display:flex;flex-direction:column;gap:4px}.automation-account-card[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:17px}.automation-account-card[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .automation-next-run[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .automation-time-field[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .automation-run-table[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--automation-muted)}.automation-kicker[_ngcontent-%COMP%]{color:#526277;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.automation-account-actions[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:flex-end}.automation-account-actions[_ngcontent-%COMP%] label[_ngcontent-%COMP%], .automation-time-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;color:#334155;font-size:12px;font-weight:700}select[_ngcontent-%COMP%], input[type=time][_ngcontent-%COMP%], input[type=number][_ngcontent-%COMP%]{min-height:40px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;color:var(--automation-ink);padding:8px 10px;font:inherit}select[_ngcontent-%COMP%]{min-width:260px}.automation-icon-button[_ngcontent-%COMP%], .automation-secondary-button[_ngcontent-%COMP%], .automation-primary-button[_ngcontent-%COMP%], .automation-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{border:0;border-radius:9px;font:inherit;font-weight:750;cursor:pointer}.automation-icon-button[_ngcontent-%COMP%]{display:grid;width:40px;height:40px;place-items:center;background:#eef2f7;color:#334155}.automation-tabs[_ngcontent-%COMP%]{display:flex;gap:6px;margin:18px 0;border-bottom:1px solid var(--automation-line)}.automation-tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:inline-flex;gap:8px;align-items:center;padding:11px 16px;border-radius:9px 9px 0 0;background:transparent;color:#64748b}.automation-tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#f0fdfa;color:var(--automation-teal);box-shadow:inset 0 -3px 0 var(--automation-teal)}.automation-tabs[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .automation-primary-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .automation-secondary-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:19px;height:19px;font-size:19px}.automation-alert[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:center;margin:12px 0;padding:12px 14px}.automation-alert--error[_ngcontent-%COMP%]{border-color:#fecaca;background:#fef2f2;color:#991b1b}.automation-alert--success[_ngcontent-%COMP%]{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.automation-alert--warning[_ngcontent-%COMP%]{border-color:#fed7
5aa;background:var(--automation-orange-soft);color:#9a3412}.automation-setting-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.automation-setting-card[_ngcontent-%COMP%]{padding:20px;border-top:4px solid var(--automation-teal)}.automation-setting-card--queue[_ngcontent-%COMP%], .automation-setting-card--approval[_ngcontent-%COMP%], .automation-setting-card--send[_ngcontent-%COMP%]{grid-column:1/-1}.automation-setting-card--queue[_ngcontent-%COMP%]{border-top-color:var(--automation-blue)}.automation-setting-card--send[_ngcontent-%COMP%]{border-top-color:var(--automation-orange)}.automation-setting-card[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{min-height:44px;margin:14px 0;color:#526277;line-height:1.5}.automation-setting-heading[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}.automation-setting-heading[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .automation-monitor-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:2px 0 0;font-size:20px}.automation-setting-icon[_ngcontent-%COMP%]{display:grid;width:42px;height:42px;place-items:center;border-radius:11px;background:#ccfbf1;color:var(--automation-teal)}.automation-setting-card--queue[_ngcontent-%COMP%] .automation-setting-icon[_ngcontent-%COMP%]{background:var(--automation-blue-soft);color:var(--automation-blue)}.automation-setting-card--send[_ngcontent-%COMP%] .automation-setting-icon[_ngcontent-%COMP%]{background:#ffedd5;color:var(--automation-orange)}.automation-switch[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto auto;gap:6px 8px;align-items:center;cursor:pointer}.automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;pointer-events:none}.automation-switch[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:relative;display:block;width:44px;height:24px;border-radius:999px;background:#cbd5e1;transition:background .15s ease}.automation-switch[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0f172a40;content:"";transition:transform .15s ease}.automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + span[_ngcontent-%COMP%]{background:var(--automation-teal)}.automation-setting-card--queue[_ngcontent-%COMP%] .automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + span[_ngcontent-%COMP%]{background:var(--automation-blue)}.automation-setting-card--send[_ngcontent-%COMP%] .automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + span[_ngcontent-%COMP%]{background:var(--automation-orange)}.automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + span[_ngcontent-%COMP%]:after{transform:translate(20px)}.automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus-visible + span[_ngcontent-%COMP%]{outline:3px solid #93c5fd;outline-offset:2px}.automation-switch[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled + span[_ngcontent-%COMP%], button[_ngcontent-%COMP%]:disabled, select[_ngcontent-%COMP%]:disabled, input[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.55}.automation-switch[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{color:#475569;font-size:12px}.automation-scope-note[_ngcontent-%COMP%], .automation-lock-reason[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:flex-start;border-radius:9px;background:var(--automation-blue-soft);color:#1e40af;padding:10px 11px;font-size:12px;line-height:1.45}.automation-scope-note[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .automation-lock-reason[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{flex:0 0 auto;width:17px;height:17px;font-size:17px}.automation-scope-note--send[_ngcontent-%COMP%]{background:var(--automation-orange-soft);color:#9a3412}.automation-time-field[_ngcontent-%COMP%]{margin-top:18px}.automation-time-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:150px}.automation-next-run[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:16px;padding-top:14px;border-top:1px solid #e2e8f0;font-size:13px}.automation-lock-reason[_ngcontent-%COMP%]{margin-top:12px;background:#f8fafc;color:#475569}.automation-lock-reason--error[_ngcontent-%COMP%]{background:#fef2f2;color:#991b1b}.automation-save-bar[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-top:16px;padding:16px 18px}.automation-save-actions[_ngcontent-%COMP%]{display:flex;flex-direction:row!important;flex-wrap:wrap;justify-content:flex-end;
5gap:8px!important}.automation-primary-button[_ngcontent-%COMP%], .automation-secondary-button[_ngcontent-%COMP%], .automation-danger-button[_ngcontent-%COMP%]{display:inline-flex;gap:8px;align-items:center;justify-content:center;min-height:40px;padding:9px 14px}.automation-primary-button[_ngcontent-%COMP%]{background:var(--automation-teal);color:#fff}.automation-secondary-button[_ngcontent-%COMP%]{border:1px solid #cbd5e1;background:#fff;color:#334155}.automation-danger-button[_ngcontent-%COMP%]{border:1px solid #fecaca;background:#fff;color:#b91c1c}.automation-danger-button[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#ef4444;background:#fef2f2}.automation-danger-button[_ngcontent-%COMP%]:disabled{cursor:wait;opacity:.6}.automation-monitor-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:14px;padding:17px 18px}.automation-monitor-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:6px 0 0}.automation-empty[_ngcontent-%COMP%]{align-items:center;justify-content:center;min-height:180px;padding:32px;text-align:center}.automation-empty[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#94a3b8}.automation-run-table-wrap[_ngcontent-%COMP%]{overflow-x:auto;border:1px solid var(--automation-line);border-radius:12px;background:#fff}.automation-run-table[_ngcontent-%COMP%]{width:100%;min-width:1040px;border-collapse:collapse}.automation-run-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .automation-run-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:13px 14px;border-bottom:1px solid #e8edf3;text-align:left;vertical-align:top}.automation-run-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f8fafc;color:#526277;font-size:11px;letter-spacing:.05em;text-transform:uppercase}.automation-run-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child, .automation-run-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.automation-run-actions[_ngcontent-%COMP%]{width:150px;white-space:nowrap}.automation-run-action-muted[_ngcontent-%COMP%]{color:#94a3b8}.automation-status[_ngcontent-%COMP%]{display:inline-flex;border-radius:999px;background:#eef2f7;color:#475569;padding:4px 9px;font-size:12px;font-weight:800}.automation-status[data-status=cancelled][_ngcontent-%COMP%]{background:#f1f5f9;color:#475569}.automation-status[data-status=cancelling][_ngcontent-%COMP%]{background:#fef3c7;color:#92400e}.automation-status[data-status=succeeded][_ngcontent-%COMP%]{background:#dcfce7;color:#166534}.automation-status[data-status=failed][_ngcontent-%COMP%], .automation-status[data-status=missed][_ngcontent-%COMP%]{background:#fee2e2;color:#991b1b}.automation-status[data-status=partial_success][_ngcontent-%COMP%], .automation-status[data-status=skipped][_ngcontent-%COMP%]{background:#ffedd5;color:#9a3412}.automation-status[data-status=running][_ngcontent-%COMP%], .automation-status[data-status=scheduled][_ngcontent-%COMP%]{background:#dbeafe;color:#1d4ed8}.automation-run-error[_ngcontent-%COMP%]{color:#b91c1c!important}.automation-load-more[_ngcontent-%COMP%]{margin:14px auto 0}.automation-policy[_ngcontent-%COMP%]{margin-top:18px;padding:17px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc}.automation-policy-heading[_ngcontent-%COMP%], .automation-campaign-heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:14px;align-items:center}.automation-policy-heading[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:2px 0 0;font-size:17px}.automation-policy-intro[_ngcontent-%COMP%]{margin:10px 0 14px;color:var(--automation-muted);font-size:13px;line-height:1.45}.automation-stale-badge[_ngcontent-%COMP%]{border-radius:999px;background:#fef3c7;color:#92400e;padding:5px 9px;font-size:11px;font-weight:800}.automation-mode-options[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.automation-mode-options[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;cursor:pointer}.automation-mode-options[_ngcontent-%COMP%] > label.active[_ngcontent-%COMP%]{border-color:#5eead4;background:#f0fdfa;box-shadow:inset 0 0 0 1px #5eead4}.automation-mode-options[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:3px;accent-color:var(--automation-teal)}.automation-mode-options[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .automation-number-field[_ngcontent-%COMP%], .automation-keyword-rules[_ngcontent-%COMP%] > label[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:first-child, .automation-campaign-heading[_ngcontent-%COMP%] >
5 div[_ngcontent-%COMP%], .automation-campaign-name[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:3px}.automation-mode-options[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .automation-number-field[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .automation-keyword-rules[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .automation-campaign-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .automation-campaign-name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--automation-muted);line-height:1.4}.automation-rule-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}.automation-number-field[_ngcontent-%COMP%]{color:#334155;font-size:12px;font-weight:700}.automation-number-field[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border:1px solid #cbd5e1;border-radius:9px;background:#fff}.automation-number-field[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{padding-left:10px;color:#64748b}.automation-number-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:0;outline:0}.automation-keyword-rules[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}.automation-keyword-rules[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], .automation-campaign-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:11px 12px;border:1px solid #e2e8f0;border-radius:9px;background:#fff}.automation-campaign-selection[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:10px;padding:9px 10px;border:1px solid #dbe3ec;border-radius:9px;background:#fff;color:#475569;font-size:12px}.automation-campaign-selection[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;gap:7px}.automation-campaign-selection[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-height:34px;padding:6px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;font:inherit;font-weight:800;cursor:pointer}.automation-campaign-selection[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#94a3b8;background:#f8fafc}.automation-campaign-heading[_ngcontent-%COMP%]{margin-top:16px;padding-top:15px;border-top:1px solid #dbe3ec}.automation-preview-summary[_ngcontent-%COMP%]{display:flex;gap:8px 14px;align-items:baseline;flex-wrap:wrap;margin-top:12px;padding:10px 12px;border-radius:9px;background:#ecfdf5;color:#166534}.automation-preview-summary--warning[_ngcontent-%COMP%], .automation-preview-error[_ngcontent-%COMP%]{background:#fef2f2;color:#991b1b}.automation-preview-summary[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex-basis:100%}.automation-preview-error[_ngcontent-%COMP%], .automation-preview-empty[_ngcontent-%COMP%]{margin-top:12px;padding:11px 12px;border-radius:9px}.automation-preview-empty[_ngcontent-%COMP%]{background:#eef2f7;color:#64748b;text-align:center}.automation-campaign-list[_ngcontent-%COMP%]{display:grid;gap:8px;max-height:300px;margin-top:10px;overflow:auto}.automation-campaign-option[_ngcontent-%COMP%]{width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.automation-campaign-option[_ngcontent-%COMP%]:hover:not(:disabled){border-color:#93c5fd;background:#f8fbff}.automation-campaign-option[_ngcontent-%COMP%]:focus-visible{outline:3px solid #93c5fd;outline-offset:1px}.automation-campaign-option--selected[_ngcontent-%COMP%]{border-color:#5eead4;background:#f0fdfa;box-shadow:inset 0 0 0 1px #5eead4}.automation-setting-card--queue[_ngcontent-%COMP%] .automation-campaign-option--selected[_ngcontent-%COMP%]{border-color:#93c5fd;background:#eff6ff;box-shadow:inset 0 0 0 1px #93c5fd}.automation-switch--display[_ngcontent-%COMP%]{flex:0 0 auto;pointer-events:none}.automation-switch--display.automation-switch--checked[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:var(--automation-teal)}.automation-setting-card--queue[_ngcontent-%COMP%] .automation-switch--display.automation-switch--checked[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background:var(--automation-blue)}.automation-switch--display.automation-switch--checked[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after{transform:translate(20px)}.automation-reason-list[_ngcontent-%COMP%]{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.automation-reason-list[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{border-radius:999px;background:#e2e8f0;color:#475569;padding:5px 8px;font-size:11px}.automation-recommended-schedule[_ngcontent-%COMP%]{margin-bottom:18px;border:1px solid #99f6e4;border-radius:14px;background:linear-gradient(135deg,#f0fdfa,#eff6ff);padding:16px}.automation-recommended-schedule__heading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:18px;align-items:center}.automation-recommended-schedule__heading[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:3px 0 0;color:#0f172a;font-size:18px}.automation-recommended-schedule__heading[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:5px 0 0;color:#475569;font-size:12px}.automation-recommended-schedule__heading[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{flex:0 0 auto}.automation-recommended-schedule__steps[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}.automation-recommended-schedule__steps[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;border:1px solid #ccfbf1;border-radius:11px;background:#ffffffe6;padding:12px}.automation-recommended-schedule__steps[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#0f766e;font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase}.automation-recommended-schedule__steps[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#0f172a;font-size:22px}.automation-recommended-schedule__steps[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{min-height:34px;color:#64748b;line-height:1.4}.automation-recommended-schedule__steps[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;margin-top:auto}.automation-recommended-schedule__note[_ngcontent-%COMP%]{margin:11px 0 0;color:#475569;font-size:11px}.automation-timing-card[_ngcontent-%COMP%]{margin-top:18px;border:1px solid #bfdbfe;border-radius:12px;background:#f8fbff;padding:14px}.automation-timing-card--warning[_ngcontent-%COMP%]{border-color:#fdba74;background:#fff7ed}.automation-timing-heading[_ngcontent-%COMP%]{display:flex;gap:9px;align-items:center}.automation-timing-heading[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--automation-blue)}.automation-timing-heading[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:2px 0 0;font-size:15px}.automation-timing-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px}.automation-timing-grid[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;gap:3px;border:1px solid #dbeafe;border-radius:9px;background:#fff;padding:10px}.automation-timing-grid[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .automation-timing-card[_ngcontent-%COMP%] > small[_ngcontent-%COMP%]{color:#64748b;font-size:11px}.automation-timing-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#0f172a;font-size:15px}.automation-timing-grid[_ngcontent-%COMP%] .automation-timing-recommended[_ngcontent-%COMP%]{border-color:#5eead4;background:#f0fdfa}.automation-timing-card[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:10px 0 4px;color:#475569;font-size:12px;line-height:1.45}.automation-timing-warning[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:12px;border-radius:9px;background:#ffedd5;color:#9a3412;padding:10px 11px;font-size:12px;font-weight:700}.automation-timing-warning[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:0 0 auto;background:#fff}@media(max-width:920px){.automation-page[_ngcontent-%COMP%]{padding:16px}.automation-setting-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.automation-account-card[_ngcontent-%COMP%], .automation-save-bar[_ngcontent-%COMP%], .automation-monitor-header[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column}.automation-account-actions[_ngcontent-%COMP%]{align-items:stretch}.automation-account-actions[_ngcontent-%COMP%] label[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{width:100%}.automation-mode-options[_ngcontent-%COMP%], .automation-rule-grid[_ngcontent-%COMP%], .automation-keyword-rules[_ngcontent-%COMP%]{grid-template-columns:1fr}.automation-campaign-selection[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column}.automation-campaign-selection[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.automation-timing-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.automation-timing-warning[_ngcontent-%COMP%], .automation-recommended-schedule__heading[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column}.automation-recommended-schedule__heading[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{align-self:flex-start}.automation-recommended-schedule__steps[_ngcontent-%COMP%]{grid-template-columns:1fr}}']})};export{Ne as AmazonAutomationPageComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.