PageSourceSearch

https://app.cocon.center/_nuxt/DKc_v1Zz.js

js cocon.center collected 2026-10-08 19:11:27 UTC 16,519 bytes, 1 lines download raw bytes

1import{_ as ie}from"./B6TPoLNJ.js";import{_ as re}from"./DK2yOkWH.js";import{_ as de,a as Y}from"./ixeV57eO.js";import{_ as ce}from"./BI8CKSag.js";import{_ as pe}from"./fcGtmt89.js";import{_ as me}from"./D65IkMUg.js";import{r as ue}from"./CKa6LaHQ.js";import{r as fe}from"./CNHclUhv.js";import{_ as _e}from"./CCYx5IfI.js";import{_ as be}from"./emARouR-.js";import{_ as ge}from"./CV4z3ek9.js";import{_ as he}from"./Cmwgb5s4.js";import{_ as ve}from"./CSVuGsOF.js";import{b5 as L,b6 as B,bu as E,br as N,bc as s,bt as D,bk as w,bi as d,be as o,bf as e,bp as R,bl as G,bj as y,bd as b,bm as $,bn as F,bq as V,bs as Z,bg as xe,bh as ye,b7 as we,b9 as Ce,cQ as ke,cD as Pe,bb as Ve,bA as $e,bv as z,bS as q,bH as De}from"./BrnsWL0m.js";import{r as Ue}from"./BSyUirfv.js";import{a as Se,b as Me,c as Te,r as je,P as Ie}from"./_GeDLNrS.js";import{_ as Ae}from"./BRhG9P3h.js";import{a as Fe}from"./COqmePN2.js";import{_ as Re}from"./Bm_ry6ra.js";import{_ as Le}from"./D8mVLEUI.js";import{r as Be}from"./BULYhJvj.js";import{r as Q}from"./C5HqhK-E.js";import{P as Oe,a as Ee,u as Ne}from"./DPSYBHhc.js";import{u as He,a as Ge,P as Ze,b as ze}from"./BkXAfZi1.js";import"./CvFfOV2i.js";import"./Dvd_9Gcy.js";import"./DuLkcCIj.js";import"./CQXsVu8T.js";import"./DPZq-7FF.js";import"./DDcm1S6h.js";import"./DJvouHwF.js";import"./MwWwHNJf.js";import"./ekCajI73.js";import"./CqTx2l-v.js";import"./DbZDsujg.js";import"./BfQgIx-P.js";import"./DRglBNdZ.js";import"./CeooMtYz.js";import"./B5UHSeWv.js";import"./0FjtTRWm.js";import"./DcUmISty.js";import"./CFyKkWCu.js";import"./VymXGw1a.js";import"./CWQBttGY.js";import"./ClVWwjmI.js";import"./D86TSh_7.js";import"./CSdcmfR3.js";import"./DF5pDZM2.js";import"./CaHJ4swu.js";import"./76PR_i75.js";import"./CQRH-x6Y.js";import"./C6ewSg9u.js";import"./CeQhOJM9.js";import"./DPk1MAFG.js";import"./DmpfLNVP.js";import"./CRq-GvAe.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new t.Error().stack;p&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[p]="56488fd6-d41a-48ce-9516-c69e94350ca8",t._sentryDebugIdIdentifier="sentry-dbid-56488fd6-d41a-48ce-9516-c69e94350ca8")}catch{}})();const qe={class:"relative inline-block"},Qe={key:0,class:"absolute -top-1.5 -right-1.5 min-w-5 h-5 px-1 rounded-md bg-primary-accessible text-white text-xs font-semibold flex items-center justify-center pointer-events-none"},Ye={class:"grid grid-cols-2 gap-3"},Je={class:"grid grid-cols-2 gap-3"},Ke=L({__name:"PostsFilters",props:{filterData:{},modelValue:{}},emits:["update:modelValue","apply"],setup(t,{emit:p}){const{t:l}=B(),u=t,g=p,m=F(null),c=E({...u.modelValue});N(()=>u.modelValue,n=>Object.assign(c,n),{deep:!0});const k=V(()=>new Date().toISOString().slice(0,10)),h=V(()=>[{value:"",label:l("archive.filterAllCampaigns")},...u.filterData.campaigns.map(n=>({value:String(n.id),label:n.title}))]),i=V(()=>[{value:"",label:l("archive.filterAllStatuses")},...u.filterData.states.map(n=>({value:n.id,label:n.title}))]),U=V(()=>Object.values(u.modelValue).filter(n=>n!==""&&n!==null&&n!==void 0).length),S=()=>{g("update:modelValue",{...c}),g("apply"),m.value?.close()},I=()=>{const n={created_date_from:"",created_date_to:"",published_date_from:"",published_date_to:"",campaign_id:"",publish_status:""};Object.assign(c,n),g("update:modelValue",n),g("apply"),m.value?.close()};return(n,a)=>{const r=_e,P=be,T=ge,f=he,M=de,O=ve;return s(),D(O,{ref_key:"dropdown",ref:m,align:"left","close-on-select":!1,width:460},{trigger:w(({toggle:v,open:j})=>[d("div",qe,[o(r,{active:j,title:e(l)("archive.filterApply"),onClick:v},{default:w(()=>[o(e(Ue),{class:"w-5 h-5"})]),_:1},8,["active","title","onClick"]),e(U)>0?(s(),b("span",Qe,y(e(U)),1)):$("",!0)])]),default:w(()=>[d("div",{class:"px-6 pt-6 pb-5 space-y-5",onClick:a[6]||(a[6]=R(()=>{},["stop"]))},[o(T,{label:e(l)("archive.filterCreatedDate")},{default:w(()=>[d("div",Ye,[o(P,{modelValue:e(c).created_date_from,"onUpdate:modelValue":a[0]||(a[0]=v=>e(c).created_date_from=v),type:"date"},null,8,["modelValue"]),o(P,{modelValue:e(c).created_date_to,"onUpdate:modelValue":a[1]||(a[1]=v=>e(c).created_date_to=v),type:"date",max:e(k)},null,8,["modelValue","max"])])]),_:1},8,["label"]),o(f,{"model-value":String(e(c).campaign_id),label:e(l)("archive.filterCampaign"),options:e(h),"onUpdate:modelValue":a[2]||(a[2]=v=>e(c).campaign_id=v)},null,8,["model-value","label","options"]),o(f,{modelValue:e(c).publish_status,"onUpdate:modelValue":a[3]||(a[3]=v=>e(c).publish_status=v),label:e(l)("archive.filterStatus"),options:e(i)},null,8,["modelValue","label","options"]),o(T,{label:e(l)("archive.filterPublishedDate")},{default:w(()=>[d("div",Je,[o(P,{modelValue:e(c).published_date_from,"onUpdate:modelValue":a[4]||(a[4]=v=>e(c).published_date_from=v),type:"date"},null,8,["modelValue"]),o(P,{modelValue:e(c).published_date_to,"onUpdate:modelValue":a[5]||(a[5]=v=>e(c).published_date_to=v),type:"date"},null,8,["modelValue"])])]),_:1},8,["label"])]),d("div",{class:"px-6 py-4 bg-gray-50/50 border-t border-gray-100 flex items-center gap-3 rounded-b-2xl",onClick:a[7]||(a[7]=R(()=>{},["stop"]))},[o(M,{variant:"outline","full-width":"",onClick:I},{default:w(()=>[G(y(e(l)("archive.filterReset")),1)]),_:1}),o(M,{variant:"primary","full-width":"",onClick:S},{default:w(()=>[G(y(e(l)("archive.filterApply")),1)]),_:1})])]),_:1},512)}}}),We=Object.assign(Ke,{__name:"PostsFilters"});function Xe(t,p){return s(),b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{"fill-rule":"evenodd",d:"M12 2.25a.75.75 0 0 1 .75.75v11.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 1 1 1.06-1.06l3.22 3.22V3a.75.75 0 0 1 .75-.75Zm-9 13.5a.75.75 0 0 1 .75.75v2.25a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5V16.5a.75.75 0 0 1 1.5 0v2.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V16.5a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}function et(t,p){return s(),b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[d("path",{d:"M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z"}),d("path",{"fill-rule":"evenodd",d:"m3.087 9 .54 9.176A3 3 0 0 0 6.62 21h10.757a3 3 0 0 0 2.995-2.824L20.913 9H3.087ZM12 10.5a.75.75 0 0 1 .75.75v4.94l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72v-4.94a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}const tt=["data-post-id"],ot={class:"group relative aspect-square bg-slate-50"},at=["src"],lt={key:1,class:"absolute inset-0 flex items-center justify-center"},st={class:"absolute right-2 top-2 flex items-center justify-end gap-2"},nt={class:"flex items-center gap-1.5 opacity-0 transition-opacity duration-150 group-hover:opacity-100 focus-within:opacity-100"},it=["href","download","aria-label"],rt=["href","download","aria-label"],dt={key:2,class:"inline-flex h-6 items-center rounded-md bg-black/60 px-2 text-label font-semibold leading-none text-white"},ct={class:"flex flex-1 flex-col gap-2 p-3"},pt={class:"flex items-start justify-between gap-2"},mt=["title"],ut={key:0,class:"mt-0.5 text-xs text-slate-400"},ft={class:"text-xs text-slate-400"},_t={key:2,class:"flex flex-1 flex-col items-center justify-center gap-1 rounded-lg border border-dashed border-slate-200 px-3 py-4 text-center"},bt={class:"text-xs text-slate-400"},gt={class:"mt-auto flex items-center justify-between gap-2 border-t border-slate-50 pt-2"},ht={class:"min-w-0 text-xs text-slate-400"},vt={class:"whitespace-nowrap text-xs font-semibold text-slate-800"},xt={key:0,class:"block truncate"},yt=L({__name:"PostItemGrid",props:{post:{},stateLabel:{}},emits:["duplicate","remove","retryChannel","manuallyPublishChannel","editChannel"],setup(t,{emit:p}){const l=t,u=p,{t:g}=B(),{stateName:m,creatorName:c,campaignName:k}=Ee(),h=V(()=>(l.post.templates??[]).filter(a=>!!a.stream_url).sort((a,r)=>a.sort-r.sort)),i=V(()=>h.value.map(a=>({url:a.stream_url,isImage:a.type==="image"}))),U=V(()=>h.value.length>1),S=V(()=>!l.post.campaign||typeof l.post.campaign=="string"?null:l.post.campaign.template_preview_image_url??null),I=V(()=>(l.post.channels?.length??0)>0),n=V(()=>l.post.abilities&&"can_be_edited"in l.post.abilities?!!l.post.abilities.can_be_edited:!!l.post.actions?.edit);return(a,r)=>{const P=Re,T=Le;return s(),b("div",{"data-post-id":t.post.id,class:"flex flex-col overflow-hidden rounded-xl border border-slate-100 bg-white shadow-sm"},[d("div",ot,[o(P,{items:i.value,mode:"fill","show-counter":!1,class:"absolute inset-0"},{empty:w(()=>[S.value?(s(),b("img",{key:0,src:S.value,alt:"",loading:"lazy",class:"absolute inset-0 h-full w-full object-contain"},null,8,at)):(s(),b("div",lt,[o(e(Be),{class:"w-10 h-10 text-slate-300"})]))]),default:w(({index:f,count:M})=>[d("div",st,[d("div",nt,[h.value[f]?.download_url?(s(),b("a",{key:0,href:h.value[f].download_url,download:t.post.title||"",class:"inline-flex h-6 w-6 items-center justify-center rounded-md bg-black/60 text-white transition-colors hover:bg-black/75","aria-label":e(g)("archive.download"),onClick:r[0]||(r[0]=R(()=>{},["stop"]))},[o(e(Xe),{class:"w-3.5 h-3.5"})],8,it)):$("",!0),U.value&&t.post.templates_download_url?(s(),b("a",{key:1,href:t.post.templates_download_url,download:t.post.title||"",class:"inline-flex h-6 w-6 items-center justify-center rounded-md bg-black/60 text-white transition-colors hover:bg-black/75","aria-label":e(g)("archive.downloadAll"),onClick:r[1]||(r[1]=R(()=>{},["stop"]))},[o(e(et),{class:"w-3.5 h-3.5"})],8,rt)):$("",!0),M>1?(s(),b("span",dt,y(f+1)+"/"+y(M),1)):$("",!0)])])]),_:1},8,["items"])]),d("div",ct,[d("div",null,[d("div",pt,[d("span",{class:"min-w-0 flex-1 text-sm font-medium text-slate-800 break-words line-clamp-2",title:t.post.title||""},y(t.post.title||"—"),9,mt),o(Oe,{state:e(m)(t.post),label:t.stateLabel,class:"shrink-0"},null,8,["state","label"])]),e(k)(t.post)?(s(),b("div",ut,y(e(k)(t.post)),1
1)):$("",!0),t.post.approval?(s(),D(Se,{key:1,approval:t.post.approval},null,8,["approval"])):$("",!0)]),I.value?(s(),D(Me,{key:0,post:t.post,dense:"",onRetryChannel:r[2]||(r[2]=f=>u("retryChannel",f)),onManuallyPublishChannel:r[3]||(r[3]=f=>u("manuallyPublishChannel",f)),onEditChannel:r[4]||(r[4]=f=>u("editChannel",f))},null,8,["post"])):n.value?(s(),D(T,{key:1,to:`/posts/${t.post.id}/edit`,class:"flex flex-1 flex-col items-center justify-center gap-1 rounded-lg border border-dashed border-slate-200 px-3 py-4 text-center transition-colors hover:border-slate-300 hover:bg-slate-50"},{default:w(()=>[o(e(Q),{class:"w-5 h-5 text-slate-300"}),d("span",ft,y(e(g)("archive.noChannelsYet")),1)]),_:1},8,["to"])):(s(),b("div",_t,[o(e(Q),{class:"w-5 h-5 text-slate-300"}),d("span",bt,y(e(g)("archive.noChannelsYet")),1)])),d("div",gt,[d("div",ht,[d("span",vt,y(("formatDateTime"in a?a.formatDateTime:e(Fe))(t.post.created_at)),1),e(c)(t.post)?(s(),b("span",xt,y(e(g)("archive.by"))+" "+y(e(c)(t.post)),1)):$("",!0)]),o(Te,{post:t.post,class:"shrink-0",onDuplicate:r[5]||(r[5]=f=>u("duplicate",t.post)),onRemove:r[6]||(r[6]=f=>u("remove",t.post))},null,8,["post"])])])],8,tt)}}}),wt=Object.assign(yt,{__name:"PostsPostItemGrid"}),Ct={class:"overflow-hidden bg-white rounded-xl shadow-sm"},kt={key:0,class:"flex flex-wrap items-center justify-end gap-3 px-6 py-5 border-b border-slate-100"},Pt={key:1,class:"px-6 py-12 flex justify-center"},Vt={key:3,class:"grid grid-cols-1 gap-4 p-5 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"},$t=L({__name:"PostsGrid",props:{posts:{},loading:{type:Boolean},stateLabel:{type:Function}},emits:["duplicate","remove","retryChannel","manuallyPublishChannel","editChannel"],setup(t,{emit:p}){const l=p,{t:u}=B();return(g,m)=>{const c=Y,k=Ae;return s(),b("div",Ct,[g.$slots.toolbar?(s(),b("div",kt,[Z(g.$slots,"toolbar")])):$("",!0),t.loading&&t.posts.length===0?(s(),b("div",Pt,[o(c,{size:"lg",tone:"primary"})])):!t.loading&&t.posts.length===0?(s(),D(k,{key:2,title:e(u)("archive.noPostsFound"),description:e(u)("archive.noPostsFoundDescription")},{icon:w(()=>[o(e(je),{class:"w-12 h-12 text-slate-300"})]),_:1},8,["title","description"])):(s(),b("div",Vt,[(s(!0),b(xe,null,ye(t.posts,h=>(s(),D(wt,{key:h.id,post:h,"state-label":t.stateLabel(h),onDuplicate:m[0]||(m[0]=i=>l("duplicate",i)),onRemove:m[1]||(m[1]=i=>l("remove",i)),onRetryChannel:m[2]||(m[2]=i=>l("retryChannel",i)),onManuallyPublishChannel:m[3]||(m[3]=i=>l("manuallyPublishChannel",i)),onEditChannel:m[4]||(m[4]=i=>l("editChannel",i))},null,8,["post","state-label"]))),128))])),Z(g.$slots,"footer")])}}}),Dt=Object.assign($t,{__name:"PostsGrid"}),Ut={class:"w-full flex items-center gap-3"},St={class:"text-xs text-slate-400"},Mt={class:"sr-only"},Fo=L({__name:"index",setup(t){const{t:p}=B();we({title:()=>p("archive.title")});const l=Ce(),u=ke("posts_view_mode",{default:()=>"list"}),g=V(()=>[{value:"list",label:p("archive.viewList")},{value:"grid",label:p("archive.viewTiles")}]),m=F(""),c=F("");let k=null;const h=F({created_date_from:"",created_date_to:"",published_date_from:"",published_date_to:"",campaign_id:"",publish_status:""}),i=E({field:"created_at",direction:"desc"}),U=E({campaigns:[],states:[]}),S=He({filters:h,sort:i,debouncedSearch:c}),{posts:I,pagination:n,loading:a,duplicateModal:r,deleteModal:P,copyTargetCompanies:T,fetchPosts:f,handleDuplicate:M,handleDelete:O,handleRenameTitle:v}=S,j=Ge(()=>S.fetchPosts({checkPolling:!0})),{stateLabel:J,labelForStatus:K}=Ne(),W=_=>{i.field===_?i.direction==="desc"?(i.field=null,i.direction=null):i.direction=i.direction==="asc"?"desc":"asc":(i.field=_,i.direction="asc"),n.current_page=1,f({checkPolling:!1})},H=_=>{n.current_page=_,f({checkPolling:!1})};N(m,_=>{k&&clearTimeout(k),k=setTimeout(()=>{c.value=_,n.current_page=1,f({checkPolling:!1})},500)});const X=_=>{if(_.is_using_old_template){l.warning(p("archive.duplicateOldTemplate"));return}r.post=_,r.open=!0},ee=_=>{P.post=_,P.open=!0},A=Pe();return N(()=>[A.campaigns,A.postStates],()=>{U.campaigns=A.campaigns.map(_=>({id:_.id,title:_.title})),U.states=A.postStates.map(_=>({id:_.value,title:K(_.value)}))},{deep:!0,immediate:!0}),Ve(()=>{f({checkPolling:!0})}),$e(()=>{k&&clearTimeout(k)}),(_,x)=>{const te=ie,oe=re,ae=Y,le=ce,se=pe,ne=me;return s(),b("div",null,[o(te,{title:e(p)("archive.title")},null,8,["title"]),(s(),D(q(e(u)==="grid"?Dt:Ie),De({posts:e(I),loading:e(a),"state-label":e(J)},e(u)==="grid"?{}
1:{sortField:e(i).field,sortDirection:e(i).direction},{onToggleSort:W,onDuplicate:X,onRemove:ee,onRename:e(v),onRetryChannel:e(j).openRetryChannelModal,onManuallyPublishChannel:e(j).openManualPublishChannelModal,onEditChannel:e(j).openEditChannelModal}),{toolbar:w(()=>[d("div",Ut,[o(oe,{modelValue:e(m),"onUpdate:modelValue":x[0]||(x[0]=C=>z(m)?m.value=C:null),placeholder:e(p)("common.search")+"..."},null,8,["modelValue","placeholder"]),o(We,{modelValue:e(h),"onUpdate:modelValue":x[1]||(x[1]=C=>z(h)?h.value=C:null),"filter-data":e(U),onApply:x[2]||(x[2]=C=>H(1))},null,8,["modelValue","filter-data"]),x[6]||(x[6]=d("div",{class:"flex-1"},null,-1)),e(a)?(s(),D(ae,{key:0,size:"xs",tone:"primary"})):$("",!0),d("span",St,y(e(p)("archive.postsCount",{count:e(n).total})),1),o(le,{options:e(g),"model-value":e(u),"onUpdate:modelValue":x[3]||(x[3]=C=>u.value=C)},{option:w(({option:C})=>[(s(),D(q(C.value==="list"?e(ue):e(fe)),{class:"w-4 h-4"})),d("span",Mt,y(C.label),1)]),_:1},8,["options","model-value"])])]),footer:w(()=>[o(se,{"current-page":e(n).current_page,"total-pages":e(n).last_page,"total-items":e(n).total,"per-page":e(n).per_page,"onUpdate:currentPage":H},null,8,["current-page","total-pages","total-items","per-page"])]),_:1},16,["posts","loading","state-label","onRename","onRetryChannel","onManuallyPublishChannel","onEditChannel"])),o(ne,{modelValue:e(P).open,"onUpdate:modelValue":x[4]||(x[4]=C=>e(P).open=C),title:e(p)("archive.deleteTitle"),message:e(p)("archive.deleteMessage"),"confirm-text":e(p)("archive.deleteConfirm"),"cancel-text":e(p)("common.cancel"),"confirm-variant":"danger",loading:e(P).loading,onConfirm:e(O)},null,8,["modelValue","title","message","confirm-text","cancel-text","loading","onConfirm"]),o(Ze,{controller:e(j)},null,8,["controller"]),o(ze,{open:e(r).open,"onUpdate:open":x[5]||(x[5]=C=>e(r).open=C),loading:e(r).loading,companies:e(T),onConfirm:e(M)},null,8,["open","loading","companies","onConfirm"])])}}});export{Fo as default};

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.