1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[537],{24:(t,e,s)=>{"use strict";function r(t){return["æ é¢ï¼",t.title,"","æ£æï¼",t.body,"","æ ç¾ï¼",t.tags.map(t=>"#"+t).join(" "),"","æç¤ºï¼",t.disclaimer].join("\n")}s.d(e,{A:()=>r})},4422:(t,e,s)=>{"use strict";s.d(e,{PublishDraftHistory:()=>n});var r=s(8320),a=s(7004),i=s(24);function n(){let[t,e]=(0,a.useState)([]),[s,n]=(0,a.useState)(!0),[c,u]=(0,a.useState)(!1),[m,f]=(0,a.useState)({status:"idle"});async function x(t){try{await navigator.clipboard.writeText((0,i.A)(t.draft)),f({id:t.id,status:"success"})}catch(e){f({id:t.id,status:"error"})}}return((0,a.useEffect)(()=>{let t=!1;return async function(){n(!0),u(!1);try{var s;let r=await fetch("/api/publish/drafts",{cache:"no-store"}),a=await r.json();if(!r.ok||(s=a,!(o(s)&&"boolean"==typeof s.ok&&Array.isArray(s.drafts)&&(!s.ok||s.drafts.every(d))))||!a.ok)throw Error("Publish drafts request failed");t||e(a.drafts)}catch(s){t||(u(!0),e([]))}finally{t||n(!1)}}(),()=>{t=!0}},[]),s)?(0,r.jsx)(l,{text:"æ£å¨å è½½è稿..."}):c?(0,r.jsx)(l,{text:"è稿å 载失败ï¼è¯·ç¨ååè¯ã",tone:"error"}):0===t.length?(0,r.jsx)(l,{text:"è¿æ²¡æåå¸è稿ãä½ å¯ä»¥å¨å¸åºè¯¦æ
页çæä¸ç¯å叿æ¡ã"}):(0,r.jsx)("section",{className:"mt-5 space-y-4",children:t.map(t=>(0,r.jsxs)("article",{className:"rounded-lg border border-slate-200 bg-white p-4 shadow-soft sm:p-5",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold leading-7 text-slate-950",children:t.draft.title||"æªå½åè稿"}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-slate-500",children:[(0,r.jsx)("span",{children:function(t){if(!t)return"æ¶é´æªç¥";let e=new Date(t);return Number.isNaN(e.getTime())?"æ¶é´æªç¥":e.toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}(t.createdAt||t.draft.generatedAt)}),t.slug?(0,r.jsxs)("span",{children:["slug: ",t.slug]}):null,!t.slug&&t.marketId?(0,r.jsxs)("span",{children:["marketId: ",t.marketId]}):null]})]}),(0,r.jsx)("button",{className:"inline-flex min-h-10 cursor-pointer items-center rounded-md bg-sky-700 px-3 text-sm font-semibold text-white transition-colors duration-200 hover:bg-sky-800 focus:outline-none focus:ring-2 focus:ring-sky-500 focus:ring-offset-2",onClick:()=>{x(t)},type:"button",children:"å¤å¶å
¨æ"})]}),(0,r.jsx)("p",{className:"mt-4 whitespace-pre-wrap text-sm leading-6 text-slate-700",children:t.draft.body}),(0,r.jsx)("div",{className:"mt-4 flex flex-wrap gap-2",children:t.draft.tags.map(t=>(0,r.jsxs)("span",{className:"rounded-full border border-slate-200 bg-slate-50 px-2.5 py-1 text-xs font-medium text-slate-700",children:["#",t]},t))}),t.draft.disclaimer?(0,r.jsxs)("p",{className:"mt-3 text-xs leading-5 text-slate-500",children:["æç¤ºï¼",t.draft.disclaimer]}):null,m.id===t.id&&"success"===m.status?(0,r.jsx)("p",{className:"mt-3 text-sm text-emerald-700",children:"å·²å¤å¶"}):null,m.id===t.id&&"error"===m.status?(0,r.jsx)("p",{className:"mt-3 text-sm text-amber-700",children:"å¤å¶å¤±è´¥ï¼è¯·æå¨å¤å¶ã"}):null]},t.id))})}function l(t){let{text:e,tone:s="muted"}=t;return(0,r.jsx)("div",{className:"error"===s?"mt-5 rounded-lg border border-amber-200 bg-amber-50 p-5 text-sm text-amber-800 shadow-soft":"mt-5 rounded-lg border border-slate-200 bg-white p-5 text-sm text-slate-600 shadow-soft",children:e})}function d(t){var e;return o(t)&&"string"==typeof t.id&&"string"==typeof t.platform&&o(e=t.draft)&&"string"==typeof e.title&&"string"==typeof e.body&&Array.isArray(e.tags)&&e.tags.every(t=>"string"==typeof t)&&"string"==typeof e.disclaimer&&"string"==typeof e.generatedAt&&"string"==typeof t.createdAt&&("string"==typeof t.marketId||void 0===t.marketId)&&("string"==typeof t.slug||void 0===t.slug)}function o(t){return"object"==typeof t&&null!==t}},9244:(t,e,s)=>{Promise.resolve().then(s.t.bind(s,6597,23)),Promise.resolve().then(s.bind(s,4422))}},t=>{var e=e=>t(t.s=e);t.O(0,[597,389,311,358],()=>e(9244)),_N_E=t.O()}]);
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.