1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1159],{19950:e=>{e.exports={root:"MyListings_root__9Alpl",filters:"MyListings_filters__aTrLS",filter:"MyListings_filter__yj2XC",filterActive:"MyListings_filterActive__c7kz1",filterCount:"MyListings_filterCount__aaPZk",list:"MyListings_list__iAa9V",card:"MyListings_card__ci_sN",cover:"MyListings_cover__wlduI",coverImage:"MyListings_coverImage__OsvFq",cardMuted:"MyListings_cardMuted__tLjNK",reference:"MyListings_reference__VA6WY",body:"MyListings_body__id6ag",top:"MyListings_top__Rr0Cf",headings:"MyListings_headings__btTLy",name:"MyListings_name__JV9mC",adTitle:"MyListings_adTitle__jksdQ",meta:"MyListings_meta__8XH5L",chips:"MyListings_chips__1OmhQ",chip:"MyListings_chip__OW4TG",chipDot:"MyListings_chipDot__d1Yan",chipPending:"MyListings_chipPending__AyoLq",mlPulse:"MyListings_mlPulse__YNeHw",chipPublished:"MyListings_chipPublished__8DGIb",chipRejected:"MyListings_chipRejected__oD1Dg",chipCompleted:"MyListings_chipCompleted__Gu_k1",chipExpired:"MyListings_chipExpired__9JfHZ",chipWithdrawn:"MyListings_chipWithdrawn__Mss5U",resubmitted:"MyListings_resubmitted__nVMYR",band:"MyListings_band__JIJI0",bandRow:"MyListings_bandRow__op1rD",bandPending:"MyListings_bandPending__UBv0_",bandPublished:"MyListings_bandPublished__NvJe8",bandRejected:"MyListings_bandRejected__wq7FY",bandCompleted:"MyListings_bandCompleted__ItwrR",bandNeutral:"MyListings_bandNeutral__Vt58M",bar:"MyListings_bar__wb7SE",barLabels:"MyListings_barLabels__V5L2y",barTrack:"MyListings_barTrack__r5GlN",barFill:"MyListings_barFill__6AfQq",barFillSla:"MyListings_barFillSla__b05U_",mlStripes:"MyListings_mlStripes__kox_y",barFillValidity:"MyListings_barFillValidity__rU9Eu",quote:"MyListings_quote__oifIE",quoteLabel:"MyListings_quoteLabel__A3_KT",timeline:"MyListings_timeline__g9ajC",timelineItem:"MyListings_timelineItem__py2fT",timelineDot:"MyListings_timelineDot__7pOu2",timelineRejected:"MyListings_timelineRejected__XvF0i",timelineNow:"MyListings_timelineNow__wd7m9",timelineLabel:"MyListings_timelineLabel__odqlx",timelineDate:"MyListings_timelineDate__Hlz5t",timelineNote:"MyListings_timelineNote__o63gd",foot:"MyListings_foot__Zhy_Q",dates:"MyListings_dates__iBgTG",actions:"MyListings_actions__JIRH3",action:"MyListings_action__o49rt",actionPrimary:"MyListings_actionPrimary__1rQxV",actionDanger:"MyListings_actionDanger___6HbG",empty:"MyListings_empty__ETo9F",emptyIcon:"MyListings_emptyIcon__gYmQ5",emptyTitle:"MyListings_emptyTitle__0j3e3",emptyText:"MyListings_emptyText__GUl_6",emptyAction:"MyListings_emptyAction__VPXhv",error:"MyListings_error__OrFTh",overlay:"MyListings_overlay__PnIBg",overlayOpen:"MyListings_overlayOpen__A_unx",dialog:"MyListings_dialog__WT73C",dialogIcon:"MyListings_dialogIcon__UGTF_",dialogIconCelebrate:"MyListings_dialogIconCelebrate__EPuSJ",dialogIconDanger:"MyListings_dialogIconDanger__yxUcu",dialogTitle:"MyListings_dialogTitle__0_TMJ",dialogText:"MyListings_dialogText__sx8R2",dialogButtons:"MyListings_dialogButtons__K57XK",dialogCancel:"MyListings_dialogCancel__Pxgzo",dialogConfirm:"MyListings_dialogConfirm__TBooG",dialogConfirmCelebrate:"MyListings_dialogConfirmCelebrate__40imV",dialogConfirmDanger:"MyListings_dialogConfirmDanger__o9wfV",spinner:"MyListings_spinner__1eA6s",mlSpin:"MyListings_mlSpin__ahmBM",toast:"MyListings_toast__ZpHjI",toastOpen:"MyListings_toastOpen__0thNQ",toastError:"MyListings_toastError__s_FXL",skeletonCard:"MyListings_skeletonCard__cbLHn",skeletonCover:"MyListings_skeletonCover__dUrJS",skeletonBody:"MyListings_skeletonBody__fvXJa",skeleton:"MyListings_skeleton__8W4X_",mlShimmer:"MyListings_mlShimmer__GWqP4",skeletonLine:"MyListings_skeletonLine__aCBEY",skeletonTitle:"MyListings_skeletonTitle__rlEWD",skeletonMeta:"MyListings_skeletonMeta__DDmnx",skeletonBand:"MyListings_skeletonBand__MEtiT",skeletonFoot:"MyListings_skeletonFoot__LiSqg",loadMore:"MyListings_loadMore__lGfTL"}},81159:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>ea});var l=i(95155),n=i(12115),a=i(12758),s=i.n(a),r=i(2821),d=i(23568),o=i(29070),c=i(92839),u=i(19950),m=i.n(u);let h={Pending:"pending",Published:"published",Rejected:"rejected",Completed:"completed",Expired:"expired",Withdrawn:"withdrawn"},g={0:"pending",1:"published",2:"rejected",3:"completed",4:"expired",5:"withdrawn"},p=Object.entries(g).reduce((e,t)=>
1{let[i,l]=t;return e[l]=Number(i),e},{}),b=["all","pending","published","rejected","completed","expired","withdrawn"],_=["expired","withdrawn"],y={submit:"submitted",resubmit:"resubmitted",reject:"rejected",approve:"published",complete:"completed",owner_complete:"completed",owner_withdraw:"withdrawn",override:"override"},L={allLabel:"All",pendingLabel:"Pending",publishedLabel:"Published",rejectedLabel:"Rejected",completedLabel:"Adopted",expiredLabel:"Expired",withdrawnLabel:"Withdrawn",pendingChipLabel:"Pending",publishedChipLabel:"Published",rejectedChipLabel:"Rejected",completedChipLabel:"Adopted",completedChipLabelFeminine:"",expiredChipLabel:"Expired",withdrawnChipLabel:"Withdrawn",resubmittedLabel:"Resubmitted",pendingBandTitle:"Under review",pendingBandText:"â we usually review ads within {{hours}} h. Until it is approved the ad is not visible to visitors.",publishedBandTitle:"Visible on the site",publishedBandText:"since {{date}}. Interested visitors contact you directly, by phone or email.",rejectedBandTitle:"Ad rejected",rejectedBandText:"{{date}}. Edit it following the note and send it again â it goes back into the review queue.",completedBandTitle:"{{name}} has been adopted",completedBandTitleFeminine:"",completedBandText:"â {{date}}. Thank you for helping find a new home.",completedBandTextFeminine:"",expiredBandTitle:"Ad expired",expiredBandText:"{{date}} â after {{days}} days it is no longer visible in search. Has {{name}} been adopted in the meantime?",withdrawnBandTitle:"You withdrew this ad",withdrawnBandText:"{{date}}. A withdrawn ad cannot be reactivated â publish a new one to try again.",slaSentLabel:"Sent {{date}}",slaResentLabel:"Resent {{date}}",slaTargetLabel:"review within {{hours}} h",validityLeftLabel:"{{days}} days left",validityUntilLabel:"until {{date}}",rejectionLabel:"Moderator note",timelineSubmittedLabel:"Ad sent for review",timelineResubmittedLabel:"Edited and sent again",timelineRejectedLabel:"Ad rejected",timelinePublishedLabel:"Approved and published",timelineCompletedLabel:"Marked as adopted",timelineWithdrawnLabel:"Ad withdrawn",timelineOverrideLabel:"Status changed",timelineNowLabel:"Under review",datesSentLabel:"Sent {{date}}",datesPublishedLabel:"Published {{date}}",datesCompletedLabel:"Published {{published}} \xb7 closed {{date}}",datesWithdrawnLabel:"Withdrawn {{date}}",editLabel:"Edit ad",editResubmitLabel:"Edit and send again",viewLabel:"View ad",completeLabel:"Adopted",completeLabelFeminine:"",withdrawLabel:"Withdraw ad",withdrawShortLabel:"Withdraw",cancelLabel:"Cancel",withdrawDialogTitle:"Withdraw this ad?",withdrawDialogTextPending:"The ad â{{name}}â will leave the review queue. A withdrawn ad cannot be reactivated.",withdrawDialogTextPublished:"The ad â{{name}}â will no longer be visible to visitors. A withdrawn ad cannot be reactivated.",withdrawDialogConfirm:"Withdraw ad",completeDialogTitle:"Adopted? Congratulations!",completeDialogTitleFeminine:"",completeDialogText:"Mark that {{name}} has found a new home â the ad closes permanently and is removed from search.",completeDialogTextFeminine:"",completeDialogConfirm:"Yes, adopted",completeDialogConfirmFeminine:"",withdrawToast:"The ad â{{name}}â has been withdrawn.",completeToast:"Congratulations! {{name}} is marked as adopted.",completeToastFeminine:"",errorToast:"Something went wrong. Please try again.",emptyTitle:"No ads with this status",emptyText:"Cho
1ose another filter or publish a new ad.",noAdsTitle:"You have no ads yet",noAdsText:"Publish an ad and help a pet find a new home.",noAdsButtonLabel:"",loadMoreLabel:"Load more",errorMessage:"Something went wrong. Please try again."},x=(e,t)=>String(null!=e?e:"").replace(/\{\{(\w+)\}\}/g,(e,i)=>t&&null!=t[i]?String(t[i]):""),w=(e,t,i)=>{let l=e["".concat(t,"Feminine")];return i&&l?l:e[t]},j=n.createContext(L),f=e=>{let{labels:t,children:i}=e;return(0,l.jsx)(j.Provider,{value:t,children:i})};f.propTypes={labels:s().object,children:s().node};let v=()=>n.useContext(j),M=e=>{if(!e)return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;let t=String(e).trim();if(!t)return null;let i=new Date((t.includes("T")||t.includes(" "))&&!/(?:Z|[+-]\d{2}:?\d{2})$/i.test(t)?"".concat(t.replace(" ","T"),"Z"):t);return Number.isNaN(i.getTime())?null:i},T=e=>h[null==e?void 0:e.statusName]||g[null==e?void 0:e.status]||"pending",A=e=>M((null==e?void 0:e.updatedAt)||(null==e?void 0:e.insertedAt)),C=(e,t)=>{let i=M(null==e?void 0:e.validUntil);return i?Math.max(0,Math.ceil((i.getTime()-t)/864e5)):null},N=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{day:"numeric",month:"long"},l=M(e);if(!l)return"";try{return l.toLocaleDateString(t,i)}catch(e){return l.toLocaleDateString(void 0,i)}},k=e=>({viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e}),D=e=>(0,l.jsxs)("svg",{...k({width:16,height:16,...e}),children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),R=e=>(0,l.jsxs)("svg",{...k({width:16,height:16,...e}),children:[(0,l.jsx)("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z"}),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"3"})]}),B=e=>(0,l.jsxs)("svg",{...k({width:16,height:16,...e}),children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),(0,l.jsx)("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}),S=e=>(0,l.jsxs)("svg",{...k({width:13,height:13,...e}),children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),P=e=>(0,l.jsx)("svg",{...k({width:14,height:14,...e}),children:(0,l.jsx)("path",{d:"M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"})}),E=e=>(0,l.jsx)("svg",{...k({width:18,height:18,strokeWidth:2.5,...e}),children:(0,l.jsx)("path",{d:"M20 6 9 17l-5-5"})}),q=e=>(0,l.jsx)("svg",{...k({width:16,height:16,strokeWidth:2.5,...e}),children:(0,l.jsx)("path",{d:"M21 12a9 9 0 1 1-6.22-8.56"})}),F=e=>(0,l.jsx)("svg",{viewBox:"0 0 24 24",width:16,height:16,fill:"currentColor","aria-hidden":"true",...e,children:(0,l.jsx)("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"})}),I=e=>(0,l.jsxs)("svg",{...k({width:30,height:30,strokeWidth:1.8,...e}),children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,l.jsx)("path",{d:"M4.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM19.5 9a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM7 11.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM17 11.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5ZM12 22c-4 0-7-2.5-7-6.5 0-2.5 1.5-4.5 4-5.5h6c2.5 1 4 3 4 5.5 0 4-3 6.5-7 6.5Z"})]}),W={pending:m().chipPending,published:m().chipPublished,rejected:m().chipRejected,completed:m().chipCompleted,expired:m().chipExpired,withdrawn:m().chipWithdrawn},H={pending:"pendingChipLabel",published:"publishedChipLabel",rejected:"rejectedChipLabel",completed:"completedChipLabel",expired:"expiredChipLabel",withdrawn:"withdrawnChipLabel"},O=e=>{let{slug:t,feminine:i,resubmitted:n,gc:a}=e,s=v(),d=w(s,H[t]||H.pending,i);return(0,l.jsxs)("div",{className:(0,r.A)(m().chips,a("Chips")),children:[n&&"pending"===t&&(0,l.jsx)("span",{className:(0,r.A)(m().resubmitted,a("Resubmitted")),children:s.resubmittedLabel}),(0,l.jsxs)("span",{className:(0,r.A)(m().chip,W[t]||W.pending,a("Chip")),children:[(0,l.jsx)("span",{className:m().chipDot,"aria-hidden":"true"}),d]})]})};
1O.propTypes={slug:s().string,feminine:s().bool,resubmitted:s().bool,gc:s().func.isRequired};let U=e=>{let{variant:t,percent:i,leadLabel:n,trailLabel:a,gc:s}=e,d=Math.max(0,Math.min(100,Number(i)||0));return(0,l.jsxs)("div",{className:(0,r.A)(m().bar,s("Bar")),children:[(0,l.jsxs)("div",{className:(0,r.A)(m().barLabels,s("BarLabels")),children:[(0,l.jsx)("strong",{children:n}),(0,l.jsx)("span",{children:a})]}),(0,l.jsx)("div",{className:(0,r.A)(m().barTrack,s("BarTrack")),"aria-hidden":"true",children:(0,l.jsx)("div",{className:(0,r.A)(m().barFill,"sla"===t?m().barFillSla:m().barFillValidity,s("BarFill")),style:{width:"".concat(d,"%")}})})]})};U.propTypes={variant:s().oneOf(["sla","validity"]),percent:s().number,leadLabel:s().string,trailLabel:s().string,gc:s().func.isRequired};let V=e=>{let{reason:t,gc:i}=e,n=v();return t?(0,l.jsxs)("blockquote",{className:(0,r.A)(m().quote,i("Quote")),children:[(0,l.jsx)("div",{className:(0,r.A)(m().quoteLabel,i("QuoteLabel")),children:n.rejectionLabel}),t]}):null};V.propTypes={reason:s().string,gc:s().func.isRequired};let J={submitted:"timelineSubmittedLabel",resubmitted:"timelineResubmittedLabel",rejected:"timelineRejectedLabel",published:"timelinePublishedLabel",completed:"timelineCompletedLabel",withdrawn:"timelineWithdrawnLabel",override:"timelineOverrideLabel"},G=e=>{let{logs:t,pending:i,formatTimestamp:a,gc:s}=e,d=v(),o=n.useMemo(()=>Array.isArray(t)&&0!==t.length?t.filter(e=>e&&y[e.source]).map(e=>{var t,i,l;return{key:null!=(i=e.id)?i:"".concat(e.source,"-").concat(e.insertedAt),kind:y[e.source],label:d[J[y[e.source]]]||"",date:e.insertedAt,note:e.reason||"",at:null!=(l=null==(t=M(e.insertedAt))?void 0:t.getTime())?l:0}}).sort((e,t)=>e.at-t.at):[],[t,d]);return 0===o.length?null:(0,l.jsxs)("ol",{className:(0,r.A)(m().timeline,s("Timeline")),children:[o.map(e=>(0,l.jsxs)("li",{className:(0,r.A)(m().timelineItem,"rejected"===e.kind&&m().timelineRejected,s("TimelineItem")),children:[(0,l.jsx)("span",{className:(0,r.A)(m().timelineDot,s("TimelineDot")),"aria-hidden":"true"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:(0,r.A)(m().timelineLabel,s("TimelineLabel")),children:e.label}),(0,l.jsx)("div",{className:(0,r.A)(m().timelineDate,s("TimelineDate")),children:a(e.date)}),e.note&&(0,l.jsx)("div",{className:(0,r.A)(m().timelineNote,s("TimelineNote")),children:e.note})]})]},e.key)),i&&(0,l.jsxs)("li",{className:(0,r.A)(m().timelineItem,m().timelineNow,s("TimelineItem")),children:[(0,l.jsx)("span",{className:(0,r.A)(m().timelineDot,s("TimelineDot")),"aria-hidden":"true"}),(0,l.jsx)("div",{className:(0,r.A)(m().timelineLabel,s("TimelineLabel")),children:d.timelineNowLabel})]})]})};G.propTypes={logs:s().array,pending:s().bool,formatTimestamp:s().func.isRequired,gc:s().func.isRequired};let Y={pending:m().bandPending,published:m().bandPublished,rejected:m().bandRejected,completed:m().bandCompleted,expired:m().bandNeutral,withdrawn:m().bandNeutral},Z={pending:D,published:R,rejected:B,completed:F,expired:D,withdrawn:B},Q=e=>{let{row:t,slug:i,feminine:n,name:a,now:s,slaHours:d,validityDays:o,formatDay:c,formatTimestamp:u,gc:h}=e,g=v(),p=Z[i]||D,{title:b,text:_}=(()=>{switch(i){case"pending":return{title:g.pendingBandTitle,text:x(g.pendingBandText,{hours:d})};case"published":return{title:g.publishedBandTitle,text:x(g.publishedBandText,{date:c(t.publishedAt)})};case"rejected":return{title:g.rejectedBandTitle,text:x(g.rejectedBandText,{date:u(t.updatedAt)})};case"completed":return{title:x(w(g,"completedBandTitle",n),{name:a}),text:x(w(g,"completedBandText",n),{date:c(t.completedAt),name:a})};case"expired":return{title:g.expiredBandTitle,text:x(g.expiredBandText,{date:c(t.validUntil),days:o,name:a})};default:return{title:g.withdrawnBandTitle,text:x(g.withdrawnBandText,{date:c(t.updatedAt)})}}})(),y="published"===i?C(t,s):null;return(0,l.jsxs)("div",{className:(0,r.A)(m().band,Y[i]||m().bandNeutral,h("Band")),children:[(0,l.jsxs)("div",{className:(0,r.A)(m().bandRow,h("BandRow")),children:[(0,l.jsx)(p,{}),(0,l.jsxs)("div",{children:[(0,l.jsx)("b",{children:b})," ",_]})]}),"pending"===i&&(0,l.jsx)(U,{variant:"sla",percent:((e,t,i)=>{let l=A(e);return l&&t?Math.max(0,Math.min(100,Math.round((i-l.getTime())/(36e5*t)*100))):0})(t,d,s),leadLabel:x(t.resubmitted?g.slaResentLabel:g.slaSentLabel,{date:u(A(t))}),trailLabel:x(g.slaTargetLabel,{hours:d}),gc:h}),"published"===i&&null!==y&&(0,l.jsx)(U,{variant:"validity",percent:((e,t,i)=>{let l=C(e,i);return null!==l&&t?Math.max(0,Math.min(100,Math.round(l/t*100))):0})(t,o,s),leadLabel:x(g.validityLeftLabel,{days:y}),trailLabel:x(g.validityUntilLabel,{date:c(t.validUntil)}),gc:h}),"rejected"===i&&(0,l.jsx)(V,{reason:t.rejectedReason,gc:h}),(0,l.jsx)(G,{logs:t.logs,pending:"pending"===i,formatTimestamp:u,gc:h})]})};Q.propTypes={row:s().object.isRequired,slug:s().string,feminine:s().bool,name:s().string,now:s().number,slaHours:s().number,validityDays:s().number,formatDay:s().func.isRequired,formatTimestamp:s().func.isRequired,gc:s().func.isRequired};let X=e=>{let{slug:t,feminine:i,editHref:a,detailHref:s,busy:d,onWithdraw:o,onComplete:c,gc:u}=e,h=v(),g=(e,t)=>(0,l.jsxs)("a",{className:(0,r.A)(m().action,t&&m().actionPrimary,u("Action")),href:a,children:[(0,l.jsx)(P,{}),e]}),p=()=>(0,l.jsxs)("button",{type:"button",className:(0,r.A)(m().action,m().actionPrimary,u("Action")),onClick:c,disabled:d,children:[(0,l.jsx)(F,{}),w(h,"completeLabel",i)]}),b=e=>(0,l.jsx)("button",{type:"button",className:(0,r.A)(m().action,m().actionDanger,u("Action")),onClick:o,disabled:d,children:e}),_=(()=>
1{switch(t){case"pending":return[g(h.editLabel,!1),b(h.withdrawLabel)];case"published":return[s?(0,l.jsxs)("a",{className:(0,r.A)(m().action,u("Action")),href:s,children:[(0,l.jsx)(R,{}),h.viewLabel]}):null,p(),b(h.withdrawShortLabel)];case"rejected":return[g(h.editResubmitLabel,!0)];case"expired":return[p()];default:return[]}})().filter(Boolean);return 0===_.length?null:(0,l.jsx)("div",{className:(0,r.A)(m().actions,u("Actions")),children:_.map((e,t)=>(0,l.jsx)(n.Fragment,{children:e},t))})};X.propTypes={slug:s().string,feminine:s().bool,editHref:s().string,detailHref:s().string,busy:s().bool,onWithdraw:s().func,onComplete:s().func,gc:s().func.isRequired};let z=e=>{let{row:t,slug:i,feminine:n,defs:a,metaExcludeKeys:s,now:d,slaHours:o,validityDays:c,showReference:u,editHref:h,detailHref:g,busy:p,onWithdraw:b,onComplete:y,formatDay:L,formatTimestamp:w,gc:j}=e,f=v(),M=t.subjectName||t.title||"",T=u?(e=>{var t;let i=null==e?void 0:e.id;if(null==i)return"";let l=String(null!=(t=null==e?void 0:e.insertedAt)?t:""),n=l.length>=4?l.slice(0,4):String(new Date().getFullYear());return"LST-".concat(n,"-").concat(String(i).padStart(5,"0"))})(t):"";return(0,l.jsxs)("article",{className:(0,r.A)(m().card,_.includes(i)&&m().cardMuted,j("Card")),children:[(0,l.jsxs)("div",{className:(0,r.A)(m().cover,j("Cover")),children:[t.coverUrl&&(0,l.jsx)("img",{src:t.coverUrl,alt:M,loading:"lazy",className:(0,r.A)(m().coverImage,j("CoverImage"))}),T&&(0,l.jsx)("span",{className:(0,r.A)(m().reference,j("Reference")),children:T})]}),(0,l.jsxs)("div",{className:(0,r.A)(m().body,j("Body")),children:[(0,l.jsxs)("div",{className:(0,r.A)(m().top,j("Top")),children:[(0,l.jsxs)("div",{className:m().headings,children:[(0,l.jsxs)("h3",{className:(0,r.A)(m().name,j("Name")),children:[M,t.title&&(0,l.jsx)("span",{className:(0,r.A)(m().adTitle,j("AdTitle")),children:" â ".concat(t.title)})]}),(0,l.jsx)("div",{className:(0,r.A)(m().meta,j("Meta")),children:((e,t,i)=>{let l=(null==e?void 0:e.attributes)||{},n=String(i||"").split(",").map(e=>e.trim()).filter(Boolean),a=(Array.isArray(t)?t:Object.values(t||{})).filter(e=>(null==e?void 0:e.key)&&(null==e?void 0:e.type)!=="boolean"&&!n.includes(e.key)).map(e=>l[e.key]).filter(e=>null!=e&&""!==e).map(e=>String(e));return[...a.length?[a[0],null==e?void 0:e.subtitle,...a.slice(1)]:[null==e?void 0:e.subtitle],null==e?void 0:e.city].filter(e=>null!=e&&""!==String(e).trim()).join(" \xb7 ")})(t,a,s)})]}),(0,l.jsx)(O,{slug:i,feminine:n,resubmitted:!!t.resubmitted,gc:j})]}),(0,l.jsx)(Q,{row:t,slug:i,feminine:n,name:M,now:d,slaHours:o,validityDays:c,formatDay:L,formatTimestamp:w,gc:j}),(0,l.jsxs)("div",{className:(0,r.A)(m().foot,j("Foot")),children:[(0,l.jsxs)("span",{className:(0,r.A)(m().dates,j("Dates")),children:[(0,l.jsx)(S,{}),(()=>{switch(i){case"published":case"expired":return x(f.datesPublishedLabel,{date:L(t.publishedAt)});case"completed":return x(f.datesCompletedLabel,{published:L(t.publishedAt),date:L(t.completedAt)});case"withdrawn":return x(f.datesWithdrawnLabel,{date:L(t.updatedAt)});default:return x(f.datesSentLabel,{date:L(t.insertedAt)})}})()]}),(0,l.jsx)(X,{slug:i,feminine:n,editHref:h,detailHref:g,busy:p,onWithdraw:b,onComplete:y,gc:j}
1)]})]})]})};z.propTypes={row:s().object.isRequired,slug:s().string,feminine:s().bool,defs:s().array,metaExcludeKeys:s().string,now:s().number,slaHours:s().number,validityDays:s().number,showReference:s().bool,editHref:s().string,detailHref:s().string,busy:s().bool,onWithdraw:s().func,onComplete:s().func,formatDay:s().func.isRequired,formatTimestamp:s().func.isRequired,gc:s().func.isRequired};let K={all:"allLabel",pending:"pendingLabel",published:"publishedLabel",rejected:"rejectedLabel",completed:"completedLabel",expired:"expiredLabel",withdrawn:"withdrawnLabel"},$=e=>{let{counts:t,total:i,active:n,onSelect:a,gc:s}=e,d=v(),o=t?b.filter(e=>"all"===e||t[e]):b;return o.length<=1?null:(0,l.jsx)("div",{className:(0,r.A)(m().filters,s("Filters")),role:"tablist",children:o.map(e=>(0,l.jsxs)("button",{type:"button",role:"tab","aria-selected":e===n,className:(0,r.A)(m().filter,e===n&&m().filterActive,s("Filter")),onClick:()=>a(e),children:[d[K[e]],t&&(0,l.jsx)("span",{className:(0,r.A)(m().filterCount,s("FilterCount")),children:"all"===e?i:t[e]})]},e))})};$.propTypes={counts:s().object,total:s().number,active:s().string,onSelect:s().func.isRequired,gc:s().func.isRequired};let ee={danger:B,celebrate:F},et=e=>{let{open:t,tone:i,title:a,text:s,confirmLabel:d,cancelLabel:o,busy:c,onConfirm:u,onCancel:h,gc:g}=e,p=ee[i]||B,b=n.useRef(null);return n.useEffect(()=>{var e;if(!t)return;let i=e=>{"Escape"!==e.key||c||h()};document.addEventListener("keydown",i),null==(e=b.current)||e.focus();let{overflow:l}=document.body.style;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",i),document.body.style.overflow=l}},[t,c,h]),(0,l.jsx)("div",{className:(0,r.A)(m().overlay,t&&m().overlayOpen,g("Overlay")),hidden:!t,onClick:e=>{e.target!==e.currentTarget||c||h()},children:(0,l.jsxs)("div",{className:(0,r.A)(m().dialog,g("Dialog")),role:"alertdialog","aria-modal":"true","aria-label":a,children:[(0,l.jsx)("div",{className:(0,r.A)(m().dialogIcon,"celebrate"===i?m().dialogIconCelebrate:m().dialogIconDanger,g("DialogIcon")),children:(0,l.jsx)(p,{width:28,height:28})}),(0,l.jsx)("div",{className:(0,r.A)(m().dialogTitle,g("DialogTitle")),children:a}),(0,l.jsx)("div",{className:(0,r.A)(m().dialogText,g("DialogText")),children:s}),(0,l.jsxs)("div",{className:(0,r.A)(m().dialogButtons,g("DialogButtons")),children:[(0,l.jsx)("button",{type:"button",className:(0,r.A)(m().dialogCancel,g("DialogCancel")),onClick:h,disabled:c,children:o}),(0,l.jsxs)("button",{ref:b,type:"button",className:(0,r.A)(m().dialogConfirm,"celebrate"===i?m().dialogConfirmCelebrate:m().dialogConfirmDanger,g("DialogConfirm")),onClick:u,disabled:c,children:[c&&(0,l.jsx)(q,{className:m().spinner,width:16,height:16}),d]})]})]})})};et.propTypes={open:s().bool,tone:s().oneOf(["danger","celebrate"]),title:s().string,text:s().string,confirmLabel:s().string,cancelLabel:s().string,busy:s().bool,onConfirm:s().func.isRequired,onCancel:s().func.isRequired,gc:s().func.isRequired};let ei=e=>{let{title:t,text:i,actionLabel:n,actionHref:a,gc:s}=e;return(0,l.jsxs)("div",{className:(0,r.A)(m().empty,s("Empty")),children:[(0,l.jsx)("div",{className:(0,r.A)(m().emptyIcon,s("EmptyIcon")),"aria-hidden":"true",children:(0,l.jsx)(I,{})}),(0,l.jsx)("div",{className:(0,r.A)(m().emptyTitle,s("EmptyTitle")),children:t}),(0,l.jsx)("div",{className:(0,r.A)(m().emptyText,s("EmptyText")),children:i}),n&&a&&(0,l.jsx)("a",{className:(0,r.A)(m().emptyAction,s("EmptyAction")),href:a,children:n})]})};ei.propTypes={title:s().string,text:s().string,actionLabel:s().string,actionHref:s().string,gc:s().func.isRequired};let el=()=>(0,l.jsxs)("div",{className:m().skeletonCard,"aria-hidden":"true",children:[(0,l.jsx)("div",{className:"".concat(m().skeleton," ").concat(m().skeletonCover)}),(0,l.jsxs)("div",{className:m().skeletonBody,children:[(0,l.jsx)("div",{className:"".concat(m().skeleton," ").concat(m().skeletonLine," ").concat(m().skeletonTitle)}),(0,l.jsx)("div",{className:"".concat(m().skeleton," ").concat(m().skeletonLine," ").concat(m().skeletonMeta)}),(0,l.jsx)("div",{className:"".concat(m().skeleton," ").concat(m().skeletonBand)}),(0,l.jsx)("div",{className:"".concat(m().skeleton," ").concat(m().skeletonLine," ").concat(m().skeletonFoot)})]})]}),en=e=>{let{className:t,data:{wizardUrl:i="",editParam:a="edit",detailUrlPattern:s="",showReference:u=!0,genderKey:h="",feminineValues:g="",metaExcludeKeys:_="",perPage:y=30,slaHours:j=24,validityDays:v
1=60,...M}={}}=e,{isAuthenticated:A,onGetMyListings:C,onWithdrawListing:k,onCompleteListing:D}=(0,d.Jd)(),{onGetListingCategories:R,defaultLanguage:B}=(0,o.nm)(),S=e=>t&&"".concat(t).concat(e),P=JSON.stringify(M),F=n.useMemo(()=>(e=>{if(!e||"object"!=typeof e)return L;let t={...L};for(let[i,l]of Object.entries(e))"string"==typeof l&&""!==l&&(t[i]=l);return t})(M),[P]),I=(0,c.QC)(null==B?void 0:B.locale)||void 0,W=n.useCallback(e=>N(e,I),[I]),H=n.useCallback(e=>N(e,I,{day:"numeric",month:"long",hour:"2-digit",minute:"2-digit"}),[I]),[O,U]=n.useState(null),[V,J]=n.useState(null),[G,Y]=n.useState(null),[Z,Q]=n.useState(!1),[X,K]=n.useState({}),[ee,en]=n.useState("all"),[ea,es]=n.useState(!1),[er,ed]=n.useState(null),[eo,ec]=n.useState(!1),[eu,em]=n.useState(null),[eh,eg]=n.useState(()=>Date.now()),ep=n.useRef(0),eb=n.useCallback(async(e,t)=>{let i={limit:y,offset:t};return"all"!==e&&(i.status=p[e]),(e=>{var t,i,l,n,a,s,r,d;let o=!Array.isArray(e)&&e&&"object"==typeof e?e:null,c=Array.isArray(e)?e:null!=(n=null!=(l=null==o?void 0:o.items)?l:null==o?void 0:o.data)?n:[],u=Array.isArray(c)?c:[],m=null!=(s=null!=(a=null==o?void 0:o.totalCount)?a:null==(t=u[0])?void 0:t.totalCount)?s:null,h=null!=(d=null!=(r=null==o?void 0:o.statusCounts)?r:null==(i=u[0])?void 0:i.statusCounts)?d:null;return{rows:u,total:"number"==typeof m?m:null,statusCounts:h&&"object"==typeof h?h:null}})(await C(i))},[C,y]);n.useEffect(()=>{if(!A)return;let e=ep.current+1;ep.current=e,es(!1),eb(ee,0).then(t=>{let{rows:i,total:l,statusCounts:n}=t;ep.current===e&&(U(i),J(l),n&&Y(n),eg(Date.now()))}).catch(()=>{ep.current===e&&es(!0)})},[A,eb,ee]);let e_=n.useCallback(async(e,t)=>{let i=await eb(e,0),l=[...i.rows];for(;l.length<t&&null!==i.total&&l.length<i.total;){let t=await eb(e,l.length);if(0===t.rows.length)break;l.push(...t.rows)}return{...i,rows:l.slice(0,Math.max(t,i.rows.length))}},[eb]),ey=n.useCallback(()=>{if(Z||!O)return;let e=ep.current;Q(!0),eb(ee,O.length).then(t=>{let{rows:i,total:l,statusCounts:n}=t;ep.current===e&&(U(e=>[...e||[],...i]),"number"==typeof l&&J(l),n&&Y(n))}).catch(()=>{}).finally(()=>Q(!1))},[Z,O,eb,ee]);n.useEffect(()=>{if(!A)return;let e=!1;return R().then(t=>{!e&&Array.isArray(t)&&K(t.reduce((e,t)=>((null==t?void 0:t.id)!==void 0&&(e[t.id]=t.attributeDefs||[]),e),{}))}).catch(()=>{}),()=>{e=!0}},[A,R]),n.useEffect(()=>{if(!eu)return;let e=setTimeout(()=>em(null),3200);return()=>clearTimeout(e)},[eu]);let eL=null===V,ex=null!==V&&"all"===ee&&((null==O?void 0:O.length)||0)>=V,ew=null!==O&&(eL||ex),ej=n.useMemo(()=>{if(G)return G;if(!ew)return null;let e={};return(O||[]).forEach(t=>{let i=T(t);e[i]=(e[i]||0)+1}),e},[G,ew,ee,O]);n.useEffect(()=>{ej&&"all"!==ee&&!ej[ee]&&en("all")},[ej,ee]);let ef=n.useMemo(()=>O?"all"===ee||null!==V?O:O.filter(e=>T(e)===ee):[],[O,ee,V]),ev=null!==O&&null!==V&&O.length<V,eM=async()=>{if(er){ec(!0);try{"withdraw"===er.action?await k(er.row.id):await D(er.row.id);let{rows:e,total:t,statusCounts:i}=await e_(ee,(null==O?void 0:O.length)||0);U(e),J(t),i&&Y(i),eg(Date.now()),em({type:"success",message:er.toast}),ed(null)}catch(e){em({type:"error",message:F.errorToast}),ed(null)}finally{ec(!1)}}};if(!A)return null;let eT=(O||[]).length,eA="all"!==ee||eT>0,eC=ej?Object.values(ej).reduce((e,t)=>e+(Number(t)||0),0):null!=V?V:eT;return(0,l.jsx)(f,{labels:F,children:(0,l.jsxs)("div",{className:(0,r.A)(m().root,t),children:[null!==O&&eA&&(0,l.jsx)($,{counts:ej,total:eC,active:ee,onSelect:en,gc:S}),ea&&(0,l.jsx)("div",{className:(0,r.A)(m().error,S("Error")),children:F.errorMessage}),null===O&&!ea&&(0,l.jsx)("div",{className:(0,r.A)(m().list,S("List")),children:b.slice(0,3).map(e=>(0,l.jsx)(el,{},e))}),null!==O&&!eA&&!ea&&(0,l.jsx)(ei,{title:F.noAdsTitle,text:F.noAdsText,actionLabel:F.noAdsButtonLabel,actionHref:i,gc:S}),null!==O&&eA&&0===ef.length&&(0,l.jsx)(ei,{title:F.emptyTitle,text:F.emptyText,gc:S}),ef.length>0&&(0,l.jsx)("div",{className:(0,r.A)(m().list,S("List")),children:ef.map(e=>{let t=T(e),n=((e,t,i)=>{var l;if(!t||!i)return!1;let n=null==e||null==(l=e.attributes)?void 0:l[t];if(null==n)return!1;let a=String(n).trim().toLowerCase();return String(i).split(",").map(e=>
1e.trim().toLowerCase()).filter(Boolean).includes(a)})(e,h,g);return(0,l.jsx)(z,{row:e,slug:t,feminine:n,defs:X[e.categoryId],metaExcludeKeys:_,now:eh,slaHours:Number(j)||24,validityDays:Number(v)||60,showReference:u,editHref:i?"".concat(i,"?").concat(a,"=").concat(e.id):"",detailHref:s?s.replace("{id}",e.id):"",busy:eo,onWithdraw:()=>((e,t,i)=>{let l=e.subjectName||e.title||"";ed({row:e,action:"withdraw",tone:"danger",title:F.withdrawDialogTitle,text:x("pending"===t?F.withdrawDialogTextPending:F.withdrawDialogTextPublished,{name:l}),confirmLabel:F.withdrawDialogConfirm,toast:x(F.withdrawToast,{name:l}),feminine:i})})(e,t,n),onComplete:()=>((e,t,i)=>{let l=e.subjectName||e.title||"";ed({row:e,action:"complete",tone:"celebrate",title:w(F,"completeDialogTitle",i),text:x(w(F,"completeDialogText",i),{name:l}),confirmLabel:w(F,"completeDialogConfirm",i),toast:x(w(F,"completeToast",i),{name:l}),feminine:i})})(e,0,n),formatDay:W,formatTimestamp:H,gc:S},e.id)})}),ev&&(0,l.jsxs)("button",{type:"button",className:(0,r.A)(m().loadMore,S("LoadMore")),onClick:ey,disabled:Z,children:[Z&&(0,l.jsx)(q,{className:m().spinner,width:16,height:16}),F.loadMoreLabel]}),(0,l.jsx)(et,{open:!!er,tone:null==er?void 0:er.tone,title:null==er?void 0:er.title,text:null==er?void 0:er.text,confirmLabel:null==er?void 0:er.confirmLabel,cancelLabel:F.cancelLabel,busy:eo,onConfirm:eM,onCancel:()=>ed(null),gc:S}),(0,l.jsxs)("div",{className:(0,r.A)(m().toast,eu&&m().toastOpen,(null==eu?void 0:eu.type)==="error"&&m().toastError,S("Toast")),hidden:!eu,role:"status","aria-live":"polite",children:[(0,l.jsx)(E,{}),null==eu?void 0:eu.message]})]})})};en.propTypes={className:s().string,data:s().object};let ea=en}}]);
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.