PageSourceSearch

https://cofacto.ai/static/js/3753.e0ce07f1.chunk.js

js cofacto.ai collected 2026-10-05 13:49:10 UTC 21,240 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkdata_finance=self.webpackChunkdata_finance||[]).push([[3753],{73753:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var a=r(89379),n=r(9950),o=r(54028),i=r(52524),l=r(62270),s=r(44414);const d=(e,t,r)=>{return'<!doctype html>\n<html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">\n<style>\nhtml{color-scheme:light}body{margin:0;padding:'.concat(r?"28px 32px":"32px 40px",';background:#fff;color:#18181b;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:').concat(r?"15px":"16px",";line-height:").concat(r?"1.6":"1.75","}\nmain{max-width:").concat(r?"600px":"900px",";margin:0 auto}img{max-width:100%;height:auto;border-radius:6px}table{border-collapse:collapse;width:100%;margin:18px 0;font-size:14px;display:block;overflow-x:auto}th,td{border:1px solid #e4e4e7;padding:8px 10px;text-align:left;vertical-align:top}th{background:#f4f4f5;font-weight:600}h1{font-size:22px;line-height:1.25;margin:0 0 16px}h2{font-size:22px;margin:28px 0 10px}h3{font-size:17px;margin:22px 0 8px}p{margin:0 0 14px}ul,ol{margin:0 0 14px;padding-left:22px}blockquote{margin:0 0 14px;padding-left:14px;border-left:3px solid #d4d4d8;color:#52525b}\n</style></head><body><main>").concat(r?"<h1>".concat((a=t,String(a||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")),"</h1>"):"").concat(e,"</main></body></html>");var a};const c={width:"100%",padding:"5px 8px",fontSize:12,borderRadius:5,border:"1px solid var(--border-color)",background:"var(--input-bg)",color:"var(--text-primary)",outline:"none"};function p(e){let{label:t,width:r,children:a}=e;return(0,s.jsxs)("div",{style:{width:r,flexShrink:0},children:[(0,s.jsx)("div",{style:{fontSize:10,fontWeight:600,color:"var(--text-muted)",marginBottom:3,textTransform:"uppercase",letterSpacing:"0.04em"},children:t}),a]})}const u=function(){const{id:e}=(0,o.g)(),t=!e||"new"===e,r=(0,o.Zp)(),u=(0,n.useRef)(null),{session:g}=(0,i.A)(),h=(0,n.useRef)(null),b=(0,n.useRef)(!1),[x,m]=(0,n.use
1State)(null),[f,v]=(0,n.useState)(""),[y,w]=(0,n.useState)(""),[k,S]=(0,n.useState)("blog"),[j,C]=(0,n.useState)("draft"),[z,_]=(0,n.useState)(""),[A,R]=(0,n.useState)(""),[I,T]=(0,n.useState)(""),[B,W]=(0,n.useState)(""),[D,P]=(0,n.useState)(!1),[E,M]=(0,n.useState)([]),[N,L]=(0,n.useState)(null),[F,U]=(0,n.useState)(""),[H,O]=(0,n.useState)(null),[q,G]=(0,n.useState)(""),[J,K]=(0,n.useState)(!t),[$,Z]=(0,n.useState)(!1),[Q,V]=(0,n.useState)(null),[X,Y]=(0,n.useState)(!1),[ee,te]=(0,n.useState)(!1),[re,ae]=(0,n.useState)(!1),[ne,oe]=(0,n.useState)(""),[ie,le]=(0,n.useState)(""),[se,de]=(0,n.useState)(!1);(0,n.useEffect)(()=>{g?l.A.get("/check-admin").then(e=>m(e.data.is_admin)).catch(()=>m(!1)):m(!1)},[g]),(0,n.useEffect)(()=>{if(t||!x)return;(async()=>{try{const t=(await l.A.get("/content/".concat(e))).data;v(t.title||""),w(t.content||""),S(t.content_type||"blog"),C(t.status||"draft"),_(t.created_by||""),R(t.slug||""),T(t.meta_description||""),W(t.keywords||""),P(t.send_email||!1),M(Array.isArray(t.company_tickers)?t.company_tickers:[]),U(t.image_url||""),O(t.id),G(t.updated_at||"")}catch(n){var t,a;alert("Failed to load: "+((null===(t=n.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.detail)||n.message)),r("/blogs-editor")}finally{K(!1)}})()},[e,t,x,r]),(0,n.useEffect)(()=>{if(!X)return;const e="newsletter"===k?"email":"web",t=setTimeout(async()=>{try{const t=new FormData;t.append("content",y),t.append("channel",e);const r=await l.A.post("/content/preview",t,{headers:{"Content-Type":"multipart/form-data"}});oe(r.data.html||""),le("")}catch(a){var t,r;le((null===(t=a.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.detail)||a.message)}},400);return()=>clearTimeout(t)},[X,y,k]);const ce=(0,n.useCallback)(async e=>{const a=y;if(!f.trim())return alert("Please add a title"),!1;if(!a.trim()||"# Start writing..."===a)return alert("Please add some content"),!1;Z(!0);try{const n=new FormData;n.append("title",f),n.append("content",a),n.append("content_type",k),n.append("status",e),n.append("created_by",z||"Cofacto"),A&&n.append("slug",A),I&&n.append("meta_description",I),n.append("keywords",B),n.append("company_tickers",JSON.stringify(E)),n.append("send_email","newsletter"===k&&D),H&&(n.append("blog_id",H),n.append("expected_updated_at",q)),N&&n.append("image",N);const o=(await l.A.post("/content",n,{headers:{"Content-Type":"multipart/form-data"}})).data.data;return o&&(O(o.id),o.slug&&R(o.slug),C(e),G(o.updated_at||"")),b.current=!1,V(new Date),t&&null!==o&&void 0!==o&&o.id&&r("/blogs-editor/".concat(o.id),{replace:!0}),!0}catch(i){var n,o;return alert("Save failed: "+((null===(n=i.response)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.detail)||i.message)),!1}finally{Z(!1)}},[f,y,k,z,A,I,B,D,E,H,q,N,t,r]);(0,n.useEffect)(()=>{if(x&&"published"!==j)return h.current=setInterval(()=>{b.current&&f.trim()&&ce("draft")},3e4),()=>clearInterval(h.current)},[x,j,f,ce]);const pe=(0,n.useCallback)(e=>{const t=u.current;w(r=>{const a=t?t.selectionStart:r.length,n=t?t.selectionEnd:r.length,o=r.slice(0,a)+e+r.slice(n);if(t){const r=a+e.length;requestAnimationFrame(()=>{t.focus(),t.setSelectionRange(r,r)})}return o}),b.current=!0},[]),ue=(0,n.useCallback)(async(e,t)=>{if(e){ae(!0);try{const r=new FormData;r.append("file",e);const a=await l.A.post("/upload-image",r,{headers:{"Content-Type":"multipart/form-data"}}),n=(t||e.name||"image").replace(/\.[a-z0-9]+$/i,"").replace(/[[\]]/g,"");pe("\n\n![".concat(n,"](").concat(a.data.url,")\n\n"))}catch(n){var r,a;alert("Image upload failed: "+((null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.detail)||n.message))}finally{ae(!1)}}},[pe]),ge=(0,n.useCallback)(e=>{var t;const r=Array.from((null===(t=e.clipboardData)||void 0===t?void 0:t.items)||[]).find(e=>"file"===e.kind&&e.type.startsWith("image/"));r&&(e.preventDefault(),ue(r.getAsFile(),""))},[ue]),he=(0,n.useCallback)(e=>{var t;const r=Array.from((null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||[]).find(e=>e.type.startsWith("image/"));r&&(e.preventDefault(),ue(r,r.name))},[ue]),be=(0,n.useCallback)(()=>{const e=(window.prompt("Chart id (from a chat-created chart, or POST /api/charts):")||"").trim();if(!e)return;const t=(window.prompt("Caption (optional):")||"").trim();pe("\n\n![".concat(t,"](/charts/").concat(e,".svg)\n\n"))},[pe]);return null===x||J?(0,s.jsx)("div",{className:"flex justify-center items-center",style:{minHeight:"80vh"},children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2",style:{borderColor:"var(--blue-600)"}})}):x?(0,s.jsxs)("div",{style:{minHeight:"100vh",background:"var(--bg-primary)"},children:[(0,s.jsxs)("div",{style:{borderBottom:"1px solid var(--border-color)",background:"var(--bg-secondary)",padding:"10px 24px",display:"flex",alignItems:"center",justifyContent:"space-between",position:"sticky",top:0,zIndex:20},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:14},children:[(0,s.jsxs)("button",{onClick:()=>r("/blogs-editor"),style:{color:"var(--text-secondary)",background:"none",border:"none",cursor:"pointer",fontSize:13,display:"flex",alignItems:"center",gap:4},children:[(0,s.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:(0,s.jsx)("path",{d:"M10 12L6 8l4-4"})}),"Posts"]}),(0,s.jsx)("div",{style:{width:1,height:18,background:"var(--border-color)"}}),"published"===j&&(0,s.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 8px",borderRadius:99,background:"var(--green-50, rgba(220,252,231,0.15))",color:"var(--green-600)",textTransform:"uppercase",letterSpacing:"0.5px"},children:"Live"}),"draft"===j&&H&&(0,s.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 8px",borderRadius:99,background:"var(--orange-50, rgba(255,237,213,0.15))",color:"var(--yellow-600)",textTransform:"uppercase",letterSpacing:"0.5px"},children:"Draft"}),Q&&(0,s.jsxs)("span",{style:{fontSize:11,color:"var(--text-muted)"},children:["Saved ",Q.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:["published"===j&&(0,s.jsx)("button",{onClick:async()=>{window.confirm("Revert to draft? It will be removed from the website.")&&await ce("draft")},disabled:$,style:{fontSize:12,color:"var(--yellow-600)",background:"none",border:"none",cursor:"pointer",padding:"5px 10px"},children:"Unpublish"}),"blog"===k&&(0,s.jsxs)("button",{type:"button",onClick:async()=>
1{if(!f.trim()||!y.trim())return void alert("Add a title and content before opening the page preview.");const e=window.open("","_blank");if(e){e.opener=null,e.document.write('<!doctype html><html><head><meta charset="utf-8">\n      <meta name="viewport" content="width=device-width,initial-scale=1">\n      <title>Preparing page preview\u2026</title><style>\n      *{box-sizing:border-box}html,body{height:100%;margin:0;background:#f5f5f4;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}\n      .preview-shell{height:100%;display:grid;grid-template-rows:42px 1fr}.preview-bar{display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:#171717;color:#fafafa;border-bottom:1px solid #303030;font-size:12px;letter-spacing:.01em}\n      .preview-label{display:flex;align-items:center;gap:9px;font-weight:600}.preview-dot{width:7px;height:7px;border-radius:50%;background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.14)}.preview-note{color:#a3a3a3;font-weight:400}\n      iframe{display:block;width:100%;height:100%;border:0;background:#fafaf9}.preview-loading{display:grid;place-items:center;color:#737373;font-size:13px}\n      </style></head><body><div class="preview-shell"><div class="preview-bar"><div class="preview-label"><span class="preview-dot"></span><span>Draft page preview</span><span class="preview-note">Exact publisher template</span></div><span class="preview-note">Not public \xb7 scripts disabled</span></div><div id="preview-stage" class="preview-loading">Rendering current draft\u2026</div></div></body></html>'),e.document.close(),de(!0);try{const t=new FormData;t.append("title",f),t.append("content",y),t.append("created_by",z||"Cofacto"),t.append("slug",A),t.append("meta_description",I),t.append("keywords",B),t.append("company_tickers",JSON.stringify(E)),H&&t.append("blog_id",H),t.append("image_url",F&&!F.startsWith("blob:")?F:""),N&&t.append("image",N);const r=await l.A.post("/content/preview-page",t,{headers:{"Content-Type":"multipart/form-data"},responseType:"text"});if(e.closed)return;e.document.title="Preview \u2014 ".concat(f);const a=e.document.getElementById("preview-stage");a.className="";const n=e.document.createElement("iframe");n.title="Full page preview: ".concat(f),n.setAttribute("sandbox","allow-popups allow-popups-to-escape-sandbox"),n.setAttribute("referrerpolicy","no-referrer"),n.srcdoc=r.data,a.replaceChildren(n)}catch(a){var t,r;const n=(null===(t=a.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.detail)||a.message;if(!e.closed){const t=e.document.getElementById("preview-stage");t.textContent="Preview failed: ".concat(n),t.style.color="#b91c1c"}}finally{de(!1)}}else alert("The preview window was blocked. Allow pop-ups for this site and try again.")},disabled:se,title:"Open the current draft in the complete published-page template",style:{fontSize:12,fontWeight:500,padding:"6px 12px",borderRadius:6,border:"1px solid var(--border-color)",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",opacity:se?.5:1,display:"inline-flex",alignItems:"center",gap:5},children:[se?"Opening\u2026":"Page preview",!se&&(0,s.jsx)("span",{"aria-hidden":"true",style:{fontSize:13},children:"\u2197"})]}),(0,s.jsx)("button",{onClick:()=>ce("draft"),disabled:$,style:{fontSize:12,fontWeight:500,padding:"6px 14px",borderRadius:6,border:"1px solid var(--border-color)",background:"var(--bg-primary)",color:"var(--text-primary)",cursor:"pointer",opacity:$?.5:1},children:$?"Saving...":"Save Draft"}),(0,s.jsx)("button",{onClick:async()=>{const e="published"===j?"update this published post":"publish this post";if("newsletter"===k&&D){const e=function(e){const t=[];/<svg[\s>]/i.test(e)&&t.push("Raw inline <svg> won't show in email \u2014 use a chart reference (/charts/{id}.svg) so it sends as a PNG.");/<style[\s>]/i.test(e)&&t.push("A <style>
1 block will be stripped by Gmail \u2014 use inline styles.");/<(div|section|span|table)[\s>]/i.test(e)&&t.push("Raw HTML blocks may render inconsistently across mail clients.");e.length>6e4&&t.push("Content is long \u2014 Gmail clips emails over ~102 KB; consider trimming.");return t}(y);if(e.length&&!window.confirm("This newsletter will be EMAILED on publish.\n\nPreflight warnings:\n\u2022 ".concat(e.join("\n\u2022 "),"\n\nSend anyway?")))return}if(!window.confirm("".concat(e,"? This will make it live on the website.").concat("newsletter"===k&&D?" An email will be sent.":"")))return;await ce("published")&&alert("published"===j?"Updated and republished!":"Published! Static page will be generated automatically.")},disabled:$,style:{fontSize:12,fontWeight:600,padding:"6px 16px",borderRadius:6,border:"none",background:"var(--blue-600)",color:"#fff",cursor:"pointer",opacity:$?.5:1},children:$?"...":"published"===j?"Update":"Publish"})]})]}),(0,s.jsxs)("div",{style:{borderBottom:"1px solid var(--border-color)",background:"var(--bg-secondary)",padding:"10px 24px",display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"},children:[(0,s.jsx)(p,{label:"Author",width:160,children:(0,s.jsx)("input",{type:"text",value:z,onChange:e=>{_(e.target.value),b.current=!0},placeholder:"Author name",style:c})}),(0,s.jsx)(p,{label:"Type",width:130,children:(0,s.jsxs)("select",{value:k,onChange:e=>{S(e.target.value),b.current=!0},style:c,children:[(0,s.jsx)("option",{value:"blog",children:"Blog"}),(0,s.jsx)("option",{value:"newsletter",children:"Newsletter"}),(0,s.jsx)("option",{value:"research_note",children:"Research Note"})]})}),(0,s.jsx)(p,{label:"Slug",width:220,children:(0,s.jsx)("input",{type:"text",value:A,onChange:e=>{R(e.target.value),b.current=!0},placeholder:"auto-from-title",style:c})}),(0,s.jsx)(p,{label:"Keywords",width:200,children:(0,s.jsx)("input",{type:"text",value:B,onChange:e=>{W(e.target.value),b.current=!0},placeholder:"comma, separated",style:c})}),"newsletter"===k&&(0,s.jsxs)("label",{title:"Send this newsletter to the email list when published",style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--text-secondary)",cursor:"pointer",flexShrink:0},children:[(0,s.jsx)("input",{type:"checkbox",checked:D,onChange:e=>{P(e.target.checked),b.current=!0}}),"Email on publish"]}),(0,s.jsx)("button",{onClick:()=>te(!ee),style:{fontSize:11,fontWeight:500,color:"var(--blue-600)",background:"none",border:"none",cursor:"pointer",padding:"4px 0",marginLeft:"auto"},children:ee?"Hide description":"Meta description..."})]}),ee&&(0,s.jsx)("div",{style:{borderBottom:"1px solid var(--border-color)",background:"var(--bg-secondary)",padding:"8px 24px 12px"},children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:8,maxWidth:640},children:[(0,s.jsxs)("span",{style:{fontSize:11,color:"var(--text-muted)",whiteSpace:"nowrap",paddingTop:6},children:["Description (",I.length,"/160)"]}),(0,s.jsx)("textarea",{value:I,onChange:e=>{T(e.target.value),b.current=!0},placeholder:"Auto-generated from content if empty",maxLength:160,rows:2,style:(0,a.A)((0,a.A)({},c),{},{resize:"none",lineHeight:1.5,flex:1})})]})}),(0,s.jsx)("style",{children:"\n        /* Monospace body pane: what you type is exactly what is stored and\n           published \u2014 no serialiser between the keystroke and the database. */\n        .ce-md-source {\n          width: 100%;\n          min-height: 720px;\n          resize: vertical;\n          border: none;\n          outline: none;\n          background: transparent;\n          color: var(--text-primary);\n          font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n          font-size: 14px;\n          line-height: 1.7;\n          tab-size: 2;\n          padding: 20px 24px;\n        }\n        .ce-md-source::placeholder { color: var(--text-muted); }\n        .ce-tool {\n          font-size: 12px;\n          padding: 5px 10px;\n          border-radius: 6px;\n          border: 1px solid var(--border-color);\n          background: var(--bg-primary);\n          color: var(--text-secondary);\n          cursor: pointer;\n        }\n        .ce-tool:hover { color: var(--text-primary); border-color: var(--text-secondary); }\n      "}),(0,s.jsxs)("div",{style:{width:"100%",maxWidth:"min(1400px, 94vw)",margin:"0 auto",padding:"28px 32px 80px"},children:[(0,s.jsx)("input",{type:"text",value:f,onChange:e=>{return r=e.target.value,v(r),b.current=!0,void(!t&&A||!r||R(r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")));var r},placeholder:"Untitled post",style:{width:"100%",fontSize:32,fontWeight:700,background:"transparent",border:"none",outline:"none",color:"var(--text-primary)",padding:"0 0 14px",borderBottom:"2px s
1olid var(--border-color)",marginBottom:20,lineHeight:1.3,letterSpacing:"-0.02em"}}),F?(0,s.jsxs)("div",{style:{position:"relative",marginBottom:20,borderRadius:8,overflow:"hidden"},children:[(0,s.jsx)("img",{src:F,alt:"Cover",style:{width:"100%",maxHeight:280,objectFit:"cover",display:"block"}}),(0,s.jsx)("button",{onClick:()=>{L(null),U("")},style:{position:"absolute",top:8,right:8,background:"rgba(0,0,0,0.6)",color:"#fff",border:"none",borderRadius:4,padding:"4px 10px",fontSize:11,cursor:"pointer"},children:"Remove"})]}):(0,s.jsxs)("label",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:6,width:"100%",height:64,borderRadius:8,cursor:"pointer",marginBottom:20,background:"var(--bg-secondary)",border:"1px solid var(--border-color)",color:"var(--text-muted)",fontSize:13,transition:"all 0.15s"},onMouseEnter:e=>{e.currentTarget.style.borderColor="var(--text-secondary)",e.currentTarget.style.color="var(--text-secondary)"},onMouseLeave:e=>{e.currentTarget.style.borderColor="var(--border-color)",e.currentTarget.style.color="var(--text-muted)"},children:[(0,s.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[(0,s.jsx)("rect",{x:"2",y:"2",width:"14",height:"14",rx:"2"}),(0,s.jsx)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),(0,s.jsx)("path",{d:"M16 12l-4-4-8 8"})]}),"Add cover image",(0,s.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{const t=e.target.files[0];t&&(L(t),U(URL.createObjectURL(t)),b.current=!0)},style:{display:"none"}})]}),(0,s.jsxs)("div",{style:{display:"flex",gap:2,marginBottom:12},children:[["Write","Preview"].map(e=>{const t="Write"===e?!X:X;return(0,s.jsx)("button",{onClick:()=>Y("Preview"===e),style:{fontSize:13,fontWeight:t?600:400,padding:"5px 12px",borderRadius:6,border:"none",cursor:"pointer",background:t?"var(--bg-tertiary)":"transparent",color:t?"var(--text-primary)":"var(--text-muted)"},children:e},e)}),X&&(0,s.jsx)("span",{style:{marginLeft:"auto",alignSelf:"center",fontSize:11,color:ie?"var(--red-600, #dc2626)":"var(--text-muted)"},children:ie?"Preview failed: ".concat(ie):"Rendered by the publisher \u2014 this is what ships"})]}),X?(0,s.jsx)("iframe",{title:"newsletter"===k?"Email preview":"Blog preview",sandbox:"",referrerPolicy:"no-referrer",srcDoc:d(ne,f,"newsletter"===k),style:{width:"100%",height:760,background:"#fff",border:"1px solid var(--border-color)",borderRadius:8}}):(0,s.jsxs)("div",{style:{borderRadius:8,overflow:"hidden",border:"1px solid var(--border-color)",boxShadow:"0 1px 3px rgba(0,0,0,0.06)",background:"var(--bg-secondary)"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",padding:"8px 12px",borderBottom:"1px solid var(--border-color)",background:"var(--bg-primary)"},children:[(0,s.jsxs)("label",{className:"ce-tool",style:{display:"inline-flex",alignItems:"center",gap:5},children:[re?"Uploading\u2026":"Insert image",(0,s.jsx)("input",{type:"file",accept:"image/*",disabled:re,onChange:e=>{const t=e.target.files[0];e.target.value="",ue(t,null===t||void 0===t?void 0:t.name)},style:{display:"none"}})]}),(0,s.jsx)("button",{type:"button",className:"ce-tool",onClick:be,children:"Insert chart"}),(0,s.jsx)("button",{type:"button",className:"ce-tool",onClick:()=>pe("\n\n| Col A | Col B |\n|---|---|\n| 1 | 2 |\n\n"),children:"Insert table"}),(0,s.jsx)("span",{style:{marginLeft:"auto",fontSize:11,color:"var(--text-muted)"},children:"Markdown \xb7 paste or drop an image to upload"})]}),(0,s.jsx)("textarea",{ref:u,className:"ce-md-source",value:y,onChange:e=>{return t=e.target.value,w(t),void(b.current=!0);var t},onPaste:ge,onDrop:he,onDragOver:e=>e.preventDefault(),spellCheck:!0,placeholder:"# Start writing\u2026\n\nMarkdown: ## heading, **bold**, [link](url), | tables |."})]})]})]}):(0,s.jsx)("div",{className:"flex justify-center items-center",style:{minHeight:"80vh",color:"var(--text-secondary)"},children:"This page is not accessible to you"})}}}]);

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.