+js_content = '''var Fr=Object.defineProperty;var Jr=(o,e,n)=>e in o?Fr(o,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[e]=n;var bn=(o,e,n)=>(Jr(o,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))t(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&t(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function t(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function K(){}function Yr(o,e){for(const n in e)o[n]=e[n];return o}function Pr(o){return o()}function zn(){return Object.create(null)}function gt(o){o.forEach(Pr)}function Mt(o){return typeof o=="function"}function ye(o,e){return o!=o?e==e:o!==e||o&&typeof o=="object"||typeof o=="function"}function Kr(o){return Object.keys(o).length===0}function qr(o,...e){if(o==null){for(const t of e)t(void 0);return K}const n=o.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function pt(o){let e;return qr(o,n=>e=n)(),e}function et(o,e,n){o.$$.on_destroy.push(qr(e,n))}function rn(o,e,n,t){if(o){const r=Ar(o,e,n,t);return o[0](r)}}function Ar(o,e,n,t){return o[1]&&t?Yr(n.ctx.slice(),o[1](t(e))):n.ctx}function on(o,e,n,t){if(o[2]&&t){const r=o[2](t(n));if(e.dirty===void 0)return r;if(typeof r=="object"){const i=[],s=Math.max(e.dirty.length,r.length);for(let a=0;a32){const e=[],n=o.ctx.length/32;for(let t=0;to.removeEventListener(e,n,t)}function g(o,e,n){n==null?o.removeAttribute(e):o.getAttribute(e)!==n&&o.setAttribute(e,n)}function Xr(o){let e;return{p(...n){e=n,e.forEach(t=>o.push(t))},r(){e.forEach(n=>o.splice(o.indexOf(n),1))}}}function eo(o){return Array.from(o.childNodes)}function Ne(o,e){e=""+e,o.data!==e&&(o.data=e)}function mt(o,e){o.value=e??""}function en(o,e,n,t){n==null?o.style.removeProperty(e):o.style.setProperty(e,n,t?"important":"")}let Ut;function Gt(o){Ut=o}function to(){if(!Ut)throw new Error("Function called outside component initialization");return Ut}function Mr(o){to().$$.on_mount.push(o)}const At=[],_n=[];let Dt=[];const wn=[],no=Promise.resolve();let $n=!1;function ro(){$n||($n=!0,no.then(Dr))}function kn(o){Dt.push(o)}function oo(o){wn.push(o)}const vn=new Set;let Pt=0;function Dr(){if(Pt!==0)return;const o=Ut;do{try{for(;Pto.indexOf(t)===-1?e.push(t):n.push(t)),n.forEach(t=>t()),Dt=e}const tn=new Set;let xt;function je(){xt={r:0,c:[],p:xt}}function Pe(){xt.r||gt(xt.c),xt=xt.p}function L(o,e){o&&o.i&&(tn.delete(o),o.i(e))}function M(o,e,n,t){if(o&&o.o){if(tn.has(o))return;tn.add(o),xt.c.push(()=>{tn.delete(o),t&&(n&&o.d(1),t())}),o.o(e)}else t&&t()}function xe(o){return(o==null?void 0:o.length)!==void 0?o:Array.from(o)}function lo(o,e,n){const t=o.$$.props[e];t!==void 0&&(o.$$.bound[t]=n,n(o.$$.ctx[t]))}function Q(o){o&&o.c()}function Z(o,e,n){const{fragment:t,after_update:r}=o.$$;t&&t.m(e,n),kn(()=>{const i=o.$$.on_mount.map(Pr).filter(Mt);o.$$.on_destroy?o.$$.on_destroy.push(...i):gt(i),o.$$.on_mount=[]}),r.forEach(kn)}function U(o,e){const n=o.$$;n.fragment!==null&&(so(n.after_update),gt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ao(o,e){o.$$.dirty[0]===-1&&(At.push(o),ro(),o.$$.dirty.fill(0)),o.$$.dirty[e/31|0]|=1<{const A=S.length?S[0]:C;return l.ctx&&r(l.ctx[y],l.ctx[y]=A)&&(!l.skip_bound&&l.bound[y]&&l.bound[y](A),p&&ao(o,y)),C}):[],l.update(),p=!0,gt(l.before_update),l.fragment=t?t(l.ctx):!1,e.target){if(e.hydrate){const y=eo(e.target);l.fragment&&l.fragment.l(y),y.forEach(B)}else l.fragment&&l.fragment.c();e.intro&&L(o.$$.fragment),Z(o,e.target,e.anchor),Dr()}Gt(c)}class we{constructor(){bn(this,"$$");bn(this,"$$set")}$destroy(){U(this,1),this.$destroy=K}$on(e,n){if(!Mt(n))return K;const t=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return t.push(n),()=>{const r=t.indexOf(n);r!==-1&&t.splice(r,1)}}$set(e){this.$$set&&!Kr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const co="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(co);function Vn(o,e,n){const t=o.slice();return t[4]=e[n],t[6]=n,t}function Gn(o){let e;return{c(){e=O("span"),e.innerHTML="",g(e,"class","inline")},m(n,t){N(n,e,t)},d(n){n&&B(e)}}}function Zn(o){let e,n=o[4]+"",t,r,i,s,a=o[6]{i{"text"in a&&n(2,t=a.text)},[i,r,t]}class po extends we{constructor(e){super(),_e(this,e,fo,uo,ye,{text:2})}}const qt=[];function lt(o,e=K){let n;const t=new Set;function r(a){if(ye(o,a)&&(o=a,n)){const c=!qt.length;for(const l of t)l[1](),qt.push(l,o);if(c){for(let l=0;l{t.delete(l),t.size===0&&n&&(n(),n=null)}}return{set:r,update:i,subscribe:s}}let Rt=lt(""),Ht=lt([]),xn=lt(null),an=lt(null),cn=lt(!1),Zt=lt(!1),Wt=lt("chat"),Sn=lt([]),Qt=lt(""),Rr=lt(!1),St=lt({logo:"",title:"Welcome to Vanna.AI",subtitle:"Loading...",show_training_data:!0,suggested_questions:!0,sql:!0,table:!0,csv_download:!0,chart:!0,redraw_chart:!0,auto_fix_sql:!0,ask_results_correct:!0,followup_questions:!0,summarization:!0});function un(){Ht.set([]),cn.set(!1),Zt.set(!1)}async function On(o){un();let e=pt(St);ue({type:"user_question",question:o}),cn.set(!0);const n=await Se("generate_sql","GET",{question:o});if(ue(n),n.type!=="sql")return;window.location.hash=n.id,Rt.set(n.id),Qt.set(n.text);const t=await Se("run_sql","GET",{id:n.id});if(ue(t),t.type!=="df")return;const r=await Se("generate_plotly_figure","GET",{id:t.id});if(ue(r),r.type==="plotly_figure"){if(Sn.update(i=>[...i,{question:o,id:r.id}]),e.summarization){const i=await Se("generate_summary","GET",{id:r.id});ue(i)}ue({type:"feedback_question"}),ue({type:"feedback_buttons"})}}async function mo(o){let e=pt(St);if(ue(o),o.type!=="sql")return;window.location.hash=o.id,Rt.set(o.id),Qt.set(o.text);const n=await Se("run_sql","GET",{id:o.id});if(ue(n),n.type!=="df")return;const t=await Se("generate_plotly_figure","GET",{id:n.id});if(ue(t),t.type==="plotly_figure"){if(e.summarization){const r=await Se("generate_summary","GET",{id:t.id});ue(r)}ue({type:"feedback_question"}),ue({type:"feedback_buttons"})}}function go(o){ue({type:"user_question",question:"Re-run the SQL"}),Se("run_sql","GET",{id:o}).then(ue).then(e=>{e.type==="df"&&Se("generate_plotly_figure","GET",{id:e.id}).then(ue).then(n=>{n.type==="plotly_figure"&&Se("generate_followup_questions","GET",{id:n.id}).then(ue)})})}function ho(){Se("get_question_history","GET",[]).then($o)}function yo(){Se("get_config","GET",[]).then(wo)}function Hr(){window.location.hash="training-data",Wt.set("training-data"),Se("get_training_data","GET",[]).then(nn)}function Br(){window.location.hash="",Wt.set("chat"),un(),pt(xn)===null&&Se("generate_questions","GET",[]).then(_o)}function bo(o){window.location.hash=o,Wt.set("chat"),un(),cn.set(!0),Se("load_question","GET",{id:o}).then(ue)}function vo(o){an.set(null),Se("remove_training_data","POST",{id:o}).then(e=>{Se("get_training_data","GET",[]).then(nn)})}function ue(o){return Ht.update(e=>[...e,o]),xo(),o}function nn(o){return an.set(o),o.type==="df"&&JSON.parse(o.df).length===0&&Wt.set("no-training-data"),o}function _o(o){return xn.set(o),o}function wo(o){return o.type==="config"&&St.set(o.config),o}function $o(o){return o.type==="question_history"&&Sn.set(o.questions),o}function ko(o,e){an.set(null);let n={};n[e]=o,Se("train","POST",n).then(nn).then(t=>{t.type!=="error"&&Se("get_training_data","GET",[]).then(nn)})}async function Se(o,e,n){try{Zt.set(!0);let t="",r;if(e==="GET")t=Object.entries(n).filter(([s,a])=>s!=="endpoint"&&s!=="addMessage").map(([s,a])=>`${encodeURIComponent(s)}=${encodeURIComponent(a)}`).join("&"),r=await fetch(`/api/v0/${o}?${t}`);else{let s=JSON.stringify(n);r=await fetch(`/api/v0/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:s})}if(!r.ok)throw new Error("The server returned an error. See the server logs for more details.");const i=await r.json();return Zt.set(!1),i}catch(t){return Zt.set(!1),{type:"error",error:String(t)}}}function xo(){setTimeout(()=>{window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},100)}function So(){let o=pt(Ht),e=o.find(n=>n.type==="user_question");if(e&&e.type==="user_question"){let n=o.find(t=>t.type==="sql");if(n&&n.type==="sql")return{question:e.question,sql:n.text}}return null}function fn(o){Ht.update(e=>e.filter(n=>n.type!==o))}function Oo(o){Se("fix_sql","POST",{id:pt(Rt),error:o}).then(mo)}function Co(o){let n=pt(Ht).find(t=>t.type==="user_question");n&&n.type==="user_question"&&(Se("update_sql","POST",{id:pt(Rt),sql:o}).then(ue).then(t=>{t.type==="sql"&&(Qt.set(t.text),Se("run_sql","GET",{id:t.id}).then(ue).then(r=>{r.type==="df"?JSON.parse(r.df).length>1?Se("generate_plotly_figure","GET",{id:r.id}).then(ue).then(s=>{ue({type:"feedback_question"}),ue({type:"feedback_buttons"})}):(ue({type:"feedback_question"}),ue({type:"feedback_buttons"})):(ue({type:"feedback_question"}),ue({type:"feedback_buttons"}))}))}),fn("user_sql"))}function Lo(){ue({type:"chart_modification"})}function Eo(){fn("feedback_buttons"),ue({type:"feedback_correct"});let o=So();o&&(Se("train","POST",o),Se("generate_followup_questions","GET",{id:pt(Rt)}).then(ue))}function Un(){fn("feedback_buttons"),ue({type:"feedback_incorrect"}),ue({type:"user_sql"})}function To(o){fn("chart_modification"),ue({type:"user_question",question:"Update the chart with these instructions: "+o}),Se("generate_plotly_figure","GET",{id:pt(Rt),chart_instructions:o}).then(ue)}function Qn(o,e,n){const t=o.slice();return t[3]=e[n],t}function Wn(o){let e,n,t,r;return{c(){e=O("li"),n=O("button"),n.innerHTML=`
+ Training Data`,g(n,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border-t border-b border-gray-200 dark:border-gray-700 w-full")},m(i,s){N(i,e,s),_(e,n),t||(r=Le(n,"click",Hr),t=!0)},d(i){i&&B(e),t=!1,r()}}}function Fn(o){let e,n,t,r,i,s=o[3].question+"",a,c,l,p;function y(){return o[2](o[3])}return{c(){e=O("li"),n=O("button"),t=Ke("svg"),r=Ke("path"),i=F(),a=ge(s),c=F(),g(r,"stroke-linecap","round"),g(r,"stroke-linejoin","round"),g(r,"d","M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"),g(t,"class","w-3.5 h-3.5"),g(t,"fill","none"),g(t,"stroke","currentColor"),g(t,"stroke-width","1.5"),g(t,"viewBox","0 0 24 24"),g(t,"xmlns","http://www.w3.org/2000/svg"),g(t,"aria-hidden","true"),g(n,"class","flex items-center text-left gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300")},m(C,S){N(C,e,S),_(e,n),_(n,t),_(t,r),_(n,i),_(n,a),_(e,c),l||(p=Le(n,"click",y),l=!0)},p(C,S){o=C,S&2&&s!==(s=o[3].question+"")&&Ne(a,s)},d(C){C&&B(e),l=!1,p()}}}function jo(o){let e,n,t,r,i,s,a,c,l,p,y,C,S,A,E=o[0].show_training_data&&Wn(),b=xe(o[1]),d=[];for(let m=0;m ',r=F(),i=O("div"),s=O("ul"),E&&E.c(),a=F(),c=O("li"),l=O("button"),l.innerHTML=`
+ New question`,p=F();for(let m=0;m
Connected
`,v(t,"class","flex items-center justify-between py-4 pr-4 pl-7"),v(c,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300 border-t border-b border-gray-200 dark:border-gray-700 w-full"),v(g,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300"),v(s,"class","space-y-1.5 p-4"),v(i,"class","h-full"),v(D,"class","mt-auto"),v(n,"class","hs-accordion-group w-full h-full flex flex-col"),v(n,"data-hs-accordion-always-open",""),v(e,"id","application-sidebar"),v(e,"class","hs-overlay hs-overlay-open:translate-x-0 -translate-x-full transition-all duration-300 transform hidden fixed top-0 left-0 bottom-0 z-[60] w-64 bg-white border-r border-gray-200 overflow-y-auto scrollbar-y lg:block lg:translate-x-0 lg:right-auto lg:bottom-0 dark:scrollbar-y dark:bg-slate-900 dark:border-gray-700")},m(_,A){U(_,e,A),w(e,n),w(n,t),w(n,o),w(n,i),w(i,s),w(s,l),w(l,c),w(s,a),w(s,d),w(d,g),w(s,k);for(let P=0;P{i(c.id)};return r.$$set=c=>{"getTrainingData"in c&&n(0,t=c.getTrainingData),"newQuestionPage"in c&&n(1,o=c.newQuestionPage),"loadQuestionPage"in c&&n(2,i=c.loadQuestionPage),"questionHistory"in c&&n(3,s=c.questionHistory)},[t,o,i,s,l]}class Dr extends Se{constructor(e){super(),$e(this,e,Ar,qr,xe,{getTrainingData:0,newQuestionPage:1,loadQuestionPage:2,questionHistory:3})}}var Hr={exports:{}};/*! For license information please see preline.js.LICENSE.txt */(function(r,e){(function(n,t){r.exports=t()})(self,function(){return(()=>{var n={661:(s,l,c)=>{function a(L){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},a(L)}function d(L,m){for(var h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var T,u=x(p);if(_){var f=x(this).constructor;T=Reflect.construct(u,arguments,f)}else T=u.apply(this,arguments);return k(this,T)});function P(){return function(T,u){if(!(T instanceof u))throw new TypeError("Cannot call a class as a function")}(this,P),A.call(this,".hs-accordion")}return m=P,(h=[{key:"init",value:function(){var T=this;document.addEventListener("click",function(u){var f=u.target,O=f.closest(T.selector),C=f.closest(".hs-accordion-toggle"),S=f.closest(".hs-accordion-group");O&&S&&C&&(T._hideAll(O),T.show(O))})}},{key:"show",value:function(T){var u=this;if(T.classList.contains("active"))return this.hide(T);T.classList.add("active");var f=T.querySelector(".hs-accordion-content");f.style.display="block",f.style.height=0,setTimeout(function(){f.style.height="".concat(f.scrollHeight,"px")}),this.afterTransition(f,function(){T.classList.contains("active")&&(f.style.height="",u._fireEvent("open",T),u._dispatch("open.hs.accordion",T,T))})}},{key:"hide",value:function(T){var u=this,f=T.querySelector(".hs-accordion-content");f.style.height="".concat(f.scrollHeight,"px"),setTimeout(function(){f.style.height=0}),this.afterTransition(f,function(){T.classList.contains("active")||(f.style.display="",u._fireEvent("hide",T),u._dispatch("hide.hs.accordion",T,T))}),T.classList.remove("active")}},{key:"_hideAll",value:function(T){var u=this,f=T.closest(".hs-accordion-group");f.hasAttribute("data-hs-accordion-always-open")||f.querySelectorAll(this.selector).forEach(function(O){T!==O&&u.hide(O)})}}])&&d(m.prototype,h),Object.defineProperty(m,"prototype",{writable:!1}),P}(c(765).Z);window.HSAccordion=new D,document.addEventListener("load",window.HSAccordion.init())},795:(s,l,c)=>{function a(m){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},a(m)}function d(m,h){(h==null||h>m.length)&&(h=m.length);for(var p=0,_=new Array(h);p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var u,f=D(_);if(A){var O=D(this).constructor;u=Reflect.construct(f,arguments,O)}else u=f.apply(this,arguments);return x(this,u)});function T(){return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,T),P.call(this,"[data-hs-collapse]")}return h=T,(p=[{key:"init",value:function(){var u=this;document.addEventListener("click",function(f){var O=f.target.closest(u.selector);if(O){var C=document.querySelectorAll(O.getAttribute("data-hs-collapse"));u.toggle(C)}})}},{key:"toggle",value:function(u){var f,O=this;u.length&&(f=u,function(C){if(Array.isArray(C))return d(C)}(f)||function(C){if(typeof Symbol<"u"&&C[Symbol.iterator]!=null||C["@@iterator"]!=null)return Array.from(C)}(f)||function(C,S){if(C){if(typeof C=="string")return d(C,S);var j=Object.prototype.toString.call(C).slice(8,-1);return j==="Object"&&C.constructor&&(j=C.constructor.name),j==="Map"||j==="Set"?Array.from(C):j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j)?d(C,S):void 0}}(f)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()).forEach(function(C){C.classList.contains("hidden")?O.show(C):O.hide(C)})}},{key:"show",value:function(u){var f=this;u.classList.add("open"),u.classList.remove("hidden"),u.style.height=0,document.querySelectorAll(this.selector).forEach(function(O){u.closest(O.getAttribute("data-hs-collapse"))&&O.classList.add("open")}),u.style.height="".concat(u.scrollHeight,"px"),this.afterTransition(u,function(){u.classList.contains("open")&&(u.style.height="",f._fireEvent("open",u),f._dispatch("open.hs.collapse",u,u))})}},{key:"hide",value:function(u){var f=this;u.style.height="".concat(u.scrollHeight,"px"),setTimeout(function(){u.style.height=0}),u.classList.remove("open"),this.afterTransition(u,function(){u.classList.contains("open")||(u.classList.add("hidden"),u.style.height=null,f._fireEvent("hide",u),f._dispatch("hide.hs.collapse",u,u),u.querySelectorAll(".hs-mega-menu-content.block").forEach(function(O){O.classList.remove("block"),O.classList.add("hidden")}))}),document.querySelectorAll(this.selector).forEach(function(O){u.closest(O.getAttribute("data-hs-collapse"))&&O.classList.remove("open")})}}])&&g(h.prototype,p),Object.defineProperty(h,"prototype",{writable:!1}),T}(c(765).Z);window.HSCollapse=new L,document.addEventListener("load",window.HSCollapse.init())},682:(s,l,c)=>{var a=c(714),d=c(765);const g={historyIndex:-1,addHistory:function(A){this.historyIndex=A},existsInHistory:function(A){return A>this.historyIndex},clearHistory:function(){this.historyIndex=-1}};function k(A){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},k(A)}function x(A){return function(P){if(Array.isArray(P))return D(P)}(A)||function(P){if(typeof Symbol<"u"&&P[Symbol.iterator]!=null||P["@@iterator"]!=null)return Array.from(P)}(A)||function(P,T){if(P){if(typeof P=="string")return D(P,T);var u=Object.prototype.toString.call(P).slice(8,-1);return u==="Object"&&P.constructor&&(u=P.constructor.name),u==="Map"||u==="Set"?Array.from(P):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?D(P,T):void 0}}(A)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(A,P){(P==null||P>A.length)&&(P=A.length);for(var T=0,u=new Array(P);T"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var S,j=p(u);if(f){var R=p(this).constructor;S=Reflect.construct(j,arguments,R)}else S=j.apply(this,arguments);return h(this,S)});function C(){var S;return function(j,R){if(!(j instanceof R))throw new TypeError("Cannot call a class as a function")}(this,C),(S=O.call(this,".hs-dropdown")).positions={top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-top":"right-start","right-bottom":"right-end",left:"left","left-top":"left-start","left-bottom":"left-end"},S.absoluteStrategyModifiers=function(j){return[{name:"applyStyles",fn:function(R){var q=(window.getComputedStyle(j).getPropertyValue("--strategy")||"absolute").replace(" ",""),B=(window.getComputedStyle(j).getPropertyValue("--adaptive")||"adaptive").replace(" ","");R.state.elements.popper.style.position=q,R.state.elements.popper.style.transform=B==="adaptive"?R.state.styles.popper.transform:null,R.state.elements.popper.style.top=null,R.state.elements.popper.style.bottom=null,R.state.elements.popper.style.left=null,R.state.elements.popper.style.right=null,R.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},S._history=g,S}return P=C,T=[{key:"init",value:function(){var S=this;document.addEventListener("click",function(j){var R=j.target,q=R.closest(S.selector),B=R.closest(".hs-dropdown-menu");if(q&&q.classList.contains("open")||S._closeOthers(q),B){var N=(window.getComputedStyle(q).getPropertyValue("--auto-close")||"").replace(" ","");if((N=="false"||N=="inside")&&!q.parentElement.closest(S.selector))return}q&&(q.classList.contains("open")?S.close(q):S.open(q))}),document.addEventListener("mousemove",function(j){var R=j.target,q=R.closest(S.selector);if(R.closest(".hs-dropdown-menu"),q){var B=(window.getComputedStyle(q).getPropertyValue("--trigger")||"click").replace(" ","");if(B!=="hover")return;q&&q.classList.contains("open")||S._closeOthers(q),B!=="hover"||q.classList.contains("open")||/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||S._hover(R)}}),document.addEventListener("keydown",this._keyboardSupport.bind(this)),window.addEventListener("resize",function(){document.querySelectorAll(".hs-dropdown.open").forEach(function(j){S.close(j,!0)})})}},{key:"_closeOthers",value:function(){var S=this,j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,R=document.querySelectorAll("".concat(this.selector,".open"));R.forEach(function(q){if(!j||j.closest(".hs-dropdown.open")!==q){var B=(window.getComputedStyle(q).getPropertyValue("--auto-close")||"").replace(" ","");B!="false"&&B!="outside"&&S.close(q)}})}},{key:"_hover",value:function(S){var j=this,R=S.closest(this.selector);this.open(R),document.addEventListener("mousemove",function q(B){B.target.closest(j.selector)&&B.target.closest(j.selector)!==R.parentElement.closest(j.selector)||(j.close(R),document.removeEventListener("mousemove",q,!0))},!0)}},{key:"close",value:function(S){var j=this,R=arguments.length>1&&arguments[1]!==void 0&&arguments[1],q=S.querySelector(".hs-dropdown-menu"),B=function(){S.classList.contains("open")||(q.classList.remove("block"),q.classList.add("hidden"),q.style.inset=null,q.style.position=null,S._popper&&S._popper.destroy())};R||this.afterTransition(S.querySelector("[data-hs-dropdown-transition]")||q,function(){B()}),q.style.margin=null,S.classList.remove("open"),R&&B(),this._fireEvent("close",S),this._dispatch("close.hs.dropdown",S,S);var N=q.querySelectorAll(".hs-dropdown.open");N.forEach(function(ie){j.close(ie,!0)})}},{key:"open",value:function(S){var j=S.querySelector(".hs-dropdown-menu"),R=(window.getComputedStyle(S).getPropertyValue("--placement")||"").replace(" ",""),q=(window.getComputedStyle(S).getPropertyValue("--strategy")||"fixed").replace(" ",""),B=((window.getComputedStyle(S).getPropertyValue("--adaptive")||"adaptive").replace(" ",""),parseInt((window.getComputedStyle(S).getPropertyValue("--offset")||"10").replace(" ","")));if(q!=="static"){S._popper&&S._popper.destroy();var N=(0,a.fi)(S,j,{placement:this.positions[R]||"bottom-start",strategy:q,modifiers:[].concat(x(q!=="fixed"?this.absoluteStrategyModifiers(S):[]),[{name:"offset",options:{offset:[0,B]}}])});S._popper=N}j.style.margin=null,j.classList.add("block"),j.classList.remove("hidden"),setTimeout(function(){S.classList.add("open")}),this._fireEvent("open",S),this._dispatch("open.hs.dropdown",S,S)}},{key:"_keyboardSupport",value:function(S){var j=document.querySelector(".hs-dropdown.open");if(j)return S.keyCode===27?(S.preventDefault(),this._esc(j)):S.keyCode===40?(S.preventDefault(),this._down(j)):S.keyCode===38?(S.preventDefault(),this._up(j)):S.keyCode===36?(S.preventDefault(),this._start(j)):S.keyCode===35?(S.preventDefault(),this._end(j)):void this._byChar(j,S.key)}},{key:"_esc",value:function(S){this.close(S)}},{key:"_up",value:function(S){var j=S.querySelector(".hs-dropdown-menu"),R=x(j.querySelectorAll("a")).reverse().filter(function(N){return!N.disabled}),q=j.querySelector("a:focus"),B=R.findIndex(function(N){return N===q});B+1{function a(m){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},a(m)}function d(m,h){(h==null||h>m.length)&&(h=m.length);for(var p=0,_=new Array(h);p"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var u,f=D(_);if(A){var O=D(this).constructor;u=Reflect.construct(f,arguments,O)}else u=f.apply(this,arguments);return x(this,u)});function T(){var u;return function(f,O){if(!(f instanceof O))throw new TypeError("Cannot call a class as a function")}(this,T),(u=P.call(this,"[data-hs-overlay]")).openNextOverlay=!1,u}return h=T,(p=[{key:"init",value:function(){var u=this;document.addEventListener("click",function(f){var O=f.target.closest(u.selector),C=f.target.closest("[data-hs-overlay-close]"),S=f.target.getAttribute("aria-overlay")==="true";return C?u.close(C.closest(".hs-overlay.open")):O?u.toggle(document.querySelector(O.getAttribute("data-hs-overlay"))):void(S&&u._onBackdropClick(f.target))}),document.addEventListener("keydown",function(f){if(f.keyCode===27){var O=document.querySelector(".hs-overlay.open");if(!O)return;setTimeout(function(){O.getAttribute("data-hs-overlay-keyboard")!=="false"&&u.close(O)})}})}},{key:"toggle",value:function(u){u&&(u.classList.contains("hidden")?this.open(u):this.close(u))}},{key:"open",value:function(u){var f=this;if(u){var O=document.querySelector(".hs-overlay.open"),C=this.getClassProperty(u,"--body-scroll","false")!=="true";if(O)return this.openNextOverlay=!0,this.close(O).then(function(){f.open(u),f.openNextOverlay=!1});C&&(document.body.style.overflow="hidden"),this._buildBackdrop(u),this._checkTimer(u),this._autoHide(u),u.classList.remove("hidden"),u.setAttribute("aria-overlay","true"),u.setAttribute("tabindex","-1"),setTimeout(function(){u.classList.contains("hidden")||(u.classList.add("open"),f._fireEvent("open",u),f._dispatch("open.hs.overlay",u,u),f._focusInput(u))},50)}}},{key:"close",value:function(u){var f=this;return new Promise(function(O){u&&(u.classList.remove("open"),u.removeAttribute("aria-overlay"),u.removeAttribute("tabindex","-1"),f.afterTransition(u,function(){u.classList.contains("open")||(u.classList.add("hidden"),f._destroyBackdrop(),f._fireEvent("close",u),f._dispatch("close.hs.overlay",u,u),document.body.style.overflow="",O(u))}))})}},{key:"_autoHide",value:function(u){var f=this,O=parseInt(this.getClassProperty(u,"--auto-hide","0"));O&&(u.autoHide=setTimeout(function(){f.close(u)},O))}},{key:"_checkTimer",value:function(u){u.autoHide&&(clearTimeout(u.autoHide),delete u.autoHide)}},{key:"_onBackdropClick",value:function(u){this.getClassProperty(u,"--overlay-backdrop","true")!=="static"&&this.close(u)}},{key:"_buildBackdrop",value:function(u){var f,O=this,C=u.getAttribute("data-hs-overlay-backdrop-container")||!1,S=document.createElement("div"),j="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop",R=function(N,ie){var re=typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(!re){if(Array.isArray(N)||(re=function(me,it){if(me){if(typeof me=="string")return d(me,it);var Ge=Object.prototype.toString.call(me).slice(8,-1);return Ge==="Object"&&me.constructor&&(Ge=me.constructor.name),Ge==="Map"||Ge==="Set"?Array.from(me):Ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ge)?d(me,it):void 0}}(N))||ie&&N&&typeof N.length=="number"){re&&(N=re);var Ye=0,Ae=function(){};return{s:Ae,n:function(){return Ye>=N.length?{done:!0}:{done:!1,value:N[Ye++]}},e:function(me){throw me},f:Ae}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var De,ze=!0,at=!1;return{s:function(){re=re.call(N)},n:function(){var me=re.next();return ze=me.done,me},e:function(me){at=!0,De=me},f:function(){try{ze||re.return==null||re.return()}finally{if(at)throw De}}}}(u.classList.values());try{for(R.s();!(f=R.n()).done;){var q=f.value;q.startsWith("hs-overlay-backdrop-open:")&&(j+=" ".concat(q))}}catch(N){R.e(N)}finally{R.f()}var B=this.getClassProperty(u,"--overlay-backdrop","true")!=="static";this.getClassProperty(u,"--overlay-backdrop","true")==="false"||(C&&((S=document.querySelector(C).cloneNode(!0)).classList.remove("hidden"),j=S.classList,S.classList=""),B&&S.addEventListener("click",function(){return O.close(u)},!0),S.setAttribute("data-hs-overlay-backdrop-template",""),document.body.appendChild(S),setTimeout(function(){S.classList=j}))}},{key:"_destroyBackdrop",value:function(){var u=document.querySelector("[data-hs-overlay-backdrop-template]");u&&(this.openNextOverlay&&(u.style.transitionDuration="".concat(1.8*parseFloat(window.getComputedStyle(u).transitionDuration.replace(/[^\d.-]/g,"")),"s")),u.classList.add("opacity-0"),this.afterTransition(u,function(){u.remove()}))}},{key:"_focusInput",value:function(u){var f=u.querySelector("[autofocus]");f&&f.focus()}}])&&g(h.prototype,p),Object.defineProperty(h,"prototype",{writable:!1}),T}(c(765).Z);window.HSOverlay=new L,document.addEventListener("load",window.HSOverlay.init())},181:(s,l,c)=>{function a(L){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},a(L)}function d(L,m){for(var h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var T,u=x(p);if(_){var f=x(this).constructor;T=Reflect.construct(u,arguments,f)}else T=u.apply(this,arguments);return k(this,T)});function P(){return function(T,u){if(!(T instanceof u))throw new TypeError("Cannot call a class as a function")}(this,P),A.call(this,"[data-hs-remove-element]")}return m=P,(h=[{key:"init",value:function(){var T=this;document.addEventListener("click",function(u){var f=u.target.closest(T.selector);if(f){var O=document.querySelector(f.getAttribute("data-hs-remove-element"));O&&(O.classList.add("hs-removing"),T.afterTransition(O,function(){O.remove()}))}})}}])&&d(m.prototype,h),Object.defineProperty(m,"prototype",{writable:!1}),P}(c(765).Z);window.HSRemoveElement=new D,document.addEventListener("load",window.HSRemoveElement.init())},778:(s,l,c)=>{function a(L){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},a(L)}function d(L,m){for(var h=0;h"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var T,u=x(p);if(_){var f=x(this).constructor;T=Reflect.construct(u,arguments,f)}else T=u.apply(this,arguments);return k(this,T)});function P(){var T;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,P),(T=A.call(this,"[data-hs-scrollspy] ")).activeSection=null,T}return m=P,(h=[{key:"init",value:function(){var T=this;document.querySelectorAll(this.selector).forEach(function(u){var f=document.querySelector(u.getAttribute("data-hs-scrollspy")),O=u.querySelectorAll("[href]"),C=f.children,S=u.getAttribute("data-hs-scrollspy-scrollable-parent")?document.querySelector(u.getAttribute("data-hs-scrollspy-scrollable-parent")):document;Array.from(C).forEach(function(j){j.getAttribute("id")&&S.addEventListener("scroll",function(R){return T._update({$scrollspyEl:u,$scrollspyContentEl:f,links:O,$sectionEl:j,sections:C,ev:R})})}),O.forEach(function(j){j.addEventListener("click",function(R){R.preventDefault(),j.getAttribute("href")!=="javascript:;"&&T._scrollTo({$scrollspyEl:u,$scrollableEl:S,$link:j})})})})}},{key:"_update",value:function(T){var u=T.ev,f=T.$scrollspyEl,O=(T.sections,T.links),C=T.$sectionEl,S=parseInt(this.getClassProperty(f,"--scrollspy-offset","0")),j=this.getClassProperty(C,"--scrollspy-offset")||S,R=u.target===document?0:parseInt(u.target.getBoundingClientRect().top),q=parseInt(C.getBoundingClientRect().top)-j-R,B=C.offsetHeight;if(q<=0&&q+B>0){if(this.activeSection===C)return;O.forEach(function(Ye){Ye.classList.remove("active")});var N=f.querySelector('[href="#'.concat(C.getAttribute("id"),'"]'));if(N){N.classList.add("active");var ie=N.closest("[data-hs-scrollspy-group]");if(ie){var re=ie.querySelector("[href]");re&&re.classList.add("active")}}this.activeSection=C}}},{key:"_scrollTo",value:function(T){var u=T.$scrollspyEl,f=T.$scrollableEl,O=T.$link,C=document.querySelector(O.getAttribute("href")),S=parseInt(this.getClassProperty(u,"--scrollspy-offset","0")),j=this.getClassProperty(C,"--scrollspy-offset")||S,R=f===document?0:f.offsetTop,q=C.offsetTop-j-R,B=f===document?window:f;this._fireEvent("scroll",u),this._dispatch("scroll.hs.scrollspy",u,u),window.history.replaceState(null,null,O.getAttribute("href")),B.scrollTo({top:q,left:0,behavior:"smooth"})}}])&&d(m.prototype,h),Object.defineProperty(m,"prototype",{writable:!1}),P}(c(765).Z);window.HSScrollspy=new D,document.addEventListener("load",window.HSScrollspy.init())},51:(s,l,c)=>{function a(h){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},a(h)}function d(h){return function(p){if(Array.isArray(p))return g(p)}(h)||function(p){if(typeof Symbol<"u"&&p[Symbol.iterator]!=null||p["@@iterator"]!=null)return Array.from(p)}(h)||function(p,_){if(p){if(typeof p=="string")return g(p,_);var A=Object.prototype.toString.call(p).slice(8,-1);return A==="Object"&&p.constructor&&(A=p.constructor.name),A==="Map"||A==="Set"?Array.from(p):A==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(A)?g(p,_):void 0}}(h)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function g(h,p){(p==null||p>h.length)&&(p=h.length);for(var _=0,A=new Array(p);_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var f,O=L(A);if(P){var C=L(this).constructor;f=Reflect.construct(O,arguments,C)}else f=O.apply(this,arguments);return D(this,f)});function u(){return function(f,O){if(!(f instanceof O))throw new TypeError("Cannot call a class as a function")}(this,u),T.call(this,"[data-hs-tab]")}return p=u,(_=[{key:"init",value:function(){var f=this;document.addEventListener("keydown",this._keyboardSupport.bind(this)),document.addEventListener("click",function(O){var C=O.target.closest(f.selector);C&&f.open(C)}),document.querySelectorAll("[hs-data-tab-select]").forEach(function(O){var C=document.querySelector(O.getAttribute("hs-data-tab-select"));C&&C.addEventListener("change",function(S){var j=document.querySelector('[data-hs-tab="'.concat(S.target.value,'"]'));j&&f.open(j)})})}},{key:"open",value:function(f){var O=document.querySelector(f.getAttribute("data-hs-tab")),C=d(f.parentElement.children),S=d(O.parentElement.children),j=f.closest("[hs-data-tab-select]"),R=j?document.querySelector(j.getAttribute("data-hs-tab")):null;C.forEach(function(q){return q.classList.remove("active")}),S.forEach(function(q){return q.classList.add("hidden")}),f.classList.add("active"),O.classList.remove("hidden"),this._fireEvent("change",f),this._dispatch("change.hs.tab",f,f),R&&(R.value=f.getAttribute("data-hs-tab"))}},{key:"_keyboardSupport",value:function(f){var O=f.target.closest(this.selector);if(O){var C=O.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical")==="true";return(C?f.keyCode===38:f.keyCode===37)?(f.preventDefault(),this._left(O)):(C?f.keyCode===40:f.keyCode===39)?(f.preventDefault(),this._right(O)):f.keyCode===36?(f.preventDefault(),this._start(O)):f.keyCode===35?(f.preventDefault(),this._end(O)):void 0}}},{key:"_right",value:function(f){var O=f.closest('[role="tablist"]');if(O){var C=d(O.querySelectorAll(this.selector)).filter(function(R){return!R.disabled}),S=O.querySelector("button:focus"),j=C.findIndex(function(R){return R===S});j+1{var a=c(765),d=c(714);function g(h){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},g(h)}function k(h,p){for(var _=0;_"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var f,O=L(A);if(P){var C=L(this).constructor;f=Reflect.construct(O,arguments,C)}else f=O.apply(this,arguments);return D(this,f)});function u(){return function(f,O){if(!(f instanceof O))throw new TypeError("Cannot call a class as a function")}(this,u),T.call(this,".hs-tooltip")}return p=u,(_=[{key:"init",value:function(){var f=this;document.addEventListener("click",function(O){var C=O.target.closest(f.selector);C&&f.getClassProperty(C,"--trigger")==="focus"&&f._focus(C),C&&f.getClassProperty(C,"--trigger")==="click"&&f._click(C)}),document.addEventListener("mousemove",function(O){var C=O.target.closest(f.selector);C&&f.getClassProperty(C,"--trigger")!=="focus"&&f.getClassProperty(C,"--trigger")!=="click"&&f._hover(C)})}},{key:"_hover",value:function(f){var O=this;if(!f.classList.contains("show")){var C=f.querySelector(".hs-tooltip-toggle"),S=f.querySelector(".hs-tooltip-content"),j=this.getClassProperty(f,"--placement");(0,d.fi)(C,S,{placement:j||"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(f),f.addEventListener("mouseleave",function R(q){q.relatedTarget.closest(O.selector)&&q.relatedTarget.closest(O.selector)==f||(O.hide(f),f.removeEventListener("mouseleave",R,!0))},!0)}}},{key:"_focus",value:function(f){var O=this,C=f.querySelector(".hs-tooltip-toggle"),S=f.querySelector(".hs-tooltip-content"),j=this.getClassProperty(f,"--placement"),R=this.getClassProperty(f,"--strategy");(0,d.fi)(C,S,{placement:j||"top",strategy:R||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(f),f.addEventListener("blur",function q(){O.hide(f),f.removeEventListener("blur",q,!0)},!0)}},{key:"_click",value:function(f){var O=this;if(!f.classList.contains("show")){var C=f.querySelector(".hs-tooltip-toggle"),S=f.querySelector(".hs-tooltip-content"),j=this.getClassProperty(f,"--placement"),R=this.getClassProperty(f,"--strategy");(0,d.fi)(C,S,{placement:j||"top",strategy:R||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(f);var q=function B(N){setTimeout(function(){O.hide(f),f.removeEventListener("click",B,!0),f.removeEventListener("blur",B,!0)})};f.addEventListener("blur",q,!0),f.addEventListener("click",q,!0)}}},{key:"show",value:function(f){var O=this;f.querySelector(".hs-tooltip-content").classList.remove("hidden"),setTimeout(function(){f.classList.add("show"),O._fireEvent("show",f),O._dispatch("show.hs.tooltip",f,f)})}},{key:"hide",value:function(f){var O=f.querySelector(".hs-tooltip-content");f.classList.remove("show"),this._fireEvent("hide",f),this._dispatch("hide.hs.tooltip",f,f),this.afterTransition(O,function(){f.classList.contains("show")||O.classList.add("hidden")})}}])&&k(p.prototype,_),Object.defineProperty(p,"prototype",{writable:!1}),u}(a.Z);window.HSTooltip=new m,document.addEventListener("load",window.HSTooltip.init())},765:(s,l,c)=>{function a(g,k){for(var x=0;xd});var d=function(){function g(D,L){(function(m,h){if(!(m instanceof h))throw new TypeError("Cannot call a class as a function")})(this,g),this.$collection=[],this.selector=D,this.config=L,this.events={}}var k,x;return k=g,x=[{key:"_fireEvent",value:function(D){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.events.hasOwnProperty(D)&&this.events[D](L)}},{key:"_dispatch",value:function(D,L){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,h=new CustomEvent(D,{detail:{payload:m},bubbles:!0,cancelable:!0,composed:!1});L.dispatchEvent(h)}},{key:"on",value:function(D,L){this.events[D]=L}},{key:"afterTransition",value:function(D,L){window.getComputedStyle(D,null).getPropertyValue("transition")!=="all 0s ease 0s"?D.addEventListener("transitionend",function m(){L(),D.removeEventListener("transitionend",m,!0)},!0):L()}},{key:"getClassProperty",value:function(D,L){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",h=(window.getComputedStyle(D).getPropertyValue(L)||m).replace(" ","");return h}}],x&&a(k.prototype,x),Object.defineProperty(k,"prototype",{writable:!1}),g}()},714:(s,l,c)=>{function a(b){if(b==null)return window;if(b.toString()!=="[object Window]"){var y=b.ownerDocument;return y&&y.defaultView||window}return b}function d(b){return b instanceof a(b).Element||b instanceof Element}function g(b){return b instanceof a(b).HTMLElement||b instanceof HTMLElement}function k(b){return typeof ShadowRoot<"u"&&(b instanceof a(b).ShadowRoot||b instanceof ShadowRoot)}c.d(l,{fi:()=>gr});var x=Math.max,D=Math.min,L=Math.round;function m(b,y){y===void 0&&(y=!1);var $=b.getBoundingClientRect(),H=1,z=1;if(g(b)&&y){var Q=b.offsetHeight,V=b.offsetWidth;V>0&&(H=L($.width)/V||1),Q>0&&(z=L($.height)/Q||1)}return{width:$.width/H,height:$.height/z,top:$.top/z,right:$.right/H,bottom:$.bottom/z,left:$.left/H,x:$.left/H,y:$.top/z}}function h(b){var y=a(b);return{scrollLeft:y.pageXOffset,scrollTop:y.pageYOffset}}function p(b){return b?(b.nodeName||"").toLowerCase():null}function _(b){return((d(b)?b.ownerDocument:b.document)||window.document).documentElement}function A(b){return m(_(b)).left+h(b).scrollLeft}function P(b){return a(b).getComputedStyle(b)}function T(b){var y=P(b),$=y.overflow,H=y.overflowX,z=y.overflowY;return/auto|scroll|overlay|hidden/.test($+z+H)}function u(b,y,$){$===void 0&&($=!1);var H,z,Q=g(y),V=g(y)&&function(ee){var Ee=ee.getBoundingClientRect(),ae=L(Ee.width)/ee.offsetWidth||1,he=L(Ee.height)/ee.offsetHeight||1;return ae!==1||he!==1}(y),W=_(y),K=m(b,V),te={scrollLeft:0,scrollTop:0},ne={x:0,y:0};return(Q||!Q&&!$)&&((p(y)!=="body"||T(W))&&(te=(H=y)!==a(H)&&g(H)?{scrollLeft:(z=H).scrollLeft,scrollTop:z.scrollTop}:h(H)),g(y)?((ne=m(y,!0)).x+=y.clientLeft,ne.y+=y.clientTop):W&&(ne.x=A(W))),{x:K.left+te.scrollLeft-ne.x,y:K.top+te.scrollTop-ne.y,width:K.width,height:K.height}}function f(b){var y=m(b),$=b.offsetWidth,H=b.offsetHeight;return Math.abs(y.width-$)<=1&&($=y.width),Math.abs(y.height-H)<=1&&(H=y.height),{x:b.offsetLeft,y:b.offsetTop,width:$,height:H}}function O(b){return p(b)==="html"?b:b.assignedSlot||b.parentNode||(k(b)?b.host:null)||_(b)}function C(b){return["html","body","#document"].indexOf(p(b))>=0?b.ownerDocument.body:g(b)&&T(b)?b:C(O(b))}function S(b,y){var $;y===void 0&&(y=[]);var H=C(b),z=H===(($=b.ownerDocument)==null?void 0:$.body),Q=a(H),V=z?[Q].concat(Q.visualViewport||[],T(H)?H:[]):H,W=y.concat(V);return z?W:W.concat(S(O(V)))}function j(b){return["table","td","th"].indexOf(p(b))>=0}function R(b){return g(b)&&P(b).position!=="fixed"?b.offsetParent:null}function q(b){for(var y=a(b),$=R(b);$&&j($)&&P($).position==="static";)$=R($);return $&&(p($)==="html"||p($)==="body"&&P($).position==="static")?y:$||function(H){var z=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&g(H)&&P(H).position==="fixed")return null;for(var Q=O(H);g(Q)&&["html","body"].indexOf(p(Q))<0;){var V=P(Q);if(V.transform!=="none"||V.perspective!=="none"||V.contain==="paint"||["transform","perspective"].indexOf(V.willChange)!==-1||z&&V.willChange==="filter"||z&&V.filter&&V.filter!=="none")return Q;Q=Q.parentNode}return null}(b)||y}var B="top",N="bottom",ie="right",re="left",Ye="auto",Ae=[B,N,ie,re],De="start",ze="end",at="viewport",me="popper",it=Ae.reduce(function(b,y){return b.concat([y+"-"+De,y+"-"+ze])},[]),Ge=[].concat(Ae,[Ye]).reduce(function(b,y){return b.concat([y,y+"-"+De,y+"-"+ze])},[]),ct=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Lt(b){var y=new Map,$=new Set,H=[];function z(Q){$.add(Q.name),[].concat(Q.requires||[],Q.requiresIfExists||[]).forEach(function(V){if(!$.has(V)){var W=y.get(V);W&&z(W)}}),H.push(Q)}return b.forEach(function(Q){y.set(Q.name,Q)}),b.forEach(function(Q){$.has(Q.name)||z(Q)}),H}var Tt={placement:"bottom",modifiers:[],strategy:"absolute"};function Te(){for(var b=arguments.length,y=new Array(b),$=0;$=0?"x":"y"}function X(b){var y,$=b.reference,H=b.element,z=b.placement,Q=z?Be(z):null,V=z?Oe(z):null,W=$.x+$.width/2-H.width/2,K=$.y+$.height/2-H.height/2;switch(Q){case B:y={x:W,y:$.y-H.height};break;case N:y={x:W,y:$.y+$.height};break;case ie:y={x:$.x+$.width,y:K};break;case re:y={x:$.x-H.width,y:K};break;default:y={x:$.x,y:$.y}}var te=Q?Le(Q):null;if(te!=null){var ne=te==="y"?"height":"width";switch(V){case De:y[te]=y[te]-($[ne]/2-H[ne]/2);break;case ze:y[te]=y[te]+($[ne]/2-H[ne]/2)}}return y}var He={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe(b){var y,$=b.popper,H=b.popperRect,z=b.placement,Q=b.variation,V=b.offsets,W=b.position,K=b.gpuAcceleration,te=b.adaptive,ne=b.roundOffsets,ee=b.isFixed,Ee=V.x,ae=Ee===void 0?0:Ee,he=V.y,pe=he===void 0?0:he,le=typeof ne=="function"?ne({x:ae,y:pe}):{x:ae,y:pe};ae=le.x,pe=le.y;var Ce=V.hasOwnProperty("x"),ve=V.hasOwnProperty("y"),fe=re,ye=B,ce=window;if(te){var ue=q($),de="clientHeight",ge="clientWidth";ue===a($)&&P(ue=_($)).position!=="static"&&W==="absolute"&&(de="scrollHeight",ge="scrollWidth"),ue=ue,(z===B||(z===re||z===ie)&&Q===ze)&&(ye=N,pe-=(ee&&ce.visualViewport?ce.visualViewport.height:ue[de])-H.height,pe*=K?1:-1),z!==re&&(z!==B&&z!==N||Q!==ze)||(fe=ie,ae-=(ee&&ce.visualViewport?ce.visualViewport.width:ue[ge])-H.width,ae*=K?1:-1)}var be,Me=Object.assign({position:W},te&&He),Re=ne===!0?function(Ze){var Xe=Ze.x,st=Ze.y,We=window.devicePixelRatio||1;return{x:L(Xe*We)/We||0,y:L(st*We)/We||0}}({x:ae,y:pe}):{x:ae,y:pe};return ae=Re.x,pe=Re.y,K?Object.assign({},Me,((be={})[ye]=ve?"0":"",be[fe]=Ce?"0":"",be.transform=(ce.devicePixelRatio||1)<=1?"translate("+ae+"px, "+pe+"px)":"translate3d("+ae+"px, "+pe+"px, 0)",be)):Object.assign({},Me,((y={})[ye]=ve?pe+"px":"",y[fe]=Ce?ae+"px":"",y.transform="",y))}var gt={left:"right",right:"left",bottom:"top",top:"bottom"};function Rt(b){return b.replace(/left|right|bottom|top/g,function(y){return gt[y]})}var pr={start:"end",end:"start"};function cn(b){return b.replace(/start|end/g,function(y){return pr[y]})}function un(b,y){var $=y.getRootNode&&y.getRootNode();if(b.contains(y))return!0;if($&&k($)){var H=y;do{if(H&&b.isSameNode(H))return!0;H=H.parentNode||H.host}while(H)}return!1}function Ft(b){return Object.assign({},b,{left:b.x,top:b.y,right:b.x+b.width,bottom:b.y+b.height})}function fn(b,y){return y===at?Ft(function($){var H=a($),z=_($),Q=H.visualViewport,V=z.clientWidth,W=z.clientHeight,K=0,te=0;return Q&&(V=Q.width,W=Q.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(K=Q.offsetLeft,te=Q.offsetTop)),{width:V,height:W,x:K+A($),y:te}}(b)):d(y)?function($){var H=m($);return H.top=H.top+$.clientTop,H.left=H.left+$.clientLeft,H.bottom=H.top+$.clientHeight,H.right=H.left+$.clientWidth,H.width=$.clientWidth,H.height=$.clientHeight,H.x=H.left,H.y=H.top,H}(y):Ft(function($){var H,z=_($),Q=h($),V=(H=$.ownerDocument)==null?void 0:H.body,W=x(z.scrollWidth,z.clientWidth,V?V.scrollWidth:0,V?V.clientWidth:0),K=x(z.scrollHeight,z.clientHeight,V?V.scrollHeight:0,V?V.clientHeight:0),te=-Q.scrollLeft+A($),ne=-Q.scrollTop;return P(V||z).direction==="rtl"&&(te+=x(z.clientWidth,V?V.clientWidth:0)-W),{width:W,height:K,x:te,y:ne}}(_(b)))}function dn(b){return Object.assign({},{top:0,right:0,bottom:0,left:0},b)}function pn(b,y){return y.reduce(function($,H){return $[H]=b,$},{})}function Et(b,y){y===void 0&&(y={});var $=y,H=$.placement,z=H===void 0?b.placement:H,Q=$.boundary,V=Q===void 0?"clippingParents":Q,W=$.rootBoundary,K=W===void 0?at:W,te=$.elementContext,ne=te===void 0?me:te,ee=$.altBoundary,Ee=ee!==void 0&&ee,ae=$.padding,he=ae===void 0?0:ae,pe=dn(typeof he!="number"?he:pn(he,Ae)),le=ne===me?"reference":me,Ce=b.rects.popper,ve=b.elements[Ee?le:ne],fe=function(Re,Ze,Xe){var st=Ze==="clippingParents"?function(ke){var ft=S(O(ke)),Fe=["absolute","fixed"].indexOf(P(ke).position)>=0&&g(ke)?q(ke):ke;return d(Fe)?ft.filter(function(Ue){return d(Ue)&&un(Ue,Fe)&&p(Ue)!=="body"}):[]}(Re):[].concat(Ze),We=[].concat(st,[Xe]),Ie=We[0],qe=We.reduce(function(ke,ft){var Fe=fn(Re,ft);return ke.top=x(Fe.top,ke.top),ke.right=D(Fe.right,ke.right),ke.bottom=D(Fe.bottom,ke.bottom),ke.left=x(Fe.left,ke.left),ke},fn(Re,Ie));return qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top,qe.x=qe.left,qe.y=qe.top,qe}(d(ve)?ve:ve.contextElement||_(b.elements.popper),V,K),ye=m(b.elements.reference),ce=X({reference:ye,element:Ce,strategy:"absolute",placement:z}),ue=Ft(Object.assign({},Ce,ce)),de=ne===me?ue:ye,ge={top:fe.top-de.top+pe.top,bottom:de.bottom-fe.bottom+pe.bottom,left:fe.left-de.left+pe.left,right:de.right-fe.right+pe.right},be=b.modifiersData.offset;if(ne===me&&be){var Me=be[z];Object.keys(ge).forEach(function(Re){var Ze=[ie,N].indexOf(Re)>=0?1:-1,Xe=[B,N].indexOf(Re)>=0?"y":"x";ge[Re]+=Me[Xe]*Ze})}return ge}function Ct(b,y,$){return x(b,D(y,$))}function gn(b,y,$){return $===void 0&&($={x:0,y:0}),{top:b.top-y.height-$.y,right:b.right-y.width+$.x,bottom:b.bottom-y.height+$.y,left:b.left-y.width-$.x}}function hn(b){return[B,ie,N,re].some(function(y){return b[y]>=0})}var gr=ut({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(b){var y=b.state,$=b.instance,H=b.options,z=H.scroll,Q=z===void 0||z,V=H.resize,W=V===void 0||V,K=a(y.elements.popper),te=[].concat(y.scrollParents.reference,y.scrollParents.popper);return Q&&te.forEach(function(ne){ne.addEventListener("scroll",$.update,Pe)}),W&&K.addEventListener("resize",$.update,Pe),function(){Q&&te.forEach(function(ne){ne.removeEventListener("scroll",$.update,Pe)}),W&&K.removeEventListener("resize",$.update,Pe)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(b){var y=b.state,$=b.name;y.modifiersData[$]=X({reference:y.rects.reference,element:y.rects.popper,strategy:"absolute",placement:y.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(b){var y=b.state,$=b.options,H=$.gpuAcceleration,z=H===void 0||H,Q=$.adaptive,V=Q===void 0||Q,W=$.roundOffsets,K=W===void 0||W,te={placement:Be(y.placement),variation:Oe(y.placement),popper:y.elements.popper,popperRect:y.rects.popper,gpuAcceleration:z,isFixed:y.options.strategy==="fixed"};y.modifiersData.popperOffsets!=null&&(y.styles.popper=Object.assign({},y.styles.popper,oe(Object.assign({},te,{offsets:y.modifiersData.popperOffsets,position:y.options.strategy,adaptive:V,roundOffsets:K})))),y.modifiersData.arrow!=null&&(y.styles.arrow=Object.assign({},y.styles.arrow,oe(Object.assign({},te,{offsets:y.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:K})))),y.attributes.popper=Object.assign({},y.attributes.popper,{"data-popper-placement":y.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(b){var y=b.state;Object.keys(y.elements).forEach(function($){var H=y.styles[$]||{},z=y.attributes[$]||{},Q=y.elements[$];g(Q)&&p(Q)&&(Object.assign(Q.style,H),Object.keys(z).forEach(function(V){var W=z[V];W===!1?Q.removeAttribute(V):Q.setAttribute(V,W===!0?"":W)}))})},effect:function(b){var y=b.state,$={popper:{position:y.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(y.elements.popper.style,$.popper),y.styles=$,y.elements.arrow&&Object.assign(y.elements.arrow.style,$.arrow),function(){Object.keys(y.elements).forEach(function(H){var z=y.elements[H],Q=y.attributes[H]||{},V=Object.keys(y.styles.hasOwnProperty(H)?y.styles[H]:$[H]).reduce(function(W,K){return W[K]="",W},{});g(z)&&p(z)&&(Object.assign(z.style,V),Object.keys(Q).forEach(function(W){z.removeAttribute(W)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(b){var y=b.state,$=b.options,H=b.name,z=$.offset,Q=z===void 0?[0,0]:z,V=Ge.reduce(function(ne,ee){return ne[ee]=function(Ee,ae,he){var pe=Be(Ee),le=[re,B].indexOf(pe)>=0?-1:1,Ce=typeof he=="function"?he(Object.assign({},ae,{placement:Ee})):he,ve=Ce[0],fe=Ce[1];return ve=ve||0,fe=(fe||0)*le,[re,ie].indexOf(pe)>=0?{x:fe,y:ve}:{x:ve,y:fe}}(ee,y.rects,Q),ne},{}),W=V[y.placement],K=W.x,te=W.y;y.modifiersData.popperOffsets!=null&&(y.modifiersData.popperOffsets.x+=K,y.modifiersData.popperOffsets.y+=te),y.modifiersData[H]=V}},{name:"flip",enabled:!0,phase:"main",fn:function(b){var y=b.state,$=b.options,H=b.name;if(!y.modifiersData[H]._skip){for(var z=$.mainAxis,Q=z===void 0||z,V=$.altAxis,W=V===void 0||V,K=$.fallbackPlacements,te=$.padding,ne=$.boundary,ee=$.rootBoundary,Ee=$.altBoundary,ae=$.flipVariations,he=ae===void 0||ae,pe=$.allowedAutoPlacements,le=y.options.placement,Ce=Be(le),ve=K||(Ce!==le&&he?function(Ue){if(Be(Ue)===Ye)return[];var et=Rt(Ue);return[cn(Ue),et,cn(et)]}(le):[Rt(le)]),fe=[le].concat(ve).reduce(function(Ue,et){return Ue.concat(Be(et)===Ye?function(vt,dt){dt===void 0&&(dt={});var tt=dt,Bt=tt.placement,It=tt.boundary,_t=tt.rootBoundary,Yt=tt.padding,Jt=tt.flipVariations,wt=tt.allowedAutoPlacements,Kt=wt===void 0?Ge:wt,jt=Oe(Bt),Nt=jt?Jt?it:it.filter(function(rt){return Oe(rt)===jt}):Ae,kt=Nt.filter(function(rt){return Kt.indexOf(rt)>=0});kt.length===0&&(kt=Nt);var xt=kt.reduce(function(rt,ht){return rt[ht]=Et(vt,{placement:ht,boundary:It,rootBoundary:_t,padding:Yt})[Be(ht)],rt},{});return Object.keys(xt).sort(function(rt,ht){return xt[rt]-xt[ht]})}(y,{placement:et,boundary:ne,rootBoundary:ee,padding:te,flipVariations:he,allowedAutoPlacements:pe}):et)},[]),ye=y.rects.reference,ce=y.rects.popper,ue=new Map,de=!0,ge=fe[0],be=0;be=0,st=Xe?"width":"height",We=Et(y,{placement:Me,boundary:ne,rootBoundary:ee,altBoundary:Ee,padding:te}),Ie=Xe?Ze?ie:re:Ze?N:B;ye[st]>ce[st]&&(Ie=Rt(Ie));var qe=Rt(Ie),ke=[];if(Q&&ke.push(We[Re]<=0),W&&ke.push(We[Ie]<=0,We[qe]<=0),ke.every(function(Ue){return Ue})){ge=Me,de=!1;break}ue.set(Me,ke)}if(de)for(var ft=function(Ue){var et=fe.find(function(vt){var dt=ue.get(vt);if(dt)return dt.slice(0,Ue).every(function(tt){return tt})});if(et)return ge=et,"break"},Fe=he?3:1;Fe>0&&ft(Fe)!=="break";Fe--);y.placement!==ge&&(y.modifiersData[H]._skip=!0,y.placement=ge,y.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(b){var y=b.state,$=b.options,H=b.name,z=$.mainAxis,Q=z===void 0||z,V=$.altAxis,W=V!==void 0&&V,K=$.boundary,te=$.rootBoundary,ne=$.altBoundary,ee=$.padding,Ee=$.tether,ae=Ee===void 0||Ee,he=$.tetherOffset,pe=he===void 0?0:he,le=Et(y,{boundary:K,rootBoundary:te,padding:ee,altBoundary:ne}),Ce=Be(y.placement),ve=Oe(y.placement),fe=!ve,ye=Le(Ce),ce=ye==="x"?"y":"x",ue=y.modifiersData.popperOffsets,de=y.rects.reference,ge=y.rects.popper,be=typeof pe=="function"?pe(Object.assign({},y.rects,{placement:y.placement})):pe,Me=typeof be=="number"?{mainAxis:be,altAxis:be}:Object.assign({mainAxis:0,altAxis:0},be),Re=y.modifiersData.offset?y.modifiersData.offset[y.placement]:null,Ze={x:0,y:0};if(ue){if(Q){var Xe,st=ye==="y"?B:re,We=ye==="y"?N:ie,Ie=ye==="y"?"height":"width",qe=ue[ye],ke=qe+le[st],ft=qe-le[We],Fe=ae?-ge[Ie]/2:0,Ue=ve===De?de[Ie]:ge[Ie],et=ve===De?-ge[Ie]:-de[Ie],vt=y.elements.arrow,dt=ae&&vt?f(vt):{width:0,height:0},tt=y.modifiersData["arrow#persistent"]?y.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Bt=tt[st],It=tt[We],_t=Ct(0,de[Ie],dt[Ie]),Yt=fe?de[Ie]/2-Fe-_t-Bt-Me.mainAxis:Ue-_t-Bt-Me.mainAxis,Jt=fe?-de[Ie]/2+Fe+_t+It+Me.mainAxis:et+_t+It+Me.mainAxis,wt=y.elements.arrow&&q(y.elements.arrow),Kt=wt?ye==="y"?wt.clientTop||0:wt.clientLeft||0:0,jt=(Xe=Re==null?void 0:Re[ye])!=null?Xe:0,Nt=qe+Jt-jt,kt=Ct(ae?D(ke,qe+Yt-jt-Kt):ke,qe,ae?x(ft,Nt):ft);ue[ye]=kt,Ze[ye]=kt-qe}if(W){var xt,rt=ye==="x"?B:re,ht=ye==="x"?N:ie,mt=ue[ce],Qt=ce==="y"?"height":"width",mn=mt+le[rt],yn=mt-le[ht],Xt=[B,re].indexOf(Ce)!==-1,bn=(xt=Re==null?void 0:Re[ce])!=null?xt:0,vn=Xt?mn:mt-de[Qt]-ge[Qt]-bn+Me.altAxis,_n=Xt?mt+de[Qt]+ge[Qt]-bn-Me.altAxis:yn,wn=ae&&Xt?function(hr,mr,en){var kn=Ct(hr,mr,en);return kn>en?en:kn}(vn,mt,_n):Ct(ae?vn:mn,mt,ae?_n:yn);ue[ce]=wn,Ze[ce]=wn-mt}y.modifiersData[H]=Ze}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(b){var y,$=b.state,H=b.name,z=b.options,Q=$.elements.arrow,V=$.modifiersData.popperOffsets,W=Be($.placement),K=Le(W),te=[re,ie].indexOf(W)>=0?"height":"width";if(Q&&V){var ne=function(ge,be){return dn(typeof(ge=typeof ge=="function"?ge(Object.assign({},be.rects,{placement:be.placement})):ge)!="number"?ge:pn(ge,Ae))}(z.padding,$),ee=f(Q),Ee=K==="y"?B:re,ae=K==="y"?N:ie,he=$.rects.reference[te]+$.rects.reference[K]-V[K]-$.rects.popper[te],pe=V[K]-$.rects.reference[K],le=q(Q),Ce=le?K==="y"?le.clientHeight||0:le.clientWidth||0:0,ve=he/2-pe/2,fe=ne[Ee],ye=Ce-ee[te]-ne[ae],ce=Ce/2-ee[te]/2+ve,ue=Ct(fe,ce,ye),de=K;$.modifiersData[H]=((y={})[de]=ue,y.centerOffset=ue-ce,y)}},effect:function(b){var y=b.state,$=b.options.element,H=$===void 0?"[data-popper-arrow]":$;H!=null&&(typeof H!="string"||(H=y.elements.popper.querySelector(H)))&&un(y.elements.popper,H)&&(y.elements.arrow=H)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(b){var y=b.state,$=b.name,H=y.rects.reference,z=y.rects.popper,Q=y.modifiersData.preventOverflow,V=Et(y,{elementContext:"reference"}),W=Et(y,{altBoundary:!0}),K=gn(V,H),te=gn(W,z,Q),ne=hn(K),ee=hn(te);y.modifiersData[$]={referenceClippingOffsets:K,popperEscapeOffsets:te,isReferenceHidden:ne,hasPopperEscaped:ee},y.attributes.popper=Object.assign({},y.attributes.popper,{"data-popper-reference-hidden":ne,"data-popper-escaped":ee})}}]})}},t={};function o(s){var l=t[s];if(l!==void 0)return l.exports;var c=t[s]={exports:{}};return n[s](c,c.exports,o),c.exports}o.d=(s,l)=>{for(var c in l)o.o(l,c)&&!o.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:l[c]})},o.o=(s,l)=>Object.prototype.hasOwnProperty.call(s,l),o.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var i={};return o.r(i),o(661),o(795),o(682),o(284),o(181),o(778),o(51),o(185),i})()})})(Hr);function Mr(r){let e;return{c(){e=E("div"),e.innerHTML='Welcome to Vanna.AI Your AI-powered copilot for SQL queries.
',v(e,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto text-center")},m(n,t){U(n,e,t)},p:se,i:se,o:se,d(n){n&&G(e)}}}class Rr extends Se{constructor(e){super(),$e(this,e,null,Mr,xe,{})}}function Br(r){let e,n;const t=r[1].default,o=Gt(t,r,r[0],null);return{c(){e=E("p"),o&&o.c(),v(e,"class","text-gray-800 dark:text-gray-200")},m(i,s){U(i,e,s),o&&o.m(e,null),n=!0},p(i,[s]){o&&o.p&&(!n||s&1)&&Zt(o,t,i,i[0],n?Ut(t,i[0],s,null):Wt(i[0]),null)},i(i){n||(M(o,i),n=!0)},o(i){I(o,i),n=!1},d(i){i&&G(e),o&&o.d(i)}}}function Ir(r,e,n){let{$$slots:t={},$$scope:o}=e;return r.$$set=i=>{"$$scope"in i&&n(0,o=i.$$scope)},[o,t]}class lt extends Se{constructor(e){super(),$e(this,e,Ir,Br,xe,{})}}function Nr(r){let e;return{c(){e=we(r[0])},m(n,t){U(n,e,t)},p(n,t){t&1&&Ve(e,n[0])},d(n){n&&G(e)}}}function Qr(r){let e,n,t,o,i,s,l,c,a;l=new lt({props:{$$slots:{default:[Nr]},$$scope:{ctx:r}}});const d=r[1].default,g=Gt(d,r,r[2],null);return{c(){e=E("li"),n=E("div"),t=E("div"),o=E("span"),o.innerHTML='You ',i=Z(),s=E("div"),J(l.$$.fragment),c=Z(),g&&g.c(),v(o,"class","flex-shrink-0 inline-flex items-center justify-center h-[2.375rem] w-[2.375rem] rounded-full bg-gray-600"),v(s,"class","grow mt-2 space-y-3"),v(t,"class","max-w-2xl flex gap-x-2 sm:gap-x-4"),v(n,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto"),v(e,"class","py-2 sm:py-4")},m(k,x){U(k,e,x),w(e,n),w(n,t),w(t,o),w(t,i),w(t,s),F(l,s,null),w(s,c),g&&g.m(s,null),a=!0},p(k,[x]){const D={};x&5&&(D.$$scope={dirty:x,ctx:k}),l.$set(D),g&&g.p&&(!a||x&4)&&Zt(g,d,k,k[2],a?Ut(d,k[2],x,null):Wt(k[2]),null)},i(k){a||(M(l.$$.fragment,k),M(g,k),a=!0)},o(k){I(l.$$.fragment,k),I(g,k),a=!1},d(k){k&&G(e),Y(l),g&&g.d(k)}}}function Vr(r,e,n){let{$$slots:t={},$$scope:o}=e,{message:i}=e;return r.$$set=s=>{"message"in s&&n(0,i=s.message),"$$scope"in s&&n(2,o=s.$$scope)},[i,t,o]}class Mt extends Se{constructor(e){super(),$e(this,e,Vr,Qr,xe,{message:0})}}function zr(r){let e,n,t,o,i,s,l,c,a,d,g;return{c(){e=E("div"),n=E("input"),t=Z(),o=E("div"),i=E("div"),s=E("div"),s.innerHTML="",l=Z(),c=E("div"),a=E("button"),a.innerHTML=' ',v(n,"type","text"),v(n,"class","p-4 pb-12 block w-full bg-gray-100 border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-800 dark:border-gray-700 dark:text-gray-400"),v(n,"placeholder","Ask me a question about your data that I can turn into SQL."),v(s,"class","flex items-center"),v(a,"type","button"),v(a,"class","inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all"),v(c,"class","flex items-center gap-x-1"),v(i,"class","flex justify-between items-center"),v(o,"class","absolute bottom-px inset-x-px p-2 rounded-b-md bg-gray-100 dark:bg-slate-800"),v(e,"class","relative")},m(k,x){U(k,e,x),w(e,n),bt(n,r[0]),w(e,t),w(e,o),w(o,i),w(i,s),w(i,l),w(i,c),w(c,a),d||(g=[je(n,"input",r[4]),je(n,"keydown",r[1]),je(a,"click",r[2])],d=!0)},p(k,[x]){x&1&&n.value!==k[0]&&bt(n,k[0])},i:se,o:se,d(k){k&&G(e),d=!1,ot(g)}}}function Gr(r,e,n){let{onSubmit:t}=e,o="";function i(c){c.key==="Enter"&&(t(o),c.preventDefault())}function s(){t(o)}function l(){o=this.value,n(0,o)}return r.$$set=c=>{"onSubmit"in c&&n(3,t=c.onSubmit)},[o,i,s,t,l]}class Ur extends Se{constructor(e){super(),$e(this,e,Gr,zr,xe,{onSubmit:3})}}function Zr(r){let e;return{c(){e=E("div"),e.innerHTML=' Sidebar ',v(e,"class","lg:hidden flex justify-end mb-2 sm:mb-3")},m(n,t){U(n,e,t)},p:se,i:se,o:se,d(n){n&&G(e)}}}class Wr extends Se{constructor(e){super(),$e(this,e,null,Zr,xe,{})}}function Fr(r){let e,n,t,o;return{c(){e=E("button"),n=we(r[0]),v(e,"type","button"),v(e,"class","mb-2.5 mr-1.5 py-2 px-3 inline-flex justify-center items-center gap-x-2 rounded-md border border-blue-600 bg-white text-blue-600 align-middle hover:bg-blue-50 text-sm dark:bg-slate-900 dark:text-blue-500 dark:border-blue-500 dark:hover:text-blue-400 dark:hover:border-blue-400")},m(i,s){U(i,e,s),w(e,n),t||(o=je(e,"click",r[1]),t=!0)},p(i,[s]){s&1&&Ve(n,i[0])},i:se,o:se,d(i){i&&G(e),t=!1,o()}}}function Yr(r,e,n){let{message:t}=e,{onSubmit:o}=e;function i(){o(t)}return r.$$set=s=>{"message"in s&&n(0,t=s.message),"onSubmit"in s&&n(2,o=s.onSubmit)},[t,i,o]}class Ht extends Se{constructor(e){super(),$e(this,e,Yr,Fr,xe,{message:0,onSubmit:2})}}function Jr(r){let e,n,t,o,i,s;const l=r[1].default,c=Gt(l,r,r[0],null);return{c(){e=E("li"),n=E("img"),o=Z(),i=E("div"),c&&c.c(),or(n.src,t="/vanna.svg")||v(n,"src",t),v(n,"class","flex-shrink-0 w-[2.375rem] h-[2.375rem] "),v(n,"alt","agent logo"),v(i,"class","space-y-3 overflow-x-auto overflow-y-hidden"),v(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(a,d){U(a,e,d),w(e,n),w(e,o),w(e,i),c&&c.m(i,null),s=!0},p(a,[d]){c&&c.p&&(!s||d&1)&&Zt(c,l,a,a[0],s?Ut(l,a[0],d,null):Wt(a[0]),null)},i(a){s||(M(c,a),s=!0)},o(a){I(c,a),s=!1},d(a){a&&G(e),c&&c.d(a)}}}function Kr(r,e,n){let{$$slots:t={},$$scope:o}=e;return r.$$set=i=>{"$$scope"in i&&n(0,o=i.$$scope)},[o,t]}class Ke extends Se{constructor(e){super(),$e(this,e,Kr,Jr,xe,{})}}function Xr(r){let e;return{c(){e=we("Thinking...")},m(n,t){U(n,e,t)},d(n){n&&G(e)}}}function eo(r){let e,n,t,o,i,s,l;return s=new lt({props:{$$slots:{default:[Xr]},$$scope:{ctx:r}}}),{c(){e=E("li"),n=E("img"),o=Z(),i=E("div"),J(s.$$.fragment),or(n.src,t="/vanna.svg")||v(n,"src",t),v(n,"class","flex-shrink-0 w-[2.375rem] h-[2.375rem] animate-bounce "),v(n,"alt","agent logo"),v(i,"class","space-y-3"),v(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(c,a){U(c,e,a),w(e,n),w(e,o),w(e,i),F(s,i,null),l=!0},p(c,[a]){const d={};a&1&&(d.$$scope={dirty:a,ctx:c}),s.$set(d)},i(c){l||(M(s.$$.fragment,c),l=!0)},o(c){I(s.$$.fragment,c),l=!1},d(c){c&&G(e),Y(s)}}}class to extends Se{constructor(e){super(),$e(this,e,null,eo,xe,{})}}function no(r){let e,n,t,o,i,s,l,c,a,d,g;return{c(){e=E("ul"),n=E("li"),t=E("div"),o=E("span"),o.textContent="CSV",i=Z(),s=E("a"),l=Pt("svg"),c=Pt("path"),a=Pt("path"),d=we(`
- Download`),v(o,"class","mr-3 flex-1 w-0 truncate"),v(c,"d","M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"),v(a,"d","M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"),v(l,"class","flex-shrink-0 w-3 h-3"),v(l,"width","16"),v(l,"height","16"),v(l,"viewBox","0 0 16 16"),v(l,"fill","currentColor"),v(s,"class","flex items-center gap-x-2 text-gray-500 hover:text-blue-500 whitespace-nowrap"),v(s,"href",g="/api/v0/download_csv?id="+r[0]),v(t,"class","w-full flex justify-between truncate"),v(n,"class","flex items-center gap-x-2 p-3 text-sm bg-white border text-gray-800 first:rounded-t-lg first:mt-0 last:rounded-b-lg dark:bg-slate-900 dark:border-gray-700 dark:text-gray-200"),v(e,"class","flex flex-col justify-end text-start -space-y-px")},m(k,x){U(k,e,x),w(e,n),w(n,t),w(t,o),w(t,i),w(t,s),w(s,l),w(l,c),w(l,a),w(s,d)},p(k,[x]){x&1&&g!==(g="/api/v0/download_csv?id="+k[0])&&v(s,"href",g)},i:se,o:se,d(k){k&&G(e)}}}function ro(r,e,n){let{id:t}=e;return r.$$set=o=>{"id"in o&&n(0,t=o.id)},[t]}class oo extends Se{constructor(e){super(),$e(this,e,ro,no,xe,{id:0})}}function En(r,e,n){const t=r.slice();return t[4]=e[n],t}function Cn(r,e,n){const t=r.slice();return t[7]=e[n],t}function jn(r,e,n){const t=r.slice();return t[7]=e[n],t}function Pn(r){let e,n,t,o;return{c(){e=E("th"),n=E("div"),t=E("span"),t.textContent=`${r[7]}`,o=Z(),v(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),v(n,"class","flex items-center gap-x-2"),v(e,"scope","col"),v(e,"class","px-6 py-3 text-left")},m(i,s){U(i,e,s),w(e,n),w(n,t),w(e,o)},p:se,d(i){i&&G(e)}}}function qn(r){let e,n,t;return{c(){e=E("td"),n=E("div"),t=E("span"),t.textContent=`${r[4][r[7]]}`,v(t,"class","text-gray-800 dark:text-gray-200"),v(n,"class","px-6 py-3"),v(e,"class","h-px w-px whitespace-nowrap")},m(o,i){U(o,e,i),w(e,n),w(n,t)},p:se,d(o){o&&G(e)}}}function An(r){let e,n,t=_e(r[2]),o=[];for(let i=0;i0?Object.keys(i[0]):[];return r.$$set=l=>{"id"in l&&n(0,t=l.id),"df"in l&&n(3,o=l.df)},[t,i,s,o]}class ar extends Se{constructor(e){super(),$e(this,e,so,io,xe,{id:0,df:3})}}function lo(r){let e;return{c(){e=E("div"),v(e,"id",r[0])},m(n,t){U(n,e,t)},p:se,i:se,o:se,d(n){n&&G(e)}}}function ao(r,e,n){let{fig:t}=e,o=JSON.parse(t),i=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);return sr(()=>{Plotly.newPlot(document.getElementById(i),o,{responsive:!0})}),r.$$set=s=>{"fig"in s&&n(1,t=s.fig)},[i,t]}class cr extends Se{constructor(e){super(),$e(this,e,ao,lo,xe,{fig:1})}}function co(r){let e,n,t,o;return{c(){e=E("button"),n=we(r[0]),v(e,"type","button"),v(e,"class","mb-2.5 mr-1.5 py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border-2 border-green-200 font-semibold text-green-500 hover:text-white hover:bg-green-500 hover:border-green-500 focus:outline-none focus:ring-2 focus:ring-green-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(i,s){U(i,e,s),w(e,n),t||(o=je(e,"click",r[1]),t=!0)},p(i,[s]){s&1&&Ve(n,i[0])},i:se,o:se,d(i){i&&G(e),t=!1,o()}}}function uo(r,e,n){let{message:t}=e,{onSubmit:o}=e;function i(){o(t)}return r.$$set=s=>{"message"in s&&n(0,t=s.message),"onSubmit"in s&&n(2,o=s.onSubmit)},[t,i,o]}class ur extends Se{constructor(e){super(),$e(this,e,uo,co,xe,{message:0,onSubmit:2})}}function fo(r){let e,n,t,o,i,s,l,c,a;return{c(){e=E("div"),n=E("div"),t=E("div"),t.innerHTML=' ',o=Z(),i=E("div"),s=E("h3"),s.textContent="Error",l=Z(),c=E("div"),a=we(r[0]),v(t,"class","flex-shrink-0"),v(s,"class","text-sm text-yellow-800 font-semibold"),v(c,"class","mt-1 text-sm text-yellow-700"),v(i,"class","ml-4"),v(n,"class","flex"),v(e,"class","bg-yellow-50 border border-yellow-200 rounded-md p-4"),v(e,"role","alert")},m(d,g){U(d,e,g),w(e,n),w(n,t),w(n,o),w(n,i),w(i,s),w(i,l),w(i,c),w(c,a)},p(d,[g]){g&1&&Ve(a,d[0])},i:se,o:se,d(d){d&&G(e)}}}function po(r,e,n){let{message:t}=e;return r.$$set=o=>{"message"in o&&n(0,t=o.message)},[t]}let fr=class extends Se{constructor(e){super(),$e(this,e,po,fo,xe,{message:0})}};function go(r){let e,n;const t=r[1].default,o=Gt(t,r,r[0],null);return{c(){e=E("div"),o&&o.c(),v(e,"class","font-mono whitespace-pre-wrap")},m(i,s){U(i,e,s),o&&o.m(e,null),n=!0},p(i,[s]){o&&o.p&&(!n||s&1)&&Zt(o,t,i,i[0],n?Ut(t,i[0],s,null):Wt(i[0]),null)},i(i){n||(M(o,i),n=!0)},o(i){I(o,i),n=!1},d(i){i&&G(e),o&&o.d(i)}}}function ho(r,e,n){let{$$slots:t={},$$scope:o}=e;return r.$$set=i=>{"$$scope"in i&&n(0,o=i.$$scope)},[o,t]}class dr extends Se{constructor(e){super(),$e(this,e,ho,go,xe,{})}}function mo(r){let e,n,t,o,i,s;return t=new Ht({props:{message:"Train",onSubmit:r[3]}}),{c(){e=E("textarea"),n=Z(),J(t.$$.fragment),v(e,"rows","6"),v(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),v(e,"placeholder","SELECT col1, col2, col3 FROM ...")},m(l,c){U(l,e,c),bt(e,r[1]),U(l,n,c),F(t,l,c),o=!0,i||(s=je(e,"input",r[2]),i=!0)},p(l,[c]){c&2&&bt(e,l[1]);const a={};c&3&&(a.onSubmit=l[3]),t.$set(a)},i(l){o||(M(t.$$.fragment,l),o=!0)},o(l){I(t.$$.fragment,l),o=!1},d(l){l&&(G(e),G(n)),Y(t,l),i=!1,s()}}}function yo(r,e,n){let{onSubmit:t}=e,o;function i(){o=this.value,n(1,o)}const s=()=>t(o);return r.$$set=l=>{"onSubmit"in l&&n(0,t=l.onSubmit)},[t,o,i,s]}class bo extends Se{constructor(e){super(),$e(this,e,yo,mo,xe,{onSubmit:0})}}function Dn(r,e,n){const t=r.slice();return t[12]=e[n],t}function Hn(r,e,n){const t=r.slice();return t[15]=e[n],t}function Mn(r,e,n){const t=r.slice();return t[18]=e[n],t}function Rn(r,e,n){const t=r.slice();return t[18]=e[n],t}function Bn(r){let e,n;return e=new Ke({props:{$$slots:{default:[_o]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388618&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function In(r){let e,n;return e=new Ht({props:{message:r[18],onSubmit:r[3]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&2&&(i.message=t[18]),o&8&&(i.onSubmit=t[3]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function vo(r){let e=r[1].header+"",n,t,o,i,s=_e(r[1].questions),l=[];for(let a=0;aI(l[a],1,1,()=>{l[a]=null});return{c(){n=we(e),t=Z();for(let a=0;a{d[m]=null}),Qe()),~i?(s=d[i],s||(s=d[i]=a[i](k),s.c()),M(s,1),s.m(l.parentNode,l)):s=null)},i(k){c||(M(e.$$.fragment,k),M(t.$$.fragment,k),M(s),c=!0)},o(k){I(e.$$.fragment,k),I(t.$$.fragment,k),I(s),c=!1},d(k){k&&(G(n),G(o),G(l)),Y(e,k),Y(t,k),~i&&d[i].d(k)}}}function Lo(r){let e,n;return e=new Ke({props:{$$slots:{default:[Zo]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388612&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function To(r){let e,n;return e=new Ke({props:{$$slots:{default:[Fo]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388620&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Eo(r){let e,n;return e=new Ke({props:{$$slots:{default:[Ko]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388612&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Co(r){let e,n;return e=new Mt({props:{message:r[15].question}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.message=t[15].question),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function jo(r){let e=JSON.stringify(r[15])+"",n;return{c(){n=we(e)},m(t,o){U(t,n,o)},p(t,o){o&4&&e!==(e=JSON.stringify(t[15])+"")&&Ve(n,e)},d(t){t&&G(n)}}}function Po(r){let e,n;return e=new lt({props:{$$slots:{default:[jo]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388612&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function qo(r){let e=r[15].text+"",n;return{c(){n=we(e)},m(t,o){U(t,n,o)},p(t,o){o&4&&e!==(e=t[15].text+"")&&Ve(n,e)},d(t){t&&G(n)}}}function Ao(r){let e,n;return e=new lt({props:{$$slots:{default:[qo]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388612&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Do(r){let e,n;return e=new bo({props:{onSubmit:r[6]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&64&&(i.onSubmit=t[6]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Ho(r){let e=r[15].sql+"",n;return{c(){n=we(e)},m(t,o){U(t,n,o)},p(t,o){o&4&&e!==(e=t[15].sql+"")&&Ve(n,e)},d(t){t&&G(n)}}}function Mo(r){let e,n;return e=new dr({props:{$$slots:{default:[Ho]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388612&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Ro(r){let e,n;return e=new lt({props:{$$slots:{default:[Mo]},$$scope:{ctx:r}}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8388612&&(i.$$scope={dirty:o,ctx:t}),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Bo(r){let e,n;return e=new ar({props:{id:r[15].id,df:r[15].df}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.id=t[15].id),o&4&&(i.df=t[15].df),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Io(r){let e,n;return e=new cr({props:{fig:r[15].fig}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.fig=t[15].fig),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function No(r){let e,n;return e=new fr({props:{message:r[15].error}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.message=t[15].error),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Qo(r){let e,n;return e=new cr({props:{fig:r[15].fig}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.fig=t[15].fig),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Vo(r){let e;return{c(){e=we("Were the results correct?")},m(n,t){U(n,e,t)},d(n){n&&G(e)}}}function Nn(r){let e,n,t,o;return e=new Ht({props:{message:"Yes",onSubmit:r[9]}}),t=new Ht({props:{message:"No",onSubmit:r[10]}}),{c(){J(e.$$.fragment),n=Z(),J(t.$$.fragment)},m(i,s){F(e,i,s),U(i,n,s),F(t,i,s),o=!0},p(i,s){const l={};s&1&&(l.onSubmit=i[9]),e.$set(l);const c={};s&1&&(c.onSubmit=i[10]),t.$set(c)},i(i){o||(M(e.$$.fragment,i),M(t.$$.fragment,i),o=!0)},o(i){I(e.$$.fragment,i),I(t.$$.fragment,i),o=!1},d(i){i&&G(n),Y(e,i),Y(t,i)}}}function zo(r){let e,n,t,o;e=new lt({props:{$$slots:{default:[Vo]},$$scope:{ctx:r}}});let i=r[0]===null&&Nn(r);return{c(){J(e.$$.fragment),n=Z(),i&&i.c(),t=nt()},m(s,l){F(e,s,l),U(s,n,l),i&&i.m(s,l),U(s,t,l),o=!0},p(s,l){const c={};l&8388608&&(c.$$scope={dirty:l,ctx:s}),e.$set(c),s[0]===null?i?(i.p(s,l),l&1&&M(i,1)):(i=Nn(s),i.c(),M(i,1),i.m(t.parentNode,t)):i&&(Ne(),I(i,1,1,()=>{i=null}),Qe())},i(s){o||(M(e.$$.fragment,s),M(i),o=!0)},o(s){I(e.$$.fragment,s),I(i),o=!1},d(s){s&&(G(n),G(t)),Y(e,s),i&&i.d(s)}}}function Go(r){let e,n;return e=new Mt({props:{message:"No, the results were not correct."}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Uo(r){let e,n;return e=new Mt({props:{message:"Yes, the results were correct."}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Zo(r){let e,n;return e=new ar({props:{id:r[15].id,df:r[15].df}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.id=t[15].id),o&4&&(i.df=t[15].df),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Qn(r){let e,n;return e=new Ht({props:{message:r[18],onSubmit:r[3]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&4&&(i.message=t[18]),o&8&&(i.onSubmit=t[3]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Wo(r){let e=r[15].header+"",n,t,o,i,s=_e(r[15].questions),l=[];for(let a=0;aI(l[a],1,1,()=>{l[a]=null});return{c(){n=we(e),t=Z();for(let a=0;a{s[d]=null}),Qe(),n=s[e],n?n.p(c,a):(n=s[e]=i[e](c),n.c()),M(n,1),n.m(t.parentNode,t))},i(c){o||(M(n),o=!0)},o(c){I(n),o=!1},d(c){c&&G(t),s[e].d(c)}}}function zn(r){let e,n;return e=new to({}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Xo(r){let e,n;return e=new Ur({props:{onSubmit:r[3]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8&&(i.onSubmit=t[3]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function ei(r){let e,n,t,o;e=new ur({props:{message:"New Question",onSubmit:r[5]}});let i=_e(r[2]),s=[];for(let c=0;cI(s[c],1,1,()=>{s[c]=null});return{c(){J(e.$$.fragment),n=Z();for(let c=0;c{t=null}),Qe())},i(o){n||(M(t),n=!0)},o(o){I(t),n=!1},d(o){o&&G(e),t&&t.d(o)}}}function ti(r){let e,n,t,o,i,s,l,c,a,d,g,k,x,D;t=new Rr({});let L=r[1]&&r[1].type=="question_list"&&!r[7]&&Bn(r),m=_e(r[2]),h=[];for(let u=0;uI(h[u],1,1,()=>{h[u]=null});let _=r[8]&&zn();d=new Wr({});const A=[ei,Xo],P=[];function T(u,f){return u[7]?0:1}return k=T(r),x=P[k]=A[k](r),{c(){e=E("div"),n=E("div"),J(t.$$.fragment),o=Z(),L&&L.c(),i=Z(),s=E("ul");for(let u=0;u{L=null}),Qe()),f&77){m=_e(u[2]);let C;for(C=0;C{_=null}),Qe());let O=k;k=T(u),k===O?P[k].p(u,f):(Ne(),I(P[O],1,1,()=>{P[O]=null}),Qe(),x=P[k],x?x.p(u,f):(x=P[k]=A[k](u),x.c()),M(x,1),x.m(a,null))},i(u){if(!D){M(t.$$.fragment,u),M(L);for(let f=0;fn(0,d=!0),x=()=>n(0,d=!1),D=L=>L.type==="question_cache"?s(L.id):void 0;return r.$$set=L=>{"suggestedQuestions"in L&&n(1,t=L.suggestedQuestions),"messageLog"in L&&n(2,o=L.messageLog),"newQuestion"in L&&n(3,i=L.newQuestion),"rerunSql"in L&&n(4,s=L.rerunSql),"clearMessages"in L&&n(5,l=L.clearMessages),"onUpdateSql"in L&&n(6,c=L.onUpdateSql),"question_asked"in L&&n(7,a=L.question_asked),"marked_correct"in L&&n(0,d=L.marked_correct),"thinking"in L&&n(8,g=L.thinking)},[d,t,o,i,s,l,c,a,g,k,x,D]}class ri extends Se{constructor(e){super(),$e(this,e,ni,ti,xe,{suggestedQuestions:1,messageLog:2,newQuestion:3,rerunSql:4,clearMessages:5,onUpdateSql:6,question_asked:7,marked_correct:0,thinking:8})}}function oi(r){let e,n,t,o,i,s,l,c,a,d,g,k,x,D,L,m,h,p,_;return{c(){e=E("div"),n=E("div"),t=E("div"),o=E("div"),i=E("h3"),i.textContent="Are you sure?",s=Z(),l=E("button"),l.innerHTML='Close ',c=Z(),a=E("div"),d=E("p"),g=we(r[0]),k=Z(),x=E("div"),D=E("button"),D.textContent="Close",L=Z(),m=E("button"),h=we(r[1]),v(i,"class","font-bold text-gray-800 dark:text-white"),v(l,"type","button"),v(l,"class","hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800"),v(l,"data-hs-overlay","#hs-vertically-centered-modal"),v(o,"class","flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"),v(d,"class","text-gray-800 dark:text-gray-400"),v(a,"class","p-4 overflow-y-auto"),v(D,"type","button"),v(D,"class","hs-dropdown-toggle py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),v(D,"data-hs-overlay","#hs-vertically-centered-modal"),v(m,"class","py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),v(x,"class","flex justify-end items-center gap-x-2 py-3 px-4 border-t dark:border-gray-700"),v(t,"class","flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"),v(n,"class","hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"),v(e,"class","hs-overlay open w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto")},m(A,P){U(A,e,P),w(e,n),w(n,t),w(t,o),w(o,i),w(o,s),w(o,l),w(t,c),w(t,a),w(a,d),w(d,g),w(t,k),w(t,x),w(x,D),w(x,L),w(x,m),w(m,h),p||(_=[je(l,"click",function(){pt(r[2])&&r[2].apply(this,arguments)}),je(D,"click",function(){pt(r[2])&&r[2].apply(this,arguments)}),je(m,"click",function(){pt(r[3])&&r[3].apply(this,arguments)})],p=!0)},p(A,[P]){r=A,P&1&&Ve(g,r[0]),P&2&&Ve(h,r[1])},i:se,o:se,d(A){A&&G(e),p=!1,ot(_)}}}function ii(r,e,n){let{message:t}=e,{buttonLabel:o}=e,{onClose:i}=e,{onConfirm:s}=e;return r.$$set=l=>{"message"in l&&n(0,t=l.message),"buttonLabel"in l&&n(1,o=l.buttonLabel),"onClose"in l&&n(2,i=l.onClose),"onConfirm"in l&&n(3,s=l.onConfirm)},[t,o,i,s]}class si extends Se{constructor(e){super(),$e(this,e,ii,oi,xe,{message:0,buttonLabel:1,onClose:2,onConfirm:3})}}function Zn(r,e,n){const t=r.slice();return t[10]=e[n].name,t[11]=e[n].description,t[12]=e[n].example,t}function Wn(r){let e,n,t,o,i,s,l,c,a,d,g,k;return d=wr(r[7][0]),{c(){e=E("div"),n=E("div"),t=E("input"),o=Z(),i=E("label"),s=E("span"),s.textContent=`${r[10]}`,l=Z(),c=E("span"),c.textContent=`${r[11]}`,a=Z(),v(t,"id","hs-radio-"+r[10]),t.__value=r[10],bt(t,t.__value),v(t,"name","hs-radio-with-description"),v(t,"type","radio"),v(t,"class","border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"),v(t,"aria-describedby","hs-radio-delete-description"),v(n,"class","flex items-center h-5 mt-1"),v(s,"class","block text-sm font-semibold text-gray-800 dark:text-gray-300"),v(c,"id","hs-radio-ddl-description"),v(c,"class","block text-sm text-gray-600 dark:text-gray-500"),v(i,"for","hs-radio-"+r[10]),v(i,"class","ml-3"),v(e,"class","relative flex items-start"),d.p(t)},m(x,D){U(x,e,D),w(e,n),w(n,t),t.checked=t.__value===r[0],w(e,o),w(e,i),w(i,s),w(i,l),w(i,c),w(e,a),g||(k=je(t,"change",r[6]),g=!0)},p(x,D){D&1&&(t.checked=t.__value===x[0])},d(x){x&&G(e),d.r(),g=!1,k()}}}function li(r){let e,n,t,o,i,s,l,c,a,d,g,k,x,D,L,m,h,p,_,A,P,T,u,f,O,C=_e(r[3]),S=[];for(let j=0;jClose ',c=Z(),a=E("span"),a.textContent="Training Data Type",d=Z(),g=E("div");for(let R=0;R{o(l,i.toLowerCase())},a=[[]];function d(){i=this.__value,n(0,i)}const g=x=>x.name===i;function k(){l=this.value,n(2,l)}return r.$$set=x=>{"onDismiss"in x&&n(1,t=x.onDismiss),"onTrain"in x&&n(5,o=x.onTrain),"selectedTrainingDataType"in x&&n(0,i=x.selectedTrainingDataType)},[i,t,l,s,c,o,d,a,g,k]}class ci extends Se{constructor(e){super(),$e(this,e,ai,li,xe,{onDismiss:1,onTrain:5,selectedTrainingDataType:0})}}function Fn(r,e,n){const t=r.slice();return t[21]=e[n],t}function Yn(r,e,n){const t=r.slice();return t[24]=e[n],t}function Jn(r,e,n){const t=r.slice();return t[24]=e[n],t}function Kn(r){let e,n;return e=new ci({props:{onDismiss:r[13],onTrain:r[0]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&1&&(i.onTrain=t[0]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function ui(r){let e;return{c(){e=we("Action")},m(n,t){U(n,e,t)},p:se,d(n){n&&G(e)}}}function fi(r){let e=r[24]+"",n;return{c(){n=we(e)},m(t,o){U(t,n,o)},p:se,d(t){t&&G(n)}}}function Xn(r){let e,n,t,o;function i(c,a){return c[24]!="id"?fi:ui}let l=i(r)(r);return{c(){e=E("th"),n=E("div"),t=E("span"),l.c(),o=Z(),v(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),v(n,"class","flex items-center gap-x-2"),v(e,"scope","col"),v(e,"class","px-6 py-3 text-left")},m(c,a){U(c,e,a),w(e,n),w(n,t),l.m(t,null),w(e,o)},p(c,a){l.p(c,a)},d(c){c&&G(e),l.d()}}}function di(r){let e,n,t;function o(){return r[18](r[21],r[24])}return{c(){e=E("button"),e.textContent="Delete",v(e,"type","button"),v(e,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border-2 border-red-200 font-semibold text-red-500 hover:text-white hover:bg-red-500 hover:border-red-500 focus:outline-none focus:ring-2 focus:ring-red-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(i,s){U(i,e,s),n||(t=je(e,"click",o),n=!0)},p(i,s){r=i},d(i){i&&G(e),n=!1,t()}}}function pi(r){let e,n=r[21][r[24]]+"",t;return{c(){e=E("span"),t=we(n),v(e,"class","text-gray-800 dark:text-gray-200")},m(o,i){U(o,e,i),w(e,t)},p(o,i){i&16&&n!==(n=o[21][o[24]]+"")&&Ve(t,n)},d(o){o&&G(e)}}}function er(r){let e,n;function t(s,l){return s[24]!="id"?pi:di}let i=t(r)(r);return{c(){e=E("td"),n=E("div"),i.c(),v(n,"class","px-6 py-3"),v(e,"class","h-px w-px ")},m(s,l){U(s,e,l),w(e,n),i.m(n,null)},p(s,l){i.p(s,l)},d(s){s&&G(e),i.d()}}}function tr(r){let e,n,t=_e(r[8]),o=[];for(let i=0;iTraining Data Add or remove training data. Good training data is the key to accuracy.
',a=Z(),d=E("div"),g=E("div"),k=E("button"),k.textContent="View all",x=Z(),D=E("button"),D.innerHTML=`
- Add training data`,L=Z(),m=E("table"),h=E("thead"),p=E("tr");for(let X=0;X
- Prev`,at=Z(),me=E("button"),me.innerHTML=`Next
- `,it=Z(),Le&&Le.c(),Ge=nt(),v(k,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),v(D,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),v(g,"class","inline-flex gap-x-2"),v(l,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-b border-gray-200 dark:border-gray-700"),v(h,"class","bg-gray-50 dark:bg-slate-800"),v(A,"class","divide-y divide-gray-200 dark:divide-gray-700"),v(m,"class","min-w-full divide-y divide-gray-200 dark:divide-gray-700"),v(f,"class","text-sm text-gray-600 dark:text-gray-400"),v(S,"class","py-2 px-3 pr-9 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400"),v(C,"class","max-w-sm space-y-3"),v(re,"class","text-sm text-gray-600 dark:text-gray-400"),v(u,"class","inline-flex items-center gap-x-2"),v(ze,"type","button"),v(ze,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),v(me,"type","button"),v(me,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),v(De,"class","inline-flex gap-x-2"),v(T,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-t border-gray-200 dark:border-gray-700"),v(s,"class","bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden dark:bg-slate-900 dark:border-gray-700"),v(i,"class","p-1.5 min-w-full inline-block align-middle"),v(o,"class","-m-1.5 overflow-x-auto"),v(t,"class","flex flex-col"),v(n,"class","max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto")},m(X,He){Te&&Te.m(X,He),U(X,e,He),U(X,n,He),w(n,t),w(t,o),w(o,i),w(i,s),w(s,l),w(l,c),w(l,a),w(l,d),w(d,g),w(g,k),w(g,x),w(g,D),w(s,L),w(s,m),w(m,h),w(h,p);for(let oe=0;oe{Te=null}),Qe()),He&256){ut=_e(X[8]);let oe;for(oe=0;oe{Le=null}),Qe())},i(X){ct||(M(Te),M(Le),ct=!0)},o(X){I(Te),I(Le),ct=!1},d(X){X&&(G(e),G(n),G(it),G(Ge)),Te&&Te.d(X),Je(Pe,X),Je(Oe,X),Le&&Le.d(X),Lt=!1,ot(Tt)}}}function hi(r,e,n){let{df:t}=e,{onTrain:o}=e,{removeTrainingData:i}=e,s=JSON.parse(t),l=s.length>0?Object.keys(s[0]):[],c=10,a=1,d=Math.ceil(s.length/c),g=(a-1)*c,k=a*c,x=s.slice(g,k);const D=()=>{a>1&&n(16,a--,a)},L=()=>{a{n(16,a=1),n(15,c=s.length)};let h=null,p=!1;const _=()=>{n(6,p=!0)},A=()=>{n(6,p=!1)},P=(f,O)=>{n(5,h=f[O])},T=()=>{n(5,h=null)},u=()=>{h&&i(h)};return r.$$set=f=>{"df"in f&&n(14,t=f.df),"onTrain"in f&&n(0,o=f.onTrain),"removeTrainingData"in f&&n(1,i=f.removeTrainingData)},r.$$.update=()=>{r.$$.dirty&98304&&n(2,g=(a-1)*c),r.$$.dirty&98304&&n(3,k=a*c),r.$$.dirty&12&&n(4,x=s.slice(g,k)),r.$$.dirty&32768&&n(17,d=Math.ceil(s.length/c)),r.$$.dirty&196608&&console.log(a,d)},[o,i,g,k,x,h,p,s,l,D,L,m,_,A,t,c,a,d,P,T,u]}class mi extends Se{constructor(e){super(),$e(this,e,hi,gi,xe,{df:14,onTrain:0,removeTrainingData:1})}}function yi(r){let e;return{c(){e=E("div"),e.innerHTML='',v(e,"class","min-h-[15rem] flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]")},m(n,t){U(n,e,t)},p:se,i:se,o:se,d(n){n&&G(e)}}}function bi(r){let e,n,t,o;const i=[_i,vi],s=[];function l(c,a){return c[0].type==="df"?0:c[0].type==="error"?1:-1}return~(e=l(r))&&(n=s[e]=i[e](r)),{c(){n&&n.c(),t=nt()},m(c,a){~e&&s[e].m(c,a),U(c,t,a),o=!0},p(c,a){let d=e;e=l(c),e===d?~e&&s[e].p(c,a):(n&&(Ne(),I(s[d],1,1,()=>{s[d]=null}),Qe()),~e?(n=s[e],n?n.p(c,a):(n=s[e]=i[e](c),n.c()),M(n,1),n.m(t.parentNode,t)):n=null)},i(c){o||(M(n),o=!0)},o(c){I(n),o=!1},d(c){c&&G(t),~e&&s[e].d(c)}}}function vi(r){let e,n;return e=new fr({props:{message:r[0].error}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&1&&(i.message=t[0].error),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function _i(r){let e,n;return e=new mi({props:{df:r[0].df,removeTrainingData:r[1],onTrain:r[2]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&1&&(i.df=t[0].df),o&2&&(i.removeTrainingData=t[1]),o&4&&(i.onTrain=t[2]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function wi(r){let e,n,t,o,i;const s=[bi,yi],l=[];function c(a,d){return a[0]!==null?0:1}return t=c(r),o=l[t]=s[t](r),{c(){e=E("div"),n=E("div"),o.c(),v(n,"class","py-10 lg:py-14"),v(e,"class","relative h-screen w-full lg:pl-64")},m(a,d){U(a,e,d),w(e,n),l[t].m(n,null),i=!0},p(a,[d]){let g=t;t=c(a),t===g?l[t].p(a,d):(Ne(),I(l[g],1,1,()=>{l[g]=null}),Qe(),o=l[t],o?o.p(a,d):(o=l[t]=s[t](a),o.c()),M(o,1),o.m(n,null))},i(a){i||(M(o),i=!0)},o(a){I(o),i=!1},d(a){a&&G(e),l[t].d()}}}function ki(r,e,n){let{trainingData:t}=e,{removeTrainingData:o}=e,{onTrain:i}=e;return r.$$set=s=>{"trainingData"in s&&n(0,t=s.trainingData),"removeTrainingData"in s&&n(1,o=s.removeTrainingData),"onTrain"in s&&n(2,i=s.onTrain)},[t,o,i]}class xi extends Se{constructor(e){super(),$e(this,e,ki,wi,xe,{trainingData:0,removeTrainingData:1,onTrain:2})}}function $i(r){let e,n;return e=new xi({props:{trainingData:r[3],removeTrainingData:r[14],onTrain:r[15]}}),{c(){J(e.$$.fragment)},m(t,o){F(e,t,o),n=!0},p(t,o){const i={};o&8&&(i.trainingData=t[3]),e.$set(i)},i(t){n||(M(e.$$.fragment,t),n=!0)},o(t){I(e.$$.fragment,t),n=!1},d(t){Y(e,t)}}}function Si(r){let e,n,t,o,i;function s(d){r[17](d)}function l(d){r[18](d)}function c(d){r[19](d)}let a={suggestedQuestions:r[2],messageLog:r[1],newQuestion:r[9],rerunSql:r[10],clearMessages:r[8],onUpdateSql:r[16]};return r[4]!==void 0&&(a.question_asked=r[4]),r[5]!==void 0&&(a.thinking=r[5]),r[0]!==void 0&&(a.marked_correct=r[0]),e=new ri({props:a}),At.push(()=>on(e,"question_asked",s)),At.push(()=>on(e,"thinking",l)),At.push(()=>on(e,"marked_correct",c)),{c(){J(e.$$.fragment)},m(d,g){F(e,d,g),i=!0},p(d,g){const k={};g&4&&(k.suggestedQuestions=d[2]),g&2&&(k.messageLog=d[1]),!n&&g&16&&(n=!0,k.question_asked=d[4],nn(()=>n=!1)),!t&&g&32&&(t=!0,k.thinking=d[5],nn(()=>t=!1)),!o&&g&1&&(o=!0,k.marked_correct=d[0],nn(()=>o=!1)),e.$set(k)},i(d){i||(M(e.$$.fragment,d),i=!0)},o(d){I(e.$$.fragment,d),i=!1},d(d){Y(e,d)}}}function Oi(r){let e,n,t,o,i,s;n=new Dr({props:{getTrainingData:r[11],newQuestionPage:r[12],loadQuestionPage:r[13],questionHistory:r[7]}});const l=[Si,$i],c=[];function a(d,g){return d[6]==="chat"?0:d[6]==="training-data"?1:-1}return~(o=a(r))&&(i=c[o]=l[o](r)),{c(){e=E("main"),J(n.$$.fragment),t=Z(),i&&i.c()},m(d,g){U(d,e,g),F(n,e,null),w(e,t),~o&&c[o].m(e,null),s=!0},p(d,[g]){const k={};g&128&&(k.questionHistory=d[7]),n.$set(k);let x=o;o=a(d),o===x?~o&&c[o].p(d,g):(i&&(Ne(),I(c[x],1,1,()=>{c[x]=null}),Qe()),~o?(i=c[o],i?i.p(d,g):(i=c[o]=l[o](d),i.c()),M(i,1),i.m(e,null)):i=null)},i(d){s||(M(n.$$.fragment,d),M(i),s=!0)},o(d){I(n.$$.fragment,d),I(i),s=!1},d(d){d&&G(e),Y(n),~o&&c[o].d()}}}function Li(){setTimeout(()=>{window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},100)}function Ti(r,e,n){sr(async()=>{D(),new URL(window.location.href).hash.slice(1)==="training-data"?L():m()});let t=[],o=null,i=null,s=!1,l=!1,c=null,a,d=[];function g(){n(1,t=[]),n(4,s=!1),n(5,l=!1),n(0,c=null)}function k(q){g(),_({type:"user_question",question:q}),n(4,s=!0),f("generate_sql","GET",{question:q}).then(_).then(B=>{B.type==="sql"&&(window.location.hash=B.id,f("run_sql","GET",{id:B.id}).then(_).then(N=>{N.type==="df"&&f("generate_plotly_figure","GET",{id:N.id}).then(_).then(ie=>{ie.type==="plotly_figure"&&(n(7,d=[...d,{question:q,id:ie.id}]),f("generate_summary","GET",{id:ie.id}).then(_).then(re=>{re.type==="text"&&f("generate_followup_questions","GET",{id:re.id}).then(_)}))})}))})}function x(q){_({type:"user_question",question:"Re-run the SQL"}),f("run_sql","GET",{id:q}).then(_).then(B=>{B.type==="df"&&f("generate_plotly_figure","GET",{id:B.id}).then(_).then(N=>{N.type==="plotly_figure"&&f("generate_followup_questions","GET",{id:N.id}).then(_)})})}function D(){f("get_question_history","GET",[]).then(T)}function L(){window.location.hash="training-data",n(6,a="training-data"),f("get_training_data","GET",[]).then(A)}function m(){window.location.hash="",n(6,a="chat"),g(),o||f("generate_questions","GET",[]).then(P)}function h(q){window.location.hash=q,n(6,a="chat"),g(),n(4,s=!0),f("load_question","GET",{id:q}).then(_)}function p(q){n(3,i=null),f("remove_training_data","POST",{id:q}).then(B=>{f("get_training_data","GET",[]).then(A)})}function _(q){return n(1,t=[...t,q]),Li(),q}function A(q){return n(3,i=q),q}function P(q){return n(2,o=q),q}function T(q){return q.type==="question_history"&&n(7,d=q.questions),q}function u(q,B){n(3,i=null);let N={};N[B]=q,f("train","POST",N).then(A).then(ie=>{ie.type!=="error"&&f("get_training_data","GET",[]).then(A)})}async function f(q,B,N){try{n(5,l=!0);let ie="",re;if(B==="GET")ie=Object.entries(N).filter(([Ae,De])=>Ae!=="endpoint"&&Ae!=="addMessage").map(([Ae,De])=>`${encodeURIComponent(Ae)}=${encodeURIComponent(De)}`).join("&"),re=await fetch(`/api/v0/${q}?${ie}`);else{let Ae=JSON.stringify(N);re=await fetch(`/api/v0/${q}`,{method:"POST",headers:{"Content-Type":"application/json"},body:Ae})}if(!re.ok)throw new Error("The server returned an error. See the server logs for more details.");const Ye=await re.json();return n(5,l=!1),Ye}catch(ie){return n(5,l=!1),{type:"error",error:String(ie)}}}function O(){let q=t.find(B=>B.type==="user_question");if(q&&q.type==="user_question"){let B=t.find(N=>N.type==="sql");if(B&&B.type==="sql")return{question:q.question,sql:B.text}}return null}function C(q){let B=t.find(N=>N.type==="user_question");if(B&&B.type==="user_question"){let N={question:B.question,sql:q};f("train","POST",N),n(1,t=t.filter(ie=>ie.type!=="user_sql")),_({type:"sql",text:q,id:window.location.hash})}}function S(q){s=q,n(4,s)}function j(q){l=q,n(5,l)}function R(q){c=q,n(0,c)}return r.$$.update=()=>{if(r.$$.dirty&1)if(c===!0){let q=O();q&&f("train","POST",q)}else c===!1&&_({type:"user_sql"})},[c,t,o,i,s,l,a,d,g,k,x,L,m,h,p,u,C,S,j,R]}class Ei extends Se{constructor(e){super(),$e(this,e,Ti,Oi,xe,{})}}new Ei({target:document.getElementById("app")});
-"""
+ `,g(t,"class","flex items-center justify-between py-4 pr-4 pl-7"),g(l,"class","flex items-center gap-x-3 py-2 px-3 text-sm text-slate-700 rounded-md hover:bg-gray-100 dark:hover:bg-gray-900 dark:text-slate-400 dark:hover:text-slate-300"),g(s,"class","space-y-1.5 p-4"),g(i,"class","h-full"),g(C,"class","mt-auto"),g(n,"class","hs-accordion-group w-full h-full flex flex-col"),g(n,"data-hs-accordion-always-open",""),g(e,"id","application-sidebar"),g(e,"class","hs-overlay hs-overlay-open:translate-x-0 -translate-x-full transition-all duration-300 transform hidden fixed top-0 left-0 bottom-0 z-[60] w-64 bg-white border-r border-gray-200 overflow-y-auto scrollbar-y lg:block lg:translate-x-0 lg:right-auto lg:bottom-0 dark:scrollbar-y dark:bg-slate-900 dark:border-gray-700")},m(m,w){N(m,e,w),_(e,n),_(n,t),_(n,r),_(n,i),_(i,s),E&&E.m(s,null),_(s,a),_(s,c),_(c,l),_(s,p);for(let q=0;qn(0,t=s)),et(o,Sn,s=>n(1,r=s)),[t,r,s=>{bo(s.id)}]}class qo extends we{constructor(e){super(),_e(this,e,Po,jo,ye,{})}}var Ao={exports:{}};/*! For license information please see preline.js.LICENSE.txt */(function(o,e){(function(n,t){o.exports=t()})(self,function(){return(()=>{var n={661:(s,a,c)=>{function l(E){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},l(E)}function p(E,b){for(var d=0;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var T,u=S(m);if(w){var f=S(this).constructor;T=Reflect.construct(u,arguments,f)}else T=u.apply(this,arguments);return C(this,T)});function R(){return function(T,u){if(!(T instanceof u))throw new TypeError("Cannot call a class as a function")}(this,R),q.call(this,".hs-accordion")}return b=R,(d=[{key:"init",value:function(){var T=this;document.addEventListener("click",function(u){var f=u.target,x=f.closest(T.selector),j=f.closest(".hs-accordion-toggle"),k=f.closest(".hs-accordion-group");x&&k&&j&&(T._hideAll(x),T.show(x))})}},{key:"show",value:function(T){var u=this;if(T.classList.contains("active"))return this.hide(T);T.classList.add("active");var f=T.querySelector(".hs-accordion-content");f.style.display="block",f.style.height=0,setTimeout(function(){f.style.height="".concat(f.scrollHeight,"px")}),this.afterTransition(f,function(){T.classList.contains("active")&&(f.style.height="",u._fireEvent("open",T),u._dispatch("open.hs.accordion",T,T))})}},{key:"hide",value:function(T){var u=this,f=T.querySelector(".hs-accordion-content");f.style.height="".concat(f.scrollHeight,"px"),setTimeout(function(){f.style.height=0}),this.afterTransition(f,function(){T.classList.contains("active")||(f.style.display="",u._fireEvent("hide",T),u._dispatch("hide.hs.accordion",T,T))}),T.classList.remove("active")}},{key:"_hideAll",value:function(T){var u=this,f=T.closest(".hs-accordion-group");f.hasAttribute("data-hs-accordion-always-open")||f.querySelectorAll(this.selector).forEach(function(x){T!==x&&u.hide(x)})}}])&&p(b.prototype,d),Object.defineProperty(b,"prototype",{writable:!1}),R}(c(765).Z);window.HSAccordion=new A,document.addEventListener("load",window.HSAccordion.init())},795:(s,a,c)=>{function l(b){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},l(b)}function p(b,d){(d==null||d>b.length)&&(d=b.length);for(var m=0,w=new Array(d);m"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var u,f=A(w);if(q){var x=A(this).constructor;u=Reflect.construct(f,arguments,x)}else u=f.apply(this,arguments);return S(this,u)});function T(){return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,T),R.call(this,"[data-hs-collapse]")}return d=T,(m=[{key:"init",value:function(){var u=this;document.addEventListener("click",function(f){var x=f.target.closest(u.selector);if(x){var j=document.querySelectorAll(x.getAttribute("data-hs-collapse"));u.toggle(j)}})}},{key:"toggle",value:function(u){var f,x=this;u.length&&(f=u,function(j){if(Array.isArray(j))return p(j)}(f)||function(j){if(typeof Symbol<"u"&&j[Symbol.iterator]!=null||j["@@iterator"]!=null)return Array.from(j)}(f)||function(j,k){if(j){if(typeof j=="string")return p(j,k);var P=Object.prototype.toString.call(j).slice(8,-1);return P==="Object"&&j.constructor&&(P=j.constructor.name),P==="Map"||P==="Set"?Array.from(j):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?p(j,k):void 0}}(f)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()).forEach(function(j){j.classList.contains("hidden")?x.show(j):x.hide(j)})}},{key:"show",value:function(u){var f=this;u.classList.add("open"),u.classList.remove("hidden"),u.style.height=0,document.querySelectorAll(this.selector).forEach(function(x){u.closest(x.getAttribute("data-hs-collapse"))&&x.classList.add("open")}),u.style.height="".concat(u.scrollHeight,"px"),this.afterTransition(u,function(){u.classList.contains("open")&&(u.style.height="",f._fireEvent("open",u),f._dispatch("open.hs.collapse",u,u))})}},{key:"hide",value:function(u){var f=this;u.style.height="".concat(u.scrollHeight,"px"),setTimeout(function(){u.style.height=0}),u.classList.remove("open"),this.afterTransition(u,function(){u.classList.contains("open")||(u.classList.add("hidden"),u.style.height=null,f._fireEvent("hide",u),f._dispatch("hide.hs.collapse",u,u),u.querySelectorAll(".hs-mega-menu-content.block").forEach(function(x){x.classList.remove("block"),x.classList.add("hidden")}))}),document.querySelectorAll(this.selector).forEach(function(x){u.closest(x.getAttribute("data-hs-collapse"))&&x.classList.remove("open")})}}])&&y(d.prototype,m),Object.defineProperty(d,"prototype",{writable:!1}),T}(c(765).Z);window.HSCollapse=new E,document.addEventListener("load",window.HSCollapse.init())},682:(s,a,c)=>{var l=c(714),p=c(765);const y={historyIndex:-1,addHistory:function(q){this.historyIndex=q},existsInHistory:function(q){return q>this.historyIndex},clearHistory:function(){this.historyIndex=-1}};function C(q){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},C(q)}function S(q){return function(R){if(Array.isArray(R))return A(R)}(q)||function(R){if(typeof Symbol<"u"&&R[Symbol.iterator]!=null||R["@@iterator"]!=null)return Array.from(R)}(q)||function(R,T){if(R){if(typeof R=="string")return A(R,T);var u=Object.prototype.toString.call(R).slice(8,-1);return u==="Object"&&R.constructor&&(u=R.constructor.name),u==="Map"||u==="Set"?Array.from(R):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?A(R,T):void 0}}(q)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function A(q,R){(R==null||R>q.length)&&(R=q.length);for(var T=0,u=new Array(R);T"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var k,P=m(u);if(f){var H=m(this).constructor;k=Reflect.construct(P,arguments,H)}else k=P.apply(this,arguments);return d(this,k)});function j(){var k;return function(P,H){if(!(P instanceof H))throw new TypeError("Cannot call a class as a function")}(this,j),(k=x.call(this,".hs-dropdown")).positions={top:"top","top-left":"top-start","top-right":"top-end",bottom:"bottom","bottom-left":"bottom-start","bottom-right":"bottom-end",right:"right","right-top":"right-start","right-bottom":"right-end",left:"left","left-top":"left-start","left-bottom":"left-end"},k.absoluteStrategyModifiers=function(P){return[{name:"applyStyles",fn:function(H){var I=(window.getComputedStyle(P).getPropertyValue("--strategy")||"absolute").replace(" ",""),W=(window.getComputedStyle(P).getPropertyValue("--adaptive")||"adaptive").replace(" ","");H.state.elements.popper.style.position=I,H.state.elements.popper.style.transform=W==="adaptive"?H.state.styles.popper.transform:null,H.state.elements.popper.style.top=null,H.state.elements.popper.style.bottom=null,H.state.elements.popper.style.left=null,H.state.elements.popper.style.right=null,H.state.elements.popper.style.margin=0}},{name:"computeStyles",options:{adaptive:!1}}]},k._history=y,k}return R=j,T=[{key:"init",value:function(){var k=this;document.addEventListener("click",function(P){var H=P.target,I=H.closest(k.selector),W=H.closest(".hs-dropdown-menu");if(I&&I.classList.contains("open")||k._closeOthers(I),W){var J=(window.getComputedStyle(I).getPropertyValue("--auto-close")||"").replace(" ","");if((J=="false"||J=="inside")&&!I.parentElement.closest(k.selector))return}I&&(I.classList.contains("open")?k.close(I):k.open(I))}),document.addEventListener("mousemove",function(P){var H=P.target,I=H.closest(k.selector);if(H.closest(".hs-dropdown-menu"),I){var W=(window.getComputedStyle(I).getPropertyValue("--trigger")||"click").replace(" ","");if(W!=="hover")return;I&&I.classList.contains("open")||k._closeOthers(I),W!=="hover"||I.classList.contains("open")||/iPad|iPhone|iPod/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)||k._hover(H)}}),document.addEventListener("keydown",this._keyboardSupport.bind(this)),window.addEventListener("resize",function(){document.querySelectorAll(".hs-dropdown.open").forEach(function(P){k.close(P,!0)})})}},{key:"_closeOthers",value:function(){var k=this,P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,H=document.querySelectorAll("".concat(this.selector,".open"));H.forEach(function(I){if(!P||P.closest(".hs-dropdown.open")!==I){var W=(window.getComputedStyle(I).getPropertyValue("--auto-close")||"").replace(" ","");W!="false"&&W!="outside"&&k.close(I)}})}},{key:"_hover",value:function(k){var P=this,H=k.closest(this.selector);this.open(H),document.addEventListener("mousemove",function I(W){W.target.closest(P.selector)&&W.target.closest(P.selector)!==H.parentElement.closest(P.selector)||(P.close(H),document.removeEventListener("mousemove",I,!0))},!0)}},{key:"close",value:function(k){var P=this,H=arguments.length>1&&arguments[1]!==void 0&&arguments[1],I=k.querySelector(".hs-dropdown-menu"),W=function(){k.classList.contains("open")||(I.classList.remove("block"),I.classList.add("hidden"),I.style.inset=null,I.style.position=null,k._popper&&k._popper.destroy())};H||this.afterTransition(k.querySelector("[data-hs-dropdown-transition]")||I,function(){W()}),I.style.margin=null,k.classList.remove("open"),H&&W(),this._fireEvent("close",k),this._dispatch("close.hs.dropdown",k,k);var J=I.querySelectorAll(".hs-dropdown.open");J.forEach(function(Oe){P.close(Oe,!0)})}},{key:"open",value:function(k){var P=k.querySelector(".hs-dropdown-menu"),H=(window.getComputedStyle(k).getPropertyValue("--placement")||"").replace(" ",""),I=(window.getComputedStyle(k).getPropertyValue("--strategy")||"fixed").replace(" ",""),W=((window.getComputedStyle(k).getPropertyValue("--adaptive")||"adaptive").replace(" ",""),parseInt((window.getComputedStyle(k).getPropertyValue("--offset")||"10").replace(" ","")));if(I!=="static"){k._popper&&k._popper.destroy();var J=(0,l.fi)(k,P,{placement:this.positions[H]||"bottom-start",strategy:I,modifiers:[].concat(S(I!=="fixed"?this.absoluteStrategyModifiers(k):[]),[{name:"offset",options:{offset:[0,W]}}])});k._popper=J}P.style.margin=null,P.classList.add("block"),P.classList.remove("hidden"),setTimeout(function(){k.classList.add("open")}),this._fireEvent("open",k),this._dispatch("open.hs.dropdown",k,k)}},{key:"_keyboardSupport",value:function(k){var P=document.querySelector(".hs-dropdown.open");if(P)return k.keyCode===27?(k.preventDefault(),this._esc(P)):k.keyCode===40?(k.preventDefault(),this._down(P)):k.keyCode===38?(k.preventDefault(),this._up(P)):k.keyCode===36?(k.preventDefault(),this._start(P)):k.keyCode===35?(k.preventDefault(),this._end(P)):void this._byChar(P,k.key)}},{key:"_esc",value:function(k){this.close(k)}},{key:"_up",value:function(k){var P=k.querySelector(".hs-dropdown-menu"),H=S(P.querySelectorAll("a")).reverse().filter(function(J){return!J.disabled}),I=P.querySelector("a:focus"),W=H.findIndex(function(J){return J===I});W+1{function l(b){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},l(b)}function p(b,d){(d==null||d>b.length)&&(d=b.length);for(var m=0,w=new Array(d);m"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var u,f=A(w);if(q){var x=A(this).constructor;u=Reflect.construct(f,arguments,x)}else u=f.apply(this,arguments);return S(this,u)});function T(){var u;return function(f,x){if(!(f instanceof x))throw new TypeError("Cannot call a class as a function")}(this,T),(u=R.call(this,"[data-hs-overlay]")).openNextOverlay=!1,u}return d=T,(m=[{key:"init",value:function(){var u=this;document.addEventListener("click",function(f){var x=f.target.closest(u.selector),j=f.target.closest("[data-hs-overlay-close]"),k=f.target.getAttribute("aria-overlay")==="true";return j?u.close(j.closest(".hs-overlay.open")):x?u.toggle(document.querySelector(x.getAttribute("data-hs-overlay"))):void(k&&u._onBackdropClick(f.target))}),document.addEventListener("keydown",function(f){if(f.keyCode===27){var x=document.querySelector(".hs-overlay.open");if(!x)return;setTimeout(function(){x.getAttribute("data-hs-overlay-keyboard")!=="false"&&u.close(x)})}})}},{key:"toggle",value:function(u){u&&(u.classList.contains("hidden")?this.open(u):this.close(u))}},{key:"open",value:function(u){var f=this;if(u){var x=document.querySelector(".hs-overlay.open"),j=this.getClassProperty(u,"--body-scroll","false")!=="true";if(x)return this.openNextOverlay=!0,this.close(x).then(function(){f.open(u),f.openNextOverlay=!1});j&&(document.body.style.overflow="hidden"),this._buildBackdrop(u),this._checkTimer(u),this._autoHide(u),u.classList.remove("hidden"),u.setAttribute("aria-overlay","true"),u.setAttribute("tabindex","-1"),setTimeout(function(){u.classList.contains("hidden")||(u.classList.add("open"),f._fireEvent("open",u),f._dispatch("open.hs.overlay",u,u),f._focusInput(u))},50)}}},{key:"close",value:function(u){var f=this;return new Promise(function(x){u&&(u.classList.remove("open"),u.removeAttribute("aria-overlay"),u.removeAttribute("tabindex","-1"),f.afterTransition(u,function(){u.classList.contains("open")||(u.classList.add("hidden"),f._destroyBackdrop(),f._fireEvent("close",u),f._dispatch("close.hs.overlay",u,u),document.body.style.overflow="",x(u))}))})}},{key:"_autoHide",value:function(u){var f=this,x=parseInt(this.getClassProperty(u,"--auto-hide","0"));x&&(u.autoHide=setTimeout(function(){f.close(u)},x))}},{key:"_checkTimer",value:function(u){u.autoHide&&(clearTimeout(u.autoHide),delete u.autoHide)}},{key:"_onBackdropClick",value:function(u){this.getClassProperty(u,"--overlay-backdrop","true")!=="static"&&this.close(u)}},{key:"_buildBackdrop",value:function(u){var f,x=this,j=u.getAttribute("data-hs-overlay-backdrop-container")||!1,k=document.createElement("div"),P="transition duration fixed inset-0 z-50 bg-gray-900 bg-opacity-50 dark:bg-opacity-80 hs-overlay-backdrop",H=function(J,Oe){var ae=typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(!ae){if(Array.isArray(J)||(ae=function(be,ft){if(be){if(typeof be=="string")return p(be,ft);var Qe=Object.prototype.toString.call(be).slice(8,-1);return Qe==="Object"&&be.constructor&&(Qe=be.constructor.name),Qe==="Map"||Qe==="Set"?Array.from(be):Qe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Qe)?p(be,ft):void 0}}(J))||Oe&&J&&typeof J.length=="number"){ae&&(J=ae);var rt=0,nt=function(){};return{s:nt,n:function(){return rt>=J.length?{done:!0}:{done:!1,value:J[rt++]}},e:function(be){throw be},f:nt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ge,Ue=!0,ht=!1;return{s:function(){ae=ae.call(J)},n:function(){var be=ae.next();return Ue=be.done,be},e:function(be){ht=!0,Ge=be},f:function(){try{Ue||ae.return==null||ae.return()}finally{if(ht)throw Ge}}}}(u.classList.values());try{for(H.s();!(f=H.n()).done;){var I=f.value;I.startsWith("hs-overlay-backdrop-open:")&&(P+=" ".concat(I))}}catch(J){H.e(J)}finally{H.f()}var W=this.getClassProperty(u,"--overlay-backdrop","true")!=="static";this.getClassProperty(u,"--overlay-backdrop","true")==="false"||(j&&((k=document.querySelector(j).cloneNode(!0)).classList.remove("hidden"),P=k.classList,k.classList=""),W&&k.addEventListener("click",function(){return x.close(u)},!0),k.setAttribute("data-hs-overlay-backdrop-template",""),document.body.appendChild(k),setTimeout(function(){k.classList=P}))}},{key:"_destroyBackdrop",value:function(){var u=document.querySelector("[data-hs-overlay-backdrop-template]");u&&(this.openNextOverlay&&(u.style.transitionDuration="".concat(1.8*parseFloat(window.getComputedStyle(u).transitionDuration.replace(/[^\d.-]/g,"")),"s")),u.classList.add("opacity-0"),this.afterTransition(u,function(){u.remove()}))}},{key:"_focusInput",value:function(u){var f=u.querySelector("[autofocus]");f&&f.focus()}}])&&y(d.prototype,m),Object.defineProperty(d,"prototype",{writable:!1}),T}(c(765).Z);window.HSOverlay=new E,document.addEventListener("load",window.HSOverlay.init())},181:(s,a,c)=>{function l(E){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},l(E)}function p(E,b){for(var d=0;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var T,u=S(m);if(w){var f=S(this).constructor;T=Reflect.construct(u,arguments,f)}else T=u.apply(this,arguments);return C(this,T)});function R(){return function(T,u){if(!(T instanceof u))throw new TypeError("Cannot call a class as a function")}(this,R),q.call(this,"[data-hs-remove-element]")}return b=R,(d=[{key:"init",value:function(){var T=this;document.addEventListener("click",function(u){var f=u.target.closest(T.selector);if(f){var x=document.querySelector(f.getAttribute("data-hs-remove-element"));x&&(x.classList.add("hs-removing"),T.afterTransition(x,function(){x.remove()}))}})}}])&&p(b.prototype,d),Object.defineProperty(b,"prototype",{writable:!1}),R}(c(765).Z);window.HSRemoveElement=new A,document.addEventListener("load",window.HSRemoveElement.init())},778:(s,a,c)=>{function l(E){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},l(E)}function p(E,b){for(var d=0;d"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var T,u=S(m);if(w){var f=S(this).constructor;T=Reflect.construct(u,arguments,f)}else T=u.apply(this,arguments);return C(this,T)});function R(){var T;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,R),(T=q.call(this,"[data-hs-scrollspy] ")).activeSection=null,T}return b=R,(d=[{key:"init",value:function(){var T=this;document.querySelectorAll(this.selector).forEach(function(u){var f=document.querySelector(u.getAttribute("data-hs-scrollspy")),x=u.querySelectorAll("[href]"),j=f.children,k=u.getAttribute("data-hs-scrollspy-scrollable-parent")?document.querySelector(u.getAttribute("data-hs-scrollspy-scrollable-parent")):document;Array.from(j).forEach(function(P){P.getAttribute("id")&&k.addEventListener("scroll",function(H){return T._update({$scrollspyEl:u,$scrollspyContentEl:f,links:x,$sectionEl:P,sections:j,ev:H})})}),x.forEach(function(P){P.addEventListener("click",function(H){H.preventDefault(),P.getAttribute("href")!=="javascript:;"&&T._scrollTo({$scrollspyEl:u,$scrollableEl:k,$link:P})})})})}},{key:"_update",value:function(T){var u=T.ev,f=T.$scrollspyEl,x=(T.sections,T.links),j=T.$sectionEl,k=parseInt(this.getClassProperty(f,"--scrollspy-offset","0")),P=this.getClassProperty(j,"--scrollspy-offset")||k,H=u.target===document?0:parseInt(u.target.getBoundingClientRect().top),I=parseInt(j.getBoundingClientRect().top)-P-H,W=j.offsetHeight;if(I<=0&&I+W>0){if(this.activeSection===j)return;x.forEach(function(rt){rt.classList.remove("active")});var J=f.querySelector('[href="#'.concat(j.getAttribute("id"),'"]'));if(J){J.classList.add("active");var Oe=J.closest("[data-hs-scrollspy-group]");if(Oe){var ae=Oe.querySelector("[href]");ae&&ae.classList.add("active")}}this.activeSection=j}}},{key:"_scrollTo",value:function(T){var u=T.$scrollspyEl,f=T.$scrollableEl,x=T.$link,j=document.querySelector(x.getAttribute("href")),k=parseInt(this.getClassProperty(u,"--scrollspy-offset","0")),P=this.getClassProperty(j,"--scrollspy-offset")||k,H=f===document?0:f.offsetTop,I=j.offsetTop-P-H,W=f===document?window:f;this._fireEvent("scroll",u),this._dispatch("scroll.hs.scrollspy",u,u),window.history.replaceState(null,null,x.getAttribute("href")),W.scrollTo({top:I,left:0,behavior:"smooth"})}}])&&p(b.prototype,d),Object.defineProperty(b,"prototype",{writable:!1}),R}(c(765).Z);window.HSScrollspy=new A,document.addEventListener("load",window.HSScrollspy.init())},51:(s,a,c)=>{function l(d){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},l(d)}function p(d){return function(m){if(Array.isArray(m))return y(m)}(d)||function(m){if(typeof Symbol<"u"&&m[Symbol.iterator]!=null||m["@@iterator"]!=null)return Array.from(m)}(d)||function(m,w){if(m){if(typeof m=="string")return y(m,w);var q=Object.prototype.toString.call(m).slice(8,-1);return q==="Object"&&m.constructor&&(q=m.constructor.name),q==="Map"||q==="Set"?Array.from(m):q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(q)?y(m,w):void 0}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function y(d,m){(m==null||m>d.length)&&(m=d.length);for(var w=0,q=new Array(m);w"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var f,x=E(q);if(R){var j=E(this).constructor;f=Reflect.construct(x,arguments,j)}else f=x.apply(this,arguments);return A(this,f)});function u(){return function(f,x){if(!(f instanceof x))throw new TypeError("Cannot call a class as a function")}(this,u),T.call(this,"[data-hs-tab]")}return m=u,(w=[{key:"init",value:function(){var f=this;document.addEventListener("keydown",this._keyboardSupport.bind(this)),document.addEventListener("click",function(x){var j=x.target.closest(f.selector);j&&f.open(j)}),document.querySelectorAll("[hs-data-tab-select]").forEach(function(x){var j=document.querySelector(x.getAttribute("hs-data-tab-select"));j&&j.addEventListener("change",function(k){var P=document.querySelector('[data-hs-tab="'.concat(k.target.value,'"]'));P&&f.open(P)})})}},{key:"open",value:function(f){var x=document.querySelector(f.getAttribute("data-hs-tab")),j=p(f.parentElement.children),k=p(x.parentElement.children),P=f.closest("[hs-data-tab-select]"),H=P?document.querySelector(P.getAttribute("data-hs-tab")):null;j.forEach(function(I){return I.classList.remove("active")}),k.forEach(function(I){return I.classList.add("hidden")}),f.classList.add("active"),x.classList.remove("hidden"),this._fireEvent("change",f),this._dispatch("change.hs.tab",f,f),H&&(H.value=f.getAttribute("data-hs-tab"))}},{key:"_keyboardSupport",value:function(f){var x=f.target.closest(this.selector);if(x){var j=x.closest('[role="tablist"]').getAttribute("data-hs-tabs-vertical")==="true";return(j?f.keyCode===38:f.keyCode===37)?(f.preventDefault(),this._left(x)):(j?f.keyCode===40:f.keyCode===39)?(f.preventDefault(),this._right(x)):f.keyCode===36?(f.preventDefault(),this._start(x)):f.keyCode===35?(f.preventDefault(),this._end(x)):void 0}}},{key:"_right",value:function(f){var x=f.closest('[role="tablist"]');if(x){var j=p(x.querySelectorAll(this.selector)).filter(function(H){return!H.disabled}),k=x.querySelector("button:focus"),P=j.findIndex(function(H){return H===k});P+1{var l=c(765),p=c(714);function y(d){return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},y(d)}function C(d,m){for(var w=0;w"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var f,x=E(q);if(R){var j=E(this).constructor;f=Reflect.construct(x,arguments,j)}else f=x.apply(this,arguments);return A(this,f)});function u(){return function(f,x){if(!(f instanceof x))throw new TypeError("Cannot call a class as a function")}(this,u),T.call(this,".hs-tooltip")}return m=u,(w=[{key:"init",value:function(){var f=this;document.addEventListener("click",function(x){var j=x.target.closest(f.selector);j&&f.getClassProperty(j,"--trigger")==="focus"&&f._focus(j),j&&f.getClassProperty(j,"--trigger")==="click"&&f._click(j)}),document.addEventListener("mousemove",function(x){var j=x.target.closest(f.selector);j&&f.getClassProperty(j,"--trigger")!=="focus"&&f.getClassProperty(j,"--trigger")!=="click"&&f._hover(j)})}},{key:"_hover",value:function(f){var x=this;if(!f.classList.contains("show")){var j=f.querySelector(".hs-tooltip-toggle"),k=f.querySelector(".hs-tooltip-content"),P=this.getClassProperty(f,"--placement");(0,p.fi)(j,k,{placement:P||"top",strategy:"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(f),f.addEventListener("mouseleave",function H(I){I.relatedTarget.closest(x.selector)&&I.relatedTarget.closest(x.selector)==f||(x.hide(f),f.removeEventListener("mouseleave",H,!0))},!0)}}},{key:"_focus",value:function(f){var x=this,j=f.querySelector(".hs-tooltip-toggle"),k=f.querySelector(".hs-tooltip-content"),P=this.getClassProperty(f,"--placement"),H=this.getClassProperty(f,"--strategy");(0,p.fi)(j,k,{placement:P||"top",strategy:H||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(f),f.addEventListener("blur",function I(){x.hide(f),f.removeEventListener("blur",I,!0)},!0)}},{key:"_click",value:function(f){var x=this;if(!f.classList.contains("show")){var j=f.querySelector(".hs-tooltip-toggle"),k=f.querySelector(".hs-tooltip-content"),P=this.getClassProperty(f,"--placement"),H=this.getClassProperty(f,"--strategy");(0,p.fi)(j,k,{placement:P||"top",strategy:H||"fixed",modifiers:[{name:"offset",options:{offset:[0,5]}}]}),this.show(f);var I=function W(J){setTimeout(function(){x.hide(f),f.removeEventListener("click",W,!0),f.removeEventListener("blur",W,!0)})};f.addEventListener("blur",I,!0),f.addEventListener("click",I,!0)}}},{key:"show",value:function(f){var x=this;f.querySelector(".hs-tooltip-content").classList.remove("hidden"),setTimeout(function(){f.classList.add("show"),x._fireEvent("show",f),x._dispatch("show.hs.tooltip",f,f)})}},{key:"hide",value:function(f){var x=f.querySelector(".hs-tooltip-content");f.classList.remove("show"),this._fireEvent("hide",f),this._dispatch("hide.hs.tooltip",f,f),this.afterTransition(x,function(){f.classList.contains("show")||x.classList.add("hidden")})}}])&&C(m.prototype,w),Object.defineProperty(m,"prototype",{writable:!1}),u}(l.Z);window.HSTooltip=new b,document.addEventListener("load",window.HSTooltip.init())},765:(s,a,c)=>{function l(y,C){for(var S=0;Sp});var p=function(){function y(A,E){(function(b,d){if(!(b instanceof d))throw new TypeError("Cannot call a class as a function")})(this,y),this.$collection=[],this.selector=A,this.config=E,this.events={}}var C,S;return C=y,S=[{key:"_fireEvent",value:function(A){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.events.hasOwnProperty(A)&&this.events[A](E)}},{key:"_dispatch",value:function(A,E){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,d=new CustomEvent(A,{detail:{payload:b},bubbles:!0,cancelable:!0,composed:!1});E.dispatchEvent(d)}},{key:"on",value:function(A,E){this.events[A]=E}},{key:"afterTransition",value:function(A,E){window.getComputedStyle(A,null).getPropertyValue("transition")!=="all 0s ease 0s"?A.addEventListener("transitionend",function b(){E(),A.removeEventListener("transitionend",b,!0)},!0):E()}},{key:"getClassProperty",value:function(A,E){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",d=(window.getComputedStyle(A).getPropertyValue(E)||b).replace(" ","");return d}}],S&&l(C.prototype,S),Object.defineProperty(C,"prototype",{writable:!1}),y}()},714:(s,a,c)=>{function l(v){if(v==null)return window;if(v.toString()!=="[object Window]"){var h=v.ownerDocument;return h&&h.defaultView||window}return v}function p(v){return v instanceof l(v).Element||v instanceof Element}function y(v){return v instanceof l(v).HTMLElement||v instanceof HTMLElement}function C(v){return typeof ShadowRoot<"u"&&(v instanceof l(v).ShadowRoot||v instanceof ShadowRoot)}c.d(a,{fi:()=>Ur});var S=Math.max,A=Math.min,E=Math.round;function b(v,h){h===void 0&&(h=!1);var $=v.getBoundingClientRect(),D=1,G=1;if(y(v)&&h){var z=v.offsetHeight,V=v.offsetWidth;V>0&&(D=E($.width)/V||1),z>0&&(G=E($.height)/z||1)}return{width:$.width/D,height:$.height/G,top:$.top/G,right:$.right/D,bottom:$.bottom/G,left:$.left/D,x:$.left/D,y:$.top/G}}function d(v){var h=l(v);return{scrollLeft:h.pageXOffset,scrollTop:h.pageYOffset}}function m(v){return v?(v.nodeName||"").toLowerCase():null}function w(v){return((p(v)?v.ownerDocument:v.document)||window.document).documentElement}function q(v){return b(w(v)).left+d(v).scrollLeft}function R(v){return l(v).getComputedStyle(v)}function T(v){var h=R(v),$=h.overflow,D=h.overflowX,G=h.overflowY;return/auto|scroll|overlay|hidden/.test($+G+D)}function u(v,h,$){$===void 0&&($=!1);var D,G,z=y(h),V=y(h)&&function(te){var Ae=te.getBoundingClientRect(),se=E(Ae.width)/te.offsetWidth||1,he=E(Ae.height)/te.offsetHeight||1;return se!==1||he!==1}(h),Y=w(h),X=b(v,V),ne={scrollLeft:0,scrollTop:0},re={x:0,y:0};return(z||!z&&!$)&&((m(h)!=="body"||T(Y))&&(ne=(D=h)!==l(D)&&y(D)?{scrollLeft:(G=D).scrollLeft,scrollTop:G.scrollTop}:d(D)),y(h)?((re=b(h,!0)).x+=h.clientLeft,re.y+=h.clientTop):Y&&(re.x=q(Y))),{x:X.left+ne.scrollLeft-re.x,y:X.top+ne.scrollTop-re.y,width:X.width,height:X.height}}function f(v){var h=b(v),$=v.offsetWidth,D=v.offsetHeight;return Math.abs(h.width-$)<=1&&($=h.width),Math.abs(h.height-D)<=1&&(D=h.height),{x:v.offsetLeft,y:v.offsetTop,width:$,height:D}}function x(v){return m(v)==="html"?v:v.assignedSlot||v.parentNode||(C(v)?v.host:null)||w(v)}function j(v){return["html","body","#document"].indexOf(m(v))>=0?v.ownerDocument.body:y(v)&&T(v)?v:j(x(v))}function k(v,h){var $;h===void 0&&(h=[]);var D=j(v),G=D===(($=v.ownerDocument)==null?void 0:$.body),z=l(D),V=G?[z].concat(z.visualViewport||[],T(D)?D:[]):D,Y=h.concat(V);return G?Y:Y.concat(k(x(V)))}function P(v){return["table","td","th"].indexOf(m(v))>=0}function H(v){return y(v)&&R(v).position!=="fixed"?v.offsetParent:null}function I(v){for(var h=l(v),$=H(v);$&&P($)&&R($).position==="static";)$=H($);return $&&(m($)==="html"||m($)==="body"&&R($).position==="static")?h:$||function(D){var G=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1;if(navigator.userAgent.indexOf("Trident")!==-1&&y(D)&&R(D).position==="fixed")return null;for(var z=x(D);y(z)&&["html","body"].indexOf(m(z))<0;){var V=R(z);if(V.transform!=="none"||V.perspective!=="none"||V.contain==="paint"||["transform","perspective"].indexOf(V.willChange)!==-1||G&&V.willChange==="filter"||G&&V.filter&&V.filter!=="none")return z;z=z.parentNode}return null}(v)||h}var W="top",J="bottom",Oe="right",ae="left",rt="auto",nt=[W,J,Oe,ae],Ge="start",Ue="end",ht="viewport",be="popper",ft=nt.reduce(function(v,h){return v.concat([h+"-"+Ge,h+"-"+Ue])},[]),Qe=[].concat(nt,[rt]).reduce(function(v,h){return v.concat([h,h+"-"+Ge,h+"-"+Ue])},[]),yt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Bt(v){var h=new Map,$=new Set,D=[];function G(z){$.add(z.name),[].concat(z.requires||[],z.requiresIfExists||[]).forEach(function(V){if(!$.has(V)){var Y=h.get(V);Y&&G(Y)}}),D.push(z)}return v.forEach(function(z){h.set(z.name,z)}),v.forEach(function(z){$.has(z.name)||G(z)}),D}var Nt={placement:"bottom",modifiers:[],strategy:"absolute"};function qe(){for(var v=arguments.length,h=new Array(v),$=0;$=0?"x":"y"}function ee(v){var h,$=v.reference,D=v.element,G=v.placement,z=G?Ve(G):null,V=G?Ee(G):null,Y=$.x+$.width/2-D.width/2,X=$.y+$.height/2-D.height/2;switch(z){case W:h={x:Y,y:$.y-D.height};break;case J:h={x:Y,y:$.y+$.height};break;case Oe:h={x:$.x+$.width,y:X};break;case ae:h={x:$.x-D.width,y:X};break;default:h={x:$.x,y:$.y}}var ne=z?Te(z):null;if(ne!=null){var re=ne==="y"?"height":"width";switch(V){case Ge:h[ne]=h[ne]-($[re]/2-D[re]/2);break;case Ue:h[ne]=h[ne]+($[re]/2-D[re]/2)}}return h}var He={top:"auto",right:"auto",bottom:"auto",left:"auto"};function oe(v){var h,$=v.popper,D=v.popperRect,G=v.placement,z=v.variation,V=v.offsets,Y=v.position,X=v.gpuAcceleration,ne=v.adaptive,re=v.roundOffsets,te=v.isFixed,Ae=V.x,se=Ae===void 0?0:Ae,he=V.y,pe=he===void 0?0:he,ie=typeof re=="function"?re({x:se,y:pe}):{x:se,y:pe};se=ie.x,pe=ie.y;var Me=V.hasOwnProperty("x"),ke=V.hasOwnProperty("y"),fe=ae,ve=W,le=window;if(ne){var ce=I($),de="clientHeight",me="clientWidth";ce===l($)&&R(ce=w($)).position!=="static"&&Y==="absolute"&&(de="scrollHeight",me="scrollWidth"),ce=ce,(G===W||(G===ae||G===Oe)&&z===Ue)&&(ve=J,pe-=(te&&le.visualViewport?le.visualViewport.height:ce[de])-D.height,pe*=X?1:-1),G!==ae&&(G!==W&&G!==J||z!==Ue)||(fe=Oe,se-=(te&&le.visualViewport?le.visualViewport.width:ce[me])-D.width,se*=X?1:-1)}var $e,Be=Object.assign({position:Y},ne&&He),Ie=re===!0?function(Fe){var ot=Fe.x,dt=Fe.y,Je=window.devicePixelRatio||1;return{x:E(ot*Je)/Je||0,y:E(dt*Je)/Je||0}}({x:se,y:pe}):{x:se,y:pe};return se=Ie.x,pe=Ie.y,X?Object.assign({},Be,(($e={})[ve]=ke?"0":"",$e[fe]=Me?"0":"",$e.transform=(le.devicePixelRatio||1)<=1?"translate("+se+"px, "+pe+"px)":"translate3d("+se+"px, "+pe+"px, 0)",$e)):Object.assign({},Be,((h={})[ve]=ke?pe+"px":"",h[fe]=Me?se+"px":"",h.transform="",h))}var wt={left:"right",right:"left",bottom:"top",top:"bottom"};function Ft(v){return v.replace(/left|right|bottom|top/g,function(h){return wt[h]})}var Zr={start:"end",end:"start"};function Ln(v){return v.replace(/start|end/g,function(h){return Zr[h]})}function En(v,h){var $=h.getRootNode&&h.getRootNode();if(v.contains(h))return!0;if($&&C($)){var D=h;do{if(D&&v.isSameNode(D))return!0;D=D.parentNode||D.host}while(D)}return!1}function dn(v){return Object.assign({},v,{left:v.x,top:v.y,right:v.x+v.width,bottom:v.y+v.height})}function Tn(v,h){return h===ht?dn(function($){var D=l($),G=w($),z=D.visualViewport,V=G.clientWidth,Y=G.clientHeight,X=0,ne=0;return z&&(V=z.width,Y=z.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(X=z.offsetLeft,ne=z.offsetTop)),{width:V,height:Y,x:X+q($),y:ne}}(v)):p(h)?function($){var D=b($);return D.top=D.top+$.clientTop,D.left=D.left+$.clientLeft,D.bottom=D.top+$.clientHeight,D.right=D.left+$.clientWidth,D.width=$.clientWidth,D.height=$.clientHeight,D.x=D.left,D.y=D.top,D}(h):dn(function($){var D,G=w($),z=d($),V=(D=$.ownerDocument)==null?void 0:D.body,Y=S(G.scrollWidth,G.clientWidth,V?V.scrollWidth:0,V?V.clientWidth:0),X=S(G.scrollHeight,G.clientHeight,V?V.scrollHeight:0,V?V.clientHeight:0),ne=-z.scrollLeft+q($),re=-z.scrollTop;return R(V||G).direction==="rtl"&&(ne+=S(G.clientWidth,V?V.clientWidth:0)-Y),{width:Y,height:X,x:ne,y:re}}(w(v)))}function jn(v){return Object.assign({},{top:0,right:0,bottom:0,left:0},v)}function Pn(v,h){return h.reduce(function($,D){return $[D]=v,$},{})}function It(v,h){h===void 0&&(h={});var $=h,D=$.placement,G=D===void 0?v.placement:D,z=$.boundary,V=z===void 0?"clippingParents":z,Y=$.rootBoundary,X=Y===void 0?ht:Y,ne=$.elementContext,re=ne===void 0?be:ne,te=$.altBoundary,Ae=te!==void 0&&te,se=$.padding,he=se===void 0?0:se,pe=jn(typeof he!="number"?he:Pn(he,nt)),ie=re===be?"reference":be,Me=v.rects.popper,ke=v.elements[Ae?ie:re],fe=function(Ie,Fe,ot){var dt=Fe==="clippingParents"?function(Ce){var vt=k(x(Ce)),Ye=["absolute","fixed"].indexOf(R(Ce).position)>=0&&y(Ce)?I(Ce):Ce;return p(Ye)?vt.filter(function(We){return p(We)&&En(We,Ye)&&m(We)!=="body"}):[]}(Ie):[].concat(Fe),Je=[].concat(dt,[ot]),Ze=Je[0],Re=Je.reduce(function(Ce,vt){var Ye=Tn(Ie,vt);return Ce.top=S(Ye.top,Ce.top),Ce.right=A(Ye.right,Ce.right),Ce.bottom=A(Ye.bottom,Ce.bottom),Ce.left=S(Ye.left,Ce.left),Ce},Tn(Ie,Ze));return Re.width=Re.right-Re.left,Re.height=Re.bottom-Re.top,Re.x=Re.left,Re.y=Re.top,Re}(p(ke)?ke:ke.contextElement||w(v.elements.popper),V,X),ve=b(v.elements.reference),le=ee({reference:ve,element:Me,strategy:"absolute",placement:G}),ce=dn(Object.assign({},Me,le)),de=re===be?ce:ve,me={top:fe.top-de.top+pe.top,bottom:de.bottom-fe.bottom+pe.bottom,left:fe.left-de.left+pe.left,right:de.right-fe.right+pe.right},$e=v.modifiersData.offset;if(re===be&&$e){var Be=$e[G];Object.keys(me).forEach(function(Ie){var Fe=[Oe,J].indexOf(Ie)>=0?1:-1,ot=[W,J].indexOf(Ie)>=0?"y":"x";me[Ie]+=Be[ot]*Fe})}return me}function zt(v,h,$){return S(v,A(h,$))}function qn(v,h,$){return $===void 0&&($={x:0,y:0}),{top:v.top-h.height-$.y,right:v.right-h.width+$.x,bottom:v.bottom-h.height+$.y,left:v.left-h.width-$.x}}function An(v){return[W,Oe,J,ae].some(function(h){return v[h]>=0})}var Ur=bt({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(v){var h=v.state,$=v.instance,D=v.options,G=D.scroll,z=G===void 0||G,V=D.resize,Y=V===void 0||V,X=l(h.elements.popper),ne=[].concat(h.scrollParents.reference,h.scrollParents.popper);return z&&ne.forEach(function(re){re.addEventListener("scroll",$.update,De)}),Y&&X.addEventListener("resize",$.update,De),function(){z&&ne.forEach(function(re){re.removeEventListener("scroll",$.update,De)}),Y&&X.removeEventListener("resize",$.update,De)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(v){var h=v.state,$=v.name;h.modifiersData[$]=ee({reference:h.rects.reference,element:h.rects.popper,strategy:"absolute",placement:h.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(v){var h=v.state,$=v.options,D=$.gpuAcceleration,G=D===void 0||D,z=$.adaptive,V=z===void 0||z,Y=$.roundOffsets,X=Y===void 0||Y,ne={placement:Ve(h.placement),variation:Ee(h.placement),popper:h.elements.popper,popperRect:h.rects.popper,gpuAcceleration:G,isFixed:h.options.strategy==="fixed"};h.modifiersData.popperOffsets!=null&&(h.styles.popper=Object.assign({},h.styles.popper,oe(Object.assign({},ne,{offsets:h.modifiersData.popperOffsets,position:h.options.strategy,adaptive:V,roundOffsets:X})))),h.modifiersData.arrow!=null&&(h.styles.arrow=Object.assign({},h.styles.arrow,oe(Object.assign({},ne,{offsets:h.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:X})))),h.attributes.popper=Object.assign({},h.attributes.popper,{"data-popper-placement":h.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(v){var h=v.state;Object.keys(h.elements).forEach(function($){var D=h.styles[$]||{},G=h.attributes[$]||{},z=h.elements[$];y(z)&&m(z)&&(Object.assign(z.style,D),Object.keys(G).forEach(function(V){var Y=G[V];Y===!1?z.removeAttribute(V):z.setAttribute(V,Y===!0?"":Y)}))})},effect:function(v){var h=v.state,$={popper:{position:h.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(h.elements.popper.style,$.popper),h.styles=$,h.elements.arrow&&Object.assign(h.elements.arrow.style,$.arrow),function(){Object.keys(h.elements).forEach(function(D){var G=h.elements[D],z=h.attributes[D]||{},V=Object.keys(h.styles.hasOwnProperty(D)?h.styles[D]:$[D]).reduce(function(Y,X){return Y[X]="",Y},{});y(G)&&m(G)&&(Object.assign(G.style,V),Object.keys(z).forEach(function(Y){G.removeAttribute(Y)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(v){var h=v.state,$=v.options,D=v.name,G=$.offset,z=G===void 0?[0,0]:G,V=Qe.reduce(function(re,te){return re[te]=function(Ae,se,he){var pe=Ve(Ae),ie=[ae,W].indexOf(pe)>=0?-1:1,Me=typeof he=="function"?he(Object.assign({},se,{placement:Ae})):he,ke=Me[0],fe=Me[1];return ke=ke||0,fe=(fe||0)*ie,[ae,Oe].indexOf(pe)>=0?{x:fe,y:ke}:{x:ke,y:fe}}(te,h.rects,z),re},{}),Y=V[h.placement],X=Y.x,ne=Y.y;h.modifiersData.popperOffsets!=null&&(h.modifiersData.popperOffsets.x+=X,h.modifiersData.popperOffsets.y+=ne),h.modifiersData[D]=V}},{name:"flip",enabled:!0,phase:"main",fn:function(v){var h=v.state,$=v.options,D=v.name;if(!h.modifiersData[D]._skip){for(var G=$.mainAxis,z=G===void 0||G,V=$.altAxis,Y=V===void 0||V,X=$.fallbackPlacements,ne=$.padding,re=$.boundary,te=$.rootBoundary,Ae=$.altBoundary,se=$.flipVariations,he=se===void 0||se,pe=$.allowedAutoPlacements,ie=h.options.placement,Me=Ve(ie),ke=X||(Me!==ie&&he?function(We){if(Ve(We)===rt)return[];var it=Ft(We);return[Ln(We),it,Ln(it)]}(ie):[Ft(ie)]),fe=[ie].concat(ke).reduce(function(We,it){return We.concat(Ve(it)===rt?function(Ct,_t){_t===void 0&&(_t={});var st=_t,Jt=st.placement,Yt=st.boundary,Lt=st.rootBoundary,pn=st.padding,mn=st.flipVariations,Et=st.allowedAutoPlacements,gn=Et===void 0?Qe:Et,Vt=Ee(Jt),Kt=Vt?mn?ft:ft.filter(function(at){return Ee(at)===Vt}):nt,Tt=Kt.filter(function(at){return gn.indexOf(at)>=0});Tt.length===0&&(Tt=Kt);var jt=Tt.reduce(function(at,$t){return at[$t]=It(Ct,{placement:$t,boundary:Yt,rootBoundary:Lt,padding:pn})[Ve($t)],at},{});return Object.keys(jt).sort(function(at,$t){return jt[at]-jt[$t]})}(h,{placement:it,boundary:re,rootBoundary:te,padding:ne,flipVariations:he,allowedAutoPlacements:pe}):it)},[]),ve=h.rects.reference,le=h.rects.popper,ce=new Map,de=!0,me=fe[0],$e=0;$e=0,dt=ot?"width":"height",Je=It(h,{placement:Be,boundary:re,rootBoundary:te,altBoundary:Ae,padding:ne}),Ze=ot?Fe?Oe:ae:Fe?J:W;ve[dt]>le[dt]&&(Ze=Ft(Ze));var Re=Ft(Ze),Ce=[];if(z&&Ce.push(Je[Ie]<=0),Y&&Ce.push(Je[Ze]<=0,Je[Re]<=0),Ce.every(function(We){return We})){me=Be,de=!1;break}ce.set(Be,Ce)}if(de)for(var vt=function(We){var it=fe.find(function(Ct){var _t=ce.get(Ct);if(_t)return _t.slice(0,We).every(function(st){return st})});if(it)return me=it,"break"},Ye=he?3:1;Ye>0&&vt(Ye)!=="break";Ye--);h.placement!==me&&(h.modifiersData[D]._skip=!0,h.placement=me,h.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(v){var h=v.state,$=v.options,D=v.name,G=$.mainAxis,z=G===void 0||G,V=$.altAxis,Y=V!==void 0&&V,X=$.boundary,ne=$.rootBoundary,re=$.altBoundary,te=$.padding,Ae=$.tether,se=Ae===void 0||Ae,he=$.tetherOffset,pe=he===void 0?0:he,ie=It(h,{boundary:X,rootBoundary:ne,padding:te,altBoundary:re}),Me=Ve(h.placement),ke=Ee(h.placement),fe=!ke,ve=Te(Me),le=ve==="x"?"y":"x",ce=h.modifiersData.popperOffsets,de=h.rects.reference,me=h.rects.popper,$e=typeof pe=="function"?pe(Object.assign({},h.rects,{placement:h.placement})):pe,Be=typeof $e=="number"?{mainAxis:$e,altAxis:$e}:Object.assign({mainAxis:0,altAxis:0},$e),Ie=h.modifiersData.offset?h.modifiersData.offset[h.placement]:null,Fe={x:0,y:0};if(ce){if(z){var ot,dt=ve==="y"?W:ae,Je=ve==="y"?J:Oe,Ze=ve==="y"?"height":"width",Re=ce[ve],Ce=Re+ie[dt],vt=Re-ie[Je],Ye=se?-me[Ze]/2:0,We=ke===Ge?de[Ze]:me[Ze],it=ke===Ge?-me[Ze]:-de[Ze],Ct=h.elements.arrow,_t=se&&Ct?f(Ct):{width:0,height:0},st=h.modifiersData["arrow#persistent"]?h.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Jt=st[dt],Yt=st[Je],Lt=zt(0,de[Ze],_t[Ze]),pn=fe?de[Ze]/2-Ye-Lt-Jt-Be.mainAxis:We-Lt-Jt-Be.mainAxis,mn=fe?-de[Ze]/2+Ye+Lt+Yt+Be.mainAxis:it+Lt+Yt+Be.mainAxis,Et=h.elements.arrow&&I(h.elements.arrow),gn=Et?ve==="y"?Et.clientTop||0:Et.clientLeft||0:0,Vt=(ot=Ie==null?void 0:Ie[ve])!=null?ot:0,Kt=Re+mn-Vt,Tt=zt(se?A(Ce,Re+pn-Vt-gn):Ce,Re,se?S(vt,Kt):vt);ce[ve]=Tt,Fe[ve]=Tt-Re}if(Y){var jt,at=ve==="x"?W:ae,$t=ve==="x"?J:Oe,kt=ce[le],Xt=le==="y"?"height":"width",Mn=kt+ie[at],Dn=kt-ie[$t],hn=[W,ae].indexOf(Me)!==-1,Rn=(jt=Ie==null?void 0:Ie[le])!=null?jt:0,Hn=hn?Mn:kt-de[Xt]-me[Xt]-Rn+Be.altAxis,Bn=hn?kt+de[Xt]+me[Xt]-Rn-Be.altAxis:Dn,Nn=se&&hn?function(Qr,Wr,yn){var In=zt(Qr,Wr,yn);return In>yn?yn:In}(Hn,kt,Bn):zt(se?Hn:Mn,kt,se?Bn:Dn);ce[le]=Nn,Fe[le]=Nn-kt}h.modifiersData[D]=Fe}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(v){var h,$=v.state,D=v.name,G=v.options,z=$.elements.arrow,V=$.modifiersData.popperOffsets,Y=Ve($.placement),X=Te(Y),ne=[ae,Oe].indexOf(Y)>=0?"height":"width";if(z&&V){var re=function(me,$e){return jn(typeof(me=typeof me=="function"?me(Object.assign({},$e.rects,{placement:$e.placement})):me)!="number"?me:Pn(me,nt))}(G.padding,$),te=f(z),Ae=X==="y"?W:ae,se=X==="y"?J:Oe,he=$.rects.reference[ne]+$.rects.reference[X]-V[X]-$.rects.popper[ne],pe=V[X]-$.rects.reference[X],ie=I(z),Me=ie?X==="y"?ie.clientHeight||0:ie.clientWidth||0:0,ke=he/2-pe/2,fe=re[Ae],ve=Me-te[ne]-re[se],le=Me/2-te[ne]/2+ke,ce=zt(fe,le,ve),de=X;$.modifiersData[D]=((h={})[de]=ce,h.centerOffset=ce-le,h)}},effect:function(v){var h=v.state,$=v.options.element,D=$===void 0?"[data-popper-arrow]":$;D!=null&&(typeof D!="string"||(D=h.elements.popper.querySelector(D)))&&En(h.elements.popper,D)&&(h.elements.arrow=D)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(v){var h=v.state,$=v.name,D=h.rects.reference,G=h.rects.popper,z=h.modifiersData.preventOverflow,V=It(h,{elementContext:"reference"}),Y=It(h,{altBoundary:!0}),X=qn(V,D),ne=qn(Y,G,z),re=An(X),te=An(ne);h.modifiersData[$]={referenceClippingOffsets:X,popperEscapeOffsets:ne,isReferenceHidden:re,hasPopperEscaped:te},h.attributes.popper=Object.assign({},h.attributes.popper,{"data-popper-reference-hidden":re,"data-popper-escaped":te})}}]})}},t={};function r(s){var a=t[s];if(a!==void 0)return a.exports;var c=t[s]={exports:{}};return n[s](c,c.exports,r),c.exports}r.d=(s,a)=>{for(var c in a)r.o(a,c)&&!r.o(s,c)&&Object.defineProperty(s,c,{enumerable:!0,get:a[c]})},r.o=(s,a)=>Object.prototype.hasOwnProperty.call(s,a),r.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var i={};return r.r(i),r(661),r(795),r(682),r(284),r(181),r(778),r(51),r(185),i})()})})(Ao);function Mo(o){let e=o[0].title+"",n;return{c(){n=ge(e)},m(t,r){N(t,n,r)},p(t,r){r&1&&e!==(e=t[0].title+"")&&Ne(n,e)},d(t){t&&B(n)}}}function Do(o){let e,n;return{c(){e=ge("Welcome to "),n=O("span"),n.textContent="Vanna.AI",g(n,"class","nav-title")},m(t,r){N(t,e,r),N(t,n,r)},p:K,d(t){t&&(B(e),B(n))}}}function Ro(o){let e,n,t,r,i=o[0].subtitle+"",s;function a(p,y){return p[0].title=="Welcome to Vanna.AI"?Do:Mo}let c=a(o),l=c(o);return{c(){e=O("div"),n=O("h1"),l.c(),t=F(),r=O("p"),s=ge(i),g(n,"class","text-3xl font-bold text-gray-800 sm:text-4xl dark:text-white"),g(r,"class","mt-3 text-gray-600 dark:text-gray-400"),g(e,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto text-center")},m(p,y){N(p,e,y),_(e,n),l.m(n,null),_(e,t),_(e,r),_(r,s)},p(p,[y]){c===(c=a(p))&&l?l.p(p,y):(l.d(1),l=c(p),l&&(l.c(),l.m(n,null))),y&1&&i!==(i=p[0].subtitle+"")&&Ne(s,i)},i:K,o:K,d(p){p&&B(e),l.d()}}}function Ho(o,e,n){let t;return et(o,St,r=>n(0,t=r)),[t]}class Bo extends we{constructor(e){super(),_e(this,e,Ho,Ro,ye,{})}}function No(o){let e,n;const t=o[1].default,r=rn(t,o,o[0],null);return{c(){e=O("p"),r&&r.c(),g(e,"class","text-gray-800 dark:text-gray-200")},m(i,s){N(i,e,s),r&&r.m(e,null),n=!0},p(i,[s]){r&&r.p&&(!n||s&1)&&sn(r,t,i,i[0],n?on(t,i[0],s,null):ln(i[0]),null)},i(i){n||(L(r,i),n=!0)},o(i){M(r,i),n=!1},d(i){i&&B(e),r&&r.d(i)}}}function Io(o,e,n){let{$$slots:t={},$$scope:r}=e;return o.$$set=i=>{"$$scope"in i&&n(0,r=i.$$scope)},[r,t]}class ut extends we{constructor(e){super(),_e(this,e,Io,No,ye,{})}}function zo(o){let e;return{c(){e=ge(o[0])},m(n,t){N(n,e,t)},p(n,t){t&1&&Ne(e,n[0])},d(n){n&&B(e)}}}function Vo(o){let e,n,t,r,i,s,a,c,l;a=new ut({props:{$$slots:{default:[zo]},$$scope:{ctx:o}}});const p=o[1].default,y=rn(p,o,o[2],null);return{c(){e=O("li"),n=O("div"),t=O("div"),r=O("span"),r.innerHTML='You ',i=F(),s=O("div"),Q(a.$$.fragment),c=F(),y&&y.c(),g(r,"class","flex-shrink-0 inline-flex items-center justify-center h-[2.375rem] w-[2.375rem] rounded-full bg-gray-600"),g(s,"class","grow mt-2 space-y-3"),g(t,"class","max-w-2xl flex gap-x-2 sm:gap-x-4"),g(n,"class","max-w-4xl px-4 sm:px-6 lg:px-8 mx-auto"),g(e,"class","py-2 sm:py-4")},m(C,S){N(C,e,S),_(e,n),_(n,t),_(t,r),_(t,i),_(t,s),Z(a,s,null),_(s,c),y&&y.m(s,null),l=!0},p(C,[S]){const A={};S&5&&(A.$$scope={dirty:S,ctx:C}),a.$set(A),y&&y.p&&(!l||S&4)&&sn(y,p,C,C[2],l?on(p,C[2],S,null):ln(C[2]),null)},i(C){l||(L(a.$$.fragment,C),L(y,C),l=!0)},o(C){M(a.$$.fragment,C),M(y,C),l=!1},d(C){C&&B(e),U(a),y&&y.d(C)}}}function Go(o,e,n){let{$$slots:t={},$$scope:r}=e,{message:i}=e;return o.$$set=s=>{"message"in s&&n(0,i=s.message),"$$scope"in s&&n(2,r=s.$$scope)},[i,t,r]}class Ot extends we{constructor(e){super(),_e(this,e,Go,Vo,ye,{message:0})}}function Zo(o){let e,n,t;return{c(){e=O("button"),e.innerHTML=' ',g(e,"type","button"),g(e,"class","inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:text-blue-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:hover:text-blue-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600")},m(r,i){N(r,e,i),n||(t=Le(e,"click",o[1]),n=!0)},p:K,d(r){r&&B(e),n=!1,t()}}}function Uo(o){let e;return{c(){e=O("button"),e.innerHTML=' ',g(e,"type","button"),g(e,"class","animate-ping animate-pulse inline-flex flex-shrink-0 justify-center items-center size-8 rounded-lg text-red-500 hover:text-red-600 focus:z-10 focus:outline-none focus:ring-2 focus:ring-red-500 dark:hover:text-red-500 dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-red-600")},m(n,t){N(n,e,t)},p:K,d(n){n&&B(e)}}}function Qo(o){let e;function n(i,s){return i[0]?Uo:Zo}let t=n(o),r=t(o);return{c(){r.c(),e=ze()},m(i,s){r.m(i,s),N(i,e,s)},p(i,[s]){t===(t=n(i))&&r?r.p(i,s):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},i:K,o:K,d(i){i&&B(e),r.d(i)}}}function Wo(o,e,n){let{newMessage:t}=e,r=!1;function i(){if(n(0,r=!0),Rr.set(!0),"webkitSpeechRecognition"in window)var s=new window.webkitSpeechRecognition;else var s=new window.SpeechRecognition;s.lang="en-US",s.start(),s.onresult=a=>{const c=a.results[0][0].transcript;console.log(c),n(2,t=c),n(0,r=!1)},s.onend=()=>{n(0,r=!1)},s.onerror=()=>{n(0,r=!1)}}return o.$$set=s=>{"newMessage"in s&&n(2,t=s.newMessage)},[r,i,t]}class Fo extends we{constructor(e){super(),_e(this,e,Wo,Qo,ye,{newMessage:2})}}function Jo(o){let e,n,t,r,i,s,a,c,l,p,y,C,S,A,E;function b(m){o[5](m)}let d={};return o[0]!==void 0&&(d.newMessage=o[0]),l=new Fo({props:d}),_n.push(()=>lo(l,"newMessage",b)),{c(){e=O("div"),n=O("input"),t=F(),r=O("div"),i=O("div"),s=O("div"),s.innerHTML="",a=F(),c=O("div"),Q(l.$$.fragment),y=F(),C=O("button"),C.innerHTML=' ',g(n,"type","text"),g(n,"class","p-4 pb-12 block w-full bg-gray-100 border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-800 dark:border-gray-700 dark:text-gray-400"),g(n,"placeholder","Ask me a question about your data that I can turn into SQL."),g(s,"class","flex items-center"),g(C,"type","button"),g(C,"class","inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-white bg-blue-600 hover:bg-blue-500 focus:z-10 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-all"),g(c,"class","flex items-center gap-x-1"),g(i,"class","flex justify-between items-center"),g(r,"class","absolute bottom-px inset-x-px p-2 rounded-b-md bg-gray-100 dark:bg-slate-800"),g(e,"class","relative")},m(m,w){N(m,e,w),_(e,n),mt(n,o[0]),_(e,t),_(e,r),_(r,i),_(i,s),_(i,a),_(i,c),Z(l,c,null),_(c,y),_(c,C),S=!0,A||(E=[Le(n,"input",o[4]),Le(n,"keydown",o[1]),Le(C,"click",o[2])],A=!0)},p(m,[w]){w&1&&n.value!==m[0]&&mt(n,m[0]);const q={};!p&&w&1&&(p=!0,q.newMessage=m[0],oo(()=>p=!1)),l.$set(q)},i(m){S||(L(l.$$.fragment,m),S=!0)},o(m){M(l.$$.fragment,m),S=!1},d(m){m&&B(e),U(l),A=!1,gt(E)}}}function Yo(o,e,n){let{onSubmit:t}=e,r="";function i(l){l.key==="Enter"&&(t(r),l.preventDefault())}function s(){t(r)}function a(){r=this.value,n(0,r)}function c(l){r=l,n(0,r)}return o.$$set=l=>{"onSubmit"in l&&n(3,t=l.onSubmit)},[r,i,s,t,a,c]}class Ko extends we{constructor(e){super(),_e(this,e,Yo,Jo,ye,{onSubmit:3})}}function Xo(o){let e;return{c(){e=O("div"),e.innerHTML=' Sidebar ',g(e,"class","lg:hidden flex justify-end mb-2 sm:mb-3")},m(n,t){N(n,e,t)},p:K,i:K,o:K,d(n){n&&B(e)}}}class ei extends we{constructor(e){super(),_e(this,e,null,Xo,ye,{})}}function ti(o){let e,n,t,r;return{c(){e=O("button"),n=ge(o[0]),g(e,"type","button"),g(e,"class","mb-2.5 mr-1.5 py-2 px-3 inline-flex justify-center items-center gap-x-2 rounded-md border border-blue-600 bg-white text-blue-600 align-middle hover:bg-blue-50 text-sm dark:bg-slate-900 dark:text-blue-500 dark:border-blue-500 dark:hover:text-blue-400 dark:hover:border-blue-400")},m(i,s){N(i,e,s),_(e,n),t||(r=Le(e,"click",o[1]),t=!0)},p(i,[s]){s&1&&Ne(n,i[0])},i:K,o:K,d(i){i&&B(e),t=!1,r()}}}function ni(o,e,n){let{message:t}=e,{onSubmit:r}=e;function i(){r(t)}return o.$$set=s=>{"message"in s&&n(0,t=s.message),"onSubmit"in s&&n(2,r=s.onSubmit)},[t,i,r]}class ct extends we{constructor(e){super(),_e(this,e,ni,ti,ye,{message:0,onSubmit:2})}}function ri(o){let e,n,t,r,i,s,a,c,l,p,y;return{c(){e=O("span"),n=Ke("svg"),t=Ke("defs"),r=Ke("linearGradient"),i=Ke("stop"),s=Ke("stop"),a=Ke("g"),c=Ke("g"),l=Ke("path"),p=Ke("path"),g(i,"offset","0"),g(i,"stop-color","#009efd"),g(s,"offset","1"),g(s,"stop-color","#2af598"),g(r,"gradientTransform","matrix(1.09331 0 0 1.09331 -47.1838 -88.8946)"),g(r,"gradientUnits","userSpaceOnUse"),g(r,"id","LinearGradient"),g(r,"x1","237.82"),g(r,"x2","785.097"),g(r,"y1","549.609"),g(r,"y2","549.609"),g(l,"d","M117.718 228.798C117.718 119.455 206.358 30.8151 315.701 30.8151L708.299 30.8151C817.642 30.8151 906.282 119.455 906.282 228.798L906.282 795.202C906.282 904.545 817.642 993.185 708.299 993.185L315.701 993.185C206.358 993.185 117.718 904.545 117.718 795.202L117.718 228.798Z"),g(l,"fill","#0f172a"),g(l,"fill-rule","nonzero"),g(l,"opacity","1"),g(l,"stroke","#374151"),g(l,"stroke-linecap","butt"),g(l,"stroke-linejoin","round"),g(l,"stroke-width","20"),g(p,"d","M212.828 215.239C213.095 281.169 213.629 413.028 213.629 413.028C213.629 413.028 511.51 808.257 513.993 809.681C612.915 677.809 810.759 414.065 810.759 414.065C810.759 414.065 811.034 280.901 811.172 214.319C662.105 362.973 662.105 362.973 513.038 511.627C362.933 363.433 362.933 363.433 212.828 215.239Z"),g(p,"fill","url(#LinearGradient)"),g(p,"fill-rule","nonzero"),g(p,"opacity","1"),g(p,"stroke","none"),g(c,"opacity","1"),g(a,"id","Layer-1"),g(n,"height","100%"),g(n,"stroke-miterlimit","10"),en(n,"fill-rule","nonzero"),en(n,"clip-rule","evenodd"),en(n,"stroke-linecap","round"),en(n,"stroke-linejoin","round"),g(n,"version","1.1"),g(n,"viewBox","0 0 1024 1024"),g(n,"width","100%"),g(n,"xml:space","preserve"),g(n,"xmlns","http://www.w3.org/2000/svg"),g(e,"class",y="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+o[0])},m(C,S){N(C,e,S),_(e,n),_(n,t),_(t,r),_(r,i),_(r,s),_(n,a),_(a,c),_(c,l),_(c,p)},p(C,[S]){S&1&&y!==(y="flex-shrink-0 w-[2.375rem] h-[2.375rem] "+C[0])&&g(e,"class",y)},i:K,o:K,d(C){C&&B(e)}}}function oi(o,e,n){let t,{animate:r=!1}=e;return o.$$set=i=>{"animate"in i&&n(1,r=i.animate)},o.$$.update=()=>{o.$$.dirty&2&&n(0,t=r?"animate-bounce":"")},[t,r]}class Nr extends we{constructor(e){super(),_e(this,e,oi,ri,ye,{animate:1})}}function ii(o){let e,n,t,r,i;n=new Nr({});const s=o[1].default,a=rn(s,o,o[0],null);return{c(){e=O("li"),Q(n.$$.fragment),t=F(),r=O("div"),a&&a.c(),g(r,"class","space-y-3 overflow-x-auto overflow-y-hidden whitespace-break-spaces"),g(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(c,l){N(c,e,l),Z(n,e,null),_(e,t),_(e,r),a&&a.m(r,null),i=!0},p(c,[l]){a&&a.p&&(!i||l&1)&&sn(a,s,c,c[0],i?on(s,c[0],l,null):ln(c[0]),null)},i(c){i||(L(n.$$.fragment,c),L(a,c),i=!0)},o(c){M(n.$$.fragment,c),M(a,c),i=!1},d(c){c&&B(e),U(n),a&&a.d(c)}}}function si(o,e,n){let{$$slots:t={},$$scope:r}=e;return o.$$set=i=>{"$$scope"in i&&n(0,r=i.$$scope)},[r,t]}class Xe extends we{constructor(e){super(),_e(this,e,si,ii,ye,{})}}function li(o){let e;return{c(){e=ge("Thinking...")},m(n,t){N(n,e,t)},d(n){n&&B(e)}}}function ai(o){let e,n,t,r,i,s;return n=new Nr({props:{animate:!0}}),i=new ut({props:{$$slots:{default:[li]},$$scope:{ctx:o}}}),{c(){e=O("li"),Q(n.$$.fragment),t=F(),r=O("div"),Q(i.$$.fragment),g(r,"class","space-y-3"),g(e,"class","max-w-4xl py-2 px-4 sm:px-6 lg:px-8 mx-auto flex gap-x-2 sm:gap-x-4")},m(a,c){N(a,e,c),Z(n,e,null),_(e,t),_(e,r),Z(i,r,null),s=!0},p(a,[c]){const l={};c&1&&(l.$$scope={dirty:c,ctx:a}),i.$set(l)},i(a){s||(L(n.$$.fragment,a),L(i.$$.fragment,a),s=!0)},o(a){M(n.$$.fragment,a),M(i.$$.fragment,a),s=!1},d(a){a&&B(e),U(n),U(i)}}}class ci extends we{constructor(e){super(),_e(this,e,null,ai,ye,{})}}function ui(o){let e,n,t,r,i,s,a,c,l,p,y;return{c(){e=O("ul"),n=O("li"),t=O("div"),r=O("span"),r.textContent="CSV",i=F(),s=O("a"),a=Ke("svg"),c=Ke("path"),l=Ke("path"),p=ge(`
+ Download`),g(r,"class","mr-3 flex-1 w-0 truncate"),g(c,"d","M.5 9.9a.5.5 0 0 1 .5.5v2.5a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-2.5a.5.5 0 0 1 1 0v2.5a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-2.5a.5.5 0 0 1 .5-.5z"),g(l,"d","M7.646 11.854a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V1.5a.5.5 0 0 0-1 0v8.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3z"),g(a,"class","flex-shrink-0 w-3 h-3"),g(a,"width","16"),g(a,"height","16"),g(a,"viewBox","0 0 16 16"),g(a,"fill","currentColor"),g(s,"class","flex items-center gap-x-2 text-gray-500 hover:text-blue-500 whitespace-nowrap"),g(s,"href",y="/api/v0/download_csv?id="+o[0]),g(t,"class","w-full flex justify-between truncate"),g(n,"class","flex items-center gap-x-2 p-3 text-sm bg-white border text-gray-800 first:rounded-t-lg first:mt-0 last:rounded-b-lg dark:bg-slate-900 dark:border-gray-700 dark:text-gray-200"),g(e,"class","flex flex-col justify-end text-start -space-y-px")},m(C,S){N(C,e,S),_(e,n),_(n,t),_(t,r),_(t,i),_(t,s),_(s,a),_(a,c),_(a,l),_(s,p)},p(C,[S]){S&1&&y!==(y="/api/v0/download_csv?id="+C[0])&&g(s,"href",y)},i:K,o:K,d(C){C&&B(e)}}}function fi(o,e,n){let{id:t}=e;return o.$$set=r=>{"id"in r&&n(0,t=r.id)},[t]}class di extends we{constructor(e){super(),_e(this,e,fi,ui,ye,{id:0})}}function Jn(o,e,n){const t=o.slice();return t[5]=e[n],t}function Yn(o,e,n){const t=o.slice();return t[8]=e[n],t}function Kn(o,e,n){const t=o.slice();return t[8]=e[n],t}function Xn(o){let e,n,t,r;return{c(){e=O("th"),n=O("div"),t=O("span"),t.textContent=`${o[8]}`,r=F(),g(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),g(n,"class","flex items-center gap-x-2"),g(e,"scope","col"),g(e,"class","px-6 py-3 text-left")},m(i,s){N(i,e,s),_(e,n),_(n,t),_(e,r)},p:K,d(i){i&&B(e)}}}function er(o){let e,n,t;return{c(){e=O("td"),n=O("div"),t=O("span"),t.textContent=`${o[5][o[8]]}`,g(t,"class","text-gray-800 dark:text-gray-200"),g(n,"class","px-6 py-3"),g(e,"class","h-px w-px whitespace-nowrap")},m(r,i){N(r,e,i),_(e,n),_(n,t)},p:K,d(r){r&&B(e)}}}function tr(o){let e,n,t=xe(o[3]),r=[];for(let i=0;i{b=null}),Pe())},i(d){y||(L(b),y=!0)},o(d){M(b),y=!1},d(d){d&&(B(e),B(l),B(p)),tt(S,d),tt(E,d),b&&b.d(d)}}}function mi(o,e,n){let t;et(o,St,c=>n(1,t=c));let{id:r}=e,{df:i}=e,s=JSON.parse(i),a=s.length>0?Object.keys(s[0]):[];return o.$$set=c=>{"id"in c&&n(0,r=c.id),"df"in c&&n(4,i=c.df)},[r,t,s,a,i]}class Ir extends we{constructor(e){super(),_e(this,e,mi,pi,ye,{id:0,df:4})}}function gi(o){let e;return{c(){e=O("div"),g(e,"id",o[0])},m(n,t){N(n,e,t)},p:K,i:K,o:K,d(n){n&&B(e)}}}function hi(o,e,n){let{fig:t}=e,r=JSON.parse(t),i=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);return Mr(()=>{Plotly.newPlot(document.getElementById(i),r,{responsive:!0})}),o.$$set=s=>{"fig"in s&&n(1,t=s.fig)},[i,t]}class zr extends we{constructor(e){super(),_e(this,e,hi,gi,ye,{fig:1})}}function yi(o){let e,n,t,r;return{c(){e=O("button"),n=ge(o[0]),g(e,"type","button"),g(e,"class","mb-2.5 mr-1.5 py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border-2 border-green-200 font-semibold text-green-500 hover:text-white hover:bg-green-500 hover:border-green-500 focus:outline-none focus:ring-2 focus:ring-green-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(i,s){N(i,e,s),_(e,n),t||(r=Le(e,"click",o[1]),t=!0)},p(i,[s]){s&1&&Ne(n,i[0])},i:K,o:K,d(i){i&&B(e),t=!1,r()}}}function bi(o,e,n){let{message:t}=e,{onSubmit:r}=e;function i(){r(t)}return o.$$set=s=>{"message"in s&&n(0,t=s.message),"onSubmit"in s&&n(2,r=s.onSubmit)},[t,i,r]}class Vr extends we{constructor(e){super(),_e(this,e,bi,yi,ye,{message:0,onSubmit:2})}}function vi(o){let e,n,t,r,i,s,a,c,l;return{c(){e=O("div"),n=O("div"),t=O("div"),t.innerHTML=' ',r=F(),i=O("div"),s=O("h3"),s.textContent="Error",a=F(),c=O("div"),l=ge(o[0]),g(t,"class","flex-shrink-0"),g(s,"class","text-sm text-yellow-800 font-semibold"),g(c,"class","mt-1 text-sm text-yellow-700"),g(i,"class","ml-4"),g(n,"class","flex"),g(e,"class","bg-yellow-50 border border-yellow-200 rounded-md p-4"),g(e,"role","alert")},m(p,y){N(p,e,y),_(e,n),_(n,t),_(n,r),_(n,i),_(i,s),_(i,a),_(i,c),_(c,l)},p(p,[y]){y&1&&Ne(l,p[0])},i:K,o:K,d(p){p&&B(e)}}}function _i(o,e,n){let{message:t}=e;return o.$$set=r=>{"message"in r&&n(0,t=r.message)},[t]}let Cn=class extends we{constructor(e){super(),_e(this,e,_i,vi,ye,{message:0})}};function wi(o){let e,n;const t=o[1].default,r=rn(t,o,o[0],null);return{c(){e=O("div"),r&&r.c(),g(e,"class","font-mono whitespace-pre-wrap")},m(i,s){N(i,e,s),r&&r.m(e,null),n=!0},p(i,[s]){r&&r.p&&(!n||s&1)&&sn(r,t,i,i[0],n?on(t,i[0],s,null):ln(i[0]),null)},i(i){n||(L(r,i),n=!0)},o(i){M(r,i),n=!1},d(i){i&&B(e),r&&r.d(i)}}}function $i(o,e,n){let{$$slots:t={},$$scope:r}=e;return o.$$set=i=>{"$$scope"in i&&n(0,r=i.$$scope)},[r,t]}class Gr extends we{constructor(e){super(),_e(this,e,$i,wi,ye,{})}}function ki(o){let e;return{c(){e=ge(o[1])},m(n,t){N(n,e,t)},p(n,t){t&2&&Ne(e,n[1])},d(n){n&&B(e)}}}function xi(o){let e,n,t,r,i,s,a,c;return t=new ct({props:{message:"Run SQL",onSubmit:o[3]}}),i=new ut({props:{$$slots:{default:[ki]},$$scope:{ctx:o}}}),{c(){e=O("textarea"),n=F(),Q(t.$$.fragment),r=F(),Q(i.$$.fragment),g(e,"rows","6"),g(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),g(e,"placeholder","SELECT col1, col2, col3 FROM ...")},m(l,p){N(l,e,p),mt(e,o[1]),N(l,n,p),Z(t,l,p),N(l,r,p),Z(i,l,p),s=!0,a||(c=Le(e,"input",o[2]),a=!0)},p(l,[p]){p&2&&mt(e,l[1]);const y={};p&3&&(y.onSubmit=l[3]),t.$set(y);const C={};p&18&&(C.$$scope={dirty:p,ctx:l}),i.$set(C)},i(l){s||(L(t.$$.fragment,l),L(i.$$.fragment,l),s=!0)},o(l){M(t.$$.fragment,l),M(i.$$.fragment,l),s=!1},d(l){l&&(B(e),B(n),B(r)),U(t,l),U(i,l),a=!1,c()}}}function Si(o,e,n){let t;et(o,Qt,a=>n(1,t=a));let{onSubmit:r}=e;function i(){t=this.value,Qt.set(t)}const s=()=>r(t);return o.$$set=a=>{"onSubmit"in a&&n(0,r=a.onSubmit)},[r,t,i,s]}class Oi extends we{constructor(e){super(),_e(this,e,Si,xi,ye,{onSubmit:0})}}function Ci(o){let e,n,t,r,i,s;return t=new ct({props:{message:o[3],onSubmit:o[5]}}),{c(){e=O("textarea"),n=F(),Q(t.$$.fragment),g(e,"rows","6"),g(e,"class","block p-2.5 w-full text-blue-600 hover:text-blue-500 dark:text-blue-500 dark:hover:text-blue-400 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500 font-mono"),g(e,"placeholder",o[2])},m(a,c){N(a,e,c),mt(e,o[0]),N(a,n,c),Z(t,a,c),r=!0,i||(s=Le(e,"input",o[4]),i=!0)},p(a,[c]){(!r||c&4)&&g(e,"placeholder",a[2]),c&1&&mt(e,a[0]);const l={};c&8&&(l.message=a[3]),c&3&&(l.onSubmit=a[5]),t.$set(l)},i(a){r||(L(t.$$.fragment,a),r=!0)},o(a){M(t.$$.fragment,a),r=!1},d(a){a&&(B(e),B(n)),U(t,a),i=!1,s()}}}function Li(o,e,n){let{onSubmit:t}=e,{currentValue:r}=e,{placeholder:i}=e,{buttonText:s}=e;function a(){r=this.value,n(0,r)}const c=()=>t(r);return o.$$set=l=>{"onSubmit"in l&&n(1,t=l.onSubmit),"currentValue"in l&&n(0,r=l.currentValue),"placeholder"in l&&n(2,i=l.placeholder),"buttonText"in l&&n(3,s=l.buttonText)},[r,t,i,s,a,c]}class Ei extends we{constructor(e){super(),_e(this,e,Li,Ci,ye,{onSubmit:1,currentValue:0,placeholder:2,buttonText:3})}}function Ti(o){let e,n;return e=new ct({props:{message:"Play",onSubmit:o[2]}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.onSubmit=t[2]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function rr(o){if("speechSynthesis"in window){const e=new SpeechSynthesisUtterance(o);e.lang="en-US",e.volume=1,e.rate=1,e.pitch=1,window.speechSynthesis.speak(e)}else console.error("SpeechSynthesis API is not supported in this browser.")}function ji(o,e,n){let t;et(o,Rr,s=>n(1,t=s));let{message:r}=e;const i=()=>rr(r);return o.$$set=s=>{"message"in s&&n(0,r=s.message)},o.$$.update=()=>{o.$$.dirty&3&&t&&rr(r)},[r,t,i]}class Pi extends we{constructor(e){super(),_e(this,e,ji,Ti,ye,{message:0})}}function or(o,e,n){const t=o.slice();return t[11]=e[n],t}function ir(o,e,n){const t=o.slice();return t[14]=e[n],t}function sr(o,e,n){const t=o.slice();return t[17]=e[n],t}function lr(o,e,n){const t=o.slice();return t[17]=e[n],t}function ar(o){let e,n;return e=new Xe({props:{$$slots:{default:[Ai]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194305&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function cr(o){let e,n;return e=new ct({props:{message:o[17],onSubmit:On}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.message=t[17]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function qi(o){let e=o[0].header+"",n,t,r,i,s=xe(o[0].questions),a=[];for(let l=0;lM(a[l],1,1,()=>{a[l]=null});return{c(){n=ge(e),t=F();for(let l=0;l{t=null}),Pe())},i(r){n||(L(t),n=!0)},o(r){M(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Gi(o){let e,n,t=o[3].ask_results_correct&&dr(o);return{c(){t&&t.c(),e=ze()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[3].ask_results_correct?t?i&8&&L(t,1):(t=dr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(je(),M(t,1,1,()=>{t=null}),Pe())},i(r){n||(L(t),n=!0)},o(r){M(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Zi(o){let e,n;return e=new Ot({props:{message:"Change the chart based on these instructions",$$slots:{default:[ds]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194304&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Ui(o){let e,n,t=o[3].chart&&pr(o);return{c(){t&&t.c(),e=ze()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[3].chart?t?(t.p(r,i),i&8&&L(t,1)):(t=pr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(je(),M(t,1,1,()=>{t=null}),Pe())},i(r){n||(L(t),n=!0)},o(r){M(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Qi(o){let e,n,t=o[3].table&&gr(o);return{c(){t&&t.c(),e=ze()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[3].table?t?(t.p(r,i),i&8&&L(t,1)):(t=gr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(je(),M(t,1,1,()=>{t=null}),Pe())},i(r){n||(L(t),n=!0)},o(r){M(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Wi(o){let e,n;return e=new Xe({props:{$$slots:{default:[ys]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194308&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Fi(o){let e,n,t=o[3].sql==!0&&yr(o);return{c(){t&&t.c(),e=ze()},m(r,i){t&&t.m(r,i),N(r,e,i),n=!0},p(r,i){r[3].sql==!0?t?(t.p(r,i),i&8&&L(t,1)):(t=yr(r),t.c(),L(t,1),t.m(e.parentNode,e)):t&&(je(),M(t,1,1,()=>{t=null}),Pe())},i(r){n||(L(t),n=!0)},o(r){M(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function Ji(o){let e,n;return e=new Ot({props:{message:o[14].question}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.message=t[14].question),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Yi(o){let e=JSON.stringify(o[14])+"",n;return{c(){n=ge(e)},m(t,r){N(t,n,r)},p(t,r){r&4&&e!==(e=JSON.stringify(t[14])+"")&&Ne(n,e)},d(t){t&&B(n)}}}function Ki(o){let e,n;return e=new ut({props:{$$slots:{default:[Yi]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194308&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Xi(o){let e=o[14].text+"",n;return{c(){n=ge(e)},m(t,r){N(t,n,r)},p(t,r){r&4&&e!==(e=t[14].text+"")&&Ne(n,e)},d(t){t&&B(n)}}}function es(o){let e,n,t,r;return e=new ut({props:{$$slots:{default:[Xi]},$$scope:{ctx:o}}}),t=new Pi({props:{message:o[14].text}}),{c(){Q(e.$$.fragment),n=F(),Q(t.$$.fragment)},m(i,s){Z(e,i,s),N(i,n,s),Z(t,i,s),r=!0},p(i,s){const a={};s&4194308&&(a.$$scope={dirty:s,ctx:i}),e.$set(a);const c={};s&4&&(c.message=i[14].text),t.$set(c)},i(i){r||(L(e.$$.fragment,i),L(t.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),M(t.$$.fragment,i),r=!1},d(i){i&&B(n),U(e,i),U(t,i)}}}function ts(o){let e,n;return e=new Oi({props:{onSubmit:Co}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p:K,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function ns(o){let e=o[14].sql+"",n;return{c(){n=ge(e)},m(t,r){N(t,n,r)},p(t,r){r&4&&e!==(e=t[14].sql+"")&&Ne(n,e)},d(t){t&&B(n)}}}function rs(o){let e,n;return e=new Gr({props:{$$slots:{default:[ns]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194308&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function os(o){let e,n;return e=new ut({props:{$$slots:{default:[rs]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194308&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function is(o){let e,n;return e=new Ir({props:{id:o[14].id,df:o[14].df}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.id=t[14].id),r&4&&(i.df=t[14].df),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function ss(o){let e,n;return e=new zr({props:{fig:o[14].fig}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.fig=t[14].fig),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function ur(o){let e,n;function t(){return o[9](o[14])}return e=new ct({props:{message:"Auto Fix",onSubmit:t}}),{c(){Q(e.$$.fragment)},m(r,i){Z(e,r,i),n=!0},p(r,i){o=r;const s={};i&4&&(s.onSubmit=t),e.$set(s)},i(r){n||(L(e.$$.fragment,r),n=!0)},o(r){M(e.$$.fragment,r),n=!1},d(r){U(e,r)}}}function ls(o){let e,n,t,r,i,s;e=new Cn({props:{message:o[14].error}}),t=new ct({props:{message:"Manually Fix",onSubmit:o[8]}});let a=o[3].auto_fix_sql&&ur(o);return{c(){Q(e.$$.fragment),n=F(),Q(t.$$.fragment),r=F(),a&&a.c(),i=ze()},m(c,l){Z(e,c,l),N(c,n,l),Z(t,c,l),N(c,r,l),a&&a.m(c,l),N(c,i,l),s=!0},p(c,l){const p={};l&4&&(p.message=c[14].error),e.$set(p),c[3].auto_fix_sql?a?(a.p(c,l),l&8&&L(a,1)):(a=ur(c),a.c(),L(a,1),a.m(i.parentNode,i)):a&&(je(),M(a,1,1,()=>{a=null}),Pe())},i(c){s||(L(e.$$.fragment,c),L(t.$$.fragment,c),L(a),s=!0)},o(c){M(e.$$.fragment,c),M(t.$$.fragment,c),M(a),s=!1},d(c){c&&(B(n),B(r),B(i)),U(e,c),U(t,c),a&&a.d(c)}}}function as(o){let e,n;return e=new Cn({props:{message:o[14].error}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.message=t[14].error),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function fr(o){let e,n;return e=new Ot({props:{message:"",$$slots:{default:[cs]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function cs(o){let e,n,t,r;return e=new ct({props:{message:"Yes",onSubmit:o[6]}}),t=new ct({props:{message:"No",onSubmit:o[7]}}),{c(){Q(e.$$.fragment),n=F(),Q(t.$$.fragment)},m(i,s){Z(e,i,s),N(i,n,s),Z(t,i,s),r=!0},p:K,i(i){r||(L(e.$$.fragment,i),L(t.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),M(t.$$.fragment,i),r=!1},d(i){i&&B(n),U(e,i),U(t,i)}}}function dr(o){let e,n;return e=new Xe({props:{$$slots:{default:[fs]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function us(o){let e;return{c(){e=ge("Were the results correct?")},m(n,t){N(n,e,t)},d(n){n&&B(e)}}}function fs(o){let e,n;return e=new ut({props:{$$slots:{default:[us]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194304&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function ds(o){let e,n;return e=new Ei({props:{onSubmit:o[5],placeholder:"Make the line red",buttonText:"Update Chart",currentValue:""}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p:K,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function pr(o){let e,n,t,r;e=new Xe({props:{$$slots:{default:[ps]},$$scope:{ctx:o}}});let i=o[3].redraw_chart&&mr(o);return{c(){Q(e.$$.fragment),n=F(),i&&i.c(),t=ze()},m(s,a){Z(e,s,a),N(s,n,a),i&&i.m(s,a),N(s,t,a),r=!0},p(s,a){const c={};a&4194308&&(c.$$scope={dirty:a,ctx:s}),e.$set(c),s[3].redraw_chart?i?a&8&&L(i,1):(i=mr(s),i.c(),L(i,1),i.m(t.parentNode,t)):i&&(je(),M(i,1,1,()=>{i=null}),Pe())},i(s){r||(L(e.$$.fragment,s),L(i),r=!0)},o(s){M(e.$$.fragment,s),M(i),r=!1},d(s){s&&(B(n),B(t)),U(e,s),i&&i.d(s)}}}function ps(o){let e,n;return e=new zr({props:{fig:o[14].fig}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.fig=t[14].fig),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function mr(o){let e,n;return e=new Xe({props:{$$slots:{default:[ms]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function ms(o){let e,n;return e=new ct({props:{message:"Redraw Chart",onSubmit:Lo}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p:K,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function gr(o){let e,n;return e=new Xe({props:{$$slots:{default:[gs]},$$scope:{ctx:o}}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4194308&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function gs(o){let e,n;return e=new Ir({props:{id:o[14].id,df:o[14].df}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.id=t[14].id),r&4&&(i.df=t[14].df),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function hr(o){let e,n;return e=new ct({props:{message:o[17],onSubmit:On}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.message=t[17]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function hs(o){let e=o[14].header+"",n,t,r,i,s=xe(o[14].questions),a=[];for(let l=0;lM(a[l],1,1,()=>{a[l]=null});return{c(){n=ge(e),t=F();for(let l=0;l{s[p]=null}),Pe(),n=s[e],n?n.p(c,l):(n=s[e]=i[e](c),n.c()),L(n,1),n.m(t.parentNode,t))},i(c){r||(L(n),r=!0)},o(c){M(n),r=!1},d(c){c&&B(t),s[e].d(c)}}}function vr(o){let e,n;return e=new ci({}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function ws(o){let e,n;return e=new Ko({props:{onSubmit:On}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p:K,i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function $s(o){let e,n,t,r;e=new Vr({props:{message:"New Question",onSubmit:un}});let i=xe(o[2]),s=[];for(let c=0;cM(s[c],1,1,()=>{s[c]=null});return{c(){Q(e.$$.fragment),n=F();for(let c=0;c{t=null}),Pe())},i(r){n||(L(t),n=!0)},o(r){M(t),n=!1},d(r){r&&B(e),t&&t.d(r)}}}function ks(o){let e,n,t,r,i,s,a,c,l,p,y,C,S,A;t=new Bo({});let E=o[0]&&o[0].type=="question_list"&&!o[1]&&ar(o),b=xe(o[2]),d=[];for(let u=0;uM(d[u],1,1,()=>{d[u]=null});let w=o[4]&&vr();p=new ei({});const q=[$s,ws],R=[];function T(u,f){return u[1]?0:1}return C=T(o),S=R[C]=q[C](o),{c(){e=O("div"),n=O("div"),Q(t.$$.fragment),r=F(),E&&E.c(),i=F(),s=O("ul");for(let u=0;u{E=null}),Pe()),f&12){b=xe(u[2]);let j;for(j=0;j{w=null}),Pe());let x=C;C=T(u),C===x?R[C].p(u,f):(je(),M(R[x],1,1,()=>{R[x]=null}),Pe(),S=R[C],S?S.p(u,f):(S=R[C]=q[C](u),S.c()),L(S,1),S.m(l,null))},i(u){if(!A){L(t.$$.fragment,u),L(E);for(let f=0;fn(0,t=A)),et(o,cn,A=>n(1,r=A)),et(o,Ht,A=>n(2,i=A)),et(o,St,A=>n(3,s=A)),et(o,Zt,A=>n(4,a=A)),[t,r,i,s,a,A=>{To(A)},()=>{Eo()},()=>{Un()},()=>{Un()},A=>{Oo(A.error)},A=>A.type==="question_cache"?go(A.id):void 0]}class Ss extends we{constructor(e){super(),_e(this,e,xs,ks,ye,{})}}function Os(o){let e,n,t,r,i,s,a,c,l,p,y,C,S,A,E,b,d,m,w;return{c(){e=O("div"),n=O("div"),t=O("div"),r=O("div"),i=O("h3"),i.textContent="Are you sure?",s=F(),a=O("button"),a.innerHTML='Close ',c=F(),l=O("div"),p=O("p"),y=ge(o[0]),C=F(),S=O("div"),A=O("button"),A.textContent="Close",E=F(),b=O("button"),d=ge(o[1]),g(i,"class","font-bold text-gray-800 dark:text-white"),g(a,"type","button"),g(a,"class","hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800"),g(a,"data-hs-overlay","#hs-vertically-centered-modal"),g(r,"class","flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"),g(p,"class","text-gray-800 dark:text-gray-400"),g(l,"class","p-4 overflow-y-auto"),g(A,"type","button"),g(A,"class","hs-dropdown-toggle py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),g(A,"data-hs-overlay","#hs-vertically-centered-modal"),g(b,"class","py-3 px-4 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),g(S,"class","flex justify-end items-center gap-x-2 py-3 px-4 border-t dark:border-gray-700"),g(t,"class","flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"),g(n,"class","hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all sm:max-w-lg sm:w-full m-3 sm:mx-auto min-h-[calc(100%-3.5rem)] flex items-center"),g(e,"class","hs-overlay open w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto")},m(q,R){N(q,e,R),_(e,n),_(n,t),_(t,r),_(r,i),_(r,s),_(r,a),_(t,c),_(t,l),_(l,p),_(p,y),_(t,C),_(t,S),_(S,A),_(S,E),_(S,b),_(b,d),m||(w=[Le(a,"click",function(){Mt(o[2])&&o[2].apply(this,arguments)}),Le(A,"click",function(){Mt(o[2])&&o[2].apply(this,arguments)}),Le(b,"click",function(){Mt(o[3])&&o[3].apply(this,arguments)})],m=!0)},p(q,[R]){o=q,R&1&&Ne(y,o[0]),R&2&&Ne(d,o[1])},i:K,o:K,d(q){q&&B(e),m=!1,gt(w)}}}function Cs(o,e,n){let{message:t}=e,{buttonLabel:r}=e,{onClose:i}=e,{onConfirm:s}=e;return o.$$set=a=>{"message"in a&&n(0,t=a.message),"buttonLabel"in a&&n(1,r=a.buttonLabel),"onClose"in a&&n(2,i=a.onClose),"onConfirm"in a&&n(3,s=a.onConfirm)},[t,r,i,s]}class Ls extends we{constructor(e){super(),_e(this,e,Cs,Os,ye,{message:0,buttonLabel:1,onClose:2,onConfirm:3})}}function $r(o,e,n){const t=o.slice();return t[10]=e[n].name,t[11]=e[n].description,t[12]=e[n].example,t}function kr(o){let e,n,t,r,i,s,a,c,l,p,y,C;return p=Xr(o[7][0]),{c(){e=O("div"),n=O("div"),t=O("input"),r=F(),i=O("label"),s=O("span"),s.textContent=`${o[10]}`,a=F(),c=O("span"),c.textContent=`${o[11]}`,l=F(),g(t,"id","hs-radio-"+o[10]),t.__value=o[10],mt(t,t.__value),g(t,"name","hs-radio-with-description"),g(t,"type","radio"),g(t,"class","border-gray-200 rounded-full text-blue-600 focus:ring-blue-500 dark:bg-gray-800 dark:border-gray-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800"),g(t,"aria-describedby","hs-radio-delete-description"),g(n,"class","flex items-center h-5 mt-1"),g(s,"class","block text-sm font-semibold text-gray-800 dark:text-gray-300"),g(c,"id","hs-radio-ddl-description"),g(c,"class","block text-sm text-gray-600 dark:text-gray-500"),g(i,"for","hs-radio-"+o[10]),g(i,"class","ml-3"),g(e,"class","relative flex items-start"),p.p(t)},m(S,A){N(S,e,A),_(e,n),_(n,t),t.checked=t.__value===o[0],_(e,r),_(e,i),_(i,s),_(i,a),_(i,c),_(e,l),y||(C=Le(t,"change",o[6]),y=!0)},p(S,A){A&1&&(t.checked=t.__value===S[0])},d(S){S&&B(e),p.r(),y=!1,C()}}}function Es(o){let e,n,t,r,i,s,a,c,l,p,y,C,S,A,E,b,d,m,w,q,R,T,u,f,x,j=xe(o[3]),k=[];for(let P=0;PClose ',c=F(),l=O("span"),l.textContent="Training Data Type",p=F(),y=O("div");for(let H=0;H{r(a,i.toLowerCase())},l=[[]];function p(){i=this.__value,n(0,i)}const y=S=>S.name===i;function C(){a=this.value,n(2,a)}return o.$$set=S=>{"onDismiss"in S&&n(1,t=S.onDismiss),"onTrain"in S&&n(5,r=S.onTrain),"selectedTrainingDataType"in S&&n(0,i=S.selectedTrainingDataType)},[i,t,a,s,c,r,p,l,y,C]}class js extends we{constructor(e){super(),_e(this,e,Ts,Es,ye,{onDismiss:1,onTrain:5,selectedTrainingDataType:0})}}function xr(o,e,n){const t=o.slice();return t[21]=e[n],t}function Sr(o,e,n){const t=o.slice();return t[24]=e[n],t}function Or(o,e,n){const t=o.slice();return t[24]=e[n],t}function Cr(o){let e,n;return e=new js({props:{onDismiss:o[13],onTrain:o[0]}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.onTrain=t[0]),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Ps(o){let e;return{c(){e=ge("Action")},m(n,t){N(n,e,t)},p:K,d(n){n&&B(e)}}}function qs(o){let e=o[24]+"",n;return{c(){n=ge(e)},m(t,r){N(t,n,r)},p:K,d(t){t&&B(n)}}}function Lr(o){let e,n,t,r;function i(c,l){return c[24]!="id"?qs:Ps}let a=i(o)(o);return{c(){e=O("th"),n=O("div"),t=O("span"),a.c(),r=F(),g(t,"class","text-xs font-semibold uppercase tracking-wide text-gray-800 dark:text-gray-200"),g(n,"class","flex items-center gap-x-2"),g(e,"scope","col"),g(e,"class","px-6 py-3 text-left")},m(c,l){N(c,e,l),_(e,n),_(n,t),a.m(t,null),_(e,r)},p(c,l){a.p(c,l)},d(c){c&&B(e),a.d()}}}function As(o){let e,n,t;function r(){return o[18](o[21],o[24])}return{c(){e=O("button"),e.textContent="Delete",g(e,"type","button"),g(e,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border-2 border-red-200 font-semibold text-red-500 hover:text-white hover:bg-red-500 hover:border-red-500 focus:outline-none focus:ring-2 focus:ring-red-200 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800")},m(i,s){N(i,e,s),n||(t=Le(e,"click",r),n=!0)},p(i,s){o=i},d(i){i&&B(e),n=!1,t()}}}function Ms(o){let e,n=o[21][o[24]]+"",t;return{c(){e=O("span"),t=ge(n),g(e,"class","text-gray-800 dark:text-gray-200")},m(r,i){N(r,e,i),_(e,t)},p(r,i){i&16&&n!==(n=r[21][r[24]]+"")&&Ne(t,n)},d(r){r&&B(e)}}}function Er(o){let e,n;function t(s,a){return s[24]!="id"?Ms:As}let i=t(o)(o);return{c(){e=O("td"),n=O("div"),i.c(),g(n,"class","px-6 py-3"),g(e,"class","h-px w-px ")},m(s,a){N(s,e,a),_(e,n),i.m(n,null)},p(s,a){i.p(s,a)},d(s){s&&B(e),i.d()}}}function Tr(o){let e,n,t=xe(o[8]),r=[];for(let i=0;iTraining Data Add or remove training data. Good training data is the key to accuracy.
',l=F(),p=O("div"),y=O("div"),C=O("button"),C.textContent="View all",S=F(),A=O("button"),A.innerHTML=`
+ Add training data`,E=F(),b=O("table"),d=O("thead"),m=O("tr");for(let ee=0;ee
+ Prev`,ht=F(),be=O("button"),be.innerHTML=`Next
+ `,ft=F(),Te&&Te.c(),Qe=ze(),g(C,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),g(A,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border border-transparent font-semibold bg-blue-500 text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all text-sm dark:focus:ring-offset-gray-800"),g(y,"class","inline-flex gap-x-2"),g(a,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-b border-gray-200 dark:border-gray-700"),g(d,"class","bg-gray-50 dark:bg-slate-800"),g(q,"class","divide-y divide-gray-200 dark:divide-gray-700"),g(b,"class","min-w-full divide-y divide-gray-200 dark:divide-gray-700"),g(f,"class","text-sm text-gray-600 dark:text-gray-400"),g(k,"class","py-2 px-3 pr-9 block w-full border-gray-200 rounded-md text-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-slate-900 dark:border-gray-700 dark:text-gray-400"),g(j,"class","max-w-sm space-y-3"),g(ae,"class","text-sm text-gray-600 dark:text-gray-400"),g(u,"class","inline-flex items-center gap-x-2"),g(Ue,"type","button"),g(Ue,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),g(be,"type","button"),g(be,"class","py-2 px-3 inline-flex justify-center items-center gap-2 rounded-md border font-medium bg-white text-gray-700 shadow-sm align-middle hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-blue-600 transition-all text-sm dark:bg-slate-900 dark:hover:bg-slate-800 dark:border-gray-700 dark:text-gray-400 dark:hover:text-white dark:focus:ring-offset-gray-800"),g(Ge,"class","inline-flex gap-x-2"),g(T,"class","px-6 py-4 grid gap-3 md:flex md:justify-between md:items-center border-t border-gray-200 dark:border-gray-700"),g(s,"class","bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden dark:bg-slate-900 dark:border-gray-700"),g(i,"class","p-1.5 min-w-full inline-block align-middle"),g(r,"class","-m-1.5 overflow-x-auto"),g(t,"class","flex flex-col"),g(n,"class","max-w-[85rem] px-4 py-10 sm:px-6 lg:px-8 lg:py-14 mx-auto")},m(ee,He){qe&&qe.m(ee,He),N(ee,e,He),N(ee,n,He),_(n,t),_(t,r),_(r,i),_(i,s),_(s,a),_(a,c),_(a,l),_(a,p),_(p,y),_(y,C),_(y,S),_(y,A),_(s,E),_(s,b),_(b,d),_(d,m);for(let oe=0;oe{qe=null}),Pe()),He&256){bt=xe(ee[8]);let oe;for(oe=0;oe{Te=null}),Pe())},i(ee){yt||(L(qe),L(Te),yt=!0)},o(ee){M(qe),M(Te),yt=!1},d(ee){ee&&(B(e),B(n),B(ft),B(Qe)),qe&&qe.d(ee),tt(De,ee),tt(Ee,ee),Te&&Te.d(ee),Bt=!1,gt(Nt)}}}function Rs(o,e,n){let{df:t}=e,{onTrain:r}=e,{removeTrainingData:i}=e,s=JSON.parse(t),a=s.length>0?Object.keys(s[0]):[],c=10,l=1,p=Math.ceil(s.length/c),y=(l-1)*c,C=l*c,S=s.slice(y,C);const A=()=>{l>1&&n(16,l--,l)},E=()=>{l{n(16,l=1),n(15,c=s.length)};let d=null,m=!1;const w=()=>{n(6,m=!0)},q=()=>{n(6,m=!1)},R=(f,x)=>{n(5,d=f[x])},T=()=>{n(5,d=null)},u=()=>{d&&i(d)};return o.$$set=f=>{"df"in f&&n(14,t=f.df),"onTrain"in f&&n(0,r=f.onTrain),"removeTrainingData"in f&&n(1,i=f.removeTrainingData)},o.$$.update=()=>{o.$$.dirty&98304&&n(2,y=(l-1)*c),o.$$.dirty&98304&&n(3,C=l*c),o.$$.dirty&12&&n(4,S=s.slice(y,C)),o.$$.dirty&32768&&n(17,p=Math.ceil(s.length/c)),o.$$.dirty&196608&&console.log(l,p)},[r,i,y,C,S,d,m,s,a,A,E,b,w,q,t,c,l,p,R,T,u]}class Hs extends we{constructor(e){super(),_e(this,e,Rs,Ds,ye,{df:14,onTrain:0,removeTrainingData:1})}}function Bs(o){let e;return{c(){e=O("div"),e.innerHTML='
',g(e,"class","min-h-[15rem] flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]")},m(n,t){N(n,e,t)},p:K,i:K,o:K,d(n){n&&B(e)}}}function Ns(o){let e,n,t,r;const i=[zs,Is],s=[];function a(c,l){return c[0].type==="df"?0:c[0].type==="error"?1:-1}return~(e=a(o))&&(n=s[e]=i[e](o)),{c(){n&&n.c(),t=ze()},m(c,l){~e&&s[e].m(c,l),N(c,t,l),r=!0},p(c,l){let p=e;e=a(c),e===p?~e&&s[e].p(c,l):(n&&(je(),M(s[p],1,1,()=>{s[p]=null}),Pe()),~e?(n=s[e],n?n.p(c,l):(n=s[e]=i[e](c),n.c()),L(n,1),n.m(t.parentNode,t)):n=null)},i(c){r||(L(n),r=!0)},o(c){M(n),r=!1},d(c){c&&B(t),~e&&s[e].d(c)}}}function Is(o){let e,n;return e=new Cn({props:{message:o[0].error}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.message=t[0].error),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function zs(o){let e,n;return e=new Hs({props:{df:o[0].df,removeTrainingData:vo,onTrain:ko}}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.df=t[0].df),e.$set(i)},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Vs(o){let e,n,t,r,i;const s=[Ns,Bs],a=[];function c(l,p){return l[0]!==null?0:1}return t=c(o),r=a[t]=s[t](o),{c(){e=O("div"),n=O("div"),r.c(),g(n,"class","py-10 lg:py-14"),g(e,"class","relative h-screen w-full lg:pl-64")},m(l,p){N(l,e,p),_(e,n),a[t].m(n,null),i=!0},p(l,[p]){let y=t;t=c(l),t===y?a[t].p(l,p):(je(),M(a[y],1,1,()=>{a[y]=null}),Pe(),r=a[t],r?r.p(l,p):(r=a[t]=s[t](l),r.c()),L(r,1),r.m(n,null))},i(l){i||(L(r),i=!0)},o(l){M(r),i=!1},d(l){l&&B(e),a[t].d()}}}function Gs(o,e,n){let t;return et(o,an,r=>n(0,t=r)),[t]}class Zs extends we{constructor(e){super(),_e(this,e,Gs,Vs,ye,{})}}function Us(o){let e;return{c(){e=O("body"),e.innerHTML=` No Training Data Did you read the docs? Oops, something went wrong.
You need some training data before you can use Vanna
© All Rights Reserved. 2022.
`,g(e,"class","flex h-full")},m(n,t){N(n,e,t)},p:K,i:K,o:K,d(n){n&&B(e)}}}class Qs extends we{constructor(e){super(),_e(this,e,null,Us,ye,{})}}function Ws(o){let e,n;return e=new Qs({}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Fs(o){let e,n;return e=new Zs({}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Js(o){let e,n;return e=new Ss({}),{c(){Q(e.$$.fragment)},m(t,r){Z(e,t,r),n=!0},i(t){n||(L(e.$$.fragment,t),n=!0)},o(t){M(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Ys(o){let e,n,t,r,i,s;n=new qo({});const a=[Js,Fs,Ws],c=[];function l(p,y){return p[0]==="chat"?0:p[0]==="training-data"?1:p[0]==="no-training-data"?2:-1}return~(r=l(o))&&(i=c[r]=a[r](o)),{c(){e=O("main"),Q(n.$$.fragment),t=F(),i&&i.c()},m(p,y){N(p,e,y),Z(n,e,null),_(e,t),~r&&c[r].m(e,null),s=!0},p(p,[y]){let C=r;r=l(p),r!==C&&(i&&(je(),M(c[C],1,1,()=>{c[C]=null}),Pe()),~r?(i=c[r],i||(i=c[r]=a[r](p),i.c()),L(i,1),i.m(e,null)):i=null)},i(p){s||(L(n.$$.fragment,p),L(i),s=!0)},o(p){M(n.$$.fragment,p),M(i),s=!1},d(p){p&&B(e),U(n),~r&&c[r].d()}}}function Ks(o,e,n){let t;return et(o,Wt,r=>n(0,t=r)),Mr(async()=>{yo(),ho(),new URL(window.location.href).hash.slice(1)==="training-data"?Hr():Br()}),[t]}class Xs extends we{constructor(e){super(),_e(this,e,Ks,Ys,ye,{})}}new Xs({target:document.getElementById("app")});
+'''
\ No newline at end of file
From 75ea2cfbe81a0c0cf3556bb5296e927f002bde96 Mon Sep 17 00:00:00 2001
From: Zain Hoda <7146154+zainhoda@users.noreply.github.com>
Date: Wed, 27 Mar 2024 09:46:11 -0400
Subject: [PATCH 2/2] Update docstring
---
src/vanna/flask/__init__.py | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/vanna/flask/__init__.py b/src/vanna/flask/__init__.py
index 4701c7d2..21a711f6 100644
--- a/src/vanna/flask/__init__.py
+++ b/src/vanna/flask/__init__.py
@@ -118,8 +118,22 @@ def __init__(self, vn, cache: Cache = MemoryCache(),
Args:
vn: The Vanna instance to interact with.
- cache: The cache to use. Defaults to MemoryCache.
+ cache: The cache to use. Defaults to MemoryCache, which uses an in-memory cache. You can also pass in a custom cache that implements the Cache interface.
allow_llm_to_see_data: Whether to allow the LLM to see data. Defaults to False.
+ logo: The logo to display in the UI. Defaults to the Vanna logo.
+ title: The title to display in the UI. Defaults to "Welcome to Vanna.AI".
+ subtitle: The subtitle to display in the UI. Defaults to "Your AI-powered copilot for SQL queries.".
+ show_training_data: Whether to show the training data in the UI. Defaults to True.
+ suggested_questions: Whether to show suggested questions in the UI. Defaults to True.
+ sql: Whether to show the SQL input in the UI. Defaults to True.
+ table: Whether to show the table output in the UI. Defaults to True.
+ csv_download: Whether to allow downloading the table output as a CSV file. Defaults to True.
+ chart: Whether to show the chart output in the UI. Defaults to True.
+ redraw_chart: Whether to allow redrawing the chart. Defaults to True.
+ auto_fix_sql: Whether to allow auto-fixing SQL errors. Defaults to True.
+ ask_results_correct: Whether to ask the user if the results are correct. Defaults to True.
+ followup_questions: Whether to show followup questions. Defaults to True.
+ summarization: Whether to show summarization. Defaults to True.
Returns:
None