1import{af as a}from"./vendor-B2oIjyY4.js";import{a1 as S,iS as A,sL as b,$ as g,b9 as v,bU as x,aj as w,y as E}from"./main-CJK8sxkW.js";import{A as _}from"./audience-explore-BN3x4kjY.js";import{u as j}from"./outlet-CRFGt_DD.js";import"./bounded-range-fetch-CggGfMWc.js";import"./vendor-charts-BqgCVUWx.js";import"./audience-sidebar-context-4ecCsuiz.js";import"./index-cjBYrcFE.js";import"./audience-page-agent-context-BmtkaQg8.js";import"./subset-selector-CeH3ktje.js";import"./labels-CElxcmDz.js";import"./audience-R565SlHs.js";import"./use-cached-audience-size-spTlP4Xa.js";import"./filter-BKQn7lHt.js";import"./agent-panel-button-C3ME53IC.js";import"./use-audience-insights-panel-LL1gk1Wq.js";import"./constants-B2IlNFDy.js";import"./resource-wizard-BEa64Y1r.js";const M=({audience:t,parentModel:r,isFastQueryEnabled:i,setIsFastQueryEnabled:o})=>{var p;const n=S(t,{resetOnlyOnSourceChange:!1}),u=A(),{toast:m}=E(),{mutateAsync:l}=b(),e=t==null?void 0:t.connection,s=((p=t.static_list)==null?void 0:p.type)==="snapshot",c=async(y={},h=!0)=>{if(await u({model:{...n.state,...y??{}},columns:void 0}),v("Model Updated",{model_id:t.id,model_type:x.Visual,model_name:t==null?void 0:t.name,source_id:e==null?void 0:e.id,source_type:e==null?void 0:e.type}),s)try{await l({input:{audienceId:String(t.id)}})}catch(d){w(d),m({id:"update-audience",title:"Audience updated, but members couldn't be refreshed",message:d.message,variant:"warning"});return}h&&m({id:"update-audience",title:s?"Audience updated â refreshing members":"Audience was updated",variant:"success"})},f=i!=null&&o!=null?{isFastQueryEnabled:i,setIsFastQueryEnabled:o}:{};return a.jsx(g,{children:a.jsx(_,{audience:t,modelState:n,parentModel:r,source:e,variant:"audience",onSave:c,confirmBeforeSave:s?{title:"Editing definition will update members",message:"If you edit this audience's definition, we will automatically update your members list to match the criteria for the new definition"}:void 0,enableAgentSidebar:!0,...f})})},H=()=>{const{audience:t,parentModel:r,isFastQueryEnabled:i,setIsFastQueryEnabled:o}=j();return a.jsx(M,{audience:t,parentModel:r,isFastQueryEnabled:i,setIsFastQueryEnabled:o})};export{H as AudienceDefinition}; 2//# sourceMappingURL=definition-D_nyJx2c.js.map
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.