1import{c as a}from"./createLucideIcon-KvCq-jqg.js";import{a as s,A as c}from"./select-5bf2YkJm.js";/** 2 * @license lucide-react v0.481.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const n=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],l=a("Trash2",n);async function E(r,t){try{s.track(c.TASK_DOWNLOAD_STARTED,{taskId:r,fileType:t});const e=await fetch(`/api/tasks/${r}/download/${t}`),o=await e.json();return e.ok?(s.track(c.TASK_DOWNLOADED,{taskId:r,fileType:t,filename:o.filename}),{success:!0,data:o}):(s.track(c.TASK_DOWNLOAD_FAILED,{taskId:r,fileType:t,error:o.error}),{success:!1,error:o.error})}catch(e){return s.track(c.TASK_DOWNLOAD_ERROR,{taskId:r,fileType:t,error:String(e)}),{success:!1,error:"An error occurred during download"}}}function T(r,t){console.log(`Downloading ${t}...`);const e=document.createElement("a");e.href=r,e.target="_blank",e.rel="noopener noreferrer",document.body.appendChild(e),e.click(),document.body.removeChild(e)}async function d(r){try{s.track(c.TASK_DELETED,{taskId:r,action:"started"});const t=await fetch(`/api/tasks/${r}`,{method:"DELETE"});if(t.ok)return s.track(c.TASK_DELETED,{taskId:r,success:!0}),{success:!0};{const e=await t.json();return s.track(c.TASK_DELETED,{taskId:r,success:!1,error:e.error}),{success:!1,error:e.error||"Failed to delete task"}}}catch(t){return s.track(c.TASK_DELETED,{taskId:r,success:!1,error:String(t)}),{success:!1,error:"An error occurred while deleting the task"}}}async function A(r){try{s.track(c.TASK_RETRY_STARTED,{taskId:r});const t=await fetch(`/api/tasks/${r}/retry`,{method:"POST"}),e=await t.json();return t.ok?(s.track(c.TASK_RETRY_SUCCESS,{taskId:r,status:e.status}),{success:!0}):(s.track(c.TASK_RETRY_FAILED,{taskId:r,error:e.error}),{success:!1,error:e.error||"Failed to retry task"})}catch(t){return s.track(c.TASK_RETRY_ERROR,{taskId:r,error:String(t)}),{success:!1,error:"An error occurred while retrying the task"}}}export{l as T,E as a,d,A as r,T as t};
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.