From 0d2d5306b8968e3c8f93c8c4b159b0df074c77bf Mon Sep 17 00:00:00 2001 From: Saleh Mir Date: Thu, 25 Jul 2024 17:29:37 +0330 Subject: [PATCH] update dashboard files --- jesse/static/200.html | 10 +++++----- jesse/static/404.html | 10 +++++----- jesse/static/_nuxt/1OfPoS_-.js | 1 - jesse/static/_nuxt/{CadNkoze.js => 8ZOs1Gwd.js} | 2 +- jesse/static/_nuxt/BlJtC8uF.js | 1 - jesse/static/_nuxt/{1Zuu5sOE.js => BxVo_4D-.js} | 2 +- jesse/static/_nuxt/{DbaDxTuc.js => C7X-_NHR.js} | 2 +- jesse/static/_nuxt/{Dcndd7wk.js => CI3jHjsu.js} | 2 +- jesse/static/_nuxt/{BbjuIOUV.js => CLIaz-ji.js} | 2 +- jesse/static/_nuxt/{CqsPNs1W.js => CbRZ-etx.js} | 2 +- jesse/static/_nuxt/{C2560jq-.js => ClXoQoyw.js} | 2 +- jesse/static/_nuxt/{DaALoRQl.js => CyEJo30r.js} | 2 +- jesse/static/_nuxt/{D270KAH9.js => D3WWa22M.js} | 2 +- jesse/static/_nuxt/DERVWgPS.js | 1 + jesse/static/_nuxt/{tIZ0BYDc.js => DRlj9p5R.js} | 2 +- jesse/static/_nuxt/DTrGDXgG.js | 1 + jesse/static/_nuxt/{Bp2xcJgg.js => DU23lKGZ.js} | 2 +- jesse/static/_nuxt/{okIQluvx.js => DYsvrwWH.js} | 2 +- jesse/static/_nuxt/{QcdhOkh-.js => DddLSi-Q.js} | 2 +- jesse/static/_nuxt/{CgXrlsHy.js => DmRYB_4R.js} | 2 +- jesse/static/_nuxt/{Bimrvkt9.js => KtMNHRoY.js} | 2 +- jesse/static/_nuxt/{WmUs_TNl.js => NCCfBubN.js} | 2 +- jesse/static/_nuxt/{Dggi9RR5.js => WHO4wNIc.js} | 2 +- jesse/static/_nuxt/{D7LfWr59.js => WIlyI65S.js} | 2 +- jesse/static/_nuxt/builds/latest.json | 2 +- .../meta/312c7771-c975-4eaa-a552-b5ce097b8b39.json | 1 + .../meta/f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5.json | 1 - jesse/static/_nuxt/{Crvr41uX.js => iedVCmkz.js} | 12 ++++++------ jesse/static/_nuxt/{DTbDwdDV.js => nKv1GnPl.js} | 2 +- jesse/static/_nuxt/{bVvtH8Bk.js => oJy3_idV.js} | 2 +- jesse/static/_payload.json | 2 +- jesse/static/index.html | 14 +++++++------- 32 files changed, 48 insertions(+), 48 deletions(-) delete mode 100644 jesse/static/_nuxt/1OfPoS_-.js rename jesse/static/_nuxt/{CadNkoze.js => 8ZOs1Gwd.js} (77%) delete mode 100644 jesse/static/_nuxt/BlJtC8uF.js rename jesse/static/_nuxt/{1Zuu5sOE.js => BxVo_4D-.js} (98%) rename jesse/static/_nuxt/{DbaDxTuc.js => C7X-_NHR.js} (73%) rename jesse/static/_nuxt/{Dcndd7wk.js => CI3jHjsu.js} (97%) rename jesse/static/_nuxt/{BbjuIOUV.js => CLIaz-ji.js} (77%) rename jesse/static/_nuxt/{CqsPNs1W.js => CbRZ-etx.js} (97%) rename jesse/static/_nuxt/{C2560jq-.js => ClXoQoyw.js} (56%) rename jesse/static/_nuxt/{DaALoRQl.js => CyEJo30r.js} (96%) rename jesse/static/_nuxt/{D270KAH9.js => D3WWa22M.js} (81%) create mode 100644 jesse/static/_nuxt/DERVWgPS.js rename jesse/static/_nuxt/{tIZ0BYDc.js => DRlj9p5R.js} (99%) create mode 100644 jesse/static/_nuxt/DTrGDXgG.js rename jesse/static/_nuxt/{Bp2xcJgg.js => DU23lKGZ.js} (99%) rename jesse/static/_nuxt/{okIQluvx.js => DYsvrwWH.js} (93%) rename jesse/static/_nuxt/{QcdhOkh-.js => DddLSi-Q.js} (82%) rename jesse/static/_nuxt/{CgXrlsHy.js => DmRYB_4R.js} (80%) rename jesse/static/_nuxt/{Bimrvkt9.js => KtMNHRoY.js} (97%) rename jesse/static/_nuxt/{WmUs_TNl.js => NCCfBubN.js} (97%) rename jesse/static/_nuxt/{Dggi9RR5.js => WHO4wNIc.js} (77%) rename jesse/static/_nuxt/{D7LfWr59.js => WIlyI65S.js} (96%) create mode 100644 jesse/static/_nuxt/builds/meta/312c7771-c975-4eaa-a552-b5ce097b8b39.json delete mode 100644 jesse/static/_nuxt/builds/meta/f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5.json rename jesse/static/_nuxt/{Crvr41uX.js => iedVCmkz.js} (99%) rename jesse/static/_nuxt/{DTbDwdDV.js => nKv1GnPl.js} (99%) rename jesse/static/_nuxt/{bVvtH8Bk.js => oJy3_idV.js} (98%) diff --git a/jesse/static/200.html b/jesse/static/200.html index 6f9037e83..622963cbb 100644 --- a/jesse/static/200.html +++ b/jesse/static/200.html @@ -7,12 +7,12 @@ - + - - - -
\ No newline at end of file diff --git a/jesse/static/404.html b/jesse/static/404.html index 6f9037e83..622963cbb 100644 --- a/jesse/static/404.html +++ b/jesse/static/404.html @@ -7,12 +7,12 @@ - + - - - -
\ No newline at end of file diff --git a/jesse/static/_nuxt/1OfPoS_-.js b/jesse/static/_nuxt/1OfPoS_-.js deleted file mode 100644 index 69009ac1a..000000000 --- a/jesse/static/_nuxt/1OfPoS_-.js +++ /dev/null @@ -1 +0,0 @@ -import{o as l,c as f,a as n,g as B,h as ye,r as w,F,i as le,j as Pe,b as o,w as $,t as R,n as ne,k as r,l as Ie,v as Ue,m as je,ah as q,P as Z,V as O,e as Ae,x as _,R as M,M as V,d as he,a5 as Me,Z as Re,ab as _e,ai as Oe,X as ae,ac as Be,_ as Ne,C as ze,D as me,H as De,I as Fe,J as qe,K as He,N as We,s as Ye,a3 as Ze,y as X,z as Je,A as Qe,ad as fe,O as x,U as D,S as pe,T as ee,W as Ge,a7 as Ke,Y as Xe,$ as et,a1 as tt}from"./Crvr41uX.js";import{r as st}from"./D270KAH9.js";import{b as ke,_ as ot,a as rt}from"./1Zuu5sOE.js";import{_ as nt}from"./QcdhOkh-.js";import{r as ge,_ as lt,a as at,d as it,b as ut}from"./Bp2xcJgg.js";import{_ as dt}from"./tIZ0BYDc.js";import{a as ct,T as mt,_ as ft}from"./DTbDwdDV.js";import{u as pt}from"./DbaDxTuc.js";function ve(C,t){return l(),f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})])}function gt(C,t){return l(),f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[n("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"})])}const vt={base:"animate-pulse",background:"bg-gray-100 dark:bg-gray-800",rounded:"rounded-md"},bt={class:"mb-4"},yt={class:"hidden sm:block"},ht={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"Tabs"},_t=["onMouseup"],kt=["onClick"],xt={class:"absolute right-[1em] focus:outline-none"},$t=n("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),wt=B({__name:"LiveTabs",props:{tabs:{}},emits:["close"],setup(C,{emit:t}){const b=ye(),p=w(b.params.id),a=t;function m(){if(Object.keys(q().tabs).length>=Z().planLimits.live_trading_tabs){O("error",`You have reached the limit of "${Z().planLimits.live_trading_tabs}" tabs for your "${Z().plan}" plan. Please upgrade your plan to add more tabs.`);return}q().addTab()}function v(i){if(!i.form.routes.length)return"New Tab";if(i.results.exception.error&&i.results.monitoring)return"Error";const d=i.form.routes[0];let c="";const y=i.form.exchange;return y&&(c+=`${y} • `),d.strategy&&(c+=`${d.strategy} • `),d.symbol&&(c+=`${d.symbol} • `),d.timeframe&&(c+=`${d.timeframe}`),c=c.endsWith(" • ")?c.slice(0,-3):c,i.results.monitoring&&!i.results.finished?`🟢 ${c}`:i.results.exception.error&&i.results.monitoring?`🔴 ${c}`:i.results.showResults?`${c} | Results`:c}return(i,d)=>{const c=Ae;return l(),f("div",bt,[n("div",yt,[n("nav",ht,[(l(!0),f(F,null,le(i.tabs,y=>(l(),f("div",{key:y.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:Pe(U=>a("close",y.id),["middle"])},[o(c,{to:`/live/${y.id}`,class:ne([y.id===r(p)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:$(()=>[n("span",null,R(v(y)),1),n("span",{"aria-hidden":"true",class:ne([y.id===r(p)&&Object.keys(i.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),Ie(n("button",{class:"absolute right-[1em] focus:outline-none",onClick:U=>a("close",y.id)},[o(r(je),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,kt),[[Ue,Object.keys(i.tabs).length>1&&(!y.results.monitoring||y.results.finished)]])],40,_t))),128)),n("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center justify-center",onClick:m},[n("button",xt,[o(r(st),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),$t])])])])}}}),Ct=B({__name:"LiveOrders",props:{orders:{}},setup(C){const t=C,b=_(()=>{if(!t.orders.length)return[];const p=[];for(let a=t.orders.length-1;a>=0;a--){const m=t.orders[a];p.push([{value:m.id.slice(-12),style:"text-xs",tooltip:m.id,tag:"code"},{value:M.timestampToTimeOnly(m.created_at),style:"text-xs",tooltip:M.timestampToTime(m.created_at)},{value:m.symbol,style:"text-xs"},{value:m.type,style:"text-xs"},{value:m.side,style:M.colorBasedOnSide(m.side)},{value:m.price,style:"text-xs"},{value:m.qty,style:M.colorBasedOnSide(m.side)},{value:m.status,style:"text-xs"}])}return p});return(p,a)=>{const m=ke,v=nt;return r(b).length?(l(),V(m,{key:0,data:r(b),"header-items":["ID","Created","Symbol","Type","Side","Price","QTY","Status"],header:""},null,8,["data"])):(l(),V(v,{key:1}))}}}),Tt=n("p",null," If you think something is wrong with your running live session, you can submit a report. By submitting this form, the logs of this session will be sent to Jesse's developers so we can see what's going on. ",-1),Vt=n("br",null,null,-1),Lt=n("p",null,[he("Your exchange API keys and strategies are safe and "),n("b",null,"are never sent to us.")],-1),St=n("br",null,null,-1),Et=n("br",null,null,-1),Pt=n("br",null,null,-1),It={class:"flex justify-end item-center"},Ut={class:"flex justify-end"},jt=B({__name:"ReportLiveSession",emits:["close"],setup(C,{emit:t}){const b=t,p=w(!1),a=w({description:"",email:""}),m=()=>{b("close")},v=async()=>{p.value=!0;const{data:i,error:d}=await Me("/report-exception",{description:a.value.description,email:a.value.email,traceback:"manual report",mode:"live",attach_logs:!0,session_id:props.sessionId},!0);if(p.value=!1,d.value&&d.value.statusCode!==200){O("error",`[${d.value.statusCode}]: ${d.value.statusText}`);return}const c=i.value;c.status==="success"?(a.value.description="",a.value.email="",O("success",c.message),m()):c.status==="error"&&O("error",c.message)};return(i,d)=>{const c=Re,y=_e,U=Oe,j=ae,k=Be;return l(),f(F,null,[Tt,Vt,Lt,St,o(k,{state:r(a),class:"space-y-4",onSubmit:v},{default:$(()=>[o(y,{label:"Email (optional)",help:"Enter your email address for us to know who sent the email and possibly reply back to you."},{default:$(()=>[o(c,{modelValue:r(a).email,"onUpdate:modelValue":d[0]||(d[0]=L=>r(a).email=L),placeholder:"Email address...",type:"email"},null,8,["modelValue"])]),_:1}),Et,o(y,{label:"Description (optional):",name:"Description"},{default:$(()=>[o(U,{modelValue:r(a).description,"onUpdate:modelValue":d[1]||(d[1]=L=>r(a).description=L),rows:10,placeholder:"Describe what you think is wrong in this session..."},null,8,["modelValue"])]),_:1}),Pt,n("div",It,[n("div",Ut,[o(j,{color:"gray",variant:"link",class:"mr-8",label:"Cancel",onClick:d[2]||(d[2]=L=>m())}),o(j,{type:"submit",class:"w-48 flex justify-center",label:"Submit",loading:r(p),disabled:r(p)},null,8,["loading","disabled"])])])]),_:1},8,["state"])],64)}}}),At=ze(me.ui.strategy,me.ui.skeleton,vt),Mt=B({inheritAttrs:!1,props:{class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(C){const{ui:t,attrs:b}=De("skeleton",Fe(C,"ui"),At),p=_(()=>qe(He(t.value.base,t.value.background,t.value.rounded),C.class));return{ui:t,attrs:b,skeletonClass:p}}});function Rt(C,t,b,p,a,m){return l(),f("div",We({class:C.skeletonClass},C.attrs),null,16)}const Ot=Ne(Mt,[["render",Rt]]),be={width:800,height:380,crosshair:{mode:ct.Normal}},Bt={chart:{layout:{background:{color:"#ffffff"},textColor:"rgba(33, 56, 77, 1)"},grid:{vertLines:{color:"#f1f1f1",visible:!1},horzLines:{color:"#f1f1f1",visible:!1}},priceScale:{borderColor:"rgba(197, 203, 206, 0.6)"},timeScale:{borderColor:"rgba(197, 203, 206, 0.6)",timeVisible:!0,secondsVisible:!1}},series:{color:"#4f46e5"}},Nt={chart:{layout:{background:{color:"#333333"},textColor:"#D1D5DB"},grid:{vertLines:{color:"#525252",visible:!1},horzLines:{color:"#525252",visible:!1}},priceScale:{borderColor:"#525252"},timeScale:{borderColor:"#525252",timeVisible:!0,secondsVisible:!1}},series:{color:"#818CF8"}},zt={class:"mb-16"},Dt={key:0,class:"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600 p-4"},Ft={key:1},qt=B({__name:"CandlesChart",props:{form:{},results:{}},setup(C){const t=Ye(),b=_(()=>Ze().params.id),p=w(!0),a=C,m=w();let v=null,i=null;const d={orderEntries:{},positionEntry:null},c=_(()=>t.value),y=a.form.exchange,U=_(()=>`${y}-${a.results.selectedRoute.symbol}-${a.results.selectedRoute.timeframe}`),j=_(()=>a.results.currentCandles),k=_(()=>{const g=a.results.positions.find(h=>h[0].value===a.results.selectedRoute.symbol);return g===void 0?[]:g}),L=_(()=>k.value[2].value),N=_(()=>Number(k.value[1].value)>0?"long":Number(k.value[1].value)<0?"short":"close");X(j,(g,h)=>{i!==null&&te(g[U.value])}),X(c,g=>{K(g)}),X(L,(g,h)=>{i!==null&&g!==h&&Q()}),X(()=>a.results.orders,()=>{i!==null&&G()},{deep:!0}),Je(async()=>{setTimeout(async()=>{await z()},200)});async function z(){p.value=!0,await q().fetchCandles(b.value),p.value=!1,be.width=m.value.clientWidth,v=mt(m.value,be),v.applyOptions({watermark:{visible:!0,fontSize:16,horzAlign:"left",vertAlign:"bottom",color:"#888",text:`${a.results.selectedRoute.symbol} • ${a.results.selectedRoute.timeframe}`}}),i=v.addCandlestickSeries(),i.setData(a.results.candles),v.timeScale().fitContent(),Q(),G(),K(c.value)}Qe(()=>{J()});function J(){v!==null&&(v.remove(),v=null),i&&(i=null)}function Q(){const g=N.value==="long"?"#00AB5C":"#FF497D";if(d.positionEntry&&i.removePriceLine(d.positionEntry),Number(L.value)>0){const h={price:Number(L.value),color:g,lineWidth:1,lineStyle:0,axisLabelVisible:!0,title:"Entry Price"};d.positionEntry=i.createPriceLine(h)}}function G(){const g=k.value[0].value;for(const h in d.orderEntries)i.removePriceLine(d.orderEntries[h]),delete d.orderEntries[h];a.results.orders.forEach(h=>{const S=h.side==="buy"?"#00AB5C":"#FF497D",H=fe.startCase(fe.lowerCase(`${h.side} ${h.type}`));if((h.status==="ACTIVE"||h.status==="QUEUED")&&h.symbol===g){const A={price:Number(h.price),color:S,lineWidth:1,lineStyle:0,axisLabelVisible:!0,title:H};d.orderEntries[h.id]=i.createPriceLine(A)}})}function te(g){if(g===void 0)throw new TypeError("candle is undefined!");a.results.candles.length===0||a.results.candles[a.results.candles.length-1].time>g.time||i.update(g)}function K(g){v!==null&&v.applyOptions(g==="light"?Bt.chart:Nt.chart)}function se(g){a.results.selectedRoute=g,J(),z()}return(g,h)=>{const S=Ot,H=ae;return l(),f("div",zt,[r(p)?(l(),f("div",Dt,[o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-2/3 mb-4"}),o(S,{class:"h-4 w-1/2 mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-2/3 mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-full"})])):x("",!0),n("div",{ref_key:"chartContainer",ref:m,class:ne({"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600":!r(p)})},null,2),a.form.routes.length>1?(l(),f("div",Ft,[(l(!0),f(F,null,le(a.form.routes,A=>(l(),V(H,{key:A.symbol,variant:"soft",color:"gray",disabled:g.results.selectedRoute.symbol===A.symbol&&g.results.selectedRoute.timeframe===A.timeframe,class:"mt-2 mr-2",onClick:ie=>se(A)},{default:$(()=>[he(R(A.symbol)+" • "+R(A.timeframe),1)]),_:2},1032,["disabled","onClick"]))),128))])):x("",!0)])}}}),Ht={key:0,class:"flex flex-col items-center justify-center select-none mt-[10%]"},Wt=["textContent"],Yt={class:"mt-8"},Zt={key:1,class:"mx-auto container mt-8"},Jt={key:0,"data-cy":"live-page-content"},Qt={class:"flex justify-between items-center"},Gt=n("span",null," No exchange API keys found. Please add at least one: ",-1),Kt={class:"grid grid-cols-1 gap-6"},Xt={class:"flex justify-between items-center"},es=n("span",null," No notification API keys found. Please add at least one: ",-1),ts={key:1},ss={key:0,class:"mb-8"},os=n("span",null,"More",-1),rs={key:0},ns={key:0,class:"mt-8 lg:mt-0"},ls={key:1,"data-cy":"live-action-button"},as={key:1,class:"my-8 border-2 dark:border-gray-600 rounded-full"},is={key:2,class:"bg-white dark:bg-gray-700 grid grid-cols-1 gap-6 border dark:border-gray-600 rounded py-4 px-6 select-none"},us={class:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate"},ds={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},cs={class:"flex justify-between items-center"},ms={class:"flex justify-start items-center"},fs=n("span",null,"Info Logs:",-1),ps={class:"focus:outline-none flex justify-start items-center"},gs={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},vs={class:"flex justify-between items-center"},bs={class:"flex justify-start items-center"},ys=n("span",null,"Error Logs:",-1),hs={class:"focus:outline-none flex justify-start items-center"},_s={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},ks={key:3},xs=B({__name:"LiveTab",props:{form:{},results:{}},setup(C){const t=C,b=w([]),p=w(!1),a=w(!1),m=w(!1),v=w(!1),i=w(!1),d=w(!1),c=w(!1),y=w(!1),U=w(!1),j=w(!1),k=Z(),L=q(),N=w([]);async function z(){if(!t.form.paper_mode){const e=k.exchangeApiKeys.find(s=>s.id===t.form.exchange_api_key_id);e&&(t.form.exchange=e.exchange)}N.value=await Z().getExchangeSupportedSymbols(t.form.exchange);for(let e=0;e0)for(let e=0;e{const e=[{label:"Exchange",value:t.results.generalInfo.exchange},{label:"Current Time",value:M.timestampToTime(t.results.generalInfo.current_time)},{label:"Debug Mode",value:t.results.generalInfo.debug_mode},{label:"Paper Trade",value:t.results.generalInfo.paper_mode},{label:"PNL",value:`${t.results.generalInfo.pnl} (${t.results.generalInfo.pnl_perc}%)`},{label:"Started",value:M.timestampToTime(t.results.generalInfo.started_at)},{label:"Started/Current Balance",value:`${t.results.generalInfo.started_balance} / ${t.results.generalInfo.current_balance}`},{label:"Trades",value:`${t.results.generalInfo.count_trades}`}];return t.results.generalInfo.leverage_type!=="spot"&&(e.push({label:"Available Margin",value:`${t.results.generalInfo.available_margin}`}),e.push({label:"Leverage",value:`${t.results.generalInfo.leverage}x (${t.results.generalInfo.leverage_type})`})),e}),Q=_(()=>k.notificationApiKeys.map(e=>({label:`${e.name} - ${e.driver}`,value:e.id}))),G=_(()=>Math.round(t.results.progressbar.estimated_remaining_seconds)===0?"Please wait...":`${Math.round(t.results.progressbar.estimated_remaining_seconds)} seconds remaining...`),te=_(()=>{if(!t.results.orders)return[];const e=[],s=5,E=t.results.orders.length,P=E-s>=0?E-s:0;for(let W=E-1;W>=P;W--){const T=t.results.orders[W],I=T.status==="PARTIALLY FILLED"?`${T.filled_qty}/${T.qty}`:T.qty;e.push([{value:M.timestampToTimeOnly(T.created_at),style:"text-xs",tooltip:M.timestampToTime(T.created_at)},{value:T.symbol,style:"text-xs"},{value:T.type,style:"text-xs"},{value:T.side,style:M.colorBasedOnSide(T.side)},{value:T.price,style:"text-xs"},{value:I,style:M.colorBasedOnSide(T.side)},{value:T.status,style:"text-xs"}])}return e}),K=_(()=>{let e=[];const s=k.jesseSupportedTimeframes;return k.settings.live.generate_candles_from_1m||!t.form.exchange?e=s.map(E=>k.planLimits.timeframes.includes(E)?{label:E,value:E,disabled:!1}:{label:`${E} (Upgrade required)`,value:E,disabled:!0}):e=k.exchangeInfo[t.form.exchange].supported_timeframes.map(P=>k.planLimits.timeframes.includes(P)?{label:P,value:P,disabled:!1}:{label:`${P} (Upgrade required)`,value:P,disabled:!0}),e}),se=_(()=>k.liveTradingExchangeNames.map(e=>k.planLimits.exchanges.includes(e)?{label:e,value:e,disabled:!1}:{label:`${e} (Upgrade required)`,value:e,disabled:!0})),g=_(()=>k.exchangeApiKeys.map(e=>k.planLimits.exchanges.includes(e.exchange)?{label:`${e.exchange} - ${e.name}`,value:e.id,disabled:!1}:{label:`${e.exchange} - ${e.name} (Upgrade required)`,value:e.id,disabled:!0})),h=L.cancel,S=L.newLive;function H(e){if(b.value.length){for(let s=0;s{v.value=!1},3e3)}function xe(){m.value=!0,navigator.clipboard.writeText(t.results.errorLogs),O("success","Logs copied successfully"),i.value=!0,setTimeout(()=>{i.value=!1},3e3)}const ue=_(()=>["basic","pro","enterprise","lifetime"].includes(k.plan));return(e,s)=>{const E=Ct,P=Ge,W=jt,T=ot,I=ae,$e=Ke,we=lt,de=at,Y=Xe,oe=dt,Ce=rt,ce=et,Te=_e,Ve=qt,re=ke,Le=it,Se=ft,Ee=ut;return l(),f(F,null,[o(P,{modelValue:r(d),"onUpdate:modelValue":s[0]||(s[0]=u=>D(d)?d.value=u:null),size:"ultra",title:"Orders"},{default:$(()=>[o(E,{orders:e.results.orders},null,8,["orders"])]),_:1},8,["modelValue"]),o(P,{modelValue:r(c),"onUpdate:modelValue":s[2]||(s[2]=u=>D(c)?c.value=u:null),size:"small",title:"Report"},{default:$(()=>[o(W,{onClose:s[1]||(s[1]=u=>c.value=!1)})]),_:1},8,["modelValue"]),o(P,{modelValue:r(y),"onUpdate:modelValue":s[3]||(s[3]=u=>D(y)?y.value=u:null),title:"Info Logs"},{default:$(()=>[o(T,{logs:e.results.infoLogs},null,8,["logs"])]),buttons:$(()=>[n("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:ie},[r(v)?(l(),V(r(pe),{key:0,class:"h-6 w-6","aria-hidden":"true"})):x("",!0),!r(v)&&e.results.infoLogs.length!=0?(l(),V(r(ge),{key:1,class:"h-6 w-6","aria-hidden":"true"})):x("",!0)])]),_:1},8,["modelValue"]),o(P,{modelValue:r(U),"onUpdate:modelValue":s[4]||(s[4]=u=>D(U)?U.value=u:null),title:"Error Logs"},{default:$(()=>[o(T,{logs:e.results.errorLogs},null,8,["logs"])]),buttons:$(()=>[n("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:xe},[r(i)?(l(),V(r(pe),{key:0,class:"h-6 w-6","aria-hidden":"true"})):x("",!0),!r(i)&&e.results.errorLogs.length!=0?(l(),V(r(ge),{key:1,class:"h-6 w-6","aria-hidden":"true"})):x("",!0)])]),_:1},8,["modelValue"]),o($e,{modelValue:r(j),"onUpdate:modelValue":s[6]||(s[6]=u=>D(j)?j.value=u:null),title:"Termination Confirm",description:"Are you sure you want to terminate this session?",type:"info"},{default:$(()=>[o(I,{variant:"solid",color:"red",class:"flex justify-center",label:"Terminate",onClick:s[5]||(s[5]=u=>A((e._.provides[ee]||e.$route).params.id))})]),_:1},8,["modelValue"]),e.results.booting?(l(),f("div",Ht,[n("div",null,[o(we,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?x("",!0):(l(),f("h3",{key:0,class:"mt-8 animate-pulse",textContent:R(r(G))},null,8,Wt)),n("div",Yt,[e.form.debug_mode?(l(),V(I,{key:0,icon:"i-heroicons-clipboard-document-list",variant:"solid",label:"View Logs",size:"xl",class:"flex justify-center w-64",onClick:s[7]||(s[7]=u=>y.value=!0)})):x("",!0),o(I,{color:"gray",class:"w-64 flex justify-center mt-4",size:"xl",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},icon:"i-heroicons-no-symbol",variant:"solid",label:"Cancel",trailing:!1,onClick:s[8]||(s[8]=u=>r(h)((e._.provides[ee]||e.$route).params.id))})]),e.results.exception.error?(l(),f("div",Zt,[o(de,{modelValue:r(p),"onUpdate:modelValue":s[9]||(s[9]=u=>D(p)?p.value=u:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"live","debug-mode":e.form.debug_mode},null,8,["modelValue","title","content","debug-mode"])])):x("",!0)])):(l(),V(Ee,{key:1},{left:$(()=>[!e.results.booting&&!e.results.monitoring&&!e.results.showResults?(l(),f("div",Jt,[o(Y,{class:"mb-4",title:"Exchange"}),e.form.paper_mode?(l(),V(oe,{key:0,modelValue:e.form.exchange,"onUpdate:modelValue":s[10]||(s[10]=u=>e.form.exchange=u),placeholder:"Select an exchange...",searchable:"",options:r(se),"value-attribute":"value",size:"lg",class:"mt-2 mb-16",onChange:z},null,8,["modelValue","options"])):(l(),V(oe,{key:1,modelValue:e.form.exchange_api_key_id,"onUpdate:modelValue":s[11]||(s[11]=u=>e.form.exchange_api_key_id=u),placeholder:"Select an exchange...",searchable:"",options:r(g),"value-attribute":"value",size:"lg",class:"mt-2 mb-16",onChange:z},{empty:$(()=>[n("div",Qt,[Gt,o(I,{to:"/exchange-api-keys",icon:"i-heroicons-plus",type:"link",variant:"solid",size:"sm",label:"Add Exchange API Key"})])]),_:1},8,["modelValue","options"])),o(Ce,{"total-routes-error":r(b),form:e.form,results:e.results,mode:"live",symbols:r(N),timeframes:r(K)},null,8,["total-routes-error","form","results","symbols","timeframes"]),o(Y,{class:"mt-16 mb-4",title:"Options"}),n("div",Kt,[o(ce,{modelValue:e.form.debug_mode,"onUpdate:modelValue":s[12]||(s[12]=u=>e.form.debug_mode=u),title:"Debug Mode",description:"Logs more details, helpful for debugging."},null,8,["modelValue"]),o(ce,{modelValue:e.form.paper_mode,"onUpdate:modelValue":s[13]||(s[13]=u=>e.form.paper_mode=u),title:"Paper Trade",disabled:!r(ue),"disabled-guide":r(ue)?"":"Premium plan required",description:"Trade in real-time using actual exchange data with PAPER money."},null,8,["modelValue","disabled","disabled-guide"]),o(Te,{label:"Notifications:",help:"Select a notification driver to receive notifications"},{default:$(()=>[o(oe,{modelValue:e.form.notification_api_key_id,"onUpdate:modelValue":s[14]||(s[14]=u=>e.form.notification_api_key_id=u),placeholder:"Select a notification driver",size:"lg",options:r(Q),"value-attribute":"value"},{empty:$(()=>[n("div",Xt,[es,o(I,{to:"/notification-api-keys",icon:"i-heroicons-plus",type:"link",variant:"solid",size:"sm",label:"Add Notification API Key"})])]),_:1},8,["modelValue","options"])]),_:1})])])):x("",!0),e.results.monitoring?(l(),f("div",ts,[e.results.exception.error?(l(),f("div",ss,[o(de,{title:e.results.exception.error,content:e.results.exception.traceback,mode:"live","debug-mode":e.form.debug_mode},null,8,["title","content","debug-mode"])])):x("",!0),e.results.monitoring&&!e.results.finished&&!e.results.exception.error?(l(),V(Ve,{key:1,results:e.results,form:e.form,exchange:e.form.exchange},null,8,["results","form","exchange"])):x("",!0),o(Y,{class:"mb-4",title:"Routes"}),o(re,{data:e.results.routes,"header-items":["Symbol","Timeframe","Strategy"],header:""},null,8,["data"]),o(Y,{class:"mt-12 mb-4",title:"Positions"}),o(re,{data:e.results.positions,"header-items":["Symbol","QTY","Entry","Price","Liq Price","PNL"],header:""},null,8,["data"]),o(Le,{class:"mt-12 mb-4",title:"Orders"},{default:$(()=>[n("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:s[15]||(s[15]=u=>d.value=!0)},[o(r(gt),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),os])]),_:1}),o(re,{data:r(te),"header-items":["Created","Symbol","Type","Side","Price","QTY","Status"],header:""},null,8,["data"])])):x("",!0)]),right:$(()=>[e.results.booting?x("",!0):(l(),f("div",rs,[e.results.monitoring?(l(),f("div",ns,[e.results.finished?(l(),V(I,{key:0,class:"w-full flex justify-center",variant:"solid",icon:"i-heroicons-plus",size:"xl",label:"New session",onClick:s[16]||(s[16]=u=>r(S)((e._.provides[ee]||e.$route).params.id))})):(l(),V(I,{key:1,class:"w-full flex justify-center",variant:"solid",color:"gray",icon:"i-heroicons-no-symbol",size:"xl",label:e.results.terminating?"Terminating...":"Terminate",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},onClick:s[17]||(s[17]=u=>j.value=!0)},null,8,["label"])),e.results.monitoring||e.results.finished?(l(),V(I,{key:2,class:"w-full flex justify-center mt-4",variant:"solid",color:"gray",icon:"i-heroicons-flag",size:"xl",label:"Report",onClick:s[18]||(s[18]=u=>c.value=!0)})):x("",!0)])):(l(),f("div",ls,[o(I,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:s[19]||(s[19]=u=>H((e._.provides[ee]||e.$route).params.id))})]))])),e.results.monitoring?(l(),f("hr",as)):x("",!0),e.results.monitoring?(l(),f("dl",is,[(l(!0),f(F,null,le(r(J),u=>(l(),f("div",{key:u.label,class:"flex justify-between items-center"},[n("div",us,R(u.label)+":",1),n("div",ds,R(u.value),1)]))),128)),n("div",cs,[n("div",ms,[n("button",{class:"text-sm font-medium text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 truncate flex items-center hover:underline cursor-pointer focus:outline-none",onClick:s[20]||(s[20]=u=>y.value=!0)},[fs,n("span",ps,[o(r(ve),{class:"w-6 h-6 ml-2"})])])]),n("div",gs,R(e.results.generalInfo.count_info_logs),1)]),n("div",vs,[n("div",bs,[n("button",{class:"text-sm font-medium text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 truncate flex items-center hover:underline cursor-pointer focus:outline-none",onClick:s[21]||(s[21]=u=>U.value=!0)},[ys,n("span",hs,[o(r(ve),{class:"w-6 h-6 ml-2 cursor-pointer"})])])]),n("div",_s,R(e.results.generalInfo.count_error_logs),1)])])):x("",!0),e.results.monitoring&&e.results.watchlist.length?(l(),f("div",ks,[o(Y,{class:"mt-8 mb-4",title:"Watch List"}),o(Se,{data:e.results.watchlist},null,8,["data"])])):x("",!0)]),_:1}))],64)}}}),$s={class:"w-full"},Is=B({__name:"[id]",setup(C){pt({title:"Live/Paper trading - Jesse"});const t=q(),b=_(()=>t.tabs),p=ye(),a=_(()=>p.params.id),m=_(()=>{if(!b.value[a.value]){const v=Object.keys(b.value);if(v.length>0){const i=b.value[v[0]];return tt().push(`/live/${i.id}`),i}}return b.value[a.value]});return Object.keys(b.value).length===0&&q().addTab(),(v,i)=>{const d=wt,c=xs;return l(),f(F,null,[n("div",$s,[o(d,{tabs:b.value,onClose:r(t).closeTab},null,8,["tabs","onClose"])]),m.value?(l(),V(c,{key:0,form:m.value.form,results:m.value.results},null,8,["form","results"])):x("",!0)],64)}}});export{Is as default}; diff --git a/jesse/static/_nuxt/CadNkoze.js b/jesse/static/_nuxt/8ZOs1Gwd.js similarity index 77% rename from jesse/static/_nuxt/CadNkoze.js rename to jesse/static/_nuxt/8ZOs1Gwd.js index cd4c78752..231ff70af 100644 --- a/jesse/static/_nuxt/CadNkoze.js +++ b/jesse/static/_nuxt/8ZOs1Gwd.js @@ -1 +1 @@ -import{g as c,a1 as n,q as r,o as i,c as p}from"./Crvr41uX.js";const _=c({__name:"index",setup(u){const o=n(),t=r(),e=Object.keys(t.tabs);if(e.length>0){const s=e[0],a=t.tabs[s];o.push({path:`/backtest/${a.id}`})}else t.addTab();return(s,a)=>(i(),p("div"))}});export{_ as default}; +import{g as c,a1 as n,q as r,o as i,c as p}from"./iedVCmkz.js";const _=c({__name:"index",setup(u){const o=n(),t=r(),e=Object.keys(t.tabs);if(e.length>0){const s=e[0],a=t.tabs[s];o.push({path:`/backtest/${a.id}`})}else t.addTab();return(s,a)=>(i(),p("div"))}});export{_ as default}; diff --git a/jesse/static/_nuxt/BlJtC8uF.js b/jesse/static/_nuxt/BlJtC8uF.js deleted file mode 100644 index 9acf4c573..000000000 --- a/jesse/static/_nuxt/BlJtC8uF.js +++ /dev/null @@ -1 +0,0 @@ -import{g as R,h as H,r as V,o as a,c as u,a as c,F as S,i as K,j as he,b as o,w as L,t as M,n as C,k as l,l as ve,v as _e,m as ke,q as P,e as we,s as xe,x as v,y as B,z as $e,A as Ve,B as Ce,_ as Se,C as ze,D as Q,E as G,G as X,H as Te,I as je,J as Ue,K as O,L as Ee,M as w,N as W,O as d,P as U,Q as Le,R as Re,S as Ie,T as E,U as Be,V as D,W as Me,X as Ne,Y as Oe,Z as De,$ as Pe,a0 as qe,a1 as Je}from"./Crvr41uX.js";import{r as Ae}from"./D270KAH9.js";import{_ as Qe,a as We,b as Fe}from"./1Zuu5sOE.js";import{r as He,_ as Ke,a as Ge,b as Xe}from"./Bp2xcJgg.js";import{_ as Ye}from"./tIZ0BYDc.js";import{T as Ze,_ as et}from"./DTbDwdDV.js";import{u as tt}from"./DbaDxTuc.js";import"./QcdhOkh-.js";const st={wrapper:{base:"flex items-center align-center text-center",horizontal:"w-full flex-row",vertical:"flex-col"},container:{base:"font-medium text-gray-700 dark:text-gray-200 flex",horizontal:"mx-3 whitespace-nowrap",vertical:"my-2"},border:{base:"flex border-gray-200 dark:border-gray-800",horizontal:"w-full",vertical:"h-full",size:{horizontal:{"2xs":"border-t",xs:"border-t-[2px]",sm:"border-t-[3px]",md:"border-t-[4px]",lg:"border-t-[5px]",xl:"border-t-[6px]"},vertical:{"2xs":"border-s",xs:"border-s-[2px]",sm:"border-s-[3px]",md:"border-s-[4px]",lg:"border-s-[5px]",xl:"border-s-[6px]"}},type:{solid:"border-solid",dotted:"border-dotted",dashed:"border-dashed"}},icon:{base:"flex-shrink-0 w-5 h-5"},avatar:{base:"flex-shrink-0",size:"2xs"},label:"text-sm",default:{size:"2xs"}},rt={class:"mb-4"},ot={class:"hidden sm:block"},at={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"Tabs"},lt=["onMouseup"],nt=["onClick"],it={class:"absolute right-[1em] focus:outline-none"},ut=c("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),dt=R({__name:"BacktestTabs",props:{tabs:{}},emits:["close"],setup(r,{emit:s}){const f=H(),y=V(f.params.id),m=s;function p(n){if(!n.form.routes.length)return"New Tab";if(n.results.exception.error&&n.results.executing)return"Error";const g=n.form.routes[0];let b="";return g.strategy&&(b+=`${g.strategy} • `),g.symbol&&(b+=`${g.symbol} • `),g.timeframe&&(b+=`${g.timeframe}`),b=b.endsWith(" • ")?b.slice(0,-3):b,n.results.executing?`${b} | ${n.results.progressbar.current}%`:n.results.showResults?`${b} | Results`:b}return(n,g)=>{const b=we;return a(),u("div",rt,[c("div",ot,[c("nav",at,[(a(!0),u(S,null,K(n.tabs,h=>(a(),u("div",{key:h.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:he(_=>m("close",h.id),["middle"])},[o(b,{to:`/backtest/${h.id}`,class:C([h.id===l(y)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:L(()=>[c("span",null,M(p(h)),1),c("span",{"aria-hidden":"true",class:C([h.id===l(y)&&Object.keys(n.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),ve(c("button",{class:"absolute right-[1em] focus:outline-none",onClick:_=>m("close",h.id)},[o(l(ke),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,nt),[[_e,Object.keys(n.tabs).length>1]])],40,lt))),128)),c("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-white dark:hover:bg-gray-800 flex items-center justify-center",onClick:g[0]||(g[0]=h=>l(P)().addTab())},[c("button",it,[o(l(Ae),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),ut])])])])}}}),F={width:800,height:400,priceScale:{borderColor:"rgba(197, 203, 206, 1)"},timeScale:{borderColor:"rgba(197, 203, 206, 1)",timeVisible:!0,secondsVisible:!1}},ct={chart:{layout:{background:{color:"#ffffff"},textColor:"rgba(33, 56, 77, 1)"},grid:{vertLines:{color:"#f1f1f1",visible:!0},horzLines:{color:"#f1f1f1",visible:!0}},priceScale:{borderColor:"rgba(197, 203, 206, 0.6)"},timeScale:{borderColor:"rgba(197, 203, 206, 0.6)",timeVisible:!0,secondsVisible:!1}}},mt={chart:{layout:{background:{color:"#333333"},textColor:"#D1D5DB"},grid:{vertLines:{color:"#525252",visible:!0},horzLines:{color:"#525252",visible:!0}},priceScale:{borderColor:"#525252"},timeScale:{borderColor:"#525252",timeVisible:!0,secondsVisible:!1}}},ft={class:"mt-2"},pt={class:"ml-2"},gt=R({__name:"EquityCurve",props:{data:{}},setup(r){const s=xe(),f=v(()=>s.value),y=V();let m=null,p=[];const n=r;B(n.data,_=>{}),B(f,_=>{h(_)}),$e(async()=>{await g()});async function g(){F.width=y.value.clientWidth,m=Ze(y.value,F);for(const _ of n.data){const z=m.addLineSeries({lineWidth:2});z.setData(_.data),p.push(z)}m.timeScale().fitContent(),h(f.value)}Ve(()=>{b()});function b(){m!==null&&(m.remove(),m=null),p&&(p=[])}function h(_){m===null||p===null||m.applyOptions(_==="light"?ct.chart:mt.chart)}return(_,z)=>(a(),u(S,null,[c("div",{ref_key:"chartContainer",ref:y,class:"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600"},null,512),c("div",ft,[(a(!0),u(S,null,K(_.data,T=>(a(),u("span",{key:T.name,class:"text-xs mr-2 rounded bg-white dark:bg-gray-700 p-1"},[c("span",{class:"inline-block",style:Ce({backgroundColor:T.color,width:"25px",height:"10px"})},null,4),c("span",pt,M(T.name),1)]))),128))])],64))}}),I=ze(Q.ui.strategy,Q.ui.divider,st),bt=R({components:{UIcon:G,UAvatar:X},inheritAttrs:!1,props:{label:{type:String,default:null},icon:{type:String,default:null},avatar:{type:Object,default:null},size:{type:String,default:()=>I.default.size,validator(r){return Object.keys(I.border.size.horizontal).includes(r)||Object.keys(I.border.size.vertical).includes(r)}},orientation:{type:String,default:"horizontal",validator:r=>["horizontal","vertical"].includes(r)},type:{type:String,default:"solid",validator:r=>["solid","dotted","dashed"].includes(r)},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(r){const{ui:s,attrs:f}=Te("divider",je(r,"ui"),I),y=v(()=>Ue(O(s.value.wrapper.base,s.value.wrapper[r.orientation]),r.class)),m=v(()=>O(s.value.container.base,s.value.container[r.orientation])),p=v(()=>O(s.value.border.base,s.value.border[r.orientation],s.value.border.size[r.orientation][r.size],s.value.border.type[r.type]));return{ui:s,attrs:f,wrapperClass:y,containerClass:m,borderClass:p}}});function yt(r,s,f,y,m,p){const n=G,g=X;return a(),u("div",W({class:r.wrapperClass},r.attrs),[c("div",{class:C(r.borderClass)},null,2),r.label||r.icon||r.avatar||r.$slots.default?(a(),u(S,{key:0},[c("div",{class:C(r.containerClass)},[Ee(r.$slots,"default",{},()=>[r.label?(a(),u("span",{key:0,class:C(r.ui.label)},M(r.label),3)):r.icon?(a(),w(n,{key:1,name:r.icon,class:C(r.ui.icon.base)},null,8,["name","class"])):r.avatar?(a(),w(g,W({key:2},{size:r.ui.avatar.size,...r.avatar},{class:r.ui.avatar.base}),null,16,["class"])):d("",!0)])],2),c("div",{class:C(r.borderClass)},null,2)],64)):d("",!0)],16)}const ht=Se(bt,[["render",yt]]),vt=["value"],_t={key:1,class:"flex flex-col items-center justify-center select-none mt-[10%]"},kt=["textContent"],wt={class:"mt-8"},xt={class:"mt-8"},$t={class:"mt-4"},Vt=["href"],Ct={key:1,class:"mx-auto container mt-8"},St={key:0},zt={class:"flex items-center select-none flex-1 my-4"},Tt={class:"grid grid-cols-1 gap-6 mt-8"},jt={key:1,class:"w-full mx-auto"},Ut={key:4,class:"text-yellow-500 border-yellow-400 bg-yellow-50 dark:bg-gray-700 dark:text-yellow-400 mt-16 text-center text-2xl rounded border-2 border-dashed dark:border-gray-800 py-16 select-none"},Et={key:0},Lt={key:0},Rt=["href"],It=["href"],Bt=["href"],Mt=["href"],Nt=["href"],Ot=["href"],Dt={key:1},Pt=R({__name:"BacktestTab",props:{form:{},results:{}},setup(r){const s=r,f=V([]),y=V(!1),m=V(!1),p=U().authToken,n=V(Le().public.apiBaseUrl),g=P(),b=v(()=>U().jesseSupportedTimeframes.map(e=>({label:e,value:e}))),h=V([]);async function _(){h.value=await U().getExchangeSupportedSymbols(s.form.exchange);for(let e=0;e0)for(let e=0;e{if(f.value.length){for(let t=0;t{let e=`/download/backtest/chart/${s.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),q=v(()=>{let e=`/download/backtest/log/${s.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),se=v(()=>{let e=`/download/backtest/tradingview/${s.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),re=v(()=>{let e=`/download/backtest/full-reports/${s.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),oe=v(()=>{let e=`/download/backtest/csv/${s.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),ae=v(()=>{let e=`/download/backtest/json/${s.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),x=v(()=>s.results.metrics.length>0),le=v(()=>Re.remainingTimeText(s.results.progressbar.estimated_remaining_seconds));function ne(){navigator.clipboard.writeText(s.results.infoLogs),D("success","Logs copied successfully"),m.value=!0,setTimeout(()=>{m.value=!1},3e3)}return B(()=>s.form.start_date,e=>{s.form.finish_dates.form.finish_date,e=>{s.form.finish_date&&s.form.start_date>e&&(s.form.start_date=e)}),(e,t)=>{const ie=Qe,ue=Me,de=Ke,k=Ne,ce=Ge,j=Oe,me=Ye,fe=We,J=De,$=Pe,pe=gt,A=qe,N=ht,ge=et,be=Fe,ye=Xe;return a(),u(S,null,[e.form.debug_mode?(a(),w(ue,{key:0,modelValue:e.results.logsModal,"onUpdate:modelValue":t[0]||(t[0]=i=>e.results.logsModal=i),title:"Logs"},{default:L(()=>[o(ie,{logs:e.results.infoLogs},null,8,["logs"])]),buttons:L(()=>[c("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:ne},[l(m)?(a(),w(l(Ie),{key:0,class:"h-6 w-6","aria-hidden":"true"})):d("",!0),!l(m)&&e.results.infoLogs.length!=0?(a(),w(l(He),{key:1,class:"h-6 w-6","aria-hidden":"true"})):d("",!0)]),c("input",{id:"copy-info-logs",type:"hidden",value:e.results.infoLogs},null,8,vt)]),_:1},8,["modelValue"])):d("",!0),e.results.executing&&!e.results.showResults?(a(),u("div",_t,[c("div",null,[o(de,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?d("",!0):(a(),u("h3",{key:0,class:"mt-8 animate-pulse",textContent:M(l(le))},null,8,kt)),c("div",wt,[c("div",xt,[o(k,{color:"gray",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},class:"w-64 flex justify-center",icon:"i-heroicons-no-symbol",size:"xl",variant:"solid",label:"Cancel",trailing:!1,onClick:t[1]||(t[1]=i=>l(z)((e._.provides[E]||e.$route).params.id))})]),c("div",$t,[e.form.debug_mode&&e.results.exception.error&&e.results.progressbar.current!==0?(a(),u("a",{key:0,href:l(q),class:"flex justify-center items-center btn-secondary text-center mb-4 w-full"},[o(k,{icon:"i-heroicons-document-arrow-down",label:"Debugging Logs",color:"gray",size:"xl",variant:"solid",trailing:!1,class:"w-64 flex justify-center"})],8,Vt)):d("",!0)])]),e.results.exception.error&&e.results.executing?(a(),u("div",Ct,[o(ce,{modelValue:l(y),"onUpdate:modelValue":t[2]||(t[2]=i=>Be(y)?y.value=i:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"backtest","debug-mode":e.form.debug_mode},null,8,["modelValue","title","content","debug-mode"])])):d("",!0)])):d("",!0),o(ye,{else:""},{left:L(()=>[!e.results.executing&&!e.results.showResults?(a(),u("div",St,[o(j,{class:"mb-4",title:"Exchange"}),o(me,{modelValue:e.form.exchange,"onUpdate:modelValue":t[3]||(t[3]=i=>e.form.exchange=i),placeholder:"Select an exchange...",searchable:"",options:l(U)().backtestingExchangeNames,size:"lg",class:"mt-2 mb-16",onChange:_},null,8,["modelValue","options"]),o(fe,{"total-routes-error":l(f),timeframes:l(b),form:e.form,results:e.results,symbols:l(h),mode:"backtest"},null,8,["total-routes-error","timeframes","form","results","symbols"]),o(j,{class:"mt-16",title:"Duration"}),c("div",zt,[o(J,{modelValue:e.form.start_date,"onUpdate:modelValue":t[4]||(t[4]=i=>e.form.start_date=i),type:"date",variant:"outline",size:"lg",class:"w-full mr-2"},null,8,["modelValue"]),o(J,{modelValue:e.form.finish_date,"onUpdate:modelValue":t[5]||(t[5]=i=>e.form.finish_date=i),type:"date",variant:"outline",size:"lg",class:"w-full ml-2"},null,8,["modelValue"])]),o(j,{class:"mt-16",title:"Options"}),c("div",Tt,[o($,{modelValue:e.form.debug_mode,"onUpdate:modelValue":t[6]||(t[6]=i=>e.form.debug_mode=i),title:"Debug Mode",description:"Logs every step of the execution. Very helpful for debugging your strategy but takes a lot longer to execute"},null,8,["modelValue"]),o($,{modelValue:e.form.export_chart,"onUpdate:modelValue":t[7]||(t[7]=i=>e.form.export_chart=i),title:"Export Charts",description:"Exports charts for your portfolio's daily balance."},null,8,["modelValue"]),o($,{modelValue:e.form.export_tradingview,"onUpdate:modelValue":t[8]||(t[8]=i=>e.form.export_tradingview=i),title:"Export Tradingview",description:"Exports the executed trades in a format accepted by TradingView's Pine Editor. Useful to look at the executed orders on their chart."},null,8,["modelValue"]),o($,{modelValue:e.form.export_full_reports,"onUpdate:modelValue":t[9]||(t[9]=i=>e.form.export_full_reports=i),title:"Export QuantStats reports",description:"Exports a HTML file generated by QuantStats library."},null,8,["modelValue"]),o($,{modelValue:e.form.export_csv,"onUpdate:modelValue":t[10]||(t[10]=i=>e.form.export_csv=i),title:"Export CSV",description:"Exports executed trades in a CSV format"},null,8,["modelValue"]),o($,{modelValue:e.form.export_json,"onUpdate:modelValue":t[11]||(t[11]=i=>e.form.export_json=i),title:"Export JSON",description:"Exports executed trades in a JSON format"},null,8,["modelValue"]),o($,{modelValue:e.form.fast_mode,"onUpdate:modelValue":t[12]||(t[12]=i=>e.form.fast_mode=i),title:"Fast Mode",description:"Runs the backtest faster by using an improved algorithm. This is supposed to yield the same results; however, it's currently experimental, which is why it's an option."},null,8,["modelValue"]),o($,{modelValue:e.form.benchmark,"onUpdate:modelValue":t[13]||(t[13]=i=>e.form.benchmark=i),title:"Benchmark",description:"If enabled, the backtest will compare the performance of the strategy against the buy and hold strategy of the market."},null,8,["modelValue"])])])):d("",!0),e.results.showResults?(a(),u("div",jt,[c("div",null,[l(x)?(a(),w(j,{key:0,class:"mb-4",title:"Equity Curve"})):d("",!0),l(x)?(a(),w(pe,{key:1,data:e.results.charts.equity_curve},null,8,["data"])):d("",!0),l(x)?(a(),w(j,{key:2,class:"mt-16 mb-4",title:"Performance"})):d("",!0),l(x)?(a(),w(A,{key:3,data:e.results.metrics},null,8,["data"])):d("",!0),l(x)?d("",!0):(a(),u("div",Ut," No trades were executed via this strategy! "))])])):d("",!0)]),right:L(()=>[e.results.executing?d("",!0):(a(),u("div",Et,[e.results.showResults?(a(),u("div",Lt,[o(k,{class:"w-full flex justify-center",icon:"i-heroicons-arrow-path",size:"xl",variant:"solid",label:"Rerun",trailing:!1,onClick:t[14]||(t[14]=i=>l(T)((e._.provides[E]||e.$route).params.id))}),o(k,{class:"w-full flex justify-center mt-4",color:"green",icon:"i-heroicons-arrow-uturn-left",size:"xl",variant:"solid",label:"New session",trailing:!1,onClick:t[15]||(t[15]=i=>l(Y)((e._.provides[E]||e.$route).params.id))}),e.form.debug_mode?(a(),u("a",{key:0,href:l(q),target:"_blank",class:""},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"Debugging Logs",trailing:!1})],8,Rt)):d("",!0),e.form.export_chart&&l(x)?(a(),u("a",{key:1,href:l(te),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:" Legacy Chart",trailing:!1})],8,It)):d("",!0),e.form.export_full_reports&&l(x)?(a(),u("a",{key:2,href:l(re),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"QuantStats Report",trailing:!1})],8,Bt)):d("",!0),e.form.export_csv&&l(x)?(a(),u("a",{key:3,href:l(oe),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"CVS",trailing:!1})],8,Mt)):d("",!0),e.form.export_json&&l(x)?(a(),u("a",{key:4,href:l(ae),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"JSON",trailing:!1})],8,Nt)):d("",!0),e.form.export_tradingview&&l(x)?(a(),u("a",{key:5,href:l(se),target:"_blank",class:"flex justify-center items-center btn-secondary text-center mb-4 w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"TradingView Pine Editor",trailing:!1})],8,Ot)):d("",!0),o(N,{class:"mt-8 mb-4",size:"lg",label:"General Info"}),o(ge,{data:e.results.info},null,8,["data"]),o(N,{class:"mt-8 mb-4",size:"lg",label:"Routes"}),o(be,{data:e.results.routes_info,"header-items":["Symbol","Timeframe","Strategy"],header:""},null,8,["data"]),e.results.hyperparameters.length?(a(),w(N,{key:6,class:"mt-8 mb-4",size:"lg",label:"Hyperparameters"})):d("",!0),e.results.hyperparameters.length?(a(),w(A,{key:7,data:e.results.hyperparameters},null,8,["data"])):d("",!0)])):(a(),u("div",Dt,[o(k,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:t[16]||(t[16]=i=>Z((e._.provides[E]||e.$route).params.id))}),o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-plus",size:"xl",variant:"solid",label:"Start in a new tab",trailing:!1,onClick:t[17]||(t[17]=i=>ee((e._.provides[E]||e.$route).params.id))})]))]))]),_:1})],64)}}}),qt={class:"w-full"},Xt=R({__name:"[id]",setup(r){tt({title:"Backtest - Jesse"});const s=P(),f=v(()=>s.tabs),y=v(()=>H().params.id),m=v(()=>{if(!f.value[y.value]){const p=Object.keys(f.value);if(p.length>0){const n=f.value[p[0]];return Je().push(`/backtest/${n.id}`),n}}return f.value[y.value]});return Object.keys(f.value).length===0&&s.addTab(),(p,n)=>{const g=dt,b=Pt;return a(),u(S,null,[c("div",qt,[o(g,{tabs:f.value,mode:"backtest",onClose:l(s).closeTab},null,8,["tabs","onClose"])]),m.value?(a(),w(b,{key:0,form:m.value.form,results:m.value.results},null,8,["form","results"])):d("",!0)],64)}}});export{Xt as default}; diff --git a/jesse/static/_nuxt/1Zuu5sOE.js b/jesse/static/_nuxt/BxVo_4D-.js similarity index 98% rename from jesse/static/_nuxt/1Zuu5sOE.js rename to jesse/static/_nuxt/BxVo_4D-.js index bf39366d9..cf96ae13f 100644 --- a/jesse/static/_nuxt/1Zuu5sOE.js +++ b/jesse/static/_nuxt/BxVo_4D-.js @@ -1 +1 @@ -import{_ as Z}from"./QcdhOkh-.js";import{g as S,o as a,c as n,M as y,a as c,r as x,P as A,a9 as G,x as J,am as K,y as Q,b as h,w as R,k as V,F as w,i as C,d as D,O as f,X as I,Y as ee,l as te,v as oe,t as b,L as re,n as O}from"./Crvr41uX.js";import{d as ae}from"./Bp2xcJgg.js";import{_ as se}from"./tIZ0BYDc.js";const le=["innerHTML"],Oe=S({__name:"Logs",props:{logs:{}},setup(_){return(e,k)=>{const d=Z;return e.logs.length?(a(),n("pre",{key:0,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-base dark:text-gray-300 w-full px-4 sm:px-6 py-2",innerHTML:e.logs},null,8,le)):(a(),y(d,{key:1}))}}});function T(_,e){return a(),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[c("path",{"fill-rule":"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}const ne={id:"routes-section",class:"select-none"},ie={class:"w-full flex justify-center"},ue=c("span",null,"Trading Route",-1),de=c("span",null,"Data Route",-1),Te=S({__name:"Routes",props:{mode:{},timeframes:{},symbols:{},form:{},results:{},totalRoutesError:{}},setup(_){const e=_,k=x([]),d=x(""),r=A(),v=x({data_routes:e.form.data_routes}),M=x({routes:e.form.routes}),s=G({uniqueRoutesErrorMessage:"each exchange-symbol pair can be traded only once! More info: https://docs.jesse.trade/docs/routes.html#trading-multiple-routes",maxSymbolLengthErrorMessage:"Maximum symbol length is exceeded!",mustContainDashErrorMessage:'Symbol parameter must contain "-" character!',timeframeMustBeDifferentErrorMessage:"Data routes' timeframe and trading routes' timeframe must be different",emptyParameter:"You must fill all the parameters",invalidSymbol:"Symbol is invalid"}),U=J(()=>r.strategies);K(()=>{v.value={data_routes:e.form.data_routes},M.value={routes:e.form.routes},z(),B()});function z(){e.form.routes.length||e.form.routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1],strategy:r.strategies[0]})}function B(){e.totalRoutesError.splice(0,e.totalRoutesError.length);for(const i of e.form.routes)$(i);if(e.form.data_routes.length>0)for(const i of e.form.data_routes)$(i);let t=!1;const o=e.form.routes;for(const i of o.slice(0,-1)){if(e.totalRoutesError.includes(s.uniqueRoutesErrorMessage)||t)break;for(const g of o.slice(o.indexOf(i)+1))if(i.strategy===g.strategy&&i.symbol===g.symbol&&i.symbol.length!==0){e.totalRoutesError.push(s.uniqueRoutesErrorMessage),t=!1;break}}let m=!1;const p=e.form.data_routes;for(const i of p.slice(0,-1)){if(e.totalRoutesError.includes(s.uniqueRoutesErrorMessage)||m)break;for(const g of p.slice(p.indexOf(i)+1))if(i.timeframe===g.timeframe&&i.symbol===g.symbol){e.totalRoutesError.push(s.uniqueRoutesErrorMessage),m=!0;break}}if(e.form.data_routes.length>0)for(const i of p){if(e.totalRoutesError.includes(s.timeframeMustBeDifferentErrorMessage)||t)break;for(const g of e.form.routes)if(i.symbol===g.symbol&&i.timeframe===g.timeframe){e.totalRoutesError.push(s.timeframeMustBeDifferentErrorMessage),m=!0;break}}}function $(t){!e.totalRoutesError.includes(s.emptyParameter)&&(t.symbol.length==0||t.timeframe.length==0)&&e.totalRoutesError.push(s.emptyParameter)}function j(){e.form.routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1],strategy:r.strategies[0]})}function q(){e.form.data_routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1]})}function L(t){const o=e.form.routes.indexOf(t);e.form.routes.length!==1&&o>-1&&e.form.routes.splice(o,1)}function N(t){const o=e.form.data_routes.indexOf(t);e.form.data_routes.length!==0&&o>-1&&e.form.data_routes.splice(o,1)}function P(t){const o=e.form.routes.indexOf(t),m={strategy:t.strategy,symbol:"",timeframe:t.timeframe};e.form.routes.splice(o+1,0,m)}function H(t){const o=e.form.data_routes.indexOf(t),m={symbol:"",timeframe:t.timeframe};e.form.data_routes.splice(o+1,0,m)}function F(t){const o=e.form.routes.indexOf(t);o!==0&&(e.form.routes[o]=e.form.routes[o-1],e.form.routes[o-1]=t)}function W(t){const o=e.form.data_routes.indexOf(t);o!==0&&(e.form.data_routes[o]=e.form.data_routes[o-1],e.form.data_routes[o-1]=t)}function Y(t){const o=e.form.routes.indexOf(t);o!==e.form.routes.length-1&&(e.form.routes[o]=e.form.routes[o+1],e.form.routes[o+1]=t)}function X(t){const o=e.form.data_routes.indexOf(t);o!==e.form.data_routes.length-1&&(e.form.data_routes[o]=e.form.data_routes[o+1],e.form.data_routes[o+1]=t)}return Q(()=>d.value,t=>{if(t.length==0){k.value=[];return}const o=[];for(const m of e.symbols){if(o.length>50)break;m.toLowerCase().startsWith(t.toLowerCase())&&o.push(m)}k.value=o}),(t,o)=>{const m=ae,p=se,i=I,g=ee;return a(),n("div",ne,[h(m,{title:"Routes"},{default:R(()=>[c("div",ie,[c("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-l-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:j},[h(V(T),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),ue]),c("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-r-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:q},[h(V(T),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),de])])]),_:1}),(a(!0),n(w,null,C(t.form.routes,(l,E)=>(a(),n("div",{key:l.symbol+E,class:"flex mt-4"},[h(p,{modelValue:l.symbol,"onUpdate:modelValue":u=>l.symbol=u,query:d.value,"onUpdate:query":o[0]||(o[0]=u=>d.value=u),"clear-search-on-close":"",class:"w-full",ui:{rounded:"rounded-none rounded-l"},searchable:"","searchable-placeholder":"Search symbols...",size:"lg",options:k.value,placeholder:"Select a symbol...",onChange:o[1]||(o[1]=u=>d.value="")},{empty:R(()=>[D("Start typing...")]),_:2},1032,["modelValue","onUpdate:modelValue","query","options"]),h(p,{modelValue:l.timeframe,"onUpdate:modelValue":u=>l.timeframe=u,class:"w-full",ui:{rounded:"rounded-none"},size:"lg","value-attribute":"value",options:t.timeframes},null,8,["modelValue","onUpdate:modelValue","options"]),h(p,{modelValue:l.strategy,"onUpdate:modelValue":u=>l.strategy=u,class:"w-full",ui:{rounded:"rounded-none rounded-r"},size:"lg",options:U.value,searchable:""},null,8,["modelValue","onUpdate:modelValue","options"]),t.form.routes.length>1?(a(),y(i,{key:0,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-trash",disabled:t.form.routes.length===1,onClick:u=>L(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),y(i,{key:1,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-document-duplicate",disabled:t.form.routes.length===1,onClick:u=>P(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),y(i,{key:2,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-down",disabled:t.form.routes.indexOf(l)===t.form.routes.length-1,onClick:u=>Y(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),y(i,{key:3,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-up",disabled:t.form.routes.indexOf(l)===0,onClick:u=>F(l)},null,8,["disabled","onClick"])):f("",!0)]))),128)),t.form.data_routes.length?(a(),y(g,{key:0,class:"mt-8 mb-4",title:"Data Routes"})):f("",!0),(a(!0),n(w,null,C(t.form.data_routes,(l,E)=>(a(),n("div",{key:l.symbol+E+l.timeframe,class:"flex mt-4"},[h(p,{modelValue:l.symbol,"onUpdate:modelValue":u=>l.symbol=u,query:d.value,"onUpdate:query":o[2]||(o[2]=u=>d.value=u),"clear-search-on-close":"",class:"w-full",ui:{rounded:"rounded-none rounded-l"},searchable:"",size:"lg",options:k.value,placeholder:"Select a symbol...",onChange:o[3]||(o[3]=u=>d.value="")},{empty:R(()=>[D("Start typing...")]),_:2},1032,["modelValue","onUpdate:modelValue","query","options"]),h(p,{modelValue:l.timeframe,"onUpdate:modelValue":u=>l.timeframe=u,class:"w-full",ui:{rounded:"rounded-none rounded-r"},size:"lg","value-attribute":"value",options:t.timeframes},null,8,["modelValue","onUpdate:modelValue","options"]),h(i,{size:"lg",variant:"link",color:"gray",icon:"i-heroicons-trash",onClick:u=>N(l)},null,8,["onClick"]),t.form.routes.length>1?(a(),y(i,{key:0,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-document-duplicate",onClick:u=>H(l)},null,8,["onClick"])):f("",!0),t.form.data_routes.length>1?(a(),y(i,{key:1,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-down",disabled:t.form.data_routes.indexOf(l)===t.form.data_routes.length-1,onClick:u=>X(l)},null,8,["disabled","onClick"])):f("",!0),t.form.data_routes.length>1?(a(),y(i,{key:2,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-up",disabled:t.form.data_routes.indexOf(l)===0,onClick:u=>W(l)},null,8,["disabled","onClick"])):f("",!0)]))),128))])}}}),me=["textContent"],ce=S({__name:"Tooltip",props:{title:{}},setup(_){const e=x(!1),k=()=>{e.value=!0},d=()=>{e.value=!1};return(r,v)=>(a(),n("span",{class:"relative underline",onMouseenter:k,onMouseleave:d},[te(c("span",{class:"absolute -top-10 z-90 bg-gray-900 rounded px-2 py-1 text-sm text-white",textContent:b(r.title)},null,8,me),[[oe,V(e)]]),re(r.$slots,"default")],32))}}),fe={class:"flex flex-col select-none"},pe={class:"-my-2 overflow-x-auto"},ge={class:"py-2 align-middle inline-block min-w-full"},ye={class:"border dark:border-gray-600 overflow-hidden sm:rounded"},he={class:"min-w-full divide-y divide-gray-200 dark:divide-gray-600 hide-scroll overflow-x-scroll"},ke={key:0,class:"bg-gray-100 dark:bg-gray-800 select-none"},be={key:1},_e=["textContent"],ve=["textContent"],xe=["textContent"],we={key:1},Ce=["textContent"],Re=["textContent"],Se=["textContent"],Ee={key:0,class:"text-center text-xs dark:bg-gray-700 py-4 opacity-30 dark:opacity-75 select-none"},Ue=S({__name:"MultipleValuesTable",props:{header:{type:Boolean},data:{},headerItems:{}},setup(_){return(e,k)=>{const d=ce;return a(),n("div",fe,[c("div",pe,[c("div",ge,[c("div",ye,[c("table",he,[e.header?(a(),n("thead",ke,[c("tr",null,[(a(!0),n(w,null,C(e.headerItems,r=>(a(),n("th",{key:r,scope:"col",class:"px-6 py-3 text-left text-xs font-bold text-gray-500 dark:text-gray-400"},b(r),1))),128))])])):f("",!0),e.data.length?(a(),n("tbody",be,[(a(!0),n(w,null,C(e.data,(r,v)=>(a(),n("tr",{key:v,class:O(["text-gray-900 dark:text-gray-200",v%2===0?"bg-white dark:bg-backdrop-dark":"bg-gray-50 dark:bg-gray-700"])},[(a(!0),n(w,null,C(r,(M,s)=>(a(),n("td",{key:s,class:O(["px-6 py-4 whitespace-nowrap text-sm font-medium",r[s].style])},[r[s].tooltip?(a(),y(d,{key:0,title:r[s].tooltip},{default:R(()=>[r[s].tag==="code"?(a(),n("code",{key:0,class:"rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,_e)):r[s].tag==="pre"?(a(),n("pre",{key:1,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,ve)):(a(),n("span",{key:2,textContent:b(r[s].value===0?"":r[s].value)},null,8,xe))]),_:2},1032,["title"])):(a(),n("span",we,[r[s].tag==="code"?(a(),n("code",{key:0,class:"rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,Ce)):r[s].tag==="pre"?(a(),n("pre",{key:1,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,Re)):(a(),n("span",{key:2,textContent:b(r[s].value===0?"":r[s].value)},null,8,Se))]))],2))),128))],2))),128))])):f("",!0)]),e.data.length?f("",!0):(a(),n("div",Ee," Empty List "))])])])])}}});export{Oe as _,Te as a,Ue as b}; +import{_ as Z}from"./DddLSi-Q.js";import{g as S,o as a,c as n,M as y,a as c,r as x,P as A,a9 as G,x as J,am as K,y as Q,b as h,w as R,k as V,F as w,i as C,d as D,O as f,X as I,Y as ee,l as te,v as oe,t as b,L as re,n as O}from"./iedVCmkz.js";import{d as ae}from"./DU23lKGZ.js";import{_ as se}from"./DRlj9p5R.js";const le=["innerHTML"],Oe=S({__name:"Logs",props:{logs:{}},setup(_){return(e,k)=>{const d=Z;return e.logs.length?(a(),n("pre",{key:0,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-base dark:text-gray-300 w-full px-4 sm:px-6 py-2",innerHTML:e.logs},null,8,le)):(a(),y(d,{key:1}))}}});function T(_,e){return a(),n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[c("path",{"fill-rule":"evenodd",d:"M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z","clip-rule":"evenodd"})])}const ne={id:"routes-section",class:"select-none"},ie={class:"w-full flex justify-center"},ue=c("span",null,"Trading Route",-1),de=c("span",null,"Data Route",-1),Te=S({__name:"Routes",props:{mode:{},timeframes:{},symbols:{},form:{},results:{},totalRoutesError:{}},setup(_){const e=_,k=x([]),d=x(""),r=A(),v=x({data_routes:e.form.data_routes}),M=x({routes:e.form.routes}),s=G({uniqueRoutesErrorMessage:"each exchange-symbol pair can be traded only once! More info: https://docs.jesse.trade/docs/routes.html#trading-multiple-routes",maxSymbolLengthErrorMessage:"Maximum symbol length is exceeded!",mustContainDashErrorMessage:'Symbol parameter must contain "-" character!',timeframeMustBeDifferentErrorMessage:"Data routes' timeframe and trading routes' timeframe must be different",emptyParameter:"You must fill all the parameters",invalidSymbol:"Symbol is invalid"}),U=J(()=>r.strategies);K(()=>{v.value={data_routes:e.form.data_routes},M.value={routes:e.form.routes},z(),B()});function z(){e.form.routes.length||e.form.routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1],strategy:r.strategies[0]})}function B(){e.totalRoutesError.splice(0,e.totalRoutesError.length);for(const i of e.form.routes)$(i);if(e.form.data_routes.length>0)for(const i of e.form.data_routes)$(i);let t=!1;const o=e.form.routes;for(const i of o.slice(0,-1)){if(e.totalRoutesError.includes(s.uniqueRoutesErrorMessage)||t)break;for(const g of o.slice(o.indexOf(i)+1))if(i.strategy===g.strategy&&i.symbol===g.symbol&&i.symbol.length!==0){e.totalRoutesError.push(s.uniqueRoutesErrorMessage),t=!1;break}}let m=!1;const p=e.form.data_routes;for(const i of p.slice(0,-1)){if(e.totalRoutesError.includes(s.uniqueRoutesErrorMessage)||m)break;for(const g of p.slice(p.indexOf(i)+1))if(i.timeframe===g.timeframe&&i.symbol===g.symbol){e.totalRoutesError.push(s.uniqueRoutesErrorMessage),m=!0;break}}if(e.form.data_routes.length>0)for(const i of p){if(e.totalRoutesError.includes(s.timeframeMustBeDifferentErrorMessage)||t)break;for(const g of e.form.routes)if(i.symbol===g.symbol&&i.timeframe===g.timeframe){e.totalRoutesError.push(s.timeframeMustBeDifferentErrorMessage),m=!0;break}}}function $(t){!e.totalRoutesError.includes(s.emptyParameter)&&(t.symbol.length==0||t.timeframe.length==0)&&e.totalRoutesError.push(s.emptyParameter)}function j(){e.form.routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1],strategy:r.strategies[0]})}function q(){e.form.data_routes.push({symbol:"",timeframe:r.jesseSupportedTimeframes.includes("4h")?"4h":r.jesseSupportedTimeframes[r.jesseSupportedTimeframes.length-1]})}function L(t){const o=e.form.routes.indexOf(t);e.form.routes.length!==1&&o>-1&&e.form.routes.splice(o,1)}function N(t){const o=e.form.data_routes.indexOf(t);e.form.data_routes.length!==0&&o>-1&&e.form.data_routes.splice(o,1)}function P(t){const o=e.form.routes.indexOf(t),m={strategy:t.strategy,symbol:"",timeframe:t.timeframe};e.form.routes.splice(o+1,0,m)}function H(t){const o=e.form.data_routes.indexOf(t),m={symbol:"",timeframe:t.timeframe};e.form.data_routes.splice(o+1,0,m)}function F(t){const o=e.form.routes.indexOf(t);o!==0&&(e.form.routes[o]=e.form.routes[o-1],e.form.routes[o-1]=t)}function W(t){const o=e.form.data_routes.indexOf(t);o!==0&&(e.form.data_routes[o]=e.form.data_routes[o-1],e.form.data_routes[o-1]=t)}function Y(t){const o=e.form.routes.indexOf(t);o!==e.form.routes.length-1&&(e.form.routes[o]=e.form.routes[o+1],e.form.routes[o+1]=t)}function X(t){const o=e.form.data_routes.indexOf(t);o!==e.form.data_routes.length-1&&(e.form.data_routes[o]=e.form.data_routes[o+1],e.form.data_routes[o+1]=t)}return Q(()=>d.value,t=>{if(t.length==0){k.value=[];return}const o=[];for(const m of e.symbols){if(o.length>50)break;m.toLowerCase().startsWith(t.toLowerCase())&&o.push(m)}k.value=o}),(t,o)=>{const m=ae,p=se,i=I,g=ee;return a(),n("div",ne,[h(m,{title:"Routes"},{default:R(()=>[c("div",ie,[c("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-l-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:j},[h(V(T),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),ue]),c("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-r-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:q},[h(V(T),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),de])])]),_:1}),(a(!0),n(w,null,C(t.form.routes,(l,E)=>(a(),n("div",{key:l.symbol+E,class:"flex mt-4"},[h(p,{modelValue:l.symbol,"onUpdate:modelValue":u=>l.symbol=u,query:d.value,"onUpdate:query":o[0]||(o[0]=u=>d.value=u),"clear-search-on-close":"",class:"w-full",ui:{rounded:"rounded-none rounded-l"},searchable:"","searchable-placeholder":"Search symbols...",size:"lg",options:k.value,placeholder:"Select a symbol...",onChange:o[1]||(o[1]=u=>d.value="")},{empty:R(()=>[D("Start typing...")]),_:2},1032,["modelValue","onUpdate:modelValue","query","options"]),h(p,{modelValue:l.timeframe,"onUpdate:modelValue":u=>l.timeframe=u,class:"w-full",ui:{rounded:"rounded-none"},size:"lg","value-attribute":"value",options:t.timeframes},null,8,["modelValue","onUpdate:modelValue","options"]),h(p,{modelValue:l.strategy,"onUpdate:modelValue":u=>l.strategy=u,class:"w-full",ui:{rounded:"rounded-none rounded-r"},size:"lg",options:U.value,searchable:""},null,8,["modelValue","onUpdate:modelValue","options"]),t.form.routes.length>1?(a(),y(i,{key:0,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-trash",disabled:t.form.routes.length===1,onClick:u=>L(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),y(i,{key:1,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-document-duplicate",disabled:t.form.routes.length===1,onClick:u=>P(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),y(i,{key:2,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-down",disabled:t.form.routes.indexOf(l)===t.form.routes.length-1,onClick:u=>Y(l)},null,8,["disabled","onClick"])):f("",!0),t.form.routes.length>1?(a(),y(i,{key:3,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-up",disabled:t.form.routes.indexOf(l)===0,onClick:u=>F(l)},null,8,["disabled","onClick"])):f("",!0)]))),128)),t.form.data_routes.length?(a(),y(g,{key:0,class:"mt-8 mb-4",title:"Data Routes"})):f("",!0),(a(!0),n(w,null,C(t.form.data_routes,(l,E)=>(a(),n("div",{key:l.symbol+E+l.timeframe,class:"flex mt-4"},[h(p,{modelValue:l.symbol,"onUpdate:modelValue":u=>l.symbol=u,query:d.value,"onUpdate:query":o[2]||(o[2]=u=>d.value=u),"clear-search-on-close":"",class:"w-full",ui:{rounded:"rounded-none rounded-l"},searchable:"",size:"lg",options:k.value,placeholder:"Select a symbol...",onChange:o[3]||(o[3]=u=>d.value="")},{empty:R(()=>[D("Start typing...")]),_:2},1032,["modelValue","onUpdate:modelValue","query","options"]),h(p,{modelValue:l.timeframe,"onUpdate:modelValue":u=>l.timeframe=u,class:"w-full",ui:{rounded:"rounded-none rounded-r"},size:"lg","value-attribute":"value",options:t.timeframes},null,8,["modelValue","onUpdate:modelValue","options"]),h(i,{size:"lg",variant:"link",color:"gray",icon:"i-heroicons-trash",onClick:u=>N(l)},null,8,["onClick"]),t.form.routes.length>1?(a(),y(i,{key:0,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-document-duplicate",onClick:u=>H(l)},null,8,["onClick"])):f("",!0),t.form.data_routes.length>1?(a(),y(i,{key:1,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-down",disabled:t.form.data_routes.indexOf(l)===t.form.data_routes.length-1,onClick:u=>X(l)},null,8,["disabled","onClick"])):f("",!0),t.form.data_routes.length>1?(a(),y(i,{key:2,class:"",size:"lg",variant:"link",color:"gray",icon:"i-heroicons-arrow-up",disabled:t.form.data_routes.indexOf(l)===0,onClick:u=>W(l)},null,8,["disabled","onClick"])):f("",!0)]))),128))])}}}),me=["textContent"],ce=S({__name:"Tooltip",props:{title:{}},setup(_){const e=x(!1),k=()=>{e.value=!0},d=()=>{e.value=!1};return(r,v)=>(a(),n("span",{class:"relative underline",onMouseenter:k,onMouseleave:d},[te(c("span",{class:"absolute -top-10 z-90 bg-gray-900 rounded px-2 py-1 text-sm text-white",textContent:b(r.title)},null,8,me),[[oe,V(e)]]),re(r.$slots,"default")],32))}}),fe={class:"flex flex-col select-none"},pe={class:"-my-2 overflow-x-auto"},ge={class:"py-2 align-middle inline-block min-w-full"},ye={class:"border dark:border-gray-600 overflow-hidden sm:rounded"},he={class:"min-w-full divide-y divide-gray-200 dark:divide-gray-600 hide-scroll overflow-x-scroll"},ke={key:0,class:"bg-gray-100 dark:bg-gray-800 select-none"},be={key:1},_e=["textContent"],ve=["textContent"],xe=["textContent"],we={key:1},Ce=["textContent"],Re=["textContent"],Se=["textContent"],Ee={key:0,class:"text-center text-xs dark:bg-gray-700 py-4 opacity-30 dark:opacity-75 select-none"},Ue=S({__name:"MultipleValuesTable",props:{header:{type:Boolean},data:{},headerItems:{}},setup(_){return(e,k)=>{const d=ce;return a(),n("div",fe,[c("div",pe,[c("div",ge,[c("div",ye,[c("table",he,[e.header?(a(),n("thead",ke,[c("tr",null,[(a(!0),n(w,null,C(e.headerItems,r=>(a(),n("th",{key:r,scope:"col",class:"px-6 py-3 text-left text-xs font-bold text-gray-500 dark:text-gray-400"},b(r),1))),128))])])):f("",!0),e.data.length?(a(),n("tbody",be,[(a(!0),n(w,null,C(e.data,(r,v)=>(a(),n("tr",{key:v,class:O(["text-gray-900 dark:text-gray-200",v%2===0?"bg-white dark:bg-backdrop-dark":"bg-gray-50 dark:bg-gray-700"])},[(a(!0),n(w,null,C(r,(M,s)=>(a(),n("td",{key:s,class:O(["px-6 py-4 whitespace-nowrap text-sm font-medium",r[s].style])},[r[s].tooltip?(a(),y(d,{key:0,title:r[s].tooltip},{default:R(()=>[r[s].tag==="code"?(a(),n("code",{key:0,class:"rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,_e)):r[s].tag==="pre"?(a(),n("pre",{key:1,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,ve)):(a(),n("span",{key:2,textContent:b(r[s].value===0?"":r[s].value)},null,8,xe))]),_:2},1032,["title"])):(a(),n("span",we,[r[s].tag==="code"?(a(),n("code",{key:0,class:"rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,Ce)):r[s].tag==="pre"?(a(),n("pre",{key:1,class:"whitespace-pre-line rounded border dark:border-gray-600 bg-gray-50 dark:bg-gray-700 select-text text-sm dark:text-gray-300 w-full px-4 sm:px-6 py-2",textContent:b(r[s].value===0?"":r[s].value)},null,8,Re)):(a(),n("span",{key:2,textContent:b(r[s].value===0?"":r[s].value)},null,8,Se))]))],2))),128))],2))),128))])):f("",!0)]),e.data.length?f("",!0):(a(),n("div",Ee," Empty List "))])])])])}}});export{Oe as _,Te as a,Ue as b}; diff --git a/jesse/static/_nuxt/DbaDxTuc.js b/jesse/static/_nuxt/C7X-_NHR.js similarity index 73% rename from jesse/static/_nuxt/DbaDxTuc.js rename to jesse/static/_nuxt/C7X-_NHR.js index 0f70d5f70..160617b78 100644 --- a/jesse/static/_nuxt/DbaDxTuc.js +++ b/jesse/static/_nuxt/C7X-_NHR.js @@ -1 +1 @@ -import{u,bc as l}from"./Crvr41uX.js";function f(e,a){const{title:r,titleTemplate:n,...o}=e;return u({title:r,titleTemplate:n,_flatMeta:o},{...a,transform(t){const s=l({...t._flatMeta});return delete t._flatMeta,{...t,meta:s}}})}export{f as u}; +import{u,bc as l}from"./iedVCmkz.js";function f(e,a){const{title:r,titleTemplate:n,...o}=e;return u({title:r,titleTemplate:n,_flatMeta:o},{...a,transform(t){const s=l({...t._flatMeta});return delete t._flatMeta,{...t,meta:s}}})}export{f as u}; diff --git a/jesse/static/_nuxt/Dcndd7wk.js b/jesse/static/_nuxt/CI3jHjsu.js similarity index 97% rename from jesse/static/_nuxt/Dcndd7wk.js rename to jesse/static/_nuxt/CI3jHjsu.js index fa3092a57..23f7cb62d 100644 --- a/jesse/static/_nuxt/Dcndd7wk.js +++ b/jesse/static/_nuxt/CI3jHjsu.js @@ -1 +1 @@ -import{_ as r,u as s,o as i,c as u,a as e,t as o,b as c,w as d,d as l,e as p,p as h,f}from"./Crvr41uX.js";const g=t=>(h("data-v-73a07988"),t=t(),f(),t),b={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},x=g(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),m={class:"max-w-520px text-center z-20"},y=["textContent"],_=["textContent"],k={class:"w-full flex items-center justify-center"},w={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(z,S)=>{const a=p;return i(),u("div",b,[x,e("div",m,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:o(t.statusCode)},null,8,y),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:o(t.description)},null,8,_),e("div",k,[c(a,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[l(o(t.backHome),1)]),_:1})])])])}}},C=r(w,[["__scopeId","data-v-73a07988"]]);export{C as default}; +import{_ as r,u as s,o as i,c as u,a as e,t as o,b as c,w as d,d as l,e as p,p as h,f}from"./iedVCmkz.js";const g=t=>(h("data-v-73a07988"),t=t(),f(),t),b={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},x=g(()=>e("div",{class:"fixed left-0 right-0 spotlight z-10"},null,-1)),m={class:"max-w-520px text-center z-20"},y=["textContent"],_=["textContent"],k={class:"w-full flex items-center justify-center"},w={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Not Found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(z,S)=>{const a=p;return i(),u("div",b,[x,e("div",m,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:o(t.statusCode)},null,8,y),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:o(t.description)},null,8,_),e("div",k,[c(a,{to:"/",class:"gradient-border text-md sm:text-xl py-2 px-4 sm:py-3 sm:px-6 cursor-pointer"},{default:d(()=>[l(o(t.backHome),1)]),_:1})])])])}}},C=r(w,[["__scopeId","data-v-73a07988"]]);export{C as default}; diff --git a/jesse/static/_nuxt/BbjuIOUV.js b/jesse/static/_nuxt/CLIaz-ji.js similarity index 77% rename from jesse/static/_nuxt/BbjuIOUV.js rename to jesse/static/_nuxt/CLIaz-ji.js index 6ce072f14..68de7d4c6 100644 --- a/jesse/static/_nuxt/BbjuIOUV.js +++ b/jesse/static/_nuxt/CLIaz-ji.js @@ -1 +1 @@ -import{g as o,a2 as c,a1 as r,o as d,c as i}from"./Crvr41uX.js";const u=o({__name:"index",setup(l){const e=c(),n=r(),s=Object.keys(e.tabs);if(s.length>0){const t=s[0],a=e.tabs[t];n.push({path:`/candles/${a.id}`})}else e.addTab();return(t,a)=>(d(),i("div"))}});export{u as default}; +import{g as o,a2 as c,a1 as r,o as d,c as i}from"./iedVCmkz.js";const u=o({__name:"index",setup(l){const e=c(),n=r(),s=Object.keys(e.tabs);if(s.length>0){const t=s[0],a=e.tabs[t];n.push({path:`/candles/${a.id}`})}else e.addTab();return(t,a)=>(d(),i("div"))}});export{u as default}; diff --git a/jesse/static/_nuxt/CqsPNs1W.js b/jesse/static/_nuxt/CbRZ-etx.js similarity index 97% rename from jesse/static/_nuxt/CqsPNs1W.js rename to jesse/static/_nuxt/CbRZ-etx.js index b3e314b34..944d5c644 100644 --- a/jesse/static/_nuxt/CqsPNs1W.js +++ b/jesse/static/_nuxt/CbRZ-etx.js @@ -1 +1 @@ -import{_ as Y,b as q,a as G}from"./1Zuu5sOE.js";import{o,c as i,a as u,_ as ee,aj as te,g as ae,ak as k,x as m,r as _,Q as se,P as p,y as R,M as f,w as b,O as r,b as a,F as oe,R as le,W as ne,k as d,U as ie,t as re,d as ue,V,Y as de,a0 as ce,Z as me,al as ge,$ as ve,X as _e}from"./Crvr41uX.js";import{b as pe,c as fe,a as he,_ as ye}from"./Bp2xcJgg.js";import{_ as be}from"./tIZ0BYDc.js";import{u as xe}from"./DbaDxTuc.js";import"./QcdhOkh-.js";function we(x,g){return o(),i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[u("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z","clip-rule":"evenodd"})])}function ke(x,g){return o(),i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[u("path",{"fill-rule":"evenodd",d:"M10.5 3A1.501 1.501 0 0 0 9 4.5h6A1.5 1.5 0 0 0 13.5 3h-3Zm-2.693.178A3 3 0 0 1 10.5 1.5h3a3 3 0 0 1 2.694 1.678c.497.042.992.092 1.486.15 1.497.173 2.57 1.46 2.57 2.929V19.5a3 3 0 0 1-3 3H6.75a3 3 0 0 1-3-3V6.257c0-1.47 1.073-2.756 2.57-2.93.493-.057.989-.107 1.487-.15Z","clip-rule":"evenodd"})])}const Ve={},Te={class:"border border-gray-300 dark:border-gray-700 rounded-md p-4 w-full mx-auto"},Se=te('
',2),$e=[Se];function ze(x,g){return o(),i("div",Te,$e)}const Ce=ee(Ve,[["render",ze]]),Ue=["value"],Re={key:0,class:"mb-8"},Le={key:1,class:"mb-8"},Ne={key:2},Me={key:2,class:"mt-16"},De={key:3},je={class:"flex items-center select-none flex-1 mb-4"},Be={class:"select-none"},Ie=u("p",{class:"text-sm text-gray-500 dark:text-gray-400"},[ue(" The number that tells Jesse how many trades you would find optimal for your strategy in the targeted time period so that it can filter out those DNAs that cause too few trades. "),u("a",{href:"https://docs.jesse.trade/docs/optimize/executing-the-optimize-mode.html",target:"_blank",class:"font-semibold hover:underline italic"},"More Details...")],-1),Oe=u("br",null,null,-1),Ae={class:"grid grid-cols-1 gap-6"},Ee={key:0},Fe={key:1,class:"flex flex-col items-center justify-center select-none"},Pe={class:"mb-8 w-full"},Ze=["href"],Je=["textContent"],Ke={key:2},He={class:"mb-8 w-full"},Qe=["href"],tt=ae({__name:"index",setup(x){xe({title:"Optimization - Jesse"});const g=k(),t=m(()=>g.form),e=m(()=>g.results),w=_(!1),h=_(!1),T=_(se().public.apiBaseUrl),y=_([]),L=m(()=>p().jesseSupportedTimeframes.map(n=>({label:n,value:n}))),S=_([]);async function $(){S.value=await p().getExchangeSupportedSymbols(t.value.exchange)}t.value.exchange=t.value.exchange||p().backtestingExchangeNames[0],$();const N=m(()=>p().authToken),M=m(()=>le.remainingTimeText(e.value.progressbar.estimated_remaining_seconds)),z=m(()=>{let n=`/download/optimize/log?token=${N.value}`;return T.value!=="/"&&(n=T.value+n),n}),{cancel:D}=k();function j(){if(y.value.length){for(let n=0;n1){V("error","Optimization mode does not support multiple routes at the moment.");return}k().start()}function B(){navigator.clipboard.writeText(e.value.infoLogs),V("success","Logs copied successfully"),h.value=!0,setTimeout(()=>{h.value=!1},3e3)}function I(){e.value.showResults=!1,e.value.executing=!1,e.value.progressbar.current=0,e.value.progressbar.estimated_remaining_seconds=0,e.value.alert.message="",e.value.alert.type=""}return R(()=>t.value.start_date,n=>{t.value.finish_datet.value.finish_date,n=>{t.value.start_date>n&&(t.value.start_date=n)}),(n,s)=>{const O=Y,A=ne,E=fe,F=he,c=de,P=ce,Z=Ce,J=q,K=be,H=G,C=me,Q=ge,U=ve,v=_e,W=ye,X=pe;return o(),i(oe,null,[t.value.debug_mode?(o(),f(A,{key:0,modelValue:e.value.logsModal,"onUpdate:modelValue":s[0]||(s[0]=l=>e.value.logsModal=l),title:"Logs"},{default:b(()=>[a(O,{logs:e.value.infoLogs},null,8,["logs"])]),buttons:b(()=>[u("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:B},[d(h)?(o(),f(d(we),{key:0,class:"h-6 w-6","aria-hidden":"true"})):r("",!0),!d(h)&&e.value.infoLogs.length!=0?(o(),f(d(ke),{key:1,class:"h-6 w-6","aria-hidden":"true"})):r("",!0)]),u("input",{id:"copy-info-logs",type:"hidden",value:e.value.infoLogs},null,8,Ue)]),_:1},8,["modelValue"])):r("",!0),a(X,null,{left:b(()=>[e.value.alert.message?(o(),i("div",Re,[a(E,{color:"teal",icon:"i-heroicons-check-circle",variant:"soft",title:e.value.alert.message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:s[1]||(s[1]=l=>e.value.alert.message="")},null,8,["title"])])):r("",!0),e.value.exception.error&&e.value.executing?(o(),i("div",Le,[a(F,{modelValue:d(w),"onUpdate:modelValue":s[2]||(s[2]=l=>ie(w)?w.value=l:null),title:e.value.exception.error,content:e.value.exception.traceback,mode:"optimize"},null,8,["modelValue","title","content"])])):r("",!0),(e.value.executing||e.value.showResults)&&!e.value.exception.error?(o(),i("div",Ne,[a(c,{title:"Info"}),e.value.generalInfo.length?(o(),f(P,{key:0,data:e.value.generalInfo,class:"my-4"},null,8,["data"])):(o(),f(Z,{key:1,class:"my-4"})),e.value.best_candidates.length?(o(),i("div",Me,[a(c,{title:"Best DNA Candidates",class:"my-4"}),a(J,{data:e.value.best_candidates,"header-items":["Rank","DNA","Fitness","Training-Testing winrate","Training-testing total trades","Training-Testing PNL"],header:""},null,8,["data"])])):r("",!0)])):r("",!0),!e.value.executing&&!e.value.showResults?(o(),i("div",De,[a(c,{class:"mb-4",title:"Exchange"}),a(K,{modelValue:t.value.exchange,"onUpdate:modelValue":s[3]||(s[3]=l=>t.value.exchange=l),placeholder:"Select an exchange...",searchable:"",options:d(p)().backtestingExchangeNames,size:"lg",class:"mt-2 mb-16",onChange:$},null,8,["modelValue","options"]),a(H,{"total-routes-error":d(y),form:t.value,results:e.value,mode:"optimization",symbols:d(S),timeframes:L.value},null,8,["total-routes-error","form","results","symbols","timeframes"]),a(c,{class:"mt-16 mb-4",title:"Duration"}),u("div",je,[a(C,{modelValue:t.value.start_date,"onUpdate:modelValue":s[4]||(s[4]=l=>t.value.start_date=l),type:"date",variant:"outline",size:"lg",class:"w-full mr-2"},null,8,["modelValue"]),a(C,{modelValue:t.value.finish_date,"onUpdate:modelValue":s[5]||(s[5]=l=>t.value.finish_date=l),type:"date",variant:"outline",size:"lg",class:"w-full ml-2"},null,8,["modelValue"])]),a(c,{class:"mt-16 mb-4",title:"Optimal Trades"}),u("div",Be,[Ie,Oe,a(Q,{modelValue:t.value.optimal_total,"onUpdate:modelValue":s[6]||(s[6]=l=>t.value.optimal_total=l),title:"Optimal number of trades:",default:7},null,8,["modelValue"])]),a(c,{class:"mt-16 mb-4",title:"Options"}),u("div",Ae,[a(U,{modelValue:t.value.debug_mode,"onUpdate:modelValue":s[7]||(s[7]=l=>t.value.debug_mode=l),title:"Debug Mode",description:"Displays detailed logs about the genetics algorithm. Use it if you are interested in the genetics algorithm and are familiar with its basics."},null,8,["modelValue"]),a(U,{modelValue:t.value.fast_mode,"onUpdate:modelValue":s[8]||(s[8]=l=>t.value.fast_mode=l),title:"Fast Mode",description:"Runs the backtest faster by using an improved algorithm. This is supposed to yield the same results; however, it's currently experimental, which is why it's an option."},null,8,["modelValue"])])])):r("",!0)]),right:b(()=>[!e.value.executing&&!e.value.showResults?(o(),i("div",Ee,[u("div",null,[a(v,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:s[9]||(s[9]=l=>j())})])])):r("",!0),e.value.executing&&!e.value.showResults?(o(),i("div",Fe,[u("div",Pe,[a(v,{color:"gray",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},class:"w-full flex justify-center",icon:"i-heroicons-no-symbol",size:"xl",variant:"solid",label:"Cancel",trailing:!1,onClick:s[10]||(s[10]=l=>d(D)())}),t.value.debug_mode?(o(),i("a",{key:0,href:z.value,class:"flex justify-center items-center btn-secondary text-center mb-4 mt-4 w-full"},[a(v,{class:"w-full flex justify-center",color:"gray",size:"xl",variant:"solid",label:"Debugging Logs",icon:"i-heroicons-document-arrow-down",trailing:!1})],8,Ze)):r("",!0)]),u("div",null,[a(W,{progress:e.value.progressbar.current},null,8,["progress"])]),!e.value.exception.error&&!e.value.best_candidates.length?(o(),i("h3",{key:0,class:"mt-8 animate-pulse",textContent:re(M.value)},null,8,Je)):r("",!0)])):r("",!0),e.value.showResults?(o(),i("div",Ke,[u("div",He,[a(v,{class:"w-full flex justify-center",icon:"i-heroicons-arrow-uturn-left",size:"xl",variant:"solid",label:"New Session",trailing:!1,onClick:I}),t.value.debug_mode?(o(),i("a",{key:0,href:z.value,class:"flex justify-center items-center btn-secondary text-center my-4 w-full"},[a(v,{color:"gray",variant:"solid",label:"Debugging Logs",icon:"i-heroicons-document-arrow-down",block:"",size:"xl",trailing:!1})],8,Qe)):r("",!0)])])):r("",!0)]),_:1})],64)}}});export{tt as default}; +import{_ as Y,b as q,a as G}from"./BxVo_4D-.js";import{o,c as i,a as u,_ as ee,aj as te,g as ae,ak as k,x as m,r as _,Q as se,P as p,y as R,M as f,w as b,O as r,b as a,F as oe,R as le,W as ne,k as d,U as ie,t as re,d as ue,V,Y as de,a0 as ce,Z as me,al as ge,$ as ve,X as _e}from"./iedVCmkz.js";import{b as pe,c as fe,a as he,_ as ye}from"./DU23lKGZ.js";import{_ as be}from"./DRlj9p5R.js";import{u as xe}from"./C7X-_NHR.js";import"./DddLSi-Q.js";function we(x,g){return o(),i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[u("path",{"fill-rule":"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z","clip-rule":"evenodd"})])}function ke(x,g){return o(),i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[u("path",{"fill-rule":"evenodd",d:"M10.5 3A1.501 1.501 0 0 0 9 4.5h6A1.5 1.5 0 0 0 13.5 3h-3Zm-2.693.178A3 3 0 0 1 10.5 1.5h3a3 3 0 0 1 2.694 1.678c.497.042.992.092 1.486.15 1.497.173 2.57 1.46 2.57 2.929V19.5a3 3 0 0 1-3 3H6.75a3 3 0 0 1-3-3V6.257c0-1.47 1.073-2.756 2.57-2.93.493-.057.989-.107 1.487-.15Z","clip-rule":"evenodd"})])}const Ve={},Te={class:"border border-gray-300 dark:border-gray-700 rounded-md p-4 w-full mx-auto"},Se=te('
',2),$e=[Se];function ze(x,g){return o(),i("div",Te,$e)}const Ce=ee(Ve,[["render",ze]]),Ue=["value"],Re={key:0,class:"mb-8"},Le={key:1,class:"mb-8"},Ne={key:2},Me={key:2,class:"mt-16"},De={key:3},je={class:"flex items-center select-none flex-1 mb-4"},Be={class:"select-none"},Ie=u("p",{class:"text-sm text-gray-500 dark:text-gray-400"},[ue(" The number that tells Jesse how many trades you would find optimal for your strategy in the targeted time period so that it can filter out those DNAs that cause too few trades. "),u("a",{href:"https://docs.jesse.trade/docs/optimize/executing-the-optimize-mode.html",target:"_blank",class:"font-semibold hover:underline italic"},"More Details...")],-1),Oe=u("br",null,null,-1),Ae={class:"grid grid-cols-1 gap-6"},Ee={key:0},Fe={key:1,class:"flex flex-col items-center justify-center select-none"},Pe={class:"mb-8 w-full"},Ze=["href"],Je=["textContent"],Ke={key:2},He={class:"mb-8 w-full"},Qe=["href"],tt=ae({__name:"index",setup(x){xe({title:"Optimization - Jesse"});const g=k(),t=m(()=>g.form),e=m(()=>g.results),w=_(!1),h=_(!1),T=_(se().public.apiBaseUrl),y=_([]),L=m(()=>p().jesseSupportedTimeframes.map(n=>({label:n,value:n}))),S=_([]);async function $(){S.value=await p().getExchangeSupportedSymbols(t.value.exchange)}t.value.exchange=t.value.exchange||p().backtestingExchangeNames[0],$();const N=m(()=>p().authToken),M=m(()=>le.remainingTimeText(e.value.progressbar.estimated_remaining_seconds)),z=m(()=>{let n=`/download/optimize/log?token=${N.value}`;return T.value!=="/"&&(n=T.value+n),n}),{cancel:D}=k();function j(){if(y.value.length){for(let n=0;n1){V("error","Optimization mode does not support multiple routes at the moment.");return}k().start()}function B(){navigator.clipboard.writeText(e.value.infoLogs),V("success","Logs copied successfully"),h.value=!0,setTimeout(()=>{h.value=!1},3e3)}function I(){e.value.showResults=!1,e.value.executing=!1,e.value.progressbar.current=0,e.value.progressbar.estimated_remaining_seconds=0,e.value.alert.message="",e.value.alert.type=""}return R(()=>t.value.start_date,n=>{t.value.finish_datet.value.finish_date,n=>{t.value.start_date>n&&(t.value.start_date=n)}),(n,s)=>{const O=Y,A=ne,E=fe,F=he,c=de,P=ce,Z=Ce,J=q,K=be,H=G,C=me,Q=ge,U=ve,v=_e,W=ye,X=pe;return o(),i(oe,null,[t.value.debug_mode?(o(),f(A,{key:0,modelValue:e.value.logsModal,"onUpdate:modelValue":s[0]||(s[0]=l=>e.value.logsModal=l),title:"Logs"},{default:b(()=>[a(O,{logs:e.value.infoLogs},null,8,["logs"])]),buttons:b(()=>[u("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:B},[d(h)?(o(),f(d(we),{key:0,class:"h-6 w-6","aria-hidden":"true"})):r("",!0),!d(h)&&e.value.infoLogs.length!=0?(o(),f(d(ke),{key:1,class:"h-6 w-6","aria-hidden":"true"})):r("",!0)]),u("input",{id:"copy-info-logs",type:"hidden",value:e.value.infoLogs},null,8,Ue)]),_:1},8,["modelValue"])):r("",!0),a(X,null,{left:b(()=>[e.value.alert.message?(o(),i("div",Re,[a(E,{color:"teal",icon:"i-heroicons-check-circle",variant:"soft",title:e.value.alert.message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:s[1]||(s[1]=l=>e.value.alert.message="")},null,8,["title"])])):r("",!0),e.value.exception.error&&e.value.executing?(o(),i("div",Le,[a(F,{modelValue:d(w),"onUpdate:modelValue":s[2]||(s[2]=l=>ie(w)?w.value=l:null),title:e.value.exception.error,content:e.value.exception.traceback,mode:"optimize"},null,8,["modelValue","title","content"])])):r("",!0),(e.value.executing||e.value.showResults)&&!e.value.exception.error?(o(),i("div",Ne,[a(c,{title:"Info"}),e.value.generalInfo.length?(o(),f(P,{key:0,data:e.value.generalInfo,class:"my-4"},null,8,["data"])):(o(),f(Z,{key:1,class:"my-4"})),e.value.best_candidates.length?(o(),i("div",Me,[a(c,{title:"Best DNA Candidates",class:"my-4"}),a(J,{data:e.value.best_candidates,"header-items":["Rank","DNA","Fitness","Training-Testing winrate","Training-testing total trades","Training-Testing PNL"],header:""},null,8,["data"])])):r("",!0)])):r("",!0),!e.value.executing&&!e.value.showResults?(o(),i("div",De,[a(c,{class:"mb-4",title:"Exchange"}),a(K,{modelValue:t.value.exchange,"onUpdate:modelValue":s[3]||(s[3]=l=>t.value.exchange=l),placeholder:"Select an exchange...",searchable:"",options:d(p)().backtestingExchangeNames,size:"lg",class:"mt-2 mb-16",onChange:$},null,8,["modelValue","options"]),a(H,{"total-routes-error":d(y),form:t.value,results:e.value,mode:"optimization",symbols:d(S),timeframes:L.value},null,8,["total-routes-error","form","results","symbols","timeframes"]),a(c,{class:"mt-16 mb-4",title:"Duration"}),u("div",je,[a(C,{modelValue:t.value.start_date,"onUpdate:modelValue":s[4]||(s[4]=l=>t.value.start_date=l),type:"date",variant:"outline",size:"lg",class:"w-full mr-2"},null,8,["modelValue"]),a(C,{modelValue:t.value.finish_date,"onUpdate:modelValue":s[5]||(s[5]=l=>t.value.finish_date=l),type:"date",variant:"outline",size:"lg",class:"w-full ml-2"},null,8,["modelValue"])]),a(c,{class:"mt-16 mb-4",title:"Optimal Trades"}),u("div",Be,[Ie,Oe,a(Q,{modelValue:t.value.optimal_total,"onUpdate:modelValue":s[6]||(s[6]=l=>t.value.optimal_total=l),title:"Optimal number of trades:",default:7},null,8,["modelValue"])]),a(c,{class:"mt-16 mb-4",title:"Options"}),u("div",Ae,[a(U,{modelValue:t.value.debug_mode,"onUpdate:modelValue":s[7]||(s[7]=l=>t.value.debug_mode=l),title:"Debug Mode",description:"Displays detailed logs about the genetics algorithm. Use it if you are interested in the genetics algorithm and are familiar with its basics."},null,8,["modelValue"]),a(U,{modelValue:t.value.fast_mode,"onUpdate:modelValue":s[8]||(s[8]=l=>t.value.fast_mode=l),title:"Fast Mode",description:"Runs the backtest faster by using an improved algorithm. This is supposed to yield the same results; however, it's currently experimental, which is why it's an option."},null,8,["modelValue"])])])):r("",!0)]),right:b(()=>[!e.value.executing&&!e.value.showResults?(o(),i("div",Ee,[u("div",null,[a(v,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:s[9]||(s[9]=l=>j())})])])):r("",!0),e.value.executing&&!e.value.showResults?(o(),i("div",Fe,[u("div",Pe,[a(v,{color:"gray",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},class:"w-full flex justify-center",icon:"i-heroicons-no-symbol",size:"xl",variant:"solid",label:"Cancel",trailing:!1,onClick:s[10]||(s[10]=l=>d(D)())}),t.value.debug_mode?(o(),i("a",{key:0,href:z.value,class:"flex justify-center items-center btn-secondary text-center mb-4 mt-4 w-full"},[a(v,{class:"w-full flex justify-center",color:"gray",size:"xl",variant:"solid",label:"Debugging Logs",icon:"i-heroicons-document-arrow-down",trailing:!1})],8,Ze)):r("",!0)]),u("div",null,[a(W,{progress:e.value.progressbar.current},null,8,["progress"])]),!e.value.exception.error&&!e.value.best_candidates.length?(o(),i("h3",{key:0,class:"mt-8 animate-pulse",textContent:re(M.value)},null,8,Je)):r("",!0)])):r("",!0),e.value.showResults?(o(),i("div",Ke,[u("div",He,[a(v,{class:"w-full flex justify-center",icon:"i-heroicons-arrow-uturn-left",size:"xl",variant:"solid",label:"New Session",trailing:!1,onClick:I}),t.value.debug_mode?(o(),i("a",{key:0,href:z.value,class:"flex justify-center items-center btn-secondary text-center my-4 w-full"},[a(v,{color:"gray",variant:"solid",label:"Debugging Logs",icon:"i-heroicons-document-arrow-down",block:"",size:"xl",trailing:!1})],8,Qe)):r("",!0)])])):r("",!0)]),_:1})],64)}}});export{tt as default}; diff --git a/jesse/static/_nuxt/C2560jq-.js b/jesse/static/_nuxt/ClXoQoyw.js similarity index 56% rename from jesse/static/_nuxt/C2560jq-.js rename to jesse/static/_nuxt/ClXoQoyw.js index b97bb8973..21bd879a2 100644 --- a/jesse/static/_nuxt/C2560jq-.js +++ b/jesse/static/_nuxt/ClXoQoyw.js @@ -1 +1 @@ -import{_ as r,L as t}from"./Crvr41uX.js";const s={};function n(e,o){return t(e.$slots,"default")}const a=r(s,[["render",n]]);export{a as default}; +import{_ as r,L as t}from"./iedVCmkz.js";const s={};function n(e,o){return t(e.$slots,"default")}const a=r(s,[["render",n]]);export{a as default}; diff --git a/jesse/static/_nuxt/DaALoRQl.js b/jesse/static/_nuxt/CyEJo30r.js similarity index 96% rename from jesse/static/_nuxt/DaALoRQl.js rename to jesse/static/_nuxt/CyEJo30r.js index 0a3683873..150667428 100644 --- a/jesse/static/_nuxt/DaALoRQl.js +++ b/jesse/static/_nuxt/CyEJo30r.js @@ -1 +1 @@ -import{g as M,h as W,r as _,o as i,c as d,a as u,F as D,i as A,j as J,b as a,w as S,t as I,n as z,k as o,l as X,v as Y,m as Z,a2 as C,e as G,P as H,q as K,x as k,R as Q,y as ee,z as te,O as h,T as v,U as B,M as L,d as se,V as $,X as oe,Y as re,Z as ne,a3 as ae,a1 as le}from"./Crvr41uX.js";import{r as ie}from"./D270KAH9.js";import{_ as ue,a as de,c as ce,b as me}from"./Bp2xcJgg.js";import{_ as pe}from"./tIZ0BYDc.js";import{u as ge}from"./DbaDxTuc.js";const fe={class:"mb-4"},be={class:"hidden sm:block"},ye={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"props.Tabs"},he=["onMouseup"],ve=["data-cy","onClick"],_e={class:"absolute right-[1em] focus:outline-none"},ke=u("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),xe=M({__name:"CandleTabs",props:{tabs:{}},emits:["close"],setup(x,{emit:l}){const c=W(),p=_(c.params.id),g=l,f=x;function b(s){if(s.results.exception.error&&s.results.executing)return"Error";let r="";return s.form.exchange&&(r+=`${s.form.exchange} • `),s.form.symbol&&(r+=`${s.form.symbol.toUpperCase()} • `),s.form.start_date&&(r+=`${s.form.start_date}`),r=r.endsWith(" • ")?r.slice(0,-3):r,s.results.executing?`${r} | ${s.results.progressbar.current}%`:r}return(s,r)=>{const y=G;return i(),d("div",fe,[u("div",be,[u("nav",ye,[(i(!0),d(D,null,A(f.tabs,(m,N,T)=>(i(),d("div",{key:m.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:J(V=>g("close",m.id),["middle"])},[a(y,{to:`/candles/${m.id}`,class:z([m.id===o(p)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:S(()=>[u("span",null,I(b(m)),1),u("span",{"aria-hidden":"true",class:z([m.id===o(p)&&Object.keys(f.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),X(u("button",{"data-cy":"tab-close-button"+T,class:"absolute right-[1em] focus:outline-none",onClick:V=>g("close",m.id)},[a(o(Z),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,ve),[[Y,Object.keys(f.tabs).length>1]])],40,he))),128)),u("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center justify-center",onClick:r[0]||(r[0]=m=>o(C)().addTab())},[u("button",_e,[a(o(ie),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),ke])])])])}}}),we={key:0,class:"flex flex-col items-center justify-center select-none mt-[10%]"},$e=["textContent"],Se={class:"mt-8"},Ce={key:1,class:"mx-auto container mt-8"},Te={key:0,class:"mb-8"},Ve={key:1,class:"pb-4"},Re={key:0},Ee={key:0},Me={key:1},Ne=M({__name:"CandlesTab",props:{form:{},results:{}},setup(x){const l=x,c=_([]),p=_(""),g=C(),f=H(),b=K(),s=_([]);async function r(){s.value=await f.getExchangeSupportedSymbols(l.form.exchange),l.form.symbol=s.value[0]}const y=_(!1),m=k(()=>f.backtestingExchangeNames);l.form.exchange=l.form.exchange||m.value[0];const N=k(()=>Q.remainingTimeText(l.results.progressbar.estimated_remaining_seconds)),T=e=>{U()&&g.start(e)},V=e=>{U()&&g.startInNewTab(e)};function U(){const e={mustContainDashErrorMessage:'Symbol parameter must contain "-" character!',emptySymbolErrorMessage:"Symbol parameter cannot be empty"};return l.form.exchange?l.form.symbol?l.form.symbol.includes("-")?l.form.start_date?!0:($("error","Start date parameter cannot be empty"),!1):($("error",e.mustContainDashErrorMessage),!1):($("error",e.emptySymbolErrorMessage),!1):($("error","Exchange parameter cannot be empty"),!1)}return ee(()=>p.value,e=>{if(e.length==0){c.value=[];return}const t=[];for(const w of s.value){if(t.length>50)break;w.toLowerCase().startsWith(e.toLowerCase())&&t.push(w)}c.value=t}),te(()=>{setTimeout(()=>{r()},100)}),(e,t)=>{const w=ue,R=oe,O=de,q=ce,E=re,j=pe,P=ne,F=me;return!e.form.debug_mode&&e.results.executing&&!e.results.showResults?(i(),d("div",we,[u("div",null,[a(w,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?h("",!0):(i(),d("h3",{key:0,class:"mt-8 animate-pulse",textContent:I(o(N))},null,8,$e)),u("div",Se,[a(R,{color:"gray",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},class:"w-64 flex justify-center",icon:"i-heroicons-no-symbol",size:"xl",variant:"solid",label:"Cancel",trailing:!1,onClick:t[0]||(t[0]=n=>o(g).cancel((e._.provides[v]||e.$route).params.id))})]),e.results.exception.error&&e.results.executing?(i(),d("div",Ce,[a(O,{modelValue:o(y),"onUpdate:modelValue":t[1]||(t[1]=n=>B(y)?y.value=n:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"candles"},null,8,["modelValue","title","content"])])):h("",!0)])):(i(),L(F,{key:1},{left:S(()=>[e.results.alert.message?(i(),d("div",Te,[a(q,{color:"teal",icon:"i-heroicons-check-circle",variant:"soft",title:e.results.alert.message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:t[2]||(t[2]=n=>e.results.alert.message="")},null,8,["title"])])):h("",!0),!e.results.executing&&!e.results.showResults?(i(),d("div",Ve,[a(E,{title:"Exchange"}),a(j,{modelValue:e.form.exchange,"onUpdate:modelValue":t[3]||(t[3]=n=>e.form.exchange=n),searchable:"",placeholder:"Select an exchange...",options:o(m),size:"lg",class:"mt-2",onChange:r},null,8,["modelValue","options"]),a(E,{title:"Symbol",class:"mt-16"}),a(j,{modelValue:e.form.symbol,"onUpdate:modelValue":t[4]||(t[4]=n=>e.form.symbol=n),query:o(p),"onUpdate:query":t[5]||(t[5]=n=>B(p)?p.value=n:null),"clear-search-on-close":"",class:"mt-2",searchable:"",size:"lg",options:o(c),placeholder:"Select a symbol...",onChange:t[6]||(t[6]=n=>p.value="")},{empty:S(()=>[se("Start typing...")]),_:1},8,["modelValue","query","options"]),a(E,{title:"Start Date",class:"mt-16"}),a(P,{modelValue:e.form.start_date,"onUpdate:modelValue":t[7]||(t[7]=n=>e.form.start_date=n),type:"date",size:"lg",class:"mt-2"},null,8,["modelValue"])])):h("",!0)]),right:S(()=>[e.results.executing?h("",!0):(i(),d("div",Re,[e.results.showResults?(i(),d("div",Ee,[u("button",{class:"font-medium select-none items-center px-2.5 py-1.5 border border-transparent rounded shadow-sm text-white bg-indigo-600 dark:bg-indigo-400 hover:bg-indigo-700 dark:hover:bg-indigo-300 focus:outline-none dark:text-black text-base tracking-wide text-center block w-full mb-4",onClick:t[8]||(t[8]=n=>o(b).rerun((e._.provides[v]||e.$route).params.id))}," Rerun "),u("button",{class:"btn-secondary text-center block w-full mb-4",onClick:t[9]||(t[9]=n=>o(b).newBacktest((e._.provides[v]||e.$route).params.id))}," New backtest ")])):(i(),d("div",Me,[a(R,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:t[10]||(t[10]=n=>T((e._.provides[v]||e.$route).params.id))}),a(R,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-plus",size:"xl",variant:"solid",label:"Start in a new tab",trailing:!1,onClick:t[11]||(t[11]=n=>V((e._.provides[v]||e.$route).params.id))})]))]))]),_:1}))}}}),Ue={class:"w-full"},Le=M({__name:"[id]",setup(x){ge({title:"Candles - Jesse"});const l=C(),c=k(()=>l.tabs),p=ae(),g=k(()=>p.params.id),f=k(()=>{if(!c.value[g.value]){const b=Object.keys(c.value);if(b.length>0){const s=c.value[b[0]];return le().push(`/candles/${s.id}`),s}else C().addTab()}return c.value[g.value]});return(b,s)=>{const r=xe,y=Ne;return i(),d(D,null,[u("div",Ue,[a(r,{"page-id":o(g),tabs:o(c),onClose:o(l).closeTab},null,8,["page-id","tabs","onClose"])]),o(f)?(i(),L(y,{key:0,form:o(f).form,results:o(f).results},null,8,["form","results"])):h("",!0)],64)}}});export{Le as default}; +import{g as M,h as W,r as _,o as i,c as d,a as u,F as D,i as A,j as J,b as a,w as S,t as I,n as z,k as o,l as X,v as Y,m as Z,a2 as C,e as G,P as H,q as K,x as k,R as Q,y as ee,z as te,O as h,T as v,U as B,M as L,d as se,V as $,X as oe,Y as re,Z as ne,a3 as ae,a1 as le}from"./iedVCmkz.js";import{r as ie}from"./D3WWa22M.js";import{_ as ue,a as de,c as ce,b as me}from"./DU23lKGZ.js";import{_ as pe}from"./DRlj9p5R.js";import{u as ge}from"./C7X-_NHR.js";const fe={class:"mb-4"},be={class:"hidden sm:block"},ye={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"props.Tabs"},he=["onMouseup"],ve=["data-cy","onClick"],_e={class:"absolute right-[1em] focus:outline-none"},ke=u("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),xe=M({__name:"CandleTabs",props:{tabs:{}},emits:["close"],setup(x,{emit:l}){const c=W(),p=_(c.params.id),g=l,f=x;function b(s){if(s.results.exception.error&&s.results.executing)return"Error";let r="";return s.form.exchange&&(r+=`${s.form.exchange} • `),s.form.symbol&&(r+=`${s.form.symbol.toUpperCase()} • `),s.form.start_date&&(r+=`${s.form.start_date}`),r=r.endsWith(" • ")?r.slice(0,-3):r,s.results.executing?`${r} | ${s.results.progressbar.current}%`:r}return(s,r)=>{const y=G;return i(),d("div",fe,[u("div",be,[u("nav",ye,[(i(!0),d(D,null,A(f.tabs,(m,N,T)=>(i(),d("div",{key:m.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:J(V=>g("close",m.id),["middle"])},[a(y,{to:`/candles/${m.id}`,class:z([m.id===o(p)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:S(()=>[u("span",null,I(b(m)),1),u("span",{"aria-hidden":"true",class:z([m.id===o(p)&&Object.keys(f.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),X(u("button",{"data-cy":"tab-close-button"+T,class:"absolute right-[1em] focus:outline-none",onClick:V=>g("close",m.id)},[a(o(Z),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,ve),[[Y,Object.keys(f.tabs).length>1]])],40,he))),128)),u("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center justify-center",onClick:r[0]||(r[0]=m=>o(C)().addTab())},[u("button",_e,[a(o(ie),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),ke])])])])}}}),we={key:0,class:"flex flex-col items-center justify-center select-none mt-[10%]"},$e=["textContent"],Se={class:"mt-8"},Ce={key:1,class:"mx-auto container mt-8"},Te={key:0,class:"mb-8"},Ve={key:1,class:"pb-4"},Re={key:0},Ee={key:0},Me={key:1},Ne=M({__name:"CandlesTab",props:{form:{},results:{}},setup(x){const l=x,c=_([]),p=_(""),g=C(),f=H(),b=K(),s=_([]);async function r(){s.value=await f.getExchangeSupportedSymbols(l.form.exchange),l.form.symbol=s.value[0]}const y=_(!1),m=k(()=>f.backtestingExchangeNames);l.form.exchange=l.form.exchange||m.value[0];const N=k(()=>Q.remainingTimeText(l.results.progressbar.estimated_remaining_seconds)),T=e=>{U()&&g.start(e)},V=e=>{U()&&g.startInNewTab(e)};function U(){const e={mustContainDashErrorMessage:'Symbol parameter must contain "-" character!',emptySymbolErrorMessage:"Symbol parameter cannot be empty"};return l.form.exchange?l.form.symbol?l.form.symbol.includes("-")?l.form.start_date?!0:($("error","Start date parameter cannot be empty"),!1):($("error",e.mustContainDashErrorMessage),!1):($("error",e.emptySymbolErrorMessage),!1):($("error","Exchange parameter cannot be empty"),!1)}return ee(()=>p.value,e=>{if(e.length==0){c.value=[];return}const t=[];for(const w of s.value){if(t.length>50)break;w.toLowerCase().startsWith(e.toLowerCase())&&t.push(w)}c.value=t}),te(()=>{setTimeout(()=>{r()},100)}),(e,t)=>{const w=ue,R=oe,O=de,q=ce,E=re,j=pe,P=ne,F=me;return!e.form.debug_mode&&e.results.executing&&!e.results.showResults?(i(),d("div",we,[u("div",null,[a(w,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?h("",!0):(i(),d("h3",{key:0,class:"mt-8 animate-pulse",textContent:I(o(N))},null,8,$e)),u("div",Se,[a(R,{color:"gray",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},class:"w-64 flex justify-center",icon:"i-heroicons-no-symbol",size:"xl",variant:"solid",label:"Cancel",trailing:!1,onClick:t[0]||(t[0]=n=>o(g).cancel((e._.provides[v]||e.$route).params.id))})]),e.results.exception.error&&e.results.executing?(i(),d("div",Ce,[a(O,{modelValue:o(y),"onUpdate:modelValue":t[1]||(t[1]=n=>B(y)?y.value=n:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"candles"},null,8,["modelValue","title","content"])])):h("",!0)])):(i(),L(F,{key:1},{left:S(()=>[e.results.alert.message?(i(),d("div",Te,[a(q,{color:"teal",icon:"i-heroicons-check-circle",variant:"soft",title:e.results.alert.message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:t[2]||(t[2]=n=>e.results.alert.message="")},null,8,["title"])])):h("",!0),!e.results.executing&&!e.results.showResults?(i(),d("div",Ve,[a(E,{title:"Exchange"}),a(j,{modelValue:e.form.exchange,"onUpdate:modelValue":t[3]||(t[3]=n=>e.form.exchange=n),searchable:"",placeholder:"Select an exchange...",options:o(m),size:"lg",class:"mt-2",onChange:r},null,8,["modelValue","options"]),a(E,{title:"Symbol",class:"mt-16"}),a(j,{modelValue:e.form.symbol,"onUpdate:modelValue":t[4]||(t[4]=n=>e.form.symbol=n),query:o(p),"onUpdate:query":t[5]||(t[5]=n=>B(p)?p.value=n:null),"clear-search-on-close":"",class:"mt-2",searchable:"",size:"lg",options:o(c),placeholder:"Select a symbol...",onChange:t[6]||(t[6]=n=>p.value="")},{empty:S(()=>[se("Start typing...")]),_:1},8,["modelValue","query","options"]),a(E,{title:"Start Date",class:"mt-16"}),a(P,{modelValue:e.form.start_date,"onUpdate:modelValue":t[7]||(t[7]=n=>e.form.start_date=n),type:"date",size:"lg",class:"mt-2"},null,8,["modelValue"])])):h("",!0)]),right:S(()=>[e.results.executing?h("",!0):(i(),d("div",Re,[e.results.showResults?(i(),d("div",Ee,[u("button",{class:"font-medium select-none items-center px-2.5 py-1.5 border border-transparent rounded shadow-sm text-white bg-indigo-600 dark:bg-indigo-400 hover:bg-indigo-700 dark:hover:bg-indigo-300 focus:outline-none dark:text-black text-base tracking-wide text-center block w-full mb-4",onClick:t[8]||(t[8]=n=>o(b).rerun((e._.provides[v]||e.$route).params.id))}," Rerun "),u("button",{class:"btn-secondary text-center block w-full mb-4",onClick:t[9]||(t[9]=n=>o(b).newBacktest((e._.provides[v]||e.$route).params.id))}," New backtest ")])):(i(),d("div",Me,[a(R,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:t[10]||(t[10]=n=>T((e._.provides[v]||e.$route).params.id))}),a(R,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-plus",size:"xl",variant:"solid",label:"Start in a new tab",trailing:!1,onClick:t[11]||(t[11]=n=>V((e._.provides[v]||e.$route).params.id))})]))]))]),_:1}))}}}),Ue={class:"w-full"},Le=M({__name:"[id]",setup(x){ge({title:"Candles - Jesse"});const l=C(),c=k(()=>l.tabs),p=ae(),g=k(()=>p.params.id),f=k(()=>{if(!c.value[g.value]){const b=Object.keys(c.value);if(b.length>0){const s=c.value[b[0]];return le().push(`/candles/${s.id}`),s}else C().addTab()}return c.value[g.value]});return(b,s)=>{const r=xe,y=Ne;return i(),d(D,null,[u("div",Ue,[a(r,{"page-id":o(g),tabs:o(c),onClose:o(l).closeTab},null,8,["page-id","tabs","onClose"])]),o(f)?(i(),L(y,{key:0,form:o(f).form,results:o(f).results},null,8,["form","results"])):h("",!0)],64)}}});export{Le as default}; diff --git a/jesse/static/_nuxt/D270KAH9.js b/jesse/static/_nuxt/D3WWa22M.js similarity index 81% rename from jesse/static/_nuxt/D270KAH9.js rename to jesse/static/_nuxt/D3WWa22M.js index 96a5d0d86..ef82eb069 100644 --- a/jesse/static/_nuxt/D270KAH9.js +++ b/jesse/static/_nuxt/D3WWa22M.js @@ -1 +1 @@ -import{o as e,c as o,a as r}from"./Crvr41uX.js";function s(t,n){return e(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}export{s as r}; +import{o as e,c as o,a as r}from"./iedVCmkz.js";function s(t,n){return e(),o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}export{s as r}; diff --git a/jesse/static/_nuxt/DERVWgPS.js b/jesse/static/_nuxt/DERVWgPS.js new file mode 100644 index 000000000..401282bc2 --- /dev/null +++ b/jesse/static/_nuxt/DERVWgPS.js @@ -0,0 +1 @@ +import{o as n,c as f,a as l,g as N,h as ye,r as w,F,i as ne,j as Pe,b as o,w as $,t as O,n as le,k as r,l as Ie,v as Ue,m as je,ah as q,P as Z,V as B,e as Ae,x as _,R as M,M as V,d as he,a5 as Me,Z as Re,ab as _e,ai as Oe,X as ae,ac as Be,_ as Ne,C as ze,D as me,H as De,I as Fe,J as qe,K as He,N as We,s as Ye,a3 as Ze,y as X,z as Je,A as Qe,ad as fe,O as x,U as D,S as pe,T as ee,W as Ge,a7 as Ke,Y as Xe,$ as et,a1 as tt}from"./iedVCmkz.js";import{r as st}from"./D3WWa22M.js";import{b as ke,_ as ot,a as rt}from"./BxVo_4D-.js";import{_ as lt}from"./DddLSi-Q.js";import{r as ge,_ as nt,a as at,d as it,b as ut}from"./DU23lKGZ.js";import{_ as dt}from"./DRlj9p5R.js";import{a as ct,T as mt,_ as ft}from"./nKv1GnPl.js";import{u as pt}from"./C7X-_NHR.js";function ve(C,t){return n(),f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"})])}function gt(C,t){return n(),f("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 6.878V6a2.25 2.25 0 0 1 2.25-2.25h7.5A2.25 2.25 0 0 1 18 6v.878m-12 0c.235-.083.487-.128.75-.128h10.5c.263 0 .515.045.75.128m-12 0A2.25 2.25 0 0 0 4.5 9v.878m13.5-3A2.25 2.25 0 0 1 19.5 9v.878m0 0a2.246 2.246 0 0 0-.75-.128H5.25c-.263 0-.515.045-.75.128m15 0A2.25 2.25 0 0 1 21 12v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6c0-.98.626-1.813 1.5-2.122"})])}const vt={base:"animate-pulse",background:"bg-gray-100 dark:bg-gray-800",rounded:"rounded-md"},bt={class:"mb-4"},yt={class:"hidden sm:block"},ht={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"Tabs"},_t=["onMouseup"],kt=["onClick"],xt={class:"absolute right-[1em] focus:outline-none"},$t=l("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),wt=N({__name:"LiveTabs",props:{tabs:{}},emits:["close"],setup(C,{emit:t}){const b=ye(),p=w(b.params.id),a=t;function m(){if(Object.keys(q().tabs).length>=Z().planLimits.live_trading_tabs){B("error",`You have reached the limit of "${Z().planLimits.live_trading_tabs}" tabs for your "${Z().plan}" plan. Please upgrade your plan to add more tabs.`);return}q().addTab()}function v(i){if(!i.form.routes.length)return"New Tab";if(i.results.exception.error&&i.results.monitoring)return"Error";const d=i.form.routes[0];let c="";const y=i.form.exchange;return y&&(c+=`${y} • `),d.strategy&&(c+=`${d.strategy} • `),d.symbol&&(c+=`${d.symbol} • `),d.timeframe&&(c+=`${d.timeframe}`),c=c.endsWith(" • ")?c.slice(0,-3):c,i.results.monitoring&&!i.results.finished?`🟢 ${c}`:i.results.exception.error&&i.results.monitoring?`🔴 ${c}`:i.results.showResults?`${c} | Results`:c}return(i,d)=>{const c=Ae;return n(),f("div",bt,[l("div",yt,[l("nav",ht,[(n(!0),f(F,null,ne(i.tabs,y=>(n(),f("div",{key:y.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:Pe(U=>a("close",y.id),["middle"])},[o(c,{to:`/live/${y.id}`,class:le([y.id===r(p)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:$(()=>[l("span",null,O(v(y)),1),l("span",{"aria-hidden":"true",class:le([y.id===r(p)&&Object.keys(i.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),Ie(l("button",{class:"absolute right-[1em] focus:outline-none",onClick:U=>a("close",y.id)},[o(r(je),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,kt),[[Ue,Object.keys(i.tabs).length>1&&(!y.results.monitoring||y.results.finished)]])],40,_t))),128)),l("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-gray-50 dark:hover:bg-gray-800 flex items-center justify-center",onClick:m},[l("button",xt,[o(r(st),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),$t])])])])}}}),Ct=N({__name:"LiveOrders",props:{orders:{}},setup(C){const t=C,b=_(()=>{if(!t.orders.length)return[];const p=[];for(let a=t.orders.length-1;a>=0;a--){const m=t.orders[a];p.push([{value:m.id.slice(-12),style:"text-xs",tooltip:m.id,tag:"code"},{value:M.timestampToTimeOnly(m.created_at),style:"text-xs",tooltip:M.timestampToTime(m.created_at)},{value:m.symbol,style:"text-xs"},{value:m.type,style:"text-xs"},{value:m.side,style:M.colorBasedOnSide(m.side)},{value:m.price,style:"text-xs"},{value:m.qty,style:M.colorBasedOnSide(m.side)},{value:m.status,style:"text-xs"}])}return p});return(p,a)=>{const m=ke,v=lt;return r(b).length?(n(),V(m,{key:0,data:r(b),"header-items":["ID","Created","Symbol","Type","Side","Price","QTY","Status"],header:""},null,8,["data"])):(n(),V(v,{key:1}))}}}),Tt=l("p",null," If you think something is wrong with your running live session, you can submit a report. By submitting this form, the logs of this session will be sent to Jesse's developers so we can see what's going on. ",-1),Vt=l("br",null,null,-1),Lt=l("p",null,[he("Your exchange API keys and strategies are safe and "),l("b",null,"are never sent to us.")],-1),St=l("br",null,null,-1),Et=l("br",null,null,-1),Pt=l("br",null,null,-1),It={class:"flex justify-end item-center"},Ut={class:"flex justify-end"},jt=N({__name:"ReportLiveSession",emits:["close"],setup(C,{emit:t}){const b=t,p=w(!1),a=w({description:"",email:""}),m=()=>{b("close")},v=async()=>{p.value=!0;const{data:i,error:d}=await Me("/report-exception",{description:a.value.description,email:a.value.email,traceback:"manual report",mode:"live",attach_logs:!0,session_id:props.sessionId},!0);if(p.value=!1,d.value&&d.value.statusCode!==200){B("error",`[${d.value.statusCode}]: ${d.value.statusText}`);return}const c=i.value;c.status==="success"?(a.value.description="",a.value.email="",B("success",c.message),m()):c.status==="error"&&B("error",c.message)};return(i,d)=>{const c=Re,y=_e,U=Oe,j=ae,k=Be;return n(),f(F,null,[Tt,Vt,Lt,St,o(k,{state:r(a),class:"space-y-4",onSubmit:v},{default:$(()=>[o(y,{label:"Email (optional)",help:"Enter your email address for us to know who sent the email and possibly reply back to you."},{default:$(()=>[o(c,{modelValue:r(a).email,"onUpdate:modelValue":d[0]||(d[0]=L=>r(a).email=L),placeholder:"Email address...",type:"email"},null,8,["modelValue"])]),_:1}),Et,o(y,{label:"Description (optional):",name:"Description"},{default:$(()=>[o(U,{modelValue:r(a).description,"onUpdate:modelValue":d[1]||(d[1]=L=>r(a).description=L),rows:10,placeholder:"Describe what you think is wrong in this session..."},null,8,["modelValue"])]),_:1}),Pt,l("div",It,[l("div",Ut,[o(j,{color:"gray",variant:"link",class:"mr-8",label:"Cancel",onClick:d[2]||(d[2]=L=>m())}),o(j,{type:"submit",class:"w-48 flex justify-center",label:"Submit",loading:r(p),disabled:r(p)},null,8,["loading","disabled"])])])]),_:1},8,["state"])],64)}}}),At=ze(me.ui.strategy,me.ui.skeleton,vt),Mt=N({inheritAttrs:!1,props:{class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(C){const{ui:t,attrs:b}=De("skeleton",Fe(C,"ui"),At),p=_(()=>qe(He(t.value.base,t.value.background,t.value.rounded),C.class));return{ui:t,attrs:b,skeletonClass:p}}});function Rt(C,t,b,p,a,m){return n(),f("div",We({class:C.skeletonClass},C.attrs),null,16)}const Ot=Ne(Mt,[["render",Rt]]),be={width:800,height:380,crosshair:{mode:ct.Normal}},Bt={chart:{layout:{background:{color:"#ffffff"},textColor:"rgba(33, 56, 77, 1)"},grid:{vertLines:{color:"#f1f1f1",visible:!1},horzLines:{color:"#f1f1f1",visible:!1}},priceScale:{borderColor:"rgba(197, 203, 206, 0.6)"},timeScale:{borderColor:"rgba(197, 203, 206, 0.6)",timeVisible:!0,secondsVisible:!1}},series:{color:"#4f46e5"}},Nt={chart:{layout:{background:{color:"#333333"},textColor:"#D1D5DB"},grid:{vertLines:{color:"#525252",visible:!1},horzLines:{color:"#525252",visible:!1}},priceScale:{borderColor:"#525252"},timeScale:{borderColor:"#525252",timeVisible:!0,secondsVisible:!1}},series:{color:"#818CF8"}},zt={class:"mb-16"},Dt={key:0,class:"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600 p-4"},Ft={key:1},qt=N({__name:"CandlesChart",props:{form:{},results:{}},setup(C){const t=Ye(),b=_(()=>Ze().params.id),p=w(!0),a=C,m=w();let v=null,i=null;const d={orderEntries:{},positionEntry:null},c=_(()=>t.value),y=a.form.exchange,U=_(()=>`${y}-${a.results.selectedRoute.symbol}-${a.results.selectedRoute.timeframe}`),j=_(()=>a.results.currentCandles),k=_(()=>{const g=a.results.positions.find(h=>h[0].value===a.results.selectedRoute.symbol);return g===void 0?[]:g}),L=_(()=>k.value[2].value),R=_(()=>Number(k.value[1].value)>0?"long":Number(k.value[1].value)<0?"short":"close");X(j,(g,h)=>{i!==null&&te(g[U.value])}),X(c,g=>{K(g)}),X(L,(g,h)=>{i!==null&&g!==h&&Q()}),X(()=>a.results.orders,()=>{i!==null&&G()},{deep:!0}),Je(async()=>{setTimeout(async()=>{await z()},200)});async function z(){p.value=!0,await q().fetchCandles(b.value),p.value=!1,be.width=m.value.clientWidth,v=mt(m.value,be),v.applyOptions({watermark:{visible:!0,fontSize:16,horzAlign:"left",vertAlign:"bottom",color:"#888",text:`${a.results.selectedRoute.symbol} • ${a.results.selectedRoute.timeframe}`}}),i=v.addCandlestickSeries(),i.setData(a.results.candles),v.timeScale().fitContent(),Q(),G(),K(c.value)}Qe(()=>{J()});function J(){v!==null&&(v.remove(),v=null),i&&(i=null)}function Q(){const g=R.value==="long"?"#00AB5C":"#FF497D";if(d.positionEntry&&i.removePriceLine(d.positionEntry),Number(L.value)>0){const h={price:Number(L.value),color:g,lineWidth:1,lineStyle:0,axisLabelVisible:!0,title:"Entry Price"};d.positionEntry=i.createPriceLine(h)}}function G(){const g=k.value[0].value;for(const h in d.orderEntries)i.removePriceLine(d.orderEntries[h]),delete d.orderEntries[h];a.results.orders.forEach(h=>{const S=h.side==="buy"?"#00AB5C":"#FF497D",H=fe.startCase(fe.lowerCase(`${h.side} ${h.type}`));if((h.status==="ACTIVE"||h.status==="QUEUED")&&h.symbol===g){const A={price:Number(h.price),color:S,lineWidth:1,lineStyle:0,axisLabelVisible:!0,title:H};d.orderEntries[h.id]=i.createPriceLine(A)}})}function te(g){if(g===void 0)throw new TypeError("candle is undefined!");a.results.candles.length===0||a.results.candles[a.results.candles.length-1].time>g.time||i.update(g)}function K(g){v!==null&&v.applyOptions(g==="light"?Bt.chart:Nt.chart)}function se(g){a.results.selectedRoute=g,J(),z()}return(g,h)=>{const S=Ot,H=ae;return n(),f("div",zt,[r(p)?(n(),f("div",Dt,[o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-2/3 mb-4"}),o(S,{class:"h-4 w-1/2 mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-2/3 mb-4"}),o(S,{class:"h-4 w-full mb-4"}),o(S,{class:"h-4 w-full"})])):x("",!0),l("div",{ref_key:"chartContainer",ref:m,class:le({"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600":!r(p)})},null,2),a.form.routes.length>1?(n(),f("div",Ft,[(n(!0),f(F,null,ne(a.form.routes,A=>(n(),V(H,{key:A.symbol,variant:"soft",color:"gray",disabled:g.results.selectedRoute.symbol===A.symbol&&g.results.selectedRoute.timeframe===A.timeframe,class:"mt-2 mr-2",onClick:ie=>se(A)},{default:$(()=>[he(O(A.symbol)+" • "+O(A.timeframe),1)]),_:2},1032,["disabled","onClick"]))),128))])):x("",!0)])}}}),Ht={key:0,class:"flex flex-col items-center justify-center select-none mt-[10%]"},Wt=["textContent"],Yt={class:"mt-8"},Zt={key:1,class:"mx-auto container mt-8"},Jt={key:0,"data-cy":"live-page-content"},Qt={class:"flex justify-between items-center"},Gt=l("span",null," No exchange API keys found. Please add at least one: ",-1),Kt={class:"grid grid-cols-1 gap-6"},Xt={class:"flex justify-between items-center"},es=l("span",null," No notification API keys found. Please add at least one: ",-1),ts={key:1},ss={key:0,class:"mb-8"},os=l("span",null,"More",-1),rs={key:0},ls={key:0,class:"mt-8 lg:mt-0"},ns={key:1,"data-cy":"live-action-button"},as={key:1,class:"my-8 border-2 dark:border-gray-600 rounded-full"},is={key:2,class:"bg-white dark:bg-gray-700 grid grid-cols-1 gap-6 border dark:border-gray-600 rounded py-4 px-6 select-none"},us={class:"text-sm font-medium text-gray-500 dark:text-gray-400 truncate"},ds={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},cs={class:"flex justify-between items-center"},ms={class:"flex justify-start items-center"},fs=l("span",null,"Info Logs:",-1),ps={class:"focus:outline-none flex justify-start items-center"},gs={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},vs={class:"flex justify-between items-center"},bs={class:"flex justify-start items-center"},ys=l("span",null,"Error Logs:",-1),hs={class:"focus:outline-none flex justify-start items-center"},_s={class:"text-sm font-semibold text-gray-900 dark:text-gray-100"},ks={key:3},xs=N({__name:"LiveTab",props:{form:{},results:{}},setup(C){const t=C,b=w([]),p=w(!1),a=w(!1),m=w(!1),v=w(!1),i=w(!1),d=w(!1),c=w(!1),y=w(!1),U=w(!1),j=w(!1),k=Z(),L=q(),R=w([]);async function z(){if(!t.form.paper_mode){const e=k.exchangeApiKeys.find(s=>s.id===t.form.exchange_api_key_id);e&&(t.form.exchange=e.exchange)}R.value=await Z().getExchangeSupportedSymbols(t.form.exchange);for(let e=0;e0)for(let e=0;e{const e=[{label:"Exchange",value:t.results.generalInfo.exchange},{label:"Current Time",value:M.timestampToTime(t.results.generalInfo.current_time)},{label:"Debug Mode",value:t.results.generalInfo.debug_mode},{label:"Paper Trade",value:t.results.generalInfo.paper_mode},{label:"PNL",value:`${t.results.generalInfo.pnl} (${t.results.generalInfo.pnl_perc}%)`},{label:"Started",value:M.timestampToTime(t.results.generalInfo.started_at)},{label:"Started/Current Balance",value:`${t.results.generalInfo.started_balance} / ${t.results.generalInfo.current_balance}`},{label:"Trades",value:`${t.results.generalInfo.count_trades}`}];return t.results.generalInfo.leverage_type!=="spot"&&(e.push({label:"Available Margin",value:`${t.results.generalInfo.available_margin}`}),e.push({label:"Leverage",value:`${t.results.generalInfo.leverage}x (${t.results.generalInfo.leverage_type})`})),e}),Q=_(()=>k.notificationApiKeys.map(e=>({label:`${e.name} - ${e.driver}`,value:e.id}))),G=_(()=>Math.round(t.results.progressbar.estimated_remaining_seconds)===0?"Please wait...":`${Math.round(t.results.progressbar.estimated_remaining_seconds)} seconds remaining...`),te=_(()=>{if(!t.results.orders)return[];const e=[],s=5,E=t.results.orders.length,P=E-s>=0?E-s:0;for(let W=E-1;W>=P;W--){const T=t.results.orders[W],I=T.status==="PARTIALLY FILLED"?`${T.filled_qty}/${T.qty}`:T.qty;e.push([{value:M.timestampToTimeOnly(T.created_at),style:"text-xs",tooltip:M.timestampToTime(T.created_at)},{value:T.symbol,style:"text-xs"},{value:T.type,style:"text-xs"},{value:T.side,style:M.colorBasedOnSide(T.side)},{value:T.price,style:"text-xs"},{value:I,style:M.colorBasedOnSide(T.side)},{value:T.status,style:"text-xs"}])}return e}),K=_(()=>{let e=[];const s=k.jesseSupportedTimeframes;return k.settings.live.generate_candles_from_1m||!t.form.exchange?e=s.map(E=>k.planLimits.timeframes.includes(E)?{label:E,value:E,disabled:!1}:{label:`${E} (Upgrade required)`,value:E,disabled:!0}):e=k.exchangeInfo[t.form.exchange].supported_timeframes.map(P=>k.planLimits.timeframes.includes(P)?{label:P,value:P,disabled:!1}:{label:`${P} (Upgrade required)`,value:P,disabled:!0}),e}),se=_(()=>k.liveTradingExchangeNames.map(e=>k.planLimits.exchanges.includes(e)?{label:e,value:e,disabled:!1}:{label:`${e} (Upgrade required)`,value:e,disabled:!0})),g=_(()=>k.exchangeApiKeys.map(e=>k.planLimits.exchanges.includes(e.exchange)?{label:`${e.exchange} - ${e.name}`,value:e.id,disabled:!1}:{label:`${e.exchange} - ${e.name} (Upgrade required)`,value:e.id,disabled:!0})),h=L.cancel,S=L.newLive;function H(e){if(b.value.length){for(let s=0;s{v.value=!1},3e3)}function xe(){m.value=!0,navigator.clipboard.writeText(t.results.errorLogs),B("success","Logs copied successfully"),i.value=!0,setTimeout(()=>{i.value=!1},3e3)}const ue=_(()=>["basic","pro","enterprise","lifetime"].includes(k.plan));return(e,s)=>{const E=Ct,P=Ge,W=jt,T=ot,I=ae,$e=Ke,we=nt,de=at,Y=Xe,oe=dt,Ce=rt,ce=et,Te=_e,Ve=qt,re=ke,Le=it,Se=ft,Ee=ut;return n(),f(F,null,[o(P,{modelValue:r(d),"onUpdate:modelValue":s[0]||(s[0]=u=>D(d)?d.value=u:null),size:"ultra",title:"Orders"},{default:$(()=>[o(E,{orders:e.results.orders},null,8,["orders"])]),_:1},8,["modelValue"]),o(P,{modelValue:r(c),"onUpdate:modelValue":s[2]||(s[2]=u=>D(c)?c.value=u:null),size:"small",title:"Report"},{default:$(()=>[o(W,{onClose:s[1]||(s[1]=u=>c.value=!1)})]),_:1},8,["modelValue"]),o(P,{modelValue:r(y),"onUpdate:modelValue":s[3]||(s[3]=u=>D(y)?y.value=u:null),title:"Info Logs"},{default:$(()=>[o(T,{logs:e.results.infoLogs},null,8,["logs"])]),buttons:$(()=>[l("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:ie},[r(v)?(n(),V(r(pe),{key:0,class:"h-6 w-6","aria-hidden":"true"})):x("",!0),!r(v)&&e.results.infoLogs.length!=0?(n(),V(r(ge),{key:1,class:"h-6 w-6","aria-hidden":"true"})):x("",!0)])]),_:1},8,["modelValue"]),o(P,{modelValue:r(U),"onUpdate:modelValue":s[4]||(s[4]=u=>D(U)?U.value=u:null),title:"Error Logs"},{default:$(()=>[o(T,{logs:e.results.errorLogs},null,8,["logs"])]),buttons:$(()=>[l("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:xe},[r(i)?(n(),V(r(pe),{key:0,class:"h-6 w-6","aria-hidden":"true"})):x("",!0),!r(i)&&e.results.errorLogs.length!=0?(n(),V(r(ge),{key:1,class:"h-6 w-6","aria-hidden":"true"})):x("",!0)])]),_:1},8,["modelValue"]),o($e,{modelValue:r(j),"onUpdate:modelValue":s[6]||(s[6]=u=>D(j)?j.value=u:null),title:"Termination Confirm",description:"Are you sure you want to terminate this session?",type:"info"},{default:$(()=>[o(I,{variant:"solid",color:"red",class:"flex justify-center",label:"Terminate",onClick:s[5]||(s[5]=u=>A((e._.provides[ee]||e.$route).params.id))})]),_:1},8,["modelValue"]),e.results.booting?(n(),f("div",Ht,[l("div",null,[o(we,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?x("",!0):(n(),f("h3",{key:0,class:"mt-8 animate-pulse",textContent:O(r(G))},null,8,Wt)),l("div",Yt,[e.form.debug_mode?(n(),V(I,{key:0,icon:"i-heroicons-clipboard-document-list",variant:"solid",label:"View Logs",size:"xl",class:"flex justify-center w-64",onClick:s[7]||(s[7]=u=>y.value=!0)})):x("",!0),o(I,{color:"gray",class:"w-64 flex justify-center mt-4",size:"xl",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},icon:"i-heroicons-no-symbol",variant:"solid",label:"Cancel",trailing:!1,onClick:s[8]||(s[8]=u=>r(h)((e._.provides[ee]||e.$route).params.id))})]),e.results.exception.error?(n(),f("div",Zt,[o(de,{modelValue:r(p),"onUpdate:modelValue":s[9]||(s[9]=u=>D(p)?p.value=u:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"live","debug-mode":e.form.debug_mode},null,8,["modelValue","title","content","debug-mode"])])):x("",!0)])):(n(),V(Ee,{key:1},{left:$(()=>[!e.results.booting&&!e.results.monitoring&&!e.results.showResults?(n(),f("div",Jt,[o(Y,{class:"mb-4",title:"Exchange"}),e.form.paper_mode?(n(),V(oe,{key:0,modelValue:e.form.exchange,"onUpdate:modelValue":s[10]||(s[10]=u=>e.form.exchange=u),placeholder:"Select an exchange...",searchable:"",options:r(se),"value-attribute":"value",size:"lg",class:"mt-2 mb-16",onChange:z},null,8,["modelValue","options"])):(n(),V(oe,{key:1,modelValue:e.form.exchange_api_key_id,"onUpdate:modelValue":s[11]||(s[11]=u=>e.form.exchange_api_key_id=u),placeholder:"Select an exchange...",searchable:"",options:r(g),"value-attribute":"value",size:"lg",class:"mt-2 mb-16",onChange:z},{empty:$(()=>[l("div",Qt,[Gt,o(I,{to:"/exchange-api-keys",icon:"i-heroicons-plus",type:"link",variant:"solid",size:"sm",label:"Add Exchange API Key"})])]),_:1},8,["modelValue","options"])),o(Ce,{"total-routes-error":r(b),form:e.form,results:e.results,mode:"live",symbols:r(R),timeframes:r(K)},null,8,["total-routes-error","form","results","symbols","timeframes"]),o(Y,{class:"mt-16 mb-4",title:"Options"}),l("div",Kt,[o(ce,{modelValue:e.form.debug_mode,"onUpdate:modelValue":s[12]||(s[12]=u=>e.form.debug_mode=u),title:"Debug Mode",description:"Logs more details, helpful for debugging."},null,8,["modelValue"]),o(ce,{modelValue:e.form.paper_mode,"onUpdate:modelValue":s[13]||(s[13]=u=>e.form.paper_mode=u),title:"Paper Trade",disabled:!r(ue),"disabled-guide":r(ue)?"":"Premium plan required",description:"Trade in real-time using actual exchange data with PAPER money."},null,8,["modelValue","disabled","disabled-guide"]),o(Te,{label:"Notifications:",help:"Select a notification driver to receive notifications"},{default:$(()=>[o(oe,{modelValue:e.form.notification_api_key_id,"onUpdate:modelValue":s[14]||(s[14]=u=>e.form.notification_api_key_id=u),placeholder:"Select a notification driver",size:"lg",options:r(Q),"value-attribute":"value"},{empty:$(()=>[l("div",Xt,[es,o(I,{to:"/notification-api-keys",icon:"i-heroicons-plus",type:"link",variant:"solid",size:"sm",label:"Add Notification API Key"})])]),_:1},8,["modelValue","options"])]),_:1})])])):x("",!0),e.results.monitoring?(n(),f("div",ts,[e.results.exception.error?(n(),f("div",ss,[o(de,{title:e.results.exception.error,content:e.results.exception.traceback,mode:"live","debug-mode":e.form.debug_mode},null,8,["title","content","debug-mode"])])):x("",!0),e.results.monitoring&&!e.results.finished&&!e.results.exception.error?(n(),V(Ve,{key:1,results:e.results,form:e.form,exchange:e.form.exchange},null,8,["results","form","exchange"])):x("",!0),o(Y,{class:"mb-4",title:"Routes"}),o(re,{data:e.results.routes,"header-items":["Symbol","Timeframe","Strategy"],header:""},null,8,["data"]),o(Y,{class:"mt-12 mb-4",title:"Positions"}),o(re,{data:e.results.positions,"header-items":["Symbol","QTY","Entry","Price","Liq Price","PNL"],header:""},null,8,["data"]),o(Le,{class:"mt-12 mb-4",title:"Orders"},{default:$(()=>[l("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-900 text-sm leading-5 font-medium rounded-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none",onClick:s[15]||(s[15]=u=>d.value=!0)},[o(r(gt),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),os])]),_:1}),o(re,{data:r(te),"header-items":["Created","Symbol","Type","Side","Price","QTY","Status"],header:""},null,8,["data"])])):x("",!0)]),right:$(()=>[e.results.booting?x("",!0):(n(),f("div",rs,[e.results.monitoring?(n(),f("div",ls,[e.results.finished?(n(),V(I,{key:0,class:"w-full flex justify-center",variant:"solid",icon:"i-heroicons-plus",size:"xl",label:"New session",onClick:s[16]||(s[16]=u=>r(S)((e._.provides[ee]||e.$route).params.id))})):(n(),V(I,{key:1,class:"w-full flex justify-center",variant:"solid",color:"gray",icon:"i-heroicons-no-symbol",size:"xl",label:e.results.terminating?"Terminating...":"Terminate",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},onClick:s[17]||(s[17]=u=>j.value=!0)},null,8,["label"])),e.results.monitoring||e.results.finished?(n(),V(I,{key:2,class:"w-full flex justify-center mt-4",variant:"solid",color:"gray",icon:"i-heroicons-flag",size:"xl",label:"Report",onClick:s[18]||(s[18]=u=>c.value=!0)})):x("",!0)])):(n(),f("div",ns,[o(I,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:s[19]||(s[19]=u=>H((e._.provides[ee]||e.$route).params.id))})]))])),e.results.monitoring?(n(),f("hr",as)):x("",!0),e.results.monitoring?(n(),f("dl",is,[(n(!0),f(F,null,ne(r(J),u=>(n(),f("div",{key:u.label,class:"flex justify-between items-center"},[l("div",us,O(u.label)+":",1),l("div",ds,O(u.value),1)]))),128)),l("div",cs,[l("div",ms,[l("button",{class:"text-sm font-medium text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 truncate flex items-center hover:underline cursor-pointer focus:outline-none",onClick:s[20]||(s[20]=u=>y.value=!0)},[fs,l("span",ps,[o(r(ve),{class:"w-6 h-6 ml-2"})])])]),l("div",gs,O(e.results.generalInfo.count_info_logs),1)]),l("div",vs,[l("div",bs,[l("button",{class:"text-sm font-medium text-gray-500 hover:text-gray-600 dark:text-gray-400 dark:hover:text-gray-300 truncate flex items-center hover:underline cursor-pointer focus:outline-none",onClick:s[21]||(s[21]=u=>U.value=!0)},[ys,l("span",hs,[o(r(ve),{class:"w-6 h-6 ml-2 cursor-pointer"})])])]),l("div",_s,O(e.results.generalInfo.count_error_logs),1)])])):x("",!0),e.results.monitoring&&e.results.watchlist.length?(n(),f("div",ks,[o(Y,{class:"mt-8 mb-4",title:"Watch List"}),o(Se,{data:e.results.watchlist},null,8,["data"])])):x("",!0)]),_:1}))],64)}}}),$s={class:"w-full"},Is=N({__name:"[id]",setup(C){pt({title:"Live/Paper trading - Jesse"});const t=q(),b=_(()=>t.tabs),p=ye(),a=_(()=>p.params.id),m=_(()=>{if(!b.value[a.value]){const v=Object.keys(b.value);if(v.length>0){const i=b.value[v[0]];return tt().push(`/live/${i.id}`),i}}return b.value[a.value]});return Object.keys(b.value).length===0&&q().addTab(),(v,i)=>{const d=wt,c=xs;return n(),f(F,null,[l("div",$s,[o(d,{tabs:b.value,onClose:r(t).closeTab},null,8,["tabs","onClose"])]),m.value?(n(),V(c,{key:0,form:m.value.form,results:m.value.results},null,8,["form","results"])):x("",!0)],64)}}});export{Is as default}; diff --git a/jesse/static/_nuxt/tIZ0BYDc.js b/jesse/static/_nuxt/DRlj9p5R.js similarity index 99% rename from jesse/static/_nuxt/tIZ0BYDc.js rename to jesse/static/_nuxt/DRlj9p5R.js index 39fad30f0..5ab471ada 100644 --- a/jesse/static/_nuxt/tIZ0BYDc.js +++ b/jesse/static/_nuxt/DRlj9p5R.js @@ -1,4 +1,4 @@ -import{x as R,k as Qe,ap as Ra,y as ie,aq as Pt,ar as Ea,g as te,r as z,as as Ut,at as U,au as B,av as st,a9 as Ta,aw as P,ax as N,ay as Kt,az as ct,aA as Yt,aB as me,z as xe,aC as Me,aD as Xt,aE as Gt,aF as Qt,aG as Jt,aH as ue,aI as _e,F as vt,aJ as Se,aK as Zt,aL as Aa,aM as Re,am as Ee,aN as _t,aO as Pa,aP as ft,A as ea,aQ as W,aR as ta,aS as ka,aT as aa,aU as V,aV as kt,aW as Dt,aX as Da,aY as Ba,aZ as Va,a_ as La,a$ as Bt,_ as za,C as na,D as ye,E as oa,G as ia,H as Vt,I as it,b0 as $a,b1 as ja,b2 as Fa,J as Na,K as Ve,b3 as Ha,b4 as qa,b5 as Wa,b6 as Ua,o as F,M as ve,w as Ce,c as Q,n as j,O as re,ag as Le,L as fe,a as pe,N as lt,b as Ye,t as ze,b7 as Ka,i as Ya,B as Xa,d as Lt,b8 as Ga,b9 as Qa,ba as Ja,bb as Za}from"./Crvr41uX.js";function $e(e,a,t){let o=t.initialDeps??[],n;return()=>{var r,i,l,s;let v;t.key&&((r=t.debug)!=null&&r.call(t))&&(v=Date.now());const u=e();if(!(u.length!==o.length||u.some((O,x)=>o[x]!==O)))return n;o=u;let f;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(f=Date.now()),n=a(...u),t.key&&((l=t.debug)!=null&&l.call(t))){const O=Math.round((Date.now()-v)*100)/100,x=Math.round((Date.now()-f)*100)/100,S=x/16,C=(g,I)=>{for(g=String(g);g.length{var r,i,l,s;let v;t.key&&((r=t.debug)!=null&&r.call(t))&&(v=Date.now());const u=e();if(!(u.length!==o.length||u.some((O,x)=>o[x]!==O)))return n;o=u;let f;if(t.key&&((i=t.debug)!=null&&i.call(t))&&(f=Date.now()),n=a(...u),t.key&&((l=t.debug)!=null&&l.call(t))){const O=Math.round((Date.now()-v)*100)/100,x=Math.round((Date.now()-f)*100)/100,S=x/16,C=(g,I)=>{for(g=String(g);g.lengthMath.abs(e-a)<1,en=(e,a)=>{let t;return function(...o){clearTimeout(t),t=setTimeout(()=>e.apply(this,o),a)}},tn=e=>e,an=e=>{const a=Math.max(e.startIndex-e.overscan,0),t=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let n=a;n<=t;n++)o.push(n);return o},nn=(e,a)=>{const t=e.scrollElement;if(!t)return;const o=r=>{const{width:i,height:l}=r;a({width:Math.round(i),height:Math.round(l)})};if(o(t.getBoundingClientRect()),typeof ResizeObserver>"u")return()=>{};const n=new ResizeObserver(r=>{const i=r[0];if(i!=null&&i.borderBoxSize){const l=i.borderBoxSize[0];if(l){o({width:l.inlineSize,height:l.blockSize});return}}o(t.getBoundingClientRect())});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},zt={passive:!0},on=typeof window>"u"?!0:"onscrollend"in window,ln=(e,a)=>{const t=e.scrollElement;if(!t)return;let o=0;const n=on?()=>{}:en(()=>{a(o,!1)},150),r=s=>()=>{o=t[e.options.horizontal?"scrollLeft":"scrollTop"],n(),a(o,s)},i=r(!0),l=r(!1);return l(),t.addEventListener("scroll",i,zt),t.addEventListener("scrollend",l,zt),()=>{t.removeEventListener("scroll",i),t.removeEventListener("scrollend",l)}},rn=(e,a,t)=>{if(a!=null&&a.borderBoxSize){const o=a.borderBoxSize[0];if(o)return Math.round(o[t.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[t.options.horizontal?"width":"height"])},sn=(e,{adjustments:a=0,behavior:t},o)=>{var n,r;const i=e+a;(r=(n=o.scrollElement)==null?void 0:n.scrollTo)==null||r.call(n,{[o.options.horizontal?"left":"top"]:i,behavior:t})};class un{constructor(a){this.unsubs=[],this.scrollElement=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let t=null;const o=()=>t||(typeof ResizeObserver<"u"?t=new ResizeObserver(n=>{n.forEach(r=>{this._measureElement(r.target,r)})}):null);return{disconnect:()=>{var n;return(n=o())==null?void 0:n.disconnect()},observe:n=>{var r;return(r=o())==null?void 0:r.observe(n,{box:"border-box"})},unobserve:n=>{var r;return(r=o())==null?void 0:r.unobserve(n)}}})(),this.range=null,this.setOptions=t=>{Object.entries(t).forEach(([o,n])=>{typeof n>"u"&&delete t[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tn,rangeExtractor:an,onChange:()=>{},measureElement:rn,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,...t}},this.notify=(t,o)=>{var n,r;const{startIndex:i,endIndex:l}=this.range??{startIndex:void 0,endIndex:void 0},s=this.calculateRange();(t||i!==(s==null?void 0:s.startIndex)||l!==(s==null?void 0:s.endIndex))&&((r=(n=this.options).onChange)==null||r.call(n,this,o))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{const t=this.options.getScrollElement();this.scrollElement!==t&&(this.cleanup(),this.scrollElement=t,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(o,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.scrollOffsetthis.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=$e(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(t,o,n,r)=>(this.pendingMeasuredCacheIndexes=[],{count:t,paddingStart:o,scrollMargin:n,getItemKey:r}),{key:!1}),this.getFurthestMeasurement=(t,o)=>{const n=new Map,r=new Map;for(let i=o-1;i>=0;i--){const l=t[i];if(n.has(l.lane))continue;const s=r.get(l.lane);if(s==null||l.end>s.end?r.set(l.lane,l):l.endi.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurements=$e(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:t,paddingStart:o,scrollMargin:n,getItemKey:r},i)=>{const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const s=this.measurementsCache.slice(0,l);for(let v=l;vthis.options.debug}),this.calculateRange=$e(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(t,o,n)=>this.range=t.length>0&&o>0?dn({measurements:t,outerSize:o,scrollOffset:n}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=$e(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(t,o,n,r)=>o===null?[]:t({startIndex:o.startIndex,endIndex:o.endIndex,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const o=this.options.indexAttribute,n=t.getAttribute(o);return n?parseInt(n,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(t,o)=>{const n=this.measurementsCache[this.indexFromElement(t)];if(!n||!t.isConnected){this.measureElementCache.forEach((l,s)=>{l===t&&(this.observer.unobserve(t),this.measureElementCache.delete(s))});return}const r=this.measureElementCache.get(n.key);r!==t&&(r&&this.observer.unobserve(r),this.observer.observe(t),this.measureElementCache.set(n.key,t));const i=this.options.measureElement(t,o,this);this.resizeItem(n,i)},this.resizeItem=(t,o)=>{const n=this.itemSizeCache.get(t.key)??t.size,r=o-n;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,r,this):t.start{t&&this._measureElement(t,void 0)},this.getVirtualItems=$e(()=>[this.getIndexes(),this.getMeasurements()],(t,o)=>{const n=[];for(let r=0,i=t.length;rthis.options.debug}),this.getVirtualItemForOffset=t=>{const o=this.getMeasurements();return rt(o[la(0,o.length-1,n=>rt(o[n]).start,t)])},this.getOffsetForAlignment=(t,o)=>{const n=this.getSize();o==="auto"&&(t<=this.scrollOffset?o="start":t>=this.scrollOffset+n?o="end":o="start"),o==="start"?t=t:o==="end"?t=t-n:o==="center"&&(t=t-n/2);const r=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[r]:this.scrollElement[r]:0)-this.getSize();return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,o="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const n=rt(this.getMeasurements()[t]);if(o==="auto")if(n.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)o="end";else if(n.start<=this.scrollOffset+this.options.scrollPaddingStart)o="start";else return[this.scrollOffset,o];const r=o==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,o),o]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&(clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(t,{align:o="start",behavior:n}={})=>{this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(t,o),{adjustments:void 0,behavior:n})},this.scrollToIndex=(t,{align:o="auto",behavior:n}={})=>{t=Math.max(0,Math.min(t,this.options.count-1)),this.cancelScrollToIndex(),n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[r,i]=this.getOffsetForIndex(t,o);this._scrollToOffset(r,{adjustments:void 0,behavior:n}),n!=="smooth"&&this.isDynamicMode()&&(this.scrollToIndexTimeoutId=setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(t))){const[s]=this.getOffsetForIndex(t,i);_a(s,this.scrollOffset)||this.scrollToIndex(t,{align:i,behavior:n})}else this.scrollToIndex(t,{align:i,behavior:n})}))},this.scrollBy=(t,{behavior:o}={})=>{this.cancelScrollToIndex(),o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+t,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var t;const o=this.getMeasurements();let n;return o.length===0?n=this.options.paddingStart:n=this.options.lanes===1?((t=o[o.length-1])==null?void 0:t.end)??0:Math.max(...o.slice(-this.options.lanes).map(r=>r.end)),n-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(t,{adjustments:o,behavior:n})=>{this.options.scrollToFn(t,{behavior:n,adjustments:o},this)},this.measure=()=>{var t,o;this.itemSizeCache=new Map,(o=(t=this.options).onChange)==null||o.call(t,this,!1)},this.setOptions(a),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(t=>{this.itemSizeCache.set(t.key,t.size)}),this.notify(!1,!1)}}const la=(e,a,t,o)=>{for(;e<=a;){const n=(e+a)/2|0,r=t(n);if(ro)a=n-1;else return n}return e>0?e-1:0};function dn({measurements:e,outerSize:a,scrollOffset:t}){const o=e.length-1,r=la(0,o,l=>e[l].start,t);let i=r;for(;iQe(e).getScrollElement(),n=>{n&&a._willUpdate()},{immediate:!0}),ie(()=>Qe(e),n=>{a.setOptions({...n,onChange:(r,i)=>{var l;Pt(t),(l=n.onChange)==null||l.call(n,r,i)}}),a._willUpdate(),Pt(t)},{immediate:!0}),Ea(o),t}function vn(e){return cn(R(()=>({observeElementRect:nn,observeElementOffset:ln,scrollToFn:sn,...Qe(e)})))}var fn={};function pn(e,a){return e===a}var mn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mn||{}),hn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(hn||{}),bn=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(bn||{});let ra=Symbol("ComboboxContext");function De(e){let a=ft(ra,null);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,De),t}return a}let sa=Symbol("VirtualContext"),gn=te({name:"VirtualProvider",setup(e,{slots:a}){let t=De("VirtualProvider"),o=R(()=>{let l=P(t.optionsRef);if(!l)return{start:0,end:0};let s=window.getComputedStyle(l);return{start:parseFloat(s.paddingBlockStart||s.paddingTop),end:parseFloat(s.paddingBlockEnd||s.paddingBottom)}}),n=vn(R(()=>({scrollPaddingStart:o.value.start,scrollPaddingEnd:o.value.end,count:t.virtual.value.options.length,estimateSize(){return 40},getScrollElement(){return P(t.optionsRef)},overscan:12}))),r=R(()=>{var l;return(l=t.virtual.value)==null?void 0:l.options}),i=z(0);return ie([r],()=>{i.value+=1}),ct(sa,t.virtual.value?n:null),()=>[Me("div",{style:{position:"relative",width:"100%",height:`${n.value.getTotalSize()}px`},ref:l=>{if(l){if(typeof process<"u"&&fn.JEST_WORKER_ID!==void 0||t.activationTrigger.value===0)return;t.activeOptionIndex.value!==null&&t.virtual.value.options.length>t.activeOptionIndex.value&&n.value.scrollToIndex(t.activeOptionIndex.value)}}},n.value.getVirtualItems().map(l=>ka(a.default({option:t.virtual.value.options[l.index],open:t.comboboxState.value===0})[0],{key:`${i.value}-${l.index}`,"data-index":l.index,"aria-setsize":t.virtual.value.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}})))]}}),yn=te({name:"Combobox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],nullable:!0,default:null},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},nullable:{type:Boolean,default:!1},multiple:{type:[Boolean],default:!1},immediate:{type:[Boolean],default:!1},virtual:{type:Object,default:null}},inheritAttrs:!1,setup(e,{slots:a,attrs:t,emit:o}){let n=z(1),r=z(null),i=z(null),l=z(null),s=z(null),v=z({static:!1,hold:!1}),u=z([]),c=z(null),f=z(2),O=z(!1);function x(h=w=>w){let w=c.value!==null?u.value[c.value]:null,T=h(u.value.slice()),E=T.length>0&&T[0].dataRef.order.value!==null?T.sort((D,L)=>D.dataRef.order.value-L.dataRef.order.value):aa(T,D=>P(D.dataRef.domRef)),k=w?E.indexOf(w):null;return k===-1&&(k=null),{options:E,activeOptionIndex:k}}let S=R(()=>e.multiple?1:0),C=R(()=>e.nullable),[g,I]=Ut(R(()=>e.modelValue),h=>o("update:modelValue",h),R(()=>e.defaultValue)),p=R(()=>g.value===void 0?U(S.value,{1:[],0:void 0}):g.value),d=null,b=null;function y(h){return U(S.value,{0(){return I==null?void 0:I(h)},1:()=>{let w=N(m.value.value).slice(),T=N(h),E=w.findIndex(k=>m.compare(T,N(k)));return E===-1?w.push(T):w.splice(E,1),I==null?void 0:I(w)}})}let M=R(()=>{});ie([M],([h],[w])=>{if(m.virtual.value&&h&&w&&c.value!==null){let T=h.indexOf(w[c.value]);T!==-1?c.value=T:c.value=null}});let m={comboboxState:n,value:p,mode:S,compare(h,w){if(typeof e.by=="string"){let T=e.by;return(h==null?void 0:h[T])===(w==null?void 0:w[T])}return e.by===null?pn(h,w):e.by(h,w)},calculateIndex(h){return m.virtual.value?e.by===null?m.virtual.value.options.indexOf(h):m.virtual.value.options.findIndex(w=>m.compare(w,h)):u.value.findIndex(w=>m.compare(w.dataRef.value,h))},defaultValue:R(()=>e.defaultValue),nullable:C,immediate:R(()=>!1),virtual:R(()=>null),inputRef:i,labelRef:r,buttonRef:l,optionsRef:s,disabled:R(()=>e.disabled),options:u,change(h){I(h)},activeOptionIndex:R(()=>{if(O.value&&c.value===null&&(m.virtual.value?m.virtual.value.options.length>0:u.value.length>0)){if(m.virtual.value){let w=m.virtual.value.options.findIndex(T=>{var E;return!((E=m.virtual.value)!=null&&E.disabled(T))});if(w!==-1)return w}let h=u.value.findIndex(w=>!w.dataRef.disabled);if(h!==-1)return h}return c.value}),activationTrigger:f,optionsPropsRef:v,closeCombobox(){O.value=!1,!e.disabled&&n.value!==1&&(n.value=1,c.value=null)},openCombobox(){if(O.value=!0,!e.disabled&&n.value!==0){if(m.value.value){let h=m.calculateIndex(m.value.value);h!==-1&&(c.value=h)}n.value=0}},setActivationTrigger(h){f.value=h},goToOption(h,w,T){O.value=!1,d!==null&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{if(e.disabled||s.value&&!v.value.static&&n.value===1)return;if(m.virtual.value){c.value=h===B.Specific?w:st({focus:h},{resolveItems:()=>m.virtual.value.options,resolveActiveIndex:()=>{var D,L;return(L=(D=m.activeOptionIndex.value)!=null?D:m.virtual.value.options.findIndex(H=>{var G;return!((G=m.virtual.value)!=null&&G.disabled(H))}))!=null?L:null},resolveDisabled:D=>m.virtual.value.disabled(D),resolveId(){throw new Error("Function not implemented.")}}),f.value=T??2;return}let E=x();if(E.activeOptionIndex===null){let D=E.options.findIndex(L=>!L.dataRef.disabled);D!==-1&&(E.activeOptionIndex=D)}let k=h===B.Specific?w:st({focus:h},{resolveItems:()=>E.options,resolveActiveIndex:()=>E.activeOptionIndex,resolveId:D=>D.id,resolveDisabled:D=>D.dataRef.disabled});c.value=k,f.value=T??2,u.value=E.options})},selectOption(h){let w=u.value.find(E=>E.id===h);if(!w)return;let{dataRef:T}=w;y(T.value)},selectActiveOption(){if(m.activeOptionIndex.value!==null){if(m.virtual.value)y(m.virtual.value.options[m.activeOptionIndex.value]);else{let{dataRef:h}=u.value[m.activeOptionIndex.value];y(h.value)}m.goToOption(B.Specific,m.activeOptionIndex.value)}},registerOption(h,w){let T=Ta({id:h,dataRef:w});if(m.virtual.value){u.value.push(T);return}b&&cancelAnimationFrame(b);let E=x(k=>(k.push(T),k));c.value===null&&m.isSelected(w.value.value)&&(E.activeOptionIndex=E.options.indexOf(T)),u.value=E.options,c.value=E.activeOptionIndex,f.value=2,E.options.some(k=>!P(k.dataRef.domRef))&&(b=requestAnimationFrame(()=>{let k=x();u.value=k.options,c.value=k.activeOptionIndex}))},unregisterOption(h,w){if(d!==null&&cancelAnimationFrame(d),w&&(O.value=!0),m.virtual.value){u.value=u.value.filter(E=>E.id!==h);return}let T=x(E=>{let k=E.findIndex(D=>D.id===h);return k!==-1&&E.splice(k,1),E});u.value=T.options,c.value=T.activeOptionIndex,f.value=2},isSelected(h){return U(S.value,{0:()=>m.compare(N(m.value.value),N(h)),1:()=>N(m.value.value).some(w=>m.compare(N(w),N(h)))})},isActive(h){return c.value===m.calculateIndex(h)}};Kt([i,l,s],()=>m.closeCombobox(),R(()=>n.value===0)),ct(ra,m),Yt(R(()=>U(n.value,{0:me.Open,1:me.Closed})));let A=R(()=>{var h;return(h=P(i))==null?void 0:h.closest("form")});return xe(()=>{ie([A],()=>{if(!A.value||e.defaultValue===void 0)return;function h(){m.change(e.defaultValue)}return A.value.addEventListener("reset",h),()=>{var w;(w=A.value)==null||w.removeEventListener("reset",h)}},{immediate:!0})}),()=>{var h,w,T;let{name:E,disabled:k,form:D,...L}=e,H={open:n.value===0,disabled:k,activeIndex:m.activeOptionIndex.value,activeOption:m.activeOptionIndex.value===null?null:m.virtual.value?m.virtual.value.options[(h=m.activeOptionIndex.value)!=null?h:0]:(T=(w=m.options.value[m.activeOptionIndex.value])==null?void 0:w.dataRef.value)!=null?T:null,value:p.value};return Me(vt,[...E!=null&&p.value!=null?Xt({[E]:p.value}).map(([G,Z])=>Me(Gt,Qt({features:Jt.Hidden,key:G,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:D,disabled:k,name:G,value:Z}))):[],ue({theirProps:{...t,..._e(L,["by","defaultValue","immediate","modelValue","multiple","nullable","onUpdate:modelValue","virtual"])},ourProps:{},slot:H,slots:a,attrs:t,name:"Combobox"})])}}}),On=te({name:"ComboboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-combobox-button-${Se()}`,i=De("ComboboxButton");o({el:i.buttonRef,$el:i.buttonRef});function l(u){i.disabled.value||(i.comboboxState.value===0?i.closeCombobox():(u.preventDefault(),i.openCombobox()),W(()=>{var c;return(c=P(i.inputRef))==null?void 0:c.focus({preventScroll:!0})}))}function s(u){switch(u.key){case V.ArrowDown:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&i.openCombobox(),W(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case V.ArrowUp:u.preventDefault(),u.stopPropagation(),i.comboboxState.value===1&&(i.openCombobox(),W(()=>{i.value.value||i.goToOption(B.Last)})),W(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return;case V.Escape:if(i.comboboxState.value!==0)return;u.preventDefault(),i.optionsRef.value&&!i.optionsPropsRef.value.static&&u.stopPropagation(),i.closeCombobox(),W(()=>{var c;return(c=i.inputRef.value)==null?void 0:c.focus({preventScroll:!0})});return}}let v=Zt(R(()=>({as:e.as,type:a.type})),i.buttonRef);return()=>{var u,c;let f={open:i.comboboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...O}=e,x={ref:i.buttonRef,id:r,type:v.value,tabindex:"-1","aria-haspopup":"listbox","aria-controls":(u=P(i.optionsRef))==null?void 0:u.id,"aria-expanded":i.comboboxState.value===0,"aria-labelledby":i.labelRef.value?[(c=P(i.labelRef))==null?void 0:c.id,r].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:s,onClick:l};return ue({ourProps:x,theirProps:O,slot:f,attrs:a,slots:t,name:"ComboboxButton"})}}}),xn=te({name:"ComboboxInput",props:{as:{type:[Object,String],default:"input"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},displayValue:{type:Function},defaultValue:{type:String,default:void 0},id:{type:String,default:null}},emits:{change:e=>!0},setup(e,{emit:a,attrs:t,slots:o,expose:n}){var r;let i=(r=e.id)!=null?r:`headlessui-combobox-input-${Se()}`,l=De("ComboboxInput"),s=R(()=>Aa(P(l.inputRef))),v={value:!1};n({el:l.inputRef,$el:l.inputRef});function u(){l.change(null);let d=P(l.optionsRef);d&&(d.scrollTop=0),l.goToOption(B.Nothing)}let c=R(()=>{var d;let b=l.value.value;return P(l.inputRef)?typeof e.displayValue<"u"&&b!==void 0?(d=e.displayValue(b))!=null?d:"":typeof b=="string"?b:"":""});xe(()=>{ie([c,l.comboboxState,s],([d,b],[y,M])=>{if(v.value)return;let m=P(l.inputRef);m&&((M===0&&b===1||d!==y)&&(m.value=d),requestAnimationFrame(()=>{var A;if(v.value||!m||((A=s.value)==null?void 0:A.activeElement)!==m)return;let{selectionStart:h,selectionEnd:w}=m;Math.abs((w??0)-(h??0))===0&&h===0&&m.setSelectionRange(m.value.length,m.value.length)}))},{immediate:!0}),ie([l.comboboxState],([d],[b])=>{if(d===0&&b===1){if(v.value)return;let y=P(l.inputRef);if(!y)return;let M=y.value,{selectionStart:m,selectionEnd:A,selectionDirection:h}=y;y.value="",y.value=M,h!==null?y.setSelectionRange(m,A,h):y.setSelectionRange(m,A)}})});let f=z(!1);function O(){f.value=!0}function x(){kt().nextFrame(()=>{f.value=!1})}function S(d){switch(v.value=!0,d.key){case V.Enter:if(v.value=!1,l.comboboxState.value!==0||f.value)return;if(d.preventDefault(),d.stopPropagation(),l.activeOptionIndex.value===null){l.closeCombobox();return}l.selectActiveOption(),l.mode.value===0&&l.closeCombobox();break;case V.ArrowDown:return v.value=!1,d.preventDefault(),d.stopPropagation(),U(l.comboboxState.value,{0:()=>l.goToOption(B.Next),1:()=>l.openCombobox()});case V.ArrowUp:return v.value=!1,d.preventDefault(),d.stopPropagation(),U(l.comboboxState.value,{0:()=>l.goToOption(B.Previous),1:()=>{l.openCombobox(),W(()=>{l.value.value||l.goToOption(B.Last)})}});case V.Home:if(d.shiftKey)break;return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.First);case V.PageUp:return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.First);case V.End:if(d.shiftKey)break;return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.Last);case V.PageDown:return v.value=!1,d.preventDefault(),d.stopPropagation(),l.goToOption(B.Last);case V.Escape:if(v.value=!1,l.comboboxState.value!==0)return;d.preventDefault(),l.optionsRef.value&&!l.optionsPropsRef.value.static&&d.stopPropagation(),l.nullable.value&&l.mode.value===0&&l.value.value===null&&u(),l.closeCombobox();break;case V.Tab:if(v.value=!1,l.comboboxState.value!==0)return;l.mode.value===0&&l.activationTrigger.value!==1&&l.selectActiveOption(),l.closeCombobox();break}}function C(d){a("change",d),l.nullable.value&&l.mode.value===0&&d.target.value===""&&u(),l.openCombobox()}function g(d){var b,y,M;let m=(b=d.relatedTarget)!=null?b:Dt.find(A=>A!==d.currentTarget);if(v.value=!1,!((y=P(l.optionsRef))!=null&&y.contains(m))&&!((M=P(l.buttonRef))!=null&&M.contains(m))&&l.comboboxState.value===0)return d.preventDefault(),l.mode.value===0&&(l.nullable.value&&l.value.value===null?u():l.activationTrigger.value!==1&&l.selectActiveOption()),l.closeCombobox()}function I(d){var b,y,M;let m=(b=d.relatedTarget)!=null?b:Dt.find(A=>A!==d.currentTarget);(y=P(l.buttonRef))!=null&&y.contains(m)||(M=P(l.optionsRef))!=null&&M.contains(m)||l.disabled.value||l.immediate.value&&l.comboboxState.value!==0&&(l.openCombobox(),kt().nextFrame(()=>{l.setActivationTrigger(1)}))}let p=R(()=>{var d,b,y,M;return(M=(y=(b=e.defaultValue)!=null?b:l.defaultValue.value!==void 0?(d=e.displayValue)==null?void 0:d.call(e,l.defaultValue.value):null)!=null?y:l.defaultValue.value)!=null?M:""});return()=>{var d,b,y,M,m,A,h;let w={open:l.comboboxState.value===0},{displayValue:T,onChange:E,...k}=e,D={"aria-controls":(d=l.optionsRef.value)==null?void 0:d.id,"aria-expanded":l.comboboxState.value===0,"aria-activedescendant":l.activeOptionIndex.value===null?void 0:l.virtual.value?(b=l.options.value.find(L=>!l.virtual.value.disabled(L.dataRef.value)&&l.compare(L.dataRef.value,l.virtual.value.options[l.activeOptionIndex.value])))==null?void 0:b.id:(y=l.options.value[l.activeOptionIndex.value])==null?void 0:y.id,"aria-labelledby":(A=(M=P(l.labelRef))==null?void 0:M.id)!=null?A:(m=P(l.buttonRef))==null?void 0:m.id,"aria-autocomplete":"list",id:i,onCompositionstart:O,onCompositionend:x,onKeydown:S,onInput:C,onFocus:I,onBlur:g,role:"combobox",type:(h=t.type)!=null?h:"text",tabIndex:0,ref:l.inputRef,defaultValue:p.value,disabled:l.disabled.value===!0?!0:void 0};return ue({ourProps:D,theirProps:k,slot:w,attrs:t,slots:o,features:Re.RenderStrategy|Re.Static,name:"ComboboxInput"})}}}),wn=te({name:"ComboboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},hold:{type:[Boolean],default:!1}},setup(e,{attrs:a,slots:t,expose:o}){let n=De("ComboboxOptions"),r=`headlessui-combobox-options-${Se()}`;o({el:n.optionsRef,$el:n.optionsRef}),Ee(()=>{n.optionsPropsRef.value.static=e.static}),Ee(()=>{n.optionsPropsRef.value.hold=e.hold});let i=_t(),l=R(()=>i!==null?(i.value&me.Open)===me.Open:n.comboboxState.value===0);return Pa({container:R(()=>P(n.optionsRef)),enabled:R(()=>n.comboboxState.value===0),accept(s){return s.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:s.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(s){s.setAttribute("role","none")}}),()=>{var s,v,u;let c={open:n.comboboxState.value===0},f={"aria-labelledby":(u=(s=P(n.labelRef))==null?void 0:s.id)!=null?u:(v=P(n.buttonRef))==null?void 0:v.id,id:r,ref:n.optionsRef,role:"listbox","aria-multiselectable":n.mode.value===1?!0:void 0},O=_e(e,["hold"]);return ue({ourProps:f,theirProps:O,slot:c,attrs:a,slots:n.virtual.value&&n.comboboxState.value===0?{...t,default:()=>[Me(gn,{},t.default)]}:t,features:Re.RenderStrategy|Re.Static,visible:l.value,name:"ComboboxOptions"})}}}),Sn=te({name:"ComboboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},order:{type:[Number],default:null}},setup(e,{slots:a,attrs:t,expose:o}){let n=De("ComboboxOption"),r=`headlessui-combobox-option-${Se()}`,i=z(null);o({el:i,$el:i});let l=R(()=>{var g;return n.virtual.value?n.activeOptionIndex.value===n.calculateIndex(e.value):n.activeOptionIndex.value===null?!1:((g=n.options.value[n.activeOptionIndex.value])==null?void 0:g.id)===r}),s=R(()=>n.isSelected(e.value)),v=ft(sa,null),u=R(()=>({disabled:e.disabled,value:e.value,domRef:i,order:R(()=>e.order)}));xe(()=>n.registerOption(r,u)),ea(()=>n.unregisterOption(r,l.value)),Ee(()=>{let g=P(i);g&&(v==null||v.value.measureElement(g))}),Ee(()=>{n.comboboxState.value===0&&l.value&&(n.virtual.value||n.activationTrigger.value!==0&&W(()=>{var g,I;return(I=(g=P(i))==null?void 0:g.scrollIntoView)==null?void 0:I.call(g,{block:"nearest"})}))});function c(g){var I;if(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value))return g.preventDefault();n.selectOption(r),Da()||requestAnimationFrame(()=>{var p;return(p=P(n.inputRef))==null?void 0:p.focus({preventScroll:!0})}),n.mode.value===0&&requestAnimationFrame(()=>n.closeCombobox())}function f(){var g;if(e.disabled||(g=n.virtual.value)!=null&&g.disabled(e.value))return n.goToOption(B.Nothing);let I=n.calculateIndex(e.value);n.goToOption(B.Specific,I)}let O=ta();function x(g){O.update(g)}function S(g){var I;if(!O.wasMoved(g)||e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||l.value)return;let p=n.calculateIndex(e.value);n.goToOption(B.Specific,p,0)}function C(g){var I;O.wasMoved(g)&&(e.disabled||(I=n.virtual.value)!=null&&I.disabled(e.value)||l.value&&(n.optionsPropsRef.value.hold||n.goToOption(B.Nothing)))}return()=>{let{disabled:g}=e,I={active:l.value,selected:s.value,disabled:g},p={id:r,ref:i,role:"option",tabIndex:g===!0?void 0:-1,"aria-disabled":g===!0?!0:void 0,"aria-selected":s.value,disabled:void 0,onClick:c,onFocus:f,onPointerenter:x,onMouseenter:x,onPointermove:S,onMousemove:S,onPointerleave:C,onMouseleave:C},d=_e(e,["order","value"]);return ue({ourProps:p,theirProps:d,slot:I,attrs:t,slots:a,name:"ComboboxOption"})}}});function In(e,a){return e===a}var Cn=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Cn||{}),Mn=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Mn||{}),Rn=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Rn||{});function En(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let ua=Symbol("ListboxContext");function et(e){let a=ft(ua,null);if(a===null){let t=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,et),t}return a}let Tn=te({name:"Listbox",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>In},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(e,{slots:a,attrs:t,emit:o}){let n=z(1),r=z(null),i=z(null),l=z(null),s=z([]),v=z(""),u=z(null),c=z(1);function f(p=d=>d){let d=u.value!==null?s.value[u.value]:null,b=aa(p(s.value.slice()),M=>P(M.dataRef.domRef)),y=d?b.indexOf(d):null;return y===-1&&(y=null),{options:b,activeOptionIndex:y}}let O=R(()=>e.multiple?1:0),[x,S]=Ut(R(()=>e.modelValue),p=>o("update:modelValue",p),R(()=>e.defaultValue)),C=R(()=>x.value===void 0?U(O.value,{1:[],0:void 0}):x.value),g={listboxState:n,value:C,mode:O,compare(p,d){if(typeof e.by=="string"){let b=e.by;return(p==null?void 0:p[b])===(d==null?void 0:d[b])}return e.by(p,d)},orientation:R(()=>e.horizontal?"horizontal":"vertical"),labelRef:r,buttonRef:i,optionsRef:l,disabled:R(()=>e.disabled),options:s,searchQuery:v,activeOptionIndex:u,activationTrigger:c,closeListbox(){e.disabled||n.value!==1&&(n.value=1,u.value=null)},openListbox(){e.disabled||n.value!==0&&(n.value=0)},goToOption(p,d,b){if(e.disabled||n.value===1)return;let y=f(),M=st(p===B.Specific?{focus:B.Specific,id:d}:{focus:p},{resolveItems:()=>y.options,resolveActiveIndex:()=>y.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.disabled});v.value="",u.value=M,c.value=b??1,s.value=y.options},search(p){if(e.disabled||n.value===1)return;let d=v.value!==""?0:1;v.value+=p.toLowerCase();let b=(u.value!==null?s.value.slice(u.value+d).concat(s.value.slice(0,u.value+d)):s.value).find(M=>M.dataRef.textValue.startsWith(v.value)&&!M.dataRef.disabled),y=b?s.value.indexOf(b):-1;y===-1||y===u.value||(u.value=y,c.value=1)},clearSearch(){e.disabled||n.value!==1&&v.value!==""&&(v.value="")},registerOption(p,d){let b=f(y=>[...y,{id:p,dataRef:d}]);s.value=b.options,u.value=b.activeOptionIndex},unregisterOption(p){let d=f(b=>{let y=b.findIndex(M=>M.id===p);return y!==-1&&b.splice(y,1),b});s.value=d.options,u.value=d.activeOptionIndex,c.value=1},theirOnChange(p){e.disabled||S(p)},select(p){e.disabled||S(U(O.value,{0:()=>p,1:()=>{let d=N(g.value.value).slice(),b=N(p),y=d.findIndex(M=>g.compare(b,N(M)));return y===-1?d.push(b):d.splice(y,1),d}}))}};Kt([i,l],(p,d)=>{var b;g.closeListbox(),Ba(d,Va.Loose)||(p.preventDefault(),(b=P(i))==null||b.focus())},R(()=>n.value===0)),ct(ua,g),Yt(R(()=>U(n.value,{0:me.Open,1:me.Closed})));let I=R(()=>{var p;return(p=P(i))==null?void 0:p.closest("form")});return xe(()=>{ie([I],()=>{if(!I.value||e.defaultValue===void 0)return;function p(){g.theirOnChange(e.defaultValue)}return I.value.addEventListener("reset",p),()=>{var d;(d=I.value)==null||d.removeEventListener("reset",p)}},{immediate:!0})}),()=>{let{name:p,modelValue:d,disabled:b,form:y,...M}=e,m={open:n.value===0,disabled:b,value:C.value};return Me(vt,[...p!=null&&C.value!=null?Xt({[p]:C.value}).map(([A,h])=>Me(Gt,Qt({features:Jt.Hidden,key:A,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:y,disabled:b,name:A,value:h}))):[],ue({ourProps:{},theirProps:{...t,..._e(M,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:m,slots:a,attrs:t,name:"Listbox"})])}}}),An=te({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-button-${Se()}`,i=et("ListboxButton");o({el:i.buttonRef,$el:i.buttonRef});function l(c){switch(c.key){case V.Space:case V.Enter:case V.ArrowDown:c.preventDefault(),i.openListbox(),W(()=>{var f;(f=P(i.optionsRef))==null||f.focus({preventScroll:!0}),i.value.value||i.goToOption(B.First)});break;case V.ArrowUp:c.preventDefault(),i.openListbox(),W(()=>{var f;(f=P(i.optionsRef))==null||f.focus({preventScroll:!0}),i.value.value||i.goToOption(B.Last)});break}}function s(c){switch(c.key){case V.Space:c.preventDefault();break}}function v(c){i.disabled.value||(i.listboxState.value===0?(i.closeListbox(),W(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})})):(c.preventDefault(),i.openListbox(),En(()=>{var f;return(f=P(i.optionsRef))==null?void 0:f.focus({preventScroll:!0})})))}let u=Zt(R(()=>({as:e.as,type:a.type})),i.buttonRef);return()=>{var c,f;let O={open:i.listboxState.value===0,disabled:i.disabled.value,value:i.value.value},{...x}=e,S={ref:i.buttonRef,id:r,type:u.value,"aria-haspopup":"listbox","aria-controls":(c=P(i.optionsRef))==null?void 0:c.id,"aria-expanded":i.listboxState.value===0,"aria-labelledby":i.labelRef.value?[(f=P(i.labelRef))==null?void 0:f.id,r].join(" "):void 0,disabled:i.disabled.value===!0?!0:void 0,onKeydown:l,onKeyup:s,onClick:v};return ue({ourProps:S,theirProps:x,slot:O,attrs:a,slots:t,name:"ListboxButton"})}}}),Pn=te({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:a,slots:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-options-${Se()}`,i=et("ListboxOptions"),l=z(null);o({el:i.optionsRef,$el:i.optionsRef});function s(c){switch(l.value&&clearTimeout(l.value),c.key){case V.Space:if(i.searchQuery.value!=="")return c.preventDefault(),c.stopPropagation(),i.search(c.key);case V.Enter:if(c.preventDefault(),c.stopPropagation(),i.activeOptionIndex.value!==null){let f=i.options.value[i.activeOptionIndex.value];i.select(f.dataRef.value)}i.mode.value===0&&(i.closeListbox(),W(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})}));break;case U(i.orientation.value,{vertical:V.ArrowDown,horizontal:V.ArrowRight}):return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Next);case U(i.orientation.value,{vertical:V.ArrowUp,horizontal:V.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Previous);case V.Home:case V.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(B.First);case V.End:case V.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(B.Last);case V.Escape:c.preventDefault(),c.stopPropagation(),i.closeListbox(),W(()=>{var f;return(f=P(i.buttonRef))==null?void 0:f.focus({preventScroll:!0})});break;case V.Tab:c.preventDefault(),c.stopPropagation();break;default:c.key.length===1&&(i.search(c.key),l.value=setTimeout(()=>i.clearSearch(),350));break}}let v=_t(),u=R(()=>v!==null?(v.value&me.Open)===me.Open:i.listboxState.value===0);return()=>{var c,f;let O={open:i.listboxState.value===0},{...x}=e,S={"aria-activedescendant":i.activeOptionIndex.value===null||(c=i.options.value[i.activeOptionIndex.value])==null?void 0:c.id,"aria-multiselectable":i.mode.value===1?!0:void 0,"aria-labelledby":(f=P(i.buttonRef))==null?void 0:f.id,"aria-orientation":i.orientation.value,id:r,onKeydown:s,role:"listbox",tabIndex:0,ref:i.optionsRef};return ue({ourProps:S,theirProps:x,slot:O,attrs:a,slots:t,features:Re.RenderStrategy|Re.Static,visible:u.value,name:"ListboxOptions"})}}}),kn=te({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:a,attrs:t,expose:o}){var n;let r=(n=e.id)!=null?n:`headlessui-listbox-option-${Se()}`,i=et("ListboxOption"),l=z(null);o({el:l,$el:l});let s=R(()=>i.activeOptionIndex.value!==null?i.options.value[i.activeOptionIndex.value].id===r:!1),v=R(()=>U(i.mode.value,{0:()=>i.compare(N(i.value.value),N(e.value)),1:()=>N(i.value.value).some(p=>i.compare(N(p),N(e.value)))})),u=R(()=>U(i.mode.value,{1:()=>{var p;let d=N(i.value.value);return((p=i.options.value.find(b=>d.some(y=>i.compare(N(y),N(b.dataRef.value)))))==null?void 0:p.id)===r},0:()=>v.value})),c=La(l),f=R(()=>({disabled:e.disabled,value:e.value,get textValue(){return c()},domRef:l}));xe(()=>i.registerOption(r,f)),ea(()=>i.unregisterOption(r)),xe(()=>{ie([i.listboxState,v],()=>{i.listboxState.value===0&&v.value&&U(i.mode.value,{1:()=>{u.value&&i.goToOption(B.Specific,r)},0:()=>{i.goToOption(B.Specific,r)}})},{immediate:!0})}),Ee(()=>{i.listboxState.value===0&&s.value&&i.activationTrigger.value!==0&&W(()=>{var p,d;return(d=(p=P(l))==null?void 0:p.scrollIntoView)==null?void 0:d.call(p,{block:"nearest"})})});function O(p){if(e.disabled)return p.preventDefault();i.select(e.value),i.mode.value===0&&(i.closeListbox(),W(()=>{var d;return(d=P(i.buttonRef))==null?void 0:d.focus({preventScroll:!0})}))}function x(){if(e.disabled)return i.goToOption(B.Nothing);i.goToOption(B.Specific,r)}let S=ta();function C(p){S.update(p)}function g(p){S.wasMoved(p)&&(e.disabled||s.value||i.goToOption(B.Specific,r,0))}function I(p){S.wasMoved(p)&&(e.disabled||s.value&&i.goToOption(B.Nothing))}return()=>{let{disabled:p}=e,d={active:s.value,selected:v.value,disabled:p},{value:b,disabled:y,...M}=e,m={id:r,ref:l,role:"option",tabIndex:p===!0?void 0:-1,"aria-disabled":p===!0?!0:void 0,"aria-selected":v.value,disabled:void 0,onClick:O,onFocus:x,onPointerenter:C,onMouseenter:C,onPointermove:g,onMousemove:g,onPointerleave:I,onMouseleave:I};return ue({ourProps:m,theirProps:M,slot:d,attrs:t,slots:a,name:"ListboxOption"})}}});function X(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var a=e.ownerDocument;return a&&a.defaultView||window}return e}function we(e){var a=X(e).Element;return e instanceof a||e instanceof Element}function J(e){var a=X(e).HTMLElement;return e instanceof a||e instanceof HTMLElement}function pt(e){if(typeof ShadowRoot>"u")return!1;var a=X(e).ShadowRoot;return e instanceof a||e instanceof ShadowRoot}var Oe=Math.max,Ze=Math.min,Te=Math.round;function ut(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}function da(){return!/^((?!chrome|android).)*safari/i.test(ut())}function Ae(e,a,t){a===void 0&&(a=!1),t===void 0&&(t=!1);var o=e.getBoundingClientRect(),n=1,r=1;a&&J(e)&&(n=e.offsetWidth>0&&Te(o.width)/e.offsetWidth||1,r=e.offsetHeight>0&&Te(o.height)/e.offsetHeight||1);var i=we(e)?X(e):window,l=i.visualViewport,s=!da()&&t,v=(o.left+(s&&l?l.offsetLeft:0))/n,u=(o.top+(s&&l?l.offsetTop:0))/r,c=o.width/n,f=o.height/r;return{width:c,height:f,top:u,right:v+c,bottom:u+f,left:v,x:v,y:u}}function mt(e){var a=X(e),t=a.pageXOffset,o=a.pageYOffset;return{scrollLeft:t,scrollTop:o}}function Dn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Bn(e){return e===X(e)||!J(e)?mt(e):Dn(e)}function le(e){return e?(e.nodeName||"").toLowerCase():null}function he(e){return((we(e)?e.ownerDocument:e.document)||window.document).documentElement}function ht(e){return Ae(he(e)).left+mt(e).scrollLeft}function se(e){return X(e).getComputedStyle(e)}function bt(e){var a=se(e),t=a.overflow,o=a.overflowX,n=a.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+o)}function Vn(e){var a=e.getBoundingClientRect(),t=Te(a.width)/e.offsetWidth||1,o=Te(a.height)/e.offsetHeight||1;return t!==1||o!==1}function Ln(e,a,t){t===void 0&&(t=!1);var o=J(a),n=J(a)&&Vn(a),r=he(a),i=Ae(e,n,t),l={scrollLeft:0,scrollTop:0},s={x:0,y:0};return(o||!o&&!t)&&((le(a)!=="body"||bt(r))&&(l=Bn(a)),J(a)?(s=Ae(a,!0),s.x+=a.clientLeft,s.y+=a.clientTop):r&&(s.x=ht(r))),{x:i.left+l.scrollLeft-s.x,y:i.top+l.scrollTop-s.y,width:i.width,height:i.height}}function gt(e){var a=Ae(e),t=e.offsetWidth,o=e.offsetHeight;return Math.abs(a.width-t)<=1&&(t=a.width),Math.abs(a.height-o)<=1&&(o=a.height),{x:e.offsetLeft,y:e.offsetTop,width:t,height:o}}function tt(e){return le(e)==="html"?e:e.assignedSlot||e.parentNode||(pt(e)?e.host:null)||he(e)}function ca(e){return["html","body","#document"].indexOf(le(e))>=0?e.ownerDocument.body:J(e)&&bt(e)?e:ca(tt(e))}function Fe(e,a){var t;a===void 0&&(a=[]);var o=ca(e),n=o===((t=e.ownerDocument)==null?void 0:t.body),r=X(o),i=n?[r].concat(r.visualViewport||[],bt(o)?o:[]):o,l=a.concat(i);return n?l:l.concat(Fe(tt(i)))}function zn(e){return["table","td","th"].indexOf(le(e))>=0}function $t(e){return!J(e)||se(e).position==="fixed"?null:e.offsetParent}function $n(e){var a=/firefox/i.test(ut()),t=/Trident/i.test(ut());if(t&&J(e)){var o=se(e);if(o.position==="fixed")return null}var n=tt(e);for(pt(n)&&(n=n.host);J(n)&&["html","body"].indexOf(le(n))<0;){var r=se(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||a&&r.willChange==="filter"||a&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function qe(e){for(var a=X(e),t=$t(e);t&&zn(t)&&se(t).position==="static";)t=$t(t);return t&&(le(t)==="html"||le(t)==="body"&&se(t).position==="static")?a:t||$n(e)||a}var K="top",_="bottom",ee="right",Y="left",yt="auto",We=[K,_,ee,Y],Pe="start",He="end",jn="clippingParents",va="viewport",je="popper",Fn="reference",jt=We.reduce(function(e,a){return e.concat([a+"-"+Pe,a+"-"+He])},[]),fa=[].concat(We,[yt]).reduce(function(e,a){return e.concat([a,a+"-"+Pe,a+"-"+He])},[]),Nn="beforeRead",Hn="read",qn="afterRead",Wn="beforeMain",Un="main",Kn="afterMain",Yn="beforeWrite",Xn="write",Gn="afterWrite",Qn=[Nn,Hn,qn,Wn,Un,Kn,Yn,Xn,Gn];function Jn(e){var a=new Map,t=new Set,o=[];e.forEach(function(r){a.set(r.name,r)});function n(r){t.add(r.name);var i=[].concat(r.requires||[],r.requiresIfExists||[]);i.forEach(function(l){if(!t.has(l)){var s=a.get(l);s&&n(s)}}),o.push(r)}return e.forEach(function(r){t.has(r.name)||n(r)}),o}function Zn(e){var a=Jn(e);return Qn.reduce(function(t,o){return t.concat(a.filter(function(n){return n.phase===o}))},[])}function _n(e){var a;return function(){return a||(a=new Promise(function(t){Promise.resolve().then(function(){a=void 0,t(e())})})),a}}function eo(e){var a=e.reduce(function(t,o){var n=t[o.name];return t[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,t},{});return Object.keys(a).map(function(t){return a[t]})}function to(e,a){var t=X(e),o=he(e),n=t.visualViewport,r=o.clientWidth,i=o.clientHeight,l=0,s=0;if(n){r=n.width,i=n.height;var v=da();(v||!v&&a==="fixed")&&(l=n.offsetLeft,s=n.offsetTop)}return{width:r,height:i,x:l+ht(e),y:s}}function ao(e){var a,t=he(e),o=mt(e),n=(a=e.ownerDocument)==null?void 0:a.body,r=Oe(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),i=Oe(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-o.scrollLeft+ht(e),s=-o.scrollTop;return se(n||t).direction==="rtl"&&(l+=Oe(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:i,x:l,y:s}}function pa(e,a){var t=a.getRootNode&&a.getRootNode();if(e.contains(a))return!0;if(t&&pt(t)){var o=a;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function dt(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function no(e,a){var t=Ae(e,!1,a==="fixed");return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Ft(e,a,t){return a===va?dt(to(e,t)):we(a)?no(a,t):dt(ao(he(e)))}function oo(e){var a=Fe(tt(e)),t=["absolute","fixed"].indexOf(se(e).position)>=0,o=t&&J(e)?qe(e):e;return we(o)?a.filter(function(n){return we(n)&&pa(n,o)&&le(n)!=="body"}):[]}function io(e,a,t,o){var n=a==="clippingParents"?oo(e):[].concat(a),r=[].concat(n,[t]),i=r[0],l=r.reduce(function(s,v){var u=Ft(e,v,o);return s.top=Oe(u.top,s.top),s.right=Ze(u.right,s.right),s.bottom=Ze(u.bottom,s.bottom),s.left=Oe(u.left,s.left),s},Ft(e,i,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function oe(e){return e.split("-")[0]}function ke(e){return e.split("-")[1]}function Ot(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ma(e){var a=e.reference,t=e.element,o=e.placement,n=o?oe(o):null,r=o?ke(o):null,i=a.x+a.width/2-t.width/2,l=a.y+a.height/2-t.height/2,s;switch(n){case K:s={x:i,y:a.y-t.height};break;case _:s={x:i,y:a.y+a.height};break;case ee:s={x:a.x+a.width,y:l};break;case Y:s={x:a.x-t.width,y:l};break;default:s={x:a.x,y:a.y}}var v=n?Ot(n):null;if(v!=null){var u=v==="y"?"height":"width";switch(r){case Pe:s[v]=s[v]-(a[u]/2-t[u]/2);break;case He:s[v]=s[v]+(a[u]/2-t[u]/2);break}}return s}function ha(){return{top:0,right:0,bottom:0,left:0}}function ba(e){return Object.assign({},ha(),e)}function ga(e,a){return a.reduce(function(t,o){return t[o]=e,t},{})}function xt(e,a){a===void 0&&(a={});var t=a,o=t.placement,n=o===void 0?e.placement:o,r=t.strategy,i=r===void 0?e.strategy:r,l=t.boundary,s=l===void 0?jn:l,v=t.rootBoundary,u=v===void 0?va:v,c=t.elementContext,f=c===void 0?je:c,O=t.altBoundary,x=O===void 0?!1:O,S=t.padding,C=S===void 0?0:S,g=ba(typeof C!="number"?C:ga(C,We)),I=f===je?Fn:je,p=e.rects.popper,d=e.elements[x?I:f],b=io(we(d)?d:d.contextElement||he(e.elements.popper),s,u,i),y=Ae(e.elements.reference),M=ma({reference:y,element:p,strategy:"absolute",placement:n}),m=dt(Object.assign({},p,M)),A=f===je?m:y,h={top:b.top-A.top+g.top,bottom:A.bottom-b.bottom+g.bottom,left:b.left-A.left+g.left,right:A.right-b.right+g.right},w=e.modifiersData.offset;if(f===je&&w){var T=w[n];Object.keys(h).forEach(function(E){var k=[ee,_].indexOf(E)>=0?1:-1,D=[K,_].indexOf(E)>=0?"y":"x";h[E]+=T[D]*k})}return h}var Nt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ht(){for(var e=arguments.length,a=new Array(e),t=0;t=0});f.length===0&&(f=c);var O=f.reduce(function(x,S){return x[S]=xt(e,{placement:S,boundary:n,rootBoundary:r,padding:i})[oe(S)],x},{});return Object.keys(O).sort(function(x,S){return O[x]-O[S]})}function xo(e){if(oe(e)===yt)return[];var a=Je(e);return[Wt(e),a,Wt(a)]}function wo(e){var a=e.state,t=e.options,o=e.name;if(!a.modifiersData[o]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,i=t.altAxis,l=i===void 0?!0:i,s=t.fallbackPlacements,v=t.padding,u=t.boundary,c=t.rootBoundary,f=t.altBoundary,O=t.flipVariations,x=O===void 0?!0:O,S=t.allowedAutoPlacements,C=a.options.placement,g=oe(C),I=g===C,p=s||(I||!x?[Je(C)]:xo(C)),d=[C].concat(p).reduce(function(Ie,ce){return Ie.concat(oe(ce)===yt?Oo(a,{placement:ce,boundary:u,rootBoundary:c,padding:v,flipVariations:x,allowedAutoPlacements:S}):ce)},[]),b=a.rects.reference,y=a.rects.popper,M=new Map,m=!0,A=d[0],h=0;h=0,D=k?"width":"height",L=xt(a,{placement:w,boundary:u,rootBoundary:c,altBoundary:f,padding:v}),H=k?E?ee:Y:E?_:K;b[D]>y[D]&&(H=Je(H));var G=Je(H),Z=[];if(r&&Z.push(L[T]<=0),l&&Z.push(L[H]<=0,L[G]<=0),Z.every(function(Ie){return Ie})){A=w,m=!1;break}M.set(w,Z)}if(m)for(var $=x?3:1,q=function(ce){var Be=d.find(function(Ue){var be=M.get(Ue);if(be)return be.slice(0,ce).every(function(at){return at})});if(Be)return A=Be,"break"},ae=$;ae>0;ae--){var de=q(ae);if(de==="break")break}a.placement!==A&&(a.modifiersData[o]._skip=!0,a.placement=A,a.reset=!0)}}const So={name:"flip",enabled:!0,phase:"main",fn:wo,requiresIfExists:["offset"],data:{_skip:!1}};function Io(e,a,t){var o=oe(e),n=[Y,K].indexOf(o)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},a,{placement:e})):t,i=r[0],l=r[1];return i=i||0,l=(l||0)*n,[Y,ee].indexOf(o)>=0?{x:l,y:i}:{x:i,y:l}}function Co(e){var a=e.state,t=e.options,o=e.name,n=t.offset,r=n===void 0?[0,0]:n,i=fa.reduce(function(u,c){return u[c]=Io(c,a.rects,r),u},{}),l=i[a.placement],s=l.x,v=l.y;a.modifiersData.popperOffsets!=null&&(a.modifiersData.popperOffsets.x+=s,a.modifiersData.popperOffsets.y+=v),a.modifiersData[o]=i}const Mo={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Co};function Ro(e){return e==="x"?"y":"x"}function Ne(e,a,t){return Oe(e,Ze(a,t))}function Eo(e,a,t){var o=Ne(e,a,t);return o>t?t:o}function To(e){var a=e.state,t=e.options,o=e.name,n=t.mainAxis,r=n===void 0?!0:n,i=t.altAxis,l=i===void 0?!1:i,s=t.boundary,v=t.rootBoundary,u=t.altBoundary,c=t.padding,f=t.tether,O=f===void 0?!0:f,x=t.tetherOffset,S=x===void 0?0:x,C=xt(a,{boundary:s,rootBoundary:v,padding:c,altBoundary:u}),g=oe(a.placement),I=ke(a.placement),p=!I,d=Ot(g),b=Ro(d),y=a.modifiersData.popperOffsets,M=a.rects.reference,m=a.rects.popper,A=typeof S=="function"?S(Object.assign({},a.rects,{placement:a.placement})):S,h=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),w=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,T={x:0,y:0};if(y){if(r){var E,k=d==="y"?K:Y,D=d==="y"?_:ee,L=d==="y"?"height":"width",H=y[d],G=H+C[k],Z=H-C[D],$=O?-m[L]/2:0,q=I===Pe?M[L]:m[L],ae=I===Pe?-m[L]:-M[L],de=a.elements.arrow,Ie=O&&de?gt(de):{width:0,height:0},ce=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:ha(),Be=ce[k],Ue=ce[D],be=Ne(0,M[L],Ie[L]),at=p?M[L]/2-$-be-Be-h.mainAxis:q-be-Be-h.mainAxis,xa=p?-M[L]/2+$+be+Ue+h.mainAxis:ae+be+Ue+h.mainAxis,nt=a.elements.arrow&&qe(a.elements.arrow),wa=nt?d==="y"?nt.clientTop||0:nt.clientLeft||0:0,wt=(E=w==null?void 0:w[d])!=null?E:0,Sa=H+at-wt-wa,Ia=H+xa-wt,St=Ne(O?Ze(G,Sa):G,H,O?Oe(Z,Ia):Z);y[d]=St,T[d]=St-H}if(l){var It,Ca=d==="x"?K:Y,Ma=d==="x"?_:ee,ge=y[b],Ke=b==="y"?"height":"width",Ct=ge+C[Ca],Mt=ge-C[Ma],ot=[K,Y].indexOf(g)!==-1,Rt=(It=w==null?void 0:w[b])!=null?It:0,Et=ot?Ct:ge-M[Ke]-m[Ke]-Rt+h.altAxis,Tt=ot?ge+M[Ke]+m[Ke]-Rt-h.altAxis:Mt,At=O&&ot?Eo(Et,ge,Tt):Ne(O?Et:Ct,ge,O?Tt:Mt);y[b]=At,T[b]=At-ge}a.modifiersData[o]=T}}const Ao={name:"preventOverflow",enabled:!0,phase:"main",fn:To,requiresIfExists:["offset"]};var Po=function(a,t){return a=typeof a=="function"?a(Object.assign({},t.rects,{placement:t.placement})):a,ba(typeof a!="number"?a:ga(a,We))};function ko(e){var a,t=e.state,o=e.name,n=e.options,r=t.elements.arrow,i=t.modifiersData.popperOffsets,l=oe(t.placement),s=Ot(l),v=[Y,ee].indexOf(l)>=0,u=v?"height":"width";if(!(!r||!i)){var c=Po(n.padding,t),f=gt(r),O=s==="y"?K:Y,x=s==="y"?_:ee,S=t.rects.reference[u]+t.rects.reference[s]-i[s]-t.rects.popper[u],C=i[s]-t.rects.reference[s],g=qe(r),I=g?s==="y"?g.clientHeight||0:g.clientWidth||0:0,p=S/2-C/2,d=c[O],b=I-f[u]-c[x],y=I/2-f[u]/2+p,M=Ne(d,y,b),m=s;t.modifiersData[o]=(a={},a[m]=M,a.centerOffset=M-y,a)}}function Do(e){var a=e.state,t=e.options,o=t.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=a.elements.popper.querySelector(n),!n)||pa(a.elements.popper,n)&&(a.elements.arrow=n))}const Bo={name:"arrow",enabled:!0,phase:"main",fn:ko,effect:Do,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},Vo=lo({defaultModifiers:[...bo,Mo,So,Ao,Oa,ya,Bo]});function Lo({locked:e=!1,overflowPadding:a=8,offsetDistance:t=8,offsetSkid:o=0,gpuAcceleration:n=!0,adaptive:r=!0,scroll:i=!0,resize:l=!0,arrow:s=!1,placement:v,strategy:u},c){const f=z(null),O=z(null),x=z(null);return xe(()=>{Ee(S=>{if(!O.value||!f.value&&!(c!=null&&c.value))return;const C=Bt(O),g=(c==null?void 0:c.value)||Bt(f);if(!(C instanceof HTMLElement)||!g)return;const I={modifiers:[{name:"flip",enabled:!e},{name:"preventOverflow",options:{padding:a}},{name:"offset",options:{offset:[o,t]}},{name:"computeStyles",options:{adaptive:r,gpuAcceleration:n}},{name:"eventListeners",options:{scroll:i,resize:l}},{name:"arrow",enabled:s}]};v&&(I.placement=v),u&&(I.strategy=u),x.value=Vo(g,C,I),S(x.value.destroy)})}),[f,O,x]}const ne=na(ye.ui.strategy,ye.ui.select,Ga),Ge=na(ye.ui.strategy,ye.ui.selectMenu,Qa),zo=te({components:{HCombobox:yn,HComboboxButton:On,HComboboxOptions:wn,HComboboxOption:Sn,HComboboxInput:xn,HListbox:Tn,HListboxButton:An,HListboxOptions:Pn,HListboxOption:kn,UIcon:oa,UAvatar:ia},inheritAttrs:!1,props:{modelValue:{type:[String,Number,Object,Array,Boolean],default:""},query:{type:String,default:null},by:{type:String,default:void 0},options:{type:Array,default:()=>[]},id:{type:String,default:null},name:{type:String,default:null},required:{type:Boolean,default:!1},icon:{type:String,default:null},loadingIcon:{type:String,default:()=>ne.default.loadingIcon},leadingIcon:{type:String,default:null},trailingIcon:{type:String,default:()=>ne.default.trailingIcon},trailing:{type:Boolean,default:!1},leading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},selectedIcon:{type:String,default:()=>Ge.default.selectedIcon},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},searchable:{type:[Boolean,Function],default:!1},searchablePlaceholder:{type:String,default:"Search..."},clearSearchOnClose:{type:Boolean,default:()=>Ge.default.clearSearchOnClose},debounce:{type:Number,default:200},creatable:{type:Boolean,default:!1},showCreateOptionWhen:{type:String,default:()=>Ge.default.showCreateOptionWhen},placeholder:{type:String,default:null},padded:{type:Boolean,default:!0},size:{type:String,default:null,validator(e){return Object.keys(ne.size).includes(e)}},color:{type:String,default:()=>ne.default.color,validator(e){return[...ye.ui.colors,...Object.keys(ne.color)].includes(e)}},variant:{type:String,default:()=>ne.default.variant,validator(e){return[...Object.keys(ne.variant),...Object.values(ne.color).flatMap(a=>Object.keys(a))].includes(e)}},optionAttribute:{type:String,default:"label"},valueAttribute:{type:String,default:null},searchAttributes:{type:Array,default:null},popper:{type:Object,default:()=>({})},selectClass:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},uiMenu:{type:Object,default:()=>({})}},emits:["update:modelValue","update:query","open","close","change"],setup(e,{emit:a,slots:t}){const{ui:o,attrs:n}=Vt("select",it(e,"ui"),ne,it(e,"class")),{ui:r}=Vt("selectMenu",it(e,"uiMenu"),Ge),i=R(()=>$a({},e.popper,r.value.popper)),[l,s]=Lo(i.value),{size:v,rounded:u}=ja({ui:o,props:e}),{emitFormBlur:c,emitFormChange:f,inputId:O,color:x,size:S,name:C}=Fa(e,ne),g=R(()=>v.value||S.value),I=z(""),p=R({get(){return e.query??I.value},set($){I.value=$,a("update:query",$)}}),d=R(()=>{if(e.multiple)return Array.isArray(e.modelValue)&&e.modelValue.length?`${e.modelValue.length} selected`:null;if(e.modelValue!==void 0&&e.modelValue!==null)if(e.valueAttribute){const $=e.options.find(q=>q[e.valueAttribute]===e.modelValue);return $?$[e.optionAttribute]:null}else return["string","number"].includes(typeof e.modelValue)?e.modelValue:e.modelValue[e.optionAttribute];return null}),b=R(()=>{var q,ae;const $=((ae=(q=o.value.color)==null?void 0:q[x.value])==null?void 0:ae[e.variant])||o.value.variant[e.variant];return Na(Ve(o.value.base,r.value.select,u.value,o.value.size[g.value],o.value.gap[g.value],e.padded?o.value.padding[g.value]:"p-0",$==null?void 0:$.replaceAll("{color}",x.value),(y.value||t.leading)&&o.value.leading.padding[g.value],(M.value||t.trailing)&&o.value.trailing.padding[g.value]),e.placeholder&&e.modelValue===void 0&&e.modelValue===null&&o.value.placeholder,e.selectClass)}),y=R(()=>e.icon&&e.leading||e.icon&&!e.trailing||e.loading&&!e.trailing||e.leadingIcon),M=R(()=>e.icon&&e.trailing||e.loading&&e.trailing||e.trailingIcon),m=R(()=>e.loading?e.loadingIcon:e.leadingIcon||e.icon),A=R(()=>e.loading&&!y.value?e.loadingIcon:e.trailingIcon||e.icon),h=R(()=>Ve(o.value.icon.leading.wrapper,o.value.icon.leading.pointer,o.value.icon.leading.padding[g.value])),w=R(()=>Ve(o.value.icon.base,x.value&&ye.ui.colors.includes(x.value)&&o.value.icon.color.replaceAll("{color}",x.value),o.value.icon.size[g.value],e.loading&&o.value.icon.loading)),T=R(()=>Ve(o.value.icon.trailing.wrapper,o.value.icon.trailing.pointer,o.value.icon.trailing.padding[g.value])),E=R(()=>Ve(o.value.icon.base,x.value&&ye.ui.colors.includes(x.value)&&o.value.icon.color.replaceAll("{color}",x.value),o.value.icon.size[g.value],e.loading&&!y.value&&o.value.icon.loading)),k=typeof e.searchable=="function"?Ha(e.searchable,e.debounce):void 0,D=qa(async()=>e.searchable&&k?await k(p.value):p.value===""?e.options:e.options.filter($=>{var q;return((q=e.searchAttributes)!=null&&q.length?e.searchAttributes:[e.optionAttribute]).some(ae=>{if(["string","number"].includes(typeof $))return String($).search(new RegExp(p.value,"i"))!==-1;const de=Ja($,ae);return de!=null&&String(de).search(new RegExp(p.value,"i"))!==-1})})),L=R(()=>p.value===""||e.showCreateOptionWhen==="empty"&&D.value.length||e.showCreateOptionWhen==="always"&&D.value.find(q=>["string","number"].includes(typeof q)?q===p.value:q[e.optionAttribute]===p.value)?null:["string","number"].includes(typeof e.modelValue)?p.value:{[e.optionAttribute]:p.value});function H(){e.clearSearchOnClose&&(p.value="")}ie(s,$=>{$?a("open"):(H(),a("close"),c())});function G($){a("update:modelValue",$),a("change",$),f()}function Z($){p.value=$.target.value}return Wa(()=>Za("$YMH7mn4R4k")),{ui:o,uiMenu:r,attrs:n,name:C,inputId:O,popper:i,trigger:l,container:s,label:d,isLeading:y,isTrailing:M,selectClass:b,leadingIconName:m,leadingIconClass:w,leadingWrapperIconClass:h,trailingIconName:A,trailingIconClass:E,trailingWrapperIconClass:T,filteredOptions:D,createOption:L,query:p,onUpdate:G,onQueryChange:Z}}}),$o=["value","required"],jo=["id","disabled"],Fo={class:"truncate"};function No(e,a,t,o,n,r){const i=oa,l=Ua("HComboboxInput"),s=ia;return F(),ve(Le(e.searchable?"HCombobox":"HListbox"),{by:e.by,name:e.name,"model-value":e.modelValue,multiple:e.multiple,disabled:e.disabled,as:"div",class:j(e.ui.wrapper),"onUpdate:modelValue":e.onUpdate},{default:Ce(({open:v})=>[e.required?(F(),Q("input",{key:0,value:e.modelValue,required:e.required,class:j(e.uiMenu.required),tabindex:"-1","aria-hidden":"true"},null,10,$o)):re("",!0),(F(),ve(Le(e.searchable?"HComboboxButton":"HListboxButton"),{ref:"trigger",as:"div",role:"button",class:j(e.uiMenu.trigger)},{default:Ce(()=>[fe(e.$slots,"default",{open:v,disabled:e.disabled,loading:e.loading},()=>[pe("button",lt({id:e.inputId,class:e.selectClass,disabled:e.disabled,type:"button"},e.attrs),[e.isLeading&&e.leadingIconName||e.$slots.leading?(F(),Q("span",{key:0,class:j(e.leadingWrapperIconClass)},[fe(e.$slots,"leading",{disabled:e.disabled,loading:e.loading},()=>[Ye(i,{name:e.leadingIconName,class:j(e.leadingIconClass)},null,8,["name","class"])])],2)):re("",!0),fe(e.$slots,"label",{},()=>[e.label?(F(),Q("span",{key:0,class:j(e.uiMenu.label)},ze(e.label),3)):(F(),Q("span",{key:1,class:j(e.uiMenu.label)},ze(e.placeholder||" "),3))]),e.isTrailing&&e.trailingIconName||e.$slots.trailing?(F(),Q("span",{key:1,class:j(e.trailingWrapperIconClass)},[fe(e.$slots,"trailing",{disabled:e.disabled,loading:e.loading},()=>[Ye(i,{name:e.trailingIconName,class:j(e.trailingIconClass),"aria-hidden":"true"},null,8,["name","class"])])],2)):re("",!0)],16,jo)])]),_:2},1032,["class"])),v?(F(),Q("div",{key:1,ref:"container",class:j([e.uiMenu.container,e.uiMenu.width])},[Ye(Ka,lt({appear:""},e.uiMenu.transition),{default:Ce(()=>[pe("div",null,[e.popper.arrow?(F(),Q("div",{key:0,"data-popper-arrow":"",class:j(Object.values(e.uiMenu.arrow))},null,2)):re("",!0),(F(),ve(Le(e.searchable?"HComboboxOptions":"HListboxOptions"),{static:"",class:j([e.uiMenu.base,e.uiMenu.ring,e.uiMenu.rounded,e.uiMenu.shadow,e.uiMenu.background,e.uiMenu.padding,e.uiMenu.height])},{default:Ce(()=>{var u,c;return[e.searchable?(F(),ve(l,{key:0,"display-value":()=>e.query,name:"q",placeholder:e.searchablePlaceholder,autofocus:"",autocomplete:"off",class:j(e.uiMenu.input),onChange:e.onQueryChange},null,8,["display-value","placeholder","class","onChange"])):re("",!0),(F(!0),Q(vt,null,Ya(e.filteredOptions,(f,O)=>(F(),ve(Le(e.searchable?"HComboboxOption":"HListboxOption"),{key:O,as:"template",value:e.valueAttribute?f[e.valueAttribute]:f,disabled:f.disabled},{default:Ce(({active:x,selected:S,disabled:C})=>[pe("li",{class:j([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,x?e.uiMenu.option.active:e.uiMenu.option.inactive,S&&e.uiMenu.option.selected,C&&e.uiMenu.option.disabled])},[pe("div",{class:j(e.uiMenu.option.container)},[fe(e.$slots,"option",{option:f,active:x,selected:S},()=>[f.icon?(F(),ve(i,{key:0,name:f.icon,class:j([e.uiMenu.option.icon.base,x?e.uiMenu.option.icon.active:e.uiMenu.option.icon.inactive,f.iconClass]),"aria-hidden":"true"},null,8,["name","class"])):f.avatar?(F(),ve(s,lt({key:1},{size:e.uiMenu.option.avatar.size,...f.avatar},{class:e.uiMenu.option.avatar.base,"aria-hidden":"true"}),null,16,["class"])):f.chip?(F(),Q("span",{key:2,class:j(e.uiMenu.option.chip.base),style:Xa({background:`#${f.chip}`})},null,6)):re("",!0),pe("span",Fo,ze(["string","number"].includes(typeof f)?f:f[e.optionAttribute]),1)])],2),S?(F(),Q("span",{key:0,class:j([e.uiMenu.option.selectedIcon.wrapper,e.uiMenu.option.selectedIcon.padding])},[Ye(i,{name:e.selectedIcon,class:j(e.uiMenu.option.selectedIcon.base),"aria-hidden":"true"},null,8,["name","class"])],2)):re("",!0)],2)]),_:2},1032,["value","disabled"]))),128)),e.creatable&&e.createOption?(F(),ve(Le(e.searchable?"HComboboxOption":"HListboxOption"),{key:1,value:e.createOption,as:"template"},{default:Ce(({active:f,selected:O})=>[pe("li",{class:j([e.uiMenu.option.base,e.uiMenu.option.rounded,e.uiMenu.option.padding,e.uiMenu.option.size,e.uiMenu.option.color,f?e.uiMenu.option.active:e.uiMenu.option.inactive])},[pe("div",{class:j(e.uiMenu.option.container)},[fe(e.$slots,"option-create",{option:e.createOption,active:f,selected:O},()=>[pe("span",{class:j(e.uiMenu.option.create)},'Create "'+ze(e.createOption[e.optionAttribute])+'"',3)])],2)],2)]),_:3},8,["value"])):e.searchable&&e.query&&!((u=e.filteredOptions)!=null&&u.length)?(F(),Q("p",{key:2,class:j(e.uiMenu.option.empty)},[fe(e.$slots,"option-empty",{query:e.query},()=>[Lt(' No results for "'+ze(e.query)+'". ',1)])],2)):(c=e.filteredOptions)!=null&&c.length?re("",!0):(F(),Q("p",{key:3,class:j(e.uiMenu.empty)},[fe(e.$slots,"empty",{query:e.query},()=>[Lt(" No options. ")])],2))]}),_:3},8,["class"]))])]),_:3},16)],2)):re("",!0)]),_:3},8,["by","name","model-value","multiple","disabled","class","onUpdate:modelValue"])}const qo=za(zo,[["render",No]]);export{qo as _}; diff --git a/jesse/static/_nuxt/DTrGDXgG.js b/jesse/static/_nuxt/DTrGDXgG.js new file mode 100644 index 000000000..6fe4fc15d --- /dev/null +++ b/jesse/static/_nuxt/DTrGDXgG.js @@ -0,0 +1 @@ +import{g as R,h as H,r as V,o as a,c as u,a as m,F as S,i as K,j as he,b as o,w as L,t as M,n as C,k as l,l as ve,v as _e,m as ke,q as P,e as we,s as xe,x as v,y as B,z as $e,A as Ve,B as Ce,_ as Se,C as ze,D as Q,E as G,G as X,H as Te,I as je,J as Ue,K as O,L as Ee,M as w,N as W,O as d,P as U,Q as Le,R as Re,S as Ie,T as E,U as Be,V as D,W as Me,X as Ne,Y as Oe,Z as De,$ as Pe,a0 as qe,a1 as Je}from"./iedVCmkz.js";import{r as Ae}from"./D3WWa22M.js";import{_ as Qe,a as We,b as Fe}from"./BxVo_4D-.js";import{r as He,_ as Ke,a as Ge,b as Xe}from"./DU23lKGZ.js";import{_ as Ye}from"./DRlj9p5R.js";import{T as Ze,_ as et}from"./nKv1GnPl.js";import{u as tt}from"./C7X-_NHR.js";import"./DddLSi-Q.js";const rt={wrapper:{base:"flex items-center align-center text-center",horizontal:"w-full flex-row",vertical:"flex-col"},container:{base:"font-medium text-gray-700 dark:text-gray-200 flex",horizontal:"mx-3 whitespace-nowrap",vertical:"my-2"},border:{base:"flex border-gray-200 dark:border-gray-800",horizontal:"w-full",vertical:"h-full",size:{horizontal:{"2xs":"border-t",xs:"border-t-[2px]",sm:"border-t-[3px]",md:"border-t-[4px]",lg:"border-t-[5px]",xl:"border-t-[6px]"},vertical:{"2xs":"border-s",xs:"border-s-[2px]",sm:"border-s-[3px]",md:"border-s-[4px]",lg:"border-s-[5px]",xl:"border-s-[6px]"}},type:{solid:"border-solid",dotted:"border-dotted",dashed:"border-dashed"}},icon:{base:"flex-shrink-0 w-5 h-5"},avatar:{base:"flex-shrink-0",size:"2xs"},label:"text-sm",default:{size:"2xs"}},st={class:"mb-4"},ot={class:"hidden sm:block"},at={class:"relative rounded-lg shadow flex divide-x divide-gray-200 dark:divide-gray-700","aria-label":"Tabs"},lt=["onMouseup"],nt=["onClick"],it={class:"absolute right-[1em] focus:outline-none"},ut=m("span",{"aria-hidden":"true",class:"absolute inset-x-0 bottom-0 h-0.5 bg-transparent dark:bg-gray-600"},null,-1),dt=R({__name:"BacktestTabs",props:{tabs:{},currentTab:{}},emits:["close"],setup(s,{emit:t}){const f=H(),h=V(f.params.id),c=t;function p(n){if(!n.form.routes.length)return"New Tab";if(n.results.exception.error&&n.results.executing)return"Error";const g=n.form.routes[0];let b="";return g.strategy&&(b+=`${g.strategy} • `),g.symbol&&(b+=`${g.symbol} • `),g.timeframe&&(b+=`${g.timeframe}`),b=b.endsWith(" • ")?b.slice(0,-3):b,n.results.executing?`${b} | ${n.results.progressbar.current}%`:n.results.showResults?`${b} | Results`:b}return(n,g)=>{const b=we;return a(),u("div",st,[m("div",ot,[m("nav",at,[(a(!0),u(S,null,K(n.tabs,y=>(a(),u("div",{key:y.id,class:"relative group min-w-0 flex-1 overflow-hidden text-center flex items-center",onMouseup:he(_=>c("close",y.id),["middle"])},[o(b,{to:`/backtest/${y.id}`,class:C([y.id===l(h)?"text-gray-900 dark:text-gray-100 font-bold ":"text-gray-500 dark:text-gray-300 hover:text-gray-700 font-medium ","py-3 px-4 inline-block select-none cursor-pointer focus:outline-none w-full text-xs bg-gray-50 dark:bg-backdrop-dark"])},{default:L(()=>[m("span",null,M(p(y)),1),m("span",{"aria-hidden":"true",class:C([y.id===l(h)&&Object.keys(n.tabs).length>1?"bg-indigo-400":"bg-transparent dark:bg-gray-600","absolute inset-x-0 bottom-0 h-0.5"])},null,2)]),_:2},1032,["to","class"]),ve(m("button",{class:"absolute right-[1em] focus:outline-none",onClick:_=>c("close",y.id)},[o(l(ke),{class:"h-5 w-5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 hover:bg-gray-200 bg-gray-100 dark:bg-gray-700 rounded-full","aria-hidden":"true"})],8,nt),[[_e,Object.keys(n.tabs).length>1]])],40,lt))),128)),m("div",{class:"select-none cursor-pointer text-gray-400 dark:text-gray-100 hover:text-gray-600 focus:outline-none group relative w-14 overflow-hidden bg-gray-50 dark:bg-backdrop-dark py-3 px-4 font-medium hover:bg-white dark:hover:bg-gray-800 flex items-center justify-center",onClick:g[0]||(g[0]=y=>l(P)().addTab(n.currentTab))},[m("button",it,[o(l(Ae),{class:"h-6 w-6 rounded-full","aria-hidden":"true"})]),ut])])])])}}}),F={width:800,height:400,priceScale:{borderColor:"rgba(197, 203, 206, 1)"},timeScale:{borderColor:"rgba(197, 203, 206, 1)",timeVisible:!0,secondsVisible:!1}},ct={chart:{layout:{background:{color:"#ffffff"},textColor:"rgba(33, 56, 77, 1)"},grid:{vertLines:{color:"#f1f1f1",visible:!0},horzLines:{color:"#f1f1f1",visible:!0}},priceScale:{borderColor:"rgba(197, 203, 206, 0.6)"},timeScale:{borderColor:"rgba(197, 203, 206, 0.6)",timeVisible:!0,secondsVisible:!1}}},mt={chart:{layout:{background:{color:"#333333"},textColor:"#D1D5DB"},grid:{vertLines:{color:"#525252",visible:!0},horzLines:{color:"#525252",visible:!0}},priceScale:{borderColor:"#525252"},timeScale:{borderColor:"#525252",timeVisible:!0,secondsVisible:!1}}},ft={class:"mt-2"},pt={class:"ml-2"},gt=R({__name:"EquityCurve",props:{data:{}},setup(s){const t=xe(),f=v(()=>t.value),h=V();let c=null,p=[];const n=s;B(n.data,_=>{}),B(f,_=>{y(_)}),$e(async()=>{await g()});async function g(){F.width=h.value.clientWidth,c=Ze(h.value,F);for(const _ of n.data){const z=c.addLineSeries({lineWidth:2});z.setData(_.data),p.push(z)}c.timeScale().fitContent(),y(f.value)}Ve(()=>{b()});function b(){c!==null&&(c.remove(),c=null),p&&(p=[])}function y(_){c===null||p===null||c.applyOptions(_==="light"?ct.chart:mt.chart)}return(_,z)=>(a(),u(S,null,[m("div",{ref_key:"chartContainer",ref:h,class:"rounded overflow-hidden border-2 border-gray-100 dark:border-gray-600"},null,512),m("div",ft,[(a(!0),u(S,null,K(_.data,T=>(a(),u("span",{key:T.name,class:"text-xs mr-2 rounded bg-white dark:bg-gray-700 p-1"},[m("span",{class:"inline-block",style:Ce({backgroundColor:T.color,width:"25px",height:"10px"})},null,4),m("span",pt,M(T.name),1)]))),128))])],64))}}),I=ze(Q.ui.strategy,Q.ui.divider,rt),bt=R({components:{UIcon:G,UAvatar:X},inheritAttrs:!1,props:{label:{type:String,default:null},icon:{type:String,default:null},avatar:{type:Object,default:null},size:{type:String,default:()=>I.default.size,validator(s){return Object.keys(I.border.size.horizontal).includes(s)||Object.keys(I.border.size.vertical).includes(s)}},orientation:{type:String,default:"horizontal",validator:s=>["horizontal","vertical"].includes(s)},type:{type:String,default:"solid",validator:s=>["solid","dotted","dashed"].includes(s)},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},setup(s){const{ui:t,attrs:f}=Te("divider",je(s,"ui"),I),h=v(()=>Ue(O(t.value.wrapper.base,t.value.wrapper[s.orientation]),s.class)),c=v(()=>O(t.value.container.base,t.value.container[s.orientation])),p=v(()=>O(t.value.border.base,t.value.border[s.orientation],t.value.border.size[s.orientation][s.size],t.value.border.type[s.type]));return{ui:t,attrs:f,wrapperClass:h,containerClass:c,borderClass:p}}});function yt(s,t,f,h,c,p){const n=G,g=X;return a(),u("div",W({class:s.wrapperClass},s.attrs),[m("div",{class:C(s.borderClass)},null,2),s.label||s.icon||s.avatar||s.$slots.default?(a(),u(S,{key:0},[m("div",{class:C(s.containerClass)},[Ee(s.$slots,"default",{},()=>[s.label?(a(),u("span",{key:0,class:C(s.ui.label)},M(s.label),3)):s.icon?(a(),w(n,{key:1,name:s.icon,class:C(s.ui.icon.base)},null,8,["name","class"])):s.avatar?(a(),w(g,W({key:2},{size:s.ui.avatar.size,...s.avatar},{class:s.ui.avatar.base}),null,16,["class"])):d("",!0)])],2),m("div",{class:C(s.borderClass)},null,2)],64)):d("",!0)],16)}const ht=Se(bt,[["render",yt]]),vt=["value"],_t={key:1,class:"flex flex-col items-center justify-center select-none mt-[10%]"},kt=["textContent"],wt={class:"mt-8"},xt={class:"mt-8"},$t={class:"mt-4"},Vt=["href"],Ct={key:1,class:"mx-auto container mt-8"},St={key:0},zt={class:"flex items-center select-none flex-1 my-4"},Tt={class:"grid grid-cols-1 gap-6 mt-8"},jt={key:1,class:"w-full mx-auto"},Ut={key:4,class:"text-yellow-500 border-yellow-400 bg-yellow-50 dark:bg-gray-700 dark:text-yellow-400 mt-16 text-center text-2xl rounded border-2 border-dashed dark:border-gray-800 py-16 select-none"},Et={key:0},Lt={key:0},Rt=["href"],It=["href"],Bt=["href"],Mt=["href"],Nt=["href"],Ot=["href"],Dt={key:1},Pt=R({__name:"BacktestTab",props:{form:{},results:{}},setup(s){const t=s,f=V([]),h=V(!1),c=V(!1),p=U().authToken,n=V(Le().public.apiBaseUrl),g=P(),b=v(()=>U().jesseSupportedTimeframes.map(e=>({label:e,value:e}))),y=V([]);async function _(){y.value=await U().getExchangeSupportedSymbols(t.form.exchange);for(let e=0;e0)for(let e=0;e{if(f.value.length){for(let r=0;r{let e=`/download/backtest/chart/${t.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),q=v(()=>{let e=`/download/backtest/log/${t.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),re=v(()=>{let e=`/download/backtest/tradingview/${t.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),se=v(()=>{let e=`/download/backtest/full-reports/${t.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),oe=v(()=>{let e=`/download/backtest/csv/${t.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),ae=v(()=>{let e=`/download/backtest/json/${t.results.generalInfo.session_id}?token=${p}`;return n.value!=="/"&&(e=n.value+e),e}),x=v(()=>t.results.metrics.length>0),le=v(()=>Re.remainingTimeText(t.results.progressbar.estimated_remaining_seconds));function ne(){navigator.clipboard.writeText(t.results.infoLogs),D("success","Logs copied successfully"),c.value=!0,setTimeout(()=>{c.value=!1},3e3)}return B(()=>t.form.start_date,e=>{t.form.finish_datet.form.finish_date,e=>{t.form.finish_date&&t.form.start_date>e&&(t.form.start_date=e)}),(e,r)=>{const ie=Qe,ue=Me,de=Ke,k=Ne,ce=Ge,j=Oe,me=Ye,fe=We,J=De,$=Pe,pe=gt,A=qe,N=ht,ge=et,be=Fe,ye=Xe;return a(),u(S,null,[e.form.debug_mode?(a(),w(ue,{key:0,modelValue:e.results.logsModal,"onUpdate:modelValue":r[0]||(r[0]=i=>e.results.logsModal=i),title:"Logs"},{default:L(()=>[o(ie,{logs:e.results.infoLogs},null,8,["logs"])]),buttons:L(()=>[m("button",{class:"ml-2 p-2 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-full text-gray-400 hover:text-gray-500 dark:hover:text-gray-300 focus:outline-none",onClick:ne},[l(c)?(a(),w(l(Ie),{key:0,class:"h-6 w-6","aria-hidden":"true"})):d("",!0),!l(c)&&e.results.infoLogs.length!=0?(a(),w(l(He),{key:1,class:"h-6 w-6","aria-hidden":"true"})):d("",!0)]),m("input",{id:"copy-info-logs",type:"hidden",value:e.results.infoLogs},null,8,vt)]),_:1},8,["modelValue"])):d("",!0),e.results.executing&&!e.results.showResults?(a(),u("div",_t,[m("div",null,[o(de,{progress:e.results.progressbar.current},null,8,["progress"])]),e.results.exception.error?d("",!0):(a(),u("h3",{key:0,class:"mt-8 animate-pulse",textContent:M(l(le))},null,8,kt)),m("div",wt,[m("div",xt,[o(k,{color:"gray",ui:{color:{gray:{solid:"text-rose-500 dark:text-rose-400"}}},class:"w-64 flex justify-center",icon:"i-heroicons-no-symbol",size:"xl",variant:"solid",label:"Cancel",trailing:!1,onClick:r[1]||(r[1]=i=>l(z)((e._.provides[E]||e.$route).params.id))})]),m("div",$t,[e.form.debug_mode&&e.results.exception.error&&e.results.progressbar.current!==0?(a(),u("a",{key:0,href:l(q),class:"flex justify-center items-center btn-secondary text-center mb-4 w-full"},[o(k,{icon:"i-heroicons-document-arrow-down",label:"Debugging Logs",color:"gray",size:"xl",variant:"solid",trailing:!1,class:"w-64 flex justify-center"})],8,Vt)):d("",!0)])]),e.results.exception.error&&e.results.executing?(a(),u("div",Ct,[o(ce,{modelValue:l(h),"onUpdate:modelValue":r[2]||(r[2]=i=>Be(h)?h.value=i:null),title:e.results.exception.error,content:e.results.exception.traceback,mode:"backtest","debug-mode":e.form.debug_mode},null,8,["modelValue","title","content","debug-mode"])])):d("",!0)])):d("",!0),o(ye,{else:""},{left:L(()=>[!e.results.executing&&!e.results.showResults?(a(),u("div",St,[o(j,{class:"mb-4",title:"Exchange"}),o(me,{modelValue:e.form.exchange,"onUpdate:modelValue":r[3]||(r[3]=i=>e.form.exchange=i),placeholder:"Select an exchange...",searchable:"",options:l(U)().backtestingExchangeNames,size:"lg",class:"mt-2 mb-16",onChange:_},null,8,["modelValue","options"]),o(fe,{"total-routes-error":l(f),timeframes:l(b),form:e.form,results:e.results,symbols:l(y),mode:"backtest"},null,8,["total-routes-error","timeframes","form","results","symbols"]),o(j,{class:"mt-16",title:"Duration"}),m("div",zt,[o(J,{modelValue:e.form.start_date,"onUpdate:modelValue":r[4]||(r[4]=i=>e.form.start_date=i),type:"date",variant:"outline",size:"lg",class:"w-full mr-2"},null,8,["modelValue"]),o(J,{modelValue:e.form.finish_date,"onUpdate:modelValue":r[5]||(r[5]=i=>e.form.finish_date=i),type:"date",variant:"outline",size:"lg",class:"w-full ml-2"},null,8,["modelValue"])]),o(j,{class:"mt-16",title:"Options"}),m("div",Tt,[o($,{modelValue:e.form.debug_mode,"onUpdate:modelValue":r[6]||(r[6]=i=>e.form.debug_mode=i),title:"Debug Mode",description:"Logs every step of the execution. Very helpful for debugging your strategy but takes a lot longer to execute"},null,8,["modelValue"]),o($,{modelValue:e.form.export_chart,"onUpdate:modelValue":r[7]||(r[7]=i=>e.form.export_chart=i),title:"Export Charts",description:"Exports charts for your portfolio's daily balance."},null,8,["modelValue"]),o($,{modelValue:e.form.export_tradingview,"onUpdate:modelValue":r[8]||(r[8]=i=>e.form.export_tradingview=i),title:"Export Tradingview",description:"Exports the executed trades in a format accepted by TradingView's Pine Editor. Useful to look at the executed orders on their chart."},null,8,["modelValue"]),o($,{modelValue:e.form.export_full_reports,"onUpdate:modelValue":r[9]||(r[9]=i=>e.form.export_full_reports=i),title:"Export QuantStats reports",description:"Exports a HTML file generated by QuantStats library."},null,8,["modelValue"]),o($,{modelValue:e.form.export_csv,"onUpdate:modelValue":r[10]||(r[10]=i=>e.form.export_csv=i),title:"Export CSV",description:"Exports executed trades in a CSV format"},null,8,["modelValue"]),o($,{modelValue:e.form.export_json,"onUpdate:modelValue":r[11]||(r[11]=i=>e.form.export_json=i),title:"Export JSON",description:"Exports executed trades in a JSON format"},null,8,["modelValue"]),o($,{modelValue:e.form.fast_mode,"onUpdate:modelValue":r[12]||(r[12]=i=>e.form.fast_mode=i),title:"Fast Mode",description:"Runs the backtest faster by using an improved algorithm. This is supposed to yield the same results; however, it's currently experimental, which is why it's an option."},null,8,["modelValue"]),o($,{modelValue:e.form.benchmark,"onUpdate:modelValue":r[13]||(r[13]=i=>e.form.benchmark=i),title:"Benchmark",description:"If enabled, the backtest will compare the performance of the strategy against the buy and hold strategy of the market."},null,8,["modelValue"])])])):d("",!0),e.results.showResults?(a(),u("div",jt,[m("div",null,[l(x)?(a(),w(j,{key:0,class:"mb-4",title:"Equity Curve"})):d("",!0),l(x)?(a(),w(pe,{key:1,data:e.results.charts.equity_curve},null,8,["data"])):d("",!0),l(x)?(a(),w(j,{key:2,class:"mt-16 mb-4",title:"Performance"})):d("",!0),l(x)?(a(),w(A,{key:3,data:e.results.metrics},null,8,["data"])):d("",!0),l(x)?d("",!0):(a(),u("div",Ut," No trades were executed via this strategy! "))])])):d("",!0)]),right:L(()=>[e.results.executing?d("",!0):(a(),u("div",Et,[e.results.showResults?(a(),u("div",Lt,[o(k,{class:"w-full flex justify-center",icon:"i-heroicons-arrow-path",size:"xl",variant:"solid",label:"Rerun",trailing:!1,onClick:r[14]||(r[14]=i=>l(T)((e._.provides[E]||e.$route).params.id))}),o(k,{class:"w-full flex justify-center mt-4",color:"green",icon:"i-heroicons-arrow-uturn-left",size:"xl",variant:"solid",label:"New session",trailing:!1,onClick:r[15]||(r[15]=i=>l(Y)((e._.provides[E]||e.$route).params.id))}),e.form.debug_mode?(a(),u("a",{key:0,href:l(q),target:"_blank",class:""},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"Debugging Logs",trailing:!1})],8,Rt)):d("",!0),e.form.export_chart&&l(x)?(a(),u("a",{key:1,href:l(te),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:" Legacy Chart",trailing:!1})],8,It)):d("",!0),e.form.export_full_reports&&l(x)?(a(),u("a",{key:2,href:l(se),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"QuantStats Report",trailing:!1})],8,Bt)):d("",!0),e.form.export_csv&&l(x)?(a(),u("a",{key:3,href:l(oe),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"CVS",trailing:!1})],8,Mt)):d("",!0),e.form.export_json&&l(x)?(a(),u("a",{key:4,href:l(ae),target:"_blank",class:"flex justify-center items-center btn-secondary text-center w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"JSON",trailing:!1})],8,Nt)):d("",!0),e.form.export_tradingview&&l(x)?(a(),u("a",{key:5,href:l(re),target:"_blank",class:"flex justify-center items-center btn-secondary text-center mb-4 w-full"},[o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-document-arrow-down",size:"xl",variant:"solid",label:"TradingView Pine Editor",trailing:!1})],8,Ot)):d("",!0),o(N,{class:"mt-8 mb-4",size:"lg",label:"General Info"}),o(ge,{data:e.results.info},null,8,["data"]),o(N,{class:"mt-8 mb-4",size:"lg",label:"Routes"}),o(be,{data:e.results.routes_info,"header-items":["Symbol","Timeframe","Strategy"],header:""},null,8,["data"]),e.results.hyperparameters.length?(a(),w(N,{key:6,class:"mt-8 mb-4",size:"lg",label:"Hyperparameters"})):d("",!0),e.results.hyperparameters.length?(a(),w(A,{key:7,data:e.results.hyperparameters},null,8,["data"])):d("",!0)])):(a(),u("div",Dt,[o(k,{class:"w-full flex justify-center",icon:"i-heroicons-bolt",size:"xl",variant:"solid",label:"Start",trailing:!1,onClick:r[16]||(r[16]=i=>Z((e._.provides[E]||e.$route).params.id))}),o(k,{class:"w-full flex justify-center mt-4",color:"gray",icon:"i-heroicons-plus",size:"xl",variant:"solid",label:"Start in a new tab",trailing:!1,onClick:r[17]||(r[17]=i=>ee((e._.provides[E]||e.$route).params.id))})]))]))]),_:1})],64)}}}),qt={class:"w-full"},Xt=R({__name:"[id]",setup(s){tt({title:"Backtest - Jesse"});const t=P(),f=v(()=>t.tabs),h=v(()=>H().params.id),c=v(()=>{if(!f.value[h.value]){const p=Object.keys(f.value);if(p.length>0){const n=f.value[p[0]];return Je().push(`/backtest/${n.id}`),n}}return f.value[h.value]});return Object.keys(f.value).length===0&&t.addTab(),(p,n)=>{const g=dt,b=Pt;return a(),u(S,null,[m("div",qt,[o(g,{"current-tab":c.value?c.value.id:null,tabs:f.value,mode:"backtest",onClose:l(t).closeTab},null,8,["current-tab","tabs","onClose"])]),c.value?(a(),w(b,{key:0,form:c.value.form,results:c.value.results},null,8,["form","results"])):d("",!0)],64)}}});export{Xt as default}; diff --git a/jesse/static/_nuxt/Bp2xcJgg.js b/jesse/static/_nuxt/DU23lKGZ.js similarity index 99% rename from jesse/static/_nuxt/Bp2xcJgg.js rename to jesse/static/_nuxt/DU23lKGZ.js index 8c85bee36..4f2d898c4 100644 --- a/jesse/static/_nuxt/Bp2xcJgg.js +++ b/jesse/static/_nuxt/DU23lKGZ.js @@ -1 +1 @@ -import{o as s,c as l,a as t,g as U,x as w,t as $,n as v,k as a,p as ee,f as te,_ as T,C as oe,D as I,E as z,G as J,X as D,H as se,I as ae,J as N,K as ne,L as y,M as f,O as i,N as B,d as P,F as L,i as R,j,an as re,ao as le,a3 as ie,P as de,a9 as ce,r as A,b as c,w as M,S as ue,l as pe,v as ge,a5 as me,V as S,ai as fe,ab as he,Z as be,$ as ve,ac as ye,W as ke}from"./Crvr41uX.js";function _e(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})])}function we(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 3v1.5M3 21v-6m0 0 2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5M3 15V4.5"})])}function $e(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}const xe={wrapper:"w-full relative overflow-hidden",inner:"w-0 flex-1",title:"text-sm font-medium",description:"mt-1 text-sm leading-4 opacity-90",actions:"flex items-center gap-2 mt-3 flex-shrink-0",shadow:"",rounded:"rounded-lg",padding:"p-4",gap:"gap-3",icon:{base:"flex-shrink-0 w-5 h-5"},avatar:{base:"flex-shrink-0 self-center",size:"md"},color:{white:{solid:"text-gray-900 dark:text-white bg-white dark:bg-gray-900 ring-1 ring-gray-200 dark:ring-gray-800"}},variant:{solid:"bg-{color}-500 dark:bg-{color}-400 text-white dark:text-gray-900",outline:"text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400",soft:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400",subtle:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 ring-opacity-25 dark:ring-opacity-25"},default:{color:"white",variant:"solid",icon:null,closeButton:null,actionButton:{size:"xs",color:"primary",variant:"link"}}},Ce=e=>(ee("data-v-88f4951a"),e=e(),te(),e),Be=Ce(()=>t("div",{class:"left-half-clipper"},[t("div",{class:"first50-bar"}),t("div",{class:"value-bar"})],-1)),Me=U({__name:"CircleProgressbar",props:{progress:{}},setup(e){const o=e,d=w(()=>{let u="progress-circle";return o.progress>50&&(u+=" over50"),u+=` p${Math.round(o.progress)}`,u});return(u,x)=>(s(),l("div",{class:v(a(d))},[t("span",null,$(u.progress)+"%",1),Be],2))}}),nt=T(Me,[["__scopeId","data-v-88f4951a"]]),h=oe(I.ui.strategy,I.ui.alert,xe),Ve=U({components:{UIcon:z,UAvatar:J,UButton:D},inheritAttrs:!1,props:{title:{type:String,default:null},description:{type:String,default:null},icon:{type:String,default:()=>h.default.icon},avatar:{type:Object,default:null},closeButton:{type:Object,default:()=>h.default.closeButton},actions:{type:Array,default:()=>[]},color:{type:String,default:()=>h.default.color,validator(e){return[...I.ui.colors,...Object.keys(h.color)].includes(e)}},variant:{type:String,default:()=>h.default.variant,validator(e){return[...Object.keys(h.variant),...Object.values(h.color).flatMap(o=>Object.keys(o))].includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["close"],setup(e){const{ui:o,attrs:d}=se("alert",ae(e,"ui"),h),u=w(()=>{var k,g;const n=((g=(k=o.value.color)==null?void 0:k[e.color])==null?void 0:g[e.variant])||o.value.variant[e.variant];return N(ne(o.value.wrapper,o.value.rounded,o.value.shadow,o.value.padding,n==null?void 0:n.replaceAll("{color}",e.color)),e.class)});function x(n){n.click&&n.click()}return{ui:o,attrs:d,alertClass:u,onAction:x,twMerge:N}}});function Se(e,o,d,u,x,n){const k=z,g=J,b=D;return s(),l("div",B({class:e.alertClass},e.attrs),[t("div",{class:v(["flex",[e.ui.gap,{"items-start":e.description||e.$slots.description,"items-center":!e.description&&!e.$slots.description}]])},[y(e.$slots,"icon",{icon:e.icon},()=>[e.icon?(s(),f(k,{key:0,name:e.icon,ui:e.ui.icon.base},null,8,["name","ui"])):i("",!0)]),y(e.$slots,"avatar",{avatar:e.avatar},()=>[e.avatar?(s(),f(g,B({key:0},{size:e.ui.avatar.size,...e.avatar},{class:e.ui.avatar.base}),null,16,["class"])):i("",!0)]),t("div",{class:v(e.ui.inner)},[e.title||e.$slots.title?(s(),l("p",{key:0,class:v(e.ui.title)},[y(e.$slots,"title",{title:e.title},()=>[P($(e.title),1)])],2)):i("",!0),e.description||e.$slots.description?(s(),l("p",{key:1,class:v(e.twMerge(e.ui.description,!(e.title&&e.$slots.title)&&"mt-0 leading-5"))},[y(e.$slots,"description",{description:e.description},()=>[P($(e.description),1)])],2)):i("",!0),(e.description||e.$slots.description)&&e.actions.length?(s(),l("div",{key:2,class:v(e.ui.actions)},[(s(!0),l(L,null,R(e.actions,(p,C)=>(s(),f(b,B({key:C},{...e.ui.default.actionButton||{},...p},{onClick:j(V=>e.onAction(p),["stop"])}),null,16,["onClick"]))),128))],2)):i("",!0)],2),e.closeButton||!e.description&&!e.$slots.description&&e.actions.length?(s(),l("div",{key:0,class:v(e.twMerge(e.ui.actions,"mt-0"))},[!e.description&&!e.$slots.description&&e.actions.length?(s(!0),l(L,{key:0},R(e.actions,(p,C)=>(s(),f(b,B({key:C},{...e.ui.default.actionButton||{},...p},{onClick:j(V=>e.onAction(p),["stop"])}),null,16,["onClick"]))),128)):i("",!0),e.closeButton?(s(),f(b,B({key:1,"aria-label":"Close"},{...e.ui.default.closeButton||{},...e.closeButton},{onClick:o[0]||(o[0]=j(p=>e.$emit("close"),["stop"]))}),null,16)):i("",!0)],2)):i("",!0)],2)],16)}const Ue=T(Ve,[["render",Se]]),je={class:"w-full flex justify-between items-center"},Ae=["textContent"],Ie=t("div",{class:"w-full flex items-center","aria-hidden":"true"},[t("div",{class:"w-full border-t-2 border-dashed border-gray-300 dark:border-gray-600"})],-1),Le={class:"whitespace-nowrap ml-2"},Te=U({__name:"DividerWithButtons",props:{title:{}},setup(e){return(o,d)=>(s(),l("div",je,[t("span",{class:"pr-3 bg-gray-50 dark:bg-backdrop-dark text-lg font-semibold text-gray-900 dark:text-gray-200",textContent:$(o.title)},null,8,Ae),Ie,t("span",Le,[y(o.$slots,"default")])]))}}),De={key:0,class:"mb-4"},Oe=t("p",null," If the exception you're seeing is not clear and you think it might be a bug, please send us a report to help us debugging and fixing it in a future release. ",-1),Ee=t("br",null,null,-1),He=t("label",{class:"font-semibold"},"Exception:",-1),Ne=["innerHTML"],Pe={class:"flex justify-end"},Re=t("span",null,"Report",-1),ze={class:"rounded-md bg-red-50 p-4 my-4 select-text"},Je={class:"flex"},Fe={class:"flex-shrink-0"},We={class:"ml-3 overflow-hidden w-full"},Ge=["textContent"],Ze=["innerHTML"],qe=["value"],rt=U({__name:"Exception",props:re({title:String,content:{type:String,default:""},mode:String,debugMode:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,d=le(e,"modelValue"),u=w(()=>ie().params.id),x=de(),n=ce({description:"",attachLogs:!0,email:""}),k=A(!1),g=A(!1),b=A(!1),p=w(()=>o.mode==="backtest"&&!o.debugMode?{message:'It is highly recommended to attach log files with reports. To do that, press cancel, enable "Debug Mode", and run again. ',type:"warning"}:{message:"",type:""}),C=w(()=>o.mode==="backtest"&&o.debugMode||o.mode==="live"),V=w(()=>x.hasLivePluginInstalled),F=async()=>{b.value=!0;const{data:O,error:r}=await me("/report-exception",{description:n.description,email:n.email,traceback:o.content,mode:o.mode,attach_logs:n.attachLogs,session_id:u},!0);if(b.value=!1,r.value&&r.value.statusCode!==200){S("error",`[${r.value.statusCode}]: ${r.value.message}`);return}const _=O.value;_.data.status==="success"?(n.description="",n.email="",S("success",_.data.message),d.value=!1):_.data.status==="error"&&S("error",_.data.message)},W=()=>{navigator.clipboard.writeText(o.content),S("success","Copied successfully"),g.value=!0,setTimeout(()=>{g.value=!1},2e3)},G=()=>{d.value=!0};return(O,r)=>{const _=Ue,Z=fe,E=he,q=be,K=ve,H=D,X=ye,Q=ke,Y=Te;return s(),l(L,null,[c(Q,{modelValue:d.value,"onUpdate:modelValue":r[5]||(r[5]=m=>d.value=m),title:"Report"},{default:M(()=>[a(p).message?(s(),l("div",De,[c(_,{color:"teal",icon:"i-heroicons-check-circle",title:a(p).message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:r[0]||(r[0]=m=>a(p).message="")},null,8,["title"])])):i("",!0),Oe,Ee,He,t("pre",{class:"break-all lg:break-normal mt-2 text-sm whitespace-pre-line px-6 py-6 rounded-md bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 dark:border-gray-800 border border-gray-200",innerHTML:e.content},null,8,Ne),c(X,{state:a(n),class:"space-y-4 mt-4",onSubmit:F},{default:M(()=>[c(E,{label:"Description (optional):",name:"Description (optional):"},{default:M(()=>[c(Z,{modelValue:a(n).description,"onUpdate:modelValue":r[1]||(r[1]=m=>a(n).description=m),rows:10,placeholder:"Describe how the exception occurred..."},null,8,["modelValue"])]),_:1}),a(V)?i("",!0):(s(),f(E,{key:0,label:"Email (must be registered with on Jesse.Trade)",help:"Enter your email address for us to know who sent the feedback and possibly reply back to you. It must be the email address of your account on Jesse.Trade",required:""},{default:M(()=>[c(q,{modelValue:a(n).email,"onUpdate:modelValue":r[2]||(r[2]=m=>a(n).email=m),placeholder:"Email address...",type:"email"},null,8,["modelValue"])]),_:1})),a(C)?(s(),f(K,{key:1,modelValue:a(n).attachLogs,"onUpdate:modelValue":r[3]||(r[3]=m=>a(n).attachLogs=m),title:"Attach Debugging Logs",help:"Attach the log file of this session along with this report which helps Jesse's team"},null,8,["modelValue"])):i("",!0),t("div",Pe,[c(H,{id:"feedback-cancel-button",color:"gray",variant:"link",class:"mr-8",label:"Cancel",onClick:r[4]||(r[4]=m=>d.value=!1)}),c(H,{id:"feedback-submit-button",type:"submit",class:"w-48 flex justify-center",label:"Submit",loading:a(b),disabled:!a(n).description.length||!a(n).email.length&&!a(V)},null,8,["loading","disabled"])])]),_:1},8,["state"])]),_:1},8,["modelValue"]),c(Y,{title:"Exception"},{default:M(()=>[t("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-600 text-sm leading-5 font-medium rounded-l-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-800 focus:outline-none",onClick:G},[c(a(we),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),Re]),t("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-600 text-sm leading-5 font-medium rounded-r-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-800 focus:outline-none",onClick:W},[a(g)?(s(),f(a(ue),{key:0,class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"})):(s(),f(a(_e),{key:1,class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"})),t("span",null,$(a(g)?"Copied":"Copy"),1)])]),_:1}),t("div",ze,[t("div",Je,[t("div",Fe,[c(a($e),{class:"h-5 w-5 text-red-400","aria-hidden":"true"})]),t("div",We,[t("h3",{class:"text-base font-medium text-red-800 mb-6",textContent:$(e.title)},null,8,Ge),e.content?(s(),l("pre",{key:0,class:"mt-2 text-sm text-red-700 whitespace-pre-line px-6 py-6 rounded-md border-2 border-dashed border-red-200",innerHTML:e.content},null,8,Ze)):i("",!0)])]),pe(t("textarea",{id:"exception-info",value:e.content,class:"fixed left-0 bottom-0 opacity-0"},null,8,qe),[[ge,a(k)]])])],64)}}}),Ke={},Xe={class:"grid grid-cols-1 gap-4 items-start lg:grid-cols-3 p-6"},Qe={class:"grid grid-cols-1 gap-4 lg:col-span-2 px-1"},Ye={"aria-labelledby":"section-1-title"},et={class:"rounded-lg"},tt={class:"grid grid-cols-1 gap-4"},ot={"aria-labelledby":"section-2-title"};function st(e,o){return s(),l("div",Xe,[t("div",Qe,[t("section",Ye,[t("div",et,[y(e.$slots,"left")])])]),t("div",tt,[t("section",ot,[y(e.$slots,"right")])])])}const lt=T(Ke,[["render",st]]);export{nt as _,rt as a,lt as b,Ue as c,Te as d,_e as r}; +import{o as s,c as l,a as t,g as U,x as w,t as $,n as v,k as a,p as ee,f as te,_ as T,C as oe,D as I,E as z,G as J,X as D,H as se,I as ae,J as N,K as ne,L as y,M as f,O as i,N as B,d as P,F as L,i as R,j,an as re,ao as le,a3 as ie,P as de,a9 as ce,r as A,b as c,w as M,S as ue,l as pe,v as ge,a5 as me,V as S,ai as fe,ab as he,Z as be,$ as ve,ac as ye,W as ke}from"./iedVCmkz.js";function _e(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"})])}function we(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 3v1.5M3 21v-6m0 0 2.77-.693a9 9 0 0 1 6.208.682l.108.054a9 9 0 0 0 6.086.71l3.114-.732a48.524 48.524 0 0 1-.005-10.499l-3.11.732a9 9 0 0 1-6.085-.711l-.108-.054a9 9 0 0 0-6.208-.682L3 4.5M3 15V4.5"})])}function $e(e,o){return s(),l("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}const xe={wrapper:"w-full relative overflow-hidden",inner:"w-0 flex-1",title:"text-sm font-medium",description:"mt-1 text-sm leading-4 opacity-90",actions:"flex items-center gap-2 mt-3 flex-shrink-0",shadow:"",rounded:"rounded-lg",padding:"p-4",gap:"gap-3",icon:{base:"flex-shrink-0 w-5 h-5"},avatar:{base:"flex-shrink-0 self-center",size:"md"},color:{white:{solid:"text-gray-900 dark:text-white bg-white dark:bg-gray-900 ring-1 ring-gray-200 dark:ring-gray-800"}},variant:{solid:"bg-{color}-500 dark:bg-{color}-400 text-white dark:text-gray-900",outline:"text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400",soft:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400",subtle:"bg-{color}-50 dark:bg-{color}-400 dark:bg-opacity-10 text-{color}-500 dark:text-{color}-400 ring-1 ring-inset ring-{color}-500 dark:ring-{color}-400 ring-opacity-25 dark:ring-opacity-25"},default:{color:"white",variant:"solid",icon:null,closeButton:null,actionButton:{size:"xs",color:"primary",variant:"link"}}},Ce=e=>(ee("data-v-88f4951a"),e=e(),te(),e),Be=Ce(()=>t("div",{class:"left-half-clipper"},[t("div",{class:"first50-bar"}),t("div",{class:"value-bar"})],-1)),Me=U({__name:"CircleProgressbar",props:{progress:{}},setup(e){const o=e,d=w(()=>{let u="progress-circle";return o.progress>50&&(u+=" over50"),u+=` p${Math.round(o.progress)}`,u});return(u,x)=>(s(),l("div",{class:v(a(d))},[t("span",null,$(u.progress)+"%",1),Be],2))}}),nt=T(Me,[["__scopeId","data-v-88f4951a"]]),h=oe(I.ui.strategy,I.ui.alert,xe),Ve=U({components:{UIcon:z,UAvatar:J,UButton:D},inheritAttrs:!1,props:{title:{type:String,default:null},description:{type:String,default:null},icon:{type:String,default:()=>h.default.icon},avatar:{type:Object,default:null},closeButton:{type:Object,default:()=>h.default.closeButton},actions:{type:Array,default:()=>[]},color:{type:String,default:()=>h.default.color,validator(e){return[...I.ui.colors,...Object.keys(h.color)].includes(e)}},variant:{type:String,default:()=>h.default.variant,validator(e){return[...Object.keys(h.variant),...Object.values(h.color).flatMap(o=>Object.keys(o))].includes(e)}},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})}},emits:["close"],setup(e){const{ui:o,attrs:d}=se("alert",ae(e,"ui"),h),u=w(()=>{var k,g;const n=((g=(k=o.value.color)==null?void 0:k[e.color])==null?void 0:g[e.variant])||o.value.variant[e.variant];return N(ne(o.value.wrapper,o.value.rounded,o.value.shadow,o.value.padding,n==null?void 0:n.replaceAll("{color}",e.color)),e.class)});function x(n){n.click&&n.click()}return{ui:o,attrs:d,alertClass:u,onAction:x,twMerge:N}}});function Se(e,o,d,u,x,n){const k=z,g=J,b=D;return s(),l("div",B({class:e.alertClass},e.attrs),[t("div",{class:v(["flex",[e.ui.gap,{"items-start":e.description||e.$slots.description,"items-center":!e.description&&!e.$slots.description}]])},[y(e.$slots,"icon",{icon:e.icon},()=>[e.icon?(s(),f(k,{key:0,name:e.icon,ui:e.ui.icon.base},null,8,["name","ui"])):i("",!0)]),y(e.$slots,"avatar",{avatar:e.avatar},()=>[e.avatar?(s(),f(g,B({key:0},{size:e.ui.avatar.size,...e.avatar},{class:e.ui.avatar.base}),null,16,["class"])):i("",!0)]),t("div",{class:v(e.ui.inner)},[e.title||e.$slots.title?(s(),l("p",{key:0,class:v(e.ui.title)},[y(e.$slots,"title",{title:e.title},()=>[P($(e.title),1)])],2)):i("",!0),e.description||e.$slots.description?(s(),l("p",{key:1,class:v(e.twMerge(e.ui.description,!(e.title&&e.$slots.title)&&"mt-0 leading-5"))},[y(e.$slots,"description",{description:e.description},()=>[P($(e.description),1)])],2)):i("",!0),(e.description||e.$slots.description)&&e.actions.length?(s(),l("div",{key:2,class:v(e.ui.actions)},[(s(!0),l(L,null,R(e.actions,(p,C)=>(s(),f(b,B({key:C},{...e.ui.default.actionButton||{},...p},{onClick:j(V=>e.onAction(p),["stop"])}),null,16,["onClick"]))),128))],2)):i("",!0)],2),e.closeButton||!e.description&&!e.$slots.description&&e.actions.length?(s(),l("div",{key:0,class:v(e.twMerge(e.ui.actions,"mt-0"))},[!e.description&&!e.$slots.description&&e.actions.length?(s(!0),l(L,{key:0},R(e.actions,(p,C)=>(s(),f(b,B({key:C},{...e.ui.default.actionButton||{},...p},{onClick:j(V=>e.onAction(p),["stop"])}),null,16,["onClick"]))),128)):i("",!0),e.closeButton?(s(),f(b,B({key:1,"aria-label":"Close"},{...e.ui.default.closeButton||{},...e.closeButton},{onClick:o[0]||(o[0]=j(p=>e.$emit("close"),["stop"]))}),null,16)):i("",!0)],2)):i("",!0)],2)],16)}const Ue=T(Ve,[["render",Se]]),je={class:"w-full flex justify-between items-center"},Ae=["textContent"],Ie=t("div",{class:"w-full flex items-center","aria-hidden":"true"},[t("div",{class:"w-full border-t-2 border-dashed border-gray-300 dark:border-gray-600"})],-1),Le={class:"whitespace-nowrap ml-2"},Te=U({__name:"DividerWithButtons",props:{title:{}},setup(e){return(o,d)=>(s(),l("div",je,[t("span",{class:"pr-3 bg-gray-50 dark:bg-backdrop-dark text-lg font-semibold text-gray-900 dark:text-gray-200",textContent:$(o.title)},null,8,Ae),Ie,t("span",Le,[y(o.$slots,"default")])]))}}),De={key:0,class:"mb-4"},Oe=t("p",null," If the exception you're seeing is not clear and you think it might be a bug, please send us a report to help us debugging and fixing it in a future release. ",-1),Ee=t("br",null,null,-1),He=t("label",{class:"font-semibold"},"Exception:",-1),Ne=["innerHTML"],Pe={class:"flex justify-end"},Re=t("span",null,"Report",-1),ze={class:"rounded-md bg-red-50 p-4 my-4 select-text"},Je={class:"flex"},Fe={class:"flex-shrink-0"},We={class:"ml-3 overflow-hidden w-full"},Ge=["textContent"],Ze=["innerHTML"],qe=["value"],rt=U({__name:"Exception",props:re({title:String,content:{type:String,default:""},mode:String,debugMode:{type:Boolean,default:!1}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const o=e,d=le(e,"modelValue"),u=w(()=>ie().params.id),x=de(),n=ce({description:"",attachLogs:!0,email:""}),k=A(!1),g=A(!1),b=A(!1),p=w(()=>o.mode==="backtest"&&!o.debugMode?{message:'It is highly recommended to attach log files with reports. To do that, press cancel, enable "Debug Mode", and run again. ',type:"warning"}:{message:"",type:""}),C=w(()=>o.mode==="backtest"&&o.debugMode||o.mode==="live"),V=w(()=>x.hasLivePluginInstalled),F=async()=>{b.value=!0;const{data:O,error:r}=await me("/report-exception",{description:n.description,email:n.email,traceback:o.content,mode:o.mode,attach_logs:n.attachLogs,session_id:u},!0);if(b.value=!1,r.value&&r.value.statusCode!==200){S("error",`[${r.value.statusCode}]: ${r.value.message}`);return}const _=O.value;_.data.status==="success"?(n.description="",n.email="",S("success",_.data.message),d.value=!1):_.data.status==="error"&&S("error",_.data.message)},W=()=>{navigator.clipboard.writeText(o.content),S("success","Copied successfully"),g.value=!0,setTimeout(()=>{g.value=!1},2e3)},G=()=>{d.value=!0};return(O,r)=>{const _=Ue,Z=fe,E=he,q=be,K=ve,H=D,X=ye,Q=ke,Y=Te;return s(),l(L,null,[c(Q,{modelValue:d.value,"onUpdate:modelValue":r[5]||(r[5]=m=>d.value=m),title:"Report"},{default:M(()=>[a(p).message?(s(),l("div",De,[c(_,{color:"teal",icon:"i-heroicons-check-circle",title:a(p).message,"close-button":{icon:"i-heroicons-x-mark-20-solid",color:"white",variant:"link"},onClose:r[0]||(r[0]=m=>a(p).message="")},null,8,["title"])])):i("",!0),Oe,Ee,He,t("pre",{class:"break-all lg:break-normal mt-2 text-sm whitespace-pre-line px-6 py-6 rounded-md bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 dark:border-gray-800 border border-gray-200",innerHTML:e.content},null,8,Ne),c(X,{state:a(n),class:"space-y-4 mt-4",onSubmit:F},{default:M(()=>[c(E,{label:"Description (optional):",name:"Description (optional):"},{default:M(()=>[c(Z,{modelValue:a(n).description,"onUpdate:modelValue":r[1]||(r[1]=m=>a(n).description=m),rows:10,placeholder:"Describe how the exception occurred..."},null,8,["modelValue"])]),_:1}),a(V)?i("",!0):(s(),f(E,{key:0,label:"Email (must be registered with on Jesse.Trade)",help:"Enter your email address for us to know who sent the feedback and possibly reply back to you. It must be the email address of your account on Jesse.Trade",required:""},{default:M(()=>[c(q,{modelValue:a(n).email,"onUpdate:modelValue":r[2]||(r[2]=m=>a(n).email=m),placeholder:"Email address...",type:"email"},null,8,["modelValue"])]),_:1})),a(C)?(s(),f(K,{key:1,modelValue:a(n).attachLogs,"onUpdate:modelValue":r[3]||(r[3]=m=>a(n).attachLogs=m),title:"Attach Debugging Logs",help:"Attach the log file of this session along with this report which helps Jesse's team"},null,8,["modelValue"])):i("",!0),t("div",Pe,[c(H,{id:"feedback-cancel-button",color:"gray",variant:"link",class:"mr-8",label:"Cancel",onClick:r[4]||(r[4]=m=>d.value=!1)}),c(H,{id:"feedback-submit-button",type:"submit",class:"w-48 flex justify-center",label:"Submit",loading:a(b),disabled:!a(n).description.length||!a(n).email.length&&!a(V)},null,8,["loading","disabled"])])]),_:1},8,["state"])]),_:1},8,["modelValue"]),c(Y,{title:"Exception"},{default:M(()=>[t("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-600 text-sm leading-5 font-medium rounded-l-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-800 focus:outline-none",onClick:G},[c(a(we),{class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"}),Re]),t("button",{type:"button",class:"inline-flex items-center shadow-sm px-4 py-1.5 border border-gray-300 dark:border-gray-600 text-sm leading-5 font-medium rounded-r-full text-gray-700 dark:text-gray-100 bg-white dark:bg-backdrop-dark hover:bg-gray-50 dark:hover:bg-gray-800 focus:outline-none",onClick:W},[a(g)?(s(),f(a(ue),{key:0,class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"})):(s(),f(a(_e),{key:1,class:"-ml-1.5 mr-1 h-5 w-5 text-gray-400","aria-hidden":"true"})),t("span",null,$(a(g)?"Copied":"Copy"),1)])]),_:1}),t("div",ze,[t("div",Je,[t("div",Fe,[c(a($e),{class:"h-5 w-5 text-red-400","aria-hidden":"true"})]),t("div",We,[t("h3",{class:"text-base font-medium text-red-800 mb-6",textContent:$(e.title)},null,8,Ge),e.content?(s(),l("pre",{key:0,class:"mt-2 text-sm text-red-700 whitespace-pre-line px-6 py-6 rounded-md border-2 border-dashed border-red-200",innerHTML:e.content},null,8,Ze)):i("",!0)])]),pe(t("textarea",{id:"exception-info",value:e.content,class:"fixed left-0 bottom-0 opacity-0"},null,8,qe),[[ge,a(k)]])])],64)}}}),Ke={},Xe={class:"grid grid-cols-1 gap-4 items-start lg:grid-cols-3 p-6"},Qe={class:"grid grid-cols-1 gap-4 lg:col-span-2 px-1"},Ye={"aria-labelledby":"section-1-title"},et={class:"rounded-lg"},tt={class:"grid grid-cols-1 gap-4"},ot={"aria-labelledby":"section-2-title"};function st(e,o){return s(),l("div",Xe,[t("div",Qe,[t("section",Ye,[t("div",et,[y(e.$slots,"left")])])]),t("div",tt,[t("section",ot,[y(e.$slots,"right")])])])}const lt=T(Ke,[["render",st]]);export{nt as _,rt as a,lt as b,Ue as c,Te as d,_e as r}; diff --git a/jesse/static/_nuxt/okIQluvx.js b/jesse/static/_nuxt/DYsvrwWH.js similarity index 93% rename from jesse/static/_nuxt/okIQluvx.js rename to jesse/static/_nuxt/DYsvrwWH.js index 7d8653eff..2badcbed9 100644 --- a/jesse/static/_nuxt/okIQluvx.js +++ b/jesse/static/_nuxt/DYsvrwWH.js @@ -1 +1 @@ -import{g as f,bd as m,be as d,x as r,bf as I,o as x,c as v,B as _,_ as S}from"./Crvr41uX.js";const g=f({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({efdb04fa:p.value}));const t=d(),s=u,l=r(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),c=r(()=>I(l.value)),p=r(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${c.value.prefix}/${c.value.name}.svg')`}),i=r(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(x(),v("span",{style:_({width:i.value,height:i.value})},null,4))}}),b=S(g,[["__scopeId","data-v-41e8d397"]]);export{b as default}; +import{g as f,bd as m,be as d,x as r,bf as I,o as x,c as v,B as _,_ as S}from"./iedVCmkz.js";const g=f({__name:"IconCSS",props:{name:{type:String,required:!0},size:{type:String,default:""}},setup(u){m(e=>({efdb04fa:p.value}));const t=d(),s=u,l=r(()=>{var e,n;return(n=(e=t.nuxtIcon)==null?void 0:e.aliases)!=null&&n[s.name]?t.nuxtIcon.aliases[s.name]:s.name}),c=r(()=>I(l.value)),p=r(()=>{var o,a;const e=(a=(o=t.nuxtIcon)==null?void 0:o.iconifyApiOptions)==null?void 0:a.url;if(e)try{new URL(e)}catch{console.warn("Nuxt IconCSS: Invalid custom Iconify API URL");return}return`url('${e||"https://api.iconify.design"}/${c.value.prefix}/${c.value.name}.svg')`}),i=r(()=>{var n,o,a;if(!s.size&&typeof((n=t.nuxtIcon)==null?void 0:n.size)=="boolean"&&!((o=t.nuxtIcon)!=null&&o.size))return;const e=s.size||((a=t.nuxtIcon)==null?void 0:a.size)||"1em";return String(Number(e))===e?`${e}px`:e});return(e,n)=>(x(),v("span",{style:_({width:i.value,height:i.value})},null,4))}}),b=S(g,[["__scopeId","data-v-41e8d397"]]);export{b as default}; diff --git a/jesse/static/_nuxt/QcdhOkh-.js b/jesse/static/_nuxt/DddLSi-Q.js similarity index 82% rename from jesse/static/_nuxt/QcdhOkh-.js rename to jesse/static/_nuxt/DddLSi-Q.js index cb01eedb5..d6fe3b370 100644 --- a/jesse/static/_nuxt/QcdhOkh-.js +++ b/jesse/static/_nuxt/DddLSi-Q.js @@ -1 +1 @@ -import{_ as r,o as t,c as o,L as s,a}from"./Crvr41uX.js";const c={},n={class:"text-center rounded border-2 border-dashed border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 py-4 text-sm"},d=a("span",{class:"text-gray-400"}," Empty ",-1);function _(e,l){return t(),o("div",n,[s(e.$slots,"default",{},()=>[d])])}const g=r(c,[["render",_]]);export{g as _}; +import{_ as r,o as t,c as o,L as s,a}from"./iedVCmkz.js";const c={},n={class:"text-center rounded border-2 border-dashed border-gray-300 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 py-4 text-sm"},d=a("span",{class:"text-gray-400"}," Empty ",-1);function _(e,l){return t(),o("div",n,[s(e.$slots,"default",{},()=>[d])])}const g=r(c,[["render",_]]);export{g as _}; diff --git a/jesse/static/_nuxt/CgXrlsHy.js b/jesse/static/_nuxt/DmRYB_4R.js similarity index 80% rename from jesse/static/_nuxt/CgXrlsHy.js rename to jesse/static/_nuxt/DmRYB_4R.js index 861ef35ab..276ef1049 100644 --- a/jesse/static/_nuxt/CgXrlsHy.js +++ b/jesse/static/_nuxt/DmRYB_4R.js @@ -1 +1 @@ -import{_ as e,o,c as t,a as s,L as c}from"./Crvr41uX.js";const n={},r={class:"py-10 mx-auto"},l={class:"mx-auto max-w-7xl px-2 md:px-8"},_={class:"max-w-[600px] mx-auto"};function d(a,m){return o(),t("div",r,[s("main",null,[s("div",l,[s("div",_,[c(a.$slots,"default")])])])])}const x=e(n,[["render",d]]);export{x as S}; +import{_ as e,o,c as t,a as s,L as c}from"./iedVCmkz.js";const n={},r={class:"py-10 mx-auto"},l={class:"mx-auto max-w-7xl px-2 md:px-8"},_={class:"max-w-[600px] mx-auto"};function d(a,m){return o(),t("div",r,[s("main",null,[s("div",l,[s("div",_,[c(a.$slots,"default")])])])])}const x=e(n,[["render",d]]);export{x as S}; diff --git a/jesse/static/_nuxt/Bimrvkt9.js b/jesse/static/_nuxt/KtMNHRoY.js similarity index 97% rename from jesse/static/_nuxt/Bimrvkt9.js rename to jesse/static/_nuxt/KtMNHRoY.js index c94904171..cd2d2b1f7 100644 --- a/jesse/static/_nuxt/Bimrvkt9.js +++ b/jesse/static/_nuxt/KtMNHRoY.js @@ -1 +1 @@ -import{g as I,r as V,P as E,o as u,M as y,w as r,a as t,t as c,b as n,k as a,a4 as D,c as w,O as v,U as W,a5 as U,a6 as C,V as K,X as N,a7 as B,a8 as F,a9 as M,x as P,d as b,i as T,F as L,aa as G,ab as H,Z as O,ac as R}from"./Crvr41uX.js";import{_ as X}from"./tIZ0BYDc.js";import{_ as Z}from"./QcdhOkh-.js";import{u as z}from"./DbaDxTuc.js";import{S as J}from"./CgXrlsHy.js";const Q={class:"flex justify-between items-center mb-2"},Y={class:"text-xl font-bold"},ee={class:"text-sm text-gray-500 dark:text-gray-400"},ae={class:"mt-4"},te={class:"flex justify-between"},se=t("span",{class:"font-medium"},"API Key:",-1),ne={class:"flex justify-between"},le=t("span",{class:"font-medium"},"API Secret:",-1),oe={key:0},re={class:"flex justify-between"},ie=t("span",{class:"font-medium"},"API Passphrase:",-1),de={class:"flex justify-between"},ue=t("span",{class:"font-medium"},"Wallet Address:",-1),pe={class:"flex justify-between"},ce=t("span",{class:"font-medium"},"Stark Private Key:",-1),_e=I({__name:"ExchangeApiKey",props:{apiKey:{}},setup(S){const f=S,i=V(!1),e=V(!1),_=E();async function h(){e.value=!0;const{data:o,error:d}=await U("/exchange-api-keys/delete",{id:f.apiKey.id},!0);if(e.value=!1,d.value&&d.value.statusCode!==200){C(d);return}i.value=!1,K("success","API Key deleted successfully"),_.exchangeApiKeys=_.exchangeApiKeys.filter(x=>x.id!==f.apiKey.id)}return(o,d)=>{const x=N,A=B,s=F;return u(),y(s,{class:"mb-4 p-4 bg-white"},{default:r(()=>[t("div",Q,[t("h2",Y,c(o.apiKey.name)+" • "+c(o.apiKey.exchange),1),n(x,{icon:"i-heroicons-trash",color:"red",label:"Delete",variant:"link",onClick:d[0]||(d[0]=p=>i.value=!0)})]),t("p",ee,c(a(D)(o.apiKey.created_at).value),1),t("div",ae,[t("div",te,[se,t("span",null,c(o.apiKey.api_key),1)]),t("div",ne,[le,t("span",null,c(o.apiKey.api_secret),1)]),o.apiKey.exchange.startsWith("Dydx")||o.apiKey.exchange.startsWith("Apex")?(u(),w("div",oe,[t("div",re,[ie,t("span",null,c(o.apiKey.api_passphrase),1)]),t("div",de,[ue,t("span",null,c(o.apiKey.wallet_address),1)]),t("div",pe,[ce,t("span",null,c(o.apiKey.stark_private_key),1)])])):v("",!0)]),n(A,{modelValue:a(i),"onUpdate:modelValue":d[1]||(d[1]=p=>W(i)?i.value=p:null),title:"Delete API Key",description:`Are you sure you want to delete '${o.apiKey.name}' API key?`,type:"info"},{default:r(()=>[n(x,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",loading:a(e),onClick:h},null,8,["loading"])]),_:1},8,["modelValue","description"])]),_:1})}}}),me=t("p",null,[b(" Here you can add your API keys for various exchanges. API keys are used to connect your account to the exchange and allow the bot to trade on your behalf. "),t("br"),t("br"),b("Please note that for security reasons, once created, API keys cannot be modified or seen again. ")],-1),ye=t("br",null,null,-1),fe={class:"flex justify-end"},he={class:"mt-8"},xe={key:0},Ke=I({__name:"exchange-api-keys",setup(S){z({title:"Exchange API Keys"});const f=V(!1),i=E(),e=M({exchange:i.liveTradingExchangeNames[0],name:"",apiKey:"",apiSecret:"",apiPassphrase:"",walletAddress:"",stark_private_key:""}),_=P(()=>i.exchangeApiKeys),h=P(()=>e.exchange.startsWith("Dydx")||e.exchange.startsWith("Apex")),o=P(()=>e.exchange.startsWith("Dydx")||e.exchange.startsWith("Apex")?e.exchange&&e.apiKey&&e.apiSecret&&e.apiPassphrase&&e.walletAddress&&e.stark_private_key:e.exchange&&e.apiKey&&e.apiSecret);async function d(){if(!o.value){K("error","Please fill in all required fields");return}f.value=!0;const A={name:e.name,exchange:e.exchange,api_key:e.apiKey,api_secret:e.apiSecret};h.value&&(A.additional_fields={api_passphrase:e.apiPassphrase,wallet_address:e.walletAddress,stark_private_key:e.stark_private_key});const{data:s,error:p}=await U("/exchange-api-keys/store",A,!0);f.value=!1,p.value&&p.value.statusCode!==200&&C(p);const g=s.value;g.status==="success"?(K("success","Successfully added API key"),_.value.push(g.data),x()):g.status==="error"&&K("error",g.message)}function x(){e.exchange=i.liveTradingExchangeNames[0],e.name="",e.apiKey="",e.apiSecret="",e.apiPassphrase="",e.walletAddress="",e.stark_private_key=""}return(A,s)=>{const p=G,g=X,m=H,k=O,j=N,$=R,q=Z;return u(),y(J,null,{default:r(()=>[n(p,null,{default:r(()=>[b(" Exchange API Keys ")]),_:1}),me,ye,n($,{state:a(e),class:"space-y-4",onSubmit:d},{default:r(()=>[n(m,{label:"Exchange name:",required:""},{default:r(()=>[n(g,{modelValue:a(e).exchange,"onUpdate:modelValue":s[0]||(s[0]=l=>a(e).exchange=l),searchable:"",options:a(i).liveTradingExchangeNames},null,8,["modelValue","options"])]),_:1}),n(m,{label:"Name:",required:""},{default:r(()=>[n(k,{modelValue:a(e).name,"onUpdate:modelValue":s[1]||(s[1]=l=>a(e).name=l),type:"text",placeholder:"Give a name to this API key (e.g. subaccount1)"},null,8,["modelValue"])]),_:1}),n(m,{label:"API Key:",required:""},{default:r(()=>[n(k,{modelValue:a(e).apiKey,"onUpdate:modelValue":s[2]||(s[2]=l=>a(e).apiKey=l),placeholder:"Enter your API key here",type:"text"},null,8,["modelValue"])]),_:1}),n(m,{label:"API Secret:",required:""},{default:r(()=>[n(k,{modelValue:a(e).apiSecret,"onUpdate:modelValue":s[3]||(s[3]=l=>a(e).apiSecret=l),placeholder:"Enter your API secret here",type:"text"},null,8,["modelValue"])]),_:1}),a(h)?(u(),y(m,{key:0,label:"API Passphrase:",required:""},{default:r(()=>[n(k,{modelValue:a(e).apiPassphrase,"onUpdate:modelValue":s[4]||(s[4]=l=>a(e).apiPassphrase=l),placeholder:"Enter your API passphrase here",type:"text"},null,8,["modelValue"])]),_:1})):v("",!0),a(h)?(u(),y(m,{key:1,label:"Wallet Address:",required:""},{default:r(()=>[n(k,{modelValue:a(e).walletAddress,"onUpdate:modelValue":s[5]||(s[5]=l=>a(e).walletAddress=l),placeholder:"Enter your wallet address here",type:"text"},null,8,["modelValue"])]),_:1})):v("",!0),a(h)?(u(),y(m,{key:2,label:"Stark Private Key:",required:""},{default:r(()=>[n(k,{modelValue:a(e).stark_private_key,"onUpdate:modelValue":s[6]||(s[6]=l=>a(e).stark_private_key=l),placeholder:"Enter your Stark private key here",type:"text"},null,8,["modelValue"])]),_:1})):v("",!0),t("div",fe,[n(j,{type:"submit",icon:"i-heroicons-plus",class:"w-48 flex justify-center",label:"Create",loading:a(f),disabled:!a(o)},null,8,["loading","disabled"])])]),_:1},8,["state"]),t("div",he,[n(p,null,{default:r(()=>[b(" Previously Added "),a(_).length?(u(),w("span",xe,"("+c(a(_).length)+")",1)):v("",!0)]),_:1}),a(_).length?v("",!0):(u(),y(q,{key:0},{default:r(()=>[b(" No API keys added yet ")]),_:1})),(u(!0),w(L,null,T(a(_),l=>(u(),y(_e,{key:l.id,"api-key":l},null,8,["api-key"]))),128))])]),_:1})}}});export{Ke as default}; +import{g as I,r as V,P as E,o as u,M as y,w as r,a as t,t as c,b as n,k as a,a4 as D,c as w,O as v,U as W,a5 as U,a6 as C,V as K,X as N,a7 as B,a8 as F,a9 as M,x as P,d as b,i as T,F as L,aa as G,ab as H,Z as O,ac as R}from"./iedVCmkz.js";import{_ as X}from"./DRlj9p5R.js";import{_ as Z}from"./DddLSi-Q.js";import{u as z}from"./C7X-_NHR.js";import{S as J}from"./DmRYB_4R.js";const Q={class:"flex justify-between items-center mb-2"},Y={class:"text-xl font-bold"},ee={class:"text-sm text-gray-500 dark:text-gray-400"},ae={class:"mt-4"},te={class:"flex justify-between"},se=t("span",{class:"font-medium"},"API Key:",-1),ne={class:"flex justify-between"},le=t("span",{class:"font-medium"},"API Secret:",-1),oe={key:0},re={class:"flex justify-between"},ie=t("span",{class:"font-medium"},"API Passphrase:",-1),de={class:"flex justify-between"},ue=t("span",{class:"font-medium"},"Wallet Address:",-1),pe={class:"flex justify-between"},ce=t("span",{class:"font-medium"},"Stark Private Key:",-1),_e=I({__name:"ExchangeApiKey",props:{apiKey:{}},setup(S){const f=S,i=V(!1),e=V(!1),_=E();async function h(){e.value=!0;const{data:o,error:d}=await U("/exchange-api-keys/delete",{id:f.apiKey.id},!0);if(e.value=!1,d.value&&d.value.statusCode!==200){C(d);return}i.value=!1,K("success","API Key deleted successfully"),_.exchangeApiKeys=_.exchangeApiKeys.filter(x=>x.id!==f.apiKey.id)}return(o,d)=>{const x=N,A=B,s=F;return u(),y(s,{class:"mb-4 p-4 bg-white"},{default:r(()=>[t("div",Q,[t("h2",Y,c(o.apiKey.name)+" • "+c(o.apiKey.exchange),1),n(x,{icon:"i-heroicons-trash",color:"red",label:"Delete",variant:"link",onClick:d[0]||(d[0]=p=>i.value=!0)})]),t("p",ee,c(a(D)(o.apiKey.created_at).value),1),t("div",ae,[t("div",te,[se,t("span",null,c(o.apiKey.api_key),1)]),t("div",ne,[le,t("span",null,c(o.apiKey.api_secret),1)]),o.apiKey.exchange.startsWith("Dydx")||o.apiKey.exchange.startsWith("Apex")?(u(),w("div",oe,[t("div",re,[ie,t("span",null,c(o.apiKey.api_passphrase),1)]),t("div",de,[ue,t("span",null,c(o.apiKey.wallet_address),1)]),t("div",pe,[ce,t("span",null,c(o.apiKey.stark_private_key),1)])])):v("",!0)]),n(A,{modelValue:a(i),"onUpdate:modelValue":d[1]||(d[1]=p=>W(i)?i.value=p:null),title:"Delete API Key",description:`Are you sure you want to delete '${o.apiKey.name}' API key?`,type:"info"},{default:r(()=>[n(x,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",loading:a(e),onClick:h},null,8,["loading"])]),_:1},8,["modelValue","description"])]),_:1})}}}),me=t("p",null,[b(" Here you can add your API keys for various exchanges. API keys are used to connect your account to the exchange and allow the bot to trade on your behalf. "),t("br"),t("br"),b("Please note that for security reasons, once created, API keys cannot be modified or seen again. ")],-1),ye=t("br",null,null,-1),fe={class:"flex justify-end"},he={class:"mt-8"},xe={key:0},Ke=I({__name:"exchange-api-keys",setup(S){z({title:"Exchange API Keys"});const f=V(!1),i=E(),e=M({exchange:i.liveTradingExchangeNames[0],name:"",apiKey:"",apiSecret:"",apiPassphrase:"",walletAddress:"",stark_private_key:""}),_=P(()=>i.exchangeApiKeys),h=P(()=>e.exchange.startsWith("Dydx")||e.exchange.startsWith("Apex")),o=P(()=>e.exchange.startsWith("Dydx")||e.exchange.startsWith("Apex")?e.exchange&&e.apiKey&&e.apiSecret&&e.apiPassphrase&&e.walletAddress&&e.stark_private_key:e.exchange&&e.apiKey&&e.apiSecret);async function d(){if(!o.value){K("error","Please fill in all required fields");return}f.value=!0;const A={name:e.name,exchange:e.exchange,api_key:e.apiKey,api_secret:e.apiSecret};h.value&&(A.additional_fields={api_passphrase:e.apiPassphrase,wallet_address:e.walletAddress,stark_private_key:e.stark_private_key});const{data:s,error:p}=await U("/exchange-api-keys/store",A,!0);f.value=!1,p.value&&p.value.statusCode!==200&&C(p);const g=s.value;g.status==="success"?(K("success","Successfully added API key"),_.value.push(g.data),x()):g.status==="error"&&K("error",g.message)}function x(){e.exchange=i.liveTradingExchangeNames[0],e.name="",e.apiKey="",e.apiSecret="",e.apiPassphrase="",e.walletAddress="",e.stark_private_key=""}return(A,s)=>{const p=G,g=X,m=H,k=O,j=N,$=R,q=Z;return u(),y(J,null,{default:r(()=>[n(p,null,{default:r(()=>[b(" Exchange API Keys ")]),_:1}),me,ye,n($,{state:a(e),class:"space-y-4",onSubmit:d},{default:r(()=>[n(m,{label:"Exchange name:",required:""},{default:r(()=>[n(g,{modelValue:a(e).exchange,"onUpdate:modelValue":s[0]||(s[0]=l=>a(e).exchange=l),searchable:"",options:a(i).liveTradingExchangeNames},null,8,["modelValue","options"])]),_:1}),n(m,{label:"Name:",required:""},{default:r(()=>[n(k,{modelValue:a(e).name,"onUpdate:modelValue":s[1]||(s[1]=l=>a(e).name=l),type:"text",placeholder:"Give a name to this API key (e.g. subaccount1)"},null,8,["modelValue"])]),_:1}),n(m,{label:"API Key:",required:""},{default:r(()=>[n(k,{modelValue:a(e).apiKey,"onUpdate:modelValue":s[2]||(s[2]=l=>a(e).apiKey=l),placeholder:"Enter your API key here",type:"text"},null,8,["modelValue"])]),_:1}),n(m,{label:"API Secret:",required:""},{default:r(()=>[n(k,{modelValue:a(e).apiSecret,"onUpdate:modelValue":s[3]||(s[3]=l=>a(e).apiSecret=l),placeholder:"Enter your API secret here",type:"text"},null,8,["modelValue"])]),_:1}),a(h)?(u(),y(m,{key:0,label:"API Passphrase:",required:""},{default:r(()=>[n(k,{modelValue:a(e).apiPassphrase,"onUpdate:modelValue":s[4]||(s[4]=l=>a(e).apiPassphrase=l),placeholder:"Enter your API passphrase here",type:"text"},null,8,["modelValue"])]),_:1})):v("",!0),a(h)?(u(),y(m,{key:1,label:"Wallet Address:",required:""},{default:r(()=>[n(k,{modelValue:a(e).walletAddress,"onUpdate:modelValue":s[5]||(s[5]=l=>a(e).walletAddress=l),placeholder:"Enter your wallet address here",type:"text"},null,8,["modelValue"])]),_:1})):v("",!0),a(h)?(u(),y(m,{key:2,label:"Stark Private Key:",required:""},{default:r(()=>[n(k,{modelValue:a(e).stark_private_key,"onUpdate:modelValue":s[6]||(s[6]=l=>a(e).stark_private_key=l),placeholder:"Enter your Stark private key here",type:"text"},null,8,["modelValue"])]),_:1})):v("",!0),t("div",fe,[n(j,{type:"submit",icon:"i-heroicons-plus",class:"w-48 flex justify-center",label:"Create",loading:a(f),disabled:!a(o)},null,8,["loading","disabled"])])]),_:1},8,["state"]),t("div",he,[n(p,null,{default:r(()=>[b(" Previously Added "),a(_).length?(u(),w("span",xe,"("+c(a(_).length)+")",1)):v("",!0)]),_:1}),a(_).length?v("",!0):(u(),y(q,{key:0},{default:r(()=>[b(" No API keys added yet ")]),_:1})),(u(!0),w(L,null,T(a(_),l=>(u(),y(_e,{key:l.id,"api-key":l},null,8,["api-key"]))),128))])]),_:1})}}});export{Ke as default}; diff --git a/jesse/static/_nuxt/WmUs_TNl.js b/jesse/static/_nuxt/NCCfBubN.js similarity index 97% rename from jesse/static/_nuxt/WmUs_TNl.js rename to jesse/static/_nuxt/NCCfBubN.js index 8253907c3..14e5c50cc 100644 --- a/jesse/static/_nuxt/WmUs_TNl.js +++ b/jesse/static/_nuxt/NCCfBubN.js @@ -1 +1 @@ -import{_ as a,u as o,o as s,c as i,a as e,t as r,p as u,f as l}from"./Crvr41uX.js";const c=t=>(u("data-v-6fdef64d"),t=t(),l(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},f=["textContent"],g=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,f),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,g)])]))}},k=a(b,[["__scopeId","data-v-6fdef64d"]]);export{k as default}; +import{_ as a,u as o,o as s,c as i,a as e,t as r,p as u,f as l}from"./iedVCmkz.js";const c=t=>(u("data-v-6fdef64d"),t=t(),l(),t),d={class:"font-sans antialiased bg-white dark:bg-black text-black dark:text-white grid min-h-screen place-content-center overflow-hidden"},p=c(()=>e("div",{class:"fixed -bottom-1/2 left-0 right-0 h-1/2 spotlight"},null,-1)),h={class:"max-w-520px text-center"},f=["textContent"],g=["textContent"],b={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},version:{type:String,default:""},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Server error"},description:{type:String,default:"This page is temporarily unavailable."}},setup(t){const n=t;return o({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[],style:[{children:'*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(m,x)=>(s(),i("div",d,[p,e("div",h,[e("h1",{class:"text-8xl sm:text-10xl font-medium mb-8",textContent:r(t.statusCode)},null,8,f),e("p",{class:"text-xl px-8 sm:px-0 sm:text-4xl font-light mb-16 leading-tight",textContent:r(t.description)},null,8,g)])]))}},k=a(b,[["__scopeId","data-v-6fdef64d"]]);export{k as default}; diff --git a/jesse/static/_nuxt/Dggi9RR5.js b/jesse/static/_nuxt/WHO4wNIc.js similarity index 77% rename from jesse/static/_nuxt/Dggi9RR5.js rename to jesse/static/_nuxt/WHO4wNIc.js index 1f7df8435..76895bc59 100644 --- a/jesse/static/_nuxt/Dggi9RR5.js +++ b/jesse/static/_nuxt/WHO4wNIc.js @@ -1 +1 @@ -import{g as n,a1 as r,ah as c,o as i,c as p}from"./Crvr41uX.js";const _=n({__name:"index",setup(u){const o=r(),e=c(),t=Object.keys(e.tabs);if(t.length>0){const s=t[0],a=e.tabs[s];o.push({path:`/live/${a.id}`})}else e.addTab();return(s,a)=>(i(),p("div"))}});export{_ as default}; +import{g as n,a1 as r,ah as c,o as i,c as p}from"./iedVCmkz.js";const _=n({__name:"index",setup(u){const o=r(),e=c(),t=Object.keys(e.tabs);if(t.length>0){const s=t[0],a=e.tabs[s];o.push({path:`/live/${a.id}`})}else e.addTab();return(s,a)=>(i(),p("div"))}});export{_ as default}; diff --git a/jesse/static/_nuxt/D7LfWr59.js b/jesse/static/_nuxt/WIlyI65S.js similarity index 96% rename from jesse/static/_nuxt/D7LfWr59.js rename to jesse/static/_nuxt/WIlyI65S.js index cf31bc5f1..5453a5af1 100644 --- a/jesse/static/_nuxt/D7LfWr59.js +++ b/jesse/static/_nuxt/WIlyI65S.js @@ -1 +1 @@ -import{g as C,r as U,P as D,o as r,M as c,w as i,a as o,t as k,b as n,k as t,a4 as E,c as K,O as u,U as T,a5 as N,a6 as S,V as A,X as $,a7 as F,a8 as M,a9 as R,x as P,d as _,i as W,F as G,aa as H,e as O,ab as X,Z,ac as z}from"./Crvr41uX.js";import{_ as J}from"./tIZ0BYDc.js";import{_ as Q}from"./QcdhOkh-.js";import{u as Y}from"./DbaDxTuc.js";import{S as ee}from"./CgXrlsHy.js";const te={class:"flex justify-between items-center mb-2"},oe={class:"text-xl font-bold"},ae={class:"text-sm text-gray-500 dark:text-gray-400"},ne={class:"mt-4"},se={key:0,class:"flex justify-between"},le=o("span",{class:"font-medium"},"Bot Token:",-1),ie={key:1,class:"flex justify-between"},re=o("span",{class:"font-medium"},"Chat ID:",-1),de={key:2,class:"flex justify-between"},ue=o("span",{class:"font-medium"},"Webhook URL:",-1),ce=C({__name:"NotificationApiKey",props:{apiKey:{}},setup(I){const b=I,m=U(!1),h=U(!1),e=D();async function p(){h.value=!0;const{data:s,error:d}=await N("/notification-api-keys/delete",{id:b.apiKey.id},!0);if(h.value=!1,d.value&&d.value.statusCode!==200){S(d);return}m.value=!1,A("success","API Key deleted successfully"),e.notificationApiKeys=e.notificationApiKeys.filter(v=>v.id!==b.apiKey.id)}return(s,d)=>{const v=$,f=F,a=M;return r(),c(a,{class:"mb-4 p-4 bg-white"},{default:i(()=>[o("div",te,[o("h2",oe,k(s.apiKey.name)+" • "+k(s.apiKey.driver),1),n(v,{icon:"i-heroicons-trash",color:"red",label:"Delete",variant:"link",onClick:d[0]||(d[0]=y=>m.value=!0)})]),o("p",ae,k(t(E)(s.apiKey.created_at).value),1),o("div",ne,[s.apiKey.bot_token?(r(),K("div",se,[le,o("span",null,k(s.apiKey.bot_token),1)])):u("",!0),s.apiKey.chat_id?(r(),K("div",ie,[re,o("span",null,k(s.apiKey.chat_id),1)])):u("",!0),s.apiKey.webhook?(r(),K("div",de,[ue,o("span",null,k(s.apiKey.webhook),1)])):u("",!0),n(f,{modelValue:t(m),"onUpdate:modelValue":d[1]||(d[1]=y=>T(m)?m.value=y:null),title:"Delete API Key",description:`Are you sure you want to delete '${s.apiKey.name}' API key?`,type:"info"},{default:i(()=>[n(v,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",loading:t(h),onClick:p},null,8,["loading"])]),_:1},8,["modelValue","description"])])]),_:1})}}}),_e=o("p",null,[_(" Here you can add your API keys for various notification drivers. API keys are used to connect your account to the notification driver and allow the bot to send notifications on your behalf. "),o("br"),o("br"),_("Please note that for security reasons, once created, API keys cannot be modified or seen again. ")],-1),me=o("br",null,null,-1),pe=o("br",null,null,-1),fe={class:"flex justify-end"},ye={class:"mt-8"},ke={key:0},we=C({__name:"notification-api-keys",setup(I){Y({title:"Notification API Keys"});const b=U(!1),m=D(),h=[{label:"Telegram",value:"telegram"},{label:"Discord",value:"discord"},{label:"Slack",value:"slack"}],e=R({name:"",driver:h[0].value,bot_token:"",chat_id:"",webhook:""}),p=P(()=>m.notificationApiKeys),s=P(()=>e.driver==="telegram"?e.bot_token&&e.chat_id:e.webhook);async function d(){if(!s.value){A("error","Please fill in all required fields");return}const f={};e.driver==="telegram"?(f.bot_token=e.bot_token,f.chat_id=e.chat_id):(e.driver==="discord"||e.driver==="slack")&&(f.webhook=e.webhook);const a={driver:e.driver,name:e.name,fields:f};b.value=!0;const{data:y,error:w}=await N("/notification-api-keys/store",a,!0);b.value=!1,w.value&&w.value.statusCode!==200&&S(w);const g=y.value;g.status==="success"?(A("success","Successfully added API key"),p.value.push(g.data),v()):g.status==="error"&&A("error",g.message)}function v(){e.chat_id="",e.bot_token="",e.webhook="",e.name=""}return(f,a)=>{const y=H,w=O,g=J,V=X,x=Z,B=$,L=z,j=Q,q=ce;return r(),c(ee,null,{default:i(()=>[n(y,null,{default:i(()=>[_(" Notification API Keys ")]),_:1}),_e,me,o("p",null,[_(" If you need help setting up your API keys, please refer to the documentation for "),n(w,{class:"underline",href:"https://docs.jesse.trade/docs/notifications",target:"_blank"},{default:i(()=>[_("notification drivers")]),_:1}),_(". ")]),pe,n(L,{state:t(e),class:"space-y-4",onSubmit:d},{default:i(()=>[n(V,{label:"Driver:",required:""},{default:i(()=>[n(g,{modelValue:t(e).driver,"onUpdate:modelValue":a[0]||(a[0]=l=>t(e).driver=l),"value-attribute":"value",options:h},null,8,["modelValue"])]),_:1}),n(V,{label:"Name:",required:""},{default:i(()=>[n(x,{modelValue:t(e).name,"onUpdate:modelValue":a[1]||(a[1]=l=>t(e).name=l),type:"text",placeholder:"Give a name to this API key to identify it later"},null,8,["modelValue"])]),_:1}),t(e).driver==="telegram"?(r(),c(V,{key:0,label:"Bot Token:",required:""},{default:i(()=>[n(x,{modelValue:t(e).bot_token,"onUpdate:modelValue":a[2]||(a[2]=l=>t(e).bot_token=l),type:"text",placeholder:"Enter your Telegram bot token"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="telegram"?(r(),c(V,{key:1,label:"Chat ID:",required:""},{default:i(()=>[n(x,{modelValue:t(e).chat_id,"onUpdate:modelValue":a[3]||(a[3]=l=>t(e).chat_id=l),type:"text",placeholder:"Enter your Telegram chat ID"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="discord"?(r(),c(V,{key:2,label:"Webhook URL:",required:""},{default:i(()=>[n(x,{modelValue:t(e).webhook,"onUpdate:modelValue":a[4]||(a[4]=l=>t(e).webhook=l),type:"text",placeholder:"Enter your Discord webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="slack"?(r(),c(V,{key:3,label:"Webhook URL:",required:""},{default:i(()=>[n(x,{modelValue:t(e).webhook,"onUpdate:modelValue":a[5]||(a[5]=l=>t(e).webhook=l),type:"text",placeholder:"Enter your Slack webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),o("div",fe,[n(B,{type:"submit",icon:"i-heroicons-plus",class:"w-48 flex justify-center",label:"Create",loading:t(b),disabled:!t(s)},null,8,["loading","disabled"])])]),_:1},8,["state"]),o("div",ye,[n(y,null,{default:i(()=>[_(" Previously Added "),t(p).length?(r(),K("span",ke,"("+k(t(p).length)+")",1)):u("",!0)]),_:1}),t(p).length?u("",!0):(r(),c(j,{key:0},{default:i(()=>[_(" No API keys added yet ")]),_:1})),(r(!0),K(G,null,W(t(p),l=>(r(),c(q,{key:l.id,"api-key":l},null,8,["api-key"]))),128))])]),_:1})}}});export{we as default}; +import{g as C,r as U,P as D,o as r,M as c,w as i,a as o,t as k,b as n,k as t,a4 as E,c as K,O as u,U as T,a5 as N,a6 as S,V as A,X as $,a7 as F,a8 as M,a9 as R,x as P,d as _,i as W,F as G,aa as H,e as O,ab as X,Z,ac as z}from"./iedVCmkz.js";import{_ as J}from"./DRlj9p5R.js";import{_ as Q}from"./DddLSi-Q.js";import{u as Y}from"./C7X-_NHR.js";import{S as ee}from"./DmRYB_4R.js";const te={class:"flex justify-between items-center mb-2"},oe={class:"text-xl font-bold"},ae={class:"text-sm text-gray-500 dark:text-gray-400"},ne={class:"mt-4"},se={key:0,class:"flex justify-between"},le=o("span",{class:"font-medium"},"Bot Token:",-1),ie={key:1,class:"flex justify-between"},re=o("span",{class:"font-medium"},"Chat ID:",-1),de={key:2,class:"flex justify-between"},ue=o("span",{class:"font-medium"},"Webhook URL:",-1),ce=C({__name:"NotificationApiKey",props:{apiKey:{}},setup(I){const b=I,m=U(!1),h=U(!1),e=D();async function p(){h.value=!0;const{data:s,error:d}=await N("/notification-api-keys/delete",{id:b.apiKey.id},!0);if(h.value=!1,d.value&&d.value.statusCode!==200){S(d);return}m.value=!1,A("success","API Key deleted successfully"),e.notificationApiKeys=e.notificationApiKeys.filter(v=>v.id!==b.apiKey.id)}return(s,d)=>{const v=$,f=F,a=M;return r(),c(a,{class:"mb-4 p-4 bg-white"},{default:i(()=>[o("div",te,[o("h2",oe,k(s.apiKey.name)+" • "+k(s.apiKey.driver),1),n(v,{icon:"i-heroicons-trash",color:"red",label:"Delete",variant:"link",onClick:d[0]||(d[0]=y=>m.value=!0)})]),o("p",ae,k(t(E)(s.apiKey.created_at).value),1),o("div",ne,[s.apiKey.bot_token?(r(),K("div",se,[le,o("span",null,k(s.apiKey.bot_token),1)])):u("",!0),s.apiKey.chat_id?(r(),K("div",ie,[re,o("span",null,k(s.apiKey.chat_id),1)])):u("",!0),s.apiKey.webhook?(r(),K("div",de,[ue,o("span",null,k(s.apiKey.webhook),1)])):u("",!0),n(f,{modelValue:t(m),"onUpdate:modelValue":d[1]||(d[1]=y=>T(m)?m.value=y:null),title:"Delete API Key",description:`Are you sure you want to delete '${s.apiKey.name}' API key?`,type:"info"},{default:i(()=>[n(v,{variant:"solid",color:"red",class:"flex justify-center",label:"Delete",loading:t(h),onClick:p},null,8,["loading"])]),_:1},8,["modelValue","description"])])]),_:1})}}}),_e=o("p",null,[_(" Here you can add your API keys for various notification drivers. API keys are used to connect your account to the notification driver and allow the bot to send notifications on your behalf. "),o("br"),o("br"),_("Please note that for security reasons, once created, API keys cannot be modified or seen again. ")],-1),me=o("br",null,null,-1),pe=o("br",null,null,-1),fe={class:"flex justify-end"},ye={class:"mt-8"},ke={key:0},we=C({__name:"notification-api-keys",setup(I){Y({title:"Notification API Keys"});const b=U(!1),m=D(),h=[{label:"Telegram",value:"telegram"},{label:"Discord",value:"discord"},{label:"Slack",value:"slack"}],e=R({name:"",driver:h[0].value,bot_token:"",chat_id:"",webhook:""}),p=P(()=>m.notificationApiKeys),s=P(()=>e.driver==="telegram"?e.bot_token&&e.chat_id:e.webhook);async function d(){if(!s.value){A("error","Please fill in all required fields");return}const f={};e.driver==="telegram"?(f.bot_token=e.bot_token,f.chat_id=e.chat_id):(e.driver==="discord"||e.driver==="slack")&&(f.webhook=e.webhook);const a={driver:e.driver,name:e.name,fields:f};b.value=!0;const{data:y,error:w}=await N("/notification-api-keys/store",a,!0);b.value=!1,w.value&&w.value.statusCode!==200&&S(w);const g=y.value;g.status==="success"?(A("success","Successfully added API key"),p.value.push(g.data),v()):g.status==="error"&&A("error",g.message)}function v(){e.chat_id="",e.bot_token="",e.webhook="",e.name=""}return(f,a)=>{const y=H,w=O,g=J,V=X,x=Z,B=$,L=z,j=Q,q=ce;return r(),c(ee,null,{default:i(()=>[n(y,null,{default:i(()=>[_(" Notification API Keys ")]),_:1}),_e,me,o("p",null,[_(" If you need help setting up your API keys, please refer to the documentation for "),n(w,{class:"underline",href:"https://docs.jesse.trade/docs/notifications",target:"_blank"},{default:i(()=>[_("notification drivers")]),_:1}),_(". ")]),pe,n(L,{state:t(e),class:"space-y-4",onSubmit:d},{default:i(()=>[n(V,{label:"Driver:",required:""},{default:i(()=>[n(g,{modelValue:t(e).driver,"onUpdate:modelValue":a[0]||(a[0]=l=>t(e).driver=l),"value-attribute":"value",options:h},null,8,["modelValue"])]),_:1}),n(V,{label:"Name:",required:""},{default:i(()=>[n(x,{modelValue:t(e).name,"onUpdate:modelValue":a[1]||(a[1]=l=>t(e).name=l),type:"text",placeholder:"Give a name to this API key to identify it later"},null,8,["modelValue"])]),_:1}),t(e).driver==="telegram"?(r(),c(V,{key:0,label:"Bot Token:",required:""},{default:i(()=>[n(x,{modelValue:t(e).bot_token,"onUpdate:modelValue":a[2]||(a[2]=l=>t(e).bot_token=l),type:"text",placeholder:"Enter your Telegram bot token"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="telegram"?(r(),c(V,{key:1,label:"Chat ID:",required:""},{default:i(()=>[n(x,{modelValue:t(e).chat_id,"onUpdate:modelValue":a[3]||(a[3]=l=>t(e).chat_id=l),type:"text",placeholder:"Enter your Telegram chat ID"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="discord"?(r(),c(V,{key:2,label:"Webhook URL:",required:""},{default:i(()=>[n(x,{modelValue:t(e).webhook,"onUpdate:modelValue":a[4]||(a[4]=l=>t(e).webhook=l),type:"text",placeholder:"Enter your Discord webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),t(e).driver==="slack"?(r(),c(V,{key:3,label:"Webhook URL:",required:""},{default:i(()=>[n(x,{modelValue:t(e).webhook,"onUpdate:modelValue":a[5]||(a[5]=l=>t(e).webhook=l),type:"text",placeholder:"Enter your Slack webhook URL"},null,8,["modelValue"])]),_:1})):u("",!0),o("div",fe,[n(B,{type:"submit",icon:"i-heroicons-plus",class:"w-48 flex justify-center",label:"Create",loading:t(b),disabled:!t(s)},null,8,["loading","disabled"])])]),_:1},8,["state"]),o("div",ye,[n(y,null,{default:i(()=>[_(" Previously Added "),t(p).length?(r(),K("span",ke,"("+k(t(p).length)+")",1)):u("",!0)]),_:1}),t(p).length?u("",!0):(r(),c(j,{key:0},{default:i(()=>[_(" No API keys added yet ")]),_:1})),(r(!0),K(G,null,W(t(p),l=>(r(),c(q,{key:l.id,"api-key":l},null,8,["api-key"]))),128))])]),_:1})}}});export{we as default}; diff --git a/jesse/static/_nuxt/builds/latest.json b/jesse/static/_nuxt/builds/latest.json index f0638b1b2..0e91cc335 100644 --- a/jesse/static/_nuxt/builds/latest.json +++ b/jesse/static/_nuxt/builds/latest.json @@ -1 +1 @@ -{"id":"f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5","timestamp":1721389944925} \ No newline at end of file +{"id":"312c7771-c975-4eaa-a552-b5ce097b8b39","timestamp":1721915942227} \ No newline at end of file diff --git a/jesse/static/_nuxt/builds/meta/312c7771-c975-4eaa-a552-b5ce097b8b39.json b/jesse/static/_nuxt/builds/meta/312c7771-c975-4eaa-a552-b5ce097b8b39.json new file mode 100644 index 000000000..60eb2e6c2 --- /dev/null +++ b/jesse/static/_nuxt/builds/meta/312c7771-c975-4eaa-a552-b5ce097b8b39.json @@ -0,0 +1 @@ +{"id":"312c7771-c975-4eaa-a552-b5ce097b8b39","timestamp":1721915942227,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":["/"]} \ No newline at end of file diff --git a/jesse/static/_nuxt/builds/meta/f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5.json b/jesse/static/_nuxt/builds/meta/f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5.json deleted file mode 100644 index 6085be0b7..000000000 --- a/jesse/static/_nuxt/builds/meta/f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5","timestamp":1721389944925,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":["/"]} \ No newline at end of file diff --git a/jesse/static/_nuxt/Crvr41uX.js b/jesse/static/_nuxt/iedVCmkz.js similarity index 99% rename from jesse/static/_nuxt/Crvr41uX.js rename to jesse/static/_nuxt/iedVCmkz.js index 7f3cbf14c..d1b829067 100644 --- a/jesse/static/_nuxt/Crvr41uX.js +++ b/jesse/static/_nuxt/iedVCmkz.js @@ -1,4 +1,4 @@ -const __vite__fileDeps=["./BlJtC8uF.js","./D270KAH9.js","./1Zuu5sOE.js","./QcdhOkh-.js","./Bp2xcJgg.js","./Sidebar.CrjfLt5S.css","./tIZ0BYDc.js","./DTbDwdDV.js","./DbaDxTuc.js","./DaALoRQl.js","./Bimrvkt9.js","./CgXrlsHy.js","./bVvtH8Bk.js","./1OfPoS_-.js","./D7LfWr59.js","./CqsPNs1W.js","./okIQluvx.js","./IconCSS.Z2BAHt_z.css","./Dcndd7wk.js","./error-404.JekaaCis.css","./WmUs_TNl.js","./error-500.CNP9nqm1.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +const __vite__fileDeps=["./DTrGDXgG.js","./D3WWa22M.js","./BxVo_4D-.js","./DddLSi-Q.js","./DU23lKGZ.js","./Sidebar.CrjfLt5S.css","./DRlj9p5R.js","./nKv1GnPl.js","./C7X-_NHR.js","./CyEJo30r.js","./KtMNHRoY.js","./DmRYB_4R.js","./oJy3_idV.js","./DERVWgPS.js","./WIlyI65S.js","./CbRZ-etx.js","./DYsvrwWH.js","./IconCSS.Z2BAHt_z.css","./CI3jHjsu.js","./error-404.JekaaCis.css","./NCCfBubN.js","./error-500.CNP9nqm1.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); /** * @vue/shared v3.4.23 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -17,15 +17,15 @@ const __vite__fileDeps=["./BlJtC8uF.js","./D270KAH9.js","./1Zuu5sOE.js","./QcdhO * @license MIT **/const S$="http://www.w3.org/2000/svg",C$="http://www.w3.org/1998/Math/MathML",ko=typeof document<"u"?document:null,Gm=ko&&ko.createElement("template"),E$={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const s=t==="svg"?ko.createElementNS(S$,e):t==="mathml"?ko.createElementNS(C$,e):ko.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:e=>ko.createTextNode(e),createComment:e=>ko.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ko.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,s,i){const l=n?n.previousSibling:t.lastChild;if(s&&(s===i||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{Gm.innerHTML=r==="svg"?`${e}`:r==="mathml"?`${e}`:e;const u=Gm.content;if(r==="svg"||r==="mathml"){const c=u.firstChild;for(;c.firstChild;)u.appendChild(c.firstChild);u.removeChild(c)}t.insertBefore(u,n)}return[l?l.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},po="transition",Ei="animation",ea=Symbol("_vtc"),oi=(e,{slots:t})=>Xe(MT,T$(e),t);oi.displayName="Transition";const fb={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};oi.props=qt({},Ly,fb);const Ko=(e,t=[])=>{$e(e)?e.forEach(n=>n(...t)):e&&e(...t)},Jm=e=>e?$e(e)?e.some(t=>t.length>1):e.length>1:!1;function T$(e){const t={};for(const z in e)z in fb||(t[z]=e[z]);if(e.css===!1)return t;const{name:n="v",type:r,duration:s,enterFromClass:i=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:p=l,appearToClass:d=u,leaveFromClass:g=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,_=$$(s),x=_&&_[0],b=_&&_[1],{onBeforeEnter:E,onEnter:C,onEnterCancelled:S,onLeave:A,onLeaveCancelled:B,onBeforeAppear:L=E,onAppear:U=C,onAppearCancelled:j=S}=t,q=(z,be,ce)=>{Go(z,be?d:u),Go(z,be?p:l),ce&&ce()},K=(z,be)=>{z._isLeaving=!1,Go(z,g),Go(z,v),Go(z,h),be&&be()},Y=z=>(be,ce)=>{const ke=z?U:C,ie=()=>q(be,z,ce);Ko(ke,[be,ie]),Zm(()=>{Go(be,z?c:i),ho(be,z?d:u),Jm(ke)||Ym(be,r,x,ie)})};return qt(t,{onBeforeEnter(z){Ko(E,[z]),ho(z,i),ho(z,l)},onBeforeAppear(z){Ko(L,[z]),ho(z,c),ho(z,p)},onEnter:Y(!1),onAppear:Y(!0),onLeave(z,be){z._isLeaving=!0;const ce=()=>K(z,be);ho(z,g),R$(),ho(z,h),Zm(()=>{z._isLeaving&&(Go(z,g),ho(z,v),Jm(A)||Ym(z,r,b,ce))}),Ko(A,[z,ce])},onEnterCancelled(z){q(z,!1),Ko(S,[z])},onAppearCancelled(z){q(z,!0),Ko(j,[z])},onLeaveCancelled(z){K(z),Ko(B,[z])}})}function $$(e){if(e==null)return null;if(xt(e))return[nf(e.enter),nf(e.leave)];{const t=nf(e);return[t,t]}}function nf(e){return ty(e)}function ho(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ea]||(e[ea]=new Set)).add(t)}function Go(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[ea];n&&(n.delete(t),n.size||(e[ea]=void 0))}function Zm(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let A$=0;function Ym(e,t,n,r){const s=e._endId=++A$,i=()=>{s===e._endId&&r()};if(n)return setTimeout(i,n);const{type:l,timeout:u,propCount:c}=I$(e,t);if(!l)return r();const p=l+"end";let d=0;const g=()=>{e.removeEventListener(p,h),i()},h=v=>{v.target===e&&++d>=c&&g()};setTimeout(()=>{d(n[_]||"").split(", "),s=r(`${po}Delay`),i=r(`${po}Duration`),l=Qm(s,i),u=r(`${Ei}Delay`),c=r(`${Ei}Duration`),p=Qm(u,c);let d=null,g=0,h=0;t===po?l>0&&(d=po,g=l,h=i.length):t===Ei?p>0&&(d=Ei,g=p,h=c.length):(g=Math.max(l,p),d=g>0?l>p?po:Ei:null,h=d?d===po?i.length:c.length:0);const v=d===po&&/\b(transform|all)(,|$)/.test(r(`${po}Property`).toString());return{type:d,timeout:g,propCount:h,hasTransform:v}}function Qm(e,t){for(;e.lengthXm(n)+Xm(e[r])))}function Xm(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function R$(){return document.body.offsetHeight}function O$(e,t,n){const r=e[ea];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const eu=Symbol("_vod"),db=Symbol("_vsh"),NF={beforeMount(e,{value:t},{transition:n}){e[eu]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ti(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ti(e,!0),r.enter(e)):r.leave(e,()=>{Ti(e,!1)}):Ti(e,t))},beforeUnmount(e,{value:t}){Ti(e,t)}};function Ti(e,t){e.style.display=t?e[eu]:"none",e[db]=!t}const pb=Symbol("");function jF(e){const t=ir();if(!t)return;const n=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Jf(i,s))},r=()=>{const s=e(t.proxy);Gf(t.subTree,s),n(s)};ct(()=>{IT(r);const s=new MutationObserver(r);s.observe(t.subTree.el.parentNode,{childList:!0}),Ht(()=>s.disconnect())})}function Gf(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Gf(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Jf(e.el,t);else if(e.type===Ye)e.children.forEach(n=>Gf(n,t));else if(e.type===qs){let{el:n,anchor:r}=e;for(;n&&(Jf(n,t),n!==r);)n=n.nextSibling}}function Jf(e,t){if(e.nodeType===1){const n=e.style;let r="";for(const s in t)n.setProperty(`--${s}`,t[s]),r+=`--${s}: ${t[s]};`;n[pb]=r}}const P$=/(^|;)\s*display\s*:/;function L$(e,t,n){const r=e.style,s=Rt(n);let i=!1;if(n&&!s){if(t)if(Rt(t))for(const l of t.split(";")){const u=l.slice(0,l.indexOf(":")).trim();n[u]==null&&Ml(r,u,"")}else for(const l in t)n[l]==null&&Ml(r,l,"");for(const l in n)l==="display"&&(i=!0),Ml(r,l,n[l])}else if(s){if(t!==n){const l=r[pb];l&&(n+=";"+l),r.cssText=n,i=P$.test(n)}}else t&&e.removeAttribute("style");eu in e&&(e[eu]=i?r.display:"",e[db]&&(r.display="none"))}const e0=/\s*!important$/;function Ml(e,t,n){if($e(n))n.forEach(r=>Ml(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=M$(e,t);e0.test(n)?e.setProperty(ys(r),n.replace(e0,""),"important"):e[r]=n}}const t0=["Webkit","Moz","ms"],rf={};function M$(e,t){const n=rf[t];if(n)return n;let r=mr(t);if(r!=="filter"&&r in e)return rf[t]=r;r=hu(r);for(let s=0;sof||(j$.then(()=>of=0),of=Date.now());function H$(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;or(z$(r,n.value),t,5,[r])};return n.value=e,n.attached=U$(),n}function z$(e,t){if($e(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>s=>!s._stopped&&r&&r(s))}else return t}const s0=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,W$=(e,t,n,r,s,i,l,u,c)=>{const p=s==="svg";t==="class"?O$(e,r,p):t==="style"?L$(e,n,r):ua(t)?Bd(t)||V$(e,t,n,r,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):q$(e,t,r,p))?F$(e,t,r,i,l,u,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),B$(e,t,r,p))};function q$(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&s0(t)&&Fe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return s0(t)&&Rt(n)?!1:t in e}const tu=e=>{const t=e.props["onUpdate:modelValue"]||!1;return $e(t)?n=>js(t,n):t};function K$(e){e.target.composing=!0}function i0(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ks=Symbol("_assign"),G$={created(e,{modifiers:{lazy:t,trim:n,number:r}},s){e[Ks]=tu(s);const i=r||s.props&&s.props.type==="number";ns(e,t?"change":"input",l=>{if(l.target.composing)return;let u=e.value;n&&(u=u.trim()),i&&(u=If(u)),e[Ks](u)}),n&&ns(e,"change",()=>{e.value=e.value.trim()}),t||(ns(e,"compositionstart",K$),ns(e,"compositionend",i0),ns(e,"change",i0))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:s}},i){if(e[Ks]=tu(i),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?If(e.value):e.value,u=t??"";l!==u&&(document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===u)||(e.value=u))}},J$={deep:!0,created(e,t,n){e[Ks]=tu(n),ns(e,"change",()=>{const r=e._modelValue,s=Z$(e),i=e.checked,l=e[Ks];if($e(r)){const u=oy(r,s),c=u!==-1;if(i&&!c)l(r.concat(s));else if(!i&&c){const p=[...r];p.splice(u,1),l(p)}}else if(du(r)){const u=new Set(r);i?u.add(s):u.delete(s),l(u)}else l(hb(e,i))})},mounted:a0,beforeUpdate(e,t,n){e[Ks]=tu(n),a0(e,t,n)}};function a0(e,{value:t,oldValue:n},r){e._modelValue=t,$e(t)?e.checked=oy(t,r.props.value)>-1:du(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=gu(t,hb(e,!0)))}function Z$(e){return"_value"in e?e._value:e.value}function hb(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Y$=["ctrl","shift","alt","meta"],Q$={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Y$.some(n=>e[`${n}Key`]&&!t.includes(n))},Bl=(e,t)=>{const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(s,...i)=>{for(let l=0;l{const t=X$().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=vb(r);if(!s)return;const i=t._component;!Fe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.innerHTML="";const l=n(s,!1,mb(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),l},t},nA=(...e)=>{const t=eA().createApp(...e),{mount:n}=t;return t.mount=r=>{const s=vb(r);if(s)return n(s,!0,mb(s))},t};function mb(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function vb(e){return Rt(e)?document.querySelector(e):e}const rA=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,oA=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,sA=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function iA(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){aA(e);return}return t}function aA(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function ta(e,t={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const r=n.toLowerCase();if(r==="true")return!0;if(r==="false")return!1;if(r==="undefined")return;if(r==="null")return null;if(r==="nan")return Number.NaN;if(r==="infinity")return Number.POSITIVE_INFINITY;if(r==="-infinity")return Number.NEGATIVE_INFINITY}if(!sA.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(rA.test(e)||oA.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,iA)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}const lA=/#/g,uA=/&/g,cA=/\//g,fA=/=/g,ap=/\+/g,dA=/%5e/gi,pA=/%60/gi,hA=/%7c/gi,gA=/%20/gi;function mA(e){return encodeURI(""+e).replace(hA,"|")}function Zf(e){return mA(typeof e=="string"?e:JSON.stringify(e)).replace(ap,"%2B").replace(gA,"+").replace(lA,"%23").replace(uA,"%26").replace(pA,"`").replace(dA,"^").replace(cA,"%2F")}function sf(e){return Zf(e).replace(fA,"%3D")}function nu(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function vA(e){return nu(e.replace(ap," "))}function yA(e){return nu(e.replace(ap," "))}function yb(e=""){const t={};e[0]==="?"&&(e=e.slice(1));for(const n of e.split("&")){const r=n.match(/([^=]+)=?(.*)/)||[];if(r.length<2)continue;const s=vA(r[1]);if(s==="__proto__"||s==="constructor")continue;const i=yA(r[2]||"");t[s]===void 0?t[s]=i:Array.isArray(t[s])?t[s].push(i):t[s]=[t[s],i]}return t}function bA(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(n=>`${sf(e)}=${Zf(n)}`).join("&"):`${sf(e)}=${Zf(t)}`:sf(e)}function _A(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>bA(t,e[t])).filter(Boolean).join("&")}const wA=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,xA=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,kA=/^([/\\]\s*){2,}[^/\\]/,SA=/^[\s\0]*(blob|data|javascript|vbscript):$/i,CA=/\/$|\/\?|\/#/,EA=/^\.?\//;function Xr(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?wA.test(e):xA.test(e)||(t.acceptRelative?kA.test(e):!1)}function TA(e){return!!e&&SA.test(e)}function Yf(e="",t){return t?CA.test(e):e.endsWith("/")}function xu(e="",t){if(!t)return(Yf(e)?e.slice(0,-1):e)||"/";if(!Yf(e,!0))return e||"/";let n=e,r="";const s=e.indexOf("#");s>=0&&(n=e.slice(0,s),r=e.slice(s));const[i,...l]=n.split("?");return((i.endsWith("/")?i.slice(0,-1):i)||"/")+(l.length>0?`?${l.join("?")}`:"")+r}function ru(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(Yf(e,!0))return e||"/";let n=e,r="";const s=e.indexOf("#");if(s>=0&&(n=e.slice(0,s),r=e.slice(s),!n))return r;const[i,...l]=n.split("?");return i+"/"+(l.length>0?`?${l.join("?")}`:"")+r}function $A(e=""){return e.startsWith("/")}function u0(e=""){return $A(e)?e:"/"+e}function AA(e,t){if(_b(t)||Xr(e))return e;const n=xu(t);return e.startsWith(n)?e:ku(n,e)}function c0(e,t){if(_b(t))return e;const n=xu(t);if(!e.startsWith(n))return e;const r=e.slice(n.length);return r[0]==="/"?r:"/"+r}function bb(e,t){const n=ma(e),r={...yb(n.search),...t};return n.search=_A(r),OA(n)}function _b(e){return!e||e==="/"}function IA(e){return e&&e!=="/"}function ku(e,...t){let n=e||"";for(const r of t.filter(s=>IA(s)))if(n){const s=r.replace(EA,"");n=ru(n)+s}else n=r;return n}function wb(...e){var l,u,c,p;const t=/\/(?!\/)/,n=e.filter(Boolean),r=[];let s=0;for(const d of n)if(!(!d||d==="/")){for(const[g,h]of d.split(t).entries())if(!(!h||h===".")){if(h===".."){if(r.length===1&&Xr(r[0]))continue;r.pop(),s--;continue}if(g===1&&((l=r[r.length-1])!=null&&l.endsWith(":/"))){r[r.length-1]+="/"+h;continue}r.push(h),s++}}let i=r.join("/");return s>=0?(u=n[0])!=null&&u.startsWith("/")&&!i.startsWith("/")?i="/"+i:(c=n[0])!=null&&c.startsWith("./")&&!i.startsWith("./")&&(i="./"+i):i="../".repeat(-1*s)+i,(p=n[n.length-1])!=null&&p.endsWith("/")&&!i.endsWith("/")&&(i+="/"),i}function RA(e,t,n={}){return n.trailingSlash||(e=ru(e),t=ru(t)),n.leadingSlash||(e=u0(e),t=u0(t)),n.encoding||(e=nu(e),t=nu(t)),e===t}const xb=Symbol.for("ufo:protocolRelative");function ma(e="",t){const n=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(n){const[,g,h=""]=n;return{protocol:g.toLowerCase(),pathname:h,href:g+h,auth:"",host:"",search:"",hash:""}}if(!Xr(e,{acceptRelative:!0}))return t?ma(t+e):f0(e);const[,r="",s,i=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,l="",u=""]=i.match(/([^#/?]*)(.*)?/)||[],{pathname:c,search:p,hash:d}=f0(u.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:r.toLowerCase(),auth:s?s.slice(0,Math.max(0,s.length-1)):"",host:l,pathname:c,search:p,hash:d,[xb]:!r}}function f0(e=""){const[t="",n="",r=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:n,hash:r}}function OA(e){const t=e.pathname||"",n=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",r=e.hash||"",s=e.auth?e.auth+"@":"",i=e.host||"";return(e.protocol||e[xb]?(e.protocol||"")+"//":"")+s+i+t+n+r}class PA extends Error{constructor(t,n){super(t,n),this.name="FetchError",n!=null&&n.cause&&!this.cause&&(this.cause=n.cause)}}function LA(e){var c,p,d,g,h;const t=((c=e.error)==null?void 0:c.message)||((p=e.error)==null?void 0:p.toString())||"",n=((d=e.request)==null?void 0:d.method)||((g=e.options)==null?void 0:g.method)||"GET",r=((h=e.request)==null?void 0:h.url)||String(e.request)||"/",s=`[${n}] ${JSON.stringify(r)}`,i=e.response?`${e.response.status} ${e.response.statusText}`:"",l=`${s}: ${i}${t?` ${t}`:""}`,u=new PA(l,e.error?{cause:e.error}:void 0);for(const v of["request","options","response"])Object.defineProperty(u,v,{get(){return e[v]}});for(const[v,_]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(u,v,{get(){return e.response&&e.response[_]}});return u}const MA=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function d0(e="GET"){return MA.has(e.toUpperCase())}function BA(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const FA=new Set(["image/svg","application/xml","application/xhtml","application/html"]),DA=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function VA(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return DA.test(t)?"json":FA.has(t)||t.startsWith("text/")?"text":"blob"}function NA(e,t,n=globalThis.Headers){const r={...t,...e};if(t!=null&&t.params&&(e!=null&&e.params)&&(r.params={...t==null?void 0:t.params,...e==null?void 0:e.params}),t!=null&&t.query&&(e!=null&&e.query)&&(r.query={...t==null?void 0:t.query,...e==null?void 0:e.query}),t!=null&&t.headers&&(e!=null&&e.headers)){r.headers=new n((t==null?void 0:t.headers)||{});for(const[s,i]of new n((e==null?void 0:e.headers)||{}))r.headers.set(s,i)}return r}const jA=new Set([408,409,425,429,500,502,503,504]),UA=new Set([101,204,205,304]);function kb(e={}){const{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function s(u){const c=u.error&&u.error.name==="AbortError"&&!u.options.timeout||!1;if(u.options.retry!==!1&&!c){let d;typeof u.options.retry=="number"?d=u.options.retry:d=d0(u.options.method)?0:1;const g=u.response&&u.response.status||500;if(d>0&&(Array.isArray(u.options.retryStatusCodes)?u.options.retryStatusCodes.includes(g):jA.has(g))){const h=u.options.retryDelay||0;return h>0&&await new Promise(v=>setTimeout(v,h)),i(u.request,{...u.options,retry:d-1})}}const p=LA(u);throw Error.captureStackTrace&&Error.captureStackTrace(p,i),p}const i=async function(c,p={}){var v;const d={request:c,options:NA(p,e.defaults,n),response:void 0,error:void 0};d.options.method=(v=d.options.method)==null?void 0:v.toUpperCase(),d.options.onRequest&&await d.options.onRequest(d),typeof d.request=="string"&&(d.options.baseURL&&(d.request=AA(d.request,d.options.baseURL)),(d.options.query||d.options.params)&&(d.request=bb(d.request,{...d.options.params,...d.options.query}))),d.options.body&&d0(d.options.method)&&(BA(d.options.body)?(d.options.body=typeof d.options.body=="string"?d.options.body:JSON.stringify(d.options.body),d.options.headers=new n(d.options.headers||{}),d.options.headers.has("content-type")||d.options.headers.set("content-type","application/json"),d.options.headers.has("accept")||d.options.headers.set("accept","application/json")):("pipeTo"in d.options.body&&typeof d.options.body.pipeTo=="function"||typeof d.options.body.pipe=="function")&&("duplex"in d.options||(d.options.duplex="half")));let g;if(!d.options.signal&&d.options.timeout){const _=new r;g=setTimeout(()=>_.abort(),d.options.timeout),d.options.signal=_.signal}try{d.response=await t(d.request,d.options)}catch(_){return d.error=_,d.options.onRequestError&&await d.options.onRequestError(d),await s(d)}finally{g&&clearTimeout(g)}if(d.response.body&&!UA.has(d.response.status)&&d.options.method!=="HEAD"){const _=(d.options.parseResponse?"json":d.options.responseType)||VA(d.response.headers.get("content-type")||"");switch(_){case"json":{const x=await d.response.text(),b=d.options.parseResponse||ta;d.response._data=b(x);break}case"stream":{d.response._data=d.response.body;break}default:d.response._data=await d.response[_]()}}return d.options.onResponse&&await d.options.onResponse(d),!d.options.ignoreResponseError&&d.response.status>=400&&d.response.status<600?(d.options.onResponseError&&await d.options.onResponseError(d),await s(d)):d.response},l=async function(c,p){return(await i(c,p))._data};return l.raw=i,l.native=(...u)=>t(...u),l.create=(u={})=>kb({...e,defaults:{...e.defaults,...u}}),l}const lp=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),HA=lp.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),zA=lp.Headers,WA=lp.AbortController,qA=kb({fetch:HA,Headers:zA,AbortController:WA}),KA=qA,GA=()=>{var e;return((e=window==null?void 0:window.__NUXT__)==null?void 0:e.config)||{}},ou=GA().app,JA=()=>ou.baseURL,ZA=()=>ou.buildAssetsDir,up=(...e)=>wb(Sb(),ZA(),...e),Sb=(...e)=>{const t=ou.cdnURL||ou.baseURL;return e.length?wb(t,...e):t};globalThis.__buildAssetsURL=up,globalThis.__publicAssetsURL=Sb;globalThis.$fetch||(globalThis.$fetch=KA.create({baseURL:JA()}));function Qf(e,t={},n){for(const r in e){const s=e[r],i=n?`${n}:${r}`:r;typeof s=="object"&&s!==null?Qf(s,t,i):typeof s=="function"&&(t[i]=s)}return t}const YA={run:e=>e()},QA=()=>YA,Cb=typeof console.createTask<"u"?console.createTask:QA;function XA(e,t){const n=t.shift(),r=Cb(n);return e.reduce((s,i)=>s.then(()=>r.run(()=>i(...t))),Promise.resolve())}function eI(e,t){const n=t.shift(),r=Cb(n);return Promise.all(e.map(s=>r.run(()=>s(...t))))}function af(e,t){for(const n of[...e])n(t)}class tI{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,r={}){if(!t||typeof n!="function")return()=>{};const s=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!r.allowDeprecated){let l=i.message;l||(l=`${s} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(l)||(console.warn(l),this._deprecatedMessages.add(l))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,s=(...i)=>(typeof r=="function"&&r(),r=void 0,s=void 0,n(...i));return r=this.hook(t,s),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const s of r)this.hook(t,s)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Qf(t),r=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of r.splice(0,r.length))s()}}removeHooks(t){const n=Qf(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(XA,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(eI,t,...n)}callHookWith(t,n,...r){const s=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&af(this._before,s);const i=t(n in this._hooks?[...this._hooks[n]]:[],r);return i instanceof Promise?i.finally(()=>{this._after&&s&&af(this._after,s)}):(this._after&&s&&af(this._after,s),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Eb(){return new tI}function nI(e={}){let t,n=!1;const r=l=>{if(t&&t!==l)throw new Error("Context conflict")};let s;if(e.asyncContext){const l=e.AsyncLocalStorage||globalThis.AsyncLocalStorage;l?s=new l:console.warn("[unctx] `AsyncLocalStorage` is not provided.")}const i=()=>{if(s&&t===void 0){const l=s.getStore();if(l!==void 0)return l}return t};return{use:()=>{const l=i();if(l===void 0)throw new Error("Context is not available");return l},tryUse:()=>i(),set:(l,u)=>{u||r(l),t=l,n=!0},unset:()=>{t=void 0,n=!1},call:(l,u)=>{r(l),t=l;try{return s?s.run(l,u):u()}finally{n||(t=void 0)}},async callAsync(l,u){t=l;const c=()=>{t=l},p=()=>t===l?c:void 0;Xf.add(p);try{const d=s?s.run(l,u):u();return n||(t=void 0),await d}finally{Xf.delete(p)}}}}function rI(e={}){const t={};return{get(n,r={}){return t[n]||(t[n]=nI({...e,...r})),t[n],t[n]}}}const su=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof global<"u"?global:typeof window<"u"?window:{},p0="__unctx__",oI=su[p0]||(su[p0]=rI()),sI=(e,t={})=>oI.get(e,t),h0="__unctx_async_handlers__",Xf=su[h0]||(su[h0]=new Set);function na(e){const t=[];for(const s of Xf){const i=s();i&&t.push(i)}const n=()=>{for(const s of t)s()};let r=e();return r&&typeof r=="object"&&"catch"in r&&(r=r.catch(s=>{throw n(),s})),[r,n]}const Tb=sI("nuxt-app",{asyncContext:!1}),iI="__nuxt_plugin";function aI(e){let t=0;const n={_scope:Nd(),provide:void 0,globalName:"nuxt",versions:{get nuxt(){return"3.11.2"},get vue(){return n.vueApp.version}},payload:_n({data:{},state:{},once:new Set,_errors:{},...window.__NUXT__??{}}),static:{data:{}},runWithContext:s=>n._scope.run(()=>cI(n,s)),isHydrating:!0,deferHydration(){if(!n.isHydrating)return()=>{};t++;let s=!1;return()=>{if(!s&&(s=!0,t--,t===0))return n.isHydrating=!1,n.callHook("app:suspense:resolve")}},_asyncDataPromises:{},_asyncData:{},_payloadRevivers:{},...e};n.hooks=Eb(),n.hook=n.hooks.hook,n.callHook=n.hooks.callHook,n.provide=(s,i)=>{const l="$"+s;Sl(n,l,i),Sl(n.vueApp.config.globalProperties,l,i)},Sl(n.vueApp,"$nuxt",n),Sl(n.vueApp.config.globalProperties,"$nuxt",n);{window.addEventListener("nuxt.preloadError",i=>{n.callHook("app:chunkError",{error:i.payload})}),window.useNuxtApp=window.useNuxtApp||it;const s=n.hook("app:error",(...i)=>{console.error("[nuxt] error caught during app initialization",...i)});n.hook("app:mounted",s)}const r=n.payload.config;return n.provide("config",r),n}async function lI(e,t){if(t.hooks&&e.hooks.addHooks(t.hooks),typeof t=="function"){const{provide:n}=await e.runWithContext(()=>t(e))||{};if(n&&typeof n=="object")for(const r in n)e.provide(r,n[r])}}async function uI(e,t){const n=[],r=[],s=[],i=[];let l=0;async function u(c){var d;const p=((d=c.dependsOn)==null?void 0:d.filter(g=>t.some(h=>h._name===g)&&!n.includes(g)))??[];if(p.length>0)r.push([new Set(p),c]);else{const g=lI(e,c).then(async()=>{c._name&&(n.push(c._name),await Promise.all(r.map(async([h,v])=>{h.has(c._name)&&(h.delete(c._name),h.size===0&&(l++,await u(v)))})))});c.parallel?s.push(g.catch(h=>i.push(h))):await g}}for(const c of t)await u(c);if(await Promise.all(s),l)for(let c=0;c{}),e,{[iI]:!0,_name:t})}function cI(e,t,n){const r=()=>n?t(...n):t();return Tb.set(e),e.vueApp.runWithContext(r)}function fI(){var t;let e;return rp()&&(e=(t=ir())==null?void 0:t.appContext.app.$nuxt),e=e||Tb.tryUse(),e||null}function it(){const e=fI();if(!e)throw new Error("[nuxt] instance unavailable");return e}function Yr(e){return it().$config}function Sl(e,t,n){Object.defineProperty(e,t,{get:()=>n})}const Cl=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function dI(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},s=(t||{}).decode||gI;let i=0;for(;i{t+=s};return{toString(){return t},getContext(){return n},dispatch(s){return e.replacer&&(s=e.replacer(s)),this[s===null?"null":typeof s](s)},object(s){if(s&&typeof s.toJSON=="function")return this.object(s.toJSON());const i=Object.prototype.toString.call(s);let l="";const u=i.length;u<10?l="unknown:["+i+"]":l=i.slice(8,u-1),l=l.toLowerCase();let c=null;if((c=n.get(s))===void 0)n.set(s,n.size);else return this.dispatch("[CIRCULAR:"+c+"]");if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(s))return r("buffer:"),r(s.toString("utf8"));if(l!=="object"&&l!=="function"&&l!=="asyncfunction")this[l]?this[l](s):e.ignoreUnknown||this.unkown(s,l);else{let p=Object.keys(s);e.unorderedObjects&&(p=p.sort());let d=[];e.respectType!==!1&&!v0(s)&&(d=vI),e.excludeKeys&&(p=p.filter(h=>!e.excludeKeys(h)),d=d.filter(h=>!e.excludeKeys(h))),r("object:"+(p.length+d.length)+":");const g=h=>{this.dispatch(h),r(":"),e.excludeValues||this.dispatch(s[h]),r(",")};for(const h of p)g(h);for(const h of d)g(h)}},array(s,i){if(i=i===void 0?e.unorderedArrays!==!1:i,r("array:"+s.length+":"),!i||s.length<=1){for(const c of s)this.dispatch(c);return}const l=new Map,u=s.map(c=>{const p=$b(e);p.dispatch(c);for(const[d,g]of p.getContext())l.set(d,g);return p.toString()});return n=l,u.sort(),this.array(u,!1)},date(s){return r("date:"+s.toJSON())},symbol(s){return r("symbol:"+s.toString())},unkown(s,i){if(r(i),!!s&&(r(":"),s&&typeof s.entries=="function"))return this.array(Array.from(s.entries()),!0)},error(s){return r("error:"+s.toString())},boolean(s){return r("bool:"+s)},string(s){r("string:"+s.length+":"),r(s)},function(s){r("fn:"),v0(s)?this.dispatch("[native]"):this.dispatch(s.toString()),e.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(s.name)),e.respectFunctionProperties&&this.object(s)},number(s){return r("number:"+s)},xml(s){return r("xml:"+s.toString())},null(){return r("Null")},undefined(){return r("Undefined")},regexp(s){return r("regex:"+s.toString())},uint8array(s){return r("uint8array:"),this.dispatch(Array.prototype.slice.call(s))},uint8clampedarray(s){return r("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(s))},int8array(s){return r("int8array:"),this.dispatch(Array.prototype.slice.call(s))},uint16array(s){return r("uint16array:"),this.dispatch(Array.prototype.slice.call(s))},int16array(s){return r("int16array:"),this.dispatch(Array.prototype.slice.call(s))},uint32array(s){return r("uint32array:"),this.dispatch(Array.prototype.slice.call(s))},int32array(s){return r("int32array:"),this.dispatch(Array.prototype.slice.call(s))},float32array(s){return r("float32array:"),this.dispatch(Array.prototype.slice.call(s))},float64array(s){return r("float64array:"),this.dispatch(Array.prototype.slice.call(s))},arraybuffer(s){return r("arraybuffer:"),this.dispatch(new Uint8Array(s))},url(s){return r("url:"+s.toString())},map(s){r("map:");const i=[...s];return this.array(i,e.unorderedSets!==!1)},set(s){r("set:");const i=[...s];return this.array(i,e.unorderedSets!==!1)},file(s){return r("file:"),this.dispatch([s.name,s.size,s.type,s.lastModfied])},blob(){if(e.ignoreUnknown)return r("[blob]");throw new Error(`Hashing Blob objects is currently not supported Use "options.replacer" or "options.ignoreUnknown" -`)},domwindow(){return r("domwindow")},bigint(s){return r("bigint:"+s.toString())},process(){return r("process")},timer(){return r("timer")},pipe(){return r("pipe")},tcp(){return r("tcp")},udp(){return r("udp")},tty(){return r("tty")},statwatcher(){return r("statwatcher")},securecontext(){return r("securecontext")},connection(){return r("connection")},zlib(){return r("zlib")},context(){return r("context")},nodescript(){return r("nodescript")},httpparser(){return r("httpparser")},dataview(){return r("dataview")},signal(){return r("signal")},fsevent(){return r("fsevent")},tlswrap(){return r("tlswrap")}}}const Ab="[native code] }",yI=Ab.length;function v0(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-yI)===Ab}class Ao{constructor(t,n){t=this.words=t||[],this.sigBytes=n===void 0?t.length*4:n}toString(t){return(t||bI).stringify(this)}concat(t){if(this.clamp(),this.sigBytes%4)for(let n=0;n>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new Ao([...this.words])}}const bI={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},_I={stringify(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[];for(let r=0;r>>2]>>>24-r%4*8&255,i=e.words[r+1>>>2]>>>24-(r+1)%4*8&255,l=e.words[r+2>>>2]>>>24-(r+2)%4*8&255,u=s<<16|i<<8|l;for(let c=0;c<4&&r*8+c*6>>6*(3-c)&63))}return n.join("")}},wI={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new Ao(n,t)}},xI={parse(e){return wI.parse(unescape(encodeURIComponent(e)))}};class kI{constructor(){this._data=new Ao,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Ao,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=xI.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const s=r*this.blockSize,i=Math.min(s*4,this._data.sigBytes);if(s){for(let l=0;l>>7)^(S<<14|S>>>18)^S>>>3,B=Jo[h-2],L=(B<<15|B>>>17)^(B<<13|B>>>19)^B>>>10;Jo[h]=A+Jo[h-7]+L+Jo[h-16]}const v=c&p^~c&d,_=s&i^s&l^i&l,x=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),b=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),E=g+b+v+CI[h]+Jo[h],C=x+_;g=d,d=p,p=c,c=u+E|0,u=l,l=i,i=s,s=E+C|0}r[0]=r[0]+s|0,r[1]=r[1]+i|0,r[2]=r[2]+l|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0,r[5]=r[5]+p|0,r[6]=r[6]+d|0,r[7]=r[7]+g|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function TI(e){return new EI().finalize(e).toString(_I)}function $I(e,t={}){const n=typeof e=="string"?e:ed(e,t);return TI(n).slice(0,10)}function Ib(e,t,n={}){return e===t||ed(e,n)===ed(t,n)}function AI(e,t){return{ctx:{table:e},matchAll:n=>Ob(n,e,t)}}function Rb(e){const t={};for(const n in e)t[n]=n==="dynamic"?new Map(Object.entries(e[n]).map(([r,s])=>[r,Rb(s)])):new Map(Object.entries(e[n]));return t}function II(e){return AI(Rb(e))}function Ob(e,t,n){n!==!0&&e.endsWith("/")&&(e=e.slice(0,-1)||"/");const r=[];for(const[i,l]of b0(t.wildcard))(e===i||e.startsWith(i+"/"))&&r.push(l);for(const[i,l]of b0(t.dynamic))if(e.startsWith(i+"/")){const u="/"+e.slice(i.length).split("/").splice(2).join("/");r.push(...Ob(u,l))}const s=t.static.get(e);return s&&r.push(s),r.filter(Boolean)}function b0(e){return[...e.entries()].sort((t,n)=>t[0].length-n[0].length)}function lf(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function td(e,t,n=".",r){if(!lf(t))return td(e,{},n,r);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(r&&r(s,i,l,n)||(Array.isArray(l)&&Array.isArray(s[i])?s[i]=[...l,...s[i]]:lf(l)&&lf(s[i])?s[i]=td(l,s[i],(n?`${n}.`:"")+i.toString(),r):s[i]=l))}return s}function cp(e){return(...t)=>t.reduce((n,r)=>td(n,r,"",e),{})}const va=cp(),RI=cp((e,t,n)=>{if(e[t]!==void 0&&typeof n=="function")return e[t]=n(e[t]),!0});function OI(e,t){try{return t in e}catch{return!1}}var PI=Object.defineProperty,LI=(e,t,n)=>t in e?PI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xo=(e,t,n)=>(LI(e,typeof t!="symbol"?t+"":t,n),n);class nd extends Error{constructor(t,n={}){super(t,n),Xo(this,"statusCode",500),Xo(this,"fatal",!1),Xo(this,"unhandled",!1),Xo(this,"statusMessage"),Xo(this,"data"),Xo(this,"cause"),n.cause&&!this.cause&&(this.cause=n.cause)}toJSON(){const t={message:this.message,statusCode:od(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=Pb(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}}Xo(nd,"__h3_error__",!0);function rd(e){if(typeof e=="string")return new nd(e);if(MI(e))return e;const t=new nd(e.message??e.statusMessage??"",{cause:e.cause||e});if(OI(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=od(e.statusCode,t.statusCode):e.status&&(t.statusCode=od(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){const n=t.statusMessage;Pb(t.statusMessage)!==n&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function MI(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.__h3_error__)===!0}const BI=/[^\u0009\u0020-\u007E]/g;function Pb(e=""){return e.replace(BI,"")}function od(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}const Lb=Symbol("layout-meta"),$n=Symbol("route"),Wn=()=>{var e;return(e=it())==null?void 0:e.$router},Su=()=>rp()?Ke($n,it()._route):it()._route;const FI=()=>{try{if(it()._processingMiddleware)return!0}catch{return!1}return!1},Io=(e,t)=>{e||(e="/");const n=typeof e=="string"?e:bb(e.path||"/",e.query||{})+(e.hash||"");if(t!=null&&t.open){const{target:u="_blank",windowFeatures:c={}}=t.open,p=Object.entries(c).filter(([d,g])=>g!==void 0).map(([d,g])=>`${d.toLowerCase()}=${g}`).join(", ");return open(n,u,p),Promise.resolve()}const r=(t==null?void 0:t.external)||Xr(n,{acceptRelative:!0});if(r){if(!(t!=null&&t.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const u=ma(n).protocol;if(u&&TA(u))throw new Error(`Cannot navigate to a URL with '${u}' protocol.`)}const s=FI();if(!r&&s)return e;const i=Wn(),l=it();return r?(l._scope.stop(),t!=null&&t.replace?location.replace(n):location.href=n,s?l.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):t!=null&&t.replace?i.replace(e):i.push(e)},Mb="__nuxt_error",Cu=()=>Ot(it().payload,"error"),Fs=e=>{const t=ya(e);try{const n=it(),r=Cu();n.hooks.callHook("app:error",t),r.value=r.value||t}catch{throw t}return t},DI=async(e={})=>{const t=it(),n=Cu();t.callHook("app:error:cleared",e),e.redirect&&await Wn().replace(e.redirect),n.value=null},VI=e=>!!e&&typeof e=="object"&&Mb in e,ya=e=>{const t=rd(e);return Object.defineProperty(t,Mb,{value:!0,configurable:!1,writable:!1}),t},NI="modulepreload",jI=function(e,t){return e[0]==="."?new URL(e,t).href:e},_0={},UI=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.all(n.map(c=>{if(c=jI(c,r),c in _0)return;_0[c]=!0;const p=c.endsWith(".css"),d=p?'[rel="stylesheet"]':"";if(!!r)for(let v=i.length-1;v>=0;v--){const _=i[v];if(_.href===c&&(!p||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=p?"stylesheet":NI,p||(h.as="script",h.crossOrigin=""),h.href=c,u&&h.setAttribute("nonce",u),document.head.appendChild(h),p)return new Promise((v,_)=>{h.addEventListener("load",v),h.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${c}`)))})}))}return s.then(()=>t()).catch(i=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i})},yn=(...e)=>UI(...e).catch(t=>{const n=new Event("nuxt.preloadError");throw n.payload=t,window.dispatchEvent(n),t}),HI=-1,zI=-2,WI=-3,qI=-4,KI=-5,GI=-6;function JI(e,t){return ZI(JSON.parse(e),t)}function ZI(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function s(i,l=!1){if(i===HI)return;if(i===WI)return NaN;if(i===qI)return 1/0;if(i===KI)return-1/0;if(i===GI)return-0;if(l)throw new Error("Invalid input");if(i in r)return r[i];const u=n[i];if(!u||typeof u!="object")r[i]=u;else if(Array.isArray(u))if(typeof u[0]=="string"){const c=u[0],p=t==null?void 0:t[c];if(p)return r[i]=p(s(u[1]));switch(c){case"Date":r[i]=new Date(u[1]);break;case"Set":const d=new Set;r[i]=d;for(let v=1;v>>9)+65536).toString(16).substring(1,8).toLowerCase()}function w0(e){return e._h||fp(e._d?e._d:`${e.tag}:${e.textContent||e.innerHTML||""}:${Object.entries(e.props).map(([t,n])=>`${t}:${String(n)}`).join(",")}`)}function Fb(e,t){const{props:n,tag:r}=e;if(e3.includes(r))return r;if(r==="link"&&n.rel==="canonical")return"canonical";if(n.charset)return"charset";const s=["id"];r==="meta"&&s.push("name","property","http-equiv");for(const i of s)if(typeof n[i]<"u"){const l=String(n[i]);return t&&!t(l)?!1:`${r}:${i}:${l}`}return!1}function x0(e,t){return e==null?t||null:typeof e=="function"?e(t):e}function Db(e,t){const n=[],r=t.resolveKeyData||(i=>i.key),s=t.resolveValueData||(i=>i.value);for(const[i,l]of Object.entries(e))n.push(...(Array.isArray(l)?l:[l]).map(u=>{const c={key:i,value:u},p=s(c);return typeof p=="object"?Db(p,t):Array.isArray(p)?p:{[typeof t.key=="function"?t.key(c):t.key]:r(c),[typeof t.value=="function"?t.value(c):t.value]:p}}).flat());return n}function Vb(e,t){return Object.entries(e).map(([n,r])=>{if(typeof r=="object"&&(r=Vb(r,t)),t.resolve){const s=t.resolve({key:n,value:r});if(typeof s<"u")return s}return typeof r=="number"&&(r=r.toString()),typeof r=="string"&&t.wrapValue&&(r=r.replace(new RegExp(t.wrapValue,"g"),`\\${t.wrapValue}`),r=`${t.wrapValue}${r}${t.wrapValue}`),`${n}${t.keyValueSeparator||""}${r}`}).join(t.entrySeparator||"")}const mn=e=>({keyValue:e,metaKey:"property"}),uf=e=>({keyValue:e}),dp={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:e,value:t}){return`${Kr(e)}=${t}`}}},articleExpirationTime:mn("article:expiration_time"),articleModifiedTime:mn("article:modified_time"),articlePublishedTime:mn("article:published_time"),bookReleaseDate:mn("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:e,value:t}){return`${Kr(e)} ${t}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:mn("fb:app_id"),msapplicationConfig:uf("msapplication-Config"),msapplicationTileColor:uf("msapplication-TileColor"),msapplicationTileImage:uf("msapplication-TileImage"),ogAudioSecureUrl:mn("og:audio:secure_url"),ogAudioUrl:mn("og:audio"),ogImageSecureUrl:mn("og:image:secure_url"),ogImageUrl:mn("og:image"),ogSiteName:mn("og:site_name"),ogVideoSecureUrl:mn("og:video:secure_url"),ogVideoUrl:mn("og:video"),profileFirstName:mn("profile:first_name"),profileLastName:mn("profile:last_name"),profileUsername:mn("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:e,value:t}){if(e==="seconds")return`${t}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:e,value:t}){return typeof t=="boolean"?`${Kr(e)}`:`${Kr(e)}:${t}`}}},xUaCompatible:{metaKey:"http-equiv"}},Nb=["og","book","article","profile"];function jb(e){var n;const t=Kr(e).split(":")[0];return Nb.includes(t)?"property":((n=dp[e])==null?void 0:n.metaKey)||"name"}function n3(e){var t;return((t=dp[e])==null?void 0:t.keyValue)||Kr(e)}function Kr(e){const t=e.replace(/([A-Z])/g,"-$1").toLowerCase(),n=t.split("-")[0];return Nb.includes(n)||n==="twitter"?e.replace(/([A-Z])/g,":$1").toLowerCase():t}function sd(e){if(Array.isArray(e))return e.map(n=>sd(n));if(typeof e!="object"||Array.isArray(e))return e;const t={};for(const[n,r]of Object.entries(e))t[Kr(n)]=sd(r);return t}function r3(e,t){const n=dp[t];return t==="refresh"?`${e.seconds};url=${e.url}`:Vb(sd(e),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:r,key:s}){if(r===null)return"";if(typeof r=="boolean")return`${s}`},...n==null?void 0:n.unpack})}const Ub=["og:image","og:video","og:audio","twitter:image"];function Hb(e){const t={};return Object.entries(e).forEach(([n,r])=>{String(r)!=="false"&&n&&(t[n]=r)}),t}function k0(e,t){const n=Hb(t),r=Kr(e),s=jb(r);if(Ub.includes(r)){const i={};return Object.entries(n).forEach(([l,u])=>{i[`${e}${l==="url"?"":`${l.charAt(0).toUpperCase()}${l.slice(1)}`}`]=u}),zb(i).sort((l,u)=>{var c,p;return(((c=l[s])==null?void 0:c.length)||0)-(((p=u[s])==null?void 0:p.length)||0)})}return[{[s]:r,...n}]}function zb(e){const t=[],n={};Object.entries(e).forEach(([s,i])=>{if(!Array.isArray(i)){if(typeof i=="object"&&i){if(Ub.includes(Kr(s))){t.push(...k0(s,i));return}n[s]=Hb(i)}else n[s]=i;return}i.forEach(l=>{t.push(...typeof l=="string"?zb({[s]:l}):k0(s,l))})});const r=Db(n,{key({key:s}){return jb(s)},value({key:s}){return s==="charset"?"charset":"content"},resolveKeyData({key:s}){return n3(s)},resolveValueData({value:s,key:i}){return s===null?"_null":typeof s=="object"?r3(s,i):typeof s=="number"?s.toString():s}});return[...t,...r].map(s=>(s.content==="_null"&&(s.content=null),s))}async function o3(e,t,n){const r={tag:e,props:await Wb(typeof t=="object"&&typeof t!="function"&&!(t instanceof Promise)?{...t}:{[["script","noscript","style"].includes(e)?"innerHTML":"textContent"]:t},["templateParams","titleTemplate"].includes(e))};return Bb.forEach(s=>{const i=typeof r.props[s]<"u"?r.props[s]:n[s];typeof i<"u"&&((!["innerHTML","textContent","children"].includes(s)||QI.includes(r.tag))&&(r[s==="children"?"innerHTML":s]=i),delete r.props[s])}),r.props.body&&(r.tagPosition="bodyClose",delete r.props.body),r.tag==="script"&&typeof r.innerHTML=="object"&&(r.innerHTML=JSON.stringify(r.innerHTML),r.props.type=r.props.type||"application/json"),Array.isArray(r.props.content)?r.props.content.map(s=>({...r,props:{...r.props,content:s}})):r}function s3(e,t){var r;const n=e==="class"?" ":";";return typeof t=="object"&&!Array.isArray(t)&&(t=Object.entries(t).filter(([,s])=>s).map(([s,i])=>e==="style"?`${s}:${i}`:s)),(r=Array.isArray(t)?t.join(n):t)==null?void 0:r.split(n).filter(s=>s.trim()).filter(Boolean).join(n)}async function Wb(e,t){for(const n of Object.keys(e)){if(["class","style"].includes(n)){e[n]=s3(n,e[n]);continue}if(e[n]instanceof Promise&&(e[n]=await e[n]),!t&&!Bb.includes(n)){const r=String(e[n]),s=n.startsWith("data-");r==="true"||r===""?e[n]=s?"true":!0:e[n]||(s&&r==="false"?e[n]="false":delete e[n])}}return e}const i3=10;async function a3(e){const t=[];return Object.entries(e.resolvedInput).filter(([n,r])=>typeof r<"u"&&XI.includes(n)).forEach(([n,r])=>{const s=YI(r);t.push(...s.map(i=>o3(n,i,e)).flat())}),(await Promise.all(t)).flat().filter(Boolean).map((n,r)=>(n._e=e._i,e.mode&&(n._m=e.mode),n._p=(e._i<c&&c[p]||void 0,t):u=t[l],typeof u<"u"?(u||"").replace(/"/g,'\\"'):!1}let s=e;try{s=decodeURI(e)}catch{}return(s.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(l=>{const u=r(l.slice(1));typeof u=="string"&&(e=e.replace(new RegExp(`\\${l}(\\W|$)`,"g"),(c,p)=>`${u}${p}`).trim())}),e.includes(go)&&(e.endsWith(go)&&(e=e.slice(0,-go.length).trim()),e.startsWith(go)&&(e=e.slice(go.length).trim()),e=e.replace(new RegExp(`\\${go}\\s*\\${go}`,"g"),go),e=Dl(e,{separator:n},n)),e}async function qb(e,t={}){var d;const n=t.document||e.resolvedOptions.document;if(!n||!e.dirty)return;const r={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",r),!r.shouldRender)return;const s=(await e.resolveTags()).map(g=>({tag:g,id:Fl.includes(g.tag)?w0(g):g.tag,shouldRender:!0}));let i=e._dom;if(!i){i={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};for(const g of["body","head"]){const h=(d=n[g])==null?void 0:d.children,v=[];for(const _ of[...h].filter(x=>Fl.includes(x.tagName.toLowerCase()))){const x={tag:_.tagName.toLowerCase(),props:await Wb(_.getAttributeNames().reduce((C,S)=>({...C,[S]:_.getAttribute(S)}),{})),innerHTML:_.innerHTML};let b=1,E=Fb(x);for(;E&&v.find(C=>C._d===E);)E=`${E}:${b++}`;x._d=E||void 0,v.push(x),i.elMap[_.getAttribute("data-hid")||w0(x)]=_}}}i.pendingSideEffects={...i.sideEffects||{}},i.sideEffects={};function l(g,h,v){const _=`${g}:${h}`;i.sideEffects[_]=v,delete i.pendingSideEffects[_]}function u({id:g,$el:h,tag:v}){const _=v.tag.endsWith("Attrs");i.elMap[g]=h,_||(["textContent","innerHTML"].forEach(x=>{v[x]&&v[x]!==h[x]&&(h[x]=v[x])}),l(g,"el",()=>{var x;(x=i.elMap[g])==null||x.remove(),delete i.elMap[g]}));for(const[x,b]of Object.entries(v._eventHandlers||{}))h.getAttribute(`data-${x}`)!==""&&((v.tag==="bodyAttrs"?n.defaultView:h).addEventListener(x.replace("on",""),b.bind(h)),h.setAttribute(`data-${x}`,""));Object.entries(v.props).forEach(([x,b])=>{const E=`attr:${x}`;if(x==="class")for(const C of(b||"").split(" ").filter(Boolean))_&&l(g,`${E}:${C}`,()=>h.classList.remove(C)),!h.classList.contains(C)&&h.classList.add(C);else if(x==="style")for(const C of(b||"").split(";").filter(Boolean)){const[S,...A]=C.split(":").map(B=>B.trim());l(g,`${E}:${C}:${S}`,()=>{h.style.removeProperty(S)}),h.style.setProperty(S,A.join(":"))}else h.getAttribute(x)!==b&&h.setAttribute(x,b===!0?"":String(b)),_&&l(g,E,()=>h.removeAttribute(x))})}const c=[],p={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const g of s){const{tag:h,shouldRender:v,id:_}=g;if(v){if(h.tag==="title"){n.title=h.textContent;continue}g.$el=g.$el||i.elMap[_],g.$el?u(g):Fl.includes(h.tag)&&c.push(g)}}for(const g of c){const h=g.tag.tagPosition||"head";g.$el=n.createElement(g.tag.tag),u(g),p[h]=p[h]||n.createDocumentFragment(),p[h].appendChild(g.$el)}for(const g of s)await e.hooks.callHook("dom:renderTag",g,n,l);p.head&&n.head.appendChild(p.head),p.bodyOpen&&n.body.insertBefore(p.bodyOpen,n.body.firstChild),p.bodyClose&&n.body.appendChild(p.bodyClose),Object.values(i.pendingSideEffects).forEach(g=>g()),e._dom=i,e.dirty=!1,await e.hooks.callHook("dom:rendered",{renders:s})}async function u3(e,t={}){const n=t.delayFn||(r=>setTimeout(r,10));return e._domUpdatePromise=e._domUpdatePromise||new Promise(r=>n(async()=>{await qb(e,t),delete e._domUpdatePromise,r()}))}function c3(e){return t=>{var r,s;const n=((s=(r=t.resolvedOptions.document)==null?void 0:r.head.querySelector('script[id="unhead:payload"]'))==null?void 0:s.innerHTML)||!1;return n&&t.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":function(i){u3(i,e)}}}}}const f3=["templateParams","htmlAttrs","bodyAttrs"],d3={hooks:{"tag:normalise":function({tag:e}){["hid","vmid","key"].forEach(r=>{e.props[r]&&(e.key=e.props[r],delete e.props[r])});const n=Fb(e)||(e.key?`${e.tag}:${e.key}`:!1);n&&(e._d=n)},"tags:resolve":function(e){const t={};e.tags.forEach(r=>{const s=(r.key?`${r.tag}:${r.key}`:r._d)||r._p,i=t[s];if(i){let u=r==null?void 0:r.tagDuplicateStrategy;if(!u&&f3.includes(r.tag)&&(u="merge"),u==="merge"){const c=i.props;["class","style"].forEach(p=>{c[p]&&(r.props[p]?(p==="style"&&!c[p].endsWith(";")&&(c[p]+=";"),r.props[p]=`${c[p]} ${r.props[p]}`):r.props[p]=c[p])}),t[s].props={...c,...r.props};return}else if(r._e===i._e){i._duped=i._duped||[],r._d=`${i._d}:${i._duped.length+1}`,i._duped.push(r);return}else if(iu(r)>iu(i))return}const l=Object.keys(r.props).length+(r.innerHTML?1:0)+(r.textContent?1:0);if(Fl.includes(r.tag)&&l===0){delete t[s];return}t[s]=r});const n=[];Object.values(t).forEach(r=>{const s=r._duped;delete r._duped,n.push(r),s&&n.push(...s)}),e.tags=n,e.tags=e.tags.filter(r=>!(r.tag==="meta"&&(r.props.name||r.props.property)&&!r.props.content))}}},p3={mode:"server",hooks:{"tags:resolve":function(e){const t={};e.tags.filter(n=>["titleTemplate","templateParams","title"].includes(n.tag)&&n._m==="server").forEach(n=>{t[n.tag]=n.tag.startsWith("title")?n.textContent:n.props}),Object.keys(t).length&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},h3=["script","link","bodyAttrs"],g3=e=>({hooks:{"tags:resolve":function(t){for(const n of t.tags.filter(r=>h3.includes(r.tag)))Object.entries(n.props).forEach(([r,s])=>{r.startsWith("on")&&typeof s=="function"&&(e.ssr&&E0.includes(r)?n.props[r]=`this.dataset.${r}fired = true`:delete n.props[r],n._eventHandlers=n._eventHandlers||{},n._eventHandlers[r]=s)}),e.ssr&&n._eventHandlers&&(n.props.src||n.props.href)&&(n.key=n.key||fp(n.props.src||n.props.href))},"dom:renderTag":function({$el:t,tag:n}){var r,s;for(const i of Object.keys((t==null?void 0:t.dataset)||{}).filter(l=>E0.some(u=>`${u}fired`===l))){const l=i.replace("fired","");(s=(r=n._eventHandlers)==null?void 0:r[l])==null||s.call(t,new Event(l.replace("on","")))}}}}),m3=["link","style","script","noscript"],v3={hooks:{"tag:normalise":({tag:e})=>{e.key&&m3.includes(e.tag)&&(e.props["data-hid"]=e._h=fp(e.key))}}},y3={hooks:{"tags:resolve":e=>{const t=n=>{var r;return(r=e.tags.find(s=>s._d===n))==null?void 0:r._p};for(const{prefix:n,offset:r}of l3)for(const s of e.tags.filter(i=>typeof i.tagPriority=="string"&&i.tagPriority.startsWith(n))){const i=t(s.tagPriority.replace(n,""));typeof i<"u"&&(s._p=i+r)}e.tags.sort((n,r)=>n._p-r._p).sort((n,r)=>iu(n)-iu(r))}}},b3={meta:"content",link:"href",htmlAttrs:"lang"},_3=e=>({hooks:{"tags:resolve":t=>{var u;const{tags:n}=t,r=(u=n.find(c=>c.tag==="title"))==null?void 0:u.textContent,s=n.findIndex(c=>c.tag==="templateParams"),i=s!==-1?n[s].props:{},l=i.separator||"|";delete i.separator,i.pageTitle=Dl(i.pageTitle||r||"",i,l);for(const c of n.filter(p=>p.processTemplateParams!==!1)){const p=b3[c.tag];p&&typeof c.props[p]=="string"?c.props[p]=Dl(c.props[p],i,l):(c.processTemplateParams===!0||["titleTemplate","title"].includes(c.tag))&&["innerHTML","textContent"].forEach(d=>{typeof c[d]=="string"&&(c[d]=Dl(c[d],i,l))})}e._templateParams=i,e._separator=l,t.tags=n.filter(c=>c.tag!=="templateParams")}}}),w3={hooks:{"tags:resolve":e=>{const{tags:t}=e;let n=t.findIndex(s=>s.tag==="titleTemplate");const r=t.findIndex(s=>s.tag==="title");if(r!==-1&&n!==-1){const s=x0(t[n].textContent,t[r].textContent);s!==null?t[r].textContent=s||t[r].textContent:delete t[r]}else if(n!==-1){const s=x0(t[n].textContent);s!==null&&(t[n].textContent=s,t[n].tag="title",n=-1)}n!==-1&&delete t[n],e.tags=t.filter(Boolean)}}},x3={hooks:{"tags:afterResolve":function(e){for(const t of e.tags)typeof t.innerHTML=="string"&&(t.innerHTML&&["application/ld+json","application/json"].includes(t.props.type)?t.innerHTML=t.innerHTML.replace(/{u.dirty=!0,t.callHook("entries:updated",u)};let s=0,i=[];const l=[],u={plugins:l,dirty:!1,resolvedOptions:e,hooks:t,headEntries(){return i},use(c){const p=typeof c=="function"?c(u):c;(!p.key||!l.some(d=>d.key===p.key))&&(l.push(p),T0(p.mode,n)&&t.addHooks(p.hooks||{}))},push(c,p){p==null||delete p.head;const d={_i:s++,input:c,...p};return T0(d.mode,n)&&(i.push(d),r()),{dispose(){i=i.filter(g=>g._i!==d._i),t.callHook("entries:updated",u),r()},patch(g){i=i.map(h=>(h._i===d._i&&(h.input=d.input=g),h)),r()}}},async resolveTags(){const c={tags:[],entries:[...i]};await t.callHook("entries:resolve",c);for(const p of c.entries){const d=p.resolvedInput||p.input;if(p.resolvedInput=await(p.transform?p.transform(d):d),p.resolvedInput)for(const g of await a3(p)){const h={tag:g,entry:p,resolvedOptions:u.resolvedOptions};await t.callHook("tag:normalise",h),c.tags.push(h.tag)}}return await t.callHook("tags:beforeResolve",c),await t.callHook("tags:resolve",c),await t.callHook("tags:afterResolve",c),c.tags},ssr:n};return[d3,p3,g3,v3,y3,_3,w3,x3,...(e==null?void 0:e.plugins)||[]].forEach(c=>u.use(c)),u.hooks.callHook("init",u),u}function C3(){return Kb}const E3=cb.startsWith("3");function T3(e){return typeof e=="function"?e():R(e)}function au(e,t=""){if(e instanceof Promise)return e;const n=T3(e);return!e||!n?n:Array.isArray(n)?n.map(r=>au(r,t)):typeof n=="object"?Object.fromEntries(Object.entries(n).map(([r,s])=>r==="titleTemplate"||r.startsWith("on")?[r,R(s)]:[r,au(s,r)])):n}const $3={hooks:{"entries:resolve":function(e){for(const t of e.entries)t.resolvedInput=au(t.input)}}},Gb="usehead";function A3(e){return{install(n){E3&&(n.config.globalProperties.$unhead=e,n.config.globalProperties.$head=e,n.provide(Gb,e))}}.install}function I3(e={}){e.domDelayFn=e.domDelayFn||(n=>an(()=>setTimeout(()=>n(),0)));const t=k3(e);return t.use($3),t.install=A3(t),t}const id=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ad="__unhead_injection_handler__";function R3(e){id[ad]=e}function O3(){if(ad in id)return id[ad]();const e=Ke(Gb);return e||C3()}function P3(e,t={}){const n=t.head||O3();if(n)return n.ssr?n.push(e,t):L3(n,e,t)}function L3(e,t,n={}){const r=te(!1),s=te({});Xt(()=>{s.value=r.value?{}:au(t)});const i=e.push(s.value,n);return gt(s,u=>{i.patch(u)}),ir()&&(pa(()=>{i.dispose()}),Dy(()=>{r.value=!0}),Fy(()=>{r.value=!1})),i}function Sr(e){if(typeof e!="object")return e;var t,n,r=Object.prototype.toString.call(e);if(r==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(t in e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=Sr(e[t]))}else{n={};for(t in e)t==="__proto__"?Object.defineProperty(n,t,{value:Sr(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=Sr(e[t])}return n}if(r==="[object Array]"){for(t=e.length,n=Array(t);t--;)n[t]=Sr(e[t]);return n}return r==="[object Set]"?(n=new Set,e.forEach(function(s){n.add(Sr(s))}),n):r==="[object Map]"?(n=new Map,e.forEach(function(s,i){n.set(Sr(i),Sr(s))}),n):r==="[object Date]"?new Date(+e):r==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r==="[object DataView]"?new e.constructor(Sr(e.buffer)):r==="[object ArrayBuffer]"?e.slice(0):r.slice(-6)==="Array]"?new e.constructor(e):e}const M3={ui:{primary:"indigo",gray:"stone"}},B3={nuxt:{buildId:"f90226cd-4d39-4a87-9a5d-9b76fd5f8bf5"},ui:{primary:"green",gray:"cool",colors:["red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","primary","backdrop","body"],strategy:"merge"}},Ge=RI(M3,B3);function si(){const e=it();return e._appConfig||(e._appConfig=_n(Ge)),e._appConfig}const F3=!1,ld=!1,D3=!1,V3={componentName:"NuxtLink"},N3={deep:!0},j3={},U3="#__nuxt";let Vl,Jb;function H3(){var t;const e=(t=si().nuxt)==null?void 0:t.buildId;return Vl=$fetch(up(`builds/meta/${e}.json`)),Vl.then(n=>{Jb=II(n.matcher)}),Vl}function Eu(){return Vl||H3()}async function pp(e){return await Eu(),va({},...Jb.matchAll(e).reverse())}function $0(e,t={}){const n=W3(e,t),r=it(),s=r._payloadCache=r._payloadCache||{};return n in s||(s[n]=q3(e).then(i=>i?Zb(n).then(l=>l||(delete s[n],null)):(s[n]=null,null))),s[n]}const z3="_payload.json";function W3(e,t={}){var s;const n=new URL(e,"http://localhost");if(n.host!=="localhost"||Xr(n.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const r=t.hash||(t.fresh?Date.now():(s=si().nuxt)==null?void 0:s.buildId);return ku(Yr().app.baseURL,n.pathname,z3+(r?`?${r}`:""))}async function Zb(e){const t=fetch(e).then(n=>n.text().then(Yb));try{return await t}catch(n){console.warn("[nuxt] Cannot load payload ",e,n)}return null}async function q3(e=Su().path){if(e=xu(e),(await Eu()).prerendered.includes(e))return!0;const n=await pp(e);return!!n.prerender&&!n.redirect}let El=null;async function K3(){if(El)return El;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const t=await Yb(e.textContent||""),n=e.dataset.src?await Zb(e.dataset.src):void 0;return El={...t,...n,...window.__NUXT__},El}async function Yb(e){return await JI(e,it()._payloadRevivers)}function G3(e,t){it()._payloadRevivers[e]=t}const A0={NuxtError:e=>ya(e),EmptyShallowRef:e=>Ir(e==="_"?void 0:e==="0n"?BigInt(0):ta(e)),EmptyRef:e=>te(e==="_"?void 0:e==="0n"?BigInt(0):ta(e)),ShallowRef:e=>Ir(e),ShallowReactive:e=>ca(e),Ref:e=>te(e),Reactive:e=>_n(e)},J3=On({name:"nuxt:revive-payload:client",order:-30,async setup(e){let t,n;for(const r in A0)G3(r,A0[r]);Object.assign(e.payload,([t,n]=na(()=>e.runWithContext(K3)),t=await t,n(),t)),window.__NUXT__=e.payload}}),Z3=[],Y3=On({name:"nuxt:head",enforce:"pre",setup(e){const t=I3({plugins:Z3});R3(()=>it().vueApp._context.provides.usehead),e.vueApp.use(t);{let n=!0;const r=async()=>{n=!1,await qb(t)};t.hooks.hook("dom:beforeRender",s=>{s.shouldRender=!n}),e.hooks.hook("page:start",()=>{n=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||r()}),e.hooks.hook("app:error",r),e.hooks.hook("app:suspense:resolve",r)}}});/*! +`)},domwindow(){return r("domwindow")},bigint(s){return r("bigint:"+s.toString())},process(){return r("process")},timer(){return r("timer")},pipe(){return r("pipe")},tcp(){return r("tcp")},udp(){return r("udp")},tty(){return r("tty")},statwatcher(){return r("statwatcher")},securecontext(){return r("securecontext")},connection(){return r("connection")},zlib(){return r("zlib")},context(){return r("context")},nodescript(){return r("nodescript")},httpparser(){return r("httpparser")},dataview(){return r("dataview")},signal(){return r("signal")},fsevent(){return r("fsevent")},tlswrap(){return r("tlswrap")}}}const Ab="[native code] }",yI=Ab.length;function v0(e){return typeof e!="function"?!1:Function.prototype.toString.call(e).slice(-yI)===Ab}class Ao{constructor(t,n){t=this.words=t||[],this.sigBytes=n===void 0?t.length*4:n}toString(t){return(t||bI).stringify(this)}concat(t){if(this.clamp(),this.sigBytes%4)for(let n=0;n>>2]>>>24-n%4*8&255;this.words[this.sigBytes+n>>>2]|=r<<24-(this.sigBytes+n)%4*8}else for(let n=0;n>>2]=t.words[n>>>2];return this.sigBytes+=t.sigBytes,this}clamp(){this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4)}clone(){return new Ao([...this.words])}}const bI={stringify(e){const t=[];for(let n=0;n>>2]>>>24-n%4*8&255;t.push((r>>>4).toString(16),(r&15).toString(16))}return t.join("")}},_I={stringify(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=[];for(let r=0;r>>2]>>>24-r%4*8&255,i=e.words[r+1>>>2]>>>24-(r+1)%4*8&255,l=e.words[r+2>>>2]>>>24-(r+2)%4*8&255,u=s<<16|i<<8|l;for(let c=0;c<4&&r*8+c*6>>6*(3-c)&63))}return n.join("")}},wI={parse(e){const t=e.length,n=[];for(let r=0;r>>2]|=(e.charCodeAt(r)&255)<<24-r%4*8;return new Ao(n,t)}},xI={parse(e){return wI.parse(unescape(encodeURIComponent(e)))}};class kI{constructor(){this._data=new Ao,this._nDataBytes=0,this._minBufferSize=0,this.blockSize=512/32}reset(){this._data=new Ao,this._nDataBytes=0}_append(t){typeof t=="string"&&(t=xI.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes}_doProcessBlock(t,n){}_process(t){let n,r=this._data.sigBytes/(this.blockSize*4);t?r=Math.ceil(r):r=Math.max((r|0)-this._minBufferSize,0);const s=r*this.blockSize,i=Math.min(s*4,this._data.sigBytes);if(s){for(let l=0;l>>7)^(S<<14|S>>>18)^S>>>3,B=Jo[h-2],L=(B<<15|B>>>17)^(B<<13|B>>>19)^B>>>10;Jo[h]=A+Jo[h-7]+L+Jo[h-16]}const v=c&p^~c&d,_=s&i^s&l^i&l,x=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),b=(c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25),E=g+b+v+CI[h]+Jo[h],C=x+_;g=d,d=p,p=c,c=u+E|0,u=l,l=i,i=s,s=E+C|0}r[0]=r[0]+s|0,r[1]=r[1]+i|0,r[2]=r[2]+l|0,r[3]=r[3]+u|0,r[4]=r[4]+c|0,r[5]=r[5]+p|0,r[6]=r[6]+d|0,r[7]=r[7]+g|0}finalize(t){super.finalize(t);const n=this._nDataBytes*8,r=this._data.sigBytes*8;return this._data.words[r>>>5]|=128<<24-r%32,this._data.words[(r+64>>>9<<4)+14]=Math.floor(n/4294967296),this._data.words[(r+64>>>9<<4)+15]=n,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}}function TI(e){return new EI().finalize(e).toString(_I)}function $I(e,t={}){const n=typeof e=="string"?e:ed(e,t);return TI(n).slice(0,10)}function Ib(e,t,n={}){return e===t||ed(e,n)===ed(t,n)}function AI(e,t){return{ctx:{table:e},matchAll:n=>Ob(n,e,t)}}function Rb(e){const t={};for(const n in e)t[n]=n==="dynamic"?new Map(Object.entries(e[n]).map(([r,s])=>[r,Rb(s)])):new Map(Object.entries(e[n]));return t}function II(e){return AI(Rb(e))}function Ob(e,t,n){n!==!0&&e.endsWith("/")&&(e=e.slice(0,-1)||"/");const r=[];for(const[i,l]of b0(t.wildcard))(e===i||e.startsWith(i+"/"))&&r.push(l);for(const[i,l]of b0(t.dynamic))if(e.startsWith(i+"/")){const u="/"+e.slice(i.length).split("/").splice(2).join("/");r.push(...Ob(u,l))}const s=t.static.get(e);return s&&r.push(s),r.filter(Boolean)}function b0(e){return[...e.entries()].sort((t,n)=>t[0].length-n[0].length)}function lf(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function td(e,t,n=".",r){if(!lf(t))return td(e,{},n,r);const s=Object.assign({},t);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(r&&r(s,i,l,n)||(Array.isArray(l)&&Array.isArray(s[i])?s[i]=[...l,...s[i]]:lf(l)&&lf(s[i])?s[i]=td(l,s[i],(n?`${n}.`:"")+i.toString(),r):s[i]=l))}return s}function cp(e){return(...t)=>t.reduce((n,r)=>td(n,r,"",e),{})}const va=cp(),RI=cp((e,t,n)=>{if(e[t]!==void 0&&typeof n=="function")return e[t]=n(e[t]),!0});function OI(e,t){try{return t in e}catch{return!1}}var PI=Object.defineProperty,LI=(e,t,n)=>t in e?PI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xo=(e,t,n)=>(LI(e,typeof t!="symbol"?t+"":t,n),n);class nd extends Error{constructor(t,n={}){super(t,n),Xo(this,"statusCode",500),Xo(this,"fatal",!1),Xo(this,"unhandled",!1),Xo(this,"statusMessage"),Xo(this,"data"),Xo(this,"cause"),n.cause&&!this.cause&&(this.cause=n.cause)}toJSON(){const t={message:this.message,statusCode:od(this.statusCode,500)};return this.statusMessage&&(t.statusMessage=Pb(this.statusMessage)),this.data!==void 0&&(t.data=this.data),t}}Xo(nd,"__h3_error__",!0);function rd(e){if(typeof e=="string")return new nd(e);if(MI(e))return e;const t=new nd(e.message??e.statusMessage??"",{cause:e.cause||e});if(OI(e,"stack"))try{Object.defineProperty(t,"stack",{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=od(e.statusCode,t.statusCode):e.status&&(t.statusCode=od(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){const n=t.statusMessage;Pb(t.statusMessage)!==n&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function MI(e){var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.__h3_error__)===!0}const BI=/[^\u0009\u0020-\u007E]/g;function Pb(e=""){return e.replace(BI,"")}function od(e,t=200){return!e||(typeof e=="string"&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}const Lb=Symbol("layout-meta"),$n=Symbol("route"),Wn=()=>{var e;return(e=it())==null?void 0:e.$router},Su=()=>rp()?Ke($n,it()._route):it()._route;const FI=()=>{try{if(it()._processingMiddleware)return!0}catch{return!1}return!1},Io=(e,t)=>{e||(e="/");const n=typeof e=="string"?e:bb(e.path||"/",e.query||{})+(e.hash||"");if(t!=null&&t.open){const{target:u="_blank",windowFeatures:c={}}=t.open,p=Object.entries(c).filter(([d,g])=>g!==void 0).map(([d,g])=>`${d.toLowerCase()}=${g}`).join(", ");return open(n,u,p),Promise.resolve()}const r=(t==null?void 0:t.external)||Xr(n,{acceptRelative:!0});if(r){if(!(t!=null&&t.external))throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");const u=ma(n).protocol;if(u&&TA(u))throw new Error(`Cannot navigate to a URL with '${u}' protocol.`)}const s=FI();if(!r&&s)return e;const i=Wn(),l=it();return r?(l._scope.stop(),t!=null&&t.replace?location.replace(n):location.href=n,s?l.isHydrating?new Promise(()=>{}):!1:Promise.resolve()):t!=null&&t.replace?i.replace(e):i.push(e)},Mb="__nuxt_error",Cu=()=>Ot(it().payload,"error"),Fs=e=>{const t=ya(e);try{const n=it(),r=Cu();n.hooks.callHook("app:error",t),r.value=r.value||t}catch{throw t}return t},DI=async(e={})=>{const t=it(),n=Cu();t.callHook("app:error:cleared",e),e.redirect&&await Wn().replace(e.redirect),n.value=null},VI=e=>!!e&&typeof e=="object"&&Mb in e,ya=e=>{const t=rd(e);return Object.defineProperty(t,Mb,{value:!0,configurable:!1,writable:!1}),t},NI="modulepreload",jI=function(e,t){return e[0]==="."?new URL(e,t).href:e},_0={},UI=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){const i=document.getElementsByTagName("link"),l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.all(n.map(c=>{if(c=jI(c,r),c in _0)return;_0[c]=!0;const p=c.endsWith(".css"),d=p?'[rel="stylesheet"]':"";if(!!r)for(let v=i.length-1;v>=0;v--){const _=i[v];if(_.href===c&&(!p||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=p?"stylesheet":NI,p||(h.as="script",h.crossOrigin=""),h.href=c,u&&h.setAttribute("nonce",u),document.head.appendChild(h),p)return new Promise((v,_)=>{h.addEventListener("load",v),h.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${c}`)))})}))}return s.then(()=>t()).catch(i=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i})},yn=(...e)=>UI(...e).catch(t=>{const n=new Event("nuxt.preloadError");throw n.payload=t,window.dispatchEvent(n),t}),HI=-1,zI=-2,WI=-3,qI=-4,KI=-5,GI=-6;function JI(e,t){return ZI(JSON.parse(e),t)}function ZI(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function s(i,l=!1){if(i===HI)return;if(i===WI)return NaN;if(i===qI)return 1/0;if(i===KI)return-1/0;if(i===GI)return-0;if(l)throw new Error("Invalid input");if(i in r)return r[i];const u=n[i];if(!u||typeof u!="object")r[i]=u;else if(Array.isArray(u))if(typeof u[0]=="string"){const c=u[0],p=t==null?void 0:t[c];if(p)return r[i]=p(s(u[1]));switch(c){case"Date":r[i]=new Date(u[1]);break;case"Set":const d=new Set;r[i]=d;for(let v=1;v>>9)+65536).toString(16).substring(1,8).toLowerCase()}function w0(e){return e._h||fp(e._d?e._d:`${e.tag}:${e.textContent||e.innerHTML||""}:${Object.entries(e.props).map(([t,n])=>`${t}:${String(n)}`).join(",")}`)}function Fb(e,t){const{props:n,tag:r}=e;if(e3.includes(r))return r;if(r==="link"&&n.rel==="canonical")return"canonical";if(n.charset)return"charset";const s=["id"];r==="meta"&&s.push("name","property","http-equiv");for(const i of s)if(typeof n[i]<"u"){const l=String(n[i]);return t&&!t(l)?!1:`${r}:${i}:${l}`}return!1}function x0(e,t){return e==null?t||null:typeof e=="function"?e(t):e}function Db(e,t){const n=[],r=t.resolveKeyData||(i=>i.key),s=t.resolveValueData||(i=>i.value);for(const[i,l]of Object.entries(e))n.push(...(Array.isArray(l)?l:[l]).map(u=>{const c={key:i,value:u},p=s(c);return typeof p=="object"?Db(p,t):Array.isArray(p)?p:{[typeof t.key=="function"?t.key(c):t.key]:r(c),[typeof t.value=="function"?t.value(c):t.value]:p}}).flat());return n}function Vb(e,t){return Object.entries(e).map(([n,r])=>{if(typeof r=="object"&&(r=Vb(r,t)),t.resolve){const s=t.resolve({key:n,value:r});if(typeof s<"u")return s}return typeof r=="number"&&(r=r.toString()),typeof r=="string"&&t.wrapValue&&(r=r.replace(new RegExp(t.wrapValue,"g"),`\\${t.wrapValue}`),r=`${t.wrapValue}${r}${t.wrapValue}`),`${n}${t.keyValueSeparator||""}${r}`}).join(t.entrySeparator||"")}const mn=e=>({keyValue:e,metaKey:"property"}),uf=e=>({keyValue:e}),dp={appleItunesApp:{unpack:{entrySeparator:", ",resolve({key:e,value:t}){return`${Kr(e)}=${t}`}}},articleExpirationTime:mn("article:expiration_time"),articleModifiedTime:mn("article:modified_time"),articlePublishedTime:mn("article:published_time"),bookReleaseDate:mn("book:release_date"),charset:{metaKey:"charset"},contentSecurityPolicy:{unpack:{entrySeparator:"; ",resolve({key:e,value:t}){return`${Kr(e)} ${t}`}},metaKey:"http-equiv"},contentType:{metaKey:"http-equiv"},defaultStyle:{metaKey:"http-equiv"},fbAppId:mn("fb:app_id"),msapplicationConfig:uf("msapplication-Config"),msapplicationTileColor:uf("msapplication-TileColor"),msapplicationTileImage:uf("msapplication-TileImage"),ogAudioSecureUrl:mn("og:audio:secure_url"),ogAudioUrl:mn("og:audio"),ogImageSecureUrl:mn("og:image:secure_url"),ogImageUrl:mn("og:image"),ogSiteName:mn("og:site_name"),ogVideoSecureUrl:mn("og:video:secure_url"),ogVideoUrl:mn("og:video"),profileFirstName:mn("profile:first_name"),profileLastName:mn("profile:last_name"),profileUsername:mn("profile:username"),refresh:{metaKey:"http-equiv",unpack:{entrySeparator:";",resolve({key:e,value:t}){if(e==="seconds")return`${t}`}}},robots:{unpack:{entrySeparator:", ",resolve({key:e,value:t}){return typeof t=="boolean"?`${Kr(e)}`:`${Kr(e)}:${t}`}}},xUaCompatible:{metaKey:"http-equiv"}},Nb=["og","book","article","profile"];function jb(e){var n;const t=Kr(e).split(":")[0];return Nb.includes(t)?"property":((n=dp[e])==null?void 0:n.metaKey)||"name"}function n3(e){var t;return((t=dp[e])==null?void 0:t.keyValue)||Kr(e)}function Kr(e){const t=e.replace(/([A-Z])/g,"-$1").toLowerCase(),n=t.split("-")[0];return Nb.includes(n)||n==="twitter"?e.replace(/([A-Z])/g,":$1").toLowerCase():t}function sd(e){if(Array.isArray(e))return e.map(n=>sd(n));if(typeof e!="object"||Array.isArray(e))return e;const t={};for(const[n,r]of Object.entries(e))t[Kr(n)]=sd(r);return t}function r3(e,t){const n=dp[t];return t==="refresh"?`${e.seconds};url=${e.url}`:Vb(sd(e),{keyValueSeparator:"=",entrySeparator:", ",resolve({value:r,key:s}){if(r===null)return"";if(typeof r=="boolean")return`${s}`},...n==null?void 0:n.unpack})}const Ub=["og:image","og:video","og:audio","twitter:image"];function Hb(e){const t={};return Object.entries(e).forEach(([n,r])=>{String(r)!=="false"&&n&&(t[n]=r)}),t}function k0(e,t){const n=Hb(t),r=Kr(e),s=jb(r);if(Ub.includes(r)){const i={};return Object.entries(n).forEach(([l,u])=>{i[`${e}${l==="url"?"":`${l.charAt(0).toUpperCase()}${l.slice(1)}`}`]=u}),zb(i).sort((l,u)=>{var c,p;return(((c=l[s])==null?void 0:c.length)||0)-(((p=u[s])==null?void 0:p.length)||0)})}return[{[s]:r,...n}]}function zb(e){const t=[],n={};Object.entries(e).forEach(([s,i])=>{if(!Array.isArray(i)){if(typeof i=="object"&&i){if(Ub.includes(Kr(s))){t.push(...k0(s,i));return}n[s]=Hb(i)}else n[s]=i;return}i.forEach(l=>{t.push(...typeof l=="string"?zb({[s]:l}):k0(s,l))})});const r=Db(n,{key({key:s}){return jb(s)},value({key:s}){return s==="charset"?"charset":"content"},resolveKeyData({key:s}){return n3(s)},resolveValueData({value:s,key:i}){return s===null?"_null":typeof s=="object"?r3(s,i):typeof s=="number"?s.toString():s}});return[...t,...r].map(s=>(s.content==="_null"&&(s.content=null),s))}async function o3(e,t,n){const r={tag:e,props:await Wb(typeof t=="object"&&typeof t!="function"&&!(t instanceof Promise)?{...t}:{[["script","noscript","style"].includes(e)?"innerHTML":"textContent"]:t},["templateParams","titleTemplate"].includes(e))};return Bb.forEach(s=>{const i=typeof r.props[s]<"u"?r.props[s]:n[s];typeof i<"u"&&((!["innerHTML","textContent","children"].includes(s)||QI.includes(r.tag))&&(r[s==="children"?"innerHTML":s]=i),delete r.props[s])}),r.props.body&&(r.tagPosition="bodyClose",delete r.props.body),r.tag==="script"&&typeof r.innerHTML=="object"&&(r.innerHTML=JSON.stringify(r.innerHTML),r.props.type=r.props.type||"application/json"),Array.isArray(r.props.content)?r.props.content.map(s=>({...r,props:{...r.props,content:s}})):r}function s3(e,t){var r;const n=e==="class"?" ":";";return typeof t=="object"&&!Array.isArray(t)&&(t=Object.entries(t).filter(([,s])=>s).map(([s,i])=>e==="style"?`${s}:${i}`:s)),(r=Array.isArray(t)?t.join(n):t)==null?void 0:r.split(n).filter(s=>s.trim()).filter(Boolean).join(n)}async function Wb(e,t){for(const n of Object.keys(e)){if(["class","style"].includes(n)){e[n]=s3(n,e[n]);continue}if(e[n]instanceof Promise&&(e[n]=await e[n]),!t&&!Bb.includes(n)){const r=String(e[n]),s=n.startsWith("data-");r==="true"||r===""?e[n]=s?"true":!0:e[n]||(s&&r==="false"?e[n]="false":delete e[n])}}return e}const i3=10;async function a3(e){const t=[];return Object.entries(e.resolvedInput).filter(([n,r])=>typeof r<"u"&&XI.includes(n)).forEach(([n,r])=>{const s=YI(r);t.push(...s.map(i=>o3(n,i,e)).flat())}),(await Promise.all(t)).flat().filter(Boolean).map((n,r)=>(n._e=e._i,e.mode&&(n._m=e.mode),n._p=(e._i<c&&c[p]||void 0,t):u=t[l],typeof u<"u"?(u||"").replace(/"/g,'\\"'):!1}let s=e;try{s=decodeURI(e)}catch{}return(s.match(/%(\w+\.+\w+)|%(\w+)/g)||[]).sort().reverse().forEach(l=>{const u=r(l.slice(1));typeof u=="string"&&(e=e.replace(new RegExp(`\\${l}(\\W|$)`,"g"),(c,p)=>`${u}${p}`).trim())}),e.includes(go)&&(e.endsWith(go)&&(e=e.slice(0,-go.length).trim()),e.startsWith(go)&&(e=e.slice(go.length).trim()),e=e.replace(new RegExp(`\\${go}\\s*\\${go}`,"g"),go),e=Dl(e,{separator:n},n)),e}async function qb(e,t={}){var d;const n=t.document||e.resolvedOptions.document;if(!n||!e.dirty)return;const r={shouldRender:!0,tags:[]};if(await e.hooks.callHook("dom:beforeRender",r),!r.shouldRender)return;const s=(await e.resolveTags()).map(g=>({tag:g,id:Fl.includes(g.tag)?w0(g):g.tag,shouldRender:!0}));let i=e._dom;if(!i){i={elMap:{htmlAttrs:n.documentElement,bodyAttrs:n.body}};for(const g of["body","head"]){const h=(d=n[g])==null?void 0:d.children,v=[];for(const _ of[...h].filter(x=>Fl.includes(x.tagName.toLowerCase()))){const x={tag:_.tagName.toLowerCase(),props:await Wb(_.getAttributeNames().reduce((C,S)=>({...C,[S]:_.getAttribute(S)}),{})),innerHTML:_.innerHTML};let b=1,E=Fb(x);for(;E&&v.find(C=>C._d===E);)E=`${E}:${b++}`;x._d=E||void 0,v.push(x),i.elMap[_.getAttribute("data-hid")||w0(x)]=_}}}i.pendingSideEffects={...i.sideEffects||{}},i.sideEffects={};function l(g,h,v){const _=`${g}:${h}`;i.sideEffects[_]=v,delete i.pendingSideEffects[_]}function u({id:g,$el:h,tag:v}){const _=v.tag.endsWith("Attrs");i.elMap[g]=h,_||(["textContent","innerHTML"].forEach(x=>{v[x]&&v[x]!==h[x]&&(h[x]=v[x])}),l(g,"el",()=>{var x;(x=i.elMap[g])==null||x.remove(),delete i.elMap[g]}));for(const[x,b]of Object.entries(v._eventHandlers||{}))h.getAttribute(`data-${x}`)!==""&&((v.tag==="bodyAttrs"?n.defaultView:h).addEventListener(x.replace("on",""),b.bind(h)),h.setAttribute(`data-${x}`,""));Object.entries(v.props).forEach(([x,b])=>{const E=`attr:${x}`;if(x==="class")for(const C of(b||"").split(" ").filter(Boolean))_&&l(g,`${E}:${C}`,()=>h.classList.remove(C)),!h.classList.contains(C)&&h.classList.add(C);else if(x==="style")for(const C of(b||"").split(";").filter(Boolean)){const[S,...A]=C.split(":").map(B=>B.trim());l(g,`${E}:${C}:${S}`,()=>{h.style.removeProperty(S)}),h.style.setProperty(S,A.join(":"))}else h.getAttribute(x)!==b&&h.setAttribute(x,b===!0?"":String(b)),_&&l(g,E,()=>h.removeAttribute(x))})}const c=[],p={bodyClose:void 0,bodyOpen:void 0,head:void 0};for(const g of s){const{tag:h,shouldRender:v,id:_}=g;if(v){if(h.tag==="title"){n.title=h.textContent;continue}g.$el=g.$el||i.elMap[_],g.$el?u(g):Fl.includes(h.tag)&&c.push(g)}}for(const g of c){const h=g.tag.tagPosition||"head";g.$el=n.createElement(g.tag.tag),u(g),p[h]=p[h]||n.createDocumentFragment(),p[h].appendChild(g.$el)}for(const g of s)await e.hooks.callHook("dom:renderTag",g,n,l);p.head&&n.head.appendChild(p.head),p.bodyOpen&&n.body.insertBefore(p.bodyOpen,n.body.firstChild),p.bodyClose&&n.body.appendChild(p.bodyClose),Object.values(i.pendingSideEffects).forEach(g=>g()),e._dom=i,e.dirty=!1,await e.hooks.callHook("dom:rendered",{renders:s})}async function u3(e,t={}){const n=t.delayFn||(r=>setTimeout(r,10));return e._domUpdatePromise=e._domUpdatePromise||new Promise(r=>n(async()=>{await qb(e,t),delete e._domUpdatePromise,r()}))}function c3(e){return t=>{var r,s;const n=((s=(r=t.resolvedOptions.document)==null?void 0:r.head.querySelector('script[id="unhead:payload"]'))==null?void 0:s.innerHTML)||!1;return n&&t.push(JSON.parse(n)),{mode:"client",hooks:{"entries:updated":function(i){u3(i,e)}}}}}const f3=["templateParams","htmlAttrs","bodyAttrs"],d3={hooks:{"tag:normalise":function({tag:e}){["hid","vmid","key"].forEach(r=>{e.props[r]&&(e.key=e.props[r],delete e.props[r])});const n=Fb(e)||(e.key?`${e.tag}:${e.key}`:!1);n&&(e._d=n)},"tags:resolve":function(e){const t={};e.tags.forEach(r=>{const s=(r.key?`${r.tag}:${r.key}`:r._d)||r._p,i=t[s];if(i){let u=r==null?void 0:r.tagDuplicateStrategy;if(!u&&f3.includes(r.tag)&&(u="merge"),u==="merge"){const c=i.props;["class","style"].forEach(p=>{c[p]&&(r.props[p]?(p==="style"&&!c[p].endsWith(";")&&(c[p]+=";"),r.props[p]=`${c[p]} ${r.props[p]}`):r.props[p]=c[p])}),t[s].props={...c,...r.props};return}else if(r._e===i._e){i._duped=i._duped||[],r._d=`${i._d}:${i._duped.length+1}`,i._duped.push(r);return}else if(iu(r)>iu(i))return}const l=Object.keys(r.props).length+(r.innerHTML?1:0)+(r.textContent?1:0);if(Fl.includes(r.tag)&&l===0){delete t[s];return}t[s]=r});const n=[];Object.values(t).forEach(r=>{const s=r._duped;delete r._duped,n.push(r),s&&n.push(...s)}),e.tags=n,e.tags=e.tags.filter(r=>!(r.tag==="meta"&&(r.props.name||r.props.property)&&!r.props.content))}}},p3={mode:"server",hooks:{"tags:resolve":function(e){const t={};e.tags.filter(n=>["titleTemplate","templateParams","title"].includes(n.tag)&&n._m==="server").forEach(n=>{t[n.tag]=n.tag.startsWith("title")?n.textContent:n.props}),Object.keys(t).length&&e.tags.push({tag:"script",innerHTML:JSON.stringify(t),props:{id:"unhead:payload",type:"application/json"}})}}},h3=["script","link","bodyAttrs"],g3=e=>({hooks:{"tags:resolve":function(t){for(const n of t.tags.filter(r=>h3.includes(r.tag)))Object.entries(n.props).forEach(([r,s])=>{r.startsWith("on")&&typeof s=="function"&&(e.ssr&&E0.includes(r)?n.props[r]=`this.dataset.${r}fired = true`:delete n.props[r],n._eventHandlers=n._eventHandlers||{},n._eventHandlers[r]=s)}),e.ssr&&n._eventHandlers&&(n.props.src||n.props.href)&&(n.key=n.key||fp(n.props.src||n.props.href))},"dom:renderTag":function({$el:t,tag:n}){var r,s;for(const i of Object.keys((t==null?void 0:t.dataset)||{}).filter(l=>E0.some(u=>`${u}fired`===l))){const l=i.replace("fired","");(s=(r=n._eventHandlers)==null?void 0:r[l])==null||s.call(t,new Event(l.replace("on","")))}}}}),m3=["link","style","script","noscript"],v3={hooks:{"tag:normalise":({tag:e})=>{e.key&&m3.includes(e.tag)&&(e.props["data-hid"]=e._h=fp(e.key))}}},y3={hooks:{"tags:resolve":e=>{const t=n=>{var r;return(r=e.tags.find(s=>s._d===n))==null?void 0:r._p};for(const{prefix:n,offset:r}of l3)for(const s of e.tags.filter(i=>typeof i.tagPriority=="string"&&i.tagPriority.startsWith(n))){const i=t(s.tagPriority.replace(n,""));typeof i<"u"&&(s._p=i+r)}e.tags.sort((n,r)=>n._p-r._p).sort((n,r)=>iu(n)-iu(r))}}},b3={meta:"content",link:"href",htmlAttrs:"lang"},_3=e=>({hooks:{"tags:resolve":t=>{var u;const{tags:n}=t,r=(u=n.find(c=>c.tag==="title"))==null?void 0:u.textContent,s=n.findIndex(c=>c.tag==="templateParams"),i=s!==-1?n[s].props:{},l=i.separator||"|";delete i.separator,i.pageTitle=Dl(i.pageTitle||r||"",i,l);for(const c of n.filter(p=>p.processTemplateParams!==!1)){const p=b3[c.tag];p&&typeof c.props[p]=="string"?c.props[p]=Dl(c.props[p],i,l):(c.processTemplateParams===!0||["titleTemplate","title"].includes(c.tag))&&["innerHTML","textContent"].forEach(d=>{typeof c[d]=="string"&&(c[d]=Dl(c[d],i,l))})}e._templateParams=i,e._separator=l,t.tags=n.filter(c=>c.tag!=="templateParams")}}}),w3={hooks:{"tags:resolve":e=>{const{tags:t}=e;let n=t.findIndex(s=>s.tag==="titleTemplate");const r=t.findIndex(s=>s.tag==="title");if(r!==-1&&n!==-1){const s=x0(t[n].textContent,t[r].textContent);s!==null?t[r].textContent=s||t[r].textContent:delete t[r]}else if(n!==-1){const s=x0(t[n].textContent);s!==null&&(t[n].textContent=s,t[n].tag="title",n=-1)}n!==-1&&delete t[n],e.tags=t.filter(Boolean)}}},x3={hooks:{"tags:afterResolve":function(e){for(const t of e.tags)typeof t.innerHTML=="string"&&(t.innerHTML&&["application/ld+json","application/json"].includes(t.props.type)?t.innerHTML=t.innerHTML.replace(/{u.dirty=!0,t.callHook("entries:updated",u)};let s=0,i=[];const l=[],u={plugins:l,dirty:!1,resolvedOptions:e,hooks:t,headEntries(){return i},use(c){const p=typeof c=="function"?c(u):c;(!p.key||!l.some(d=>d.key===p.key))&&(l.push(p),T0(p.mode,n)&&t.addHooks(p.hooks||{}))},push(c,p){p==null||delete p.head;const d={_i:s++,input:c,...p};return T0(d.mode,n)&&(i.push(d),r()),{dispose(){i=i.filter(g=>g._i!==d._i),t.callHook("entries:updated",u),r()},patch(g){i=i.map(h=>(h._i===d._i&&(h.input=d.input=g),h)),r()}}},async resolveTags(){const c={tags:[],entries:[...i]};await t.callHook("entries:resolve",c);for(const p of c.entries){const d=p.resolvedInput||p.input;if(p.resolvedInput=await(p.transform?p.transform(d):d),p.resolvedInput)for(const g of await a3(p)){const h={tag:g,entry:p,resolvedOptions:u.resolvedOptions};await t.callHook("tag:normalise",h),c.tags.push(h.tag)}}return await t.callHook("tags:beforeResolve",c),await t.callHook("tags:resolve",c),await t.callHook("tags:afterResolve",c),c.tags},ssr:n};return[d3,p3,g3,v3,y3,_3,w3,x3,...(e==null?void 0:e.plugins)||[]].forEach(c=>u.use(c)),u.hooks.callHook("init",u),u}function C3(){return Kb}const E3=cb.startsWith("3");function T3(e){return typeof e=="function"?e():R(e)}function au(e,t=""){if(e instanceof Promise)return e;const n=T3(e);return!e||!n?n:Array.isArray(n)?n.map(r=>au(r,t)):typeof n=="object"?Object.fromEntries(Object.entries(n).map(([r,s])=>r==="titleTemplate"||r.startsWith("on")?[r,R(s)]:[r,au(s,r)])):n}const $3={hooks:{"entries:resolve":function(e){for(const t of e.entries)t.resolvedInput=au(t.input)}}},Gb="usehead";function A3(e){return{install(n){E3&&(n.config.globalProperties.$unhead=e,n.config.globalProperties.$head=e,n.provide(Gb,e))}}.install}function I3(e={}){e.domDelayFn=e.domDelayFn||(n=>an(()=>setTimeout(()=>n(),0)));const t=k3(e);return t.use($3),t.install=A3(t),t}const id=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ad="__unhead_injection_handler__";function R3(e){id[ad]=e}function O3(){if(ad in id)return id[ad]();const e=Ke(Gb);return e||C3()}function P3(e,t={}){const n=t.head||O3();if(n)return n.ssr?n.push(e,t):L3(n,e,t)}function L3(e,t,n={}){const r=te(!1),s=te({});Xt(()=>{s.value=r.value?{}:au(t)});const i=e.push(s.value,n);return gt(s,u=>{i.patch(u)}),ir()&&(pa(()=>{i.dispose()}),Dy(()=>{r.value=!0}),Fy(()=>{r.value=!1})),i}function Sr(e){if(typeof e!="object")return e;var t,n,r=Object.prototype.toString.call(e);if(r==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(t in e)e.hasOwnProperty(t)&&n[t]!==e[t]&&(n[t]=Sr(e[t]))}else{n={};for(t in e)t==="__proto__"?Object.defineProperty(n,t,{value:Sr(e[t]),configurable:!0,enumerable:!0,writable:!0}):n[t]=Sr(e[t])}return n}if(r==="[object Array]"){for(t=e.length,n=Array(t);t--;)n[t]=Sr(e[t]);return n}return r==="[object Set]"?(n=new Set,e.forEach(function(s){n.add(Sr(s))}),n):r==="[object Map]"?(n=new Map,e.forEach(function(s,i){n.set(Sr(i),Sr(s))}),n):r==="[object Date]"?new Date(+e):r==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):r==="[object DataView]"?new e.constructor(Sr(e.buffer)):r==="[object ArrayBuffer]"?e.slice(0):r.slice(-6)==="Array]"?new e.constructor(e):e}const M3={ui:{primary:"indigo",gray:"stone"}},B3={nuxt:{buildId:"312c7771-c975-4eaa-a552-b5ce097b8b39"},ui:{primary:"green",gray:"cool",colors:["red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose","primary","backdrop","body"],strategy:"merge"}},Ge=RI(M3,B3);function si(){const e=it();return e._appConfig||(e._appConfig=_n(Ge)),e._appConfig}const F3=!1,ld=!1,D3=!1,V3={componentName:"NuxtLink"},N3={deep:!0},j3={},U3="#__nuxt";let Vl,Jb;function H3(){var t;const e=(t=si().nuxt)==null?void 0:t.buildId;return Vl=$fetch(up(`builds/meta/${e}.json`)),Vl.then(n=>{Jb=II(n.matcher)}),Vl}function Eu(){return Vl||H3()}async function pp(e){return await Eu(),va({},...Jb.matchAll(e).reverse())}function $0(e,t={}){const n=W3(e,t),r=it(),s=r._payloadCache=r._payloadCache||{};return n in s||(s[n]=q3(e).then(i=>i?Zb(n).then(l=>l||(delete s[n],null)):(s[n]=null,null))),s[n]}const z3="_payload.json";function W3(e,t={}){var s;const n=new URL(e,"http://localhost");if(n.host!=="localhost"||Xr(n.pathname,{acceptRelative:!0}))throw new Error("Payload URL must not include hostname: "+e);const r=t.hash||(t.fresh?Date.now():(s=si().nuxt)==null?void 0:s.buildId);return ku(Yr().app.baseURL,n.pathname,z3+(r?`?${r}`:""))}async function Zb(e){const t=fetch(e).then(n=>n.text().then(Yb));try{return await t}catch(n){console.warn("[nuxt] Cannot load payload ",e,n)}return null}async function q3(e=Su().path){if(e=xu(e),(await Eu()).prerendered.includes(e))return!0;const n=await pp(e);return!!n.prerender&&!n.redirect}let El=null;async function K3(){if(El)return El;const e=document.getElementById("__NUXT_DATA__");if(!e)return{};const t=await Yb(e.textContent||""),n=e.dataset.src?await Zb(e.dataset.src):void 0;return El={...t,...n,...window.__NUXT__},El}async function Yb(e){return await JI(e,it()._payloadRevivers)}function G3(e,t){it()._payloadRevivers[e]=t}const A0={NuxtError:e=>ya(e),EmptyShallowRef:e=>Ir(e==="_"?void 0:e==="0n"?BigInt(0):ta(e)),EmptyRef:e=>te(e==="_"?void 0:e==="0n"?BigInt(0):ta(e)),ShallowRef:e=>Ir(e),ShallowReactive:e=>ca(e),Ref:e=>te(e),Reactive:e=>_n(e)},J3=On({name:"nuxt:revive-payload:client",order:-30,async setup(e){let t,n;for(const r in A0)G3(r,A0[r]);Object.assign(e.payload,([t,n]=na(()=>e.runWithContext(K3)),t=await t,n(),t)),window.__NUXT__=e.payload}}),Z3=[],Y3=On({name:"nuxt:head",enforce:"pre",setup(e){const t=I3({plugins:Z3});R3(()=>it().vueApp._context.provides.usehead),e.vueApp.use(t);{let n=!0;const r=async()=>{n=!1,await qb(t)};t.hooks.hook("dom:beforeRender",s=>{s.shouldRender=!n}),e.hooks.hook("page:start",()=>{n=!0}),e.hooks.hook("page:finish",()=>{e.isHydrating||r()}),e.hooks.hook("app:error",r),e.hooks.hook("app:suspense:resolve",r)}}});/*! * vue-router v4.3.2 * (c) 2024 Eduardo San Martin Morote * @license MIT - */const Bs=typeof document<"u";function Q3(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const yt=Object.assign;function cf(e,t){const n={};for(const r in t){const s=t[r];n[r]=vr(s)?s.map(e):e(s)}return n}const Wi=()=>{},vr=Array.isArray,Qb=/#/g,X3=/&/g,e4=/\//g,t4=/=/g,n4=/\?/g,Xb=/\+/g,r4=/%5B/g,o4=/%5D/g,e1=/%5E/g,s4=/%60/g,t1=/%7B/g,i4=/%7C/g,n1=/%7D/g,a4=/%20/g;function hp(e){return encodeURI(""+e).replace(i4,"|").replace(r4,"[").replace(o4,"]")}function l4(e){return hp(e).replace(t1,"{").replace(n1,"}").replace(e1,"^")}function ud(e){return hp(e).replace(Xb,"%2B").replace(a4,"+").replace(Qb,"%23").replace(X3,"%26").replace(s4,"`").replace(t1,"{").replace(n1,"}").replace(e1,"^")}function u4(e){return ud(e).replace(t4,"%3D")}function c4(e){return hp(e).replace(Qb,"%23").replace(n4,"%3F")}function f4(e){return e==null?"":c4(e).replace(e4,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const d4=/\/$/,p4=e=>e.replace(d4,"");function ff(e,t,n="/"){let r,s={},i="",l="";const u=t.indexOf("#");let c=t.indexOf("?");return u=0&&(c=-1),c>-1&&(r=t.slice(0,c),i=t.slice(c+1,u>-1?u:t.length),s=e(i)),u>-1&&(r=r||t.slice(0,u),l=t.slice(u,t.length)),r=v4(r??t,n),{fullPath:r+(i&&"?")+i+l,path:r,query:s,hash:ra(l)}}function h4(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function I0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function g4(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Xs(t.matched[r],n.matched[s])&&r1(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Xs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function r1(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!m4(e[n],t[n]))return!1;return!0}function m4(e,t){return vr(e)?R0(e,t):vr(t)?R0(t,e):e===t}function R0(e,t){return vr(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function v4(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,l,u;for(l=0;l1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(l).join("/")}var oa;(function(e){e.pop="pop",e.push="push"})(oa||(oa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function y4(e){if(!e)if(Bs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),p4(e)}const b4=/^[^#]+#/;function _4(e,t){return e.replace(b4,"#")+t}function w4(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Tu=()=>({left:window.scrollX,top:window.scrollY});function x4(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=w4(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function O0(e,t){return(history.state?history.state.position-t:-1)+e}const cd=new Map;function k4(e,t){cd.set(e,t)}function S4(e){const t=cd.get(e);return cd.delete(e),t}let C4=()=>location.protocol+"//"+location.host;function o1(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let u=s.includes(e.slice(i))?e.slice(i).length:1,c=s.slice(u);return c[0]!=="/"&&(c="/"+c),I0(c,"")}return I0(n,e)+r+s}function E4(e,t,n,r){let s=[],i=[],l=null;const u=({state:h})=>{const v=o1(e,location),_=n.value,x=t.value;let b=0;if(h){if(n.value=v,t.value=h,l&&l===_){l=null;return}b=x?h.position-x.position:0}else r(v);s.forEach(E=>{E(n.value,_,{delta:b,type:oa.pop,direction:b?b>0?qi.forward:qi.back:qi.unknown})})};function c(){l=n.value}function p(h){s.push(h);const v=()=>{const _=s.indexOf(h);_>-1&&s.splice(_,1)};return i.push(v),v}function d(){const{history:h}=window;h.state&&h.replaceState(yt({},h.state,{scroll:Tu()}),"")}function g(){for(const h of i)h();i=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:c,listen:p,destroy:g}}function P0(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Tu():null}}function T4(e){const{history:t,location:n}=window,r={value:o1(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,p,d){const g=e.indexOf("#"),h=g>-1?(n.host&&document.querySelector("base")?e:e.slice(g))+c:C4()+e+c;try{t[d?"replaceState":"pushState"](p,"",h),s.value=p}catch(v){console.error(v),n[d?"replace":"assign"](h)}}function l(c,p){const d=yt({},t.state,P0(s.value.back,c,s.value.forward,!0),p,{position:s.value.position});i(c,d,!0),r.value=c}function u(c,p){const d=yt({},s.value,t.state,{forward:c,scroll:Tu()});i(d.current,d,!0);const g=yt({},P0(r.value,c,null),{position:d.position+1},p);i(c,g,!1),r.value=c}return{location:r,state:s,push:u,replace:l}}function s1(e){e=y4(e);const t=T4(e),n=E4(e,t.state,t.location,t.replace);function r(i,l=!0){l||n.pauseListeners(),history.go(i)}const s=yt({location:"",base:e,go:r,createHref:_4.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function $4(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),s1(e)}function A4(e){return typeof e=="string"||e&&typeof e=="object"}function i1(e){return typeof e=="string"||typeof e=="symbol"}const dr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},a1=Symbol("");var L0;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(L0||(L0={}));function ei(e,t){return yt(new Error,{type:e,[a1]:!0},t)}function Ur(e,t){return e instanceof Error&&a1 in e&&(t==null||!!(e.type&t))}const M0="[^/]+?",I4={sensitive:!1,strict:!1,start:!0,end:!0},R4=/[.+*?^${}()[\]/\\]/g;function O4(e,t){const n=yt({},I4,t),r=[];let s=n.start?"^":"";const i=[];for(const p of e){const d=p.length?[]:[90];n.strict&&!p.length&&(s+="/");for(let g=0;gt.length?t.length===1&&t[0]===80?1:-1:0}function L4(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const M4={type:0,value:""},B4=/[a-zA-Z0-9_]/;function F4(e){if(!e)return[[]];if(e==="/")return[[M4]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${p}": ${v}`)}let n=0,r=n;const s=[];let i;function l(){i&&s.push(i),i=[]}let u=0,c,p="",d="";function g(){p&&(n===0?i.push({type:0,value:p}):n===1||n===2||n===3?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:p,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),p="")}function h(){p+=c}for(;u{l(C)}:Wi}function l(d){if(i1(d)){const g=r.get(d);g&&(r.delete(d),n.splice(n.indexOf(g),1),g.children.forEach(l),g.alias.forEach(l))}else{const g=n.indexOf(d);g>-1&&(n.splice(g,1),d.record.name&&r.delete(d.record.name),d.children.forEach(l),d.alias.forEach(l))}}function u(){return n}function c(d){let g=0;for(;g=0&&(d.record.path!==n[g].record.path||!l1(d,n[g]));)g++;n.splice(g,0,d),d.record.name&&!D0(d)&&r.set(d.record.name,d)}function p(d,g){let h,v={},_,x;if("name"in d&&d.name){if(h=r.get(d.name),!h)throw ei(1,{location:d});x=h.record.name,v=yt(F0(g.params,h.keys.filter(C=>!C.optional).concat(h.parent?h.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&F0(d.params,h.keys.map(C=>C.name))),_=h.stringify(v)}else if(d.path!=null)_=d.path,h=n.find(C=>C.re.test(_)),h&&(v=h.parse(_),x=h.record.name);else{if(h=g.name?r.get(g.name):n.find(C=>C.re.test(g.path)),!h)throw ei(1,{location:d,currentLocation:g});x=h.record.name,v=yt({},g.params,d.params),_=h.stringify(v)}const b=[];let E=h;for(;E;)b.unshift(E.record),E=E.parent;return{name:x,path:_,params:v,matched:b,meta:U4(b)}}return e.forEach(d=>i(d)),{addRoute:i,resolve:p,removeRoute:l,getRoutes:u,getRecordMatcher:s}}function F0(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function N4(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:j4(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function j4(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function D0(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function U4(e){return e.reduce((t,n)=>yt(t,n.meta),{})}function V0(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function l1(e,t){return t.children.some(n=>n===e||l1(e,n))}function H4(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&ud(i)):[r&&ud(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function z4(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=vr(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const W4=Symbol(""),j0=Symbol(""),gp=Symbol(""),mp=Symbol(""),fd=Symbol("");function $i(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function So(e,t,n,r,s,i=l=>l()){const l=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((u,c)=>{const p=h=>{h===!1?c(ei(4,{from:n,to:t})):h instanceof Error?c(h):A4(h)?c(ei(2,{from:t,to:h})):(l&&r.enterCallbacks[s]===l&&typeof h=="function"&&l.push(h),u())},d=i(()=>e.call(r&&r.instances[s],t,n,p));let g=Promise.resolve(d);e.length<3&&(g=g.then(p)),g.catch(h=>c(h))})}function df(e,t,n,r,s=i=>i()){const i=[];for(const l of e)for(const u in l.components){let c=l.components[u];if(!(t!=="beforeRouteEnter"&&!l.instances[u]))if(q4(c)){const d=(c.__vccOpts||c)[t];d&&i.push(So(d,n,r,l,u,s))}else{let p=c();i.push(()=>p.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${l.path}"`));const g=Q3(d)?d.default:d;l.components[u]=g;const v=(g.__vccOpts||g)[t];return v&&So(v,n,r,l,u,s)()}))}}return i}function q4(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function U0(e){const t=Ke(gp),n=Ke(mp),r=F(()=>{const c=R(e.to);return t.resolve(c)}),s=F(()=>{const{matched:c}=r.value,{length:p}=c,d=c[p-1],g=n.matched;if(!d||!g.length)return-1;const h=g.findIndex(Xs.bind(null,d));if(h>-1)return h;const v=H0(c[p-2]);return p>1&&H0(d)===v&&g[g.length-1].path!==v?g.findIndex(Xs.bind(null,c[p-2])):h}),i=F(()=>s.value>-1&&Z4(n.params,r.value.params)),l=F(()=>s.value>-1&&s.value===n.matched.length-1&&r1(n.params,r.value.params));function u(c={}){return J4(c)?t[R(e.replace)?"replace":"push"](R(e.to)).catch(Wi):Promise.resolve()}return{route:r,href:F(()=>r.value.href),isActive:i,isExactActive:l,navigate:u}}const K4=we({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:U0,setup(e,{slots:t}){const n=_n(U0(e)),{options:r}=Ke(gp),s=F(()=>({[z0(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[z0(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Xe("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),G4=K4;function J4(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Z4(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!vr(s)||s.length!==r.length||r.some((i,l)=>i!==s[l]))return!1}return!0}function H0(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const z0=(e,t,n)=>e??t??n,Y4=we({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ke(fd),s=F(()=>e.route||r.value),i=Ke(j0,0),l=F(()=>{let p=R(i);const{matched:d}=s.value;let g;for(;(g=d[p])&&!g.components;)p++;return p}),u=F(()=>s.value.matched[l.value]);bt(j0,F(()=>l.value+1)),bt(W4,u),bt(fd,s);const c=te();return gt(()=>[c.value,u.value,e.name],([p,d,g],[h,v,_])=>{d&&(d.instances[g]=p,v&&v!==d&&p&&p===h&&(d.leaveGuards.size||(d.leaveGuards=v.leaveGuards),d.updateGuards.size||(d.updateGuards=v.updateGuards))),p&&d&&(!v||!Xs(d,v)||!h)&&(d.enterCallbacks[g]||[]).forEach(x=>x(p))},{flush:"post"}),()=>{const p=s.value,d=e.name,g=u.value,h=g&&g.components[d];if(!h)return W0(n.default,{Component:h,route:p});const v=g.props[d],_=v?v===!0?p.params:typeof v=="function"?v(p):v:null,b=Xe(h,yt({},_,t,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(g.instances[d]=null)},ref:c}));return W0(n.default,{Component:b,route:p})||b}}});function W0(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const u1=Y4;function Q4(e){const t=V4(e.routes,e),n=e.parseQuery||H4,r=e.stringifyQuery||N0,s=e.history,i=$i(),l=$i(),u=$i(),c=Ir(dr);let p=dr;Bs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=cf.bind(null,ee=>""+ee),g=cf.bind(null,f4),h=cf.bind(null,ra);function v(ee,ye){let pe,Ce;return i1(ee)?(pe=t.getRecordMatcher(ee),Ce=ye):Ce=ee,t.addRoute(Ce,pe)}function _(ee){const ye=t.getRecordMatcher(ee);ye&&t.removeRoute(ye)}function x(){return t.getRoutes().map(ee=>ee.record)}function b(ee){return!!t.getRecordMatcher(ee)}function E(ee,ye){if(ye=yt({},ye||c.value),typeof ee=="string"){const O=ff(n,ee,ye.path),H=t.resolve({path:O.path},ye),re=s.createHref(O.fullPath);return yt(O,H,{params:h(H.params),hash:ra(O.hash),redirectedFrom:void 0,href:re})}let pe;if(ee.path!=null)pe=yt({},ee,{path:ff(n,ee.path,ye.path).path});else{const O=yt({},ee.params);for(const H in O)O[H]==null&&delete O[H];pe=yt({},ee,{params:g(O)}),ye.params=g(ye.params)}const Ce=t.resolve(pe,ye),nt=ee.hash||"";Ce.params=d(h(Ce.params));const mt=h4(r,yt({},ee,{hash:l4(nt),path:Ce.path})),T=s.createHref(mt);return yt({fullPath:mt,hash:nt,query:r===N0?z4(ee.query):ee.query||{}},Ce,{redirectedFrom:void 0,href:T})}function C(ee){return typeof ee=="string"?ff(n,ee,c.value.path):yt({},ee)}function S(ee,ye){if(p!==ee)return ei(8,{from:ye,to:ee})}function A(ee){return U(ee)}function B(ee){return A(yt(C(ee),{replace:!0}))}function L(ee){const ye=ee.matched[ee.matched.length-1];if(ye&&ye.redirect){const{redirect:pe}=ye;let Ce=typeof pe=="function"?pe(ee):pe;return typeof Ce=="string"&&(Ce=Ce.includes("?")||Ce.includes("#")?Ce=C(Ce):{path:Ce},Ce.params={}),yt({query:ee.query,hash:ee.hash,params:Ce.path!=null?{}:ee.params},Ce)}}function U(ee,ye){const pe=p=E(ee),Ce=c.value,nt=ee.state,mt=ee.force,T=ee.replace===!0,O=L(pe);if(O)return U(yt(C(O),{state:typeof O=="object"?yt({},nt,O.state):nt,force:mt,replace:T}),ye||pe);const H=pe;H.redirectedFrom=ye;let re;return!mt&&g4(r,Ce,pe)&&(re=ei(16,{to:H,from:Ce}),Re(Ce,Ce,!0,!1)),(re?Promise.resolve(re):K(H,Ce)).catch(G=>Ur(G)?Ur(G,2)?G:Gt(G):ve(G,H,Ce)).then(G=>{if(G){if(Ur(G,2))return U(yt({replace:T},C(G.to),{state:typeof G.to=="object"?yt({},nt,G.to.state):nt,force:mt}),ye||H)}else G=z(H,Ce,!0,T,nt);return Y(H,Ce,G),G})}function j(ee,ye){const pe=S(ee,ye);return pe?Promise.reject(pe):Promise.resolve()}function q(ee){const ye=Dt.values().next().value;return ye&&typeof ye.runWithContext=="function"?ye.runWithContext(ee):ee()}function K(ee,ye){let pe;const[Ce,nt,mt]=X4(ee,ye);pe=df(Ce.reverse(),"beforeRouteLeave",ee,ye);for(const O of Ce)O.leaveGuards.forEach(H=>{pe.push(So(H,ee,ye))});const T=j.bind(null,ee,ye);return pe.push(T),St(pe).then(()=>{pe=[];for(const O of i.list())pe.push(So(O,ee,ye));return pe.push(T),St(pe)}).then(()=>{pe=df(nt,"beforeRouteUpdate",ee,ye);for(const O of nt)O.updateGuards.forEach(H=>{pe.push(So(H,ee,ye))});return pe.push(T),St(pe)}).then(()=>{pe=[];for(const O of mt)if(O.beforeEnter)if(vr(O.beforeEnter))for(const H of O.beforeEnter)pe.push(So(H,ee,ye));else pe.push(So(O.beforeEnter,ee,ye));return pe.push(T),St(pe)}).then(()=>(ee.matched.forEach(O=>O.enterCallbacks={}),pe=df(mt,"beforeRouteEnter",ee,ye,q),pe.push(T),St(pe))).then(()=>{pe=[];for(const O of l.list())pe.push(So(O,ee,ye));return pe.push(T),St(pe)}).catch(O=>Ur(O,8)?O:Promise.reject(O))}function Y(ee,ye,pe){u.list().forEach(Ce=>q(()=>Ce(ee,ye,pe)))}function z(ee,ye,pe,Ce,nt){const mt=S(ee,ye);if(mt)return mt;const T=ye===dr,O=Bs?history.state:{};pe&&(Ce||T?s.replace(ee.fullPath,yt({scroll:T&&O&&O.scroll},nt)):s.push(ee.fullPath,nt)),c.value=ee,Re(ee,ye,pe,T),Gt()}let be;function ce(){be||(be=s.listen((ee,ye,pe)=>{if(!fn.listening)return;const Ce=E(ee),nt=L(Ce);if(nt){U(yt(nt,{replace:!0}),Ce).catch(Wi);return}p=Ce;const mt=c.value;Bs&&k4(O0(mt.fullPath,pe.delta),Tu()),K(Ce,mt).catch(T=>Ur(T,12)?T:Ur(T,2)?(U(T.to,Ce).then(O=>{Ur(O,20)&&!pe.delta&&pe.type===oa.pop&&s.go(-1,!1)}).catch(Wi),Promise.reject()):(pe.delta&&s.go(-pe.delta,!1),ve(T,Ce,mt))).then(T=>{T=T||z(Ce,mt,!1),T&&(pe.delta&&!Ur(T,8)?s.go(-pe.delta,!1):pe.type===oa.pop&&Ur(T,20)&&s.go(-1,!1)),Y(Ce,mt,T)}).catch(Wi)}))}let ke=$i(),ie=$i(),Se;function ve(ee,ye,pe){Gt(ee);const Ce=ie.list();return Ce.length?Ce.forEach(nt=>nt(ee,ye,pe)):console.error(ee),Promise.reject(ee)}function Lt(){return Se&&c.value!==dr?Promise.resolve():new Promise((ee,ye)=>{ke.add([ee,ye])})}function Gt(ee){return Se||(Se=!ee,ce(),ke.list().forEach(([ye,pe])=>ee?pe(ee):ye()),ke.reset()),ee}function Re(ee,ye,pe,Ce){const{scrollBehavior:nt}=e;if(!Bs||!nt)return Promise.resolve();const mt=!pe&&S4(O0(ee.fullPath,0))||(Ce||!pe)&&history.state&&history.state.scroll||null;return an().then(()=>nt(ee,ye,mt)).then(T=>T&&x4(T)).catch(T=>ve(T,ee,ye))}const je=ee=>s.go(ee);let Ft;const Dt=new Set,fn={currentRoute:c,listening:!0,addRoute:v,removeRoute:_,hasRoute:b,getRoutes:x,resolve:E,options:e,push:A,replace:B,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:i.add,beforeResolve:l.add,afterEach:u.add,onError:ie.add,isReady:Lt,install(ee){const ye=this;ee.component("RouterLink",G4),ee.component("RouterView",u1),ee.config.globalProperties.$router=ye,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>R(c)}),Bs&&!Ft&&c.value===dr&&(Ft=!0,A(s.location).catch(nt=>{}));const pe={};for(const nt in dr)Object.defineProperty(pe,nt,{get:()=>c.value[nt],enumerable:!0});ee.provide(gp,ye),ee.provide(mp,ca(pe)),ee.provide(fd,c);const Ce=ee.unmount;Dt.add(ee),ee.unmount=function(){Dt.delete(ee),Dt.size<1&&(p=dr,be&&be(),be=null,c.value=dr,Ft=!1,Se=!1),Ce()}}};function St(ee){return ee.reduce((ye,pe)=>ye.then(()=>q(pe)),Promise.resolve())}return fn}function X4(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lXs(p,u))?r.push(u):n.push(u));const c=e.matched[l];c&&(t.matched.find(p=>Xs(p,c))||s.push(c))}return[n,r,s]}function eR(){return Ke(mp)}const tR=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),dd=(e,t)=>{const n=e.route.matched.find(s=>{var i;return((i=s.components)==null?void 0:i.default)===e.Component.type}),r=t??(n==null?void 0:n.meta.key)??(n&&tR(e.route,n));return typeof r=="function"?r(e.route):r},nR=(e,t)=>({default:()=>e?Xe(FT,e===!0?{}:e,t):t});function vp(e){return Array.isArray(e)?e:[e]}const pf=null,hf=null,gf=null,mf=null,vf=null,yf=null,bf=null,_f=null,wf=null,xf=null,q0=[{name:"backtest-id",path:"/backtest/:id()",meta:{},alias:[],redirect:pf==null?void 0:pf.redirect,component:()=>yn(()=>import("./BlJtC8uF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url).then(e=>e.default||e)},{name:"backtest",path:"/backtest",meta:{},alias:[],redirect:hf==null?void 0:hf.redirect,component:()=>yn(()=>import("./CadNkoze.js"),[],import.meta.url).then(e=>e.default||e)},{name:"candles-id",path:"/candles/:id()",meta:{},alias:[],redirect:gf==null?void 0:gf.redirect,component:()=>yn(()=>import("./DaALoRQl.js"),__vite__mapDeps([9,1,4,5,6,8]),import.meta.url).then(e=>e.default||e)},{name:"candles",path:"/candles",meta:{},alias:[],redirect:mf==null?void 0:mf.redirect,component:()=>yn(()=>import("./BbjuIOUV.js"),[],import.meta.url).then(e=>e.default||e)},{name:"exchange-api-keys",path:"/exchange-api-keys",meta:{},alias:[],redirect:vf==null?void 0:vf.redirect,component:()=>yn(()=>import("./Bimrvkt9.js"),__vite__mapDeps([10,6,3,8,11]),import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",meta:{},alias:[],redirect:yf==null?void 0:yf.redirect,component:()=>yn(()=>import("./bVvtH8Bk.js"),__vite__mapDeps([12,8]),import.meta.url).then(e=>e.default||e)},{name:"live-id",path:"/live/:id()",meta:{},alias:[],redirect:bf==null?void 0:bf.redirect,component:()=>yn(()=>import("./1OfPoS_-.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8]),import.meta.url).then(e=>e.default||e)},{name:"live",path:"/live",meta:{},alias:[],redirect:_f==null?void 0:_f.redirect,component:()=>yn(()=>import("./Dggi9RR5.js"),[],import.meta.url).then(e=>e.default||e)},{name:"notification-api-keys",path:"/notification-api-keys",meta:{},alias:[],redirect:wf==null?void 0:wf.redirect,component:()=>yn(()=>import("./D7LfWr59.js"),__vite__mapDeps([14,6,3,8,11]),import.meta.url).then(e=>e.default||e)},{name:"optimization",path:"/optimization",meta:{},alias:[],redirect:xf==null?void 0:xf.redirect,component:()=>yn(()=>import("./CqsPNs1W.js"),__vite__mapDeps([15,2,3,4,5,6,8]),import.meta.url).then(e=>e.default||e)}],c1=(e,t,n)=>(t=t===!0?{}:t,{default:()=>{var r;return t?Xe(e,t,n):(r=n.default)==null?void 0:r.call(n)}});function K0(e){const t=(e==null?void 0:e.meta.key)??e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""});return typeof t=="function"?t(e):t}function rR(e,t){return e===t||t===dr?!1:K0(e)!==K0(t)?!0:!e.matched.every((r,s)=>{var i,l;return r.components&&r.components.default===((l=(i=t.matched[s])==null?void 0:i.components)==null?void 0:l.default)})}const oR={scrollBehavior(e,t,n){var p;const r=it(),s=((p=Wn().options)==null?void 0:p.scrollBehaviorType)??"auto";let i=n||void 0;const l=typeof e.meta.scrollToTop=="function"?e.meta.scrollToTop(e,t):e.meta.scrollToTop;if(!i&&t&&e&&l!==!1&&rR(e,t)&&(i={left:0,top:0}),e.path===t.path)return t.hash&&!e.hash?{left:0,top:0}:e.hash?{el:e.hash,top:G0(e.hash),behavior:s}:!1;const u=d=>!!(d.meta.pageTransition??ld),c=u(t)&&u(e)?"page:transition:finish":"page:finish";return new Promise(d=>{r.hooks.hookOnce(c,async()=>{await new Promise(g=>setTimeout(g,0)),e.hash&&(i={el:e.hash,top:G0(e.hash),behavior:s}),d(i)})})}};function G0(e){try{const t=document.querySelector(e);if(t)return parseFloat(getComputedStyle(t).scrollMarginTop)}catch{}return 0}const sR={hashMode:!0,scrollBehaviorType:"auto"},Nn={...sR,...oR},iR=async e=>{var c;let t,n;if(!((c=e.meta)!=null&&c.validate))return;const r=it(),s=Wn();if(([t,n]=na(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t)===!0)return;const l=ya({statusCode:404,statusMessage:`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}}),u=s.beforeResolve(p=>{if(u(),p===e){const d=s.afterEach(async()=>{d(),await r.runWithContext(()=>Fs(l)),window.history.pushState({},"",e.fullPath)});return!1}})},aR=async e=>{let t,n;const r=([t,n]=na(()=>pp(e.path)),t=await t,n(),t);if(r.redirect)return Xr(r.redirect,{acceptRelative:!0})?(window.location.href=r.redirect,!1):r.redirect},lR=[iR,aR],Ki={};function uR(e,t,n){const{pathname:r,search:s,hash:i}=t,l=e.indexOf("#");if(l>-1){const p=i.includes(e.slice(l))?e.slice(l).length:1;let d=i.slice(p);return d[0]!=="/"&&(d="/"+d),c0(d,"")}const u=c0(r,e),c=!n||RA(u,n,{trailingSlash:!0})?u:n;return c+(c.includes("?")?"":s)+i}const cR=On({name:"nuxt:router",enforce:"pre",async setup(e){var b,E;let t,n,r=Yr().app.baseURL;Nn.hashMode&&!r.includes("#")&&(r+="#");const s=((b=Nn.history)==null?void 0:b.call(Nn,r))??(Nn.hashMode?$4(r):s1(r)),i=((E=Nn.routes)==null?void 0:E.call(Nn,q0))??q0;let l;const u=Q4({...Nn,scrollBehavior:(C,S,A)=>{if(S===dr){l=A;return}if(Nn.scrollBehavior){if(u.options.scrollBehavior=Nn.scrollBehavior,"scrollRestoration"in window.history){const B=u.beforeEach(()=>{B(),window.history.scrollRestoration="manual"})}return Nn.scrollBehavior(C,dr,l||A)}},history:s,routes:i});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),e.vueApp.use(u);const c=Ir(u.currentRoute.value);u.afterEach((C,S)=>{c.value=S}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>c.value});const p=uR(r,window.location,e.payload.path),d=Ir(u.currentRoute.value),g=()=>{d.value=u.currentRoute.value};e.hook("page:finish",g),u.afterEach((C,S)=>{var A,B,L,U;((B=(A=C.matched[0])==null?void 0:A.components)==null?void 0:B.default)===((U=(L=S.matched[0])==null?void 0:L.components)==null?void 0:U.default)&&g()});const h={};for(const C in d.value)Object.defineProperty(h,C,{get:()=>d.value[C]});e._route=ca(h),e._middleware=e._middleware||{global:[],named:{}};try{[t,n]=na(()=>u.isReady()),await t,n()}catch(C){[t,n]=na(()=>e.runWithContext(()=>Fs(C))),await t,n()}const v=p!==u.currentRoute.value.fullPath?u.resolve(p):u.currentRoute.value;g();const _=e.payload.state._layout;u.beforeEach(async(C,S)=>{var A;await e.callHook("page:loading:start"),C.meta=_n(C.meta),e.isHydrating&&_&&!Gs(C.meta.layout)&&(C.meta.layout=_),e._processingMiddleware=!0;{const B=new Set([...lR,...e._middleware.global]);for(const L of C.matched){const U=L.meta.middleware;if(U)for(const j of vp(U))B.add(j)}{const L=await e.runWithContext(()=>pp(C.path));if(L.appMiddleware)for(const U in L.appMiddleware)L.appMiddleware[U]?B.add(U):B.delete(U)}for(const L of B){const U=typeof L=="string"?e._middleware.named[L]||await((A=Ki[L])==null?void 0:A.call(Ki).then(q=>q.default||q)):L;if(!U)throw new Error(`Unknown route middleware: '${L}'.`);const j=await e.runWithContext(()=>U(C,S));if(!e.payload.serverRendered&&e.isHydrating&&(j===!1||j instanceof Error)){const q=j||rd({statusCode:404,statusMessage:`Page Not Found: ${p}`});return await e.runWithContext(()=>Fs(q)),!1}if(j!==!0&&(j||j===!1))return j}}}),u.onError(async()=>{delete e._processingMiddleware,await e.callHook("page:loading:end")});const x=Cu();return u.afterEach(async(C,S,A)=>{delete e._processingMiddleware,!e.isHydrating&&x.value&&await e.runWithContext(DI),A&&await e.callHook("page:loading:end"),C.matched.length===0&&await e.runWithContext(()=>Fs(rd({statusCode:404,fatal:!1,statusMessage:`Page not found: ${C.fullPath}`,data:{path:C.fullPath}})))}),e.hooks.hookOnce("app:created",async()=>{try{"name"in v&&(v.name=void 0),await u.replace({...v,force:!0}),u.options.scrollBehavior=Nn.scrollBehavior}catch(C){await e.runWithContext(()=>Fs(C))}}),{provide:{router:u}}}}),pd=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),fR=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),yp=e=>{const t=it();t.isHydrating?t.hooks.hookOnce("app:suspense:resolve",()=>{pd(e)}):pd(e)},dR=On({name:"nuxt:payload",setup(e){Wn().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await $0(t.path);r&&Object.assign(e.static.data,r.data)}),yp(()=>{var t;e.hooks.hook("link:prefetch",async n=>{ma(n).protocol||await $0(n)}),((t=navigator.connection)==null?void 0:t.effectiveType)!=="slow-2g"&&setTimeout(Eu,1e3)})}}),pR=On(e=>{let t;async function n(){const r=await Eu();t&&clearTimeout(t),t=setTimeout(n,1e3*60*60);try{const s=await $fetch(up("builds/latest.json")+`?${Date.now()}`);s.id!==r.id&&e.hooks.callHook("app:manifest:update",s)}catch{}}yp(()=>{t=setTimeout(n,1e3*60*60)})}),hR=!1;/*! + */const Bs=typeof document<"u";function Q3(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const yt=Object.assign;function cf(e,t){const n={};for(const r in t){const s=t[r];n[r]=vr(s)?s.map(e):e(s)}return n}const Wi=()=>{},vr=Array.isArray,Qb=/#/g,X3=/&/g,e4=/\//g,t4=/=/g,n4=/\?/g,Xb=/\+/g,r4=/%5B/g,o4=/%5D/g,e1=/%5E/g,s4=/%60/g,t1=/%7B/g,i4=/%7C/g,n1=/%7D/g,a4=/%20/g;function hp(e){return encodeURI(""+e).replace(i4,"|").replace(r4,"[").replace(o4,"]")}function l4(e){return hp(e).replace(t1,"{").replace(n1,"}").replace(e1,"^")}function ud(e){return hp(e).replace(Xb,"%2B").replace(a4,"+").replace(Qb,"%23").replace(X3,"%26").replace(s4,"`").replace(t1,"{").replace(n1,"}").replace(e1,"^")}function u4(e){return ud(e).replace(t4,"%3D")}function c4(e){return hp(e).replace(Qb,"%23").replace(n4,"%3F")}function f4(e){return e==null?"":c4(e).replace(e4,"%2F")}function ra(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const d4=/\/$/,p4=e=>e.replace(d4,"");function ff(e,t,n="/"){let r,s={},i="",l="";const u=t.indexOf("#");let c=t.indexOf("?");return u=0&&(c=-1),c>-1&&(r=t.slice(0,c),i=t.slice(c+1,u>-1?u:t.length),s=e(i)),u>-1&&(r=r||t.slice(0,u),l=t.slice(u,t.length)),r=v4(r??t,n),{fullPath:r+(i&&"?")+i+l,path:r,query:s,hash:ra(l)}}function h4(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function I0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function g4(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&Xs(t.matched[r],n.matched[s])&&r1(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Xs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function r1(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!m4(e[n],t[n]))return!1;return!0}function m4(e,t){return vr(e)?R0(e,t):vr(t)?R0(t,e):e===t}function R0(e,t){return vr(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function v4(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let i=n.length-1,l,u;for(l=0;l1&&i--;else break;return n.slice(0,i).join("/")+"/"+r.slice(l).join("/")}var oa;(function(e){e.pop="pop",e.push="push"})(oa||(oa={}));var qi;(function(e){e.back="back",e.forward="forward",e.unknown=""})(qi||(qi={}));function y4(e){if(!e)if(Bs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),p4(e)}const b4=/^[^#]+#/;function _4(e,t){return e.replace(b4,"#")+t}function w4(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const Tu=()=>({left:window.scrollX,top:window.scrollY});function x4(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=w4(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function O0(e,t){return(history.state?history.state.position-t:-1)+e}const cd=new Map;function k4(e,t){cd.set(e,t)}function S4(e){const t=cd.get(e);return cd.delete(e),t}let C4=()=>location.protocol+"//"+location.host;function o1(e,t){const{pathname:n,search:r,hash:s}=t,i=e.indexOf("#");if(i>-1){let u=s.includes(e.slice(i))?e.slice(i).length:1,c=s.slice(u);return c[0]!=="/"&&(c="/"+c),I0(c,"")}return I0(n,e)+r+s}function E4(e,t,n,r){let s=[],i=[],l=null;const u=({state:h})=>{const v=o1(e,location),_=n.value,x=t.value;let b=0;if(h){if(n.value=v,t.value=h,l&&l===_){l=null;return}b=x?h.position-x.position:0}else r(v);s.forEach(E=>{E(n.value,_,{delta:b,type:oa.pop,direction:b?b>0?qi.forward:qi.back:qi.unknown})})};function c(){l=n.value}function p(h){s.push(h);const v=()=>{const _=s.indexOf(h);_>-1&&s.splice(_,1)};return i.push(v),v}function d(){const{history:h}=window;h.state&&h.replaceState(yt({},h.state,{scroll:Tu()}),"")}function g(){for(const h of i)h();i=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:c,listen:p,destroy:g}}function P0(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?Tu():null}}function T4(e){const{history:t,location:n}=window,r={value:o1(e,n)},s={value:t.state};s.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,p,d){const g=e.indexOf("#"),h=g>-1?(n.host&&document.querySelector("base")?e:e.slice(g))+c:C4()+e+c;try{t[d?"replaceState":"pushState"](p,"",h),s.value=p}catch(v){console.error(v),n[d?"replace":"assign"](h)}}function l(c,p){const d=yt({},t.state,P0(s.value.back,c,s.value.forward,!0),p,{position:s.value.position});i(c,d,!0),r.value=c}function u(c,p){const d=yt({},s.value,t.state,{forward:c,scroll:Tu()});i(d.current,d,!0);const g=yt({},P0(r.value,c,null),{position:d.position+1},p);i(c,g,!1),r.value=c}return{location:r,state:s,push:u,replace:l}}function s1(e){e=y4(e);const t=T4(e),n=E4(e,t.state,t.location,t.replace);function r(i,l=!0){l||n.pauseListeners(),history.go(i)}const s=yt({location:"",base:e,go:r,createHref:_4.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function $4(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),s1(e)}function A4(e){return typeof e=="string"||e&&typeof e=="object"}function i1(e){return typeof e=="string"||typeof e=="symbol"}const dr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},a1=Symbol("");var L0;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(L0||(L0={}));function ei(e,t){return yt(new Error,{type:e,[a1]:!0},t)}function Ur(e,t){return e instanceof Error&&a1 in e&&(t==null||!!(e.type&t))}const M0="[^/]+?",I4={sensitive:!1,strict:!1,start:!0,end:!0},R4=/[.+*?^${}()[\]/\\]/g;function O4(e,t){const n=yt({},I4,t),r=[];let s=n.start?"^":"";const i=[];for(const p of e){const d=p.length?[]:[90];n.strict&&!p.length&&(s+="/");for(let g=0;gt.length?t.length===1&&t[0]===80?1:-1:0}function L4(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const M4={type:0,value:""},B4=/[a-zA-Z0-9_]/;function F4(e){if(!e)return[[]];if(e==="/")return[[M4]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${p}": ${v}`)}let n=0,r=n;const s=[];let i;function l(){i&&s.push(i),i=[]}let u=0,c,p="",d="";function g(){p&&(n===0?i.push({type:0,value:p}):n===1||n===2||n===3?(i.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${p}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:p,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),p="")}function h(){p+=c}for(;u{l(C)}:Wi}function l(d){if(i1(d)){const g=r.get(d);g&&(r.delete(d),n.splice(n.indexOf(g),1),g.children.forEach(l),g.alias.forEach(l))}else{const g=n.indexOf(d);g>-1&&(n.splice(g,1),d.record.name&&r.delete(d.record.name),d.children.forEach(l),d.alias.forEach(l))}}function u(){return n}function c(d){let g=0;for(;g=0&&(d.record.path!==n[g].record.path||!l1(d,n[g]));)g++;n.splice(g,0,d),d.record.name&&!D0(d)&&r.set(d.record.name,d)}function p(d,g){let h,v={},_,x;if("name"in d&&d.name){if(h=r.get(d.name),!h)throw ei(1,{location:d});x=h.record.name,v=yt(F0(g.params,h.keys.filter(C=>!C.optional).concat(h.parent?h.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&F0(d.params,h.keys.map(C=>C.name))),_=h.stringify(v)}else if(d.path!=null)_=d.path,h=n.find(C=>C.re.test(_)),h&&(v=h.parse(_),x=h.record.name);else{if(h=g.name?r.get(g.name):n.find(C=>C.re.test(g.path)),!h)throw ei(1,{location:d,currentLocation:g});x=h.record.name,v=yt({},g.params,d.params),_=h.stringify(v)}const b=[];let E=h;for(;E;)b.unshift(E.record),E=E.parent;return{name:x,path:_,params:v,matched:b,meta:U4(b)}}return e.forEach(d=>i(d)),{addRoute:i,resolve:p,removeRoute:l,getRoutes:u,getRecordMatcher:s}}function F0(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function N4(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:j4(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function j4(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function D0(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function U4(e){return e.reduce((t,n)=>yt(t,n.meta),{})}function V0(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function l1(e,t){return t.children.some(n=>n===e||l1(e,n))}function H4(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;si&&ud(i)):[r&&ud(r)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function z4(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=vr(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const W4=Symbol(""),j0=Symbol(""),gp=Symbol(""),mp=Symbol(""),fd=Symbol("");function $i(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function So(e,t,n,r,s,i=l=>l()){const l=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((u,c)=>{const p=h=>{h===!1?c(ei(4,{from:n,to:t})):h instanceof Error?c(h):A4(h)?c(ei(2,{from:t,to:h})):(l&&r.enterCallbacks[s]===l&&typeof h=="function"&&l.push(h),u())},d=i(()=>e.call(r&&r.instances[s],t,n,p));let g=Promise.resolve(d);e.length<3&&(g=g.then(p)),g.catch(h=>c(h))})}function df(e,t,n,r,s=i=>i()){const i=[];for(const l of e)for(const u in l.components){let c=l.components[u];if(!(t!=="beforeRouteEnter"&&!l.instances[u]))if(q4(c)){const d=(c.__vccOpts||c)[t];d&&i.push(So(d,n,r,l,u,s))}else{let p=c();i.push(()=>p.then(d=>{if(!d)return Promise.reject(new Error(`Couldn't resolve component "${u}" at "${l.path}"`));const g=Q3(d)?d.default:d;l.components[u]=g;const v=(g.__vccOpts||g)[t];return v&&So(v,n,r,l,u,s)()}))}}return i}function q4(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function U0(e){const t=Ke(gp),n=Ke(mp),r=F(()=>{const c=R(e.to);return t.resolve(c)}),s=F(()=>{const{matched:c}=r.value,{length:p}=c,d=c[p-1],g=n.matched;if(!d||!g.length)return-1;const h=g.findIndex(Xs.bind(null,d));if(h>-1)return h;const v=H0(c[p-2]);return p>1&&H0(d)===v&&g[g.length-1].path!==v?g.findIndex(Xs.bind(null,c[p-2])):h}),i=F(()=>s.value>-1&&Z4(n.params,r.value.params)),l=F(()=>s.value>-1&&s.value===n.matched.length-1&&r1(n.params,r.value.params));function u(c={}){return J4(c)?t[R(e.replace)?"replace":"push"](R(e.to)).catch(Wi):Promise.resolve()}return{route:r,href:F(()=>r.value.href),isActive:i,isExactActive:l,navigate:u}}const K4=we({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:U0,setup(e,{slots:t}){const n=_n(U0(e)),{options:r}=Ke(gp),s=F(()=>({[z0(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[z0(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Xe("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},i)}}}),G4=K4;function J4(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Z4(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!vr(s)||s.length!==r.length||r.some((i,l)=>i!==s[l]))return!1}return!0}function H0(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const z0=(e,t,n)=>e??t??n,Y4=we({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=Ke(fd),s=F(()=>e.route||r.value),i=Ke(j0,0),l=F(()=>{let p=R(i);const{matched:d}=s.value;let g;for(;(g=d[p])&&!g.components;)p++;return p}),u=F(()=>s.value.matched[l.value]);bt(j0,F(()=>l.value+1)),bt(W4,u),bt(fd,s);const c=te();return gt(()=>[c.value,u.value,e.name],([p,d,g],[h,v,_])=>{d&&(d.instances[g]=p,v&&v!==d&&p&&p===h&&(d.leaveGuards.size||(d.leaveGuards=v.leaveGuards),d.updateGuards.size||(d.updateGuards=v.updateGuards))),p&&d&&(!v||!Xs(d,v)||!h)&&(d.enterCallbacks[g]||[]).forEach(x=>x(p))},{flush:"post"}),()=>{const p=s.value,d=e.name,g=u.value,h=g&&g.components[d];if(!h)return W0(n.default,{Component:h,route:p});const v=g.props[d],_=v?v===!0?p.params:typeof v=="function"?v(p):v:null,b=Xe(h,yt({},_,t,{onVnodeUnmounted:E=>{E.component.isUnmounted&&(g.instances[d]=null)},ref:c}));return W0(n.default,{Component:b,route:p})||b}}});function W0(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const u1=Y4;function Q4(e){const t=V4(e.routes,e),n=e.parseQuery||H4,r=e.stringifyQuery||N0,s=e.history,i=$i(),l=$i(),u=$i(),c=Ir(dr);let p=dr;Bs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=cf.bind(null,ee=>""+ee),g=cf.bind(null,f4),h=cf.bind(null,ra);function v(ee,ye){let pe,Ce;return i1(ee)?(pe=t.getRecordMatcher(ee),Ce=ye):Ce=ee,t.addRoute(Ce,pe)}function _(ee){const ye=t.getRecordMatcher(ee);ye&&t.removeRoute(ye)}function x(){return t.getRoutes().map(ee=>ee.record)}function b(ee){return!!t.getRecordMatcher(ee)}function E(ee,ye){if(ye=yt({},ye||c.value),typeof ee=="string"){const O=ff(n,ee,ye.path),H=t.resolve({path:O.path},ye),re=s.createHref(O.fullPath);return yt(O,H,{params:h(H.params),hash:ra(O.hash),redirectedFrom:void 0,href:re})}let pe;if(ee.path!=null)pe=yt({},ee,{path:ff(n,ee.path,ye.path).path});else{const O=yt({},ee.params);for(const H in O)O[H]==null&&delete O[H];pe=yt({},ee,{params:g(O)}),ye.params=g(ye.params)}const Ce=t.resolve(pe,ye),nt=ee.hash||"";Ce.params=d(h(Ce.params));const mt=h4(r,yt({},ee,{hash:l4(nt),path:Ce.path})),T=s.createHref(mt);return yt({fullPath:mt,hash:nt,query:r===N0?z4(ee.query):ee.query||{}},Ce,{redirectedFrom:void 0,href:T})}function C(ee){return typeof ee=="string"?ff(n,ee,c.value.path):yt({},ee)}function S(ee,ye){if(p!==ee)return ei(8,{from:ye,to:ee})}function A(ee){return U(ee)}function B(ee){return A(yt(C(ee),{replace:!0}))}function L(ee){const ye=ee.matched[ee.matched.length-1];if(ye&&ye.redirect){const{redirect:pe}=ye;let Ce=typeof pe=="function"?pe(ee):pe;return typeof Ce=="string"&&(Ce=Ce.includes("?")||Ce.includes("#")?Ce=C(Ce):{path:Ce},Ce.params={}),yt({query:ee.query,hash:ee.hash,params:Ce.path!=null?{}:ee.params},Ce)}}function U(ee,ye){const pe=p=E(ee),Ce=c.value,nt=ee.state,mt=ee.force,T=ee.replace===!0,O=L(pe);if(O)return U(yt(C(O),{state:typeof O=="object"?yt({},nt,O.state):nt,force:mt,replace:T}),ye||pe);const H=pe;H.redirectedFrom=ye;let re;return!mt&&g4(r,Ce,pe)&&(re=ei(16,{to:H,from:Ce}),Re(Ce,Ce,!0,!1)),(re?Promise.resolve(re):K(H,Ce)).catch(G=>Ur(G)?Ur(G,2)?G:Gt(G):ve(G,H,Ce)).then(G=>{if(G){if(Ur(G,2))return U(yt({replace:T},C(G.to),{state:typeof G.to=="object"?yt({},nt,G.to.state):nt,force:mt}),ye||H)}else G=z(H,Ce,!0,T,nt);return Y(H,Ce,G),G})}function j(ee,ye){const pe=S(ee,ye);return pe?Promise.reject(pe):Promise.resolve()}function q(ee){const ye=Dt.values().next().value;return ye&&typeof ye.runWithContext=="function"?ye.runWithContext(ee):ee()}function K(ee,ye){let pe;const[Ce,nt,mt]=X4(ee,ye);pe=df(Ce.reverse(),"beforeRouteLeave",ee,ye);for(const O of Ce)O.leaveGuards.forEach(H=>{pe.push(So(H,ee,ye))});const T=j.bind(null,ee,ye);return pe.push(T),St(pe).then(()=>{pe=[];for(const O of i.list())pe.push(So(O,ee,ye));return pe.push(T),St(pe)}).then(()=>{pe=df(nt,"beforeRouteUpdate",ee,ye);for(const O of nt)O.updateGuards.forEach(H=>{pe.push(So(H,ee,ye))});return pe.push(T),St(pe)}).then(()=>{pe=[];for(const O of mt)if(O.beforeEnter)if(vr(O.beforeEnter))for(const H of O.beforeEnter)pe.push(So(H,ee,ye));else pe.push(So(O.beforeEnter,ee,ye));return pe.push(T),St(pe)}).then(()=>(ee.matched.forEach(O=>O.enterCallbacks={}),pe=df(mt,"beforeRouteEnter",ee,ye,q),pe.push(T),St(pe))).then(()=>{pe=[];for(const O of l.list())pe.push(So(O,ee,ye));return pe.push(T),St(pe)}).catch(O=>Ur(O,8)?O:Promise.reject(O))}function Y(ee,ye,pe){u.list().forEach(Ce=>q(()=>Ce(ee,ye,pe)))}function z(ee,ye,pe,Ce,nt){const mt=S(ee,ye);if(mt)return mt;const T=ye===dr,O=Bs?history.state:{};pe&&(Ce||T?s.replace(ee.fullPath,yt({scroll:T&&O&&O.scroll},nt)):s.push(ee.fullPath,nt)),c.value=ee,Re(ee,ye,pe,T),Gt()}let be;function ce(){be||(be=s.listen((ee,ye,pe)=>{if(!fn.listening)return;const Ce=E(ee),nt=L(Ce);if(nt){U(yt(nt,{replace:!0}),Ce).catch(Wi);return}p=Ce;const mt=c.value;Bs&&k4(O0(mt.fullPath,pe.delta),Tu()),K(Ce,mt).catch(T=>Ur(T,12)?T:Ur(T,2)?(U(T.to,Ce).then(O=>{Ur(O,20)&&!pe.delta&&pe.type===oa.pop&&s.go(-1,!1)}).catch(Wi),Promise.reject()):(pe.delta&&s.go(-pe.delta,!1),ve(T,Ce,mt))).then(T=>{T=T||z(Ce,mt,!1),T&&(pe.delta&&!Ur(T,8)?s.go(-pe.delta,!1):pe.type===oa.pop&&Ur(T,20)&&s.go(-1,!1)),Y(Ce,mt,T)}).catch(Wi)}))}let ke=$i(),ie=$i(),Se;function ve(ee,ye,pe){Gt(ee);const Ce=ie.list();return Ce.length?Ce.forEach(nt=>nt(ee,ye,pe)):console.error(ee),Promise.reject(ee)}function Lt(){return Se&&c.value!==dr?Promise.resolve():new Promise((ee,ye)=>{ke.add([ee,ye])})}function Gt(ee){return Se||(Se=!ee,ce(),ke.list().forEach(([ye,pe])=>ee?pe(ee):ye()),ke.reset()),ee}function Re(ee,ye,pe,Ce){const{scrollBehavior:nt}=e;if(!Bs||!nt)return Promise.resolve();const mt=!pe&&S4(O0(ee.fullPath,0))||(Ce||!pe)&&history.state&&history.state.scroll||null;return an().then(()=>nt(ee,ye,mt)).then(T=>T&&x4(T)).catch(T=>ve(T,ee,ye))}const je=ee=>s.go(ee);let Ft;const Dt=new Set,fn={currentRoute:c,listening:!0,addRoute:v,removeRoute:_,hasRoute:b,getRoutes:x,resolve:E,options:e,push:A,replace:B,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:i.add,beforeResolve:l.add,afterEach:u.add,onError:ie.add,isReady:Lt,install(ee){const ye=this;ee.component("RouterLink",G4),ee.component("RouterView",u1),ee.config.globalProperties.$router=ye,Object.defineProperty(ee.config.globalProperties,"$route",{enumerable:!0,get:()=>R(c)}),Bs&&!Ft&&c.value===dr&&(Ft=!0,A(s.location).catch(nt=>{}));const pe={};for(const nt in dr)Object.defineProperty(pe,nt,{get:()=>c.value[nt],enumerable:!0});ee.provide(gp,ye),ee.provide(mp,ca(pe)),ee.provide(fd,c);const Ce=ee.unmount;Dt.add(ee),ee.unmount=function(){Dt.delete(ee),Dt.size<1&&(p=dr,be&&be(),be=null,c.value=dr,Ft=!1,Se=!1),Ce()}}};function St(ee){return ee.reduce((ye,pe)=>ye.then(()=>q(pe)),Promise.resolve())}return fn}function X4(e,t){const n=[],r=[],s=[],i=Math.max(t.matched.length,e.matched.length);for(let l=0;lXs(p,u))?r.push(u):n.push(u));const c=e.matched[l];c&&(t.matched.find(p=>Xs(p,c))||s.push(c))}return[n,r,s]}function eR(){return Ke(mp)}const tR=(e,t)=>t.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""}),dd=(e,t)=>{const n=e.route.matched.find(s=>{var i;return((i=s.components)==null?void 0:i.default)===e.Component.type}),r=t??(n==null?void 0:n.meta.key)??(n&&tR(e.route,n));return typeof r=="function"?r(e.route):r},nR=(e,t)=>({default:()=>e?Xe(FT,e===!0?{}:e,t):t});function vp(e){return Array.isArray(e)?e:[e]}const pf=null,hf=null,gf=null,mf=null,vf=null,yf=null,bf=null,_f=null,wf=null,xf=null,q0=[{name:"backtest-id",path:"/backtest/:id()",meta:{},alias:[],redirect:pf==null?void 0:pf.redirect,component:()=>yn(()=>import("./DTrGDXgG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url).then(e=>e.default||e)},{name:"backtest",path:"/backtest",meta:{},alias:[],redirect:hf==null?void 0:hf.redirect,component:()=>yn(()=>import("./8ZOs1Gwd.js"),[],import.meta.url).then(e=>e.default||e)},{name:"candles-id",path:"/candles/:id()",meta:{},alias:[],redirect:gf==null?void 0:gf.redirect,component:()=>yn(()=>import("./CyEJo30r.js"),__vite__mapDeps([9,1,4,5,6,8]),import.meta.url).then(e=>e.default||e)},{name:"candles",path:"/candles",meta:{},alias:[],redirect:mf==null?void 0:mf.redirect,component:()=>yn(()=>import("./CLIaz-ji.js"),[],import.meta.url).then(e=>e.default||e)},{name:"exchange-api-keys",path:"/exchange-api-keys",meta:{},alias:[],redirect:vf==null?void 0:vf.redirect,component:()=>yn(()=>import("./KtMNHRoY.js"),__vite__mapDeps([10,6,3,8,11]),import.meta.url).then(e=>e.default||e)},{name:"index",path:"/",meta:{},alias:[],redirect:yf==null?void 0:yf.redirect,component:()=>yn(()=>import("./oJy3_idV.js"),__vite__mapDeps([12,8]),import.meta.url).then(e=>e.default||e)},{name:"live-id",path:"/live/:id()",meta:{},alias:[],redirect:bf==null?void 0:bf.redirect,component:()=>yn(()=>import("./DERVWgPS.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,8]),import.meta.url).then(e=>e.default||e)},{name:"live",path:"/live",meta:{},alias:[],redirect:_f==null?void 0:_f.redirect,component:()=>yn(()=>import("./WHO4wNIc.js"),[],import.meta.url).then(e=>e.default||e)},{name:"notification-api-keys",path:"/notification-api-keys",meta:{},alias:[],redirect:wf==null?void 0:wf.redirect,component:()=>yn(()=>import("./WIlyI65S.js"),__vite__mapDeps([14,6,3,8,11]),import.meta.url).then(e=>e.default||e)},{name:"optimization",path:"/optimization",meta:{},alias:[],redirect:xf==null?void 0:xf.redirect,component:()=>yn(()=>import("./CbRZ-etx.js"),__vite__mapDeps([15,2,3,4,5,6,8]),import.meta.url).then(e=>e.default||e)}],c1=(e,t,n)=>(t=t===!0?{}:t,{default:()=>{var r;return t?Xe(e,t,n):(r=n.default)==null?void 0:r.call(n)}});function K0(e){const t=(e==null?void 0:e.meta.key)??e.path.replace(/(:\w+)\([^)]+\)/g,"$1").replace(/(:\w+)[?+*]/g,"$1").replace(/:\w+/g,n=>{var r;return((r=e.params[n.slice(1)])==null?void 0:r.toString())||""});return typeof t=="function"?t(e):t}function rR(e,t){return e===t||t===dr?!1:K0(e)!==K0(t)?!0:!e.matched.every((r,s)=>{var i,l;return r.components&&r.components.default===((l=(i=t.matched[s])==null?void 0:i.components)==null?void 0:l.default)})}const oR={scrollBehavior(e,t,n){var p;const r=it(),s=((p=Wn().options)==null?void 0:p.scrollBehaviorType)??"auto";let i=n||void 0;const l=typeof e.meta.scrollToTop=="function"?e.meta.scrollToTop(e,t):e.meta.scrollToTop;if(!i&&t&&e&&l!==!1&&rR(e,t)&&(i={left:0,top:0}),e.path===t.path)return t.hash&&!e.hash?{left:0,top:0}:e.hash?{el:e.hash,top:G0(e.hash),behavior:s}:!1;const u=d=>!!(d.meta.pageTransition??ld),c=u(t)&&u(e)?"page:transition:finish":"page:finish";return new Promise(d=>{r.hooks.hookOnce(c,async()=>{await new Promise(g=>setTimeout(g,0)),e.hash&&(i={el:e.hash,top:G0(e.hash),behavior:s}),d(i)})})}};function G0(e){try{const t=document.querySelector(e);if(t)return parseFloat(getComputedStyle(t).scrollMarginTop)}catch{}return 0}const sR={hashMode:!0,scrollBehaviorType:"auto"},Nn={...sR,...oR},iR=async e=>{var c;let t,n;if(!((c=e.meta)!=null&&c.validate))return;const r=it(),s=Wn();if(([t,n]=na(()=>Promise.resolve(e.meta.validate(e))),t=await t,n(),t)===!0)return;const l=ya({statusCode:404,statusMessage:`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}}),u=s.beforeResolve(p=>{if(u(),p===e){const d=s.afterEach(async()=>{d(),await r.runWithContext(()=>Fs(l)),window.history.pushState({},"",e.fullPath)});return!1}})},aR=async e=>{let t,n;const r=([t,n]=na(()=>pp(e.path)),t=await t,n(),t);if(r.redirect)return Xr(r.redirect,{acceptRelative:!0})?(window.location.href=r.redirect,!1):r.redirect},lR=[iR,aR],Ki={};function uR(e,t,n){const{pathname:r,search:s,hash:i}=t,l=e.indexOf("#");if(l>-1){const p=i.includes(e.slice(l))?e.slice(l).length:1;let d=i.slice(p);return d[0]!=="/"&&(d="/"+d),c0(d,"")}const u=c0(r,e),c=!n||RA(u,n,{trailingSlash:!0})?u:n;return c+(c.includes("?")?"":s)+i}const cR=On({name:"nuxt:router",enforce:"pre",async setup(e){var b,E;let t,n,r=Yr().app.baseURL;Nn.hashMode&&!r.includes("#")&&(r+="#");const s=((b=Nn.history)==null?void 0:b.call(Nn,r))??(Nn.hashMode?$4(r):s1(r)),i=((E=Nn.routes)==null?void 0:E.call(Nn,q0))??q0;let l;const u=Q4({...Nn,scrollBehavior:(C,S,A)=>{if(S===dr){l=A;return}if(Nn.scrollBehavior){if(u.options.scrollBehavior=Nn.scrollBehavior,"scrollRestoration"in window.history){const B=u.beforeEach(()=>{B(),window.history.scrollRestoration="manual"})}return Nn.scrollBehavior(C,dr,l||A)}},history:s,routes:i});"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto"),e.vueApp.use(u);const c=Ir(u.currentRoute.value);u.afterEach((C,S)=>{c.value=S}),Object.defineProperty(e.vueApp.config.globalProperties,"previousRoute",{get:()=>c.value});const p=uR(r,window.location,e.payload.path),d=Ir(u.currentRoute.value),g=()=>{d.value=u.currentRoute.value};e.hook("page:finish",g),u.afterEach((C,S)=>{var A,B,L,U;((B=(A=C.matched[0])==null?void 0:A.components)==null?void 0:B.default)===((U=(L=S.matched[0])==null?void 0:L.components)==null?void 0:U.default)&&g()});const h={};for(const C in d.value)Object.defineProperty(h,C,{get:()=>d.value[C]});e._route=ca(h),e._middleware=e._middleware||{global:[],named:{}};try{[t,n]=na(()=>u.isReady()),await t,n()}catch(C){[t,n]=na(()=>e.runWithContext(()=>Fs(C))),await t,n()}const v=p!==u.currentRoute.value.fullPath?u.resolve(p):u.currentRoute.value;g();const _=e.payload.state._layout;u.beforeEach(async(C,S)=>{var A;await e.callHook("page:loading:start"),C.meta=_n(C.meta),e.isHydrating&&_&&!Gs(C.meta.layout)&&(C.meta.layout=_),e._processingMiddleware=!0;{const B=new Set([...lR,...e._middleware.global]);for(const L of C.matched){const U=L.meta.middleware;if(U)for(const j of vp(U))B.add(j)}{const L=await e.runWithContext(()=>pp(C.path));if(L.appMiddleware)for(const U in L.appMiddleware)L.appMiddleware[U]?B.add(U):B.delete(U)}for(const L of B){const U=typeof L=="string"?e._middleware.named[L]||await((A=Ki[L])==null?void 0:A.call(Ki).then(q=>q.default||q)):L;if(!U)throw new Error(`Unknown route middleware: '${L}'.`);const j=await e.runWithContext(()=>U(C,S));if(!e.payload.serverRendered&&e.isHydrating&&(j===!1||j instanceof Error)){const q=j||rd({statusCode:404,statusMessage:`Page Not Found: ${p}`});return await e.runWithContext(()=>Fs(q)),!1}if(j!==!0&&(j||j===!1))return j}}}),u.onError(async()=>{delete e._processingMiddleware,await e.callHook("page:loading:end")});const x=Cu();return u.afterEach(async(C,S,A)=>{delete e._processingMiddleware,!e.isHydrating&&x.value&&await e.runWithContext(DI),A&&await e.callHook("page:loading:end"),C.matched.length===0&&await e.runWithContext(()=>Fs(rd({statusCode:404,fatal:!1,statusMessage:`Page not found: ${C.fullPath}`,data:{path:C.fullPath}})))}),e.hooks.hookOnce("app:created",async()=>{try{"name"in v&&(v.name=void 0),await u.replace({...v,force:!0}),u.options.scrollBehavior=Nn.scrollBehavior}catch(C){await e.runWithContext(()=>Fs(C))}}),{provide:{router:u}}}}),pd=globalThis.requestIdleCallback||(e=>{const t=Date.now(),n={didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))};return setTimeout(()=>{e(n)},1)}),fR=globalThis.cancelIdleCallback||(e=>{clearTimeout(e)}),yp=e=>{const t=it();t.isHydrating?t.hooks.hookOnce("app:suspense:resolve",()=>{pd(e)}):pd(e)},dR=On({name:"nuxt:payload",setup(e){Wn().beforeResolve(async(t,n)=>{if(t.path===n.path)return;const r=await $0(t.path);r&&Object.assign(e.static.data,r.data)}),yp(()=>{var t;e.hooks.hook("link:prefetch",async n=>{ma(n).protocol||await $0(n)}),((t=navigator.connection)==null?void 0:t.effectiveType)!=="slow-2g"&&setTimeout(Eu,1e3)})}}),pR=On(e=>{let t;async function n(){const r=await Eu();t&&clearTimeout(t),t=setTimeout(n,1e3*60*60);try{const s=await $fetch(up("builds/latest.json")+`?${Date.now()}`);s.id!==r.id&&e.hooks.callHook("app:manifest:update",s)}catch{}}yp(()=>{t=setTimeout(n,1e3*60*60)})}),hR=!1;/*! * pinia v2.1.7 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let f1;const ba=e=>f1=e,d1=Symbol();function hd(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Gi;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Gi||(Gi={}));function gR(){const e=Nd(!0),t=e.run(()=>te({}));let n=[],r=[];const s=Gd({install(i){ba(s),s._a=i,i.provide(d1,s),i.config.globalProperties.$pinia=s,r.forEach(l=>n.push(l)),r=[]},use(i){return!this._a&&!hR?r.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const p1=()=>{};function J0(e,t,n,r=p1){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Po()&&ps(s),s}function Ms(e,...t){e.slice().forEach(n=>{n(...t)})}const mR=e=>e();function gd(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];hd(s)&&hd(r)&&e.hasOwnProperty(n)&&!at(r)&&!us(r)?e[n]=gd(s,r):e[n]=r}return e}const vR=Symbol();function yR(e){return!hd(e)||!e.hasOwnProperty(vR)}const{assign:bo}=Object;function bR(e){return!!(at(e)&&e.effect)}function _R(e,t,n,r){const{state:s,actions:i,getters:l}=t,u=n.state.value[e];let c;function p(){u||(n.state.value[e]=s?s():{});const d=lT(n.state.value[e]);return bo(d,i,Object.keys(l||{}).reduce((g,h)=>(g[h]=Gd(F(()=>{ba(n);const v=n._s.get(e);return l[h].call(v,v)})),g),{}))}return c=h1(e,p,t,n,r,!0),c}function h1(e,t,n={},r,s,i){let l;const u=bo({actions:{}},n),c={deep:!0};let p,d,g=[],h=[],v;const _=r.state.value[e];!i&&!_&&(r.state.value[e]={}),te({});let x;function b(j){let q;p=d=!1,typeof j=="function"?(j(r.state.value[e]),q={type:Gi.patchFunction,storeId:e,events:v}):(gd(r.state.value[e],j),q={type:Gi.patchObject,payload:j,storeId:e,events:v});const K=x=Symbol();an().then(()=>{x===K&&(p=!0)}),d=!0,Ms(g,q,r.state.value[e])}const E=i?function(){const{state:q}=n,K=q?q():{};this.$patch(Y=>{bo(Y,K)})}:p1;function C(){l.stop(),g=[],h=[],r._s.delete(e)}function S(j,q){return function(){ba(r);const K=Array.from(arguments),Y=[],z=[];function be(ie){Y.push(ie)}function ce(ie){z.push(ie)}Ms(h,{args:K,name:j,store:B,after:be,onError:ce});let ke;try{ke=q.apply(this&&this.$id===e?this:B,K)}catch(ie){throw Ms(z,ie),ie}return ke instanceof Promise?ke.then(ie=>(Ms(Y,ie),ie)).catch(ie=>(Ms(z,ie),Promise.reject(ie))):(Ms(Y,ke),ke)}}const A={_p:r,$id:e,$onAction:J0.bind(null,h),$patch:b,$reset:E,$subscribe(j,q={}){const K=J0(g,j,q.detached,()=>Y()),Y=l.run(()=>gt(()=>r.state.value[e],z=>{(q.flush==="sync"?d:p)&&j({storeId:e,type:Gi.direct,events:v},z)},bo({},c,q)));return K},$dispose:C},B=_n(A);r._s.set(e,B);const U=(r._a&&r._a.runWithContext||mR)(()=>r._e.run(()=>(l=Nd()).run(t)));for(const j in U){const q=U[j];if(at(q)&&!bR(q)||us(q))i||(_&&yR(q)&&(at(q)?q.value=_[j]:gd(q,_[j])),r.state.value[e][j]=q);else if(typeof q=="function"){const K=S(j,q);U[j]=K,u.actions[j]=q}}return bo(B,U),bo(ze(B),U),Object.defineProperty(B,"$state",{get:()=>r.state.value[e],set:j=>{b(q=>{bo(q,j)})}}),r._p.forEach(j=>{bo(B,l.run(()=>j({store:B,app:r._a,pinia:r,options:u})))}),_&&i&&n.hydrate&&n.hydrate(B.$state,_),p=!0,d=!0,B}function ii(e,t,n){let r,s;const i=typeof t=="function";typeof e=="string"?(r=e,s=i?n:t):(s=e,r=e.id);function l(u,c){const p=rp();return u=u||(p?Ke(d1,null):null),u&&ba(u),u=f1,u._s.has(r)||(i?h1(r,t,s,u):_R(r,s,u)),u._s.get(r)}return l.$id=r,l}const wR=e=>e==="defer"||e===!1;function xR(...e){var _;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[n,r,s={}]=e;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof r!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const i=it(),l=r,u=()=>null,c=()=>i.isHydrating?i.payload.data[n]:i.static.data[n];s.server=s.server??!0,s.default=s.default??u,s.getCachedData=s.getCachedData??c,s.lazy=s.lazy??!1,s.immediate=s.immediate??!0,s.deep=s.deep??N3.deep,s.dedupe=s.dedupe??"cancel";const p=()=>s.getCachedData(n,i)!=null;if(!i._asyncData[n]||!s.immediate){(_=i.payload._errors)[n]??(_[n]=null);const x=s.deep?te:Ir;i._asyncData[n]={data:x(s.getCachedData(n,i)??s.default()),pending:te(!p()),error:Ot(i.payload._errors,n),status:te("idle")}}const d={...i._asyncData[n]};d.refresh=d.execute=(x={})=>{if(i._asyncDataPromises[n]){if(wR(x.dedupe??s.dedupe))return i._asyncDataPromises[n];i._asyncDataPromises[n].cancelled=!0}if((x._initial||i.isHydrating&&x._initial!==!1)&&p())return Promise.resolve(s.getCachedData(n,i));d.pending.value=!0,d.status.value="pending";const b=new Promise((E,C)=>{try{E(l(i))}catch(S){C(S)}}).then(async E=>{if(b.cancelled)return i._asyncDataPromises[n];let C=E;s.transform&&(C=await s.transform(E)),s.pick&&(C=SR(C,s.pick)),i.payload.data[n]=C,d.data.value=C,d.error.value=null,d.status.value="success"}).catch(E=>{if(b.cancelled)return i._asyncDataPromises[n];d.error.value=ya(E),d.data.value=R(s.default()),d.status.value="error"}).finally(()=>{b.cancelled||(d.pending.value=!1,delete i._asyncDataPromises[n])});return i._asyncDataPromises[n]=b,i._asyncDataPromises[n]},d.clear=()=>kR(i,n);const g=()=>d.refresh({_initial:!0}),h=s.server!==!1&&i.payload.serverRendered;{const x=ir();if(x&&!x._nuxtOnBeforeMountCbs){x._nuxtOnBeforeMountCbs=[];const C=x._nuxtOnBeforeMountCbs;Ny(()=>{C.forEach(S=>{S()}),C.splice(0,C.length)}),Ht(()=>C.splice(0,C.length))}h&&i.isHydrating&&(d.error.value||p())?(d.pending.value=!1,d.status.value=d.error.value?"error":"success"):x&&(i.payload.serverRendered&&i.isHydrating||s.lazy)&&s.immediate?x._nuxtOnBeforeMountCbs.push(g):s.immediate&&g();const b=Po();if(s.watch){const C=gt(s.watch,()=>d.refresh());b&&ps(C)}const E=i.hook("app:data:refresh",async C=>{(!C||C.includes(n))&&await d.refresh()});b&&ps(E)}const v=Promise.resolve(i._asyncDataPromises[n]).then(()=>d);return Object.assign(v,d),v}function kR(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=null),e._asyncData[t]&&(e._asyncData[t].data.value=void 0,e._asyncData[t].error.value=null,e._asyncData[t].pending.value=!1,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t].cancelled=!0,e._asyncDataPromises[t]=void 0)}function SR(e,t){const n={};for(const r of t)n[r]=e[r];return n}const CR="$s";function _a(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[n,r]=e;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const s=CR+n,i=it(),l=Ot(i.payload.state,s);if(l.value===void 0&&r){const u=r();if(at(u))return i.payload.state[s]=u,u;l.value=u}return l}function g1(e,t,n){const[r={},s]=typeof t=="string"?[{},t]:[t,n],i=F(()=>Tr(e)),l=r.key||$I([s,typeof i.value=="string"?i.value:"",...ER(r)]);if(!l||typeof l!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+l);if(!e)throw new Error("[nuxt] [useFetch] request is missing.");const u=l===s?"$f"+l:l;if(!r.baseURL&&typeof i.value=="string"&&i.value[0]==="/"&&i.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:c,lazy:p,default:d,transform:g,pick:h,watch:v,immediate:_,getCachedData:x,deep:b,dedupe:E,...C}=r,S=_n({...j3,...C,cache:typeof r.cache=="boolean"?void 0:r.cache}),A={server:c,lazy:p,default:d,transform:g,pick:h,immediate:_,getCachedData:x,deep:b,dedupe:E,watch:v===!1?[]:[S,i,...v||[]]};let B;return xR(u,()=>{var q;(q=B==null?void 0:B.abort)==null||q.call(B),B=typeof AbortController<"u"?new AbortController:{};const U=Tr(r.timeout);return U&&setTimeout(()=>B.abort(),U),(r.$fetch||globalThis.$fetch)(i.value,{signal:B.signal,...S})},A)}function ER(e){var n;const t=[((n=Tr(e.method))==null?void 0:n.toUpperCase())||"GET",Tr(e.baseURL)];for(const r of[e.params||e.query]){const s=Tr(r);if(!s)continue;const i={};for(const[l,u]of Object.entries(s))i[Tr(l)]=Tr(u);t.push(i)}return t}const TR={path:"/",watch:!0,decode:e=>ta(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},$R=void 0;function Z0(e,t){var c;const n={...TR,...t},r=Y0(n)||{};let s;n.maxAge!==void 0?s=n.maxAge*1e3:n.expires&&(s=n.expires.getTime()-Date.now());const i=s!==void 0&&s<=0,l=Sr(i?void 0:r[e]??((c=n.default)==null?void 0:c.call(n))),u=s&&!i?RR(l,s,n.watch&&n.watch!=="shallow"):te(l);{let p=null;try{!$R&&typeof BroadcastChannel<"u"&&(p=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const d=()=>{n.readonly||Ib(u.value,r[e])||(IR(e,u.value,n),r[e]=Sr(u.value),p==null||p.postMessage({value:n.encode(u.value)}))},g=v=>{var x;const _=v.refresh?(x=Y0(n))==null?void 0:x[e]:n.decode(v.value);h=!0,r[e]=u.value=_,an(()=>{h=!1})};let h=!1;Po()&&ps(()=>{h=!0,d(),p==null||p.close()}),p&&(p.onmessage=({data:v})=>g(v)),n.watch?gt(u,()=>{h||d()},{deep:n.watch!=="shallow"}):d()}return u}function Y0(e={}){return dI(document.cookie,e)}function AR(e,t,n={}){return t==null?g0(e,t,{...n,maxAge:-1}):g0(e,t,n)}function IR(e,t,n={}){document.cookie=AR(e,t,n)}const Q0=2147483647;function RR(e,t,n){let r,s,i=0;const l=n?te(e):{value:e};return Po()&&ps(()=>{s==null||s(),clearTimeout(r)}),xy((u,c)=>{n&&(s=gt(l,c));function p(){clearTimeout(r);const d=t-i,g=d{if(i+=g,i4)return Promise.all(s).then(()=>m1(e,t));t._routePreloaded.add(n);const i=r.map(l=>{var u;return(u=l.components)==null?void 0:u.default}).filter(l=>typeof l=="function");for(const l of i){const u=Promise.resolve(l()).catch(()=>{}).finally(()=>s.splice(s.indexOf(u)));s.push(u)}await Promise.all(s)}function OR(e={}){const t=e.path||window.location.pathname;let n={};try{n=ta(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(n==null?void 0:n.path)!==t||(n==null?void 0:n.expires){r.value=!0}),bt(v1,!0),s=>{var c;if(r.value)return(c=t.default)==null?void 0:c.call(t);const i=t.fallback||t.placeholder;if(i)return i();const l=s.fallback||s.placeholder||"",u=s.fallbackTag||s.placeholderTag||"span";return Z(u,n,l)}}}),LR="data-n-ids",MR="-";function ai(e){var s,i,l,u,c,p;if(typeof e!="string")throw new TypeError("[nuxt] [useId] key must be a string.");e=`n${e.slice(1)}`;const t=it(),n=ir();if(!n)throw new TypeError("[nuxt] `useId` must be called within a component setup function.");t._id||(t._id=0),n._nuxtIdIndex||(n._nuxtIdIndex={}),(s=n._nuxtIdIndex)[e]||(s[e]=0);const r=e+MR+n._nuxtIdIndex[e]++;if(t.payload.serverRendered&&t.isHydrating&&!Ke(v1,!1)){const d=((i=n.vnode.el)==null?void 0:i.nodeType)===8&&((u=(l=n.vnode.el)==null?void 0:l.nextElementSibling)!=null&&u.getAttribute)?(c=n.vnode.el)==null?void 0:c.nextElementSibling:n.vnode.el,g=JSON.parse(((p=d==null?void 0:d.getAttribute)==null?void 0:p.call(d,LR))||"{}");if(g[r])return g[r]}return e+"_"+t._id++}const BR=(...e)=>e.find(t=>t!==void 0);function FR(e){const t=e.componentName||"NuxtLink";function n(r,s){if(!r||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return r;if(typeof r=="string")return X0(r,e.trailingSlash);const i="path"in r&&r.path!==void 0?r.path:s(r).path;return{...r,name:void 0,path:X0(i,e.trailingSlash)}}return we({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(r,{slots:s}){const i=Wn(),l=Yr(),u=F(()=>{const _=r.to||r.href||"";return n(_,i.resolve)}),c=F(()=>typeof u.value=="string"&&Xr(u.value,{acceptRelative:!0})),p=F(()=>r.target&&r.target!=="_self"),d=F(()=>r.external||p.value?!0:typeof u.value=="object"?!1:u.value===""||c.value),g=te(!1),h=te(null),v=_=>{var x;h.value=r.custom?(x=_==null?void 0:_.$el)==null?void 0:x.nextElementSibling:_==null?void 0:_.$el};if(r.prefetch!==!1&&r.noPrefetch!==!0&&r.target!=="_blank"&&!VR()){const x=it();let b,E=null;ct(()=>{const C=DR();yp(()=>{b=pd(()=>{var S;(S=h==null?void 0:h.value)!=null&&S.tagName&&(E=C.observe(h.value,async()=>{E==null||E(),E=null;const A=typeof u.value=="string"?u.value:i.resolve(u.value).fullPath;await Promise.all([x.hooks.callHook("link:prefetch",A).catch(()=>{}),!d.value&&m1(u.value,i).catch(()=>{})]),g.value=!0}))})})}),pa(()=>{b&&fR(b),E==null||E(),E=null})}return()=>{var E,C;if(!d.value){const S={ref:v,to:u.value,activeClass:r.activeClass||e.activeClass,exactActiveClass:r.exactActiveClass||e.exactActiveClass,replace:r.replace,ariaCurrentValue:r.ariaCurrentValue,custom:r.custom};return r.custom||(g.value&&(S.class=r.prefetchedClass||e.prefetchedClass),S.rel=r.rel||void 0),Xe(hr("RouterLink"),S,s.default)}const _=typeof u.value=="object"?((E=i.resolve(u.value))==null?void 0:E.href)??null:u.value&&!r.external&&!c.value?n(ku(l.app.baseURL,u.value),i.resolve):u.value||null,x=r.target||null,b=BR(r.noRel?"":r.rel,e.externalRelAttribute,c.value||p.value?"noopener noreferrer":"")||null;if(r.custom){if(!s.default)return null;const S=()=>Io(_,{replace:r.replace,external:r.external});return s.default({href:_,navigate:S,get route(){if(!_)return;const A=ma(_);return{path:A.pathname,fullPath:A.pathname,get query(){return yb(A.search)},hash:A.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:_}},rel:b,target:x,isExternal:d.value,isActive:!1,isExactActive:!1})}return Xe("a",{ref:h,href:_,rel:b,target:x},(C=s.default)==null?void 0:C.call(s))}}})}const md=FR(V3);function X0(e,t){const n=t==="append"?ru:xu;return Xr(e)&&!e.startsWith("http")?e:n(e,!0)}function DR(){const e=it();if(e._observer)return e._observer;let t=null;const n=new Map,r=(i,l)=>(t||(t=new IntersectionObserver(u=>{for(const c of u){const p=n.get(c.target);(c.isIntersecting||c.intersectionRatio>0)&&p&&p()}})),n.set(i,l),t.observe(i),()=>{n.delete(i),t.unobserve(i),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function VR(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}const NR=On(e=>{const t=gR();return e.vueApp.use(t),ba(t),e.payload&&e.payload.pinia&&(t.state.value=e.payload.pinia),{provide:{pinia:t}}}),jR=Jl(()=>yn(()=>Promise.resolve().then(()=>W6),void 0,import.meta.url).then(e=>e.default||e.default||e)),UR=Jl(()=>yn(()=>import("./okIQluvx.js"),__vite__mapDeps([16,17]),import.meta.url).then(e=>e.default||e.default||e)),HR=[["Icon",jR],["IconCSS",UR]],zR=On({name:"nuxt:global-components",setup(e){for(const[t,n]of HR)e.vueApp.component(t,n),e.vueApp.component("Lazy"+t,n)}}),Co={default:()=>yn(()=>import("./C2560jq-.js"),[],import.meta.url).then(e=>e.default||e)},WR=On({name:"nuxt:prefetch",setup(e){const t=Wn();e.hooks.hook("app:mounted",()=>{t.beforeEach(async n=>{var s;const r=(s=n==null?void 0:n.meta)==null?void 0:s.layout;r&&typeof Co[r]=="function"&&await Co[r]()})}),e.hooks.hook("link:prefetch",n=>{if(Xr(n))return;const r=t.resolve(n);if(!r)return;const s=r.meta.layout;let i=vp(r.meta.middleware);i=i.filter(l=>typeof l=="string");for(const l of i)typeof Ki[l]=="function"&&Ki[l]();s&&typeof Co[s]=="function"&&Co[s]()})}});function vd(e){return Po()?(ps(e),!0):!1}function gs(e){return typeof e=="function"?e():R(e)}const yd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ev=()=>+Date.now(),sa=()=>{};function y1(e,t){function n(...r){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(i)})}return n}function qR(e,t={}){let n,r,s=sa;const i=u=>{clearTimeout(u),s(),s=sa};return u=>{const c=gs(e),p=gs(t.maxWait);return n&&i(n),c<=0||p!==void 0&&p<=0?(r&&(i(r),r=null),Promise.resolve(u())):new Promise((d,g)=>{s=t.rejectOnCancel?g:d,p&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,d(u())},p)),n=setTimeout(()=>{r&&i(r),r=null,d(u())},c)})}}function KR(...e){let t=0,n,r=!0,s=sa,i,l,u,c,p;!at(e[0])&&typeof e[0]=="object"?{delay:l,trailing:u=!0,leading:c=!0,rejectOnCancel:p=!1}=e[0]:[l,u=!0,c=!0,p=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,s(),s=sa)};return h=>{const v=gs(l),_=Date.now()-t,x=()=>i=h();return d(),v<=0?(t=Date.now(),x()):(_>v&&(c||!r)?(t=Date.now(),x()):u&&(i=new Promise((b,E)=>{s=p?E:b,n=setTimeout(()=>{t=Date.now(),r=!0,b(x()),d()},Math.max(0,v-_))})),!c&&!n&&(n=setTimeout(()=>r=!0,v)),r=!1,i)}}function GR(e,t=200,n={}){return y1(qR(t,n),e)}function JR(e,t=200,n=!1,r=!0,s=!1){return y1(KR(t,n,r,s),e)}function b1(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const l=te(!1);function u(){i&&(clearInterval(i),i=null)}function c(){l.value=!1,u()}function p(){const d=gs(t);d<=0||(l.value=!0,s&&e(),u(),i=setInterval(e,d))}if(r&&yd&&p(),at(t)||typeof t=="function"){const d=gt(t,()=>{l.value&&yd&&p()});vd(d)}return vd(c),{isActive:l,pause:c,resume:p}}function UF(e,t,n){let r;at(n)?r={evaluating:n}:r=n||{};const{lazy:s=!1,evaluating:i=void 0,shallow:l=!0,onError:u=sa}=r,c=te(!s),p=l?Ir(t):te(t);let d=0;return Xt(async g=>{if(!c.value)return;d++;const h=d;let v=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const _=await e(x=>{g(()=>{i&&(i.value=!1),v||x()})});h===d&&(p.value=_)}catch(_){u(_)}finally{i&&h===d&&(i.value=!1),v=!0}}),s?F(()=>(c.value=!0,p.value)):p}function HF(e){var t;const n=gs(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ZR=yd?window:void 0;function _1(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:s=ZR}=t,i=te(!1),l=r?1e3/r:null;let u=0,c=null;function p(h){if(!i.value||!s)return;u||(u=h);const v=h-u;if(l&&vs(u);return(c=t==null?void 0:t.cleanups)==null||c.push(d),d}function r(u){function c(...p){s(c),u(...p)}return n(c)}function s(u){const c=Ai.get(e);c&&(c.delete(u),c.size||i())}function i(){Ai.delete(e)}function l(u,c){var p;(p=Ai.get(e))==null||p.forEach(d=>d(u,c))}return{on:n,once:r,off:s,emit:l,reset:i}}function QR(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=te(new Date),s=()=>r.value=new Date,i=n==="requestAnimationFrame"?_1(s,{immediate:!0}):b1(s,n,{immediate:!0});return t?{now:r,...i}:r}const XR=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],eO={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>e===1?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>e===1?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>e===1?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>e===1?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function tO(e){return e.toISOString().slice(0,10)}function zF(e,t={}){const{controls:n=!1,updateInterval:r=3e4}=t,{now:s,...i}=QR({interval:r,controls:!0}),l=F(()=>nO(new Date(gs(e)),t,gs(s)));return n?{timeAgo:l,...i}:l}function nO(e,t={},n=Date.now()){var r;const{max:s,messages:i=eO,fullDateFormatter:l=tO,units:u=XR,showSecond:c=!1,rounding:p="round"}=t,d=typeof p=="number"?b=>+b.toFixed(p):Math[p],g=+n-+e,h=Math.abs(g);function v(b,E){return d(Math.abs(b)/E.value)}function _(b,E){const C=v(b,E),S=b>0,A=x(E.name,C,S);return x(S?"past":"future",A,S)}function x(b,E,C){const S=i[b];return typeof S=="function"?S(E,C):S.replace("{0}",E.toString())}if(h<6e4&&!c)return i.justNow;if(typeof s=="number"&&h>s)return l(new Date(e));if(typeof s=="string"){const b=(r=u.find(E=>E.name===s))==null?void 0:r.max;if(b&&h>b)return l(new Date(e))}for(const[b,E]of u.entries()){if(v(g,E)<=0&&u[b-1])return _(g,u[b-1]);if(hl.value=ev()+n,c=i?()=>{u(),i(l.value)}:u,p=s==="requestAnimationFrame"?_1(c,{immediate:r}):b1(c,s,{immediate:r});return t?{timestamp:l,...p}:l}const oO=Symbol("nuxt-ui.slideover"),sO=On(e=>{const t=Ir({component:"div",props:{}});e.vueApp.provide(oO,t)}),iO=Symbol("nuxt-ui.modal"),aO=On(e=>{const t=Ir({component:"div",props:{}});e.vueApp.provide(iO,t)}),bp="-";function lO(e){const t=cO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(l){const u=l.split(bp);return u[0]===""&&u.length!==1&&u.shift(),w1(u,t)||uO(l)}function i(l,u){const c=n[l]||[];return u&&r[l]?[...c,...r[l]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:i}}function w1(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?w1(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(bp);return(l=t.validators.find(({validator:u})=>u(i)))==null?void 0:l.classGroupId}const tv=/^\[(.+)\]$/;function uO(e){if(tv.test(e)){const t=tv.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function cO(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return dO(Object.entries(e.classGroups),n).forEach(([i,l])=>{bd(l,r,i,t)}),r}function bd(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:nv(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(fO(s)){bd(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,l])=>{bd(l,nv(t,i),n,r)})})}function nv(e,t){let n=e;return t.split(bp).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function fO(e){return e.isThemeGetter}function dO(e,t){return t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,u])=>[t+l,u])):i);return[n,s]}):e}function pO(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return s(i,l),l},set(i,l){n.has(i)?n.set(i,l):s(i,l)}}}const x1="!";function hO(e){const t=e.separator,n=t.length===1,r=t[0],s=t.length;return function(l){const u=[];let c=0,p=0,d;for(let x=0;xp?d-p:void 0;return{modifiers:u,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:_}}}function gO(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function mO(e){return{cache:pO(e.cacheSize),splitModifiers:hO(e),...lO(e)}}const vO=/\s+/;function yO(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=new Set;return e.trim().split(vO).map(l=>{const{modifiers:u,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:d}=n(l);let g=r(d?p.substring(0,d):p),h=!!d;if(!g){if(!d)return{isTailwindClass:!1,originalClassName:l};if(g=r(p),!g)return{isTailwindClass:!1,originalClassName:l};h=!1}const v=gO(u).join(":");return{isTailwindClass:!0,modifierId:c?v+x1:v,classGroupId:g,originalClassName:l,hasPostfixModifier:h}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:u,classGroupId:c,hasPostfixModifier:p}=l,d=u+c;return i.has(d)?!1:(i.add(d),s(c,p).forEach(g=>i.add(u+g)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function pt(){let e=0,t,n,r="";for(;eg(d),e());return n=mO(p),r=n.cache.get,s=n.cache.set,i=u,u(c)}function u(c){const p=r(c);if(p)return p;const d=yO(c,n);return s(c,d),d}return function(){return i(pt.apply(null,arguments))}}function $t(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const S1=/^\[(?:([a-z-]+):)?(.+)\]$/i,bO=/^\d+\/\d+$/,_O=new Set(["px","full","screen"]),wO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Hr(e){return ss(e)||_O.has(e)||bO.test(e)}function mo(e){return li(e,"length",PO)}function ss(e){return!!e&&!Number.isNaN(Number(e))}function Tl(e){return li(e,"number",ss)}function Ii(e){return!!e&&Number.isInteger(Number(e))}function EO(e){return e.endsWith("%")&&ss(e.slice(0,-1))}function qe(e){return S1.test(e)}function vo(e){return wO.test(e)}const TO=new Set(["length","size","percentage"]);function $O(e){return li(e,TO,C1)}function AO(e){return li(e,"position",C1)}const IO=new Set(["image","url"]);function RO(e){return li(e,IO,MO)}function OO(e){return li(e,"",LO)}function Ri(){return!0}function li(e,t,n){const r=S1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function PO(e){return xO.test(e)&&!kO.test(e)}function C1(){return!1}function LO(e){return SO.test(e)}function MO(e){return CO.test(e)}function wd(){const e=$t("colors"),t=$t("spacing"),n=$t("blur"),r=$t("brightness"),s=$t("borderColor"),i=$t("borderRadius"),l=$t("borderSpacing"),u=$t("borderWidth"),c=$t("contrast"),p=$t("grayscale"),d=$t("hueRotate"),g=$t("invert"),h=$t("gap"),v=$t("gradientColorStops"),_=$t("gradientColorStopPositions"),x=$t("inset"),b=$t("margin"),E=$t("opacity"),C=$t("padding"),S=$t("saturate"),A=$t("scale"),B=$t("sepia"),L=$t("skew"),U=$t("space"),j=$t("translate"),q=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",qe,t],z=()=>[qe,t],be=()=>["",Hr,mo],ce=()=>["auto",ss,qe],ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>["start","end","center","between","around","evenly","stretch"],Lt=()=>["","0",qe],Gt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Re=()=>[ss,Tl],je=()=>[ss,qe];return{cacheSize:500,separator:":",theme:{colors:[Ri],spacing:[Hr,mo],blur:["none","",vo,qe],brightness:Re(),borderColor:[e],borderRadius:["none","","full",vo,qe],borderSpacing:z(),borderWidth:be(),contrast:Re(),grayscale:Lt(),hueRotate:je(),invert:Lt(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[EO,mo],inset:Y(),margin:Y(),opacity:Re(),padding:z(),saturate:Re(),scale:Re(),sepia:Lt(),skew:je(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[vo]}],"break-after":[{"break-after":Gt()}],"break-before":[{"break-before":Gt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ke(),qe]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ii,qe]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qe]}],grow:[{grow:Lt()}],shrink:[{shrink:Lt()}],order:[{order:["first","last","none",Ii,qe]}],"grid-cols":[{"grid-cols":[Ri]}],"col-start-end":[{col:["auto",{span:["full",Ii,qe]},qe]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[Ri]}],"row-start-end":[{row:["auto",{span:[Ii,qe]},qe]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ve()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ve(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ve(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[U]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[U]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[vo]},vo]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vo,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tl]}],"font-family":[{font:[Ri]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qe]}],"line-clamp":[{"line-clamp":["none",ss,Tl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hr,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hr,mo]}],"underline-offset":[{"underline-offset":["auto",Hr,qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ke(),AO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$O]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:ie()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[Hr,qe]}],"outline-w":[{outline:[Hr,mo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Hr,mo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vo,OO]}],"shadow-color":[{shadow:[Ri]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...Se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Se()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",vo,qe]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[S]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qe]}],duration:[{duration:je()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:je()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Ii,qe]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Hr,mo,Tl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function BO(e,{cacheSize:t,prefix:n,separator:r,extend:s={},override:i={}}){Nl(e,"cacheSize",t),Nl(e,"prefix",n),Nl(e,"separator",r);for(const l in i)FO(e[l],i[l]);for(const l in s)DO(e[l],s[l]);return e}function Nl(e,t,n){n!==void 0&&(e[t]=n)}function FO(e,t){if(t)for(const n in t)Nl(e,n,t[n])}function DO(e,t){if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}}function VO(e,...t){return typeof e=="function"?_d(wd,e,...t):_d(()=>BO(wd(),e),...t)}const Hn=_d(wd);function NO(e,t){const n={...e};for(const r of t)delete n[r];return n}function Vi(e,t,n){typeof t=="string"&&(t=t.split(".").map(s=>{const i=Number(s);return isNaN(i)?s:i}));let r=e;for(const s of t){if(r==null)return n;r=r[s]}return r!==void 0?r:n}const _p={to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1}},jO=e=>Object.keys(_p).reduce((n,r)=>(e[r]!==void 0&&(n[r]=e[r]),n),{}),UO=VO({extend:{classGroups:{icons:[e=>/^i-/.test(e)]}}}),HO=cp((e,t,n,r)=>{if(r==="default"||r.startsWith("default.")||r==="popper"||r.startsWith("popper.")||r.endsWith("avatar")&&t==="size"||r.endsWith("chip")&&t==="size"||r.endsWith("badge")&&t==="size"||t==="color"||t==="variant")return!1;if(typeof e[t]=="string"&&typeof n=="string"&&e[t]&&n)return e[t]=UO(e[t],n),!0});function wn(e,...t){return e==="override"?va({},...t):HO({},...t)}function rv(e){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(r,s,i,l){return s+s+i+i+l+l});const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?`${parseInt(n[1],16)} ${parseInt(n[2],16)} ${parseInt(n[3],16)}`:null}function E1(e){const t=parseFloat(e);return isNaN(t)?e:t}const zO="inherit",WO="currentColor",qO="transparent",KO="#000",GO="#fff",JO={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},ZO={50:"rgb(var(--color-gray-50) / )",100:"rgb(var(--color-gray-100) / )",200:"rgb(var(--color-gray-200) / )",300:"rgb(var(--color-gray-300) / )",400:"rgb(var(--color-gray-400) / )",500:"rgb(var(--color-gray-500) / )",600:"rgb(var(--color-gray-600) / )",700:"rgb(var(--color-gray-700) / )",800:"rgb(var(--color-gray-800) / )",900:"rgb(var(--color-gray-900) / )",950:"rgb(var(--color-gray-950) / )"},YO={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},QO={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},XO={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},eP={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},tP={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},nP={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},rP={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},oP={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},sP={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},iP={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},aP={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},lP={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},uP={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},cP={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},fP={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},dP={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},pP={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},hP={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},gP={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},mP={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},vP={50:"rgb(var(--color-primary-50) / )",100:"rgb(var(--color-primary-100) / )",200:"rgb(var(--color-primary-200) / )",300:"rgb(var(--color-primary-300) / )",400:"rgb(var(--color-primary-400) / )",500:"rgb(var(--color-primary-500) / )",600:"rgb(var(--color-primary-600) / )",700:"rgb(var(--color-primary-700) / )",800:"rgb(var(--color-primary-800) / )",900:"rgb(var(--color-primary-900) / )",950:"rgb(var(--color-primary-950) / )",DEFAULT:"rgb(var(--color-primary-DEFAULT) / )"},yP={DEFAULT:"#ffffff",dark:"#333333"},bP={DEFAULT:"#333333",dark:"#f6f7ee"},$l={inherit:zO,current:WO,transparent:qO,black:KO,white:GO,slate:JO,gray:ZO,zinc:YO,neutral:QO,stone:XO,red:eP,orange:tP,amber:nP,yellow:rP,lime:oP,green:sP,emerald:iP,teal:aP,cyan:lP,sky:uP,blue:cP,indigo:fP,violet:dP,purple:pP,fuchsia:hP,pink:gP,rose:mP,primary:vP,backdrop:yP,body:bP,"cool-gray":void 0},_P=On(()=>{const e=si(),t=it(),n=F(()=>{const s=$l[e.ui.primary],i=$l[e.ui.gray];return s||console.warn(`[@nuxt/ui] Primary color '${e.ui.primary}' not found in Tailwind config`),i||console.warn(`[@nuxt/ui] Gray color '${e.ui.gray}' not found in Tailwind config`),`:root { + */let f1;const ba=e=>f1=e,d1=Symbol();function hd(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Gi;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Gi||(Gi={}));function gR(){const e=Nd(!0),t=e.run(()=>te({}));let n=[],r=[];const s=Gd({install(i){ba(s),s._a=i,i.provide(d1,s),i.config.globalProperties.$pinia=s,r.forEach(l=>n.push(l)),r=[]},use(i){return!this._a&&!hR?r.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return s}const p1=()=>{};function J0(e,t,n,r=p1){e.push(t);const s=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),r())};return!n&&Po()&&ps(s),s}function Ms(e,...t){e.slice().forEach(n=>{n(...t)})}const mR=e=>e();function gd(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];hd(s)&&hd(r)&&e.hasOwnProperty(n)&&!at(r)&&!us(r)?e[n]=gd(s,r):e[n]=r}return e}const vR=Symbol();function yR(e){return!hd(e)||!e.hasOwnProperty(vR)}const{assign:bo}=Object;function bR(e){return!!(at(e)&&e.effect)}function _R(e,t,n,r){const{state:s,actions:i,getters:l}=t,u=n.state.value[e];let c;function p(){u||(n.state.value[e]=s?s():{});const d=lT(n.state.value[e]);return bo(d,i,Object.keys(l||{}).reduce((g,h)=>(g[h]=Gd(F(()=>{ba(n);const v=n._s.get(e);return l[h].call(v,v)})),g),{}))}return c=h1(e,p,t,n,r,!0),c}function h1(e,t,n={},r,s,i){let l;const u=bo({actions:{}},n),c={deep:!0};let p,d,g=[],h=[],v;const _=r.state.value[e];!i&&!_&&(r.state.value[e]={}),te({});let x;function b(j){let q;p=d=!1,typeof j=="function"?(j(r.state.value[e]),q={type:Gi.patchFunction,storeId:e,events:v}):(gd(r.state.value[e],j),q={type:Gi.patchObject,payload:j,storeId:e,events:v});const K=x=Symbol();an().then(()=>{x===K&&(p=!0)}),d=!0,Ms(g,q,r.state.value[e])}const E=i?function(){const{state:q}=n,K=q?q():{};this.$patch(Y=>{bo(Y,K)})}:p1;function C(){l.stop(),g=[],h=[],r._s.delete(e)}function S(j,q){return function(){ba(r);const K=Array.from(arguments),Y=[],z=[];function be(ie){Y.push(ie)}function ce(ie){z.push(ie)}Ms(h,{args:K,name:j,store:B,after:be,onError:ce});let ke;try{ke=q.apply(this&&this.$id===e?this:B,K)}catch(ie){throw Ms(z,ie),ie}return ke instanceof Promise?ke.then(ie=>(Ms(Y,ie),ie)).catch(ie=>(Ms(z,ie),Promise.reject(ie))):(Ms(Y,ke),ke)}}const A={_p:r,$id:e,$onAction:J0.bind(null,h),$patch:b,$reset:E,$subscribe(j,q={}){const K=J0(g,j,q.detached,()=>Y()),Y=l.run(()=>gt(()=>r.state.value[e],z=>{(q.flush==="sync"?d:p)&&j({storeId:e,type:Gi.direct,events:v},z)},bo({},c,q)));return K},$dispose:C},B=_n(A);r._s.set(e,B);const U=(r._a&&r._a.runWithContext||mR)(()=>r._e.run(()=>(l=Nd()).run(t)));for(const j in U){const q=U[j];if(at(q)&&!bR(q)||us(q))i||(_&&yR(q)&&(at(q)?q.value=_[j]:gd(q,_[j])),r.state.value[e][j]=q);else if(typeof q=="function"){const K=S(j,q);U[j]=K,u.actions[j]=q}}return bo(B,U),bo(ze(B),U),Object.defineProperty(B,"$state",{get:()=>r.state.value[e],set:j=>{b(q=>{bo(q,j)})}}),r._p.forEach(j=>{bo(B,l.run(()=>j({store:B,app:r._a,pinia:r,options:u})))}),_&&i&&n.hydrate&&n.hydrate(B.$state,_),p=!0,d=!0,B}function ii(e,t,n){let r,s;const i=typeof t=="function";typeof e=="string"?(r=e,s=i?n:t):(s=e,r=e.id);function l(u,c){const p=rp();return u=u||(p?Ke(d1,null):null),u&&ba(u),u=f1,u._s.has(r)||(i?h1(r,t,s,u):_R(r,s,u)),u._s.get(r)}return l.$id=r,l}const wR=e=>e==="defer"||e===!1;function xR(...e){var _;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[n,r,s={}]=e;if(typeof n!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof r!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const i=it(),l=r,u=()=>null,c=()=>i.isHydrating?i.payload.data[n]:i.static.data[n];s.server=s.server??!0,s.default=s.default??u,s.getCachedData=s.getCachedData??c,s.lazy=s.lazy??!1,s.immediate=s.immediate??!0,s.deep=s.deep??N3.deep,s.dedupe=s.dedupe??"cancel";const p=()=>s.getCachedData(n,i)!=null;if(!i._asyncData[n]||!s.immediate){(_=i.payload._errors)[n]??(_[n]=null);const x=s.deep?te:Ir;i._asyncData[n]={data:x(s.getCachedData(n,i)??s.default()),pending:te(!p()),error:Ot(i.payload._errors,n),status:te("idle")}}const d={...i._asyncData[n]};d.refresh=d.execute=(x={})=>{if(i._asyncDataPromises[n]){if(wR(x.dedupe??s.dedupe))return i._asyncDataPromises[n];i._asyncDataPromises[n].cancelled=!0}if((x._initial||i.isHydrating&&x._initial!==!1)&&p())return Promise.resolve(s.getCachedData(n,i));d.pending.value=!0,d.status.value="pending";const b=new Promise((E,C)=>{try{E(l(i))}catch(S){C(S)}}).then(async E=>{if(b.cancelled)return i._asyncDataPromises[n];let C=E;s.transform&&(C=await s.transform(E)),s.pick&&(C=SR(C,s.pick)),i.payload.data[n]=C,d.data.value=C,d.error.value=null,d.status.value="success"}).catch(E=>{if(b.cancelled)return i._asyncDataPromises[n];d.error.value=ya(E),d.data.value=R(s.default()),d.status.value="error"}).finally(()=>{b.cancelled||(d.pending.value=!1,delete i._asyncDataPromises[n])});return i._asyncDataPromises[n]=b,i._asyncDataPromises[n]},d.clear=()=>kR(i,n);const g=()=>d.refresh({_initial:!0}),h=s.server!==!1&&i.payload.serverRendered;{const x=ir();if(x&&!x._nuxtOnBeforeMountCbs){x._nuxtOnBeforeMountCbs=[];const C=x._nuxtOnBeforeMountCbs;Ny(()=>{C.forEach(S=>{S()}),C.splice(0,C.length)}),Ht(()=>C.splice(0,C.length))}h&&i.isHydrating&&(d.error.value||p())?(d.pending.value=!1,d.status.value=d.error.value?"error":"success"):x&&(i.payload.serverRendered&&i.isHydrating||s.lazy)&&s.immediate?x._nuxtOnBeforeMountCbs.push(g):s.immediate&&g();const b=Po();if(s.watch){const C=gt(s.watch,()=>d.refresh());b&&ps(C)}const E=i.hook("app:data:refresh",async C=>{(!C||C.includes(n))&&await d.refresh()});b&&ps(E)}const v=Promise.resolve(i._asyncDataPromises[n]).then(()=>d);return Object.assign(v,d),v}function kR(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=null),e._asyncData[t]&&(e._asyncData[t].data.value=void 0,e._asyncData[t].error.value=null,e._asyncData[t].pending.value=!1,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t].cancelled=!0,e._asyncDataPromises[t]=void 0)}function SR(e,t){const n={};for(const r of t)n[r]=e[r];return n}const CR="$s";function _a(...e){const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);const[n,r]=e;if(!n||typeof n!="string")throw new TypeError("[nuxt] [useState] key must be a string: "+n);if(r!==void 0&&typeof r!="function")throw new Error("[nuxt] [useState] init must be a function: "+r);const s=CR+n,i=it(),l=Ot(i.payload.state,s);if(l.value===void 0&&r){const u=r();if(at(u))return i.payload.state[s]=u,u;l.value=u}return l}function g1(e,t,n){const[r={},s]=typeof t=="string"?[{},t]:[t,n],i=F(()=>Tr(e)),l=r.key||$I([s,typeof i.value=="string"?i.value:"",...ER(r)]);if(!l||typeof l!="string")throw new TypeError("[nuxt] [useFetch] key must be a string: "+l);if(!e)throw new Error("[nuxt] [useFetch] request is missing.");const u=l===s?"$f"+l:l;if(!r.baseURL&&typeof i.value=="string"&&i.value[0]==="/"&&i.value[1]==="/")throw new Error('[nuxt] [useFetch] the request URL must not start with "//".');const{server:c,lazy:p,default:d,transform:g,pick:h,watch:v,immediate:_,getCachedData:x,deep:b,dedupe:E,...C}=r,S=_n({...j3,...C,cache:typeof r.cache=="boolean"?void 0:r.cache}),A={server:c,lazy:p,default:d,transform:g,pick:h,immediate:_,getCachedData:x,deep:b,dedupe:E,watch:v===!1?[]:[S,i,...v||[]]};let B;return xR(u,()=>{var q;(q=B==null?void 0:B.abort)==null||q.call(B),B=typeof AbortController<"u"?new AbortController:{};const U=Tr(r.timeout);return U&&setTimeout(()=>B.abort(),U),(r.$fetch||globalThis.$fetch)(i.value,{signal:B.signal,...S})},A)}function ER(e){var n;const t=[((n=Tr(e.method))==null?void 0:n.toUpperCase())||"GET",Tr(e.baseURL)];for(const r of[e.params||e.query]){const s=Tr(r);if(!s)continue;const i={};for(const[l,u]of Object.entries(s))i[Tr(l)]=Tr(u);t.push(i)}return t}const TR={path:"/",watch:!0,decode:e=>ta(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},$R=void 0;function Z0(e,t){var c;const n={...TR,...t},r=Y0(n)||{};let s;n.maxAge!==void 0?s=n.maxAge*1e3:n.expires&&(s=n.expires.getTime()-Date.now());const i=s!==void 0&&s<=0,l=Sr(i?void 0:r[e]??((c=n.default)==null?void 0:c.call(n))),u=s&&!i?RR(l,s,n.watch&&n.watch!=="shallow"):te(l);{let p=null;try{!$R&&typeof BroadcastChannel<"u"&&(p=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const d=()=>{n.readonly||Ib(u.value,r[e])||(IR(e,u.value,n),r[e]=Sr(u.value),p==null||p.postMessage({value:n.encode(u.value)}))},g=v=>{var x;const _=v.refresh?(x=Y0(n))==null?void 0:x[e]:n.decode(v.value);h=!0,r[e]=u.value=_,an(()=>{h=!1})};let h=!1;Po()&&ps(()=>{h=!0,d(),p==null||p.close()}),p&&(p.onmessage=({data:v})=>g(v)),n.watch?gt(u,()=>{h||d()},{deep:n.watch!=="shallow"}):d()}return u}function Y0(e={}){return dI(document.cookie,e)}function AR(e,t,n={}){return t==null?g0(e,t,{...n,maxAge:-1}):g0(e,t,n)}function IR(e,t,n={}){document.cookie=AR(e,t,n)}const Q0=2147483647;function RR(e,t,n){let r,s,i=0;const l=n?te(e):{value:e};return Po()&&ps(()=>{s==null||s(),clearTimeout(r)}),xy((u,c)=>{n&&(s=gt(l,c));function p(){clearTimeout(r);const d=t-i,g=d{if(i+=g,i4)return Promise.all(s).then(()=>m1(e,t));t._routePreloaded.add(n);const i=r.map(l=>{var u;return(u=l.components)==null?void 0:u.default}).filter(l=>typeof l=="function");for(const l of i){const u=Promise.resolve(l()).catch(()=>{}).finally(()=>s.splice(s.indexOf(u)));s.push(u)}await Promise.all(s)}function OR(e={}){const t=e.path||window.location.pathname;let n={};try{n=ta(sessionStorage.getItem("nuxt:reload")||"{}")}catch{}if(e.force||(n==null?void 0:n.path)!==t||(n==null?void 0:n.expires){r.value=!0}),bt(v1,!0),s=>{var c;if(r.value)return(c=t.default)==null?void 0:c.call(t);const i=t.fallback||t.placeholder;if(i)return i();const l=s.fallback||s.placeholder||"",u=s.fallbackTag||s.placeholderTag||"span";return Z(u,n,l)}}}),LR="data-n-ids",MR="-";function ai(e){var s,i,l,u,c,p;if(typeof e!="string")throw new TypeError("[nuxt] [useId] key must be a string.");e=`n${e.slice(1)}`;const t=it(),n=ir();if(!n)throw new TypeError("[nuxt] `useId` must be called within a component setup function.");t._id||(t._id=0),n._nuxtIdIndex||(n._nuxtIdIndex={}),(s=n._nuxtIdIndex)[e]||(s[e]=0);const r=e+MR+n._nuxtIdIndex[e]++;if(t.payload.serverRendered&&t.isHydrating&&!Ke(v1,!1)){const d=((i=n.vnode.el)==null?void 0:i.nodeType)===8&&((u=(l=n.vnode.el)==null?void 0:l.nextElementSibling)!=null&&u.getAttribute)?(c=n.vnode.el)==null?void 0:c.nextElementSibling:n.vnode.el,g=JSON.parse(((p=d==null?void 0:d.getAttribute)==null?void 0:p.call(d,LR))||"{}");if(g[r])return g[r]}return e+"_"+t._id++}const BR=(...e)=>e.find(t=>t!==void 0);function FR(e){const t=e.componentName||"NuxtLink";function n(r,s){if(!r||e.trailingSlash!=="append"&&e.trailingSlash!=="remove")return r;if(typeof r=="string")return X0(r,e.trailingSlash);const i="path"in r&&r.path!==void 0?r.path:s(r).path;return{...r,name:void 0,path:X0(i,e.trailingSlash)}}return we({name:t,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1}},setup(r,{slots:s}){const i=Wn(),l=Yr(),u=F(()=>{const _=r.to||r.href||"";return n(_,i.resolve)}),c=F(()=>typeof u.value=="string"&&Xr(u.value,{acceptRelative:!0})),p=F(()=>r.target&&r.target!=="_self"),d=F(()=>r.external||p.value?!0:typeof u.value=="object"?!1:u.value===""||c.value),g=te(!1),h=te(null),v=_=>{var x;h.value=r.custom?(x=_==null?void 0:_.$el)==null?void 0:x.nextElementSibling:_==null?void 0:_.$el};if(r.prefetch!==!1&&r.noPrefetch!==!0&&r.target!=="_blank"&&!VR()){const x=it();let b,E=null;ct(()=>{const C=DR();yp(()=>{b=pd(()=>{var S;(S=h==null?void 0:h.value)!=null&&S.tagName&&(E=C.observe(h.value,async()=>{E==null||E(),E=null;const A=typeof u.value=="string"?u.value:i.resolve(u.value).fullPath;await Promise.all([x.hooks.callHook("link:prefetch",A).catch(()=>{}),!d.value&&m1(u.value,i).catch(()=>{})]),g.value=!0}))})})}),pa(()=>{b&&fR(b),E==null||E(),E=null})}return()=>{var E,C;if(!d.value){const S={ref:v,to:u.value,activeClass:r.activeClass||e.activeClass,exactActiveClass:r.exactActiveClass||e.exactActiveClass,replace:r.replace,ariaCurrentValue:r.ariaCurrentValue,custom:r.custom};return r.custom||(g.value&&(S.class=r.prefetchedClass||e.prefetchedClass),S.rel=r.rel||void 0),Xe(hr("RouterLink"),S,s.default)}const _=typeof u.value=="object"?((E=i.resolve(u.value))==null?void 0:E.href)??null:u.value&&!r.external&&!c.value?n(ku(l.app.baseURL,u.value),i.resolve):u.value||null,x=r.target||null,b=BR(r.noRel?"":r.rel,e.externalRelAttribute,c.value||p.value?"noopener noreferrer":"")||null;if(r.custom){if(!s.default)return null;const S=()=>Io(_,{replace:r.replace,external:r.external});return s.default({href:_,navigate:S,get route(){if(!_)return;const A=ma(_);return{path:A.pathname,fullPath:A.pathname,get query(){return yb(A.search)},hash:A.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:_}},rel:b,target:x,isExternal:d.value,isActive:!1,isExactActive:!1})}return Xe("a",{ref:h,href:_,rel:b,target:x},(C=s.default)==null?void 0:C.call(s))}}})}const md=FR(V3);function X0(e,t){const n=t==="append"?ru:xu;return Xr(e)&&!e.startsWith("http")?e:n(e,!0)}function DR(){const e=it();if(e._observer)return e._observer;let t=null;const n=new Map,r=(i,l)=>(t||(t=new IntersectionObserver(u=>{for(const c of u){const p=n.get(c.target);(c.isIntersecting||c.intersectionRatio>0)&&p&&p()}})),n.set(i,l),t.observe(i),()=>{n.delete(i),t.unobserve(i),n.size===0&&(t.disconnect(),t=null)});return e._observer={observe:r}}function VR(){const e=navigator.connection;return!!(e&&(e.saveData||/2g/.test(e.effectiveType)))}const NR=On(e=>{const t=gR();return e.vueApp.use(t),ba(t),e.payload&&e.payload.pinia&&(t.state.value=e.payload.pinia),{provide:{pinia:t}}}),jR=Jl(()=>yn(()=>Promise.resolve().then(()=>W6),void 0,import.meta.url).then(e=>e.default||e.default||e)),UR=Jl(()=>yn(()=>import("./DYsvrwWH.js"),__vite__mapDeps([16,17]),import.meta.url).then(e=>e.default||e.default||e)),HR=[["Icon",jR],["IconCSS",UR]],zR=On({name:"nuxt:global-components",setup(e){for(const[t,n]of HR)e.vueApp.component(t,n),e.vueApp.component("Lazy"+t,n)}}),Co={default:()=>yn(()=>import("./ClXoQoyw.js"),[],import.meta.url).then(e=>e.default||e)},WR=On({name:"nuxt:prefetch",setup(e){const t=Wn();e.hooks.hook("app:mounted",()=>{t.beforeEach(async n=>{var s;const r=(s=n==null?void 0:n.meta)==null?void 0:s.layout;r&&typeof Co[r]=="function"&&await Co[r]()})}),e.hooks.hook("link:prefetch",n=>{if(Xr(n))return;const r=t.resolve(n);if(!r)return;const s=r.meta.layout;let i=vp(r.meta.middleware);i=i.filter(l=>typeof l=="string");for(const l of i)typeof Ki[l]=="function"&&Ki[l]();s&&typeof Co[s]=="function"&&Co[s]()})}});function vd(e){return Po()?(ps(e),!0):!1}function gs(e){return typeof e=="function"?e():R(e)}const yd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ev=()=>+Date.now(),sa=()=>{};function y1(e,t){function n(...r){return new Promise((s,i)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(s).catch(i)})}return n}function qR(e,t={}){let n,r,s=sa;const i=u=>{clearTimeout(u),s(),s=sa};return u=>{const c=gs(e),p=gs(t.maxWait);return n&&i(n),c<=0||p!==void 0&&p<=0?(r&&(i(r),r=null),Promise.resolve(u())):new Promise((d,g)=>{s=t.rejectOnCancel?g:d,p&&!r&&(r=setTimeout(()=>{n&&i(n),r=null,d(u())},p)),n=setTimeout(()=>{r&&i(r),r=null,d(u())},c)})}}function KR(...e){let t=0,n,r=!0,s=sa,i,l,u,c,p;!at(e[0])&&typeof e[0]=="object"?{delay:l,trailing:u=!0,leading:c=!0,rejectOnCancel:p=!1}=e[0]:[l,u=!0,c=!0,p=!1]=e;const d=()=>{n&&(clearTimeout(n),n=void 0,s(),s=sa)};return h=>{const v=gs(l),_=Date.now()-t,x=()=>i=h();return d(),v<=0?(t=Date.now(),x()):(_>v&&(c||!r)?(t=Date.now(),x()):u&&(i=new Promise((b,E)=>{s=p?E:b,n=setTimeout(()=>{t=Date.now(),r=!0,b(x()),d()},Math.max(0,v-_))})),!c&&!n&&(n=setTimeout(()=>r=!0,v)),r=!1,i)}}function GR(e,t=200,n={}){return y1(qR(t,n),e)}function JR(e,t=200,n=!1,r=!0,s=!1){return y1(KR(t,n,r,s),e)}function b1(e,t=1e3,n={}){const{immediate:r=!0,immediateCallback:s=!1}=n;let i=null;const l=te(!1);function u(){i&&(clearInterval(i),i=null)}function c(){l.value=!1,u()}function p(){const d=gs(t);d<=0||(l.value=!0,s&&e(),u(),i=setInterval(e,d))}if(r&&yd&&p(),at(t)||typeof t=="function"){const d=gt(t,()=>{l.value&&yd&&p()});vd(d)}return vd(c),{isActive:l,pause:c,resume:p}}function UF(e,t,n){let r;at(n)?r={evaluating:n}:r=n||{};const{lazy:s=!1,evaluating:i=void 0,shallow:l=!0,onError:u=sa}=r,c=te(!s),p=l?Ir(t):te(t);let d=0;return Xt(async g=>{if(!c.value)return;d++;const h=d;let v=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const _=await e(x=>{g(()=>{i&&(i.value=!1),v||x()})});h===d&&(p.value=_)}catch(_){u(_)}finally{i&&h===d&&(i.value=!1),v=!0}}),s?F(()=>(c.value=!0,p.value)):p}function HF(e){var t;const n=gs(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ZR=yd?window:void 0;function _1(e,t={}){const{immediate:n=!0,fpsLimit:r=void 0,window:s=ZR}=t,i=te(!1),l=r?1e3/r:null;let u=0,c=null;function p(h){if(!i.value||!s)return;u||(u=h);const v=h-u;if(l&&vs(u);return(c=t==null?void 0:t.cleanups)==null||c.push(d),d}function r(u){function c(...p){s(c),u(...p)}return n(c)}function s(u){const c=Ai.get(e);c&&(c.delete(u),c.size||i())}function i(){Ai.delete(e)}function l(u,c){var p;(p=Ai.get(e))==null||p.forEach(d=>d(u,c))}return{on:n,once:r,off:s,emit:l,reset:i}}function QR(e={}){const{controls:t=!1,interval:n="requestAnimationFrame"}=e,r=te(new Date),s=()=>r.value=new Date,i=n==="requestAnimationFrame"?_1(s,{immediate:!0}):b1(s,n,{immediate:!0});return t?{now:r,...i}:r}const XR=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],eO={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>e===1?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>e===1?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>e===1?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>e===1?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function tO(e){return e.toISOString().slice(0,10)}function zF(e,t={}){const{controls:n=!1,updateInterval:r=3e4}=t,{now:s,...i}=QR({interval:r,controls:!0}),l=F(()=>nO(new Date(gs(e)),t,gs(s)));return n?{timeAgo:l,...i}:l}function nO(e,t={},n=Date.now()){var r;const{max:s,messages:i=eO,fullDateFormatter:l=tO,units:u=XR,showSecond:c=!1,rounding:p="round"}=t,d=typeof p=="number"?b=>+b.toFixed(p):Math[p],g=+n-+e,h=Math.abs(g);function v(b,E){return d(Math.abs(b)/E.value)}function _(b,E){const C=v(b,E),S=b>0,A=x(E.name,C,S);return x(S?"past":"future",A,S)}function x(b,E,C){const S=i[b];return typeof S=="function"?S(E,C):S.replace("{0}",E.toString())}if(h<6e4&&!c)return i.justNow;if(typeof s=="number"&&h>s)return l(new Date(e));if(typeof s=="string"){const b=(r=u.find(E=>E.name===s))==null?void 0:r.max;if(b&&h>b)return l(new Date(e))}for(const[b,E]of u.entries()){if(v(g,E)<=0&&u[b-1])return _(g,u[b-1]);if(hl.value=ev()+n,c=i?()=>{u(),i(l.value)}:u,p=s==="requestAnimationFrame"?_1(c,{immediate:r}):b1(c,s,{immediate:r});return t?{timestamp:l,...p}:l}const oO=Symbol("nuxt-ui.slideover"),sO=On(e=>{const t=Ir({component:"div",props:{}});e.vueApp.provide(oO,t)}),iO=Symbol("nuxt-ui.modal"),aO=On(e=>{const t=Ir({component:"div",props:{}});e.vueApp.provide(iO,t)}),bp="-";function lO(e){const t=cO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function s(l){const u=l.split(bp);return u[0]===""&&u.length!==1&&u.shift(),w1(u,t)||uO(l)}function i(l,u){const c=n[l]||[];return u&&r[l]?[...c,...r[l]]:c}return{getClassGroupId:s,getConflictingClassGroupIds:i}}function w1(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?w1(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(bp);return(l=t.validators.find(({validator:u})=>u(i)))==null?void 0:l.classGroupId}const tv=/^\[(.+)\]$/;function uO(e){if(tv.test(e)){const t=tv.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function cO(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return dO(Object.entries(e.classGroups),n).forEach(([i,l])=>{bd(l,r,i,t)}),r}function bd(e,t,n,r){e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:nv(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(fO(s)){bd(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,l])=>{bd(l,nv(t,i),n,r)})})}function nv(e,t){let n=e;return t.split(bp).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function fO(e){return e.isThemeGetter}function dO(e,t){return t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,u])=>[t+l,u])):i);return[n,s]}):e}function pO(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function s(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return s(i,l),l},set(i,l){n.has(i)?n.set(i,l):s(i,l)}}}const x1="!";function hO(e){const t=e.separator,n=t.length===1,r=t[0],s=t.length;return function(l){const u=[];let c=0,p=0,d;for(let x=0;xp?d-p:void 0;return{modifiers:u,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:_}}}function gO(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function mO(e){return{cache:pO(e.cacheSize),splitModifiers:hO(e),...lO(e)}}const vO=/\s+/;function yO(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=new Set;return e.trim().split(vO).map(l=>{const{modifiers:u,hasImportantModifier:c,baseClassName:p,maybePostfixModifierPosition:d}=n(l);let g=r(d?p.substring(0,d):p),h=!!d;if(!g){if(!d)return{isTailwindClass:!1,originalClassName:l};if(g=r(p),!g)return{isTailwindClass:!1,originalClassName:l};h=!1}const v=gO(u).join(":");return{isTailwindClass:!0,modifierId:c?v+x1:v,classGroupId:g,originalClassName:l,hasPostfixModifier:h}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:u,classGroupId:c,hasPostfixModifier:p}=l,d=u+c;return i.has(d)?!1:(i.add(d),s(c,p).forEach(g=>i.add(u+g)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function pt(){let e=0,t,n,r="";for(;eg(d),e());return n=mO(p),r=n.cache.get,s=n.cache.set,i=u,u(c)}function u(c){const p=r(c);if(p)return p;const d=yO(c,n);return s(c,d),d}return function(){return i(pt.apply(null,arguments))}}function $t(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const S1=/^\[(?:([a-z-]+):)?(.+)\]$/i,bO=/^\d+\/\d+$/,_O=new Set(["px","full","screen"]),wO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,SO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Hr(e){return ss(e)||_O.has(e)||bO.test(e)}function mo(e){return li(e,"length",PO)}function ss(e){return!!e&&!Number.isNaN(Number(e))}function Tl(e){return li(e,"number",ss)}function Ii(e){return!!e&&Number.isInteger(Number(e))}function EO(e){return e.endsWith("%")&&ss(e.slice(0,-1))}function qe(e){return S1.test(e)}function vo(e){return wO.test(e)}const TO=new Set(["length","size","percentage"]);function $O(e){return li(e,TO,C1)}function AO(e){return li(e,"position",C1)}const IO=new Set(["image","url"]);function RO(e){return li(e,IO,MO)}function OO(e){return li(e,"",LO)}function Ri(){return!0}function li(e,t,n){const r=S1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function PO(e){return xO.test(e)&&!kO.test(e)}function C1(){return!1}function LO(e){return SO.test(e)}function MO(e){return CO.test(e)}function wd(){const e=$t("colors"),t=$t("spacing"),n=$t("blur"),r=$t("brightness"),s=$t("borderColor"),i=$t("borderRadius"),l=$t("borderSpacing"),u=$t("borderWidth"),c=$t("contrast"),p=$t("grayscale"),d=$t("hueRotate"),g=$t("invert"),h=$t("gap"),v=$t("gradientColorStops"),_=$t("gradientColorStopPositions"),x=$t("inset"),b=$t("margin"),E=$t("opacity"),C=$t("padding"),S=$t("saturate"),A=$t("scale"),B=$t("sepia"),L=$t("skew"),U=$t("space"),j=$t("translate"),q=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",qe,t],z=()=>[qe,t],be=()=>["",Hr,mo],ce=()=>["auto",ss,qe],ke=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ie=()=>["solid","dashed","dotted","double","none"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>["start","end","center","between","around","evenly","stretch"],Lt=()=>["","0",qe],Gt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Re=()=>[ss,Tl],je=()=>[ss,qe];return{cacheSize:500,separator:":",theme:{colors:[Ri],spacing:[Hr,mo],blur:["none","",vo,qe],brightness:Re(),borderColor:[e],borderRadius:["none","","full",vo,qe],borderSpacing:z(),borderWidth:be(),contrast:Re(),grayscale:Lt(),hueRotate:je(),invert:Lt(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[EO,mo],inset:Y(),margin:Y(),opacity:Re(),padding:z(),saturate:Re(),scale:Re(),sepia:Lt(),skew:je(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[vo]}],"break-after":[{"break-after":Gt()}],"break-before":[{"break-before":Gt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ke(),qe]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ii,qe]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qe]}],grow:[{grow:Lt()}],shrink:[{shrink:Lt()}],order:[{order:["first","last","none",Ii,qe]}],"grid-cols":[{"grid-cols":[Ri]}],"col-start-end":[{col:["auto",{span:["full",Ii,qe]},qe]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[Ri]}],"row-start-end":[{row:["auto",{span:[Ii,qe]},qe]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ve()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ve(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ve(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[U]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[U]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[vo]},vo]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vo,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tl]}],"font-family":[{font:[Ri]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qe]}],"line-clamp":[{"line-clamp":["none",ss,Tl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hr,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hr,mo]}],"underline-offset":[{"underline-offset":["auto",Hr,qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ke(),AO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$O]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},RO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...ie(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:ie()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ie()]}],"outline-offset":[{"outline-offset":[Hr,qe]}],"outline-w":[{outline:[Hr,mo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[Hr,mo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vo,OO]}],"shadow-color":[{shadow:[Ri]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...Se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Se()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",vo,qe]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[g]}],saturate:[{saturate:[S]}],sepia:[{sepia:[B]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qe]}],duration:[{duration:je()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:je()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Ii,qe]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Hr,mo,Tl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function BO(e,{cacheSize:t,prefix:n,separator:r,extend:s={},override:i={}}){Nl(e,"cacheSize",t),Nl(e,"prefix",n),Nl(e,"separator",r);for(const l in i)FO(e[l],i[l]);for(const l in s)DO(e[l],s[l]);return e}function Nl(e,t,n){n!==void 0&&(e[t]=n)}function FO(e,t){if(t)for(const n in t)Nl(e,n,t[n])}function DO(e,t){if(t)for(const n in t){const r=t[n];r!==void 0&&(e[n]=(e[n]||[]).concat(r))}}function VO(e,...t){return typeof e=="function"?_d(wd,e,...t):_d(()=>BO(wd(),e),...t)}const Hn=_d(wd);function NO(e,t){const n={...e};for(const r of t)delete n[r];return n}function Vi(e,t,n){typeof t=="string"&&(t=t.split(".").map(s=>{const i=Number(s);return isNaN(i)?s:i}));let r=e;for(const s of t){if(r==null)return n;r=r[s]}return r!==void 0?r:n}const _p={to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1}},jO=e=>Object.keys(_p).reduce((n,r)=>(e[r]!==void 0&&(n[r]=e[r]),n),{}),UO=VO({extend:{classGroups:{icons:[e=>/^i-/.test(e)]}}}),HO=cp((e,t,n,r)=>{if(r==="default"||r.startsWith("default.")||r==="popper"||r.startsWith("popper.")||r.endsWith("avatar")&&t==="size"||r.endsWith("chip")&&t==="size"||r.endsWith("badge")&&t==="size"||t==="color"||t==="variant")return!1;if(typeof e[t]=="string"&&typeof n=="string"&&e[t]&&n)return e[t]=UO(e[t],n),!0});function wn(e,...t){return e==="override"?va({},...t):HO({},...t)}function rv(e){const t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(r,s,i,l){return s+s+i+i+l+l});const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?`${parseInt(n[1],16)} ${parseInt(n[2],16)} ${parseInt(n[3],16)}`:null}function E1(e){const t=parseFloat(e);return isNaN(t)?e:t}const zO="inherit",WO="currentColor",qO="transparent",KO="#000",GO="#fff",JO={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},ZO={50:"rgb(var(--color-gray-50) / )",100:"rgb(var(--color-gray-100) / )",200:"rgb(var(--color-gray-200) / )",300:"rgb(var(--color-gray-300) / )",400:"rgb(var(--color-gray-400) / )",500:"rgb(var(--color-gray-500) / )",600:"rgb(var(--color-gray-600) / )",700:"rgb(var(--color-gray-700) / )",800:"rgb(var(--color-gray-800) / )",900:"rgb(var(--color-gray-900) / )",950:"rgb(var(--color-gray-950) / )"},YO={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},QO={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},XO={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},eP={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},tP={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},nP={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},rP={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},oP={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},sP={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},iP={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},aP={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},lP={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},uP={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},cP={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},fP={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},dP={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},pP={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},hP={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},gP={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},mP={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},vP={50:"rgb(var(--color-primary-50) / )",100:"rgb(var(--color-primary-100) / )",200:"rgb(var(--color-primary-200) / )",300:"rgb(var(--color-primary-300) / )",400:"rgb(var(--color-primary-400) / )",500:"rgb(var(--color-primary-500) / )",600:"rgb(var(--color-primary-600) / )",700:"rgb(var(--color-primary-700) / )",800:"rgb(var(--color-primary-800) / )",900:"rgb(var(--color-primary-900) / )",950:"rgb(var(--color-primary-950) / )",DEFAULT:"rgb(var(--color-primary-DEFAULT) / )"},yP={DEFAULT:"#ffffff",dark:"#333333"},bP={DEFAULT:"#333333",dark:"#f6f7ee"},$l={inherit:zO,current:WO,transparent:qO,black:KO,white:GO,slate:JO,gray:ZO,zinc:YO,neutral:QO,stone:XO,red:eP,orange:tP,amber:nP,yellow:rP,lime:oP,green:sP,emerald:iP,teal:aP,cyan:lP,sky:uP,blue:cP,indigo:fP,violet:dP,purple:pP,fuchsia:hP,pink:gP,rose:mP,primary:vP,backdrop:yP,body:bP,"cool-gray":void 0},_P=On(()=>{const e=si(),t=it(),n=F(()=>{const s=$l[e.ui.primary],i=$l[e.ui.gray];return s||console.warn(`[@nuxt/ui] Primary color '${e.ui.primary}' not found in Tailwind config`),i||console.warn(`[@nuxt/ui] Gray color '${e.ui.gray}' not found in Tailwind config`),`:root { ${Object.entries(s||$l.green).map(([l,u])=>`--color-primary-${l}: ${rv(u)};`).join(` `)} --color-primary-DEFAULT: var(--color-primary-500); @@ -64,7 +64,7 @@ function print() { __p += __j.call(arguments, '') } `:`; `)+oe+`return __p }`;var Je=_m(function(){return ft(k,Te+"return "+oe).apply(n,$)});if(Je.source=oe,Bc(Je))throw Je;return Je}function RC(o){return ht(o).toLowerCase()}function OC(o){return ht(o).toUpperCase()}function PC(o,a,f){if(o=ht(o),o&&(f||a===n))return Ah(o);if(!o||!(a=Bn(a)))return o;var m=lr(o),y=lr(a),k=Ih(m,y),$=Rh(m,y)+1;return lo(m,k,$).join("")}function LC(o,a,f){if(o=ht(o),o&&(f||a===n))return o.slice(0,Ph(o)+1);if(!o||!(a=Bn(a)))return o;var m=lr(o),y=Rh(m,lr(a))+1;return lo(m,0,y).join("")}function MC(o,a,f){if(o=ht(o),o&&(f||a===n))return o.replace(Bu,"");if(!o||!(a=Bn(a)))return o;var m=lr(o),y=Ih(m,lr(a));return lo(m,y).join("")}function BC(o,a){var f=K,m=Y;if(Pt(a)){var y="separator"in a?a.separator:y;f="length"in a?We(a.length):f,m="omission"in a?Bn(a.omission):m}o=ht(o);var k=o.length;if(ks(o)){var $=lr(o);k=$.length}if(f>=k)return o;var M=f-Ss(m);if(M<1)return m;var N=$?lo($,0,M).join(""):o.slice(0,M);if(y===n)return N+m;if($&&(M+=N.length-M),Fc(y)){if(o.slice(M).search(y)){var Q,X=N;for(y.global||(y=Xu(y.source,ht(Yp.exec(y))+"g")),y.lastIndex=0;Q=y.exec(X);)var oe=Q.index;N=N.slice(0,oe===n?M:oe)}}else if(o.indexOf(Bn(y),M)!=M){var ge=N.lastIndexOf(y);ge>-1&&(N=N.slice(0,ge))}return N+m}function FC(o){return o=ht(o),o&&G_.test(o)?o.replace(Gp,dx):o}var DC=Rs(function(o,a,f){return o+(f?" ":"")+a.toUpperCase()}),Nc=wg("toUpperCase");function bm(o,a,f){return o=ht(o),a=f?n:a,a===n?ax(o)?gx(o):Qw(o):o.match(a)||[]}var _m=Ze(function(o,a){try{return Ln(o,n,a)}catch(f){return Bc(f)?f:new Ne(f)}}),VC=Fr(function(o,a){return Kn(a,function(f){f=wr(f),Mr(o,f,Lc(o[f],o))}),o});function NC(o){var a=o==null?0:o.length,f=Pe();return o=a?At(o,function(m){if(typeof m[1]!="function")throw new Gn(l);return[f(m[0]),m[1]]}):[],Ze(function(m){for(var y=-1;++yve)return[];var f=Re,m=ln(o,Re);a=Pe(a),o-=Re;for(var y=Zu(m,a);++f0||a<0)?new tt(f):(o<0?f=f.takeRight(-o):o&&(f=f.drop(o)),a!==n&&(a=We(a),f=a<0?f.dropRight(-a):f.take(a-o)),f)},tt.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},tt.prototype.toArray=function(){return this.take(Re)},br(tt.prototype,function(o,a){var f=/^(?:filter|find|map|reject)|While$/.test(a),m=/^(?:head|last)$/.test(a),y=w[m?"take"+(a=="last"?"Right":""):a],k=m||/^find/.test(a);y&&(w.prototype[a]=function(){var $=this.__wrapped__,M=m?[1]:arguments,N=$ instanceof tt,Q=M[0],X=N||Ue($),oe=function(Qe){var ot=y.apply(w,no([Qe],M));return m&&ge?ot[0]:ot};X&&f&&typeof Q=="function"&&Q.length!=1&&(N=X=!1);var ge=this.__chain__,Te=!!this.__actions__.length,Le=k&&!ge,Je=N&&!Te;if(!k&&X){$=Je?$:new tt(this);var Me=o.apply($,M);return Me.__actions__.push({func:il,args:[oe],thisArg:n}),new Jn(Me,ge)}return Le&&Je?o.apply(this,M):(Me=this.thru(oe),Le?m?Me.value()[0]:Me.value():Me)})}),Kn(["pop","push","shift","sort","splice","unshift"],function(o){var a=Oa[o],f=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",m=/^(?:pop|shift)$/.test(o);w.prototype[o]=function(){var y=arguments;if(m&&!this.__chain__){var k=this.value();return a.apply(Ue(k)?k:[],y)}return this[f](function($){return a.apply(Ue($)?$:[],y)})}}),br(tt.prototype,function(o,a){var f=w[a];if(f){var m=f.name+"";vt.call($s,m)||($s[m]=[]),$s[m].push({name:a,func:f})}}),$s[Xa(n,E).name]=[{name:"wrapper",func:n}],tt.prototype.clone=Fx,tt.prototype.reverse=Dx,tt.prototype.value=Vx,w.prototype.at=hS,w.prototype.chain=gS,w.prototype.commit=mS,w.prototype.next=vS,w.prototype.plant=bS,w.prototype.reverse=_S,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=wS,w.prototype.first=w.prototype.head,di&&(w.prototype[di]=yS),w},Cs=mx();Fo?((Fo.exports=Cs)._=Cs,Uu._=Cs):tn._=Cs}).call(Oi)})(lu,lu.exports);var JP=lu.exports;const he=GP(JP);let Al;const ZP=new Uint8Array(16);function YP(){if(!Al&&(Al=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Al))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Al(ZP)}const on=[];for(let e=0;e<256;++e)on.push((e+256).toString(16).slice(1));function QP(e,t=0){return on[e[t+0]]+on[e[t+1]]+on[e[t+2]]+on[e[t+3]]+"-"+on[e[t+4]]+on[e[t+5]]+"-"+on[e[t+6]]+on[e[t+7]]+"-"+on[e[t+8]]+on[e[t+9]]+"-"+on[e[t+10]]+on[e[t+11]]+on[e[t+12]]+on[e[t+13]]+on[e[t+14]]+on[e[t+15]]}const XP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_v={randomUUID:XP};function eL(e,t,n){if(_v.randomUUID&&!t&&!e)return _v.randomUUID();e=e||{};const r=e.random||(e.rng||YP)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let s=0;s<16;++s)t[n+s]=r[s];return t}return QP(r)}const It={timestampToTime(e){const t=new Date(Number(e)),n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0");return`${n}-${r}-${s} ${t.toUTCString().slice(17,25)}`},timestampToTimeOnly(e){return`${new Date(Number(e)).toUTCString().slice(17,25)}`},timestampToDate(e){const t=new Date(Number(e)),n=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),s=String(t.getUTCDate()).padStart(2,"0");return`${n}-${r}-${s}`},currentTime(){return new Date().toISOString().slice(11,19)},secondsToHumanReadable(e){const t=Math.floor(e/3600),n=Math.floor((e-t*3600)/60),r=he.round(e-t*3600-n*60,2);return`${t}h ${n}m ${r}s`},remainingTimeText(e){return Math.round(e)===0?"Please wait...":e>60?`${this.secondsToHumanReadable(e)} remaining...`:`${Math.round(e)} seconds remaining...`},roundPrice(e){return e>1?he.round(e,2):e},colorBasedOnSide(e){return e==="buy"?"text-green-600 dark:text-green-400":e==="sell"?"text-red-500 dark:text-red-400":"text-gray-900 dark:text-gray-200"},colorBasedOnType(e){return e==="long"?"text-green-600 dark:text-green-400":e==="short"?"text-red-500 dark:text-red-400":"text-gray-900 dark:text-gray-200"},colorBasedOnNumber(e){return e>0?"text-green-600 dark:text-green-400":e<0?"text-red-500 dark:text-red-400":"text-gray-900 dark:text-gray-200"},uuid(){return eL()}};function wv(){return he.cloneDeep({id:It.uuid(),form:{start_date:"2021-01-01",exchange:"",symbol:""},results:{showResults:!1,executing:!1,progressbar:{current:0,estimated_remaining_seconds:0},metrics:[],infoLogs:"",exception:{error:"",traceback:""},alert:{message:"",type:""}}})}const O1=ii("candles",{state:()=>({tabs:{}}),persist:{storage:ms.localStorage},actions:{async init(e){for(const t in this.tabs){const n=this.tabs[t];n.results.executing&&!n.results.exception.error&&(e.has(n.id)||await this.cancel(n.id))}},async addTab(){const e=wv();this.tabs[e.id]=e,await Io(`/candles/${e.id}`)},closeTab(e){delete this.tabs[e],Io("/candles")},startInNewTab(e){const t=wv();t.form=he.cloneDeep(this.tabs[e].form),this.tabs[t.id]=t,this.start(t.id)},async start(e){this.tabs[e].results.progressbar.current=0,this.tabs[e].results.executing=!0,this.tabs[e].results.infoLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].results.alert.message="";const{data:t,error:n}=await jt("/import-candles",{id:e,exchange:this.tabs[e].form.exchange,symbol:this.tabs[e].form.symbol,start_date:this.tabs[e].form.start_date},!0);if(n.value&&n.value.statusCode!==200){Ve("error",n.value.message);return}},async cancel(e){if(this.tabs[e].results.exception.error){this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/cancel-import-candles",{id:e},!0);if(n.value&&n.value.statusCode!==200){Ve("error",n.value.message);return}this.tabs[e].results.executing=!1},progressbarEvent(e,t){this.tabs[e].results.progressbar=t,this.tabs[e].results.progressbar.current<100&&this.tabs[e].results.executing===!1&&(this.tabs[e].results.executing=!0)},alertEvent(e,t){this.tabs[e].results.alert=t,this.tabs[e].results.progressbar.current=100,this.tabs[e].results.executing=!1,this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error=""},infoLogEvent(e,t){this.tabs[e].results.infoLogs+=`[${It.timestampToTime(t.timestamp)}] ${t.message} -`},exceptionEvent(e,t){this.tabs[e].results.exception.error=t.error,this.tabs[e].results.exception.traceback=t.traceback},terminationEvent(e){this.tabs[e].results.executing&&(this.tabs[e].results.executing=!1,Ve("success","Session terminated successfully"))}}});function xv(){return he.cloneDeep({id:It.uuid(),form:{start_date:"2024-01-01",finish_date:"2024-03-01",debug_mode:!1,export_chart:!1,export_tradingview:!1,export_full_reports:!1,export_csv:!1,export_json:!1,fast_mode:!1,benchmark:!0,exchange:"",routes:[],data_routes:[]},results:{showResults:!1,executing:!1,logsModal:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],metrics:[],hyperparameters:[],generalInfo:{},infoLogs:"",exception:{error:"",traceback:""},charts:{equity_curve:[]},info:[]}})}const P1=ii("backtest",{state:()=>({tabs:{}}),persist:{storage:ms.localStorage},actions:{async init(e){for(const t in this.tabs){const n=this.tabs[t];n.results.executing&&!n.results.exception.error&&(e.has(n.id)||await this.cancel(n.id))}},async addTab(){const e=xv();this.tabs[e.id]=e,await Io(`/backtest/${e.id}`)},closeTab(e){delete this.tabs[e],Io("/backtest")},async startInNewTab(e){const t=xv();t.form=he.cloneDeep(this.tabs[e].form),this.tabs[t.id]=t,this.start(t.id),await Io(`/backtest/${t.id}`)},async start(e){if(this.tabs[e].results.progressbar.current=0,this.tabs[e].results.executing=!0,this.tabs[e].results.infoLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].form.fast_mode&&this.tabs[e].form.routes.length>1){Ve("error","For the moment, the fast mode can only be used with one trading route"),this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/backtest",{id:e,exchange:this.tabs[e].form.exchange,routes:this.tabs[e].form.routes,data_routes:this.tabs[e].form.data_routes,config:wt().settings.backtest,start_date:this.tabs[e].form.start_date,finish_date:this.tabs[e].form.finish_date,debug_mode:this.tabs[e].form.debug_mode,export_csv:this.tabs[e].form.export_csv,export_chart:this.tabs[e].form.export_chart,export_tradingview:this.tabs[e].form.export_tradingview,export_full_reports:this.tabs[e].form.export_full_reports,export_json:this.tabs[e].form.export_json,fast_mode:this.tabs[e].form.fast_mode,benchmark:this.tabs[e].form.benchmark},!0);if(n.value&&n.value.statusCode!==200){Ve("error",n.value.data.message),this.tabs[e].results.executing=!1;return}},async cancel(e){if(this.tabs[e].results.exception.error){this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/cancel-backtest",{id:e},!0);n.value&&n.value.statusCode!==200&&Ve("error",n.value.data.message),this.tabs[e].results.executing=!1},rerun(e){this.tabs[e].results.showResults=!1,this.start(e)},newBacktest(e){this.tabs[e].results.showResults=!1},candlesInfoEvent(e,t){const n=[["Period",t.duration],["Starting Date",It.timestampToDate(t.starting_time)],["Ending Date",It.timestampToDate(t.finishing_time)],["Exchange",t.exchange],["Exchange Type",t.exchange_type]];t.exchange_type==="futures"&&(n.push(["Leverage",t.leverage]),n.push(["Leverage Mode",t.leverage_mode])),this.tabs[e].results.info=n},routesInfoEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.tabs[e].results.routes_info=n},progressbarEvent(e,t){this.tabs[e].results.progressbar=t},infoLogEvent(e,t){this.tabs[e].results.infoLogs+=`[${It.timestampToTime(t.timestamp)}] ${t.message} +`},exceptionEvent(e,t){this.tabs[e].results.exception.error=t.error,this.tabs[e].results.exception.traceback=t.traceback},terminationEvent(e){this.tabs[e].results.executing&&(this.tabs[e].results.executing=!1,Ve("success","Session terminated successfully"))}}});function xv(){return he.cloneDeep({id:It.uuid(),form:{start_date:"2024-01-01",finish_date:"2024-03-01",debug_mode:!1,export_chart:!1,export_tradingview:!1,export_full_reports:!1,export_csv:!1,export_json:!1,fast_mode:!1,benchmark:!0,exchange:"",routes:[],data_routes:[]},results:{showResults:!1,executing:!1,logsModal:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],metrics:[],hyperparameters:[],generalInfo:{},infoLogs:"",exception:{error:"",traceback:""},charts:{equity_curve:[]},info:[]}})}const P1=ii("backtest",{state:()=>({tabs:{}}),persist:{storage:ms.localStorage},actions:{async init(e){for(const t in this.tabs){const n=this.tabs[t];n.results.executing&&!n.results.exception.error&&(e.has(n.id)||await this.cancel(n.id))}},async addTab(e){const t=xv();if(this.tabs[t.id]=t,e){const n=this.tabs[e];t.form=n.form}await Io(`/backtest/${t.id}`)},closeTab(e){delete this.tabs[e],Io("/backtest")},async startInNewTab(e){const t=xv();t.form=he.cloneDeep(this.tabs[e].form),this.tabs[t.id]=t,this.start(t.id),await Io(`/backtest/${t.id}`)},async start(e){if(this.tabs[e].results.progressbar.current=0,this.tabs[e].results.executing=!0,this.tabs[e].results.infoLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].form.fast_mode&&this.tabs[e].form.routes.length>1){Ve("error","For the moment, the fast mode can only be used with one trading route"),this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/backtest",{id:e,exchange:this.tabs[e].form.exchange,routes:this.tabs[e].form.routes,data_routes:this.tabs[e].form.data_routes,config:wt().settings.backtest,start_date:this.tabs[e].form.start_date,finish_date:this.tabs[e].form.finish_date,debug_mode:this.tabs[e].form.debug_mode,export_csv:this.tabs[e].form.export_csv,export_chart:this.tabs[e].form.export_chart,export_tradingview:this.tabs[e].form.export_tradingview,export_full_reports:this.tabs[e].form.export_full_reports,export_json:this.tabs[e].form.export_json,fast_mode:this.tabs[e].form.fast_mode,benchmark:this.tabs[e].form.benchmark},!0);if(n.value&&n.value.statusCode!==200){Ve("error",n.value.data.message),this.tabs[e].results.executing=!1;return}},async cancel(e){if(this.tabs[e].results.exception.error){this.tabs[e].results.executing=!1;return}const{data:t,error:n}=await jt("/cancel-backtest",{id:e},!0);n.value&&n.value.statusCode!==200&&Ve("error",n.value.data.message),this.tabs[e].results.executing=!1},rerun(e){this.tabs[e].results.showResults=!1,this.start(e)},newBacktest(e){this.tabs[e].results.showResults=!1},candlesInfoEvent(e,t){const n=[["Period",t.duration],["Starting Date",It.timestampToDate(t.starting_time)],["Ending Date",It.timestampToDate(t.finishing_time)],["Exchange",t.exchange],["Exchange Type",t.exchange_type]];t.exchange_type==="futures"&&(n.push(["Leverage",t.leverage]),n.push(["Leverage Mode",t.leverage_mode])),this.tabs[e].results.info=n},routesInfoEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.tabs[e].results.routes_info=n},progressbarEvent(e,t){this.tabs[e].results.progressbar=t},infoLogEvent(e,t){this.tabs[e].results.infoLogs+=`[${It.timestampToTime(t.timestamp)}] ${t.message} `},exceptionEvent(e,t){this.tabs[e].results.exception.error=t.error,this.tabs[e].results.exception.traceback=t.traceback},generalInfoEvent(e,t){this.tabs[e].results.generalInfo=t},hyperparametersEvent(e,t){this.tabs[e].results.hyperparameters=t},metricsEvent(e,t){if(t===null){this.tabs[e].results.metrics=[];return}this.tabs[e].results.metrics=[["Total Closed Trades",t.total],["Total Net Profit",`${he.round(t.net_profit,2)} (${he.round(t.net_profit_percentage,2)}%)`],["Starting => Finishing Balance",`${he.round(t.starting_balance,2)} => ${he.round(t.finishing_balance,2)}`],["Open Trades",t.total_open_trades],["Total Paid Fees",he.round(t.fee,2)],["Max Drawdown",`${he.round(t.max_drawdown,2)}%`],["Annual Return",`${he.round(t.annual_return,2)}%`],["Expectancy",`${he.round(t.expectancy,2)} (${he.round(t.expectancy_percentage,2)}%)`],["Avg Win | Avg Loss",`${he.round(t.average_win,2)} | ${he.round(t.average_loss,2)}`],["Ratio Avg Win / Avg Loss",he.round(t.ratio_avg_win_loss,2)],["Win-rate",`${he.round(t.win_rate*100,2)}%`],["Longs | Shorts",`${he.round(t.longs_percentage,2)}% | ${he.round(t.shorts_percentage,2)}%`],["Avg Holding Time",It.secondsToHumanReadable(t.average_holding_period)],["Winning Trades Avg Holding Time",It.secondsToHumanReadable(t.average_winning_holding_period)],["Losing Trades Avg Holding Time",It.secondsToHumanReadable(t.average_losing_holding_period)],["Sharpe Ratio",he.round(t.sharpe_ratio,2)],["Calmar Ratio",he.round(t.calmar_ratio,2)],["Sortino Ratio",he.round(t.sortino_ratio,2)],["Omega Ratio",he.round(t.omega_ratio,2)],["Winning Streak",t.winning_streak],["Losing Streak",t.losing_streak],["Largest Winning Trade",he.round(t.largest_winning_trade,2)],["Largest Losing Trade",he.round(t.largest_losing_trade,2)],["Total Winning Trades",t.total_winning_trades],["Total Losing Trades",t.total_losing_trades]]},equityCurveEvent(e,t){this.tabs[e].results.charts.equity_curve=t,this.tabs[e].results.executing=!1,this.tabs[e].results.showResults=!0},terminationEvent(e,t){this.tabs[e].results.executing&&(this.tabs[e].results.executing=!1,Ve("success","Session terminated successfully"))},alertEvent(e,t){Ve(t.type,t.message)},notificationEvent(e,t){Ve(t.type,t.message)}}}),L1=ii("optimization",{state:()=>({form:{start_date:"2024-01-01",finish_date:"2024-03-01",debug_mode:!1,export_csv:!1,export_json:!1,exchange:"",routes:[],data_routes:[],optimal_total:50,fast_mode:!1},results:{showResults:!1,executing:!1,logsModal:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],best_candidates:[],metrics:[],generalInfo:[],infoLogs:"",info:[],exception:{error:"",traceback:""},alert:{message:"",type:""}}}),persist:{storage:ms.localStorage},actions:{async init(e){this.results.executing&&!this.results.exception.error&&(e.has("optimization")||await this.cancel())},async start(){this.results.progressbar.current=0,this.results.executing=!0,this.results.infoLogs="",this.results.exception.traceback="",this.results.exception.error="",this.results.alert.message="",this.results.alert.type="",this.results.metrics=[],this.results.generalInfo=[],this.results.best_candidates=[],this.results.routes_info=[],this.results.showResults=!1;const e=wt(),t={id:"optimization",exchange:this.form.exchange,routes:this.form.routes,data_routes:this.form.data_routes,config:e.settings.optimization,start_date:this.form.start_date,finish_date:this.form.finish_date,optimal_total:this.form.optimal_total,debug_mode:this.form.debug_mode,export_csv:this.form.export_csv,export_json:this.form.export_json,fast_mode:this.form.fast_mode},{data:n,error:r}=await jt("/optimization",t,!0);if(r.value&&r.value.statusCode!==200){Ve("error",r.value.data.message);return}},async cancel(){if(this.results.exception.error){this.results.executing=!1;return}this.results.executing=!1;const{data:e,error:t}=await jt("/cancel-optimization",{id:"optimization"},!0);if(t.value&&t.value.statusCode!==200){Ve("error",t.value.data.message);return}},rerun(){this.results.showResults=!1,this.start()},candlesInfoEvent(e,t){this.results.info=[["Period",t.duration],["Starting-Ending Date",`${It.timestampToDate(t.starting_time)} => ${It.timestampToDate(t.finishing_time)}`]]},routesInfoEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.results.routes_info=n},progressbarEvent(e,t){this.results.progressbar=t},infoLogEvent(e,t){this.results.infoLogs+=`[${It.timestampToTime(t.timestamp)}] ${t.message} `},exceptionEvent(e,t){this.results.exception.error=t.error,this.results.exception.traceback=t.traceback},generalInfoEvent(e,t){this.results.executing||(this.results.executing=!0),this.results.generalInfo=[["Started at",t.started_at],["Index",t.index],["Average strategy execution time",`${he.round(t.average_execution_seconds,2)} seconds`],["Trading route",t.trading_route]],"population_size"in t&&this.results.generalInfo.push(["Population size",t.population_size?t.population_size:""]),"iterations"in t&&this.results.generalInfo.push(["Iterations",t.iterations?t.iterations:""]),"solution_length"in t&&this.results.generalInfo.push(["Solution length",t.solution_length?t.solution_length:""])},metricsEvent(e,t){if(t===null){this.results.metrics=[];return}this.results.metrics=[["Total Closed Trades",t.total],["Total Net Profit",`${he.round(t.net_profit,2)} (${he.round(t.net_profit_percentage,2)}%)`],["Starting => Finishing Balance",`${he.round(t.starting_balance,2)} => ${he.round(t.finishing_balance,2)}`],["Open Trades",t.total_open_trades],["Total Paid Fees",he.round(t.fee,2)],["Max Drawdown",he.round(t.max_drawdown,2)],["Annual Return",`${he.round(t.annual_return,2)}%`],["Expectancy",`${he.round(t.expectancy,2)} (${he.round(t.expectancy_percentage,2)}%)`],["Avg Win | Avg Loss",`${he.round(t.average_win,2)} | ${he.round(t.average_loss,2)}`],["Ratio Avg Win / Avg Loss",he.round(t.ratio_avg_win_loss,2)],["Win-rate",`${he.round(t.win_rate*100,2)}%`],["Longs | Shorts",`${he.round(t.longs_percentage,2)}% | ${he.round(t.shorts_percentage,2)}%`],["Avg Holding Time",t.average_holding_period],["Winning Trades Avg Holding Time",t.average_winning_holding_period],["Losing Trades Avg Holding Time",t.average_losing_holding_period],["Sharpe Ratio",he.round(t.sharpe_ratio,2)],["Calmar Ratio",he.round(t.calmar_ratio,2)],["Sortino Ratio",he.round(t.sortino_ratio,2)],["Omega Ratio",he.round(t.omega_ratio,2)],["Winning Streak",t.winning_streak],["Losing Streak",t.losing_streak],["Largest Winning Trade",he.round(t.largest_winning_trade,2)],["Largest Losing Trade",he.round(t.largest_losing_trade,2)],["Total Winning Trades",t.total_winning_trades],["Total Losing Trades",t.total_losing_trades]]},terminationEvent(e){this.results.executing&&(this.results.executing=!1,Ve("success","Session terminated successfully"))},bestCandidatesEvent(e,t){const n=[];t.forEach(r=>{n.push([{value:`#${r.rank}`,style:""},{value:r.dna,style:"",tag:"code"},{value:r.fitness,style:""},{value:`${r.training_win_rate}% | ${r.testing_win_rate}%`,style:""},{value:`${r.training_total_trades} | ${r.testing_total_trades}`,style:""},{value:`${r.training_pnl}% | ${r.testing_pnl}%`,style:""}])}),this.results.best_candidates=n},alertEvent(e,t){this.results.alert=t,this.results.executing=!1,this.results.showResults=!0}}});function rn(e=""){return he.cloneDeep({id:e||It.uuid(),form:{debug_mode:!0,paper_mode:!0,exchange_api_key_id:"",notification_api_key_id:"",exchange:"",routes:[],data_routes:[]},results:{showResults:!1,booting:!1,monitoring:!1,finished:!1,terminating:!1,progressbar:{current:0,estimated_remaining_seconds:0},routes_info:[],routes:[],metrics:[],generalInfo:{},positions:[],orders:[],watchlist:[],candles:[],currentCandles:{},infoLogs:"",errorLogs:"",exception:{error:"",traceback:""},charts:{equity_curve:[]},selectedRoute:{},info:[]}})}const M1=ii("Live",{state:()=>({tabs:{}}),persist:{storage:ms.localStorage},actions:{async init(e){for(const t in this.tabs){const n=this.tabs[t];n.results.monitoring&&!n.results.exception.error&&(e.has(n.id)?this.fetchLogs(n.id):this.forceClose(n.id))}},async addTab(){const e=rn();this.tabs[e.id]=e,await Io(`/live/${e.id}`)},closeTab(e){const t=this.tabs[e];if(t.results.monitoring&&!t.results.exception.error&&!t.results.finished){Ve("error","Cannot close a live session tab that is currently running");return}delete this.tabs[e],Io("/live")},reset(e){this.tabs[e].results.progressbar.current=0,this.tabs[e].results.booting=!0,this.tabs[e].results.finished=!1,this.tabs[e].results.infoLogs="",this.tabs[e].results.errorLogs="",this.tabs[e].results.exception.traceback="",this.tabs[e].results.exception.error="",this.tabs[e].results.routes_info=[],this.tabs[e].results.metrics=[],this.tabs[e].results.generalInfo={},this.tabs[e].results.positions=[],this.tabs[e].results.orders=[],this.tabs[e].results.candles=[],this.tabs[e].results.currentCandles={},this.tabs[e].results.watchlist=[]},async start(e){this.reset(e);const t=wt(),n=this.tabs[e].form.paper_mode?"":this.tabs[e].form.exchange_api_key_id,r=this.tabs[e].form.exchange,s=this.tabs[e].form.notification_api_key_id?this.tabs[e].form.notification_api_key_id:"";this.tabs[e].results.selectedRoute=this.tabs[e].form.routes[0];const{data:i,error:l}=await jt("/live",{id:e,exchange:r,exchange_api_key_id:n,notification_api_key_id:s,routes:this.tabs[e].form.routes,data_routes:this.tabs[e].form.data_routes,config:t.settings.live,debug_mode:this.tabs[e].form.debug_mode,paper_mode:this.tabs[e].form.paper_mode},!0);if(l.value&&l.value.statusCode!==200){Ve("error",l.value.data.message);return}},async cancel(e){const{data:t,error:n}=await jt("/cancel-live",{id:e,paper_mode:this.tabs[e].form.paper_mode},!0);if(n.value&&n.value.statusCode!==200){Ve("error",n.value.data.message);return}this.tabs[e].results.booting=!1},async stop(e){const{data:t,error:n}=await jt("/cancel-live",{id:e,paper_mode:this.tabs[e].form.paper_mode},!0);if(n.value&&n.value.statusCode!==200){Ve("error",n.value.data.message);return}this.tabs[e].results.terminating=!0},newLive(e){this.tabs[e].results.monitoring=!1,this.tabs[e].results.finished=!1},candlesInfoEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=rn(e)),this.tabs[e].results.info=[["Period",t.duration],["Starting-Ending Date",`${It.timestampToDate(t.starting_time)} => ${It.timestampToDate(t.finishing_time)}`]]},routesInfoEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=rn(e));const n=[];t.forEach(r=>{n.push([{value:r.symbol,style:""},{value:r.timeframe,style:""},{value:r.strategy_name,style:""}])}),this.tabs[e].results.routes_info=n},progressbarEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=rn(e)),this.tabs[e].results.progressbar=t},infoLogEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=rn(e)),this.tabs[e].results.infoLogs+=`[${It.timestampToTime(t.timestamp)}] ${t.message} `},errorLogEvent(e,t){this.tabs[e]===void 0&&(this.tabs[e]=rn(e)),Ve("error",t.message),this.tabs[e].results.errorLogs+=`[${It.timestampToTime(t.timestamp)}] ${t.message} @@ -76,4 +76,4 @@ function print() { __p += __j.call(arguments, '') } `));let v=d_((l=g.props)!=null?l:{},c,d),_=Rr(g,v,!0);for(let x in v)x.startsWith("on")&&(_.props||(_.props={}),_.props[x]=v[x]);return _}return Array.isArray(p)&&p.length===1?p[0]:p}return Xe(u,Object.assign({},c,d),{default:()=>p})}function f_(e){return e.flatMap(t=>t.type===Ye?f_(t.children):[t])}function d_(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let s in r)s.startsWith("on")&&typeof r[s]=="function"?(n[s]!=null||(n[s]=[]),n[s].push(r[s])):t[s]=r[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](s,...i){let l=n[r];for(let u of l){if(s instanceof Event&&s.defaultPrevented)return;u(s,...i)}}});return t}function p_(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Ou(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function m8(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ti=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ti||{});let la=we({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var r;let{features:s,...i}=e,l={"aria-hidden":(s&2)===2?!0:(r=i["aria-hidden"])!=null?r:void 0,hidden:(s&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(s&4)===4&&(s&2)!==2&&{display:"none"}}};return Kt({ourProps:l,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),h_=Symbol("Context");var Ut=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ut||{});function v8(){return ka()!==null}function ka(){return Ke(h_,null)}function Fp(e){bt(h_,e)}var dt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(dt||{});function y8(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let rs=[];y8(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&rs[0]!==t.target&&(rs.unshift(t.target),rs=rs.filter(n=>n!=null&&n.isConnected),rs.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function b8(e){throw new Error("Unexpected object: "+e)}var Un=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Un||{});function _8(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),s=r??-1;switch(e.focus){case 0:{for(let i=0;i=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 2:{for(let i=s+1;i=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return r}case 4:{for(let i=0;isetTimeout(()=>{throw t}))}function Sa(){let e=[],t={addEventListener(n,r,s,i){return n.addEventListener(r,s,i),t.add(()=>n.removeEventListener(r,s,i))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return Dp(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,s){let i=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:s}),this.add(()=>{Object.assign(n.style,{[r]:i})})},group(n){let r=Sa();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let s of e.splice(r,1))s()}},dispose(){for(let n of e.splice(0))n()}};return t}function g_(e={},t=null,n=[]){for(let[r,s]of Object.entries(e))v_(n,m_(t,r),s);return n}function m_(e,t){return e?e+"["+t+"]":t}function v_(e,t,n){if(Array.isArray(n))for(let[r,s]of n.entries())v_(e,m_(t,r.toString()),s);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):g_(n,t,e)}function y_(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let s of r.elements)if(s!==e&&(s.tagName==="INPUT"&&s.type==="submit"||s.tagName==="BUTTON"&&s.type==="submit"||s.nodeName==="INPUT"&&s.type==="image")){s.click();return}(n=r.requestSubmit)==null||n.call(r)}}function b_(e,t,n,r){xa.isServer||Xt(s=>{e=e??window,e.addEventListener(t,n,r),s(()=>e.removeEventListener(t,n,r))})}var Ni=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ni||{});function w8(){let e=te(0);return l_("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function __(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let r=Be(n);r instanceof HTMLElement&&t.add(r)}return t}var w_=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(w_||{});let Li=Object.assign(we({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:te(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let s=te(null);r({el:s,$el:s});let i=F(()=>gr(s)),l=te(!1);ct(()=>l.value=!0),Ht(()=>l.value=!1),k8({ownerDocument:i},F(()=>l.value&&!!(e.features&16)));let u=S8({ownerDocument:i,container:s,initialFocus:F(()=>e.initialFocus)},F(()=>l.value&&!!(e.features&2)));C8({ownerDocument:i,container:s,containers:e.containers,previousActiveElement:u},F(()=>l.value&&!!(e.features&8)));let c=w8();function p(v){let _=Be(s);_&&(x=>x())(()=>{zn(c.value,{[Ni.Forwards]:()=>{fs(_,An.First,{skipElements:[v.relatedTarget]})},[Ni.Backwards]:()=>{fs(_,An.Last,{skipElements:[v.relatedTarget]})}})})}let d=te(!1);function g(v){v.key==="Tab"&&(d.value=!0,requestAnimationFrame(()=>{d.value=!1}))}function h(v){if(!l.value)return;let _=__(e.containers);Be(s)instanceof HTMLElement&&_.add(Be(s));let x=v.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(x_(_,x)||(d.value?fs(Be(s),zn(c.value,{[Ni.Forwards]:()=>An.Next,[Ni.Backwards]:()=>An.Previous})|An.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&Ro(v.target)))}return()=>{let v={},_={ref:s,onKeydown:g,onFocusout:h},{features:x,initialFocus:b,containers:E,...C}=e;return Xe(Ye,[!!(x&4)&&Xe(la,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:ti.Focusable}),Kt({ourProps:_,theirProps:{...t,...C},slot:v,attrs:t,slots:n,name:"FocusTrap"}),!!(x&4)&&Xe(la,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:ti.Focusable})])}}}),{features:w_});function x8(e){let t=te(rs.slice());return gt([e],([n],[r])=>{r===!0&&n===!1?Dp(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=rs.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(r=>r!=null&&r.isConnected))!=null?n:null}}function k8({ownerDocument:e},t){let n=x8(t);ct(()=>{Xt(()=>{var r,s;t.value||((r=e.value)==null?void 0:r.activeElement)===((s=e.value)==null?void 0:s.body)&&Ro(n())},{flush:"post"})}),Ht(()=>{t.value&&Ro(n())})}function S8({ownerDocument:e,container:t,initialFocus:n},r){let s=te(null),i=te(!1);return ct(()=>i.value=!0),Ht(()=>i.value=!1),ct(()=>{gt([t,n,r],(l,u)=>{if(l.every((p,d)=>(u==null?void 0:u[d])===p)||!r.value)return;let c=Be(t);c&&Dp(()=>{var p,d;if(!i.value)return;let g=Be(n),h=(p=e.value)==null?void 0:p.activeElement;if(g){if(g===h){s.value=h;return}}else if(c.contains(h)){s.value=h;return}g?Ro(g):fs(c,An.First|An.NoScroll)===cu.Error&&console.warn("There are no focusable elements inside the "),s.value=(d=e.value)==null?void 0:d.activeElement})},{immediate:!0,flush:"post"})}),s}function C8({ownerDocument:e,container:t,containers:n,previousActiveElement:r},s){var i;b_((i=e.value)==null?void 0:i.defaultView,"focus",l=>{if(!s.value)return;let u=__(n);Be(t)instanceof HTMLElement&&u.add(Be(t));let c=r.value;if(!c)return;let p=l.target;p&&p instanceof HTMLElement?x_(u,p)?(r.value=p,Ro(p)):(l.preventDefault(),l.stopPropagation(),Ro(c)):Ro(r.value)},!0)}function x_(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function E8(e){let t=Ir(e.getSnapshot());return Ht(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function T8(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(s){return r.add(s),()=>r.delete(s)},dispatch(s,...i){let l=t[s].call(n,...i);l&&(n=l,r.forEach(u=>u()))}}}function $8(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,s=r.clientWidth-r.offsetWidth,i=e-s;n.style(r,"paddingRight",`${i}px`)}}}function A8(){return a_()?{before({doc:e,d:t,meta:n}){function r(s){return n.containers.flatMap(i=>i()).some(i=>i.contains(s))}t.microTask(()=>{var s;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let u=Sa();u.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>u.dispose()))}let i=(s=window.scrollY)!=null?s:window.pageYOffset,l=null;t.addEventListener(e,"click",u=>{if(u.target instanceof HTMLElement)try{let c=u.target.closest("a");if(!c)return;let{hash:p}=new URL(c.href),d=e.querySelector(p);d&&!r(d)&&(l=d)}catch{}},!0),t.addEventListener(e,"touchstart",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let c=u.target;for(;c.parentElement&&r(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(u.target,"touchAction","none")}),t.addEventListener(e,"touchmove",u=>{if(u.target instanceof HTMLElement)if(r(u.target)){let c=u.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()},{passive:!1}),t.add(()=>{var u;let c=(u=window.scrollY)!=null?u:window.pageYOffset;i!==c&&window.scrollTo(0,i),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function I8(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function R8(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let is=T8(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:Sa(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:R8(n)},s=[A8(),$8(),I8()];s.forEach(({before:i})=>i==null?void 0:i(r)),s.forEach(({after:i})=>i==null?void 0:i(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});is.subscribe(()=>{let e=is.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",s=n.count!==0;(s&&!r||!s&&r)&&is.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&is.dispatch("TEARDOWN",n)}});function O8(e,t,n){let r=E8(is),s=F(()=>{let i=e.value?r.value.get(e.value):void 0;return i?i.count>0:!1});return gt([e,t],([i,l],[u],c)=>{if(!i||!l)return;is.dispatch("PUSH",i,n);let p=!1;c(()=>{p||(is.dispatch("POP",u??i,n),p=!0)})},{immediate:!0}),s}let $f=new Map,Mi=new Map;function zv(e,t=te(!0)){Xt(n=>{var r;if(!t.value)return;let s=Be(e);if(!s)return;n(function(){var l;if(!s)return;let u=(l=Mi.get(s))!=null?l:1;if(u===1?Mi.delete(s):Mi.set(s,u-1),u!==1)return;let c=$f.get(s);c&&(c["aria-hidden"]===null?s.removeAttribute("aria-hidden"):s.setAttribute("aria-hidden",c["aria-hidden"]),s.inert=c.inert,$f.delete(s))});let i=(r=Mi.get(s))!=null?r:0;Mi.set(s,i+1),i===0&&($f.set(s,{"aria-hidden":s.getAttribute("aria-hidden"),inert:s.inert}),s.setAttribute("aria-hidden","true"),s.inert=!0)})}function P8({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let r=te(null),s=gr(r);function i(){var l,u,c;let p=[];for(let d of e)d!==null&&(d instanceof HTMLElement?p.push(d):"value"in d&&d.value instanceof HTMLElement&&p.push(d.value));if(t!=null&&t.value)for(let d of t.value)p.push(d);for(let d of(l=s==null?void 0:s.querySelectorAll("html > *, body > *"))!=null?l:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(Be(r))||d.contains((c=(u=Be(r))==null?void 0:u.getRootNode())==null?void 0:c.host)||p.some(g=>d.contains(g))||p.push(d));return p}return{resolveContainers:i,contains(l){return i().some(u=>u.contains(l))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:Xe(la,{features:ti.Hidden,ref:r})}}}let k_=Symbol("ForcePortalRootContext");function L8(){return Ke(k_,!1)}let Wv=we({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return bt(k_,e.force),()=>{let{force:r,...s}=e;return Kt({theirProps:s,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),S_=Symbol("StackContext");var Rd=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(Rd||{});function M8(){return Ke(S_,()=>{})}function B8({type:e,enabled:t,element:n,onUpdate:r}){let s=M8();function i(...l){r==null||r(...l),s(...l)}ct(()=>{gt(t,(l,u)=>{l?i(0,e,n):u===!0&&i(1,e,n)},{immediate:!0,flush:"sync"})}),Ht(()=>{t.value&&i(1,e,n)}),bt(S_,i)}let F8=Symbol("DescriptionContext");function Vp({slot:e=te({}),name:t="Description",props:n={}}={}){let r=te([]);function s(i){return r.value.push(i),()=>{let l=r.value.indexOf(i);l!==-1&&r.value.splice(l,1)}}return bt(F8,{register:s,slot:e,name:t,props:n}),F(()=>r.value.length>0?r.value.join(" "):void 0)}function D8(e){let t=gr(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}let V8=we({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=te(null),s=F(()=>gr(r)),i=L8(),l=Ke(C_,null),u=te(i===!0||l==null?D8(r.value):l.resolveTarget()),c=te(!1);ct(()=>{c.value=!0}),Xt(()=>{i||l!=null&&(u.value=l.resolveTarget())});let p=Ke(Od,null),d=!1,g=ir();return gt(r,()=>{if(d||!p)return;let h=Be(r);h&&(Ht(p.register(h),g),d=!0)}),Ht(()=>{var h,v;let _=(h=s.value)==null?void 0:h.getElementById("headlessui-portal-root");_&&u.value===_&&u.value.children.length<=0&&((v=u.value.parentElement)==null||v.removeChild(u.value))}),()=>{if(!c.value||u.value===null)return null;let h={ref:r,"data-headlessui-portal":""};return Xe(nb,{to:u.value},Kt({ourProps:h,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Od=Symbol("PortalParentContext");function N8(){let e=Ke(Od,null),t=te([]);function n(i){return t.value.push(i),e&&e.register(i),()=>r(i)}function r(i){let l=t.value.indexOf(i);l!==-1&&t.value.splice(l,1),e&&e.unregister(i)}let s={register:n,unregister:r,portals:t};return[t,we({name:"PortalWrapper",setup(i,{slots:l}){return bt(Od,s),()=>{var u;return(u=l.default)==null?void 0:u.call(l)}}})]}let C_=Symbol("PortalGroupContext"),j8=we({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=_n({resolveTarget(){return e.target}});return bt(C_,r),()=>{let{target:s,...i}=e;return Kt({theirProps:i,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var U8=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(U8||{});let Pd=Symbol("DialogContext");function E_(e){let t=Ke(Pd,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,E_),n}return t}let Ol="DC8F892D-2EBD-447C-A4C8-A03058436FF4",T_=we({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Ol},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:s}){var i,l;let u=(i=e.id)!=null?i:`headlessui-dialog-${sr()}`,c=te(!1);ct(()=>{c.value=!0});let p=!1,d=F(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(p||(p=!0,console.warn(`Invalid role [${d}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),g=te(0),h=ka(),v=F(()=>e.open===Ol&&h!==null?(h.value&Ut.Open)===Ut.Open:e.open),_=te(null),x=F(()=>gr(_));if(s({el:_,$el:_}),!(e.open!==Ol||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof v.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value===Ol?void 0:e.open}`);let b=F(()=>c.value&&v.value?0:1),E=F(()=>b.value===0),C=F(()=>g.value>1),S=Ke(Pd,null)!==null,[A,B]=N8(),{resolveContainers:L,mainTreeNodeRef:U,MainTreeNode:j}=P8({portals:A,defaultContainers:[F(()=>{var Re;return(Re=Se.panelRef.value)!=null?Re:_.value})]}),q=F(()=>C.value?"parent":"leaf"),K=F(()=>h!==null?(h.value&Ut.Closing)===Ut.Closing:!1),Y=F(()=>S||K.value?!1:E.value),z=F(()=>{var Re,je,Ft;return(Ft=Array.from((je=(Re=x.value)==null?void 0:Re.querySelectorAll("body > *"))!=null?je:[]).find(Dt=>Dt.id==="headlessui-portal-root"?!1:Dt.contains(Be(U))&&Dt instanceof HTMLElement))!=null?Ft:null});zv(z,Y);let be=F(()=>C.value?!0:E.value),ce=F(()=>{var Re,je,Ft;return(Ft=Array.from((je=(Re=x.value)==null?void 0:Re.querySelectorAll("[data-headlessui-portal]"))!=null?je:[]).find(Dt=>Dt.contains(Be(U))&&Dt instanceof HTMLElement))!=null?Ft:null});zv(ce,be),B8({type:"Dialog",enabled:F(()=>b.value===0),element:_,onUpdate:(Re,je)=>{if(je==="Dialog")return zn(Re,{[Rd.Add]:()=>g.value+=1,[Rd.Remove]:()=>g.value-=1})}});let ke=Vp({name:"DialogDescription",slot:F(()=>({open:v.value}))}),ie=te(null),Se={titleId:ie,panelRef:te(null),dialogState:b,setTitleId(Re){ie.value!==Re&&(ie.value=Re)},close(){t("close",!1)}};bt(Pd,Se);let ve=F(()=>!(!E.value||C.value));u_(L,(Re,je)=>{Re.preventDefault(),Se.close(),an(()=>je==null?void 0:je.focus())},ve);let Lt=F(()=>!(C.value||b.value!==0));b_((l=x.value)==null?void 0:l.defaultView,"keydown",Re=>{Lt.value&&(Re.defaultPrevented||Re.key===dt.Escape&&(Re.preventDefault(),Re.stopPropagation(),Se.close()))});let Gt=F(()=>!(K.value||b.value!==0||S));return O8(x,Gt,Re=>{var je;return{containers:[...(je=Re.containers)!=null?je:[],L]}}),Xt(Re=>{if(b.value!==0)return;let je=Be(_);if(!je)return;let Ft=new ResizeObserver(Dt=>{for(let fn of Dt){let St=fn.target.getBoundingClientRect();St.x===0&&St.y===0&&St.width===0&&St.height===0&&Se.close()}});Ft.observe(je),Re(()=>Ft.disconnect())}),()=>{let{open:Re,initialFocus:je,...Ft}=e,Dt={...n,ref:_,id:u,role:d.value,"aria-modal":b.value===0?!0:void 0,"aria-labelledby":ie.value,"aria-describedby":ke.value},fn={open:b.value===0};return Xe(Wv,{force:!0},()=>[Xe(V8,()=>Xe(j8,{target:_.value},()=>Xe(Wv,{force:!1},()=>Xe(Li,{initialFocus:je,containers:L,features:E.value?zn(q.value,{parent:Li.features.RestoreFocus,leaf:Li.features.All&~Li.features.FocusLock}):Li.features.None},()=>Xe(B,{},()=>Kt({ourProps:Dt,theirProps:{...Ft,...n},slot:fn,attrs:n,slots:r,visible:b.value===0,features:Oo.RenderStrategy|Oo.Static,name:"Dialog"})))))),Xe(j)])}}}),$_=we({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var s;let i=(s=e.id)!=null?s:`headlessui-dialog-panel-${sr()}`,l=E_("DialogPanel");r({el:l.panelRef,$el:l.panelRef});function u(c){c.stopPropagation()}return()=>{let{...c}=e,p={id:i,ref:l.panelRef,onClick:u};return Kt({ourProps:p,theirProps:c,slot:{open:l.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}});var H8=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(H8||{});let A_=Symbol("DisclosureContext");function Np(e){let t=Ke(A_,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Np),n}return t}let I_=Symbol("DisclosurePanelContext");function z8(){return Ke(I_,null)}let W8=we({name:"Disclosure",props:{as:{type:[Object,String],default:"template"},defaultOpen:{type:[Boolean],default:!1}},setup(e,{slots:t,attrs:n}){let r=te(e.defaultOpen?0:1),s=te(null),i=te(null),l={buttonId:te(`headlessui-disclosure-button-${sr()}`),panelId:te(`headlessui-disclosure-panel-${sr()}`),disclosureState:r,panel:s,button:i,toggleDisclosure(){r.value=zn(r.value,{0:1,1:0})},closeDisclosure(){r.value!==1&&(r.value=1)},close(u){l.closeDisclosure();let c=u?u instanceof HTMLElement?u:u.value instanceof HTMLElement?Be(u):Be(l.button):Be(l.button);c==null||c.focus()}};return bt(A_,l),Fp(F(()=>zn(r.value,{0:Ut.Open,1:Ut.Closed}))),()=>{let{defaultOpen:u,...c}=e,p={open:r.value===0,close:l.close};return Kt({theirProps:c,ourProps:{},slot:p,slots:t,attrs:n,name:"Disclosure"})}}}),q8=we({name:"DisclosureButton",props:{as:{type:[Object,String],default:"button"},disabled:{type:[Boolean],default:!1},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let s=Np("DisclosureButton"),i=z8(),l=F(()=>i===null?!1:i.value===s.panelId.value);ct(()=>{l.value||e.id!==null&&(s.buttonId.value=e.id)}),Ht(()=>{l.value||(s.buttonId.value=null)});let u=te(null);r({el:u,$el:u}),l.value||Xt(()=>{s.button.value=u.value});let c=Bp(F(()=>({as:e.as,type:t.type})),u);function p(){var h;e.disabled||(l.value?(s.toggleDisclosure(),(h=Be(s.button))==null||h.focus()):s.toggleDisclosure())}function d(h){var v;if(!e.disabled)if(l.value)switch(h.key){case dt.Space:case dt.Enter:h.preventDefault(),h.stopPropagation(),s.toggleDisclosure(),(v=Be(s.button))==null||v.focus();break}else switch(h.key){case dt.Space:case dt.Enter:h.preventDefault(),h.stopPropagation(),s.toggleDisclosure();break}}function g(h){switch(h.key){case dt.Space:h.preventDefault();break}}return()=>{var h;let v={open:s.disclosureState.value===0},{id:_,...x}=e,b=l.value?{ref:u,type:c.value,onClick:p,onKeydown:d}:{id:(h=s.buttonId.value)!=null?h:_,ref:u,type:c.value,"aria-expanded":s.disclosureState.value===0,"aria-controls":s.disclosureState.value===0||Be(s.panel)?s.panelId.value:void 0,disabled:e.disabled?!0:void 0,onClick:p,onKeydown:d,onKeyup:g};return Kt({ourProps:b,theirProps:x,slot:v,attrs:t,slots:n,name:"DisclosureButton"})}}}),K8=we({name:"DisclosurePanel",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){let s=Np("DisclosurePanel");ct(()=>{e.id!==null&&(s.panelId.value=e.id)}),Ht(()=>{s.panelId.value=null}),r({el:s.panel,$el:s.panel}),bt(I_,s.panelId);let i=ka(),l=F(()=>i!==null?(i.value&Ut.Open)===Ut.Open:s.disclosureState.value===0);return()=>{var u;let c={open:s.disclosureState.value===0,close:s.close},{id:p,...d}=e,g={id:(u=s.panelId.value)!=null?u:p,ref:s.panel};return Kt({ourProps:g,theirProps:d,slot:c,attrs:t,slots:n,features:Oo.RenderStrategy|Oo.Static,visible:l.value,name:"DisclosurePanel"})}}}),qv=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Kv(e){var t,n;let r=(t=e.innerText)!=null?t:"",s=e.cloneNode(!0);if(!(s instanceof HTMLElement))return r;let i=!1;for(let u of s.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))u.remove(),i=!0;let l=i?(n=s.innerText)!=null?n:"":r;return qv.test(l)&&(l=l.replace(qv,"")),l}function G8(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(s=>{let i=document.getElementById(s);if(i){let l=i.getAttribute("aria-label");return typeof l=="string"?l.trim():Kv(i).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Kv(e).trim()}function J8(e){let t=te(""),n=te("");return()=>{let r=Be(e);if(!r)return"";let s=r.innerText;if(t.value===s)return n.value;let i=G8(r).trim().toLowerCase();return t.value=s,n.value=i,i}}var Z8=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Z8||{}),Y8=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Y8||{});function Q8(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let R_=Symbol("MenuContext");function Pu(e){let t=Ke(R_,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pu),n}return t}let X8=we({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let r=te(1),s=te(null),i=te(null),l=te([]),u=te(""),c=te(null),p=te(1);function d(h=v=>v){let v=c.value!==null?l.value[c.value]:null,_=Mp(h(l.value.slice()),b=>Be(b.dataRef.domRef)),x=v?_.indexOf(v):null;return x===-1&&(x=null),{items:_,activeItemIndex:x}}let g={menuState:r,buttonRef:s,itemsRef:i,items:l,searchQuery:u,activeItemIndex:c,activationTrigger:p,closeMenu:()=>{r.value=1,c.value=null},openMenu:()=>r.value=0,goToItem(h,v,_){let x=d(),b=_8(h===Un.Specific?{focus:Un.Specific,id:v}:{focus:h},{resolveItems:()=>x.items,resolveActiveIndex:()=>x.activeItemIndex,resolveId:E=>E.id,resolveDisabled:E=>E.dataRef.disabled});u.value="",c.value=b,p.value=_??1,l.value=x.items},search(h){let v=u.value!==""?0:1;u.value+=h.toLowerCase();let _=(c.value!==null?l.value.slice(c.value+v).concat(l.value.slice(0,c.value+v)):l.value).find(b=>b.dataRef.textValue.startsWith(u.value)&&!b.dataRef.disabled),x=_?l.value.indexOf(_):-1;x===-1||x===c.value||(c.value=x,p.value=1)},clearSearch(){u.value=""},registerItem(h,v){let _=d(x=>[...x,{id:h,dataRef:v}]);l.value=_.items,c.value=_.activeItemIndex,p.value=1},unregisterItem(h){let v=d(_=>{let x=_.findIndex(b=>b.id===h);return x!==-1&&_.splice(x,1),_});l.value=v.items,c.value=v.activeItemIndex,p.value=1}};return u_([s,i],(h,v)=>{var _;g.closeMenu(),Lp(v,Pp.Loose)||(h.preventDefault(),(_=Be(s))==null||_.focus())},F(()=>r.value===0)),bt(R_,g),Fp(F(()=>zn(r.value,{0:Ut.Open,1:Ut.Closed}))),()=>{let h={open:r.value===0,close:g.closeMenu};return Kt({ourProps:{},theirProps:e,slot:h,slots:t,attrs:n,name:"Menu"})}}}),e7=we({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var s;let i=(s=e.id)!=null?s:`headlessui-menu-button-${sr()}`,l=Pu("MenuButton");r({el:l.buttonRef,$el:l.buttonRef});function u(g){switch(g.key){case dt.Space:case dt.Enter:case dt.ArrowDown:g.preventDefault(),g.stopPropagation(),l.openMenu(),an(()=>{var h;(h=Be(l.itemsRef))==null||h.focus({preventScroll:!0}),l.goToItem(Un.First)});break;case dt.ArrowUp:g.preventDefault(),g.stopPropagation(),l.openMenu(),an(()=>{var h;(h=Be(l.itemsRef))==null||h.focus({preventScroll:!0}),l.goToItem(Un.Last)});break}}function c(g){switch(g.key){case dt.Space:g.preventDefault();break}}function p(g){e.disabled||(l.menuState.value===0?(l.closeMenu(),an(()=>{var h;return(h=Be(l.buttonRef))==null?void 0:h.focus({preventScroll:!0})})):(g.preventDefault(),l.openMenu(),Q8(()=>{var h;return(h=Be(l.itemsRef))==null?void 0:h.focus({preventScroll:!0})})))}let d=Bp(F(()=>({as:e.as,type:t.type})),l.buttonRef);return()=>{var g;let h={open:l.menuState.value===0},{...v}=e,_={ref:l.buttonRef,id:i,type:d.value,"aria-haspopup":"menu","aria-controls":(g=Be(l.itemsRef))==null?void 0:g.id,"aria-expanded":l.menuState.value===0,onKeydown:u,onKeyup:c,onClick:p};return Kt({ourProps:_,theirProps:v,slot:h,attrs:t,slots:n,name:"MenuButton"})}}}),t7=we({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var s;let i=(s=e.id)!=null?s:`headlessui-menu-items-${sr()}`,l=Pu("MenuItems"),u=te(null);r({el:l.itemsRef,$el:l.itemsRef}),c_({container:F(()=>Be(l.itemsRef)),enabled:F(()=>l.menuState.value===0),accept(h){return h.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:h.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(h){h.setAttribute("role","none")}});function c(h){var v;switch(u.value&&clearTimeout(u.value),h.key){case dt.Space:if(l.searchQuery.value!=="")return h.preventDefault(),h.stopPropagation(),l.search(h.key);case dt.Enter:if(h.preventDefault(),h.stopPropagation(),l.activeItemIndex.value!==null){let _=l.items.value[l.activeItemIndex.value];(v=Be(_.dataRef.domRef))==null||v.click()}l.closeMenu(),i_(Be(l.buttonRef));break;case dt.ArrowDown:return h.preventDefault(),h.stopPropagation(),l.goToItem(Un.Next);case dt.ArrowUp:return h.preventDefault(),h.stopPropagation(),l.goToItem(Un.Previous);case dt.Home:case dt.PageUp:return h.preventDefault(),h.stopPropagation(),l.goToItem(Un.First);case dt.End:case dt.PageDown:return h.preventDefault(),h.stopPropagation(),l.goToItem(Un.Last);case dt.Escape:h.preventDefault(),h.stopPropagation(),l.closeMenu(),an(()=>{var _;return(_=Be(l.buttonRef))==null?void 0:_.focus({preventScroll:!0})});break;case dt.Tab:h.preventDefault(),h.stopPropagation(),l.closeMenu(),an(()=>d8(Be(l.buttonRef),h.shiftKey?An.Previous:An.Next));break;default:h.key.length===1&&(l.search(h.key),u.value=setTimeout(()=>l.clearSearch(),350));break}}function p(h){switch(h.key){case dt.Space:h.preventDefault();break}}let d=ka(),g=F(()=>d!==null?(d.value&Ut.Open)===Ut.Open:l.menuState.value===0);return()=>{var h,v;let _={open:l.menuState.value===0},{...x}=e,b={"aria-activedescendant":l.activeItemIndex.value===null||(h=l.items.value[l.activeItemIndex.value])==null?void 0:h.id,"aria-labelledby":(v=Be(l.buttonRef))==null?void 0:v.id,id:i,onKeydown:c,onKeyup:p,role:"menu",tabIndex:0,ref:l.itemsRef};return Kt({ourProps:b,theirProps:x,slot:_,attrs:t,slots:n,features:Oo.RenderStrategy|Oo.Static,visible:g.value,name:"MenuItems"})}}}),xr=we({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(e,{slots:t,attrs:n,expose:r}){var s;let i=(s=e.id)!=null?s:`headlessui-menu-item-${sr()}`,l=Pu("MenuItem"),u=te(null);r({el:u,$el:u});let c=F(()=>l.activeItemIndex.value!==null?l.items.value[l.activeItemIndex.value].id===i:!1),p=J8(u),d=F(()=>({disabled:e.disabled,get textValue(){return p()},domRef:u}));ct(()=>l.registerItem(i,d)),Ht(()=>l.unregisterItem(i)),Xt(()=>{l.menuState.value===0&&c.value&&l.activationTrigger.value!==0&&an(()=>{var E,C;return(C=(E=Be(u))==null?void 0:E.scrollIntoView)==null?void 0:C.call(E,{block:"nearest"})})});function g(E){if(e.disabled)return E.preventDefault();l.closeMenu(),i_(Be(l.buttonRef))}function h(){if(e.disabled)return l.goToItem(Un.Nothing);l.goToItem(Un.Specific,i)}let v=g8();function _(E){v.update(E)}function x(E){v.wasMoved(E)&&(e.disabled||c.value||l.goToItem(Un.Specific,i,0))}function b(E){v.wasMoved(E)&&(e.disabled||c.value&&l.goToItem(Un.Nothing))}return()=>{let{disabled:E,...C}=e,S={active:c.value,disabled:E,close:l.closeMenu};return Kt({ourProps:{id:i,ref:u,role:"menuitem",tabIndex:E===!0?void 0:-1,"aria-disabled":E===!0?!0:void 0,onClick:g,onFocus:h,onPointerenter:_,onMouseenter:_,onPointermove:x,onMousemove:x,onPointerleave:b,onMouseleave:b},theirProps:{...n,...C},slot:S,attrs:n,slots:t,name:"MenuItem"})}}}),O_=Symbol("LabelContext");function P_(){let e=Ke(O_,null);if(e===null){let t=new Error("You used a