module.exports=[30400,a=>{"use strict";var b=a.i(39752),c=a.i(48558);let d=(0,a.i(42261).cva)("rounded-xl border p-5 shadow-[0_1px_3px_rgb(0_0_0/0.04)]",{variants:{tone:{default:"border-border bg-card",warning:"border-amber-200 bg-amber-50/50 dark:border-amber-900 dark:bg-amber-950/30",success:"border-emerald-200 bg-emerald-50/50 dark:border-emerald-900 dark:bg-emerald-950/30",error:"border-red-200 bg-red-50/50 dark:border-red-900 dark:bg-red-950/30"},interactive:{true:"transition-shadow duration-150 hover:shadow-[0_4px_6px_rgb(0_0_0/0.06)]",false:""}},defaultVariants:{tone:"default",interactive:!1}});a.s(["Card",0,function({className:a,tone:e,interactive:f,...g}){return(0,b.jsx)("div",{className:(0,c.cn)(d({tone:e,interactive:f}),a),...g})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{className:(0,c.cn)("mb-3 flex items-center justify-between",a),...d})},"CardStatLabel",0,function({className:a,...d}){return(0,b.jsx)("h3",{className:(0,c.cn)("text-sm font-medium text-muted-foreground",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("h3",{className:(0,c.cn)("text-lg font-semibold text-foreground",a),...d})},"CardValue",0,function({className:a,...d}){return(0,b.jsx)("div",{className:(0,c.cn)("text-3xl font-bold text-foreground",a),...d})}])},96336,a=>{"use strict";let b=(0,a.i(5423).default)("Trash2",[["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"}]]);a.s(["Trash2",0,b],96336)},43179,a=>{"use strict";let b=(0,a.i(5423).default)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);a.s(["Plus",0,b],43179)},7437,a=>{"use strict";var b=a.i(8753),c=a.i(62588),d=a.i(81130),e=a.i(59974);class f extends Error{conflict;constructor(a){super("context_conflict"),this.conflict=a,this.name="ContextConflictError"}}a.s(["ContextConflictError",0,f,"useContextFile",0,function(a,b){return(0,c.useQuery)({queryKey:["context",a],queryFn:()=>e.api.get(`/context/${a}`),enabled:!!a&&b?.enabled!==!1,refetchOnWindowFocus:b?.enabled!==!1})},"useContextList",0,function(a){return(0,c.useQuery)({queryKey:["context-list",a],queryFn:()=>e.api.get(`/context/list/${a}`)})},"useDeleteContextFile",0,function(){let a=(0,d.useQueryClient)();return(0,b.useMutation)({mutationFn:async({path:a})=>e.api.delete(`/context/${a}`),onSuccess:(b,{path:c})=>{a.removeQueries({queryKey:["context",c]}),a.invalidateQueries({queryKey:["snapshots",c]});let d=c.includes("/")?c.split("/")[0]:null;d&&a.invalidateQueries({queryKey:["context-list",d]}),c.startsWith("routines/custom/")&&a.invalidateQueries({queryKey:["context-list","routines"]})}})},"useUpdateContextFile",0,function(){let a=(0,d.useQueryClient)();return(0,b.useMutation)({mutationFn:async({path:a,content:b,expectedMtime:c})=>{try{return await e.api.put(`/context/${a}`,{content:b,...void 0!==c?{expectedMtime:c}:{}})}catch(a){if(a instanceof e.ApiError&&409===a.status&&a.body?.error==="conflict"){let b=a.body;throw new f({currentMtime:b.currentMtime??"",currentContent:b.currentContent??""})}throw a}},onSuccess:(b,{path:c,content:d})=>{a.setQueryData(["context",c],a=>a?{...a,content:d,lastModified:b.lastModified}:{content:d,lastModified:b.lastModified,editable:!0}),a.invalidateQueries({queryKey:["snapshots",c]});let e=c.includes("/")?c.split("/")[0]:null;e&&a.invalidateQueries({queryKey:["context-list",e]})}})}])},77694,92417,a=>{"use strict";var b=a.i(5423);let c=(0,b.default)("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);a.s(["Power",0,c],77694);let d=(0,b.default)("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);a.s(["PowerOff",0,d],92417)}];

//# sourceMappingURL=_0dei.3~._.js.map