1import{c as ua,u as Zl,r as es,j as t,H as ha,L as ts,a as sa}from"./app-BpT6DH02.js";import{i as fa,a as xa,b as pa,c as ga,u as ba,E as ja}from"./index-Km6tiglr.js";import{I as p}from"./input-error-BK624s4c.js";import{B as m}from"./app-logo-icon-Dl3SjgHu.js";import{C as ea}from"./checkbox-DtCGETjn.js";import{D as Kl,a as Ql,b as Vl,c as Wl,d as Xl,e as Yl}from"./dialog-PYBwPh2X.js";import{I as k}from"./input-DTixfyQH.js";import{L as y}from"./label-0IMCl6Ez.js";import{X as Cl,A as _a}from"./app-layout-1TP_UiSE.js";import{r as ya}from"./resolve-pagination-url-CPdygg1n.js";import{P as ta}from"./paperclip-CA7NdmE5.js";import{I as va}from"./image-plus-BBL-3bHD.js";import{B as Na,I as Sa,U as wa,L as Ca,a as ka,Q as Pa,b as Da,c as La,R as Ta}from"./undo-2-D4opxgOE.js";import{P as Fa}from"./plus-Ccb-McPl.js";/* empty css */import"./index-B3Y0mg0N.js";import"./check-Dy7Ydkby.js";import"./index-CuLd4fV3.js";const Gl=[{value:"draft",label:"Draft"},{value:"publish",label:"Publish"},{value:"unpublish",label:"Unpublish"}],Ia=[{title:"Product",href:"/admin/product"}],Ua=[{value:"post",label:"Post"},{value:"profil_agronomis",label:"Profile Agronomis"},{value:"event-online",label:"Event Online"},{value:"product",label:"Product"},{value:"resume-product",label:"Resume Product"},{value:"podcast-category",label:"Podcast Category"},{value:"podcast-playlist",label:"Podcast Playlist"},{value:"npk-mutiara-tv-category",label:"NPK Mutiara TV Category"},{value:"npk-mutiara-tv-playlist",label:"NPK Mutiara TV Playlist"},{value:"pages",label:"Pages"},{value:"brosur",label:"Brosur"},{value:"multimedia",label:"Multimedia"},{value:"career",label:"Career"},{value:"testimoni",label:"Testimoni"},{value:"testimoni-webinar-category",label:"Testimoni Webinar Category"},{value:"faq",label:"FAQ"},{value:"ads",label:"Ads"},{value:"content_yt",label:"Content YT"},{value:"defisiensi-unsur-hara",label:"Defisiensi Unsur Hara"}];function ci(n){const e=ua.c(484),{mediaItems:h,fileItems:w,categories:kl,authors:P,posts:b,editingPost:d,filters:u}=n;let ds,os;e[0]===Symbol.for("react.memo_cache_sentinel")?(ds=[],os=[],e[0]=ds,e[1]=os):(ds=e[0],os=e[1]);let ms;e[2]===Symbol.for("react.memo_cache_sentinel")?(ms={title:"",summary:"",content:"",status:"draft",publish_date:"",posttype:"product",featured_media_id:null,media_ids:ds,category_ids:os,attachment_id:null,tags:[],author_custom:"",push_notif:!1},e[2]=ms):ms=e[2];const Jl=ms,{data:l,setData:i,post:Pl,put:Dl,processing:Ll,errors:c,reset:Tl}=Zl(Jl),Fl=u?.search??"",Il=u?.status??"all",Ul=u?.author??"";let us;e[3]!==Fl||e[4]!==Il||e[5]!==Ul?(us={search:Fl,status:Il,author:Ul},e[3]=Fl,e[4]=Il,e[5]=Ul,e[6]=us):us=e[6];const{data:o,setData:j,get:Al}=Zl(us);let hs;e[7]!==o.author||e[8]!==o.search||e[9]!==o.status||e[10]!==u?.direction||e[11]!==u?.sort?(hs=s=>{const a=u?.sort??"postdate",f=u?.direction??"desc",ma=a===s&&f==="asc"?"desc":"asc",Zt=new URLSearchParams;return o.search&&Zt.set("search",o.search),o.status&&Zt.set("status",o.status),o.author&&Zt.set("author",o.author),Zt.set("sort",s),Zt.set("direction",ma),`/admin/product?${Zt.toString()}`},e[7]=o.author,e[8]=o.search,e[9]=o.status,e[10]=u?.direction,e[11]=u?.sort,e[12]=hs):hs=e[12];const fs=hs;let xs;e[13]!==u?.direction||e[14]!==u?.sort?(xs=s=>{const a=u?.sort??"postdate",f=u?.direction??"desc";return a!==s?null:t.jsx("span",{className:"ml-1 text-[10px] uppercase text-slate-400",children:f==="asc"?"â²":"â¼"})},e[13]=u?.direction,e[14]=u?.sort,e[15]=xs):xs=e[15];const x=xs,[_,ss]=es.useState(""),[D,la]=es.useState(""),[L,aa]=es.useState(""),[T,ia]=es.useState("");let ps;e[16]===Symbol.for("react.memo_cache_sentinel")?(ps=[fa,xa,pa.configure({placeholder:"Tulis konten di sini..."}),ga.configure({openOnClick:!1,autolink:!0,linkOnPaste:!0})],e[16]=ps):ps=e[16];let gs;e[17]!==l.content||e[18]!==i?(gs={extensions:ps,content:l.content,onUpdate(s){const{editor:a}=s;i("content",a.getHTML())}},e[17]=l.content,e[18]=i,e[19]=gs):gs=e[19];const r=ba(gs);let bs,js;e[20]!==l.content||e[21]!==r?(bs=()=>{r&&l.content!==r.getHTML()&&r.commands.setContent(l.content||"",{emitUpdate:!1})},js=[l.content,r],e[20]=l.content,e[21]=r,e[22]=bs,e[23]=js):(bs=e[22],js=e[23]),es.useEffect(bs,js);let _s;e[24]!==l.featured_media_id||e[25]!==h.data?(_s=h.data.find(s=>s.id===l.featured_media_id)??null,e[24]=l.featured_media_id,e[25]=h.data,e[26]=_s):_s=e[26];const C=_s;let ls;if(e[27]!==D||e[28]!==h.data){e:{const s=D.trim().toLowerCase();if(!s){ls=h.data;break e}ls=h.data.filter(a=>a.title.toLowerCase().includes(s))}e[27]=D,e[28]=h.data,e[29]=ls}else ls=e[29];const F=ls;let ys;if(e[30]!==l.media_ids||e[31]!==h.data){let s;e[33]!==l.media_ids?(s=a=>l.media_ids.includes(a.id),e[33]=l.media_ids,e[34]=s):s=e[34],ys=h.data.filter(s),e[30]=l.media_ids,e[31]=h.data,e[32]=ys}else ys=e[32];const vs=ys;let as;if(e[35]!==h.data||e[36]!==T){e:{const s=T.trim().toLowerCase();if(!s){as=h.data;break e}as=h.data.filter(a=>a.title.toLowerCase().includes(s))}
1e[35]=h.data,e[36]=T,e[37]=as}else as=e[37];const I=as;let Ns;e[38]!==l.attachment_id||e[39]!==w?(Ns=w.find(s=>s.id===l.attachment_id)??null,e[38]=l.attachment_id,e[39]=w,e[40]=Ns):Ns=e[40];const is=Ns;let rs;if(e[41]!==L||e[42]!==w){e:{const s=L.trim().toLowerCase();if(!s){rs=w;break e}rs=w.filter(a=>a.title.toLowerCase().includes(s))}e[41]=L,e[42]=w,e[43]=rs}else rs=e[43];const U=rs;let v,N,A,g;e[44]!==d||e[45]!==r?.commands||e[46]!==Pl||e[47]!==Dl||e[48]!==Tl||e[49]!==i?(A=s=>{if(s.preventDefault(),d?.id){Dl(`/admin/product/${d.id}`,{onSuccess:()=>{ss("")}});return}Pl("/admin/product",{onSuccess:()=>{g()}})},v=Ha,N=Oa,g=()=>{Tl(),i(Jl),ss(""),r?.commands.setContent("",{emitUpdate:!1})},e[44]=d,e[45]=r?.commands,e[46]=Pl,e[47]=Dl,e[48]=Tl,e[49]=i,e[50]=v,e[51]=N,e[52]=A,e[53]=g):(v=e[50],N=e[51],A=e[52],g=e[53]);let Ss;e[54]!==l.category_ids||e[55]!==i?(Ss=s=>{if(l.category_ids.includes(s)){i("category_ids",l.category_ids.filter(a=>a!==s));return}i("category_ids",[...l.category_ids,s])},e[54]=l.category_ids,e[55]=i,e[56]=Ss):Ss=e[56];const ns=Ss;let ws;e[57]!==l.media_ids||e[58]!==i?(ws=s=>{if(l.media_ids.includes(s)){i("media_ids",l.media_ids.filter(a=>a!==s));return}i("media_ids",[...l.media_ids,s])},e[57]=l.media_ids,e[58]=i,e[59]=ws):ws=e[59];const S=ws;let Cs;e[60]!==l.tags||e[61]!==i?(Cs=s=>{const a=s.trim();a&&(l.tags.includes(a)||i("tags",[...l.tags,a]),ss(""))},e[60]=l.tags,e[61]=i,e[62]=Cs):Cs=e[62];const B=Cs;let ks;e[63]!==B||e[64]!==_?(ks=s=>{(s.key==="Enter"||s.key===",")&&(s.preventDefault(),B(_))},e[63]=B,e[64]=_,e[65]=ks):ks=e[65];const Bl=ks;let Ps;e[66]!==l.tags||e[67]!==i?(Ps=s=>{i("tags",l.tags.filter(a=>a!==s))},e[66]=l.tags,e[67]=i,e[68]=Ps):Ps=e[68];const cs=Ps;let Ds;e[69]!==d||e[70]!==g||e[71]!==i?(Ds=()=>{if(!d){g();return}i({title:d.title??"",summary:d.summary??"",content:d.content??"",status:d.status??"draft",publish_date:d.publish_date??"",posttype:"product",featured_media_id:d.featured_media_id??null,media_ids:d.media_ids??[],category_ids:d.category_ids??[],attachment_id:d.attachment_id??null,tags:d.tags??[],author_custom:d.author_custom??"",push_notif:!1}),ss("")},e[69]=d,e[70]=g,e[71]=i,e[72]=Ds):Ds=e[72];const El=Ds;let Ls;e[73]!==El?(Ls=()=>{El()},e[73]=El,e[74]=Ls):Ls=e[74];const $l=d?.id;let Ts;e[75]!==$l?(Ts=[$l],e[75]=$l,e[76]=Ts):Ts=e[76],es.useEffect(Ls,Ts);let Fs;e[77]===Symbol.for("react.memo_cache_sentinel")?(Fs=t.jsx(ha,{title:"Product"}),e[77]=Fs):Fs=e[77];let Is;e[78]===Symbol.for("react.memo_cache_sentinel")?(Is=t.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.3em] text-slate-400",children:"Product"}),e[78]=Is):Is=e[78];const Ml=d?.id?"Edit Product":"Create Product";let E;e[79]!==Ml?(E=t.jsx("h1",{className:"mt-2 text-2xl font-semibold text-slate-900",children:Ml}),e[79]=Ml,e[80]=E):E=e[80];let Us;e[81]===Symbol.for("react.memo_cache_sentinel")?(Us=t.jsx("p",{className:"mt-2 max-w-2xl text-sm text-slate-600",children:"Tambahkan product dengan media, kategori, dan tag."}),e[81]=Us):Us=e[81];let $;e[82]!==E?($=t.jsxs("div",{children:[Is,E,Us]}),e[82]=E,e[83]=$):$=e[83];let As;e[84]===Symbol.for("react.memo_cache_sentinel")?(As=t.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-slate-900 text-white",children:t.jsx(va,{className:"h-6 w-6"})}),e[84]=As):As=e[84];let M;e[85]!==$?(M=t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[$,As]}),e[85]=$,e[86]=M):M=e[86];let Bs;e[87]===Symbol.for("react.memo_cache_sentinel")?(Bs=t.jsx(y,{htmlFor:"title",children:"Title"}),e[87]=Bs):Bs=e[87];let z;e[88]!==i?(z=s=>i("title",s.target.value),e[88]=i,e[89]=z):z=e[89];let R;e[90]!==l.title||e[91]!==z?(R=t.jsx(k,{id:"title",name:"title",value:l.title,onChange:z}),e[90]=l.title,e[91]=z,e[92]=R):R=e[92];let O;e[93]!==c.title?(O=t.jsx(p,{message:c.title}),e[93]=c.title,e[94]=O):O=e[94];let H;e[95]!==R||e[96]!==O?(H=t.jsxs("div",{className:"grid gap-2",children:[Bs,R,O]}),e[95]=R,e[96]=O,e[97]=H):H=e[97];let Es;e[98]===Symbol.for("react.memo_cache_sentinel")?(Es=t.jsx(y,{htmlFor:"author_custom",children:"Author"}),e[98]=Es):Es=e[98];const ra=l.author_custom;let q;e[99]!==i?(q=s=>i("author_custom",s.target.value?Number(s.target.value):""),e[99]=i,e[100]=q):q=e[100];let $s;e[101]===Symbol.for("react.memo_cache_sentinel")?($s=t.jsx("option",{value:"",children:"Pilih author"}),e[101]=$s):$s=e[101];let K;e[102]!==P?(K=P.map(Ra),e[102]=P,e[103]=K):K=e[103];let Q;e[104]!==l.author_custom||e[105]!==q||e[106]!==K?(Q=t.jsxs("select",{id:"author_custom",n
1ame:"author_custom",value:ra,onChange:q,className:"h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm",children:[$s,K]}),e[104]=l.author_custom,e[105]=q,e[106]=K,e[107]=Q):Q=e[107];let V;e[108]!==c.author_custom?(V=t.jsx(p,{message:c.author_custom}),e[108]=c.author_custom,e[109]=V):V=e[109];let W;e[110]!==Q||e[111]!==V?(W=t.jsxs("div",{className:"grid gap-2",children:[Es,Q,V]}),e[110]=Q,e[111]=V,e[112]=W):W=e[112];let X;e[113]!==H||e[114]!==W?(X=t.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[H,W]}),e[113]=H,e[114]=W,e[115]=X):X=e[115];let Ms;e[116]===Symbol.for("react.memo_cache_sentinel")?(Ms=t.jsx(y,{htmlFor:"summary",children:"Summary"}),e[116]=Ms):Ms=e[116];let Y;e[117]!==i?(Y=s=>i("summary",s.target.value),e[117]=i,e[118]=Y):Y=e[118];let G;e[119]!==l.summary||e[120]!==Y?(G=t.jsx("textarea",{id:"summary",name:"summary",value:l.summary,onChange:Y,className:"min-h-[90px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm"}),e[119]=l.summary,e[120]=Y,e[121]=G):G=e[121];let J;e[122]!==c.summary?(J=t.jsx(p,{message:c.summary}),e[122]=c.summary,e[123]=J):J=e[123];let Z;e[124]!==G||e[125]!==J?(Z=t.jsxs("div",{className:"grid gap-2",children:[Ms,G,J]}),e[124]=G,e[125]=J,e[126]=Z):Z=e[126];let zs;e[127]===Symbol.for("react.memo_cache_sentinel")?(zs=t.jsx(y,{htmlFor:"content",children:"Content (Rich Editor)"}),e[127]=zs):zs=e[127];let ee;e[128]!==r?(ee=()=>r?.chain().focus().toggleBold().run(),e[128]=r,e[129]=ee):ee=e[129];let Rs;e[130]===Symbol.for("react.memo_cache_sentinel")?(Rs=t.jsx(Na,{className:"h-4 w-4"}),e[130]=Rs):Rs=e[130];let te;e[131]!==ee?(te=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:ee,"aria-label":"Bold",children:Rs}),e[131]=ee,e[132]=te):te=e[132];let se;e[133]!==r?(se=()=>r?.chain().focus().toggleItalic().run(),e[133]=r,e[134]=se):se=e[134];let Os;e[135]===Symbol.for("react.memo_cache_sentinel")?(Os=t.jsx(Sa,{className:"h-4 w-4"}),e[135]=Os):Os=e[135];let le;e[136]!==se?(le=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:se,"aria-label":"Italic",children:Os}),e[136]=se,e[137]=le):le=e[137];let ae;e[138]!==r?(ae=()=>r?.chain().focus().toggleUnderline().run(),e[138]=r,e[139]=ae):ae=e[139];let Hs;e[140]===Symbol.for("react.memo_cache_sentinel")?(Hs=t.jsx(wa,{className:"h-4 w-4"}),e[140]=Hs):Hs=e[140];let ie;e[141]!==ae?(ie=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:ae,"aria-label":"Underline",children:Hs}),e[141]=ae,e[142]=ie):ie=e[142];let re;e[143]!==r?(re=()=>r?.chain().focus().toggleBulletList().run(),e[143]=r,e[144]=re):re=e[144];let qs;e[145]===Symbol.for("react.memo_cache_sentinel")?(qs=t.jsx(Ca,{className:"h-4 w-4"}),e[145]=qs):qs=e[145];let ne;e[146]!==re?(ne=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:re,"aria-label":"Bullet list",children:qs}),e[146]=re,e[147]=ne):ne=e[147];let ce;e[148]!==r?(ce=()=>r?.chain().focus().toggleOrderedList().run(),e[148]=r,e[149]=ce):ce=e[149];let Ks;e[150]===Symbol.for("react.memo_cache_sentinel")?(Ks=t.jsx(ka,{className:"h-4 w-4"}),e[150]=Ks):Ks=e[150];let de;e[151]!==ce?(de=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:ce,"aria-label":"Ordered list",children:Ks}),e[151]=ce,e[152]=de):de=e[152];let oe;e[153]!==r?(oe=()=>r?.chain().focus().toggleBlockquote().run(),e[153]=r,e[154]=oe):oe=e[154];let Qs;e[155]===Symbol.for("react.memo_cache_sentinel")?(Qs=t.jsx(Pa,{className:"h-4 w-4"}),e[155]=Qs):Qs=e[155];let me;e[156]!==oe?(me=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:oe,"aria-label":"Blockquote",children:Qs}),e[156]=oe,e[157]=me):me=e[157];let ue;e[158]!==r?(ue=()=>{const s=r?.getAttributes("link").href??"",a=window.prompt("URL",s);if(a!==null){if(a===""){r?.chain().focus().extendMarkRange("link").unsetLink().run();return}r?.chain().focus().extendMarkRange("link").setLink({href:a}).run()}},e[158]=r,e[159]=ue):ue=e[159];let Vs;e[160]===Symbol.for("react.memo_cache_sentinel")?(Vs=t.jsx(Da,{className:"h-4 w-4"}),e[160]=Vs):Vs=e[160];let he;e[161]!==ue?(he=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:ue,"aria-label":"Link",children:Vs}),e[161]=ue,e[162]=he):he=e[162];let fe;e[163]!==r?(fe=()=>
1r?.chain().focus().undo().run(),e[163]=r,e[164]=fe):fe=e[164];let Ws;e[165]===Symbol.for("react.memo_cache_sentinel")?(Ws=t.jsx(La,{className:"h-4 w-4"}),e[165]=Ws):Ws=e[165];let xe;e[166]!==fe?(xe=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:fe,"aria-label":"Undo",children:Ws}),e[166]=fe,e[167]=xe):xe=e[167];let pe;e[168]!==r?(pe=()=>r?.chain().focus().redo().run(),e[168]=r,e[169]=pe):pe=e[169];let Xs;e[170]===Symbol.for("react.memo_cache_sentinel")?(Xs=t.jsx(Ta,{className:"h-4 w-4"}),e[170]=Xs):Xs=e[170];let ge;e[171]!==pe?(ge=t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:pe,"aria-label":"Redo",children:Xs}),e[171]=pe,e[172]=ge):ge=e[172];let be;e[173]!==xe||e[174]!==ge?(be=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[xe,ge]}),e[173]=xe,e[174]=ge,e[175]=be):be=e[175];let je;e[176]!==te||e[177]!==le||e[178]!==ie||e[179]!==ne||e[180]!==de||e[181]!==me||e[182]!==he||e[183]!==be?(je=t.jsxs("div",{className:"flex flex-wrap items-center gap-1 border-b border-input bg-muted/60 px-3 py-2",children:[te,le,ie,ne,de,me,he,be]}),e[176]=te,e[177]=le,e[178]=ie,e[179]=ne,e[180]=de,e[181]=me,e[182]=he,e[183]=be,e[184]=je):je=e[184];let _e;e[185]!==r?(_e=t.jsx(ja,{editor:r,className:"tiptap max-w-none px-4 py-3 text-sm text-foreground focus:outline-none"}),e[185]=r,e[186]=_e):_e=e[186];let ye;e[187]!==je||e[188]!==_e?(ye=t.jsxs("div",{className:"overflow-hidden rounded-xl border border-input bg-card text-card-foreground shadow-xs",children:[je,_e]}),e[187]=je,e[188]=_e,e[189]=ye):ye=e[189];let ve;e[190]!==c.content?(ve=t.jsx(p,{message:c.content}),e[190]=c.content,e[191]=ve):ve=e[191];let Ne;e[192]!==ye||e[193]!==ve?(Ne=t.jsxs("div",{className:"grid gap-2",children:[zs,ye,ve]}),e[192]=ye,e[193]=ve,e[194]=Ne):Ne=e[194];let Ys;e[195]===Symbol.for("react.memo_cache_sentinel")?(Ys=t.jsx(y,{htmlFor:"status",children:"Status"}),e[195]=Ys):Ys=e[195];const na=l.status;let Se;e[196]!==i?(Se=s=>i("status",s.target.value),e[196]=i,e[197]=Se):Se=e[197];let Gs;e[198]===Symbol.for("react.memo_cache_sentinel")?(Gs=Gl.map(za),e[198]=Gs):Gs=e[198];let we;e[199]!==l.status||e[200]!==Se?(we=t.jsx("select",{id:"status",name:"status",value:na,onChange:Se,className:"h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm",children:Gs}),e[199]=l.status,e[200]=Se,e[201]=we):we=e[201];let Ce;e[202]!==c.status?(Ce=t.jsx(p,{message:c.status}),e[202]=c.status,e[203]=Ce):Ce=e[203];let ke;e[204]!==we||e[205]!==Ce?(ke=t.jsxs("div",{className:"grid gap-2",children:[Ys,we,Ce]}),e[204]=we,e[205]=Ce,e[206]=ke):ke=e[206];let Js;e[207]===Symbol.for("react.memo_cache_sentinel")?(Js=t.jsx(y,{htmlFor:"publish_date",children:"Publish Date"}),e[207]=Js):Js=e[207];let Pe;e[208]!==i?(Pe=s=>i("publish_date",s.target.value),e[208]=i,e[209]=Pe):Pe=e[209];let De;e[210]!==l.publish_date||e[211]!==Pe?(De=t.jsx(k,{id:"publish_date",name:"publish_date",type:"date",value:l.publish_date,onChange:Pe}),e[210]=l.publish_date,e[211]=Pe,e[212]=De):De=e[212];let Le;e[213]!==c.publish_date?(Le=t.jsx(p,{message:c.publish_date}),e[213]=c.publish_date,e[214]=Le):Le=e[214];let Te;e[215]!==Le||e[216]!==De?(Te=t.jsxs("div",{className:"grid gap-2",children:[Js,De,Le]}),e[215]=Le,e[216]=De,e[217]=Te):Te=e[217];let Zs;e[218]===Symbol.for("react.memo_cache_sentinel")?(Zs=t.jsx(y,{htmlFor:"posttype",children:"Post Type"}),e[218]=Zs):Zs=e[218];const ca=l.posttype;let Fe;e[219]!==i?(Fe=s=>i("posttype",s.target.value),e[219]=i,e[220]=Fe):Fe=e[220];let el;e[221]===Symbol.for("react.memo_cache_sentinel")?(el=Ua.map(Ma),e[221]=el):el=e[221];let Ie;e[222]!==l.posttype||e[223]!==Fe?(Ie=t.jsx("select",{id:"posttype",name:"posttype",value:ca,onChange:Fe,className:"h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm",children:el}),e[222]=l.posttype,e[223]=Fe,e[224]=Ie):Ie=e[224];let Ue;e[225]!==c.posttype?(Ue=t.jsx(p,{message:c.posttype}),e[225]=c.posttype,e[226]=Ue):Ue=e[226];let Ae;e[227]!==Ie||e[228]!==Ue?(Ae=t.jsxs("div",{className:"grid gap-2",children:[Zs,Ie,Ue]}),e[227]=Ie,e[228]=Ue,e[229]=Ae):Ae=e[229];let Be;e[230]!==i?(Be=s=>i("push_notif",!!s),e[230]=i,e[231]=Be):Be=e[231];let Ee;e[232]!==l.push_notif||e[233]!==Be?(Ee=t.jsx(ea,{id:"push_notif",checked:l.push_notif,onCheckedChange:Be}),e[232]=l.push_notif,e[233]=Be,e[234]=Ee):Ee=e[234];let tl;e[235]===Symbol.for("react.memo_cache_sentinel")?(tl=t.jsx(y,{htmlFor:"push_notif",children:"Push notification"}),e[235]=tl):tl=e[235];let $e;e[236]!==Ee?($e=t.jsxs("div",{className:"flex items-center gap-2 pt-6",children:[Ee,tl]}),e[236]=Ee,e[237]=$e):$e=e[237];let Me;e[238]!==Te||e[239]!==Ae||e[240]!==$e||e[241]!==ke?(Me=t.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[ke,Te,Ae,$e]}),e[238]=Te,e[239]=Ae,e[240]=$e,e[241]=ke,e[242]=Me):Me=e[242];let sl;e[243]===Symbol.for("react.memo_cache_sentinel")?(sl=t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"Featured Image"}),t.jsx("p",{className:"text-xs text-slate-500",children:"Pilih satu media untuk thumbnail."})]}),e[243]=sl):sl=e[243];let ll;e[244]===Symbol.for("react.memo_cache_sentinel")?(ll=t.jsx(Kl,{asChild:!0,children:t.jsx(m,{type:"button",variant:"outline",children:"Choose"})}),e[244]=ll):ll=e[244];let al;e[245]===Symbol.for("react.memo_cache_sentinel")?(al=t.jsxs(Ql,{children:[t.jsx(Vl,{children:"Featured Image"}),t.jsx(Wl,{children:"Pilih satu media dari library."})]}),e[245]=al):al=e[245];let il;e[246]===Symbol.for("react.memo_cache_sentinel")?(il=s=>la(s.target.value),e[246]=il):il=e[246];let ze;e[247]!==D?(ze=t.jsx("div",{className:"mt-4",children:t.jsx(k,{value:D,onChange:il,placeholder:"Cari judul file..."})}),e[247]=D,e[248]=ze):ze=e[248];let Re;if(e[249]!==l.featured_media_id||e[250]!==F||e[251]!==i){let s;e[253]!==l.featured_media_id||e[254]!==i?(s=a=>{const f=a.id===l.featured_media_id;return t.jsxs("button",{type:"button",onClick:()=>i("featured_media_id",f?null:a.id),className:`overflow-hidden rounded-xl border text-left transition ${f?"border-slate-900 ring-2 ring-slate-900":"border-slate-200"}`,children:[t.jsx("div",{className:"h-52 w-full overflow-hidden bg-slate-100",children:t.jsx("img",{src:a.file_url,alt:a.title,className:"h-full w-full object-cover"})}),t.jsxs("div",{className:"p-3 text-xs text-slate-600",children:[t.jsx("p",{className:"font-semibold text-slate-900",children:a.title}),t.jsx("p",{className:"mt-1",children:a.mime})]})]},a.id)},e[253]=l.featured_media_id,e[254]=i,e[255]=s):s=e[255],Re=F.map(s),e[249]=l.featured_media_id,e[250]=F,e[251]=i,e[252]=Re}else Re=e[252];let Oe;e[256]!==F.length?(Oe=F.length===0?t.jsx("p",{className:"col-span-full text-center text-sm text-slate-500",children:"Tidak ada media ditemukan."}):null,e[256]=F.length,e[257]=Oe):Oe=e[257];let He;e[258]!==Re||e[259]!==Oe?(He=t.jsxs("div",{className:"grid max-h-[70vh] grid-cols-2 gap-4 overflow-y-auto sm:grid-cols-2 lg:grid-cols-3",children:[Re,Oe]}),e[258]=Re,e[259]=Oe,e[260]=He):He=e[260];let qe;e[261]!==ze||e[262]!==He?(qe=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[sl,t.jsxs(Xl,{children:[ll,t.jsxs(Yl,{className:"max-w-4xl",children:[al,ze,He]})]})]}),e[261]=ze,e[262]=He,e[263]=qe):qe=e[263];let Ke;e[264]!==C||e[265]!==i?(Ke=C?t.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-slate-200 p-3",children:[t.jsx("img",{src:C.file_url,alt:C.title,className:"h-14 w-14 roun
1ded-lg object-cover"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:C.title}),t.jsx("p",{className:"text-xs text-slate-500",children:C.mime})]}),t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:()=>i("featured_media_id",null),children:t.jsx(Cl,{className:"h-4 w-4"})})]}):t.jsx("p",{className:"text-xs text-slate-500",children:"Belum ada featured image dipilih."}),e[264]=C,e[265]=i,e[266]=Ke):Ke=e[266];let Qe;e[267]!==c.featured_media_id?(Qe=t.jsx(p,{message:c.featured_media_id}),e[267]=c.featured_media_id,e[268]=Qe):Qe=e[268];let Ve;e[269]!==qe||e[270]!==Ke||e[271]!==Qe?(Ve=t.jsxs("div",{className:"grid gap-3 rounded-2xl border border-slate-200 p-4",children:[qe,Ke,Qe]}),e[269]=qe,e[270]=Ke,e[271]=Qe,e[272]=Ve):Ve=e[272];let rl;e[273]===Symbol.for("react.memo_cache_sentinel")?(rl=t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"File Attachment"}),t.jsx("p",{className:"text-xs text-slate-500",children:"Pilih satu file dari library."})]}),e[273]=rl):rl=e[273];let nl;e[274]===Symbol.for("react.memo_cache_sentinel")?(nl=t.jsx(Kl,{asChild:!0,children:t.jsx(m,{type:"button",variant:"outline",children:"Choose"})}),e[274]=nl):nl=e[274];let cl;e[275]===Symbol.for("react.memo_cache_sentinel")?(cl=t.jsxs(Ql,{children:[t.jsx(Vl,{children:"Attachment"}),t.jsx(Wl,{children:"Pilih satu file yang akan di-attach."})]}),e[275]=cl):cl=e[275];let dl;e[276]===Symbol.for("react.memo_cache_sentinel")?(dl=s=>aa(s.target.value),e[276]=dl):dl=e[276];let We;e[277]!==L?(We=t.jsx("div",{className:"mt-4",children:t.jsx(k,{value:L,onChange:dl,placeholder:"Cari judul file..."})}),e[277]=L,e[278]=We):We=e[278];let Xe;if(e[279]!==l.attachment_id||e[280]!==U||e[281]!==i){let s;e[283]!==l.attachment_id||e[284]!==i?(s=a=>{const f=a.id===l.attachment_id;return t.jsxs("button",{type:"button",onClick:()=>i("attachment_id",f?null:a.id),className:`flex items-center gap-3 rounded-xl border p-3 text-left transition ${f?"border-slate-900 ring-2 ring-slate-900":"border-slate-200"}`,children:[t.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-slate-100 text-slate-600",children:t.jsx(ta,{className:"h-4 w-4"})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:a.title}),t.jsx("p",{className:"text-xs text-slate-500",children:a.mime})]})]},a.id)},e[283]=l.attachment_id,e[284]=i,e[285]=s):s=e[285],Xe=U.map(s),e[279]=l.attachment_id,e[280]=U,e[281]=i,e[282]=Xe}else Xe=e[282];let Ye;e[286]!==U.length?(Ye=U.length===0?t.jsx("p",{className:"text-center text-sm text-slate-500",children:"Tidak ada file ditemukan."}):null,e[286]=U.length,e[287]=Ye):Ye=e[287];let Ge;e[288]!==Xe||e[289]!==Ye?(Ge=t.jsxs("div",{className:"grid max-h-[60vh] gap-3 overflow-y-auto",children:[Xe,Ye]}),e[288]=Xe,e[289]=Ye,e[290]=Ge):Ge=e[290];let Je;e[291]!==We||e[292]!==Ge?(Je=t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[rl,t.jsxs(Xl,{children:[nl,t.jsxs(Yl,{className:"max-w-3xl",children:[cl,We,Ge]})]})]}),e[291]=We,e[292]=Ge,e[293]=Je):Je=e[293];let Ze;e[294]!==is||e[295]!==i?(Ze=is?t.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-slate-200 p-3",children:[t.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-slate-100 text-slate-600",children:t.jsx(ta,{className:"h-4 w-4"})}),t.jsxs("div",{className:"flex-1",children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:is.title}),t.jsx("p",{className:"text-xs text-slate-500",children:is.mime})]}),t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:()=>i("attachment_id",null),children:t.jsx(Cl,{className:"h-4 w-4"})})]}):t.jsx("p",{className:"text-xs text-slate-500",children:"Belum ada file dipilih."}),e[294]=is,e[295]=i,e[296]=Ze):Ze=e[296];let et;e[297]!==c.attachment_id?(et=t.jsx(p,{message:c.attachment_id}),e[297]=c.attachment_id,e[298]=et):et=e[298];let tt;e[299]!==Je||e[300]!==Ze||e[301]!==et?(tt=t.jsxs("div",{className:"grid gap-3 rounded-2xl border border-slate-200 p-4",children:[Je,Ze,et]}),e[299]=Je,e[300]=Ze,e[301]=et,e[302]=tt):tt=e[302];let st;e[303]!==Ve||e[304]!==tt?(st=t.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[Ve,tt]}),e[303]=Ve,e[304]=tt,e[305]=st):st=e[305];let ol;e[306]===Symbol.for("react.memo_cache_sentinel")?(ol=t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"Photo Slider"}),t.jsx("p",{className:"text-xs text-slate-500",children:"Pilih beberapa media untuk slider."})]}),e[306]=ol):ol=e[306];let ml;e[307]===Symbol.for("react.memo_cache_sentinel")?(ml=t.jsx(Kl,{asChild:!0,children:t.jsx(m,{type:"button",variant:"outline",children:"Add Media"})}),e[307]=ml):ml=e[307];let ul;e[308]===Symbol.for("react.memo_cache_sentinel")?(ul=t.jsxs(Ql,{children:[t.jsx(Vl,{children:"Media Slider"}),t.jsx(Wl,{children:"Pilih beberapa media untuk slider."})]}),e[308]=ul):ul=e[308];let hl;e[309]===Symbol.for("react.memo_cache_sentinel")?(hl=s=>ia(s.target.value),e[309]=hl):hl=e[309];let lt;e[310]!==T?(lt=t.jsx("div",{className:"mt-4",children:t.jsx(k,{value:T,onChange:hl,placeholder:"Cari judul file..."})}),e[310]=T,e[311]=lt):lt=e[311];let at;if(e[312]!==l.media_ids||e[313]!==I||e[314]!==S){let s;e[316]!==l.media_ids||e[317]!==S?(s=a=>{const f=l.media_ids.includes(a.id);return t.jsxs("button",{type:"button",onClick:()=>S(a.id),className:`overflow-hidden rounded-xl border text-left transition ${f?"border-slate-900 ring-2 ring-slate-900":"border-slate-200"}`,children:[t.jsx("div",{className:"h-44 w-full overflow-hidden bg-slate-100",children:t.jsx("img",{src:a.file_url,alt:a.title,className:"h-full w-full object-cover"})}),t.jsxs("div",{className:"p-3 text-xs text-slate-600",children:[t.jsx("p",{className:"font-semibold text-slate-900",children:a.title}),t.jsx("p",{className:"mt-1",children:a.mime})]})]},a.id)},e[316]=l.media_ids,e[317]=S,e[318]=s):s=e[318],at=I.map(s),e[312]=l.media_ids,e[313]=I,e[314]=S,e[315]=at}else at=e[315];let it;e[319]!==I.length?(it=I.length===0?t.jsx("p",{className:"col-span-full text-center text-sm text-slate-500",children:"Tidak ada media ditemukan."}):null,e[319]=I.length,e[320]=it):it=e[320];let rt;e[321]!==at||e[322]!==it?(rt=t.jsxs("div",{className:"grid max-h-[70vh] grid-cols-2 gap-4 overflow-y-auto sm:grid-cols-2 lg:grid-cols-3",children:[at,it]}),e[321]=at,e[322]=it,e[323]=rt):rt=e[323];let nt;e[324]!==lt||e[325]!==rt?(nt=t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[ol,t.jsxs(Xl,{children:[ml,t.jsxs(Yl,{className:"max-w-4xl",children:[ul,lt,rt]})]})]}),e[324]=lt,e[325]=rt,e[326]=nt):nt=e[326];let ct;e[327]!==vs||e[328]!==S?(ct=vs.length?t.jsx("div",{className:"flex flex-wrap gap-3",children:vs.map(s=>t.jsxs("div",{className:"flex items-center gap-3 rounded-xl border border-slate-200 p-3",children:[t.jsx("img",{src:s.file_url,alt:s.title,className:"h-12 w-12 rounded-lg object-cover"}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:s.title}),t.jsx("p",{className:"text-xs text-slate-500",children:s.mime})]}),t.jsx(m,{type:"button",variant:"ghost",size:"icon",onClick:()=>S(s.id),children:t.jsx(Cl,{className:"h-4 w-4"})})]},s.id))}):t.jsx("p",{className:"text-xs text-slate-500",children:"Belum ada media slider dipilih."}),e[327]=vs,e[328]=S,e[329]=ct):ct=e[329];let dt;e[330]!==c.media_ids?(dt=t.jsx(p,{message:c.media_ids}),e[330]=c.media_ids,e[331]=dt):dt=e[331];let ot;e[332]!==nt||e[333]!==ct||e[334]!==dt?(ot=t.jsxs("div",{className:"grid gap-3 rounded-2xl border border-slate-200 p-4",children:[nt,ct,dt]}),e[332]=nt,e[333]=ct,e[334]=dt,e[335]=ot):ot=e[335];let fl;e[336]===Symbol.for("react.memo_cache_sentinel")?(fl=t.jsx("p",{className:"text-sm font-semibold text-slate-900",children:"Post Categories"}),e[336]=fl):fl=e[336];let mt;if(e[337]!==kl||e[338]!==l.category_ids||e[339]!==ns){let s;e[341]!==l.category_ids||e[342]!==ns?(s=a=>t.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-700",children:[t.jsx(ea,{checked:l.category_ids.includes(a.id),onCheckedChange:()=>ns(a.id)}),a.category]},a.id),e[341]=l.category_ids,e[342]=ns,e[343]=s):s=e[343],mt=kl.map(s),e[337]=kl,e[338]=l.category_ids,e[339]=ns,e[340]=mt}else mt=e[340];let ut;e[344]!==mt?(ut=t.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:mt}),e[344]=mt,e[345]=ut):ut=e[345];let ht;
1e[346]!==c.category_ids?(ht=t.jsx(p,{message:c.category_ids}),e[346]=c.category_ids,e[347]=ht):ht=e[347];let ft;e[348]!==ut||e[349]!==ht?(ft=t.jsxs("div",{className:"grid gap-3 rounded-2xl border border-slate-200 p-4",children:[fl,ut,ht]}),e[348]=ut,e[349]=ht,e[350]=ft):ft=e[350];let xl;e[351]===Symbol.for("react.memo_cache_sentinel")?(xl=t.jsx(y,{htmlFor:"tags",children:"Tags"}),e[351]=xl):xl=e[351];let xt;if(e[352]!==l.tags||e[353]!==cs){let s;e[355]!==cs?(s=a=>t.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-slate-100 px-3 py-1 text-xs text-slate-700",children:[a,t.jsx("button",{type:"button",onClick:()=>cs(a),className:"text-slate-500 hover:text-slate-700",children:t.jsx(Cl,{className:"h-3 w-3"})})]},a),e[355]=cs,e[356]=s):s=e[356],xt=l.tags.map(s),e[352]=l.tags,e[353]=cs,e[354]=xt}else xt=e[354];let pt;e[357]!==xt?(pt=t.jsx("div",{className:"flex flex-wrap gap-2",children:xt}),e[357]=xt,e[358]=pt):pt=e[358];let pl;e[359]===Symbol.for("react.memo_cache_sentinel")?(pl=s=>ss(s.target.value),e[359]=pl):pl=e[359];let gt;e[360]!==Bl||e[361]!==_?(gt=t.jsx(k,{id:"tags",name:"tags",value:_,onChange:pl,onKeyDown:Bl,placeholder:"Ketik tag lalu Enter"}),e[360]=Bl,e[361]=_,e[362]=gt):gt=e[362];let bt;e[363]!==B||e[364]!==_?(bt=()=>B(_),e[363]=B,e[364]=_,e[365]=bt):bt=e[365];let gl;e[366]===Symbol.for("react.memo_cache_sentinel")?(gl=t.jsx(Fa,{className:"mr-2 h-4 w-4"}),e[366]=gl):gl=e[366];let jt;e[367]!==bt?(jt=t.jsxs(m,{type:"button",variant:"outline",onClick:bt,children:[gl,"Add"]}),e[367]=bt,e[368]=jt):jt=e[368];let _t;e[369]!==gt||e[370]!==jt?(_t=t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[gt,jt]}),e[369]=gt,e[370]=jt,e[371]=_t):_t=e[371];let yt;e[372]!==c.tags?(yt=t.jsx(p,{message:c.tags}),e[372]=c.tags,e[373]=yt):yt=e[373];let vt;e[374]!==pt||e[375]!==_t||e[376]!==yt?(vt=t.jsxs("div",{className:"grid gap-3 rounded-2xl border border-slate-200 p-4",children:[xl,pt,_t,yt]}),e[374]=pt,e[375]=_t,e[376]=yt,e[377]=vt):vt=e[377];const zl=d?.id?"Update Post":"Save Post";let Nt;e[378]!==Ll||e[379]!==zl?(Nt=t.jsx(m,{type:"submit",className:"rounded-xl bg-slate-900 text-white hover:bg-slate-800",disabled:Ll,children:zl}),e[378]=Ll,e[379]=zl,e[380]=Nt):Nt=e[380];let St;e[381]!==d?.id||e[382]!==g?(St=d?.id&&t.jsx(m,{type:"button",variant:"outline",onClick:g,children:"Cancel"}),e[381]=d?.id,e[382]=g,e[383]=St):St=e[383];let wt;e[384]!==Nt||e[385]!==St?(wt=t.jsxs("div",{className:"flex flex-wrap gap-2",children:[Nt,St]}),e[384]=Nt,e[385]=St,e[386]=wt):wt=e[386];let Ct;e[387]!==A||e[388]!==Me||e[389]!==st||e[390]!==ot||e[391]!==ft||e[392]!==vt||e[393]!==wt||e[394]!==X||e[395]!==Z||e[396]!==Ne?(Ct=t.jsxs("form",{onSubmit:A,className:"mt-6 grid gap-6",children:[X,Z,Ne,Me,st,ot,ft,vt,wt]}),e[387]=A,e[388]=Me,e[389]=st,e[390]=ot,e[391]=ft,e[392]=vt,e[393]=wt,e[394]=X,e[395]=Z,e[396]=Ne,e[397]=Ct):Ct=e[397];let kt;e[398]!==Ct||e[399]!==M?(kt=t.jsxs("section",{className:"rounded-3xl border border-sidebar-border/70 bg-card text-card-foreground p-6 shadow-sm",children:[M,Ct]}),e[398]=Ct,e[399]=M,e[400]=kt):kt=e[400];let bl;e[401]===Symbol.for("react.memo_cache_sentinel")?(bl=t.jsxs("div",{children:[t.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.3em] text-slate-400",children:"Product List"}),t.jsx("h2",{className:"mt-2 text-xl font-semibold text-slate-900",children:"Latest Products"})]}),e[401]=bl):bl=e[401];let Pt;e[402]!==Al?(Pt=s=>{s.preventDefault(),Al("/admin/product",{preserveState:!0})},e[402]=Al,e[403]=Pt):Pt=e[403];let Dt;e[404]!==j?(Dt=s=>j("search",s.target.value),e[404]=j,e[405]=Dt):Dt=e[405];let Lt;e[406]!==o.search||e[407]!==Dt?(Lt=t.jsx(k,{name:"search",value:o.search,onChange:Dt,placeholder:"Search title, slug, author..."}),e[406]=o.search,e[407]=Dt,e[408]=Lt):Lt=e[408];const da=o.status;let Tt;e[409]!==j?(Tt=s=>j("status",s.target.value),e[409]=j,e[410]=Tt):Tt=e[410];let jl,_l;e[411]===Symbol.for("react.memo_cache_sentinel")?(jl=t.jsx("option",{value:"all",children:"All status"}),_l=Gl.map($a),e[411]=jl,e[412]=_l):(jl=e[411],_l=e[412]);let Ft;e[413]!==o.status||e[414]!==Tt?(Ft=t.jsxs("select",{name:"status",value:da,onChange:Tt,className:"h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm",children:[jl,_l]}),e[413]=o.status,e[414]=Tt,e[415]=Ft):Ft=e[415];const oa=o.author;let It;e[416]!==j?(It=s=>j("author",s.target.value),e[416]=j,e[417]=It):It=e[417];let yl;e[418]===Symbol.for("react.memo_cache_sentinel")?(yl=t.jsx("option",{value:"",children:"All author"}),e[418]=yl):yl=e[418];let Ut;e[419]!==P?(Ut=P.map(Ea),e[419]=P,e[420]=Ut):Ut=e[420];let At;e[421]!==o.author||e[422]!==It||e[423]!==Ut?(At=t.jsxs("select",{name:"author",value:oa,onChange:It,className:"h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm",children:[yl,Ut]}),e[421]=o.author,e[422]=It,e[423]=Ut,e[424]=At):At=e[424];let vl;e[425]===Symbol.for("react.memo_cache_sentinel")?(vl=t.jsx(m,{type:"submit",variant:"outline",children:"Search"}),e[425]=vl):vl=e[425];let Bt;e[426]!==Pt||e[427]!==Lt||e[428]!==Ft||e[429]!==At?(Bt=t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 border-b border-slate-100 px-6 py-4",children:[bl,t.jsxs("form",{onSubmit:Pt,className:"flex w-full flex-wrap items-center gap-2",children:[Lt,Ft,At,vl]})]}),e[426]=Pt,e[427]=Lt,e[428]=Ft,e[429]=At,e[430]=Bt):Bt=e[430];const Rl=fs("title");let Et;
1e[431]!==x?(Et=x("title"),e[431]=x,e[432]=Et):Et=e[432];let $t;e[433]!==Rl||e[434]!==Et?($t=t.jsx("th",{className:"px-4 py-3",children:t.jsxs(ts,{href:Rl,className:"inline-flex items-center",children:["Title",Et]})}),e[433]=Rl,e[434]=Et,e[435]=$t):$t=e[435];const Ol=fs("author");let Mt;e[436]!==x?(Mt=x("author"),e[436]=x,e[437]=Mt):Mt=e[437];let zt;e[438]!==Ol||e[439]!==Mt?(zt=t.jsx("th",{className:"px-4 py-3",children:t.jsxs(ts,{href:Ol,className:"inline-flex items-center",children:["Author",Mt]})}),e[438]=Ol,e[439]=Mt,e[440]=zt):zt=e[440];let Nl;e[441]===Symbol.for("react.memo_cache_sentinel")?(Nl=t.jsx("th",{className:"px-4 py-3",children:"Type"}),e[441]=Nl):Nl=e[441];const Hl=fs("status");let Rt;e[442]!==x?(Rt=x("status"),e[442]=x,e[443]=Rt):Rt=e[443];let Ot;e[444]!==Hl||e[445]!==Rt?(Ot=t.jsx("th",{className:"px-4 py-3",children:t.jsxs(ts,{href:Hl,className:"inline-flex items-center",children:["Status",Rt]})}),e[444]=Hl,e[445]=Rt,e[446]=Ot):Ot=e[446];const ql=fs("postdate");let Ht;e[447]!==x?(Ht=x("postdate"),e[447]=x,e[448]=Ht):Ht=e[448];let qt;e[449]!==ql||e[450]!==Ht?(qt=t.jsx("th",{className:"px-4 py-3",children:t.jsxs(ts,{href:ql,className:"inline-flex items-center",children:["Publish Date",Ht]})}),e[449]=ql,e[450]=Ht,e[451]=qt):qt=e[451];let Sl;e[452]===Symbol.for("react.memo_cache_sentinel")?(Sl=t.jsx("th",{className:"px-4 py-3",children:"Actions"}),e[452]=Sl):Sl=e[452];let Kt;e[453]!==$t||e[454]!==zt||e[455]!==Ot||e[456]!==qt?(Kt=t.jsx("thead",{className:"bg-slate-50 text-left text-xs font-semibold uppercase tracking-[0.2em] text-slate-400",children:t.jsxs("tr",{children:[$t,zt,Nl,Ot,qt,Sl]})}),e[453]=$t,e[454]=zt,e[455]=Ot,e[456]=qt,e[457]=Kt):Kt=e[457];let Qt;if(e[458]!==v||e[459]!==N||e[460]!==b.data){let s;e[462]!==v||e[463]!==N?(s=a=>t.jsxs("tr",{className:"text-slate-700",children:[t.jsxs("td",{className:"px-4 py-3",children:[t.jsx("div",{className:"font-semibold text-slate-900",children:a.title}),t.jsx("div",{className:"text-xs text-slate-500",children:a.slug})]}),t.jsx("td",{className:"px-4 py-3",children:a.author_name??"-"}),t.jsx("td",{className:"px-4 py-3",children:a.posttype??"-"}),t.jsx("td",{className:"px-4 py-3",children:t.jsx("select",{value:a.status,onChange:f=>N(a,f.target.value),className:"h-9 w-full min-w-28 rounded-md border border-input bg-transparent px-3 py-1 text-sm","aria-label":`Update status for ${a.title??"product"}`,children:Gl.map(Ba)})}),t.jsx("td",{className:"px-4 py-3",children:a.postdate??"-"}),t.jsx("td",{className:"px-4 py-3",children:t.jsxs("div",{className:"flex flex-wrap gap-2",children:[t.jsx(ts,{href:`/admin/product/${a.id}/edit`,className:"rounded-lg border border-slate-200 px-3 py-1.5 text-xs font-semibold text-slate-700 transition hover:bg-slate-100",children:"Edit"}),t.jsx("button",{type:"button",onClick:()=>v(a.id),className:"rounded-lg border border-rose-200 px-3 py-1.5 text-xs font-semibold text-rose-600 transition hover:bg-rose-50",children:"Delete"})]})})]},a.id),e[462]=v,e[463]=N,e[464]=s):s=e[464],Qt=b.data.map(s),e[458]=v,e[459]=N,e[460]=b.data,e[461]=Qt}else Qt=e[461];let Vt;e[465]!==b.data.length?(Vt=b.data.length===0&&t.jsx("tr",{children:t.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-sm text-slate-500",children:"Belum ada product."})}),e[465]=b.data.length,e[466]=Vt):Vt=e[466];let Wt;e[467]!==Qt||e[468]!==Vt?(Wt=t.jsxs("tbody",{className:"divide-y divide-slate-100",children:[Qt,Vt]}),e[467]=Qt,e[468]=Vt,e[469]=Wt):Wt=e[469];let Xt;e[470]!==Kt||e[471]!==Wt?(Xt=t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full text-sm",children:[Kt,Wt]})}),e[470]=Kt,e[471]=Wt,e[472]=Xt):Xt=e[472];let Yt;e[473]!==b.links?(Yt=b.links.map(Aa),e[473]=b.links,e[474]=Yt):Yt=e[474];let Gt;e[475]!==Yt?(Gt=t.jsx("div",{className:"flex flex-wrap items-center gap-2 border-t border-slate-100 p-4 text-sm text-slate-600",children:Yt}),e[475]=Yt,e[476]=Gt):Gt=e[476];let Jt;e[477]!==Bt||e[478]!==Xt||e[479]!==Gt?(Jt=t.jsxs("section",{className:"overflow-hidden rounded-2xl border border-sidebar-border/70 bg-card text-card-foreground shadow-sm",children:[Bt,Xt,Gt]}),e[477]=Bt,e[478]=Xt,e[479]=Gt,e[480]=Jt):Jt=e[480];let wl;return e[481]!==kt||e[482]!==Jt?(wl=t.jsxs(_a,{breadcrumbs:Ia,children:[Fs,t.jsxs("div",{className:"flex flex-col gap-6 p-4",children:[kt,Jt]})]}),e[481]=kt,e[482]=Jt,e[483]=wl):wl=e[483],wl}function Aa(n){return t.jsx(ts,{href:ya(n.url)??"#",className:`rounded-lg px-3 py-1.5 transition ${n.active?"bg-slate-900 text-white":"bg-slate-100 text-slate-600 hover:bg-slate-200"} ${n.url?"":"pointer-events-none opacity-50"}`,dangerouslySetInnerHTML:{__html:n.label}},n.label)}function Ba(n){return t.jsx("option",{value:n.value,children:n.label},n.value)}function Ea(n){return t.jsx("option",{value:n.id,children:n.name},n.id)}function $a(n){return t.jsx("option",{value:n.value,children:n.label},n.value)}function Ma(n){return t.jsx("option",{value:n.value,children:n.label},n.value)}function za(n){return t.jsx("option",{value:n.value,children:n.label},n.value)}function Ra(n){return t.jsxs("option",{value:n.id,children:[n.name,n.role?` (${n.role})`:""]},n.id)}function Oa(n,e){sa.patch(`/admin/product/${n.id}/status`,{status:e},{preserveScroll:!0})}function Ha(n){window.confirm("Delete this product?")&&sa.delete(`/admin/product/${n}`,{preserveScroll:!0})}export{ci 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.