diff --git a/assets/Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js b/assets/Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js similarity index 90% rename from assets/Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js rename to assets/Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js index 98b2d4752618f3c3febd5c7f9a247a450cc261a1..cbdafb2459bacd8f64d7a611f09d99322c2b1cda 100644 --- a/assets/Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js +++ b/assets/Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js @@ -1 +1 @@ -import{d,bK as c,bL as f,r as s,w as p,G as v,bH as x,o as h,c as y,q as _}from"./index-5LjD1Eoi.js";const w=d({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:c(["submit"],["update:modelValue"]),setup(n,{emit:r}){const u=r,e=f(n,"modelValue"),a=s(),o=s("auto");function i(t){t.code==="Enter"&&!t.shiftKey&&(t.preventDefault(),u("submit",e.value))}return p(e,()=>{o.value="auto",requestAnimationFrame(()=>{a.value&&(o.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(t,l)=>v((h(),y("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":l[0]||(l[0]=m=>e.value=m),style:_({height:o.value}),onKeydown:i},null,36)),[[x,e.value]])}});export{w as _}; +import{d,bK as c,bL as f,r as s,w as p,G as v,bH as x,o as h,c as y,q as _}from"./index-DCMFRrFG.js";const w=d({__name:"Basic",props:{modelValue:{default:""},modelModifiers:{}},emits:c(["submit"],["update:modelValue"]),setup(n,{emit:r}){const u=r,e=f(n,"modelValue"),a=s(),o=s("auto");function i(t){t.code==="Enter"&&!t.shiftKey&&(t.preventDefault(),u("submit",e.value))}return p(e,()=>{o.value="auto",requestAnimationFrame(()=>{a.value&&(o.value=`${a.value.scrollHeight}px`)})},{immediate:!0}),(t,l)=>v((h(),y("textarea",{ref_key:"textareaRef",ref:a,"onUpdate:modelValue":l[0]||(l[0]=m=>e.value=m),style:_({height:o.value}),onKeydown:i},null,36)),[[x,e.value]])}});export{w as _}; diff --git a/assets/CardDetailDialog-BV3jfrnh.js b/assets/CardDetailDialog-BV3jfrnh.js deleted file mode 100644 index ea5f2996983bf801fd71a3d307305884222943d9..0000000000000000000000000000000000000000 --- a/assets/CardDetailDialog-BV3jfrnh.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-Dq2ynzTu.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js";import"./index-5LjD1Eoi.js";import"./index-BdorYkr1.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./airi-card-BWkmdsVt.js";import"./emotions-CAex_2dA.js";import"./consciousness-D7jKnAf3.js";import"./providers-CIeQW25J.js";import"./index-LHmcipjy.js";import"./speech-BYL-UWPg.js";/* empty css */export{o as default}; diff --git a/assets/CardDetailDialog-CmoHJwWd.js b/assets/CardDetailDialog-CmoHJwWd.js new file mode 100644 index 0000000000000000000000000000000000000000..558c8521bd4b0c0734d166514a894f5f1ddb75c6 --- /dev/null +++ b/assets/CardDetailDialog-CmoHJwWd.js @@ -0,0 +1 @@ +import{_ as o}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-B2jcuDUm.js";import"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js";import"./index-DCMFRrFG.js";import"./index-GwMN-Az5.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./airi-card-DTE6eySa.js";import"./emotions-CAex_2dA.js";import"./consciousness-DGPhIG2M.js";import"./providers-DHuI5XmA.js";import"./index-LHmcipjy.js";import"./speech-Bc-BAopv.js";/* empty css */export{o as default}; diff --git a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-Dq2ynzTu.js b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-B2jcuDUm.js similarity index 95% rename from assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-Dq2ynzTu.js rename to assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-B2jcuDUm.js index d87d0f25cebe5d8ee7e90933722801993ac6cc41..4081bdc407f33871132f441ab47f495a221d4292 100644 --- a/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-Dq2ynzTu.js +++ b/assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-B2jcuDUm.js @@ -1 +1 @@ -import{a as E,_ as O}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as F,k as U,s as q,l as x,r as L,c as l,o as n,bA as f,b as m,u as o,E as k,a as e,i as v,bN as u,t as i,F as $,bB as A}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import{u as R}from"./airi-card-BWkmdsVt.js";/* empty css */import"./emotions-CAex_2dA.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-BdorYkr1.js";const X={key:0,class:"w-full flex flex-col gap-5"},Y={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-400 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},oe={class:"mt-4"},le={class:"border-b border-neutral-200 dark:border-neutral-700"},ne={class:"flex justify-center -mb-px sm:justify-start space-x-1"},ie=["onClick"],de={class:"flex items-center gap-1"},ue={key:0},ce=["innerHTML"],me={key:1},ve=["innerHTML"],pe={key:2},ge={flex:"~ col","max-h-60":"","gap-4":"","overflow-auto":"","pr-1":"","sm:max-h-80":""},xe={key:0,flex:"~ col","gap-2":""},be={"text-lg":"","text-neutral-500":"","font-medium":"","dark:text-neutral-400":""},fe=["innerHTML"],he={key:3},_e={grid:"~ cols-1 sm:cols-3","gap-4":""},ke={flex:"~ col",bg:"white/60 dark:black/30","gap-1":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},we={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ye={truncate:"","font-medium":""},Ce={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},Ie={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Te={truncate:"","font-medium":""},Ve={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},He={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Le={truncate:"","font-medium":""},$e={key:1,bg:"neutral-50/50 dark:neutral-900/50","rounded-xl":"","p-8":"","text-center":"",border:"~ neutral-200/50 dark:neutral-700/30",shadow:"sm"},ze=F({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:D}){const b=B,M=D,{t:d}=U(),w=R(),{removeCard:N}=w,{activeCardId:S}=q(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,j;if(!a.value||!((c=(t=a.value.extensions)==null?void 0:t.airi)!=null&&c.modules))return{consciousness:"",speech:"",voice:""};const s=a.value.extensions.airi.modules;return{consciousness:((r=s.consciousness)==null?void 0:r.model)||"",speech:((g=s.speech)==null?void 0:g.model)||"",voice:((j=s.speech)==null?void 0:j.voice_id)||""}}),C=x(()=>a.value?{personality:a.value.personality,scenario:a.value.scenario,systemPrompt:a.value.systemPrompt,postHistoryInstructions:a.value.postHistoryInstructions}:{}),h=x(()=>b.cardId===S.value),I=L(!1);function P(){I.value=!0,setTimeout(()=>{S.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'{{ $1 }}').trim()}const _=L(!1);function z(){a.value&&(N(b.cardId),M("update:modelValue",!1)),_.value=!1}const V=L(""),H=x(()=>{var t,c;const s=[];return(t=a.value)!=null&&t.description&&s.push({id:"description",label:d("settings.pages.card.description_label"),icon:"i-solar:document-text-linear"}),(c=a.value)!=null&&c.notes&&s.push({id:"notes",label:d("settings.pages.card.creator_notes"),icon:"i-solar:notes-linear"}),Object.values(C.value).some(r=>!!r)&&s.push({id:"character",label:d("settings.pages.card.character"),icon:"i-solar:user-rounded-linear"}),s.push({id:"modules",label:d("settings.pages.card.modules"),icon:"i-solar:tuning-square-linear"}),s}),p=x({get:()=>{var s;return H.value.find(t=>t.id===V.value)?V.value:((s=H.value[0])==null?void 0:s.id)||""},set:s=>{V.value=s}});return(s,t)=>{var c;return n(),l(f,null,[m(o(G),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>M("update:modelValue",r))},{default:k(()=>[m(o(J),null,{default:k(()=>[m(o(K),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),m(o(Q),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6"},{default:k(()=>[a.value?(n(),l("div",X,[e("div",Y,[e("div",Z,[e("div",null,[e("div",ee,[m(o(W),{"text-2xl":"","font-bold":"",class:"from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent"},{default:k(()=>[u(i(a.value.name),1)]),_:1}),h.value?(n(),l("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(o(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(n(),l(f,{key:0},[u(" · "+i(o(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(o(E),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?o(d)("settings.pages.card.active"):o(d)("settings.pages.card.activate"),disabled:h.value,class:$({"animate-pulse":I.value}),onClick:P},null,8,["icon","label","disabled","class"])])]),e("div",oe,[e("div",le,[e("div",ne,[(n(!0),l(f,null,A(H.value,r=>(n(),l("button",{key:r.id,class:$(["px-4 py-2 text-sm font-medium",[p.value===r.id?"text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400":"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"]]),onClick:g=>p.value=r.id},[e("div",de,[e("div",{class:$(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(n(),l("div",ue,[e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","text-neutral-700":"","sm:max-h-80":"","dark:text-neutral-300":"",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40",innerHTML:T(a.value.notes)},null,8,ce)])):v("",!0),p.value==="description"&&a.value.description?(n(),l("div",me,[e("div",{bg:"white/60 dark:black/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","sm:max-h-80":"",text:"neutral-600 dark:neutral-300",border:"~ neutral-200/50 dark:neutral-700/30",innerHTML:T(a.value.description)},null,8,ve)])):v("",!0),p.value==="character"&&Object.values(C.value).some(r=>!!r)?(n(),l("div",pe,[e("div",ge,[(n(!0),l(f,null,A(C.value,(r,g)=>(n(),l(f,{key:g},[r?(n(),l("div",xe,[e("h2",be,i(o(d)(`settings.pages.card.${g.toLowerCase()}`)),1),e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40","max-h-none":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-3":"","text-neutral-700":"","dark:text-neutral-300":"",innerHTML:T(r)},null,8,fe)])):v("",!0)],64))),128))])])):v("",!0),p.value==="modules"?(n(),l("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(o(d)("settings.pages.card.consciousness.model")),1)]),e("div",ye,i(y.value.consciousness??"default"),1)]),e("div",Ce,[e("span",Ie,[t[5]||(t[5]=e("div",{"i-lucide:mic":""},null,-1)),u(" "+i(o(d)("settings.pages.card.speech.model")),1)]),e("div",Te,i(y.value.speech??"default"),1)]),e("div",Ve,[e("span",He,[t[6]||(t[6]=e("div",{"i-lucide:music":""},null,-1)),u(" "+i(o(d)("settings.pages.card.speech.voice")),1)]),e("div",Le,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(n(),l("div",$e,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(o(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(O,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:z,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{ze as _}; +import{a as E,_ as O}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as F,k as U,s as q,l as x,r as L,c as l,o as n,bA as f,b as m,u as o,E as k,a as e,i as v,bN as u,t as i,F as $,bB as A}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import{u as R}from"./airi-card-DTE6eySa.js";/* empty css */import"./emotions-CAex_2dA.js";import{n as G,I as J,$ as K,P as Q,B as W}from"./index-GwMN-Az5.js";const X={key:0,class:"w-full flex flex-col gap-5"},Y={flex:"~ col","gap-3":""},Z={flex:"~ row","items-center":"","justify-between":""},ee={flex:"~ row","items-center":"","gap-2":""},te={key:0,class:"bg-primary-100 text-primary-600 dark:bg-primary-900/40 dark:text-primary-400 flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium"},ae={"mt-1":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},re={"font-medium":""},se={flex:"~ row","gap-2":""},oe={class:"mt-4"},le={class:"border-b border-neutral-200 dark:border-neutral-700"},ne={class:"flex justify-center -mb-px sm:justify-start space-x-1"},ie=["onClick"],de={class:"flex items-center gap-1"},ue={key:0},ce=["innerHTML"],me={key:1},ve=["innerHTML"],pe={key:2},ge={flex:"~ col","max-h-60":"","gap-4":"","overflow-auto":"","pr-1":"","sm:max-h-80":""},xe={key:0,flex:"~ col","gap-2":""},be={"text-lg":"","text-neutral-500":"","font-medium":"","dark:text-neutral-400":""},fe=["innerHTML"],he={key:3},_e={grid:"~ cols-1 sm:cols-3","gap-4":""},ke={flex:"~ col",bg:"white/60 dark:black/30","gap-1":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},we={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ye={truncate:"","font-medium":""},Ce={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},Ie={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Te={truncate:"","font-medium":""},Ve={flex:"~ col",bg:"white/60 dark:black/30","gap-2":"","rounded-lg":"","p-3":"",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40"},He={flex:"~ row","items-center":"","gap-2":"","text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},Le={truncate:"","font-medium":""},$e={key:1,bg:"neutral-50/50 dark:neutral-900/50","rounded-xl":"","p-8":"","text-center":"",border:"~ neutral-200/50 dark:neutral-700/30",shadow:"sm"},ze=F({__name:"CardDetailDialog",props:{modelValue:{type:Boolean},cardId:null},emits:["update:modelValue"],setup(B,{emit:D}){const b=B,M=D,{t:d}=U(),w=R(),{removeCard:N}=w,{activeCardId:S}=q(w),a=x(()=>{if(b.cardId)return w.getCard(b.cardId)}),y=x(()=>{var t,c,r,g,j;if(!a.value||!((c=(t=a.value.extensions)==null?void 0:t.airi)!=null&&c.modules))return{consciousness:"",speech:"",voice:""};const s=a.value.extensions.airi.modules;return{consciousness:((r=s.consciousness)==null?void 0:r.model)||"",speech:((g=s.speech)==null?void 0:g.model)||"",voice:((j=s.speech)==null?void 0:j.voice_id)||""}}),C=x(()=>a.value?{personality:a.value.personality,scenario:a.value.scenario,systemPrompt:a.value.systemPrompt,postHistoryInstructions:a.value.postHistoryInstructions}:{}),h=x(()=>b.cardId===S.value),I=L(!1);function P(){I.value=!0,setTimeout(()=>{S.value=b.cardId,I.value=!1},300)}function T(s){return s==null?void 0:s.replace(/\{\{(.*?)\}\}/g,'{{ $1 }}').trim()}const _=L(!1);function z(){a.value&&(N(b.cardId),M("update:modelValue",!1)),_.value=!1}const V=L(""),H=x(()=>{var t,c;const s=[];return(t=a.value)!=null&&t.description&&s.push({id:"description",label:d("settings.pages.card.description_label"),icon:"i-solar:document-text-linear"}),(c=a.value)!=null&&c.notes&&s.push({id:"notes",label:d("settings.pages.card.creator_notes"),icon:"i-solar:notes-linear"}),Object.values(C.value).some(r=>!!r)&&s.push({id:"character",label:d("settings.pages.card.character"),icon:"i-solar:user-rounded-linear"}),s.push({id:"modules",label:d("settings.pages.card.modules"),icon:"i-solar:tuning-square-linear"}),s}),p=x({get:()=>{var s;return H.value.find(t=>t.id===V.value)?V.value:((s=H.value[0])==null?void 0:s.id)||""},set:s=>{V.value=s}});return(s,t)=>{var c;return n(),l(f,null,[m(o(G),{open:B.modelValue,"onUpdate:open":t[0]||(t[0]=r=>M("update:modelValue",r))},{default:k(()=>[m(o(J),null,{default:k(()=>[m(o(K),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50 backdrop-blur-sm"}),m(o(Q),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 m-0 max-h-[90vh] max-w-6xl w-[92vw] flex flex-col overflow-auto border border-neutral-200 rounded-xl bg-white p-5 shadow-xl 2xl:w-[60vw] lg:w-[80vw] md:w-[85vw] xl:w-[70vw] -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800 sm:p-6"},{default:k(()=>[a.value?(n(),l("div",X,[e("div",Y,[e("div",Z,[e("div",null,[e("div",ee,[m(o(W),{"text-2xl":"","font-bold":"",class:"from-primary-500 to-primary-400 bg-gradient-to-r bg-clip-text text-transparent"},{default:k(()=>[u(i(a.value.name),1)]),_:1}),h.value?(n(),l("div",te,[t[3]||(t[3]=e("div",{"i-solar:check-circle-bold-duotone":"","text-xs":""},null,-1)),u(" "+i(o(d)("settings.pages.card.active_badge")),1)])):v("",!0)]),e("div",ae,[u(" v"+i(a.value.version)+" ",1),a.value.creator?(n(),l(f,{key:0},[u(" · "+i(o(d)("settings.pages.card.created_by"))+" ",1),e("span",re,i(a.value.creator),1)],64)):v("",!0)])]),e("div",se,[m(o(E),{variant:"primary",icon:h.value?"i-solar:check-circle-bold-duotone":"i-solar:play-circle-broken",label:h.value?o(d)("settings.pages.card.active"):o(d)("settings.pages.card.activate"),disabled:h.value,class:$({"animate-pulse":I.value}),onClick:P},null,8,["icon","label","disabled","class"])])]),e("div",oe,[e("div",le,[e("div",ne,[(n(!0),l(f,null,A(H.value,r=>(n(),l("button",{key:r.id,class:$(["px-4 py-2 text-sm font-medium",[p.value===r.id?"text-primary-600 dark:text-primary-400 border-b-2 border-primary-500 dark:border-primary-400":"text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300"]]),onClick:g=>p.value=r.id},[e("div",de,[e("div",{class:$(r.icon)},null,2),u(" "+i(r.label),1)])],10,ie))),128))])])]),p.value==="notes"&&a.value.notes?(n(),l("div",ue,[e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","text-neutral-700":"","sm:max-h-80":"","dark:text-neutral-300":"",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40",innerHTML:T(a.value.notes)},null,8,ce)])):v("",!0),p.value==="description"&&a.value.description?(n(),l("div",me,[e("div",{bg:"white/60 dark:black/30","max-h-60":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-4":"","sm:max-h-80":"",text:"neutral-600 dark:neutral-300",border:"~ neutral-200/50 dark:neutral-700/30",innerHTML:T(a.value.description)},null,8,ve)])):v("",!0),p.value==="character"&&Object.values(C.value).some(r=>!!r)?(n(),l("div",pe,[e("div",ge,[(n(!0),l(f,null,A(C.value,(r,g)=>(n(),l(f,{key:g},[r?(n(),l("div",xe,[e("h2",be,i(o(d)(`settings.pages.card.${g.toLowerCase()}`)),1),e("div",{bg:"white/60 dark:black/30",border:"~ neutral-200/50 dark:neutral-700/30",transition:"all duration-200",hover:"bg-white/80 dark:bg-black/40","max-h-none":"","overflow-auto":"","whitespace-pre-line":"","rounded-lg":"","p-3":"","text-neutral-700":"","dark:text-neutral-300":"",innerHTML:T(r)},null,8,fe)])):v("",!0)],64))),128))])])):v("",!0),p.value==="modules"?(n(),l("div",he,[e("div",_e,[e("div",ke,[e("span",we,[t[4]||(t[4]=e("div",{"i-lucide:ghost":""},null,-1)),u(" "+i(o(d)("settings.pages.card.consciousness.model")),1)]),e("div",ye,i(y.value.consciousness??"default"),1)]),e("div",Ce,[e("span",Ie,[t[5]||(t[5]=e("div",{"i-lucide:mic":""},null,-1)),u(" "+i(o(d)("settings.pages.card.speech.model")),1)]),e("div",Te,i(y.value.speech??"default"),1)]),e("div",Ve,[e("span",He,[t[6]||(t[6]=e("div",{"i-lucide:music":""},null,-1)),u(" "+i(o(d)("settings.pages.card.speech.voice")),1)]),e("div",Le,i(y.value.voice??"default"),1)])])])):v("",!0)])])):(n(),l("div",$e,[t[7]||(t[7]=e("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),u(" "+i(o(d)("settings.pages.card.card_not_found")),1)]))]),_:1})]),_:1})]),_:1},8,["open"]),m(O,{modelValue:_.value,"onUpdate:modelValue":t[1]||(t[1]=r=>_.value=r),"card-name":(c=a.value)==null?void 0:c.name,onConfirm:z,onCancel:t[2]||(t[2]=r=>_.value=!1)},null,8,["modelValue","card-name"])],64)}}});export{ze as _}; diff --git a/assets/CardListItem-B3688U82.js b/assets/CardListItem-B3688U82.js new file mode 100644 index 0000000000000000000000000000000000000000..8098b85a314c2540976f413d953dc41e38252f04 --- /dev/null +++ b/assets/CardListItem-B3688U82.js @@ -0,0 +1 @@ +import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-BCG0Y9FB.js";import"./index-DCMFRrFG.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";/* empty css */export{o as default}; diff --git a/assets/CardListItem-R5lVEmON.js b/assets/CardListItem-R5lVEmON.js deleted file mode 100644 index 1760cb857826c3c5f58081fb506b095f3bea2981..0000000000000000000000000000000000000000 --- a/assets/CardListItem-R5lVEmON.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./CardListItem.vue_vue_type_script_setup_true_lang-Dt75YOm9.js";import"./index-5LjD1Eoi.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";/* empty css */export{o as default}; diff --git a/assets/CardListItem.vue_vue_type_script_setup_true_lang-Dt75YOm9.js b/assets/CardListItem.vue_vue_type_script_setup_true_lang-BCG0Y9FB.js similarity index 96% rename from assets/CardListItem.vue_vue_type_script_setup_true_lang-Dt75YOm9.js rename to assets/CardListItem.vue_vue_type_script_setup_true_lang-BCG0Y9FB.js index 83ca030fbe2ac2b5967a6860ca0b1f3fc21d98ad..999b331f2054112bfb0c7b15a5e6a45da6156ec6 100644 --- a/assets/CardListItem.vue_vue_type_script_setup_true_lang-Dt75YOm9.js +++ b/assets/CardListItem.vue_vue_type_script_setup_true_lang-BCG0Y9FB.js @@ -1 +1 @@ -import{d as M,r as s,f as F,c as p,o as d,B as R,q,bq as E,m as H,E as I,a as t,i as v,t as l,bO as k,F as h,u as N}from"./index-5LjD1Eoi.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";/* empty css */const O=M({__name:"CursorFloating",props:{intensity:{default:1.5}},setup(r){const n=r,o=s(null),a=s(""),e=s("50% 50%"),i=s("50% 50%"),y=s(.5);function w(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),_=c.clientX-b.left,C=c.clientY-b.top,B=u.offsetWidth,z=u.offsetHeight,f=Math.abs(Math.floor(100/B*_)-100),m=Math.abs(Math.floor(100/z*C)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,P=50+(f-50)/7,S=50+(m-50)/7,X=(x-50)/1.5*.2*n.intensity,Y=(g-50)/2*-1*.2*n.intensity,A=50-f+(50-m),j=.5+Math.abs(A)*.008*n.intensity;a.value=`perspective(1200px) rotateX(${Y}deg) rotateY(${X}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${P}% ${S}%`,y.value=j}function $(){a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",e.value="50% 50%",i.value="50% 50%",y.value=.5}return F(()=>{a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"}),(c,u)=>(d(),p("div",{ref_key:"cardRef",ref:o,class:"card-hover-effect",style:q({transform:a.value,"--effect-intensity":r.intensity}),onMousemove:w,onMouseleave:$},[R(c.$slots,"default",{},void 0,!0)],36))}}),V=E(O,[["__scopeId","data-v-895421da"]]),W={relative:"",flex:"~ col 1","justify-between":"","gap-3":"","overflow-hidden":"","rounded-lg":"",bg:"white dark:neutral-900","p-5":"",transition:"all ease-in-out duration-400",after:"content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out",hover:"after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20] text-primary-600/80 dark:text-primary-300/80"},D={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},L={"flex-1":"",truncate:"","text-lg":"","font-bold":""},G={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},J={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},K={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},Q={flex:"","items-center":"","gap-1.5":""},T={flex:"","items-center":"","gap-0.5":""},U={flex:"","items-center":"","gap-0.5":""},Z={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},ee=["disabled"],ie=M({__name:"CardListItem",props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:["select","activate","delete"],setup(r,{emit:n}){const o=n;return(a,e)=>(d(),H(N(V),{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:h([r.isSelected?"border-2 border-primary-400 dark:border-primary-600":"border-2 border-neutral-100 dark:border-neutral-800/25"]),bg:"neutral-200/50 dark:neutral-800/50","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",transition:"all ease-in-out duration-400",before:"content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0",hover:"before:w-50% before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent",onClick:e[2]||(e[2]=i=>o("select"))},{default:I(()=>[t("div",W,[t("div",D,[t("h3",L,l(r.name),1),r.isActive?(d(),p("div",G,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",J,l(r.description),1)):v("",!0),t("div",K,[t("div",null,"v"+l(r.version),1),t("div",Q,[t("div",T,[e[4]||(e[4]=t("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),t("span",null,l(r.consciousnessModel),1)]),t("div",U,[e[5]||(e[5]=t("div",{"i-lucide:mic":"","text-xs":""},null,-1)),t("span",null,l(r.voiceModel),1)])])])]),t("div",Z,[t("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:e[0]||(e[0]=k(i=>o("activate"),["stop"]))},[t("div",{class:h([r.isActive?"i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400":"i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400"])},null,2)],8,ee),r.id!=="default"?(d(),p("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:e[1]||(e[1]=k(i=>o("delete"),["stop"]))},e[6]||(e[6]=[t("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):v("",!0)])]),_:1},8,["class"]))}});export{ie as _}; +import{d as M,r as s,f as F,c as p,o as d,B as R,q,bq as E,m as H,E as I,a as t,i as v,t as l,bO as k,F as h,u as N}from"./index-DCMFRrFG.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";/* empty css */const O=M({__name:"CursorFloating",props:{intensity:{default:1.5}},setup(r){const n=r,o=s(null),a=s(""),e=s("50% 50%"),i=s("50% 50%"),y=s(.5);function w(c){if(!o.value)return;const u=o.value,b=u.getBoundingClientRect(),_=c.clientX-b.left,C=c.clientY-b.top,B=u.offsetWidth,z=u.offsetHeight,f=Math.abs(Math.floor(100/B*_)-100),m=Math.abs(Math.floor(100/z*C)-100),x=50+(f-50)/1.5,g=50+(m-50)/1.5,P=50+(f-50)/7,S=50+(m-50)/7,X=(x-50)/1.5*.2*n.intensity,Y=(g-50)/2*-1*.2*n.intensity,A=50-f+(50-m),j=.5+Math.abs(A)*.008*n.intensity;a.value=`perspective(1200px) rotateX(${Y}deg) rotateY(${X}deg) scale3d(${1+.015*n.intensity}, ${1+.015*n.intensity}, ${1+.015*n.intensity})`,e.value=`${x}% ${g}%`,i.value=`${P}% ${S}%`,y.value=j}function $(){a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)",e.value="50% 50%",i.value="50% 50%",y.value=.5}return F(()=>{a.value="perspective(1200px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)"}),(c,u)=>(d(),p("div",{ref_key:"cardRef",ref:o,class:"card-hover-effect",style:q({transform:a.value,"--effect-intensity":r.intensity}),onMousemove:w,onMouseleave:$},[R(c.$slots,"default",{},void 0,!0)],36))}}),V=E(O,[["__scopeId","data-v-895421da"]]),W={relative:"",flex:"~ col 1","justify-between":"","gap-3":"","overflow-hidden":"","rounded-lg":"",bg:"white dark:neutral-900","p-5":"",transition:"all ease-in-out duration-400",after:"content-empty absolute inset-0 z--2 w-full h-full bg-dotted-[neutral-200/80] bg-size-10px mask-image-[linear-gradient(165deg,white_30%,transparent_50%)] transition-all duration-400 ease-in-out",hover:"after:bg-dotted-[primary-300/50] dark:after:bg-dotted-[primary-200/20] text-primary-600/80 dark:text-primary-300/80"},D={"z-1":"",flex:"","items-start":"","justify-between":"","gap-2":""},L={"flex-1":"",truncate:"","text-lg":"","font-bold":""},G={key:0,"shrink-0":"","rounded-md":"","p-1":"",bg:"primary-100 dark:primary-900/40",text:"primary-600 dark:primary-400"},J={key:0,"line-clamp-3":"","min-h-40px":"","flex-1":"","text-sm":"",text:"neutral-500 dark:neutral-400"},K={"z-1":"",flex:"","items-center":"","justify-between":"","text-xs":"",text:"neutral-500 dark:neutral-400"},Q={flex:"","items-center":"","gap-1.5":""},T={flex:"","items-center":"","gap-0.5":""},U={flex:"","items-center":"","gap-0.5":""},Z={flex:"","items-center":"","justify-end":"","px-2":"","py-1.5":""},ee=["disabled"],ie=M({__name:"CardListItem",props:{id:null,name:null,description:null,isActive:{type:Boolean},isSelected:{type:Boolean},version:null,consciousnessModel:null,voiceModel:null},emits:["select","activate","delete"],setup(r,{emit:n}){const o=n;return(a,e)=>(d(),H(N(V),{relative:"","min-h-120px":"",flex:"~ col","cursor-pointer":"","overflow-hidden":"","rounded-xl":"",class:h([r.isSelected?"border-2 border-primary-400 dark:border-primary-600":"border-2 border-neutral-100 dark:border-neutral-800/25"]),bg:"neutral-200/50 dark:neutral-800/50","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",transition:"all ease-in-out duration-400",before:"content-empty absolute inset-0 z-0 w-25% h-full transition-all duration-400 ease-in-out bg-gradient-to-r from-primary-500/0 to-primary-500/0 dark:from-primary-400/0 dark:to-primary-400/0 mask-image-[linear-gradient(120deg,white_100%)] opacity-0",hover:"before:w-50% before:opacity-100 before:bg-gradient-to-r before:from-primary-500/20 before:via-primary-500/10 before:to-transparent before:dark:from-primary-400/20 before:dark:via-primary-400/10 before:dark:to-transparent",onClick:e[2]||(e[2]=i=>o("select"))},{default:I(()=>[t("div",W,[t("div",D,[t("h3",L,l(r.name),1),r.isActive?(d(),p("div",G,e[3]||(e[3]=[t("div",{"i-solar:check-circle-bold-duotone":"","text-sm":""},null,-1)]))):v("",!0)]),r.description?(d(),p("p",J,l(r.description),1)):v("",!0),t("div",K,[t("div",null,"v"+l(r.version),1),t("div",Q,[t("div",T,[e[4]||(e[4]=t("div",{"i-lucide:ghost":"","text-xs":""},null,-1)),t("span",null,l(r.consciousnessModel),1)]),t("div",U,[e[5]||(e[5]=t("div",{"i-lucide:mic":"","text-xs":""},null,-1)),t("span",null,l(r.voiceModel),1)])])])]),t("div",Z,[t("button",{"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",disabled:r.isActive,onClick:e[0]||(e[0]=k(i=>o("activate"),["stop"]))},[t("div",{class:h([r.isActive?"i-solar:check-circle-bold-duotone text-primary-500 dark:text-primary-400":"i-solar:play-circle-broken text-neutral-500 dark:text-neutral-400"])},null,2)],8,ee),r.id!=="default"?(d(),p("button",{key:0,"rounded-lg":"","p-1.5":"","transition-colors":"",hover:"bg-neutral-200 dark:bg-neutral-700/50",onClick:e[1]||(e[1]=k(i=>o("delete"),["stop"]))},e[6]||(e[6]=[t("div",{"i-solar:trash-bin-trash-linear":"",text:"neutral-500 dark:neutral-400"},null,-1)]))):v("",!0)])]),_:1},8,["class"]))}});export{ie as _}; diff --git a/assets/Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js b/assets/Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js similarity index 88% rename from assets/Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js rename to assets/Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js index eb3dd2aed7e7ddbf532ecee4df3e7c8a2c040b40..d5fb6a0d3d343c83c0e34dfd4fe4c2eaa9c7e0c3 100644 --- a/assets/Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js +++ b/assets/Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js @@ -1 +1 @@ -import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";/* empty css */import{d as p,bK as m,bL as f,ai as b,c,o as v,B as r,b as V,bW as u,bX as y,u as g,E as k,i as x,bY as B,a as s,bN as C,t as i}from"./index-5LjD1Eoi.js";const N={op50:""},M=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");b(()=>{t.default!=null&&(e.value=!!t.default)});function n(a){return e.value=a,a}return(a,l)=>(v(),c("div",null,[r(a.$slots,"trigger",u(y({visible:e.value,setVisible:n})),()=>[s("button",{sticky:"","top-0":"","z-10":"",flex:"","items-center":"","justify-between":"",px2:"",py1:"","text-sm":"","backdrop-blur-xl":"",onClick:l[0]||(l[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),l[1]||(l[1]=C()),s("span",N,i(e.value?"▲":"▼"),1)])]),V(g(d),null,{default:k(()=>[e.value?r(a.$slots,"default",u(B({key:0},{visible:e.value,setVisible:n}))):x("",!0)]),_:3})]))}});export{M as _}; +import{_ as d}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";/* empty css */import{d as p,bK as m,bL as f,ai as b,c,o as v,B as r,b as V,bW as u,bX as y,u as g,E as k,i as x,bY as B,a as s,bN as C,t as i}from"./index-DCMFRrFG.js";const N={op50:""},M=p({__name:"Collapsable",props:m({default:{type:Boolean},label:null},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const t=o,e=f(o,"modelValue");b(()=>{t.default!=null&&(e.value=!!t.default)});function n(a){return e.value=a,a}return(a,l)=>(v(),c("div",null,[r(a.$slots,"trigger",u(y({visible:e.value,setVisible:n})),()=>[s("button",{sticky:"","top-0":"","z-10":"",flex:"","items-center":"","justify-between":"",px2:"",py1:"","text-sm":"","backdrop-blur-xl":"",onClick:l[0]||(l[0]=_=>e.value=!e.value)},[s("span",null,i(t.label??"Collapsable"),1),l[1]||(l[1]=C()),s("span",N,i(e.value?"▲":"▼"),1)])]),V(g(d),null,{default:k(()=>[e.value?r(a.$slots,"default",u(B({key:0},{visible:e.value,setVisible:n}))):x("",!0)]),_:3})]))}});export{M as _}; diff --git a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DhP-gZZO.js b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQW4hQKz.js similarity index 90% rename from assets/ColorPalette.vue_vue_type_script_setup_true_lang-DhP-gZZO.js rename to assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQW4hQKz.js index edfa993aaa4011507cc0a9a16b077ecf122cb156..7bff6d0918f8f2e9ba1ef734d35bbf3a10bdcfac 100644 --- a/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DhP-gZZO.js +++ b/assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQW4hQKz.js @@ -1 +1 @@ -import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import{d as c,m,o as i,E as l,a as n,F as u,B as k,bN as f,t as g,D as y,c as d,i as C,bA as v,bB as h,b as s,u as e,q as x,bU as w}from"./index-5LjD1Eoi.js";import"./emotions-CAex_2dA.js";import{W as B,j as S,q as E,U as $,G as F,H as N}from"./index-BdorYkr1.js";const U=["onClick"],V={flex:"","gap-1.5":""},T=c({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,_)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[n("button",{class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",onClick:a=>o.setVisible(!o.visible)},[n("div",V,[n("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),n("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,U)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[k(r.$slots,"default")],2)]),_:3},8,["default"]))}}),z={key:0,flex:"","gap-2":""},A=c({__name:"ColorPalette",props:{colors:null},setup(t){const r=y();return(_,o)=>t.colors.length?(i(),d("div",z,[(i(!0),d(v,null,h(t.colors,({hex:a,name:p})=>(i(),m(e(N),{key:a||"default"},{default:l(()=>[s(e(B),null,{default:l(()=>[s(e(S),{transition:"all ease-in-out duration-250","bg-primary-500":"","size-6":"","cursor-pointer":"","rounded-full":"",style:x(a?{background:a}:{"--theme-colors-hue":e(w)}),class:u(e(r).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:H=>e(r).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e(E),null,{default:l(()=>[s(e($),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(p)+" ",1),s(e(F),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):C("",!0)}});export{T as _,A as a}; +import{_ as b}from"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import{d as c,m,o as i,E as l,a as n,F as u,B as k,bN as f,t as g,D as y,c as d,i as C,bA as v,bB as h,b as s,u as e,q as x,bU as w}from"./index-DCMFRrFG.js";import"./emotions-CAex_2dA.js";import{W as B,j as S,q as E,U as $,G as F,H as N}from"./index-GwMN-Az5.js";const U=["onClick"],V={flex:"","gap-1.5":""},T=c({__name:"Section",props:{title:null,icon:null,innerClass:null,expand:{type:Boolean,default:!0}},setup(t){return(r,_)=>(i(),m(b,{default:t.expand},{trigger:l(o=>[n("button",{class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",onClick:a=>o.setVisible(!o.visible)},[n("div",V,[n("div",{class:u(t.icon),"size-6":""},null,2),f(" "+g(t.title),1)]),n("div",{"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-250",class:u({"rotate-180":o.visible})},null,2)],8,U)]),default:l(()=>[n("div",{grid:"","gap-4":"","p-4":"",class:u(t.innerClass)},[k(r.$slots,"default")],2)]),_:3},8,["default"]))}}),z={key:0,flex:"","gap-2":""},A=c({__name:"ColorPalette",props:{colors:null},setup(t){const r=y();return(_,o)=>t.colors.length?(i(),d("div",z,[(i(!0),d(v,null,h(t.colors,({hex:a,name:p})=>(i(),m(e(N),{key:a||"default"},{default:l(()=>[s(e(B),null,{default:l(()=>[s(e(S),{transition:"all ease-in-out duration-250","bg-primary-500":"","size-6":"","cursor-pointer":"","rounded-full":"",style:x(a?{background:a}:{"--theme-colors-hue":e(w)}),class:u(e(r).isColorSelectedForPrimary(a)?"scale-150 mx-1":"hover:scale-110"),onClick:H=>e(r).applyPrimaryColorFrom(a)},null,8,["style","class","onClick"]),s(e(E),null,{default:l(()=>[s(e($),{bg:"white dark:neutral-800","rounded-lg":"","px-3":"","py-1.5":"","text-sm":"","shadow-md":""},{default:l(()=>[f(g(p)+" ",1),s(e(F),{"fill-white":"","dark:fill-neutral-800":""})]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])):C("",!0)}});export{T as _,A as a}; diff --git a/assets/DeleteCardDialog-CjX_zGnB.js b/assets/DeleteCardDialog-CjX_zGnB.js new file mode 100644 index 0000000000000000000000000000000000000000..98283f43362fa88ca5f95be4887eabed8485329e --- /dev/null +++ b/assets/DeleteCardDialog-CjX_zGnB.js @@ -0,0 +1 @@ +import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js";import"./index-DCMFRrFG.js";import"./index-GwMN-Az5.js";export{o as default}; diff --git a/assets/DeleteCardDialog-ShTTK-bk.js b/assets/DeleteCardDialog-ShTTK-bk.js deleted file mode 100644 index 61ca6802d1d05adeabd6cc64a1437a274fe15fef..0000000000000000000000000000000000000000 --- a/assets/DeleteCardDialog-ShTTK-bk.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js";import"./index-5LjD1Eoi.js";import"./index-BdorYkr1.js";export{o as default}; diff --git a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js similarity index 93% rename from assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js rename to assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js index 89331d5c667e71500873a2784668f67051511a34..d4f519fe0d9c2eafe3c6a001835f675a0303be29 100644 --- a/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js +++ b/assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js @@ -1 +1 @@ -import{d as k,l as p,c as r,o as d,F as g,a as m,i as h,B as _,t as i,k as w,m as C,E as n,b as t,u as e,bN as x}from"./index-5LjD1Eoi.js";import{A as V,k as B,O as N,V as z,F as D,M as F,N as O,T as S}from"./index-BdorYkr1.js";const T=["disabled"],$={class:"flex flex-row items-center justify-center gap-2"},j={key:0,class:"i-lucide:loader-circle animate-spin"},A={key:2},y=k({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",$,[a.loading?(d(),r("div",j)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",A,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),E={class:"flex flex-row justify-end gap-3"},H=k({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=v=>l("update:modelValue",v))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50"}),t(e(N),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800"},{default:n(()=>[t(e(z),{class:"mb-4 text-xl font-bold"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",E,[t(e(F),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,y as a}; +import{d as k,l as p,c as r,o as d,F as g,a as m,i as h,B as _,t as i,k as w,m as C,E as n,b as t,u as e,bN as x}from"./index-DCMFRrFG.js";import{A as V,k as B,O as N,V as z,F as D,M as F,N as O,T as S}from"./index-GwMN-Az5.js";const T=["disabled"],$={class:"flex flex-row items-center justify-center gap-2"},j={key:0,class:"i-lucide:loader-circle animate-spin"},A={key:2},y=k({__name:"Button",props:{icon:null,label:null,disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},variant:{default:"primary"},size:{default:"md"},block:{type:Boolean,default:!1}},setup(a){const s=a,l=p(()=>s.disabled||s.loading),o={primary:"bg-primary-500 hover:bg-primary-600 dark:bg-primary-400 dark:hover:bg-primary-500 text-white",secondary:"bg-neutral-100 hover:bg-neutral-200 dark:bg-neutral-600 dark:hover:bg-neutral-500 text-neutral-900 dark:text-neutral-100",danger:"bg-red-500 hover:bg-red-600 dark:bg-red-400 dark:hover:bg-red-500 text-white"},c={sm:"px-3 py-1.5 text-xs",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},u=p(()=>["rounded-lg font-medium outline-none transition-all duration-200 ease-in-out","disabled:cursor-not-allowed disabled:opacity-50",s.block?"w-full":"",c[s.size],o[s.variant],{"opacity-50 cursor-not-allowed":l.value},"focus:ring-2 focus:ring-offset-2 focus:ring-offset-white dark:focus:ring-offset-neutral-900","focus:ring-primary-500/50 dark:focus:ring-primary-400/50"]);return(b,f)=>(d(),r("button",{disabled:l.value,class:g(u.value)},[m("div",$,[a.loading?(d(),r("div",j)):a.icon?(d(),r("div",{key:1,class:g(a.icon)},null,2)):h("",!0),a.label?(d(),r("span",A,i(a.label),1)):_(b.$slots,"default",{key:3})])],10,T))}}),E={class:"flex flex-row justify-end gap-3"},H=k({__name:"DeleteCardDialog",props:{modelValue:{type:Boolean},cardName:null},emits:["update:modelValue","confirm","cancel"],setup(a,{emit:s}){const l=s,{t:o}=w();function c(){l("update:modelValue",!1),l("cancel")}function u(){l("update:modelValue",!1),l("confirm")}return(b,f)=>(d(),C(e(S),{open:a.modelValue,"onUpdate:open":f[0]||(f[0]=v=>l("update:modelValue",v))},{default:n(()=>[t(e(V),null,{default:n(()=>[t(e(B),{class:"data-[state=open]:animate-fadeIn data-[state=closed]:animate-fadeOut fixed inset-0 z-50 bg-black/50"}),t(e(N),{class:"data-[state=open]:animate-contentShow data-[state=closed]:animate-contentHide fixed left-1/2 top-1/2 z-50 max-w-md w-full border border-neutral-200 rounded-xl bg-white p-6 shadow-xl -translate-x-1/2 -translate-y-1/2 dark:border-neutral-700 dark:bg-neutral-800"},{default:n(()=>[t(e(z),{class:"mb-4 text-xl font-bold"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_card")),1)]),_:1}),t(e(D),{class:"mb-6"},{default:n(()=>[x(i(e(o)("settings.pages.card.delete_confirmation"))+" ",1),m("b",null,'"'+i(a.cardName||"")+'"',1)]),_:1}),m("div",E,[t(e(F),{"as-child":""},{default:n(()=>[t(e(y),{variant:"secondary",label:e(o)("settings.pages.card.cancel"),onClick:c},null,8,["label"])]),_:1}),t(e(O),{"as-child":""},{default:n(()=>[t(e(y),{variant:"danger",label:e(o)("settings.pages.card.delete"),onClick:u},null,8,["label"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["open"]))}});export{H as _,y as a}; diff --git a/assets/FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js b/assets/FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js similarity index 81% rename from assets/FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js rename to assets/FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js index 93df59f37a79d8adac69be346d4962f2d966aa0d..393f65f64188febc04b2914fe15b8e46d355f441 100644 --- a/assets/FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js +++ b/assets/FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js @@ -1 +1 @@ -import{_ as i}from"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";import{d as u,bK as c,bL as p,c as o,o as d,a as l,b as m,bN as _,i as x,t as n,F as f}from"./index-5LjD1Eoi.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},b={class:"flex items-center gap-1 text-sm font-medium"},y={key:0,class:"text-red-500"},v={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},k=u({__name:"FieldInput",props:c({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=p(t,"modelValue");return(C,s)=>(d(),o("div",V,[l("label",h,[l("div",null,[l("div",b,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",y,"*")):x("",!0)]),l("div",v,n(e.description),1)]),m(i,{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=r=>a.value=r),type:e.type,placeholder:e.placeholder,class:f(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{k as _}; +import{_ as i}from"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";import{d as u,bK as c,bL as p,c as o,o as d,a as l,b as m,bN as _,i as x,t as n,F as f}from"./index-DCMFRrFG.js";const V={"max-w-full":""},h={flex:"~ col gap-4"},b={class:"flex items-center gap-1 text-sm font-medium"},y={key:0,class:"text-red-500"},v={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},k=u({__name:"FieldInput",props:c({label:null,description:null,placeholder:null,required:{type:Boolean},type:null,inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,a=p(t,"modelValue");return(C,s)=>(d(),o("div",V,[l("label",h,[l("div",null,[l("div",b,[_(n(e.label)+" ",1),e.required!==!1?(d(),o("span",y,"*")):x("",!0)]),l("div",v,n(e.description),1)]),m(i,{modelValue:a.value,"onUpdate:modelValue":s[0]||(s[0]=r=>a.value=r),type:e.type,placeholder:e.placeholder,class:f(e.inputClass)},null,8,["modelValue","type","placeholder","class"])])]))}});export{k as _}; diff --git a/assets/FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js b/assets/FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js similarity index 66% rename from assets/FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js rename to assets/FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js index c874df25863aa79f5968b8fe02c19d176b0d6e61..c1da2296d5bee31385dd6df59954a5cf0fccb61c 100644 --- a/assets/FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js +++ b/assets/FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js @@ -1 +1 @@ -import{d as m,c as g,o as c,q as B,B as k,bq as M,r as V,bu as E,f as P,g as T,a as v,m as y,E as _,b as $,bA as R,c5 as N,bY as w,c6 as D,c2 as S,u as d,c1 as L,cf as z,l as h,cr as q,b_ as U,cs as H,w as K,bB as G,I as Y,ct as W,i as X,cu as J,bO as Q,bL as C,bK as j,t as x,G as Z,bH as ee}from"./index-5LjD1Eoi.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";/* empty css */const te=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,n)=>(c(),g("div",{class:"volumed",style:B({perspective:`${t.perspective}px`,transform:t.transform})},[k(e.$slots,"default",{},void 0,!0)],4))}}),ae=M(te,[["__scopeId","data-v-568551bc"]]),ne=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const n=t,o=V(1),l=V(0);let r=0;const a=E(()=>n.friction),u=E(()=>n.baseSpeed),p=E(()=>n.momentumFactor);function f(s){r||(r=s);const b=s-r;r=s,o.value=u.value+(o.value-u.value)*a.value,l.value+=o.value*b,requestAnimationFrame(f)}function i(s){const b=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=b*p.value}return P(()=>{window.addEventListener("mousemove",i),requestAnimationFrame(f)}),T(()=>{window.removeEventListener("mousemove",i)}),e({momentum:o,currentValue:l}),(s,b)=>k(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),le=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,n)=>(c(),g("div",{class:"test-dummy-flat",style:B({width:`${t.size}px`,height:`${t.size}px`})},n[0]||(n[0]=[v("div",{class:"marker"},null,-1)]),4))}}),oe=M(le,[["__scopeId","data-v-b4ef37ac"]]),Re=m({__name:"TestDummyMarker",setup(t){return(e,n)=>(c(),y(ne,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[$(ae,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[$(oe,{size:24,style:B({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});function O(t){return t?t.flatMap(e=>e.type===R?O(e.children):[e]):[]}const re=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var p,f;if(!n.default)return null;const o=O(n.default()),l=o.findIndex(i=>i.type!==N);if(l===-1)return o;const r=o[l];(p=r.props)==null||delete p.ref;const a=r.props?w(e,r.props):e;e.class&&((f=r.props)!=null&&f.class)&&delete r.props.class;const u=D(r,a);for(const i in a)i.startsWith("on")&&(u.props||(u.props={}),u.props[i]=a[i]);return o.length===1?u:(o[l]=u,o)}}}),se=["area","img","input"],A=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const o=t.asChild?"template":t.as;return typeof o=="string"&&se.includes(o)?()=>S(o,e):o!=="template"?()=>S(t.as,e,{default:n.default}):()=>S(re,e,{default:n.default})}}),ue=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(c(),y(d(A),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_(()=>[k(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ie(t,e){const n=`${t}Context`,o=Symbol(n);return[a=>{const u=L(o,a);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},a=>(z(o,a),a)]}function I(){const t=U(),e=V(),n=h(()=>{var a,u;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:q(e)}),o=Object.assign({},t.exposed),l={};for(const a in t.props)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(a){e.value=a,a&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:n}}function de(){const t=V(),e=h(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:q(t)});return{primitiveElement:t,currentElement:e}}function ce(t){return h(()=>{var e;return H(t)?!!((e=q(t))!=null&&e.closest("form")):!0})}const F=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:o}=de(),l=h(()=>e.checked??e.value);return K(l,(r,a)=>{if(!o.value)return;const u=o.value,p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"value").set;if(i&&r!==a){const s=new Event("input",{bubbles:!0}),b=new Event("change",{bubbles:!0});i.call(u,r),u.dispatchEvent(s),u.dispatchEvent(b)}}),(r,a)=>(c(),y(ue,w({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),me=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=h(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=h(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([a,u])=>({name:`[${e.name}][${r}][${a}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>n.value?(c(),y(F,w({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(c(!0),g(R,{key:1},G(o.value,a=>(c(),y(F,w({key:a.name,ref_for:!0},{...e,...l.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))}}),[pe,fe]=ie("SwitchRoot"),ve=m({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,{disabled:l}=Y(n),r=W(n,"modelValue",o,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:p}=I(),f=ce(p),i=h(()=>{var s;return n.id&&p.value?(s=document.querySelector(`[for="${n.id}"]`))==null?void 0:s.innerText:void 0});return fe({modelValue:r,toggleCheck:a,disabled:l}),(s,b)=>(c(),y(d(A),w(s.$attrs,{id:s.id,ref:d(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||i.value,"aria-checked":d(r),"aria-required":s.required,"data-state":d(r)?"checked":"unchecked","data-disabled":d(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:d(l),onClick:a,onKeydown:J(Q(a,["prevent"]),["enter"])}),{default:_(()=>[k(s.$slots,"default",{modelValue:d(r)}),d(f)&&s.name?(c(),y(d(me),{key:0,type:"checkbox",name:s.name,disabled:d(l),required:s.required,value:s.value,checked:!!d(r)},null,8,["name","disabled","required","value","checked"])):X("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),he=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=pe();return I(),(n,o)=>{var l;return c(),y(d(A),{"data-state":(l=d(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":d(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:_(()=>[k(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ye=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(n,o)=>(c(),y(d(ve),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[$(d(he),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),be={flex:"~ col gap-4"},_e={flex:"~ row","items-center":"","gap-2":""},ge={flex:"1"},xe={class:"flex items-center gap-1 text-sm font-medium"},Ve={class:"text-xs text-neutral-500 dark:text-neutral-400"},Oe=m({__name:"FieldCheckbox",props:j({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>(c(),g("label",be,[v("div",_e,[v("div",ge,[v("div",xe,x(e.label),1),v("div",Ve,x(e.description),1)]),$(ye,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value=r)},null,8,["modelValue"])])]))}}),$e=["min","max","step"],we=m({__name:"Range",props:j({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue"),o=h(()=>e.min*1e4),l=h(()=>e.max*1e4),r=h(()=>e.step*1e4),a=V(),u=h({get:()=>n.value*1e4,set:f=>{n.value=f/1e4,p()}});P(()=>{p()});function p(){a.value&&(a.value.style.setProperty("--value",a.value.value),a.value.style.setProperty("--min",a.value.min?a.value.min:e.min.toString()),a.value.style.setProperty("--max",a.value.max?a.value.max:e.max.toString()))}return(f,i)=>Z((c(),g("input",{ref_key:"sliderRef",ref:a,"onUpdate:modelValue":i[0]||(i[0]=s=>u.value=s),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:i[1]||(i[1]=s=>{s.target.style.setProperty("--value",s.target.value)})},null,40,$e)),[[ee,u.value,void 0,{number:!0}]])}}),ke=M(we,[["__scopeId","data-v-992ec255"]]),Ce={flex:"~ col gap-4"},Ee={flex:"~ row","items-center":"","gap-2":""},Se={flex:"1"},Be={class:"flex items-center gap-1 text-sm font-medium"},Me={class:"text-xs text-neutral-500 dark:text-neutral-400"},qe={"font-mono":""},je={flex:"~ row","items-center":"","gap-2":""},Ie=m({__name:"FieldRange",props:j({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>{var r;return c(),g("label",Ce,[v("div",Ee,[v("div",Se,[v("div",Be,x(t.label),1),v("div",Me,x(t.description),1)]),v("span",qe,x(((r=e.formatValue)==null?void 0:r.call(e,n.value))||n.value),1)]),v("div",je,[$(ke,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Ie as _,Oe as a,Re as b}; +import{d as m,c as g,o as c,q as B,B as k,bq as M,r as V,bu as E,f as P,g as T,a as f,m as b,E as _,b as $,bA as R,c5 as N,bY as w,c6 as D,c2 as S,u as d,c1 as L,cf as z,l as v,cr as q,b_ as U,cs as H,w as K,bB as G,I as Y,ct as W,i as X,cu as J,bO as Q,bL as C,bK as j,t as x,G as Z,bH as ee}from"./index-DCMFRrFG.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";/* empty css */const te=m({__name:"Volumed",props:{perspective:null,transform:null},setup(t){return(e,n)=>(c(),g("div",{class:"volumed",style:B({perspective:`${t.perspective}px`,transform:t.transform})},[k(e.$slots,"default",{},void 0,!0)],4))}}),ae=M(te,[["__scopeId","data-v-568551bc"]]),ne=m({__name:"CursorMomentum",props:{baseSpeed:{default:.1},friction:{default:.95},momentumFactor:{default:.005}},setup(t,{expose:e}){const n=t,o=V(1),l=V(0);let r=0;const a=E(()=>n.friction),u=E(()=>n.baseSpeed),p=E(()=>n.momentumFactor);function h(s){r||(r=s);const y=s-r;r=s,o.value=u.value+(o.value-u.value)*a.value,l.value+=o.value*y,requestAnimationFrame(h)}function i(s){const y=Math.sqrt(s.movementX**2+s.movementY**2);o.value+=y*p.value}return P(()=>{window.addEventListener("mousemove",i),requestAnimationFrame(h)}),T(()=>{window.removeEventListener("mousemove",i)}),e({momentum:o,currentValue:l}),(s,y)=>k(s.$slots,"default",{momentum:o.value,currentValue:l.value})}}),le=m({__name:"TestDummyMarkerFlat",props:{size:null},setup(t){return(e,n)=>(c(),g("div",{class:"test-dummy-flat",style:B({width:`${t.size}px`,height:`${t.size}px`})},n[0]||(n[0]=[f("div",{class:"marker"},null,-1)]),4))}}),oe=M(le,[["__scopeId","data-v-b4ef37ac"]]),Re=m({__name:"TestDummyMarker",setup(t){return(e,n)=>(c(),b(ne,{"base-speed":.1,friction:.95,"momentum-factor":5e-4},{default:_(({currentValue:o})=>[$(ae,{perspective:800,transform:"rotateX(45deg) translateY(3px)"},{default:_(()=>[$(oe,{size:24,style:B({transform:`rotate(${o}deg)`})},null,8,["style"])]),_:2},1024)]),_:1}))}});function I(t){return t?t.flatMap(e=>e.type===R?I(e.children):[e]):[]}const re=m({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var p,h;if(!n.default)return null;const o=I(n.default()),l=o.findIndex(i=>i.type!==N);if(l===-1)return o;const r=o[l];(p=r.props)==null||delete p.ref;const a=r.props?w(e,r.props):e;e.class&&((h=r.props)!=null&&h.class)&&delete r.props.class;const u=D(r,a);for(const i in a)i.startsWith("on")&&(u.props||(u.props={}),u.props[i]=a[i]);return o.length===1?u:(o[l]=u,o)}}}),se=["area","img","input"],A=m({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const o=t.asChild?"template":t.as;return typeof o=="string"&&se.includes(o)?()=>S(o,e):o!=="template"?()=>S(t.as,e,{default:n.default}):()=>S(re,e,{default:n.default})}}),ue=m({__name:"VisuallyHidden",props:{feature:{default:"focusable"},asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(c(),b(d(A),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature==="focusable"?"true":void 0,"data-hidden":e.feature==="fully-hidden"?"":void 0,tabindex:e.feature==="fully-hidden"?"-1":void 0,style:{position:"absolute",border:0,width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:_(()=>[k(e.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}});function ie(t,e){const n=`${t}Context`,o=Symbol(n);return[a=>{const u=L(o,a);if(u||u===null)return u;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},a=>(z(o,a),a)]}function O(){const t=U(),e=V(),n=v(()=>{var a,u;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(u=e.value)==null?void 0:u.$el.nextElementSibling:q(e)}),o=Object.assign({},t.exposed),l={};for(const a in t.props)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(o).length>0)for(const a in o)Object.defineProperty(l,a,{enumerable:!0,configurable:!0,get:()=>o[a]});Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=l;function r(a){e.value=a,a&&(Object.defineProperty(l,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=l)}return{forwardRef:r,currentRef:e,currentElement:n}}function de(){const t=V(),e=v(()=>{var n,o;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(o=t.value)==null?void 0:o.$el.nextElementSibling:q(t)});return{primitiveElement:t,currentElement:e}}function ce(t){return v(()=>{var e;return H(t)?!!((e=q(t))!=null&&e.closest("form")):!0})}const F=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,{primitiveElement:n,currentElement:o}=de(),l=v(()=>e.checked??e.value);return K(l,(r,a)=>{if(!o.value)return;const u=o.value,p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"value").set;if(i&&r!==a){const s=new Event("input",{bubbles:!0}),y=new Event("change",{bubbles:!0});i.call(u,r),u.dispatchEvent(s),u.dispatchEvent(y)}}),(r,a)=>(c(),b(ue,w({ref_key:"primitiveElement",ref:n},{...e,...r.$attrs},{as:"input"}),null,16))}}),me=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{},value:{},checked:{type:Boolean,default:void 0},required:{type:Boolean},disabled:{type:Boolean},feature:{default:"fully-hidden"}},setup(t){const e=t,n=v(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),o=v(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((l,r)=>typeof l=="object"?Object.entries(l).map(([a,u])=>({name:`[${e.name}][${r}][${a}]`,value:u})):{name:`[${e.name}][${r}]`,value:l}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([l,r])=>({name:`[${e.name}][${l}]`,value:r})):[]);return(l,r)=>n.value?(c(),b(F,w({key:l.name},{...e,...l.$attrs},{name:l.name,value:l.value}),null,16,["name","value"])):(c(!0),g(R,{key:1},G(o.value,a=>(c(),b(F,w({key:a.name,ref_for:!0},{...e,...l.$attrs},{name:a.name,value:a.value}),null,16,["name","value"]))),128))}}),[pe,fe]=ie("SwitchRoot"),ve=m({__name:"SwitchRoot",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null],default:void 0},disabled:{type:Boolean},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"},name:{},required:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,{disabled:l}=Y(n),r=W(n,"modelValue",o,{defaultValue:n.defaultValue,passive:n.modelValue===void 0});function a(){l.value||(r.value=!r.value)}const{forwardRef:u,currentElement:p}=O(),h=ce(p),i=v(()=>{var s;return n.id&&p.value?(s=document.querySelector(`[for="${n.id}"]`))==null?void 0:s.innerText:void 0});return fe({modelValue:r,toggleCheck:a,disabled:l}),(s,y)=>(c(),b(d(A),w(s.$attrs,{id:s.id,ref:d(u),role:"switch",type:s.as==="button"?"button":void 0,value:s.value,"aria-label":s.$attrs["aria-label"]||i.value,"aria-checked":d(r),"aria-required":s.required,"data-state":d(r)?"checked":"unchecked","data-disabled":d(l)?"":void 0,"as-child":s.asChild,as:s.as,disabled:d(l),onClick:a,onKeydown:J(Q(a,["prevent"]),["enter"])}),{default:_(()=>[k(s.$slots,"default",{modelValue:d(r)}),d(h)&&s.name?(c(),b(d(me),{key:0,type:"checkbox",name:s.name,disabled:d(l),required:s.required,value:s.value,checked:!!d(r)},null,8,["name","disabled","required","value","checked"])):X("",!0)]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]))}}),he=m({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=pe();return O(),(n,o)=>{var l;return c(),b(d(A),{"data-state":(l=d(e).modelValue)!=null&&l.value?"checked":"unchecked","data-disabled":d(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:_(()=>[k(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),ye=m({__name:"Checkbox",props:{modelValue:{type:Boolean,required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(t){const e=C(t,"modelValue");return(n,o)=>(c(),b(d(ve),{modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=l=>e.value=l),transition:"background duration-250 ease-in-out",outline:"focus-within:none",flex:"~",border:"neutral-300 dark:neutral-700 data-[state=checked]:primary-200 data-[state=unchecked]:neutral-300 focus-within:neutral-800",bg:"data-[state=checked]:primary-400 data-[state=unchecked]:neutral-300 data-[state=checked]:dark:primary-400/80 dark:data-[state=unchecked]:neutral-800",relative:"","h-7":"",w:"12.5","rounded-full":"",shadow:"sm focus-within:shadow-neutral-800 focus-within:[0_0_0_1px] "},{default:_(()=>[$(d(he),{"my-auto":"","size-6":"",flex:"","items-center":"","justify-center":"","translate-x":"0.5 data-[state=checked]:full","rounded-full":"","bg-white":"","text-xs":"","shadow-xl":"",transition:"transform duration-250 ease-in-out","will-change-transform":""})]),_:1},8,["modelValue"]))}}),be={flex:"~ col gap-4"},_e={flex:"~ row","items-center":"","gap-2":""},ge={flex:"1"},xe={class:"flex items-center gap-1 text-sm font-medium"},Ve={class:"text-xs text-neutral-500 dark:text-neutral-400"},Ie=m({__name:"FieldCheckbox",props:j({label:null,description:null},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>(c(),g("label",be,[f("div",_e,[f("div",ge,[f("div",xe,x(e.label),1),f("div",Ve,x(e.description),1)]),$(ye,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value=r)},null,8,["modelValue"])])]))}}),$e=["min","max","step"],we=m({__name:"Range",props:j({min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},thumbColor:{default:"#9090906e"},trackColor:{default:"gray"},trackValueColor:{default:"red"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue"),o=v(()=>e.min*1e4),l=v(()=>e.max*1e4),r=v(()=>e.step*1e4),a=V(),u=v({get:()=>n.value*1e4,set:i=>{n.value=i/1e4,p()}});P(()=>{p()});function p(){a.value&&(a.value.style.setProperty("--value",a.value.value),a.value.style.setProperty("--min",a.value.min?a.value.min:e.min.toString()),a.value.style.setProperty("--max",a.value.max?a.value.max:e.max.toString()))}function h(i){const s=i.target;s.style.setProperty("--value",s.value)}return(i,s)=>Z((c(),g("input",{ref_key:"sliderRef",ref:a,"onUpdate:modelValue":s[0]||(s[0]=y=>u.value=y),type:"range",min:o.value,max:l.value,step:r.value,class:"slider-progress form_input-range",onInput:h},null,40,$e)),[[ee,u.value,void 0,{number:!0}]])}}),ke=M(we,[["__scopeId","data-v-d88ffd28"]]),Ce={flex:"~ col gap-4"},Ee={flex:"~ row","items-center":"","gap-2":""},Se={flex:"1"},Be={class:"flex items-center gap-1 text-sm font-medium"},Me={class:"text-xs text-neutral-500 dark:text-neutral-400"},qe={"font-mono":""},je={flex:"~ row","items-center":"","gap-2":""},Oe=m({__name:"FieldRange",props:j({min:null,max:null,step:null,label:null,description:null,formatValue:{type:Function}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=C(t,"modelValue");return(o,l)=>{var r;return c(),g("label",Ce,[f("div",Ee,[f("div",Se,[f("div",Be,x(t.label),1),f("div",Me,x(t.description),1)]),f("span",qe,x(((r=e.formatValue)==null?void 0:r.call(e,n.value))||n.value),1)]),f("div",je,[$(ke,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=a=>n.value=a),min:t.min||0,max:t.max||1,step:t.step||.01,"w-full":""},null,8,["modelValue","min","max","step"])])])}}});export{Oe as _,Ie as a,Re as b}; diff --git a/assets/HeaderLink-Bp3oK7dP.js b/assets/HeaderLink-DPXtT-kx.js similarity index 90% rename from assets/HeaderLink-Bp3oK7dP.js rename to assets/HeaderLink-DPXtT-kx.js index cc2f1809391bd6b625b40f1f9db25693c2f245b1..db15130874efa2ba9acde80a22b47ff26234b990 100644 --- a/assets/HeaderLink-Bp3oK7dP.js +++ b/assets/HeaderLink-DPXtT-kx.js @@ -1 +1 @@ -import{d as r,bF as c,m as l,u as e,br as d,o as s,E as _,c as t,a,bq as i}from"./index-5LjD1Eoi.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=r({__name:"HeaderLink",setup(x){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),w=i(g,[["__scopeId","data-v-496b6cde"]]);export{w as H}; +import{d as r,bF as c,m as l,u as e,br as d,o as s,E as _,c as t,a,bq as i}from"./index-DCMFRrFG.js";const k="/assets/logo-dark-CO0kwKsz.svg",p="/assets/logo-D6zeZTFl.svg",u=["src"],m=["src"],g=r({__name:"HeaderLink",setup(x){const n=c();return(f,o)=>(s(),l(e(d),{to:"/",flex:"~","items-center":"","gap-2":"","px-2":"","text-nowrap":"","text-2xl":"","outline-none":""},{default:_(()=>[e(n)?(s(),t("img",{key:0,src:e(k),"h-8":"","w-8":"",class:"theme-colored"},null,8,u)):(s(),t("img",{key:1,src:e(p),"h-8":"","w-8":"",class:"theme-colored"},null,8,m)),o[0]||(o[0]=a("div",{"font-cute":""},[a("span",null,"アイリ")],-1))]),_:1}))}}),w=i(g,[["__scopeId","data-v-496b6cde"]]);export{w as H}; diff --git a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js similarity index 95% rename from assets/IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js rename to assets/IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js index 748f764397b726657d24e37e76e173a325f4dff0..1078ca04edacdfc3be5f53379a2b8537d5bf0a3a 100644 --- a/assets/IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js +++ b/assets/IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js @@ -1 +1 @@ -import{d as m,r as s,w as p,l as f,c as h,o as x,q as l,a as u,F as y}from"./index-5LjD1Eoi.js";const C=m({__name:"IconAnimation",props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:["animationEnded"],setup(a,{emit:d}){const e=a,c=d,n=s(!1);p(()=>e.started,o=>{o&&requestAnimationFrame(()=>{n.value=!0})});const t=f(()=>({opacity:n.value!==e.isReverse?1:0,size:n.value!==e.isReverse?25:e.iconSize,position:n.value!==e.isReverse?"calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)":e.position,textColor:n.value!==e.isReverse?"text-white":e.textColor})),i=s([]),r=s(!1);function v(o){i.value.push(o.propertyName),i.value.includes("color")&&i.value.includes("width")&&i.value.includes("height")&&i.value.includes("transform")&&(r.value=!0,c("animationEnded"))}return(o,z)=>(x(),h("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{"bg-primary-500":"",fixed:"","inset-0":"","transition-opacity":"","ease-linear":"",style:l({opacity:t.value.opacity,transitionDuration:`${a.duration}ms`})},null,4),u("div",{fixed:"","inset-0":"","ease-in-out":"",style:l({width:`${t.value.size}rem`,height:`${t.value.size}rem`,transform:`translate(${t.value.position})`,transitionDuration:`${a.duration}ms`}),class:y([t.value.textColor,e.icon,{"transition-all":n.value}]),onTransitionend:v},null,38)],4))}});export{C as _}; +import{d as m,r as s,w as p,l as f,c as h,o as x,q as l,a as u,F as y}from"./index-DCMFRrFG.js";const C=m({__name:"IconAnimation",props:{icon:null,iconSize:null,position:null,duration:null,started:{type:Boolean},textColor:null,isReverse:{type:Boolean},zIndex:null},emits:["animationEnded"],setup(a,{emit:d}){const e=a,c=d,n=s(!1);p(()=>e.started,o=>{o&&requestAnimationFrame(()=>{n.value=!0})});const t=f(()=>({opacity:n.value!==e.isReverse?1:0,size:n.value!==e.isReverse?25:e.iconSize,position:n.value!==e.isReverse?"calc(50dvw - 12.5rem), calc(50dvh - 12.5rem)":e.position,textColor:n.value!==e.isReverse?"text-white":e.textColor})),i=s([]),r=s(!1);function v(o){i.value.push(o.propertyName),i.value.includes("color")&&i.value.includes("width")&&i.value.includes("height")&&i.value.includes("transform")&&(r.value=!0,c("animationEnded"))}return(o,z)=>(x(),h("div",{"pointer-events-none":"",fixed:"",w:"100dvw",h:"100dvh",style:l({zIndex:r.value?a.zIndex:void 0})},[u("div",{"bg-primary-500":"",fixed:"","inset-0":"","transition-opacity":"","ease-linear":"",style:l({opacity:t.value.opacity,transitionDuration:`${a.duration}ms`})},null,4),u("div",{fixed:"","inset-0":"","ease-in-out":"",style:l({width:`${t.value.size}rem`,height:`${t.value.size}rem`,transform:`translate(${t.value.position})`,transitionDuration:`${a.duration}ms`}),class:y([t.value.textColor,e.icon,{"transition-all":n.value}]),onTransitionend:v},null,38)],4))}});export{C as _}; diff --git a/assets/IconStatusItem-BHtW75ra.js b/assets/IconStatusItem-TmDrxILn.js similarity index 94% rename from assets/IconStatusItem-BHtW75ra.js rename to assets/IconStatusItem-TmDrxILn.js index 5ef4f470b0cb21324c396149e8be0e9f764afcc3..2781842309746ba265a25565fbba89b9b6c1a4b5 100644 --- a/assets/IconStatusItem-BHtW75ra.js +++ b/assets/IconStatusItem-TmDrxILn.js @@ -1 +1 @@ -import{d as u,p as c,c as e,o as n,b as d,a as o,E as m,i as a,t as i,F as s,bq as _}from"./index-5LjD1Eoi.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";const p={flex:"~ col",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-status-item",transition:"all ease-in-out duration-400","w-full":"","cursor-pointer":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(I,C)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"white dark:neutral-900",transition:"all ease-in-out duration-400",relative:"","h-full":"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:t.to},{default:m(()=>[o("div",g,[o("div",h,i(t.title),1),o("div",k,[o("span",null,i(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:s(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconColor?(n(),e("div",{key:1,class:s(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconImage?(n(),e("img",{key:2,src:t.iconImage,class:"menu-icon-status-item-icon-image",transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-6e5b5c9c"]]);export{B as I}; +import{d as u,p as c,c as e,o as n,b as d,a as o,E as m,i as a,t as i,F as s,bq as _}from"./index-DCMFRrFG.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";const p={flex:"~ col",bg:"neutral-50 dark:neutral-800",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-status-item",transition:"all ease-in-out duration-400","w-full":"","cursor-pointer":"","of-hidden":"","rounded-xl":""},g={"z-1":"","flex-1":""},h={"text-lg":"","font-bold":"",class:"menu-icon-status-item-title",transition:"all ease-in-out duration-400"},k={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-status-item-description",transition:"all ease-in-out duration-400"},f=["src"],x={"p-2":""},v={key:0,"size-3":"",bg:"green-500 dark:green-600","rounded-full":""},y={key:1,"size-3":"",bg:"neutral-400 dark:neutral-500","rounded-full":""},b=u({__name:"IconStatusItem",props:{title:null,description:null,icon:null,iconColor:null,iconImage:null,to:null,configured:{type:Boolean}},setup(r){const t=r;return(I,C)=>{const l=c("RouterLink");return n(),e("div",p,[d(l,{flex:"~ row",class:"menu-icon-status-item-link",bg:"white dark:neutral-900",transition:"all ease-in-out duration-400",relative:"","h-full":"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",to:t.to},{default:m(()=>[o("div",g,[o("div",h,i(t.title),1),o("div",k,[o("span",null,i(t.description),1)])]),t.icon?(n(),e("div",{key:0,class:s(["menu-icon-status-item-icon",[t.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconColor?(n(),e("div",{key:1,class:s(["menu-icon-status-item-icon-color",[t.iconColor]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"",text:"neutral-400/50 dark:neutral-600/50","grayscale-100":""},null,2)):a("",!0),t.iconImage?(n(),e("img",{key:2,src:t.iconImage,class:"menu-icon-status-item-icon-image",transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-16":"","translate-y-2":"","grayscale-100":""},null,8,f)):a("",!0)]),_:1},8,["to"]),o("div",x,[t.configured?(n(),e("div",v)):(n(),e("div",y))])])}}}),B=_(b,[["__scopeId","data-v-6e5b5c9c"]]);export{B as I}; diff --git a/assets/Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js b/assets/Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js similarity index 91% rename from assets/Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js rename to assets/Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js index 18b1dea23af081d5b330f9012a0b24df0ea16fd8..758144bd549594f8dd78ff4e7a75cbe5edeb6106 100644 --- a/assets/Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js +++ b/assets/Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js @@ -1 +1 @@ -import{d as r,bK as n,bL as u,G as s,cq as d,o as i,c as p}from"./index-5LjD1Eoi.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.type||"text",border:"focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _}; +import{d as r,bK as n,bL as u,G as s,cq as d,o as i,c as p}from"./index-DCMFRrFG.js";const m=["type"],y=r({__name:"Input",props:n({type:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,t=u(e,"modelValue");return(c,a)=>s((i(),p("input",{"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),type:l.type||"text",border:"focus:primary-300 dark:focus:primary-400/50 2 solid neutral-100 dark:neutral-900",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-50 dark:neutral-950 focus:neutral-50 dark:focus:neutral-900"},null,8,m)),[[d,t.value]])}});export{y as _}; diff --git a/assets/InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js b/assets/InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js similarity index 96% rename from assets/InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js rename to assets/InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js index 9b885918e5248516cea3b69cf61535c374aed724..860d0d55dc14b3c87ede8071d24b8c6bec27db66 100644 --- a/assets/InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js +++ b/assets/InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js @@ -1 +1 @@ -import{d as b,bK as g,bL as v,r as p,bM as y,c as i,o as n,F as m,u as t,a as l,B as x}from"./index-5LjD1Eoi.js";const k=["accept","multiple"],h={key:0,text:"center","text-sm":""},D={key:1,text:"center","text-sm":""},B=b({__name:"InputFile",props:g({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const d=v(o,"modelValue"),u=p(),a=p(!1),r=y(a,150);function f(s){const e=s.target;e.files&&e.files.length>0&&(u.value=e.files[0]),d.value=Array.from(e.files||[]),a.value=!1}return(s,e)=>(n(),i("label",{relative:"",class:m(["min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6",[t(r)?"border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700":"border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700",t(r)?"bg-primary-50/5 dark:bg-primary-900/5":"bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40"]]),border:"dashed 2",transition:"all duration-300","cursor-pointer":"","opacity-95":"",hover:"scale-100 opacity-100 shadow-md dark:shadow-lg",onDragover:e[0]||(e[0]=c=>a.value=!0),onDragleave:e[1]||(e[1]=c=>a.value=!1)},[l("input",{type:"file",accept:o.accept,multiple:o.multiple,"cursor-pointer":"",class:"absolute inset-0 h-full w-full opacity-0",onChange:f},null,40,k),x(s.$slots,"default",{isDragging:t(r),firstFile:u.value,files:d.value},()=>[l("div",{class:m(["flex flex-col items-center",[t(r)?"text-primary-500 dark:text-primary-400":"text-neutral-400 dark:text-neutral-500"]])},[e[2]||(e[2]=l("div",{"i-solar:upload-square-line-duotone":"","mb-2":"","text-5xl":""},null,-1)),e[3]||(e[3]=l("p",{"font-medium":"",text:"center lg"}," Upload ",-1)),t(r)?(n(),i("p",h," Release to upload ")):(n(),i("p",D," Click or drag and drop a file here "))],2)])],34))}});export{B as _}; +import{d as b,bK as g,bL as v,r as p,bM as y,c as i,o as n,F as m,u as t,a as l,B as x}from"./index-DCMFRrFG.js";const k=["accept","multiple"],h={key:0,text:"center","text-sm":""},D={key:1,text:"center","text-sm":""},B=b({__name:"InputFile",props:g({accept:null,multiple:{type:Boolean}},{modelValue:{required:!1,default:()=>[]},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const d=v(o,"modelValue"),u=p(),a=p(!1),r=y(a,150);function f(s){const e=s.target;e.files&&e.files.length>0&&(u.value=e.files[0]),d.value=Array.from(e.files||[]),a.value=!1}return(s,e)=>(n(),i("label",{relative:"",class:m(["min-h-[120px] flex flex-col cursor-pointer items-center justify-center rounded-xl p-6",[t(r)?"border-primary-400 dark:border-primary-600 hover:border-primary-300 dark:hover:border-primary-700":"border-neutral-200 dark:border-neutral-700 hover:border-primary-300 dark:hover:border-primary-700",t(r)?"bg-primary-50/5 dark:bg-primary-900/5":"bg-white/60 dark:bg-black/30 hover:bg-white/80 dark:hover:bg-black/40"]]),border:"dashed 2",transition:"all duration-300","cursor-pointer":"","opacity-95":"",hover:"scale-100 opacity-100 shadow-md dark:shadow-lg",onDragover:e[0]||(e[0]=c=>a.value=!0),onDragleave:e[1]||(e[1]=c=>a.value=!1)},[l("input",{type:"file",accept:o.accept,multiple:o.multiple,"cursor-pointer":"",class:"absolute inset-0 h-full w-full opacity-0",onChange:f},null,40,k),x(s.$slots,"default",{isDragging:t(r),firstFile:u.value,files:d.value},()=>[l("div",{class:m(["flex flex-col items-center",[t(r)?"text-primary-500 dark:text-primary-400":"text-neutral-400 dark:text-neutral-500"]])},[e[2]||(e[2]=l("div",{"i-solar:upload-square-line-duotone":"","mb-2":"","text-5xl":""},null,-1)),e[3]||(e[3]=l("p",{"font-medium":"",text:"center lg"}," Upload ",-1)),t(r)?(n(),i("p",h," Release to upload ")):(n(),i("p",D," Click or drag and drop a file here "))],2)])],34))}});export{B as _}; diff --git a/assets/Model.vue_vue_type_script_setup_true_lang-B5b_VmSW.js b/assets/Model.vue_vue_type_script_setup_true_lang-Oh2pzmo4.js similarity index 96% rename from assets/Model.vue_vue_type_script_setup_true_lang-B5b_VmSW.js rename to assets/Model.vue_vue_type_script_setup_true_lang-Oh2pzmo4.js index a68d9f56c71cc4d9da4438867cba91b67b9a9a73..ea49f3c7116e6e2913ad14240a24abc26078ecae 100644 --- a/assets/Model.vue_vue_type_script_setup_true_lang-B5b_VmSW.js +++ b/assets/Model.vue_vue_type_script_setup_true_lang-Oh2pzmo4.js @@ -1 +1 @@ -import{e as C,T as Y,A as re,L as P,a as $,D as ue,I as se,l as R,M as de,b as T}from"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{bR as ce,d as N,r as f,w as p,f as X,g as j,c as q,o as G,B as K,bu as z,l as O,bF as ve,y as pe,K as fe,s as he,D as me,bS as ge,bT as Me,bA as we,a as ye,C as be}from"./index-5LjD1Eoi.js";import{r as Se}from"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";const xe=o=>Math.max(0,Math.min(1,o||0)),F=o=>Math.round(xe(o)*255),Be=ce("rgb"),Fe=o=>{if(o===void 0)return;let l=F(o.r),t=F(o.g),d=F(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Ce=o=>Fe(Be(o)),Ae=N({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=f(),e=f(),i=f();async function c(n){P.registerTicker($),C.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),X(async()=>d.value&&await c(d.value)),j(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function B(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:B}),(n,g)=>(G(),q("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[K(n.$slots,"default",{app:e.value})],512))}});function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Pe(){let o=-1,l,t=-1;function d(e,i){(i>=o||il.app),d=z(()=>l.paused),e=f(),i=f(0),c=f(0),y=O(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),B=ve(),n=pe(be),g=O(()=>n.between("sm","md").value||n.smaller("sm").value),U=Pe(),D=fe(new ue({alpha:.2,blur:0,distance:20,rotation:45}));function W(){return e.value.internalModel.coreModel}function I(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const h=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(h,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:J,availableLive2dMotions:Q,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=he(me()),ee=f({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new P;S.value==="file"?await T.setupLive2DModel(a,[b.value]):S.value==="url"&&await T.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),I(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,h=r.coreModel,s=r.motionManager;h.setParameterValueById("ParamMouthOpenY",y.value),Q.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&U.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await R.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;P.registerTicker($),C.add(Y),C.add(se);const a=await R.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,de.FORCE)}const oe=ge(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,I(e))},100),A=f(),w=f(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;D.value.color=Number(Ce(a).replace("#","0x")),e.value.filters=[D.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(B,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>W().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(J,a=>le(a.group,a.index)),p(d,a=>{var r,h;a?(r=t.value)==null||r.stop():(h=t.value)==null||h.start()}),Me(M,a=>{a&&ae()},{debounce:1e3}),X(x),j(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(G(),q(we,null,[ye("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),K(a.$slots,"default")],64))}});export{Ee as _,Ae as a,H as r}; +import{e as C,T as Y,A as re,L as P,a as $,D as ue,I as se,l as R,M as de,b as T}from"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{bR as ce,d as N,r as f,w as p,f as X,g as j,c as q,o as G,B as K,bu as z,l as O,bF as ve,y as pe,K as fe,s as he,D as me,bS as ge,bT as Me,bA as we,a as ye,C as be}from"./index-DCMFRrFG.js";import{r as Se}from"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";const xe=o=>Math.max(0,Math.min(1,o||0)),F=o=>Math.round(xe(o)*255),Be=ce("rgb"),Fe=o=>{if(o===void 0)return;let l=F(o.r),t=F(o.g),d=F(o.b);return"#"+(1<<24|l<<16|t<<8|d).toString(16).slice(1)},Ce=o=>Fe(Be(o)),Ae=N({__name:"Canvas",props:{width:null,height:null},setup(o,{expose:l}){const t=o,d=f(),e=f(),i=f();async function c(n){P.registerTicker($),C.add(Y),e.value=new re({width:t.width,height:t.height,backgroundAlpha:0,preserveDrawingBuffer:!0}),i.value=e.value.view,i.value.style.objectFit="contain",n.appendChild(e.value.view)}function y(){var n;e.value&&e.value.renderer.resize(t.width,t.height),(n=e.value)!=null&&n.view&&(e.value.view.width=t.width,e.value.view.height=t.height)}p([()=>t.width,()=>t.height],()=>y()),X(async()=>d.value&&await c(d.value)),j(()=>{var n;return(n=e.value)==null?void 0:n.destroy()});async function B(){return new Promise(g=>{if(!i.value||!e.value)return g(null);e.value.render(),i.value.toBlob(g)})}return l({captureFrame:B}),(n,g)=>(G(),q("div",{ref_key:"containerRef",ref:d,"h-full":"","w-full":""},[K(n.$slots,"default",{app:e.value})],512))}});function V(o,l,t){return(1-t)*o+t*l}function H(o,l){return o+Math.random()*(l-o)}function Pe(){let o=-1,l,t=-1;function d(e,i){(i>=o||il.app),d=z(()=>l.paused),e=f(),i=f(0),c=f(0),y=O(()=>Math.max(0,Math.min(100,l.mouthOpenSize))),B=ve(),n=pe(be),g=O(()=>n.between("sm","md").value||n.smaller("sm").value),U=Pe(),D=fe(new ue({alpha:.2,blur:0,distance:20,rotation:45}));function W(){return e.value.internalModel.coreModel}function I(a){if(!a.value)return;let r=2.2;g.value&&(r=2.2);const h=l.height*.95/c.value*r,s=l.width*.95/i.value*r,m=Math.min(h,s);a.value.scale.set(m,m)}const{live2dModelFile:b,loadingLive2dModel:M,live2dCurrentMotion:J,availableLive2dMotions:Q,live2dLoadSource:S,live2dModelUrl:k,themeColorsHue:Z,themeColorsHueDynamic:_}=he(me()),ee=f({group:"Idle",index:0});async function ae(){var L;if(!t.value)return;e.value&&(t.value.stage.removeChild(e.value),e.value.destroy(),e.value=void 0);const a=new P;S.value==="file"?await T.setupLive2DModel(a,[b.value]):S.value==="url"&&await T.setupLive2DModel(a,k.value),e.value=a,t.value.stage.addChild(e.value),i.value=e.value.width,c.value=e.value.height,e.value.x=l.width/2,e.value.y=l.height,e.value.rotation=Math.PI,e.value.skew.x=Math.PI,e.value.anchor.set(.5,.5),I(e),e.value.on("hit",v=>{e.value&&v.includes("body")&&e.value.motion("tap_body")});const r=e.value.internalModel,h=r.coreModel,s=r.motionManager;h.setParameterValueById("ParamMouthOpenY",y.value),Q.value=Object.entries(s.definitions).flatMap(([v,u])=>u?u.map((ie,ne)=>({motionName:v,motionIndex:ne,fileName:ie.File})):[]).filter(Boolean),s.groups.idle&&((L=s.motionGroups[s.groups.idle])==null||L.forEach(v=>{v._motionData.curves.forEach(u=>{(u.id==="ParamEyeBallX"||u.id==="ParamEyeBallY")&&(u.id=`_${u.id}`)})}));const m=s.update;s.update=function(v,u){return m==null||m.call(this,v,u),s.state.currentGroup===s.groups.idle&&U.update(r,u),!0},s.on("motionStart",(v,u)=>{ee.value={group:v,index:u}}),b.value&&await R.setItem("live2dModel",b.value),M.value=!1}async function te(){if(!t.value)return;P.registerTicker($),C.add(Y),C.add(se);const a=await R.getItem("live2dModel");if(a){b.value=a,S.value="file",M.value=!0;return}if(k.value){S.value="url",M.value=!0;return}M.value=!1}async function le(a,r){await e.value.motion(a,r,de.FORCE)}const oe=ge(()=>{e.value&&(e.value.x=l.width/2,e.value.y=l.height,I(e))},100),A=f(),w=f(0);function x(){if(e.value){const a=getComputedStyle(A.value).backgroundColor;D.value.color=Number(Ce(a).replace("#","0x")),e.value.filters=[D.value]}}p([()=>l.width,()=>l.height],()=>oe()),p(B,x,{immediate:!0}),p([e,Z],x);function E(){x(),w.value=requestAnimationFrame(E)}return p(_,()=>{_.value?w.value=requestAnimationFrame(E):(cancelAnimationFrame(w.value),w.value=0)},{immediate:!0}),p(y,a=>W().setParameterValueById("ParamMouthOpenY",a)),p(t,te),p(J,a=>le(a.group,a.index)),p(d,a=>{var r,h;a?(r=t.value)==null||r.stop():(h=t.value)==null||h.start()}),Me(M,a=>{a&&ae()},{debounce:1e3}),X(x),j(()=>{var a;cancelAnimationFrame(w.value),e.value&&((a=t.value)==null||a.stage.removeChild(e.value))}),(a,r)=>(G(),q(we,null,[ye("div",{ref_key:"dropShadowColorComputer",ref:A,hidden:"",bg:"primary-400 dark:primary-500"},null,512),K(a.$slots,"default")],64))}});export{Ee as _,Ae as a,H as r}; diff --git a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js similarity index 85% rename from assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js rename to assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js index eab72a5c3a09c0e294d90ea73c2a28d030c62cee..6a276f0e9ba61db1ecdb71d14a99e2ec7cd7a312 100644 --- a/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js +++ b/assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js @@ -1 +1 @@ -import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";/* empty css */import{d as u,bK as n,k as m,bL as p,l as c,m as f,o as b,u as a}from"./index-5LjD1Eoi.js";const k=u({__name:"ProviderApiKeyInput",props:n({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,{t:d}=m(),o=p(e,"modelValue"),i=c(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(b(),f(a(t),{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||a(d)("settings.pages.providers.common.fields.field.api-key.label"),description:i.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{k as _}; +import{_ as t}from"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";/* empty css */import{d as u,bK as n,k as m,bL as p,l as c,m as f,o as b,u as a}from"./index-DCMFRrFG.js";const k=u({__name:"ProviderApiKeyInput",props:n({providerName:null,placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=e,{t:d}=m(),o=p(e,"modelValue"),i=c(()=>l.description||`API Key for ${l.providerName}`);return(v,r)=>(b(),f(a(t),{modelValue:o.value,"onUpdate:modelValue":r[0]||(r[0]=s=>o.value=s),label:e.label||a(d)("settings.pages.providers.common.fields.field.api-key.label"),description:i.value,placeholder:e.placeholder,required:e.required,type:"password"},null,8,["modelValue","label","description","placeholder","required"]))}});export{k as _}; diff --git a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js similarity index 89% rename from assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js rename to assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js index f1b3ae08643a03198681d38b6b4143f73e87a4ba..0c48ba0ae0d4f6e683e9406fbf069040825caa94 100644 --- a/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js +++ b/assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js @@ -1 +1 @@ -import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import{d,r as m,m as u,o as c,E as n,a as e,B as f,t as _,F as v,bK as b,bL as V,u as g}from"./index-5LjD1Eoi.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";/* empty css */const h=["onClick"],B={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},y={"mt-4":""},U=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function s(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(r=>[e("button",{transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:()=>r.setVisible(!r.visible)&&s()},[e("h2",B,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:v({"rotate-180":r.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,h)]),default:n(()=>[e("div",y,[f(o.$slots,"default")])]),_:3}))}}),$=d({__name:"ProviderBaseUrlInput",props:b({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=V(l,"modelValue");return(s,o)=>(c(),u(g(x),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{U as _,$ as a}; +import{_ as p}from"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import{d,r as m,m as u,o as c,E as n,a as e,B as f,t as _,F as v,bK as b,bL as V,u as g}from"./index-DCMFRrFG.js";import{_ as x}from"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";/* empty css */const h=["onClick"],B={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},y={"mt-4":""},U=d({__name:"ProviderAdvancedSettings",props:{title:null,initialVisible:{type:Boolean}},setup(l){const a=m(l.initialVisible||!1);function s(){a.value=!a.value}return(o,i)=>(c(),u(p,{"w-full":""},{trigger:n(r=>[e("button",{transition:"all ease-in-out duration-250","w-full":"",flex:"","items-center":"","gap-1.5":"","outline-none":"",class:"[&_.provider-icon]:grayscale-100 [&_.provider-icon]:hover:grayscale-0",onClick:()=>r.setVisible(!r.visible)&&s()},[e("h2",B,[e("span",null,_(l.title||"Advanced"),1)]),e("div",{transform:"",transition:"transform duration-250",class:v({"rotate-180":r.visible})},i[0]||(i[0]=[e("div",{"i-solar:alt-arrow-down-bold-duotone":""},null,-1)]),2)],8,h)]),default:n(()=>[e("div",y,[f(o.$slots,"default")])]),_:3}))}}),$=d({__name:"ProviderBaseUrlInput",props:b({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const t=l,a=V(l,"modelValue");return(s,o)=>(c(),u(g(x),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=i=>a.value=i),label:t.label||"Base URL",description:t.description||"Custom base URL (optional)",placeholder:t.placeholder,required:t.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}});export{U as _,$ as a}; diff --git a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js similarity index 94% rename from assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js rename to assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js index 2e86b70b3b508bfb5efddf74d6f84d1ed567b989..478bae5980d455117d15816e491a9dd192deed23 100644 --- a/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js +++ b/assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js @@ -1 +1 @@ -import{d as o,c as s,o as a,a as e,B as i,i as u,t as l}from"./index-5LjD1Eoi.js";const c={flex:"~ col gap-6"},x={flex:"~ row","items-center":"","justify-between":""},f={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},m={text:"neutral-400 dark:neutral-500"},g=o({__name:"ProviderBasicSettings",props:{title:null,description:null,onReset:{type:Function}},setup(t){return(r,n)=>(a(),s("div",c,[e("div",x,[e("div",null,[e("h2",f,l(t.title||"Basic"),1),e("div",m,[e("span",null,l(t.description||"Essential settings"),1)])]),t.onReset?(a(),s("button",{key:0,title:"Reset settings",flex:"","items-center":"","justify-center":"","rounded-full":"","p-2":"",transition:"all duration-250 ease-in-out",text:"neutral-500 dark:neutral-400",bg:"transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700",onClick:n[0]||(n[0]=(...d)=>t.onReset&&t.onReset(...d))},n[1]||(n[1]=[e("div",{"i-solar:refresh-bold-duotone":"","text-xl":""},null,-1)]))):u("",!0)]),i(r.$slots,"default")]))}}),p={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},k=o({__name:"ProviderSettingsContainer",setup(t){return(r,n)=>(a(),s("div",p,[i(r.$slots,"default")]))}});export{k as _,g as a}; +import{d as o,c as s,o as a,a as e,B as i,i as u,t as l}from"./index-DCMFRrFG.js";const c={flex:"~ col gap-6"},x={flex:"~ row","items-center":"","justify-between":""},f={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},m={text:"neutral-400 dark:neutral-500"},g=o({__name:"ProviderBasicSettings",props:{title:null,description:null,onReset:{type:Function}},setup(t){return(r,n)=>(a(),s("div",c,[e("div",x,[e("div",null,[e("h2",f,l(t.title||"Basic"),1),e("div",m,[e("span",null,l(t.description||"Essential settings"),1)])]),t.onReset?(a(),s("button",{key:0,title:"Reset settings",flex:"","items-center":"","justify-center":"","rounded-full":"","p-2":"",transition:"all duration-250 ease-in-out",text:"neutral-500 dark:neutral-400",bg:"transparent dark:transparent hover:neutral-200 dark:hover:neutral-800 active:neutral-300 dark:active:neutral-700",onClick:n[0]||(n[0]=(...d)=>t.onReset&&t.onReset(...d))},n[1]||(n[1]=[e("div",{"i-solar:refresh-bold-duotone":"","text-xl":""},null,-1)]))):u("",!0)]),i(r.$slots,"default")]))}}),p={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-6"},k=o({__name:"ProviderSettingsContainer",setup(t){return(r,n)=>(a(),s("div",p,[i(r.$slots,"default")]))}});export{k as _,g as a}; diff --git a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js similarity index 90% rename from assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js rename to assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js index 5c89b5eb34c9106a642de623d7ed21761a2ae604..746823c14b6a1db1ed098b79b55612454e40d267 100644 --- a/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js +++ b/assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js @@ -1 +1 @@ -import{d as a,bz as i,c as o,o as t,B as s,G as l,a as c,F as d,bA as p}from"./index-5LjD1Eoi.js";const u={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},_=a({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(n,v)=>{const r=i("motion");return t(),o(p,null,[s(n.$slots,"default"),l((t(),o("div",u,[c("div",{text:"60",class:d(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}});export{_}; +import{d as a,bz as i,c as o,o as t,B as s,G as l,a as c,F as d,bA as p}from"./index-DCMFRrFG.js";const u={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},_=a({__name:"ProviderSettingsLayout",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(e){return(n,v)=>{const r=i("motion");return t(),o(p,null,[s(n.$slots,"default"),l((t(),o("div",u,[c("div",{text:"60",class:d(e.providerIcon||e.providerIconColor)},null,2)])),[[r]])],64)}}});export{_}; diff --git a/assets/Radio-Dsd6Nuzv.css b/assets/Radio-CYvjI7WT.css similarity index 68% rename from assets/Radio-Dsd6Nuzv.css rename to assets/Radio-CYvjI7WT.css index 973e46438b81237e3341653c23aef311e8848ac7..468cd9f77472e6466dd0772ce17c5ba5377e5f51 100644 --- a/assets/Radio-Dsd6Nuzv.css +++ b/assets/Radio-CYvjI7WT.css @@ -1 +1 @@ -.form_input-range[data-v-992ec255]{--height: 2em;min-height:var(--height);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-radius:4px;transition:background-color .2s ease;--thumb-width: 4px;--thumb-height: var(--height);--thumb-box-shadow: 0 0 0px #e6e6e6;--thumb-border: none;--thumb-border-radius: 999px;--thumb-background: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-height: calc(var(--height) - var(--track-value-padding) * 2);--track-box-shadow: none;--track-border: solid 2px rgb(238, 238, 238);--track-border-radius: 6px;--track-background: rgb(238, 238, 238);--track-background-hover: rgb(238, 238, 238);--track-background-active: rgb(238, 238, 238);--track-value-background: rgb(255, 255, 255);--track-value-background-hover: rgb(255, 255, 255);--track-value-background-active: rgb(255, 255, 255);--track-value-padding: 2px}.dark .form_input-range[data-v-992ec255]{--thumb-background: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-border: solid 2px rgb(44, 44, 44);--track-background: rgb(44, 44, 44);--track-background-hover: rgb(44, 44, 44);--track-background-active: rgb(44, 44, 44);--track-value-background: rgb(164, 164, 164);--track-value-background-hover: rgb(164, 164, 164);--track-value-background-active: rgb(164, 164, 164)}.form_input-range.slider-progress[data-v-992ec255]{--range: calc(var(--max) - var(--min));--ratio: calc((var(--value) - var(--min)) / var(--range));--sx: calc(.5 * 0em + var(--ratio) * (100% - 0em))}.form_input-range[data-v-992ec255]:focus{outline:none}.form_input-range[data-v-992ec255]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height) * .5 - var(--thumb-height) * .5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s ease-in-out}.form_input-range[data-v-992ec255]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);position:relative;cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out}.form_input-range[data-v-992ec255]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-992ec255]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-992ec255]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-992ec255]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-992ec255]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-992ec255]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-992ec255]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-992ec255]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:none;box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding))}.form_input-range[data-v-992ec255]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding) * 2)}.form_input-range[data-v-992ec255]::-moz-range-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-992ec255]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-992ec255]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-992ec255]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-992ec255]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-992ec255]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-992ec255]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-992ec255]::-ms-fill-upper{background:transparent;border-color:transparent}.form_input-range[data-v-992ec255]::-ms-fill-lower{background:transparent;border-color:transparent}.form_input-range[data-v-992ec255]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-992ec255]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-992ec255]::-ms-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-992ec255]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-992ec255]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-992ec255]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-992ec255]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius) 0 0 var(--track-border-radius);margin:0;background:var(--track-value-background);border:none;border-right-width:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding))}.form_input-range.slider-progress[data-v-992ec255]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-992ec255]:active::-ms-fill-lower{background:var(--track-value-background-active)} +.form_input-range[data-v-d88ffd28]{--height: 2em;min-height:var(--height);-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border-radius:4px;transition:background-color .2s ease;--thumb-width: 4px;--thumb-height: var(--height);--thumb-box-shadow: 0 0 0px #e6e6e6;--thumb-border: none;--thumb-border-radius: 999px;--thumb-background: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-height: calc(var(--height) - var(--track-value-padding) * 2);--track-box-shadow: none;--track-border: solid 2px rgb(238, 238, 238);--track-border-radius: 6px;--track-background: rgb(238, 238, 238);--track-background-hover: rgb(238, 238, 238);--track-background-active: rgb(238, 238, 238);--track-value-background: rgb(255, 255, 255);--track-value-background-hover: rgb(255, 255, 255);--track-value-background-active: rgb(255, 255, 255);--track-value-padding: 2px}.dark .form_input-range[data-v-d88ffd28]{--thumb-background: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--thumb-background-active: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));--track-border: solid 2px rgb(44, 44, 44);--track-background: rgb(44, 44, 44);--track-background-hover: rgb(44, 44, 44);--track-background-active: rgb(44, 44, 44);--track-value-background: rgb(164, 164, 164);--track-value-background-hover: rgb(164, 164, 164);--track-value-background-active: rgb(164, 164, 164)}.form_input-range.slider-progress[data-v-d88ffd28]{--range: calc(var(--max) - var(--min));--ratio: calc((var(--value) - var(--min)) / var(--range));--sx: calc(.5 * 0em + var(--ratio) * (100% - 0em))}.form_input-range[data-v-d88ffd28]:focus{outline:none}.form_input-range[data-v-d88ffd28]::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:calc(var(--track-height) * .5 - var(--thumb-height) * .5 - 2px);margin-left:calc(0 - var(--track-value-padding));cursor:col-resize;transition:background .2s ease-in-out,box-shadow .2s ease-in-out,border-color .2s ease-in-out,transform .2s ease-in-out}.form_input-range[data-v-d88ffd28]::-webkit-slider-runnable-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);position:relative;cursor:col-resize;transition:box-shadow .2s ease-in-out,border-color .2s ease-in-out}.form_input-range[data-v-d88ffd28]::-webkit-slider-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-d88ffd28]:hover::-webkit-slider-runnable-track{background:var(--track-background-hover)}.form_input-range[data-v-d88ffd28]::-webkit-slider-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-d88ffd28]:active::-webkit-slider-runnable-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-d88ffd28]::-webkit-slider-runnable-track{margin-right:calc(0 - var(--track-value-padding));background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-d88ffd28]:hover::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-d88ffd28]:active::-webkit-slider-runnable-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-d88ffd28]::-moz-range-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:none;box-shadow:var(--thumb-box-shadow);cursor:col-resize;margin-left:calc(0 - var(--track-value-padding))}.form_input-range[data-v-d88ffd28]::-moz-range-track{height:var(--track-height);border:var(--track-border);border-radius:var(--track-border-radius);background:var(--track-background);box-shadow:var(--track-box-shadow);cursor:col-resize;width:calc(100% - var(--track-value-padding) * 2)}.form_input-range[data-v-d88ffd28]::-moz-range-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-d88ffd28]:hover::-moz-range-track{background:var(--track-background-hover)}.form_input-range[data-v-d88ffd28]::-moz-range-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-d88ffd28]:active::-moz-range-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-d88ffd28]::-moz-range-track{background:linear-gradient(var(--track-value-background),var(--track-value-background)) 0 / var(--sx) 100% no-repeat,var(--track-background)}.form_input-range.slider-progress[data-v-d88ffd28]:hover::-moz-range-track{background:linear-gradient(var(--track-value-background-hover),var(--track-value-background-hover)) 0 / var(--sx) 100% no-repeat,var(--track-background-hover)}.form_input-range.slider-progress[data-v-d88ffd28]:active::-moz-range-track{background:linear-gradient(var(--track-value-background-active),var(--track-value-background-active)) 0 / var(--sx) 100% no-repeat,var(--track-background-active)}.form_input-range[data-v-d88ffd28]::-ms-fill-upper{background:transparent;border-color:transparent}.form_input-range[data-v-d88ffd28]::-ms-fill-lower{background:transparent;border-color:transparent}.form_input-range[data-v-d88ffd28]::-ms-thumb{width:var(--thumb-width);height:var(--thumb-height);border-radius:var(--thumb-border-radius);background:var(--thumb-background);border:var(--thumb-border);box-shadow:var(--thumb-box-shadow);margin-top:0;margin-left:calc(0 - var(--track-value-padding));box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-d88ffd28]::-ms-track{height:var(--track-height);border-radius:var(--track-border-radius);background:var(--track-background);border:var(--track-border);box-shadow:var(--track-box-shadow);box-sizing:border-box;cursor:col-resize}.form_input-range[data-v-d88ffd28]::-ms-thumb:hover{background:var(--thumb-background-hover)}.form_input-range[data-v-d88ffd28]:hover::-ms-track{background:var(--track-background-hover)}.form_input-range[data-v-d88ffd28]::-ms-thumb:active{background:var(--thumb-background-active)}.form_input-range[data-v-d88ffd28]:active::-ms-track{background:var(--track-background-active)}.form_input-range.slider-progress[data-v-d88ffd28]::-ms-fill-lower{height:var(--track-height);border-radius:var(--track-border-radius) 0 0 var(--track-border-radius);margin:0;background:var(--track-value-background);border:none;border-right-width:0;margin-left:calc(var(--track-value-padding));margin-right:calc(0 - var(--track-value-padding))}.form_input-range.slider-progress[data-v-d88ffd28]:hover::-ms-fill-lower{background:var(--track-value-background-hover)}.form_input-range.slider-progress[data-v-d88ffd28]:active::-ms-fill-lower{background:var(--track-value-background-active)} diff --git a/assets/RadioCardSimple-D24jggBz.js b/assets/RadioCardSimple-_IHIrHb5.js similarity index 97% rename from assets/RadioCardSimple-D24jggBz.js rename to assets/RadioCardSimple-_IHIrHb5.js index f46ec94041be4e15f5b8ec7333f0efcb284c59fe..b7ef6e0c8d965c44242d748f89612229465f4853 100644 --- a/assets/RadioCardSimple-D24jggBz.js +++ b/assets/RadioCardSimple-_IHIrHb5.js @@ -1 +1 @@ -import{d as g,bK as f,bL as w,r as b,c as n,o as d,F as o,G as V,a as t,bD as I,i as v,t as c,b as R,E as S,bO as k,u as $,bq as C,l as T,bH as E,bA as z,bB as N,m as D}from"./index-5LjD1Eoi.js";import{_ as q}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";/* empty css */import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";const P=["checked","name","value"],U={class:"relative mr-3 mt-0.5 flex-shrink-0"},j={class:"w-full flex flex-col gap-2"},F={class:"flex items-center"},A={key:0,class:"relative"},G=["title"],H={key:1,class:"mt-2"},K=g({__name:"RadioCardDetail",props:f({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue"),m=b(!1);function s(){m.value=!m.value}return(x,r)=>(d(),n("label",{key:e.id,class:o(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[V(t("input",{"onUpdate:modelValue":r[0]||(r[0]=u=>a.value=u),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,P),[[I,a.value]]),t("div",U,[t("div",{class:o(["size-5 border-2 rounded-full transition-colors duration-200",[a.value===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:o(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[a.value===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",j,[t("div",F,[t("span",{class:o(["line-clamp-1 font-medium",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},c(e.title),3)]),e.description?(d(),n("div",A,[R($(q),null,{default:S(()=>[!m.value||!e.showExpandCollapse?(d(),n("div",{key:0,class:o(["line-clamp-2 cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:k(s,["prevent"])},c(e.description),11,G)):(d(),n("div",{key:1,class:o(["cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:k(s,["prevent"])},c(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(d(),n("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:k(s,["prevent"])},[t("span",null,c(m.value?"Show less":"Show more"),1),t("div",{class:o([{"rotate-180":m.value},"transition-transform duration-200"])},r[2]||(r[2]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&a.value===e.value?(d(),n("div",H,[R($(L),{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=u=>a.value=u),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder},null,8,["modelValue","placeholder"])])):v("",!0)])],2))}}),O=C(K,[["__scopeId","data-v-0e0bc18f"]]),Q={class:"radio-card-detail-many-select"},J={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},W=["placeholder"],X={class:"mt-4 space-y-2"},Y={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},Z={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},_={class:"flex flex-col"},ee={class:"font-medium"},te={class:"text-sm text-amber-600 dark:text-amber-400"},ae={class:"relative"},le=g({__name:"RadioCardManySelect",props:f({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=b(""),u=b(!1),B=b(""),h=T(()=>{if(!r.value)return m.items;const p=r.value.toLowerCase();return m.items.filter(l=>l.name.toLowerCase().includes(p)||l.description&&l.description.toLowerCase().includes(p))});function M(p){B.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",Q,[e.searchable?(d(),n("div",J,[l[4]||(l[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),V(t("input",{"onUpdate:modelValue":l[0]||(l[0]=i=>r.value=i),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,W),[[E,r.value]])])):v("",!0),t("div",X,[r.value?(d(),n("div",Y,c(e.searchResultsText.replace("{count}",h.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),r.value&&h.value.length===0?(d(),n("div",Z,[l[5]||(l[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",_,[t("span",ee,c(e.searchNoResultsTitle),1),t("span",te,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",ae,[t("div",{class:o(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4 scrollbar-none",[u.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(d(!0),n(z,null,N(h.value,i=>(d(),D(O,{id:i.id,key:i.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:i.id,title:i.name,description:i.description,deprecated:i.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":i.customizable,"custom-input-value":B.value,"custom-input-placeholder":e.customInputPlaceholder,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:customInputValue":l[2]||(l[2]=y=>M(y))},null,8,["id","modelValue","value","title","description","deprecated","show-expand-collapse","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:o([u.value?"w-full":"mt-4 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:o([u.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:l[3]||(l[3]=i=>u.value=!u.value)},[t("span",null,c(u.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([u.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),me=C(le,[["__scopeId","data-v-7ad6d626"]]),re=["checked","name","value"],oe={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},de=g({__name:"RadioCardSimple",props:f({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue");return(m,s)=>(d(),n("label",{key:e.id,border:"2px solid",class:o(["form_radio-card-simple relative",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[V(t("input",{"onUpdate:modelValue":s[0]||(s[0]=x=>a.value=x),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100"},null,8,re),[[I,a.value]]),s[1]||(s[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",oe,[t("span",{class:o(["radio-item-name font-bold",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},c(e.title),3),e.description?(d(),n("span",{key:0,class:o(["radio-item-description",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},c(e.description),3)):v("",!0)]),s[2]||(s[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),ve=C(de,[["__scopeId","data-v-475841e0"]]);export{me as R,ve as a}; +import{d as g,bK as f,bL as w,r as b,c as n,o as d,F as o,G as V,a as t,bD as I,i as v,t as c,b as R,E as S,bO as k,u as $,bq as C,l as T,bH as E,bA as z,bB as N,m as D}from"./index-DCMFRrFG.js";import{_ as q}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import{_ as L}from"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";/* empty css */import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";const P=["checked","name","value"],U={class:"relative mr-3 mt-0.5 flex-shrink-0"},j={class:"w-full flex flex-col gap-2"},F={class:"flex items-center"},A={key:0,class:"relative"},G=["title"],H={key:1,class:"mt-2"},K=g({__name:"RadioCardDetail",props:f({id:null,name:null,value:null,title:null,description:null,deprecated:{type:Boolean,default:!1},showExpandCollapse:{type:Boolean,default:!0},expandCollapseThreshold:{default:100},customInputValue:{default:""},customInputPlaceholder:{default:""},showCustomInput:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue"),m=b(!1);function s(){m.value=!m.value}return(x,r)=>(d(),n("label",{key:e.id,class:o(["form_radio-card-detail relative flex cursor-pointer items-start rounded-xl p-3 pr-[20px]",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-detail-active":"",e.deprecated?"opacity-60":""]]),transition:"all duration-200 ease-in-out",border:"2 solid"},[V(t("input",{"onUpdate:modelValue":r[0]||(r[0]=u=>a.value=u),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"absolute opacity-0"},null,8,P),[[I,a.value]]),t("div",U,[t("div",{class:o(["size-5 border-2 rounded-full transition-colors duration-200",[a.value===e.value?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[t("div",{class:o(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[a.value===e.value?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),t("div",j,[t("div",F,[t("span",{class:o(["line-clamp-1 font-medium",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},c(e.title),3)]),e.description?(d(),n("div",A,[R($(q),null,{default:S(()=>[!m.value||!e.showExpandCollapse?(d(),n("div",{key:0,class:o(["line-clamp-2 cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),title:e.description,onClick:k(s,["prevent"])},c(e.description),11,G)):(d(),n("div",{key:1,class:o(["cursor-pointer text-xs",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]]),onClick:k(s,["prevent"])},c(e.description),3))]),_:1}),e.showExpandCollapse&&e.description.length>e.expandCollapseThreshold?(d(),n("button",{key:0,class:"text-primary-500 dark:text-primary-600 mt-0.5 inline-flex items-center text-xs",onClick:k(s,["prevent"])},[t("span",null,c(m.value?"Show less":"Show more"),1),t("div",{class:o([{"rotate-180":m.value},"transition-transform duration-200"])},r[2]||(r[2]=[t("div",{"i-solar:alt-arrow-down-bold-duotone":"","ml-0.5":"","text-xs":""},null,-1)]),2)])):v("",!0)])):v("",!0),e.showCustomInput&&a.value===e.value?(d(),n("div",H,[R($(L),{modelValue:a.value,"onUpdate:modelValue":r[1]||(r[1]=u=>a.value=u),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:e.customInputPlaceholder},null,8,["modelValue","placeholder"])])):v("",!0)])],2))}}),O=C(K,[["__scopeId","data-v-0e0bc18f"]]),Q={class:"radio-card-detail-many-select"},J={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},W=["placeholder"],X={class:"mt-4 space-y-2"},Y={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},Z={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},_={class:"flex flex-col"},ee={class:"font-medium"},te={class:"text-sm text-amber-600 dark:text-amber-400"},ae={class:"relative"},le=g({__name:"RadioCardManySelect",props:f({items:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search..."},searchNoResultsTitle:{default:"No results found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} results"},customInputPlaceholder:{default:"Enter custom value"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},showMore:{type:Boolean,default:!0}},{modelValue:{required:!0},modelModifiers:{}}),emits:f(["update:customValue"],["update:modelValue"]),setup(e,{emit:a}){const m=e,s=a,x=w(e,"modelValue"),r=b(""),u=b(!1),B=b(""),h=T(()=>{if(!r.value)return m.items;const p=r.value.toLowerCase();return m.items.filter(l=>l.name.toLowerCase().includes(p)||l.description&&l.description.toLowerCase().includes(p))});function M(p){B.value=p,s("update:customValue",p)}return(p,l)=>(d(),n("div",Q,[e.searchable?(d(),n("div",J,[l[4]||(l[4]=t("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[t("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),V(t("input",{"onUpdate:modelValue":l[0]||(l[0]=i=>r.value=i),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:e.searchPlaceholder},null,8,W),[[E,r.value]])])):v("",!0),t("div",X,[r.value?(d(),n("div",Y,c(e.searchResultsText.replace("{count}",h.value.length.toString()).replace("{total}",e.items.length.toString())),1)):v("",!0),r.value&&h.value.length===0?(d(),n("div",Z,[l[5]||(l[5]=t("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),t("div",_,[t("span",ee,c(e.searchNoResultsTitle),1),t("span",te,c(e.searchNoResultsDescription.replace("{query}",r.value)),1)])])):v("",!0),t("div",ae,[t("div",{class:o(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto pb-4 scrollbar-none",[u.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(d(!0),n(z,null,N(h.value,i=>(d(),D(O,{id:i.id,key:i.id,modelValue:x.value,"onUpdate:modelValue":l[1]||(l[1]=y=>x.value=y),value:i.id,title:i.name,description:i.description,deprecated:i.deprecated,"show-expand-collapse":e.showMore,"expand-collapse-threshold":100,"show-custom-input":i.customizable,"custom-input-value":B.value,"custom-input-placeholder":e.customInputPlaceholder,name:"radio-card-detail-many-select",class:"scroll-snap-align-start","onUpdate:customInputValue":l[2]||(l[2]=y=>M(y))},null,8,["id","modelValue","value","title","description","deprecated","show-expand-collapse","show-custom-input","custom-input-value","custom-input-placeholder"]))),128))],2),t("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:o([u.value?"w-full":"mt-4 w-full rounded-lg"])},[t("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:o([u.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:l[3]||(l[3]=i=>u.value=!u.value)},[t("span",null,c(u.value?e.collapseButtonText:e.expandButtonText),1),t("div",{class:o([u.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),me=C(le,[["__scopeId","data-v-7ad6d626"]]),re=["checked","name","value"],oe={flex:"~ col","min-h-16":"","w-full":"","items-start":"","justify-center":"","pb-2":"","pl-5":"","pr-4":"","pt-2":""},de=g({__name:"RadioCardSimple",props:f({id:null,name:null,value:null,title:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const a=w(e,"modelValue");return(m,s)=>(d(),n("label",{key:e.id,border:"2px solid",class:o(["form_radio-card-simple relative",[a.value===e.value?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",a.value===e.value?"form_radio-card-simple-active":""]]),transition:"all duration-200 ease-in-out",flex:"~ col",block:"","min-w-50":"","w-fit":"","cursor-pointer":"","items-start":"","rounded-xl":"","p-4":"","text-left":""},[V(t("input",{"onUpdate:modelValue":s[0]||(s[0]=x=>a.value=x),checked:a.value===e.value,type:"radio",name:e.name,value:e.value,class:"[&:checked+div]:border-primary-500 dark:[&:checked+div]:border-primary-400 absolute opacity-0 [&:checked+div_.radio-dot]:opacity-100"},null,8,re),[[I,a.value]]),s[1]||(s[1]=t("div",{class:"radio-circle absolute left-2 top-2 size-5 rounded-full",border:"2 solid neutral-300 dark:neutral-600",transition:"all duration-200 ease-in-out"},[t("div",{class:"radio-dot absolute left-1/2 top-1/2 size-3 rounded-full opacity-0 -translate-x-1/2 -translate-y-1/2",transition:"all duration-200 ease-in-out",bg:"primary-500 dark:primary-400"})],-1)),t("div",oe,[t("span",{class:o(["radio-item-name font-bold",[a.value===e.value?"text-neutral-700 dark:text-neutral-300":"text-neutral-500 dark:text-neutral-500"]]),text:"md",transition:"all duration-200 ease-in-out"},c(e.title),3),e.description?(d(),n("span",{key:0,class:o(["radio-item-description",[a.value===e.value?"text-neutral-600 dark:text-neutral-400":"text-neutral-400 dark:text-neutral-600"]]),transition:"all duration-200 ease-in-out"},c(e.description),3)):v("",!0)]),s[2]||(s[2]=t("div",{class:"bg-dotted-neutral-200/80 dark:bg-dotted-neutral-700/50 [input:checked~&]:bg-dotted-primary-300/50 dark:[input:checked~&]:bg-dotted-primary-200/20",absolute:"","inset-0":"","z--1":"",style:{"background-size":"10px 10px","mask-image":"linear-gradient(165deg, white 30%, transparent 50%)"}},null,-1))],2))}}),ve=C(de,[["__scopeId","data-v-475841e0"]]);export{me as R,ve as a}; diff --git a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js similarity index 95% rename from assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js rename to assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js index eab5f3bfcb16120f2c7b22ad999f7345ba7b0a32..64249cc6fb9ec20187de208544c2bf410b6265ad 100644 --- a/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js +++ b/assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js @@ -1 +1 @@ -import{d as K,bz as ee,c as b,o as g,B as $,G as O,a,F as G,bA as H,k as q,r as u,w as B,g as J,b as T,u as s,t as k,i as R,bH as E,bJ as te,bB as oe,h as ae,s as le,l as M,f as se,m as re,E as C,bW as A,bX as D,bS as ie}from"./index-5LjD1Eoi.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js";/* empty css */import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as de,g as ve}from"./speech-BYL-UWPg.js";import{u as ce}from"./providers-CIeQW25J.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";const he={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},_e=K({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(x){return(o,S)=>{const d=ee("motion");return g(),b(H,null,[$(o.$slots,"default"),O((g(),b("div",he,[a("div",{text:"60",class:G(x.providerIcon||x.providerIconColor)},null,2)])),[[d]])],64)}}}),xe={"w-full":"","rounded-xl":""},ye={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},ke={class:"inline-flex items-center gap-4"},Se={flex:"~ col gap-4"},Ue=["placeholder"],we=["placeholder"],Ie={flex:"~ col gap-6"},Ve={grid:"~ cols-2 gap-4"},Te={class:"flex items-center gap-1 text-sm font-medium"},$e={class:"text-xs text-neutral-500 dark:text-neutral-400"},Le=["value"],Re={flex:"~ row","gap-4":""},Pe=["disabled"],Me={flex:"~ row","items-center":"","gap-2":""},Ce={flex:"~ row","items-center":"","gap-2":""},Oe={key:2,class:"mt-2 text-sm text-red-500"},ze={key:3,class:"mt-2 text-sm text-red-500"},Be={key:4,class:"mt-2 text-sm text-red-500"},Ke=["src"],ot=K({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(x,{expose:o}){const S=x,{t:d}=q(),m=u(S.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),c=u(""),f=u(null),i=u(!1),h=u(""),p=u("");B(()=>S.availableVoices,n=>{var r;n.length>0&&!p.value&&(p.value=((r=n[0])==null?void 0:r.id)||"")},{immediate:!0});async function _(){if(!(!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value)){U.value=!0,c.value="";try{t.value&&I();const n=i.value?h.value:m.value,r=await S.generateSpeech(n,p.value,i.value);t.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{f.value&&f.value.play()},100)}catch(n){console.error("Error generating speech:",n),c.value=n instanceof Error?n.message:"An unknown error occurred"}finally{U.value=!1}}}function I(){f.value&&(f.value.pause(),f.value.currentTime=0),t.value&&(URL.revokeObjectURL(t.value),t.value="")}return J(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:m,ssmlText:h,useSSML:i,selectedVoice:p,isGenerating:U,audioUrl:t,errorMessage:c,audioPlayer:f,generateTestSpeech:_,stopTestAudio:I}),(n,r)=>(g(),b("div",xe,[a("h2",ye,[a("div",ke,[T(s(ne)),a("div",null,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),a("div",Se,[T(s(ue),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=v=>i.value=v),label:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),i.value?O((g(),b("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=v=>h.value=v),placeholder:s(d)("settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,8,we)),[[E,h.value]]):O((g(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=v=>m.value=v),placeholder:s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Ue)),[[E,m.value]]),a("div",Ie,[a("label",Ve,[a("div",null,[a("div",Te,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),a("div",$e,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),O(a("select",{"onUpdate:modelValue":r[3]||(r[3]=v=>p.value=v),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(g(!0),b(H,null,oe(x.availableVoices,v=>(g(),b("option",{key:v.id,value:v.id},k(v.name),9,Le))),128))],512),[[te,p.value]])])]),a("div",Re,[a("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:U.value||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured,class:G({"opacity-50 cursor-not-allowed":U.value||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:_},[a("div",Me,[r[4]||(r[4]=a("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),a("span",null,k(U.value?s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Pe),t.value?(g(),b("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:I},[a("div",Ce,[r[5]||(r[5]=a("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),a("span",null,k(s(d)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):R("",!0)]),x.apiKeyConfigured?R("",!0):(g(),b("div",Oe,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),p.value?R("",!0):(g(),b("div",ze,k(s(d)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),c.value?(g(),b("div",Be,k(c.value),1)):R("",!0),t.value?(g(),b("audio",{key:5,ref_key:"audioPlayer",ref:f,src:t.value,controls:"",class:"mt-2 w-full"},null,8,Ke)):R("",!0)]),$(n.$slots,"default")]))}}),Fe={flex:"~ col md:row gap-6"},Ne={flex:"~ col gap-6"},je={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},Ee={flex:"~ col gap-4"},Ae={flex:"~ col gap-6",class:"w-full md:w-[60%]"},De={"w-full":"","rounded-xl":""},at=K({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(x){const o=x,{t:S}=q(),d=ae(),m=ce(),U=de(),{providers:t}=le(m),c=M(()=>m.getProviderMetadata(o.providerId)),f=M({get:()=>{var e;return((e=t.value[o.providerId])==null?void 0:e.apiKey)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].apiKey=e}}),i=M({get:()=>{var e,l,y;return((e=t.value[o.providerId])==null?void 0:e.baseUrl)||((y=(l=c.value)==null?void 0:l.defaultOptions)==null?void 0:y.baseUrl)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].baseUrl=e}}),h=u("Hello! This is a test of voice synthesis."),p=u(!1),_=u(""),I=u(""),n=u(null),r=u(!1),v=u(""),F=u(""),w=u({});function W(){var e;(e=t.value[o.providerId])!=null&&e.voiceSettings?w.value={...t.value[o.providerId].voiceSettings}:w.value={pitch:0,speed:1,volume:0,...o.additionalSettings}}se(()=>{var e,l,y,V;m.initializeProvider(o.providerId),f.value=((e=t.value[o.providerId])==null?void 0:e.apiKey)||"",i.value=((l=t.value[o.providerId])==null?void 0:l.baseUrl)||((V=(y=c.value)==null?void 0:y.defaultOptions)==null?void 0:V.baseUrl)||"",W(),m.configuredProviders[o.providerId]&&U.loadVoicesForProvider(o.providerId)});const z=ie(()=>{var e,l;t.value[o.providerId]={...t.value[o.providerId],apiKey:f.value,baseUrl:i.value||((l=(e=c.value)==null?void 0:e.defaultOptions)==null?void 0:l.baseUrl)||"",voiceSettings:{...w.value}}},1e3);B([f,i],z),B(w,z,{deep:!0});async function X(){if(!h.value.trim()&&!r.value||r.value&&!v.value.trim())return;const e=m.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!F.value){console.error("No active speech voice selected");return}p.value=!0,I.value="";try{_.value&&N();const l=o.defaultModel||"default",y=r.value?v.value:h.value,V=await ve({...e.speech(l,{voiceSettings:w.value}),input:y,voice:F.value});_.value=URL.createObjectURL(new Blob([V])),setTimeout(()=>{n.value&&n.value.play()},100)}catch(l){console.error("Error generating speech:",l),I.value=l instanceof Error?l.message:"An unknown error occurred"}finally{p.value=!1}}function N(){n.value&&(n.value.pause(),n.value.currentTime=0),_.value&&(URL.revokeObjectURL(_.value),_.value="")}J(()=>{_.value&&URL.revokeObjectURL(_.value)});function Q(){var e,l;w.value={...((l=(e=c.value)==null?void 0:e.defaultOptions)==null?void 0:l.voiceSettings)||{}},z()}function Y(e,l){w.value[e]=l}const j=M(()=>({voiceSettings:w.value,updateVoiceSettings:Y,isGenerating:p.value,testText:h.value,useSSML:r.value,ssmlText:v.value,generateTestSpeech:X,stopTestAudio:N,audioUrl:_.value,audioPlayer:n.value,errorMessage:I.value}));return(e,l)=>{var y,V;return g(),re(_e,{"provider-name":(y=c.value)==null?void 0:y.localizedName,"provider-icon":(V=c.value)==null?void 0:V.icon,"on-back":()=>s(d).back()},{default:C(()=>[a("div",Fe,[T(s(ge),{class:"w-full md:w-[40%]"},{default:C(()=>[T(s(be),{title:s(S)("settings.pages.providers.common.section.basic.title"),description:s(S)("settings.pages.providers.common.section.basic.description"),"on-reset":Q},{default:C(()=>{var L;return[T(s(fe),{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=P=>f.value=P),"provider-name":(L=c.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),$(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",Ne,[a("h2",je,k(s(S)("settings.pages.providers.common.section.voice.title")),1),a("div",Ee,[$(e.$slots,"voice-settings",A(D(j.value)))])]),T(s(pe),{title:s(S)("settings.pages.providers.common.section.advanced.title")},{default:C(()=>{var L,P;return[T(s(me),{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=Z=>i.value=Z),placeholder:((P=(L=c.value)==null?void 0:L.defaultOptions)==null?void 0:P.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),$(e.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),a("div",Ae,[a("div",De,[$(e.$slots,"playground",A(D(j.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{ot as _,at as a}; +import{d as K,bz as ee,c as b,o as g,B as $,G as O,a,F as G,bA as H,k as q,r as u,w as B,g as J,b as T,u as s,t as k,i as R,bH as E,bJ as te,bB as oe,h as ae,s as le,l as M,f as se,m as re,E as C,bW as A,bX as D,bS as ie}from"./index-DCMFRrFG.js";import{b as ne,a as ue}from"./FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js";/* empty css */import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as de,g as ve}from"./speech-Bc-BAopv.js";import{u as ce}from"./providers-DHuI5XmA.js";import{_ as pe,a as me}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as fe}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as ge,a as be}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";const he={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":""},_e=K({__name:"ProviderSettingsLayout2",props:{providerName:null,providerIcon:null,providerIconColor:null,onBack:{type:Function}},setup(x){return(o,S)=>{const d=ee("motion");return g(),b(H,null,[$(o.$slots,"default"),O((g(),b("div",he,[a("div",{text:"60",class:G(x.providerIcon||x.providerIconColor)},null,2)])),[[d]])],64)}}}),xe={"w-full":"","rounded-xl":""},ye={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},ke={class:"inline-flex items-center gap-4"},Se={flex:"~ col gap-4"},Ue=["placeholder"],we=["placeholder"],Ie={flex:"~ col gap-6"},Ve={grid:"~ cols-2 gap-4"},Te={class:"flex items-center gap-1 text-sm font-medium"},$e={class:"text-xs text-neutral-500 dark:text-neutral-400"},Le=["value"],Re={flex:"~ row","gap-4":""},Pe=["disabled"],Me={flex:"~ row","items-center":"","gap-2":""},Ce={flex:"~ row","items-center":"","gap-2":""},Oe={key:2,class:"mt-2 text-sm text-red-500"},ze={key:3,class:"mt-2 text-sm text-red-500"},Be={key:4,class:"mt-2 text-sm text-red-500"},Ke=["src"],ot=K({__name:"SpeechPlayground",props:{defaultText:null,availableVoices:null,generateSpeech:{type:Function},apiKeyConfigured:{type:Boolean}},setup(x,{expose:o}){const S=x,{t:d}=q(),m=u(S.defaultText||"Hello! This is a test of the voice synthesis."),U=u(!1),t=u(""),c=u(""),f=u(null),i=u(!1),h=u(""),p=u("");B(()=>S.availableVoices,n=>{var r;n.length>0&&!p.value&&(p.value=((r=n[0])==null?void 0:r.id)||"")},{immediate:!0});async function _(){if(!(!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value)){U.value=!0,c.value="";try{t.value&&I();const n=i.value?h.value:m.value,r=await S.generateSpeech(n,p.value,i.value);t.value=URL.createObjectURL(new Blob([r])),setTimeout(()=>{f.value&&f.value.play()},100)}catch(n){console.error("Error generating speech:",n),c.value=n instanceof Error?n.message:"An unknown error occurred"}finally{U.value=!1}}}function I(){f.value&&(f.value.pause(),f.value.currentTime=0),t.value&&(URL.revokeObjectURL(t.value),t.value="")}return J(()=>{t.value&&URL.revokeObjectURL(t.value)}),o({testText:m,ssmlText:h,useSSML:i,selectedVoice:p,isGenerating:U,audioUrl:t,errorMessage:c,audioPlayer:f,generateTestSpeech:_,stopTestAudio:I}),(n,r)=>(g(),b("div",xe,[a("h2",ye,[a("div",ke,[T(s(ne)),a("div",null,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),a("div",Se,[T(s(ue),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=v=>i.value=v),label:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.label"),description:s(d)("settings.pages.modules.speech.sections.section.voice-settings.use-ssml.description")},null,8,["modelValue","label","description"]),i.value?O((g(),b("textarea",{key:1,"onUpdate:modelValue":r[2]||(r[2]=v=>h.value=v),placeholder:s(d)("settings.pages.modules.speech.sections.section.voice-settings.input-ssml.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,8,we)),[[E,h.value]]):O((g(),b("textarea",{key:0,"onUpdate:modelValue":r[1]||(r[1]=v=>m.value=v),placeholder:s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder"),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-24":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,Ue)),[[E,m.value]]),a("div",Ie,[a("label",Ve,[a("div",null,[a("div",Te,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.label")),1),a("div",$e,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.fields.field.voice.description")),1)]),O(a("select",{"onUpdate:modelValue":r[3]||(r[3]=v=>p.value=v),border:"neutral-300 dark:neutral-800 solid 2 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":""},[(g(!0),b(H,null,oe(x.availableVoices,v=>(g(),b("option",{key:v.id,value:v.id},k(v.name),9,Le))),128))],512),[[te,p.value]])])]),a("div",Re,[a("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:U.value||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured,class:G({"opacity-50 cursor-not-allowed":U.value||!m.value.trim()&&!i.value||i.value&&!h.value.trim()||!p.value||!x.apiKeyConfigured}),bg:"neutral-700 dark:neutral-300",onClick:_},[a("div",Me,[r[4]||(r[4]=a("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),a("span",null,k(U.value?s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):s(d)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Pe),t.value?(g(),b("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:I},[a("div",Ce,[r[5]||(r[5]=a("div",{"i-solar:stop-circle-bold-duotone":""},null,-1)),a("span",null,k(s(d)("settings.pages.modules.speech.sections.section.playground.buttons.stop.label")),1)])])):R("",!0)]),x.apiKeyConfigured?R("",!0):(g(),b("div",Oe,k(s(d)("settings.pages.providers.provider.elevenlabs.playground.validation.error-missing-api-key")),1)),p.value?R("",!0):(g(),b("div",ze,k(s(d)("settings.pages.modules.speech.sections.section.playground.select-voice.required")),1)),c.value?(g(),b("div",Be,k(c.value),1)):R("",!0),t.value?(g(),b("audio",{key:5,ref_key:"audioPlayer",ref:f,src:t.value,controls:"",class:"mt-2 w-full"},null,8,Ke)):R("",!0)]),$(n.$slots,"default")]))}}),Fe={flex:"~ col md:row gap-6"},Ne={flex:"~ col gap-6"},je={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},Ee={flex:"~ col gap-4"},Ae={flex:"~ col gap-6",class:"w-full md:w-[60%]"},De={"w-full":"","rounded-xl":""},at=K({__name:"SpeechProviderSettings",props:{providerId:null,defaultModel:null,additionalSettings:null},setup(x){const o=x,{t:S}=q(),d=ae(),m=ce(),U=de(),{providers:t}=le(m),c=M(()=>m.getProviderMetadata(o.providerId)),f=M({get:()=>{var e;return((e=t.value[o.providerId])==null?void 0:e.apiKey)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].apiKey=e}}),i=M({get:()=>{var e,l,y;return((e=t.value[o.providerId])==null?void 0:e.baseUrl)||((y=(l=c.value)==null?void 0:l.defaultOptions)==null?void 0:y.baseUrl)||""},set:e=>{t.value[o.providerId]||(t.value[o.providerId]={}),t.value[o.providerId].baseUrl=e}}),h=u("Hello! This is a test of voice synthesis."),p=u(!1),_=u(""),I=u(""),n=u(null),r=u(!1),v=u(""),F=u(""),w=u({});function W(){var e;(e=t.value[o.providerId])!=null&&e.voiceSettings?w.value={...t.value[o.providerId].voiceSettings}:w.value={pitch:0,speed:1,volume:0,...o.additionalSettings}}se(()=>{var e,l,y,V;m.initializeProvider(o.providerId),f.value=((e=t.value[o.providerId])==null?void 0:e.apiKey)||"",i.value=((l=t.value[o.providerId])==null?void 0:l.baseUrl)||((V=(y=c.value)==null?void 0:y.defaultOptions)==null?void 0:V.baseUrl)||"",W(),m.configuredProviders[o.providerId]&&U.loadVoicesForProvider(o.providerId)});const z=ie(()=>{var e,l;t.value[o.providerId]={...t.value[o.providerId],apiKey:f.value,baseUrl:i.value||((l=(e=c.value)==null?void 0:e.defaultOptions)==null?void 0:l.baseUrl)||"",voiceSettings:{...w.value}}},1e3);B([f,i],z),B(w,z,{deep:!0});async function X(){if(!h.value.trim()&&!r.value||r.value&&!v.value.trim())return;const e=m.getProviderInstance(o.providerId);if(!e){console.error("Failed to initialize speech provider");return}if(!F.value){console.error("No active speech voice selected");return}p.value=!0,I.value="";try{_.value&&N();const l=o.defaultModel||"default",y=r.value?v.value:h.value,V=await ve({...e.speech(l,{voiceSettings:w.value}),input:y,voice:F.value});_.value=URL.createObjectURL(new Blob([V])),setTimeout(()=>{n.value&&n.value.play()},100)}catch(l){console.error("Error generating speech:",l),I.value=l instanceof Error?l.message:"An unknown error occurred"}finally{p.value=!1}}function N(){n.value&&(n.value.pause(),n.value.currentTime=0),_.value&&(URL.revokeObjectURL(_.value),_.value="")}J(()=>{_.value&&URL.revokeObjectURL(_.value)});function Q(){var e,l;w.value={...((l=(e=c.value)==null?void 0:e.defaultOptions)==null?void 0:l.voiceSettings)||{}},z()}function Y(e,l){w.value[e]=l}const j=M(()=>({voiceSettings:w.value,updateVoiceSettings:Y,isGenerating:p.value,testText:h.value,useSSML:r.value,ssmlText:v.value,generateTestSpeech:X,stopTestAudio:N,audioUrl:_.value,audioPlayer:n.value,errorMessage:I.value}));return(e,l)=>{var y,V;return g(),re(_e,{"provider-name":(y=c.value)==null?void 0:y.localizedName,"provider-icon":(V=c.value)==null?void 0:V.icon,"on-back":()=>s(d).back()},{default:C(()=>[a("div",Fe,[T(s(ge),{class:"w-full md:w-[40%]"},{default:C(()=>[T(s(be),{title:s(S)("settings.pages.providers.common.section.basic.title"),description:s(S)("settings.pages.providers.common.section.basic.description"),"on-reset":Q},{default:C(()=>{var L;return[T(s(fe),{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=P=>f.value=P),"provider-name":(L=c.value)==null?void 0:L.localizedName,placeholder:"sk-"},null,8,["modelValue","provider-name"]),$(e.$slots,"basic-settings")]}),_:3},8,["title","description"]),a("div",Ne,[a("h2",je,k(s(S)("settings.pages.providers.common.section.voice.title")),1),a("div",Ee,[$(e.$slots,"voice-settings",A(D(j.value)))])]),T(s(pe),{title:s(S)("settings.pages.providers.common.section.advanced.title")},{default:C(()=>{var L,P;return[T(s(me),{modelValue:i.value,"onUpdate:modelValue":l[1]||(l[1]=Z=>i.value=Z),placeholder:((P=(L=c.value)==null?void 0:L.defaultOptions)==null?void 0:P.baseUrl)||"",required:""},null,8,["modelValue","placeholder"]),$(e.$slots,"advanced-settings")]}),_:3},8,["title"])]),_:3}),a("div",Ae,[a("div",De,[$(e.$slots,"playground",A(D(j.value)))])])])]),_:3},8,["provider-name","provider-icon","on-back"])}}});export{ot as _,at as a}; diff --git a/assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js b/assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js similarity index 99% rename from assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js rename to assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js index 374b953451e244ec3da3dcfe8dbd08757b0beea2..f0370a463ea13297a4ef1f54ba77a0d885c56330 100644 --- a/assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js +++ b/assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-CUehHPTd.js","assets/index-5LjD1Eoi.js","assets/index-Bsn4xRdB.css","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/import-url-node-BfNoxhRr.js"])))=>i.map(i=>d[i]); -var Ix=Object.defineProperty;var Ex=(r,t,e)=>t in r?Ix(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var G=(r,t,e)=>Ex(r,typeof t!="symbol"?t+"":t,e);import{bp as Nh,cg as gi,bs as Cx,ch as ln}from"./index-5LjD1Eoi.js";/*! +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-node-E6uRkI3P.js","assets/index-DCMFRrFG.js","assets/index-Bsn4xRdB.css","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/import-url-node-BfNoxhRr.js"])))=>i.map(i=>d[i]); +var Ix=Object.defineProperty;var Ex=(r,t,e)=>t in r?Ix(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var G=(r,t,e)=>Ex(r,typeof t!="symbol"?t+"":t,e);import{bp as Nh,cg as gi,bs as Cx,ch as ln}from"./index-DCMFRrFG.js";/*! * @pixi/constants - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * @@ -3095,10 +3095,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE \0`,et+=s(C,2),et+=F.magic,et+=s(S,2),et+=s(E,2),et+=s(k.crc32,4),et+=s(k.compressedSize,4),et+=s(k.uncompressedSize,4),et+=s(z.length,2),et+=s(it.length,2),{fileRecord:h.LOCAL_FILE_HEADER+et+z+it,dirRecord:h.CENTRAL_FILE_HEADER+s($,2)+et+s(st.length,2)+"\0\0\0\0"+s(A,4)+s(d,4)+z+it+st}}var a=e("../utils"),l=e("../stream/GenericWorker"),u=e("../utf8"),c=e("../crc32"),h=e("../signature");function p(f,y,g,d){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=g,this.encodeFileName=d,this.streamFiles=f,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(p,l),p.prototype.push=function(f){var y=f.meta.percent||0,g=this.entriesCount,d=this._sources.length;this.accumulate?this.contentBuffer.push(f):(this.bytesWritten+=f.data.length,l.prototype.push.call(this,{data:f.data,meta:{currentFile:this.currentFile,percent:g?(y+100*(g-d-1))/g:100}}))},p.prototype.openedSource=function(f){this.currentSourceOffset=this.bytesWritten,this.currentFile=f.file.name;var y=this.streamFiles&&!f.file.dir;if(y){var g=o(f,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:g.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(f){this.accumulate=!1;var y=this.streamFiles&&!f.file.dir,g=o(f,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(g.dirRecord),y)this.push({data:function(d){return h.DATA_DESCRIPTOR+s(d.crc32,4)+s(d.compressedSize,4)+s(d.uncompressedSize,4)}(f),meta:{percent:100}});else for(this.push({data:g.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var f=this.bytesWritten,y=0;y=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},i.exports=o},{"../utils":32}],19:[function(e,i,n){var s=e("./Uint8ArrayReader");function o(a){s.call(this,a)}e("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},i.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,i,n){var s=e("./DataReader");function o(a){s.call(this,a)}e("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},i.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,i,n){var s=e("./ArrayReader");function o(a){s.call(this,a)}e("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},i.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,i,n){var s=e("../utils"),o=e("../support"),a=e("./ArrayReader"),l=e("./StringReader"),u=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");i.exports=function(h){var p=s.getTypeOf(h);return s.checkSupport(p),p!=="string"||o.uint8array?p==="nodebuffer"?new u(h):o.uint8array?new c(s.transformTo("uint8array",h)):new a(s.transformTo("array",h)):new l(h)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,i,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,i,n){var s=e("./GenericWorker"),o=e("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},i.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,i,n){var s=e("./GenericWorker"),o=e("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},i.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,i,n){var s=e("../utils"),o=e("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},i.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,i,n){var s=e("../utils"),o=e("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(c){u.dataIsReady=!0,u.data=c,u.max=c&&c.length||0,u.type=s.getTypeOf(c),u.isPaused||u._tickAndRepeat()},function(c){u.error(c)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},i.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,i,n){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l "+o:o}},i.exports=s},{}],29:[function(e,i,n){var s=e("../utils"),o=e("./ConvertWorker"),a=e("./GenericWorker"),l=e("../base64"),u=e("../support"),c=e("../external"),h=null;if(u.nodestream)try{h=e("../nodejs/NodejsStreamOutputAdapter")}catch{}function p(y,g){return new c.Promise(function(d,m){var _=[],S=y._internalType,E=y._outputType,b=y._mimeType;y.on("data",function(F,x){_.push(F),g&&g(x)}).on("error",function(F){_=[],m(F)}).on("end",function(){try{var F=function(x,z,B){switch(x){case"blob":return s.newBlob(s.transformTo("arraybuffer",z),B);case"base64":return l.encode(z);default:return s.transformTo(x,z)}}(E,function(x,z){var B,tt=0,st=null,I=0;for(B=0;B"u")n.blob=!1;else{var s=new ArrayBuffer(0);try{n.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),n.blob=o.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,i,n){for(var s=e("./utils"),o=e("./support"),a=e("./nodejsUtils"),l=e("./stream/GenericWorker"),u=new Array(256),c=0;c<256;c++)u[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;u[254]=u[254]=1;function h(){l.call(this,"utf-8 decode"),this.leftOver=null}function p(){l.call(this,"utf-8 encode")}n.utf8encode=function(f){return o.nodebuffer?a.newBufferFrom(f,"utf-8"):function(y){var g,d,m,_,S,E=y.length,b=0;for(_=0;_>>6:(d<65536?g[S++]=224|d>>>12:(g[S++]=240|d>>>18,g[S++]=128|d>>>12&63),g[S++]=128|d>>>6&63),g[S++]=128|63&d);return g}(f)},n.utf8decode=function(f){return o.nodebuffer?s.transformTo("nodebuffer",f).toString("utf-8"):function(y){var g,d,m,_,S=y.length,E=new Array(2*S);for(g=d=0;g>10&1023,E[d++]=56320|1023&m)}return E.length!==d&&(E.subarray?E=E.subarray(0,d):E.length=d),s.applyFromCharCode(E)}(f=s.transformTo(o.uint8array?"uint8array":"array",f))},s.inherits(h,l),h.prototype.processChunk=function(f){var y=s.transformTo(o.uint8array?"uint8array":"array",f.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var g=y;(y=new Uint8Array(g.length+this.leftOver.length)).set(this.leftOver,0),y.set(g,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var d=function(_,S){var E;for((S=S||_.length)>_.length&&(S=_.length),E=S-1;0<=E&&(192&_[E])==128;)E--;return E<0||E===0?S:E+u[_[E]]>S?E:S}(y),m=y;d!==y.length&&(o.uint8array?(m=y.subarray(0,d),this.leftOver=y.subarray(d,y.length)):(m=y.slice(0,d),this.leftOver=y.slice(d,y.length))),this.push({data:n.utf8decode(m),meta:f.meta})},h.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=h,s.inherits(p,l),p.prototype.processChunk=function(f){this.push({data:n.utf8encode(f.data),meta:f.meta})},n.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,i,n){var s=e("./support"),o=e("./base64"),a=e("./nodejsUtils"),l=e("./external");function u(g){return g}function c(g,d){for(var m=0;m>8;this.dir=!!(16&this.externalFileAttributes),f==0&&(this.dosPermissions=63&this.externalFileAttributes),f==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var f=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=f.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=f.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=f.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=f.readInt(4))}},readExtraFields:function(f){var y,g,d,m=f.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});f.index+4>>6:(f<65536?p[d++]=224|f>>>12:(p[d++]=240|f>>>18,p[d++]=128|f>>>12&63),p[d++]=128|f>>>6&63),p[d++]=128|63&f);return p},n.buf2binstring=function(h){return c(h,h.length)},n.binstring2buf=function(h){for(var p=new s.Buf8(h.length),f=0,y=p.length;f>10&1023,_[y++]=56320|1023&g)}return c(_,y)},n.utf8border=function(h,p){var f;for((p=p||h.length)>h.length&&(p=h.length),f=p-1;0<=f&&(192&h[f])==128;)f--;return f<0||f===0?p:f+l[h[f]]>p?f:p}},{"./common":41}],43:[function(e,i,n){i.exports=function(s,o,a,l){for(var u=65535&s|0,c=s>>>16&65535|0,h=0;a!==0;){for(a-=h=2e3>>1:o>>>1;a[l]=o}return a}();i.exports=function(o,a,l,u){var c=s,h=u+l;o^=-1;for(var p=u;p>>8^c[255&(o^a[p])];return-1^o}},{}],46:[function(e,i,n){var s,o=e("../utils/common"),a=e("./trees"),l=e("./adler32"),u=e("./crc32"),c=e("./messages"),h=0,p=4,f=0,y=-2,g=-1,d=4,m=2,_=8,S=9,E=286,b=30,F=19,x=2*E+1,z=15,B=3,tt=258,st=tt+B+1,I=42,Z=113,w=1,it=2,M=3,O=4;function D(v,K){return v.msg=c[K],K}function U(v){return(v<<1)-(4v.avail_out&&(q=v.avail_out),q!==0&&(o.arraySet(v.output,K.pending_buf,K.pending_out,q,v.next_out),v.next_out+=q,K.pending_out+=q,v.total_out+=q,v.avail_out-=q,K.pending-=q,K.pending===0&&(K.pending_out=0))}function A(v,K){a._tr_flush_block(v,0<=v.block_start?v.block_start:-1,v.strstart-v.block_start,K),v.block_start=v.strstart,C(v.strm)}function $(v,K){v.pending_buf[v.pending++]=K}function et(v,K){v.pending_buf[v.pending++]=K>>>8&255,v.pending_buf[v.pending++]=255&K}function J(v,K){var q,N,R=v.max_chain_length,Y=v.strstart,ot=v.prev_length,at=v.nice_match,rt=v.strstart>v.w_size-st?v.strstart-(v.w_size-st):0,ht=v.window,bt=v.w_mask,pt=v.prev,Ot=v.strstart+tt,ye=ht[Y+ot-1],oe=ht[Y+ot];v.prev_length>=v.good_match&&(R>>=2),at>v.lookahead&&(at=v.lookahead);do if(ht[(q=K)+ot]===oe&&ht[q+ot-1]===ye&&ht[q]===ht[Y]&&ht[++q]===ht[Y+1]){Y+=2,q++;do;while(ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&ht[++Y]===ht[++q]&&Yrt&&--R!=0);return ot<=v.lookahead?ot:v.lookahead}function yt(v){var K,q,N,R,Y,ot,at,rt,ht,bt,pt=v.w_size;do{if(R=v.window_size-v.lookahead-v.strstart,v.strstart>=pt+(pt-st)){for(o.arraySet(v.window,v.window,pt,pt,0),v.match_start-=pt,v.strstart-=pt,v.block_start-=pt,K=q=v.hash_size;N=v.head[--K],v.head[K]=pt<=N?N-pt:0,--q;);for(K=q=pt;N=v.prev[--K],v.prev[K]=pt<=N?N-pt:0,--q;);R+=pt}if(v.strm.avail_in===0)break;if(ot=v.strm,at=v.window,rt=v.strstart+v.lookahead,ht=R,bt=void 0,bt=ot.avail_in,ht=B)for(Y=v.strstart-v.insert,v.ins_h=v.window[Y],v.ins_h=(v.ins_h<=B&&(v.ins_h=(v.ins_h<=B)if(N=a._tr_tally(v,v.strstart-v.match_start,v.match_length-B),v.lookahead-=v.match_length,v.match_length<=v.max_lazy_match&&v.lookahead>=B){for(v.match_length--;v.strstart++,v.ins_h=(v.ins_h<=B&&(v.ins_h=(v.ins_h<=B&&v.match_length<=v.prev_length){for(R=v.strstart+v.lookahead-B,N=a._tr_tally(v,v.strstart-1-v.prev_match,v.prev_length-B),v.lookahead-=v.prev_length-1,v.prev_length-=2;++v.strstart<=R&&(v.ins_h=(v.ins_h<v.pending_buf_size-5&&(q=v.pending_buf_size-5);;){if(v.lookahead<=1){if(yt(v),v.lookahead===0&&K===h)return w;if(v.lookahead===0)break}v.strstart+=v.lookahead,v.lookahead=0;var N=v.block_start+q;if((v.strstart===0||v.strstart>=N)&&(v.lookahead=v.strstart-N,v.strstart=N,A(v,!1),v.strm.avail_out===0)||v.strstart-v.block_start>=v.w_size-st&&(A(v,!1),v.strm.avail_out===0))return w}return v.insert=0,K===p?(A(v,!0),v.strm.avail_out===0?M:O):(v.strstart>v.block_start&&(A(v,!1),v.strm.avail_out),w)}),new _t(4,4,8,4,vt),new _t(4,5,16,8,vt),new _t(4,6,32,32,vt),new _t(4,4,16,16,dt),new _t(8,16,32,32,dt),new _t(8,16,128,128,dt),new _t(8,32,128,256,dt),new _t(32,128,258,1024,dt),new _t(32,258,258,4096,dt)],n.deflateInit=function(v,K){return he(v,K,_,15,8,0)},n.deflateInit2=he,n.deflateReset=ee,n.deflateResetKeep=Ct,n.deflateSetHeader=function(v,K){return v&&v.state?v.state.wrap!==2?y:(v.state.gzhead=K,f):y},n.deflate=function(v,K){var q,N,R,Y;if(!v||!v.state||5>8&255),$(N,N.gzhead.time>>16&255),$(N,N.gzhead.time>>24&255),$(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),$(N,255&N.gzhead.os),N.gzhead.extra&&N.gzhead.extra.length&&($(N,255&N.gzhead.extra.length),$(N,N.gzhead.extra.length>>8&255)),N.gzhead.hcrc&&(v.adler=u(v.adler,N.pending_buf,N.pending,0)),N.gzindex=0,N.status=69):($(N,0),$(N,0),$(N,0),$(N,0),$(N,0),$(N,N.level===9?2:2<=N.strategy||N.level<2?4:0),$(N,3),N.status=Z);else{var ot=_+(N.w_bits-8<<4)<<8;ot|=(2<=N.strategy||N.level<2?0:N.level<6?1:N.level===6?2:3)<<6,N.strstart!==0&&(ot|=32),ot+=31-ot%31,N.status=Z,et(N,ot),N.strstart!==0&&(et(N,v.adler>>>16),et(N,65535&v.adler)),v.adler=1}if(N.status===69)if(N.gzhead.extra){for(R=N.pending;N.gzindex<(65535&N.gzhead.extra.length)&&(N.pending!==N.pending_buf_size||(N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),C(v),R=N.pending,N.pending!==N.pending_buf_size));)$(N,255&N.gzhead.extra[N.gzindex]),N.gzindex++;N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),N.gzindex===N.gzhead.extra.length&&(N.gzindex=0,N.status=73)}else N.status=73;if(N.status===73)if(N.gzhead.name){R=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),C(v),R=N.pending,N.pending===N.pending_buf_size)){Y=1;break}Y=N.gzindexR&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),Y===0&&(N.gzindex=0,N.status=91)}else N.status=91;if(N.status===91)if(N.gzhead.comment){R=N.pending;do{if(N.pending===N.pending_buf_size&&(N.gzhead.hcrc&&N.pending>R&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),C(v),R=N.pending,N.pending===N.pending_buf_size)){Y=1;break}Y=N.gzindexR&&(v.adler=u(v.adler,N.pending_buf,N.pending-R,R)),Y===0&&(N.status=103)}else N.status=103;if(N.status===103&&(N.gzhead.hcrc?(N.pending+2>N.pending_buf_size&&C(v),N.pending+2<=N.pending_buf_size&&($(N,255&v.adler),$(N,v.adler>>8&255),v.adler=0,N.status=Z)):N.status=Z),N.pending!==0){if(C(v),v.avail_out===0)return N.last_flush=-1,f}else if(v.avail_in===0&&U(K)<=U(q)&&K!==p)return D(v,-5);if(N.status===666&&v.avail_in!==0)return D(v,-5);if(v.avail_in!==0||N.lookahead!==0||K!==h&&N.status!==666){var at=N.strategy===2?function(rt,ht){for(var bt;;){if(rt.lookahead===0&&(yt(rt),rt.lookahead===0)){if(ht===h)return w;break}if(rt.match_length=0,bt=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++,bt&&(A(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===p?(A(rt,!0),rt.strm.avail_out===0?M:O):rt.last_lit&&(A(rt,!1),rt.strm.avail_out===0)?w:it}(N,K):N.strategy===3?function(rt,ht){for(var bt,pt,Ot,ye,oe=rt.window;;){if(rt.lookahead<=tt){if(yt(rt),rt.lookahead<=tt&&ht===h)return w;if(rt.lookahead===0)break}if(rt.match_length=0,rt.lookahead>=B&&0rt.lookahead&&(rt.match_length=rt.lookahead)}if(rt.match_length>=B?(bt=a._tr_tally(rt,1,rt.match_length-B),rt.lookahead-=rt.match_length,rt.strstart+=rt.match_length,rt.match_length=0):(bt=a._tr_tally(rt,0,rt.window[rt.strstart]),rt.lookahead--,rt.strstart++),bt&&(A(rt,!1),rt.strm.avail_out===0))return w}return rt.insert=0,ht===p?(A(rt,!0),rt.strm.avail_out===0?M:O):rt.last_lit&&(A(rt,!1),rt.strm.avail_out===0)?w:it}(N,K):s[N.level].func(N,K);if(at!==M&&at!==O||(N.status=666),at===w||at===M)return v.avail_out===0&&(N.last_flush=-1),f;if(at===it&&(K===1?a._tr_align(N):K!==5&&(a._tr_stored_block(N,0,0,!1),K===3&&(k(N.head),N.lookahead===0&&(N.strstart=0,N.block_start=0,N.insert=0))),C(v),v.avail_out===0))return N.last_flush=-1,f}return K!==p?f:N.wrap<=0?1:(N.wrap===2?($(N,255&v.adler),$(N,v.adler>>8&255),$(N,v.adler>>16&255),$(N,v.adler>>24&255),$(N,255&v.total_in),$(N,v.total_in>>8&255),$(N,v.total_in>>16&255),$(N,v.total_in>>24&255)):(et(N,v.adler>>>16),et(N,65535&v.adler)),C(v),0=q.w_size&&(Y===0&&(k(q.head),q.strstart=0,q.block_start=0,q.insert=0),ht=new o.Buf8(q.w_size),o.arraySet(ht,K,bt-q.w_size,q.w_size,0),K=ht,bt=q.w_size),ot=v.avail_in,at=v.next_in,rt=v.input,v.avail_in=bt,v.next_in=0,v.input=K,yt(q);q.lookahead>=B;){for(N=q.strstart,R=q.lookahead-(B-1);q.ins_h=(q.ins_h<>>=B=z>>>24,S-=B,(B=z>>>16&255)===0)it[c++]=65535&z;else{if(!(16&B)){if((64&B)==0){z=E[(65535&z)+(_&(1<>>=B,S-=B),S<15&&(_+=w[l++]<>>=B=z>>>24,S-=B,!(16&(B=z>>>16&255))){if((64&B)==0){z=b[(65535&z)+(_&(1<>>=B,S-=B,(B=c-h)>3,_&=(1<<(S-=tt<<3))-1,s.next_in=l,s.next_out=c,s.avail_in=l>>24&255)+(I>>>8&65280)+((65280&I)<<8)+((255&I)<<24)}function _(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(I){var Z;return I&&I.state?(Z=I.state,I.total_in=I.total_out=Z.total=0,I.msg="",Z.wrap&&(I.adler=1&Z.wrap),Z.mode=y,Z.last=0,Z.havedict=0,Z.dmax=32768,Z.head=null,Z.hold=0,Z.bits=0,Z.lencode=Z.lendyn=new s.Buf32(g),Z.distcode=Z.distdyn=new s.Buf32(d),Z.sane=1,Z.back=-1,p):f}function E(I){var Z;return I&&I.state?((Z=I.state).wsize=0,Z.whave=0,Z.wnext=0,S(I)):f}function b(I,Z){var w,it;return I&&I.state?(it=I.state,Z<0?(w=0,Z=-Z):(w=1+(Z>>4),Z<48&&(Z&=15)),Z&&(Z<8||15=O.wsize?(s.arraySet(O.window,Z,w-O.wsize,O.wsize,0),O.wnext=0,O.whave=O.wsize):(it<(M=O.wsize-O.wnext)&&(M=it),s.arraySet(O.window,Z,w-it,M,O.wnext),(it-=M)?(s.arraySet(O.window,Z,w-it,it,0),O.wnext=it,O.whave=O.wsize):(O.wnext+=M,O.wnext===O.wsize&&(O.wnext=0),O.whave>>8&255,w.check=a(w.check,Y,2,0),A=C=0,w.mode=2;break}if(w.flags=0,w.head&&(w.head.done=!1),!(1&w.wrap)||(((255&C)<<8)+(C>>8))%31){I.msg="incorrect header check",w.mode=30;break}if((15&C)!=8){I.msg="unknown compression method",w.mode=30;break}if(A-=4,v=8+(15&(C>>>=4)),w.wbits===0)w.wbits=v;else if(v>w.wbits){I.msg="invalid window size",w.mode=30;break}w.dmax=1<>8&1),512&w.flags&&(Y[0]=255&C,Y[1]=C>>>8&255,w.check=a(w.check,Y,2,0)),A=C=0,w.mode=3;case 3:for(;A<32;){if(U===0)break t;U--,C+=it[O++]<>>8&255,Y[2]=C>>>16&255,Y[3]=C>>>24&255,w.check=a(w.check,Y,4,0)),A=C=0,w.mode=4;case 4:for(;A<16;){if(U===0)break t;U--,C+=it[O++]<>8),512&w.flags&&(Y[0]=255&C,Y[1]=C>>>8&255,w.check=a(w.check,Y,2,0)),A=C=0,w.mode=5;case 5:if(1024&w.flags){for(;A<16;){if(U===0)break t;U--,C+=it[O++]<>>8&255,w.check=a(w.check,Y,2,0)),A=C=0}else w.head&&(w.head.extra=null);w.mode=6;case 6:if(1024&w.flags&&(U<(J=w.length)&&(J=U),J&&(w.head&&(v=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),s.arraySet(w.head.extra,it,O,J,v)),512&w.flags&&(w.check=a(w.check,it,J,O)),U-=J,O+=J,w.length-=J),w.length))break t;w.length=0,w.mode=7;case 7:if(2048&w.flags){if(U===0)break t;for(J=0;v=it[O+J++],w.head&&v&&w.length<65536&&(w.head.name+=String.fromCharCode(v)),v&&J>9&1,w.head.done=!0),I.adler=w.check=0,w.mode=12;break;case 10:for(;A<32;){if(U===0)break t;U--,C+=it[O++]<>>=7&A,A-=7&A,w.mode=27;break}for(;A<3;){if(U===0)break t;U--,C+=it[O++]<>>=1)){case 0:w.mode=14;break;case 1:if(tt(w),w.mode=20,Z!==6)break;C>>>=2,A-=2;break t;case 2:w.mode=17;break;case 3:I.msg="invalid block type",w.mode=30}C>>>=2,A-=2;break;case 14:for(C>>>=7&A,A-=7&A;A<32;){if(U===0)break t;U--,C+=it[O++]<>>16^65535)){I.msg="invalid stored block lengths",w.mode=30;break}if(w.length=65535&C,A=C=0,w.mode=15,Z===6)break t;case 15:w.mode=16;case 16:if(J=w.length){if(U>>=5,A-=5,w.ndist=1+(31&C),C>>>=5,A-=5,w.ncode=4+(15&C),C>>>=4,A-=4,286>>=3,A-=3}for(;w.have<19;)w.lens[ot[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,q={bits:w.lenbits},K=u(0,w.lens,0,19,w.lencode,0,w.work,q),w.lenbits=q.bits,K){I.msg="invalid code lengths set",w.mode=30;break}w.have=0,w.mode=19;case 19:for(;w.have>>16&255,gt=65535&R,!((dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>>=dt,A-=dt,w.lens[w.have++]=gt;else{if(gt===16){for(N=dt+2;A>>=dt,A-=dt,w.have===0){I.msg="invalid bit length repeat",w.mode=30;break}v=w.lens[w.have-1],J=3+(3&C),C>>>=2,A-=2}else if(gt===17){for(N=dt+3;A>>=dt)),C>>>=3,A-=3}else{for(N=dt+7;A>>=dt)),C>>>=7,A-=7}if(w.have+J>w.nlen+w.ndist){I.msg="invalid bit length repeat",w.mode=30;break}for(;J--;)w.lens[w.have++]=v}}if(w.mode===30)break;if(w.lens[256]===0){I.msg="invalid code -- missing end-of-block",w.mode=30;break}if(w.lenbits=9,q={bits:w.lenbits},K=u(c,w.lens,0,w.nlen,w.lencode,0,w.work,q),w.lenbits=q.bits,K){I.msg="invalid literal/lengths set",w.mode=30;break}if(w.distbits=6,w.distcode=w.distdyn,q={bits:w.distbits},K=u(h,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,q),w.distbits=q.bits,K){I.msg="invalid distances set",w.mode=30;break}if(w.mode=20,Z===6)break t;case 20:w.mode=21;case 21:if(6<=U&&258<=k){I.next_out=D,I.avail_out=k,I.next_in=O,I.avail_in=U,w.hold=C,w.bits=A,l(I,et),D=I.next_out,M=I.output,k=I.avail_out,O=I.next_in,it=I.input,U=I.avail_in,C=w.hold,A=w.bits,w.mode===12&&(w.back=-1);break}for(w.back=0;_t=(R=w.lencode[C&(1<>>16&255,gt=65535&R,!((dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>Ct)])>>>16&255,gt=65535&R,!(Ct+(dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>>=Ct,A-=Ct,w.back+=Ct}if(C>>>=dt,A-=dt,w.back+=dt,w.length=gt,_t===0){w.mode=26;break}if(32&_t){w.back=-1,w.mode=12;break}if(64&_t){I.msg="invalid literal/length code",w.mode=30;break}w.extra=15&_t,w.mode=22;case 22:if(w.extra){for(N=w.extra;A>>=w.extra,A-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=23;case 23:for(;_t=(R=w.distcode[C&(1<>>16&255,gt=65535&R,!((dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>Ct)])>>>16&255,gt=65535&R,!(Ct+(dt=R>>>24)<=A);){if(U===0)break t;U--,C+=it[O++]<>>=Ct,A-=Ct,w.back+=Ct}if(C>>>=dt,A-=dt,w.back+=dt,64&_t){I.msg="invalid distance code",w.mode=30;break}w.offset=gt,w.extra=15&_t,w.mode=24;case 24:if(w.extra){for(N=w.extra;A>>=w.extra,A-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){I.msg="invalid distance too far back",w.mode=30;break}w.mode=25;case 25:if(k===0)break t;if(J=et-k,w.offset>J){if((J=w.offset-J)>w.whave&&w.sane){I.msg="invalid distance too far back",w.mode=30;break}yt=J>w.wnext?(J-=w.wnext,w.wsize-J):w.wnext-J,J>w.length&&(J=w.length),vt=w.window}else vt=M,yt=D-w.offset,J=w.length;for(kx?(B=yt[vt+d[Z]],A[$+d[Z]]):(B=96,0),_=1<>D)+(S-=_)]=z<<24|B<<16|tt|0,S!==0;);for(_=1<>=1;if(_!==0?(C&=_-1,C+=_):C=0,Z++,--et[I]==0){if(I===it)break;I=h[p+d[Z]]}if(M>>7)]}function $(R,Y){R.pending_buf[R.pending++]=255&Y,R.pending_buf[R.pending++]=Y>>>8&255}function et(R,Y,ot){R.bi_valid>m-ot?(R.bi_buf|=Y<>m-R.bi_valid,R.bi_valid+=ot-m):(R.bi_buf|=Y<>>=1,ot<<=1,0<--Y;);return ot>>>1}function vt(R,Y,ot){var at,rt,ht=new Array(d+1),bt=0;for(at=1;at<=d;at++)ht[at]=bt=bt+ot[at-1]<<1;for(rt=0;rt<=Y;rt++){var pt=R[2*rt+1];pt!==0&&(R[2*rt]=yt(ht[pt]++,pt))}}function dt(R){var Y;for(Y=0;Y>1;1<=ot;ot--)Ct(R,ht,ot);for(rt=Ot;ot=R.heap[1],R.heap[1]=R.heap[R.heap_len--],Ct(R,ht,1),at=R.heap[1],R.heap[--R.heap_max]=ot,R.heap[--R.heap_max]=at,ht[2*rt]=ht[2*ot]+ht[2*at],R.depth[rt]=(R.depth[ot]>=R.depth[at]?R.depth[ot]:R.depth[at])+1,ht[2*ot+1]=ht[2*at+1]=rt,R.heap[1]=rt++,Ct(R,ht,1),2<=R.heap_len;);R.heap[--R.heap_max]=R.heap[1],function(oe,ir){var Ki,vr,Zi,Ae,Ji,ao,Qr=ir.dyn_tree,fs=ir.max_code,ma=ir.stat_desc.static_tree,hu=ir.stat_desc.has_stree,si=ir.stat_desc.extra_bits,ya=ir.stat_desc.extra_base,In=ir.stat_desc.max_length,En=0;for(Ae=0;Ae<=d;Ae++)oe.bl_count[Ae]=0;for(Qr[2*oe.heap[oe.heap_max]+1]=0,Ki=oe.heap_max+1;Ki>=7;rt>>=1)if(1&ye&&pt.dyn_ltree[2*Ot]!==0)return o;if(pt.dyn_ltree[18]!==0||pt.dyn_ltree[20]!==0||pt.dyn_ltree[26]!==0)return a;for(Ot=32;Ot>>3,(ht=R.static_len+3+7>>>3)<=rt&&(rt=ht)):rt=ht=ot+5,ot+4<=rt&&Y!==-1?N(R,Y,ot,at):R.strategy===4||ht===rt?(et(R,2+(at?1:0),3),ee(R,st,I)):(et(R,4+(at?1:0),3),function(pt,Ot,ye,oe){var ir;for(et(pt,Ot-257,5),et(pt,ye-1,5),et(pt,oe-4,4),ir=0;ir>>8&255,R.pending_buf[R.d_buf+2*R.last_lit+1]=255&Y,R.pending_buf[R.l_buf+R.last_lit]=255&ot,R.last_lit++,Y===0?R.dyn_ltree[2*ot]++:(R.matches++,Y--,R.dyn_ltree[2*(w[ot]+h+1)]++,R.dyn_dtree[2*A(Y)]++),R.last_lit===R.lit_bufsize-1},n._tr_align=function(R){et(R,2,3),J(R,S,st),function(Y){Y.bi_valid===16?($(Y,Y.bi_buf),Y.bi_buf=0,Y.bi_valid=0):8<=Y.bi_valid&&(Y.pending_buf[Y.pending++]=255&Y.bi_buf,Y.bi_buf>>=8,Y.bi_valid-=8)}(R)}},{"../utils/common":41}],53:[function(e,i,n){i.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,i,n){(function(s){(function(o,a){if(!o.setImmediate){var l,u,c,h,p=1,f={},y=!1,g=o.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(o);d=d&&d.setTimeout?d:o,l={}.toString.call(o.process)==="[object process]"?function(E){process.nextTick(function(){_(E)})}:function(){if(o.postMessage&&!o.importScripts){var E=!0,b=o.onmessage;return o.onmessage=function(){E=!1},o.postMessage("","*"),o.onmessage=b,E}}()?(h="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",S,!1):o.attachEvent("onmessage",S),function(E){o.postMessage(h+E,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(E){_(E.data)},function(E){c.port2.postMessage(E)}):g&&"onreadystatechange"in g.createElement("script")?(u=g.documentElement,function(E){var b=g.createElement("script");b.onreadystatechange=function(){_(E),b.onreadystatechange=null,u.removeChild(b),b=null},u.appendChild(b)}):function(E){setTimeout(_,0,E)},d.setImmediate=function(E){typeof E!="function"&&(E=new Function(""+E));for(var b=new Array(arguments.length-1),F=0;F"u"?s===void 0?this:s:self)}).call(this,typeof gi<"u"?gi:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}(Gu)),Gu.exports}var dC=fC();const pC=Nh(dC);Ai.zipReader=(r,t)=>pC.loadAsync(r);const mC=Ai.createSettings;Ai.createSettings=async r=>{const t=Object.keys(r.files);return t.find(e=>yC(e))?mC(r):_C(t)};function yC(r){return r.endsWith("model3.json")}function gC(r){return r.endsWith(".moc3")}function vC(r){return r.split(/[\\/]/).pop()}function _C(r){const t=r.filter(u=>gC(u));if(t.length!==1){const u=t.length?`(${t.map(c=>`"${c}"`).join(",")})`:"";throw new Error(`Expected exactly one moc file, got ${t.length} ${u}`)}const e=t[0],i=vC(e).replace(/\.moc3?/,""),n=r.filter(u=>u.endsWith(".png"));if(!n.length)throw new Error("Textures not found");const s=r.filter(u=>u.endsWith(".mtn")||u.endsWith(".motion3.json")),o=r.find(u=>u.includes("physics")),a=r.find(u=>u.includes("pose")),l=new Jn({url:`${i}.model3.json`,Version:3,FileReferences:{Moc:e,Textures:n,Physics:o,Pose:a,Motions:s.length?{"":s.map(u=>({File:u}))}:void 0}});return l.name=i,l._objectURL=`example://${l.url}`,l}Ai.readText=(r,t)=>{const e=r.file(t);if(!e)throw new Error(`Cannot find file: ${t}`);return e.async("text")};Ai.getFilePaths=r=>{const t=[];return r.forEach(e=>t.push(e)),Promise.resolve(t)};Ai.getFiles=(r,t)=>Promise.all(t.map(async e=>{const i=e.slice(e.lastIndexOf("/")+1),n=await r.file(e).async("blob");return new File([n],i)}));function Zt(r,t,e,i){function n(s){return s instanceof e?s:new e(function(o){o(s)})}return new(e||(e=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):n(c.value).then(a,l)}u((i=i.apply(r,t||[])).next())})}function up(r){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&r[t],i=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pt(r){return this instanceof Pt?(this.v=r,this):new Pt(r)}function dr(r,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(r,t||[]),n,s=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",o),n[Symbol.asyncIterator]=function(){return this},n;function o(f){return function(y){return Promise.resolve(y).then(f,h)}}function a(f,y){i[f]&&(n[f]=function(g){return new Promise(function(d,m){s.push([f,g,d,m])>1||l(f,g)})},y&&(n[f]=y(n[f])))}function l(f,y){try{u(i[f](y))}catch(g){p(s[0][3],g)}}function u(f){f.value instanceof Pt?Promise.resolve(f.value.v).then(c,h):p(s[0][2],f)}function c(f){l("next",f)}function h(f){l("throw",f)}function p(f,y){f(y),s.shift(),s.length&&l(s[0][0],s[0][1])}}function ts(r){var t,e;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,s){t[n]=r[n]?function(o){return(e=!e)?{value:Pt(r[n](o)),done:!1}:s?s(o):o}:s}}function bi(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=r[Symbol.asyncIterator],e;return t?t.call(r):(r=typeof up=="function"?up(r):r[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(s){e[s]=r[s]&&function(o){return new Promise(function(a,l){o=r[s](o),n(a,l,o.done,o.value)})}}function n(s,o,a,l){Promise.resolve(l).then(function(u){s({value:u,done:a})},o)}}const bC=new TextDecoder("utf-8"),eh=r=>bC.decode(r),wC=new TextEncoder,ef=r=>wC.encode(r),xC=r=>typeof r=="number",_v=r=>typeof r=="boolean",Ge=r=>typeof r=="function",pr=r=>r!=null&&Object(r)===r,rs=r=>pr(r)&&Ge(r.then),oa=r=>pr(r)&&Ge(r[Symbol.iterator]),no=r=>pr(r)&&Ge(r[Symbol.asyncIterator]),rh=r=>pr(r)&&pr(r.schema),bv=r=>pr(r)&&"done"in r&&"value"in r,wv=r=>pr(r)&&Ge(r.stat)&&xC(r.fd),xv=r=>pr(r)&&rf(r.body),tu=r=>"_getDOMStream"in r&&"_getNodeStream"in r,SC=r=>pr(r)&&Ge(r.abort)&&Ge(r.getWriter)&&!tu(r),rf=r=>pr(r)&&Ge(r.cancel)&&Ge(r.getReader)&&!tu(r),TC=r=>pr(r)&&Ge(r.end)&&Ge(r.write)&&_v(r.writable)&&!tu(r),Sv=r=>pr(r)&&Ge(r.read)&&Ge(r.pipe)&&_v(r.readable)&&!tu(r),IC=r=>pr(r)&&Ge(r.clear)&&Ge(r.bytes)&&Ge(r.position)&&Ge(r.setPosition)&&Ge(r.capacity)&&Ge(r.getBufferIdentifier)&&Ge(r.createLong),nf=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function EC(r){const t=r[0]?[r[0]]:[];let e,i,n,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let n,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,i);for(const c=e.length;++l_e(Int32Array,r),hp=r=>_e(BigInt64Array,r),ae=r=>_e(Uint8Array,r),ih=r=>(r.next(),r);function*CC(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof nf?e(t):oa(t)?t:e(t);return yield*ih(function*(n){let s=null;do s=n.next(yield _e(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const AC=r=>CC(Uint8Array,r);function Tv(r,t){return dr(this,arguments,function*(){if(rs(t))return yield Pt(yield Pt(yield*ts(bi(Tv(r,yield Pt(t))))));const i=function(o){return dr(this,arguments,function*(){yield yield Pt(yield Pt(o))})},n=function(o){return dr(this,arguments,function*(){yield Pt(yield*ts(bi(ih(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof nf?i(t):oa(t)?n(t):no(t)?t:i(t);return yield Pt(yield*ts(bi(ih(function(o){return dr(this,arguments,function*(){let a=null;do a=yield Pt(o.next(yield yield Pt(_e(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Pt(new r)})}const OC=r=>Tv(Uint8Array,r);function Iv(r,t,e){if(r!==0){e=e.slice(0,t);for(let i=-1,n=e.length;++i0)do if(r[e]!==t[e])return!1;while(++e(r.next(),r);function*PC(r){let t,e=!1,i=[],n,s,o,a=0;function l(){return s==="peek"?xi(i,o)[0]:([n,i,a]=xi(i,o),n)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const u=AC(r)[Symbol.iterator]();try{do if({done:t,value:n}=Number.isNaN(o-a)?u.next():u.next(o-a),!t&&n.byteLength>0&&(i.push(n),a+=n.byteLength),t||o<=a)do({cmd:s,size:o}=yield l());while(o0&&(n.push(s),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Pt(u()));while(a0&&(n.push(ae(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Pt(u()));while(a{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return Zt(this,void 0,void 0,function*(){const{reader:e,source:i}=this;e&&(yield e.cancel(t).catch(()=>{})),i&&i.locked&&this.releaseLock()})}read(t){return Zt(this,void 0,void 0,function*(){if(t===0)return{done:this.reader==null,value:new Uint8Array(0)};const e=yield this.reader.read();return!e.done&&(e.value=ae(e)),e})}}const Wu=(r,t)=>{const e=n=>i([t,n]);let i;return[t,e,new Promise(n=>(i=n)&&r.once(t,e))]};function NC(r){return dr(this,arguments,function*(){const e=[];let i="error",n=!1,s=null,o,a,l=0,u=[],c;function h(){return o==="peek"?xi(u,a)[0]:([c,u,l]=xi(u,a),c)}if({cmd:o,size:a}=(yield yield Pt(null))||{cmd:"read",size:0},r.isTTY)return yield yield Pt(new Uint8Array(0)),yield Pt(null);try{e[0]=Wu(r,"end"),e[1]=Wu(r,"error");do{if(e[2]=Wu(r,"readable"),[i,s]=yield Pt(Promise.race(e.map(f=>f[2]))),i==="error")break;if((n=i==="end")||(Number.isFinite(a-l)?(c=ae(r.read(a-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),n||a<=l)do({cmd:o,size:a}=yield yield Pt(h()));while(a{for(const[m,_]of f)r.off(m,_);try{const m=r.destroy;m&&m.call(r,y),y=void 0}catch(m){y=m||y}finally{y!=null?d(y):g()}})}})}var ke;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(ke||(ke={}));var er;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(er||(er={}));var tr;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(tr||(tr={}));var Hr;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(Hr||(Hr={}));var zt;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(zt||(zt={}));var Si;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME",r[r.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Si||(Si={}));const Hu=2,pi=4,ji=4,me=4,on=new Int32Array(2),fp=new Float32Array(on.buffer),dp=new Float64Array(on.buffer),Na=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var nh;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(nh||(nh={}));let Qs=class Ev{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new Ev(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){fp[0]=e,this.writeInt32(t,on[0])}writeFloat64(t,e){dp[0]=e,this.writeInt32(t,on[Na?0:1]),this.writeInt32(t+4,on[Na?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);const i=~(this.bb.capacity()-this.space+e)+1&t-1;for(;this.space=0&&this.vtable[e]==0;e--);const i=e+1;for(;e>=0;e--)this.addInt16(this.vtable[e]!=0?t-this.vtable[e]:0);const n=2;this.addInt16(t-this.object_start);const s=(i+n)*Hu;this.addInt16(s);let o=0;const a=this.space;t:for(e=0;e=0;o--)this.writeInt8(s.charCodeAt(o))}this.prep(this.minalign,pi+n),this.addOffset(t),n&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,e){this.finish(t,e,!0)}requiredField(t,e){const i=this.bb.capacity()-t,n=i-this.bb.readInt32(i);if(!(e=0;i--)t.addInt32(e[i]);return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,i){return hr.startUnion(t),hr.addMode(t,e),hr.addTypeIds(t,i),hr.endUnion(t)}}let bp=class Fo{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(t,e){return(e||new Fo).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+me),(e||new Fo).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return Fo.startUtf8(t),Fo.endUtf8(t)}};var xe;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList",r[r.RunEndEncoded=22]="RunEndEncoded"})(xe||(xe={}));let Nr=class Ga{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(t,e){return(e||new Ga).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+me),(e||new Ga).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}nullable(){const t=this.bb.__offset(this.bb_pos,6);return t?!!this.bb.readInt8(this.bb_pos+t):!1}typeType(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):xe.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__union(t,this.bb_pos+e):null}dictionary(t){const e=this.bb.__offset(this.bb_pos,12);return e?(t||new $i).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(t,e){const i=this.bb.__offset(this.bb_pos,14);return i?(e||new Ga).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const i=this.bb.__offset(this.bb_pos,16);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,xe.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},ui=class Mi{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(t,e){return(e||new Mi).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+me),(e||new Mi).__init(t.readInt32(t.position())+t.position(),t)}endianness(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):Ks.Little}fields(t,e){const i=this.bb.__offset(this.bb_pos,6);return i?(e||new Nr).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const i=this.bb.__offset(this.bb_pos,8);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+t*8):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,Ks.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8);for(let i=e.length-1;i>=0;i--)t.addInt64(e[i]);return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(t,e,i,n,s){return Mi.startSchema(t),Mi.addEndianness(t,e),Mi.addFields(t,i),Mi.addCustomMetadata(t,n),Mi.addFeatures(t,s),Mi.endSchema(t)}};var fe;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(fe||(fe={}));var L;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth",r[r.DurationSecond=-27]="DurationSecond",r[r.DurationMillisecond=-28]="DurationMillisecond",r[r.DurationMicrosecond=-29]="DurationMicrosecond",r[r.DurationNanosecond=-30]="DurationNanosecond"})(L||(L={}));var ki;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(ki||(ki={}));const LC=void 0;function Xo(r){if(r===null)return"null";if(r===LC)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?r instanceof BigInt64Array||r instanceof BigUint64Array?`[${[...r].map(t=>Xo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}function we(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function Pv(r,t){return we(r/t)+we(r%t)/we(t)}const BC=Symbol.for("isArrowBigNum");function ri(r,...t){return t.length===0?Object.setPrototypeOf(_e(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}ri.prototype[BC]=!0;ri.prototype.toJSON=function(){return`"${qo(this)}"`};ri.prototype.valueOf=function(r){return Mv(this,r)};ri.prototype.toString=function(){return qo(this)};ri.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Mv(this);case"string":return qo(this);case"default":return zC(this)}return qo(this)};function zs(...r){return ri.apply(this,r)}function js(...r){return ri.apply(this,r)}function Yo(...r){return ri.apply(this,r)}Object.setPrototypeOf(zs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(js.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Yo.prototype,Object.create(Uint32Array.prototype));Object.assign(zs.prototype,ri.prototype,{constructor:zs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(js.prototype,ri.prototype,{constructor:js,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Yo.prototype,ri.prototype,{constructor:Yo,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const kC=BigInt(4294967296)*BigInt(4294967296),UC=kC-BigInt(1);function Mv(r,t){const{buffer:e,byteOffset:i,byteLength:n,signed:s}=r,o=new BigUint64Array(e,i,n/8),a=s&&o.at(-1)&BigInt(1)<=0)return Xu(r);t=t.slice();let i=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(At.prototype);let pn=class extends At{constructor(){super(L.Null)}toString(){return"Null"}};Nv=Symbol.toStringTag;pn[Nv]=(r=>r[Symbol.toStringTag]="Null")(pn.prototype);let is=class extends At{constructor(t,e){super(L.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}};Lv=Symbol.toStringTag;is[Lv]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(is.prototype);class Qo extends is{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Qo.prototype,"ArrayType",{value:Int32Array});let cl=class extends At{constructor(t){super(L.Float),this.precision=t}get ArrayType(){switch(this.precision){case tr.HALF:return Uint16Array;case tr.SINGLE:return Float32Array;case tr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}};Bv=Symbol.toStringTag;cl[Bv]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(cl.prototype);let hl=class extends At{constructor(){super(L.Binary)}toString(){return"Binary"}};kv=Symbol.toStringTag;hl[kv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(hl.prototype);let fl=class extends At{constructor(){super(L.LargeBinary)}toString(){return"LargeBinary"}};Uv=Symbol.toStringTag;fl[Uv]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(fl.prototype);let dl=class extends At{constructor(){super(L.Utf8)}toString(){return"Utf8"}};zv=Symbol.toStringTag;dl[zv]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(dl.prototype);let pl=class extends At{constructor(){super(L.LargeUtf8)}toString(){return"LargeUtf8"}};jv=Symbol.toStringTag;pl[jv]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(pl.prototype);let ml=class extends At{constructor(){super(L.Bool)}toString(){return"Bool"}};$v=Symbol.toStringTag;ml[$v]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(ml.prototype);let yl=class extends At{constructor(t,e,i=128){super(L.Decimal),this.scale=t,this.precision=e,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}};Vv=Symbol.toStringTag;yl[Vv]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(yl.prototype);let gl=class extends At{constructor(t){super(L.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${Hr[this.unit]}>`}get ArrayType(){return this.unit===Hr.DAY?Int32Array:BigInt64Array}};Gv=Symbol.toStringTag;gl[Gv]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(gl.prototype);let vl=class extends At{constructor(t,e){super(L.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${zt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}};Wv=Symbol.toStringTag;vl[Wv]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(vl.prototype);let _l=class extends At{constructor(t,e){super(L.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${zt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}};Hv=Symbol.toStringTag;_l[Hv]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(_l.prototype);let bl=class extends At{constructor(t){super(L.Interval),this.unit=t}toString(){return`Interval<${Si[this.unit]}>`}};Xv=Symbol.toStringTag;bl[Xv]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(bl.prototype);let wl=class extends At{constructor(t){super(L.Duration),this.unit=t}toString(){return`Duration<${zt[this.unit]}>`}};Yv=Symbol.toStringTag;wl[Yv]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(wl.prototype);let xl=class extends At{constructor(t){super(L.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};qv=Symbol.toStringTag;xl[qv]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(xl.prototype);let sr=class extends At{constructor(t){super(L.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};Qv=Symbol.toStringTag;sr[Qv]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(sr.prototype);let Sl=class extends At{constructor(t,e,i){super(L.Union),this.mode=t,this.children=i,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((n,s,o)=>(n[s]=o)&&n||n,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}};Kv=Symbol.toStringTag;Sl[Kv]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(Sl.prototype);let Tl=class extends At{constructor(t){super(L.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}};Zv=Symbol.toStringTag;Tl[Zv]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(Tl.prototype);let Il=class extends At{constructor(t,e){super(L.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}};Jv=Symbol.toStringTag;Il[Jv]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(Il.prototype);let El=class extends At{constructor(t,e=!1){var i,n,s;if(super(L.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((i=t==null?void 0:t.type)===null||i===void 0)&&i.children)){const o=(n=t==null?void 0:t.type)===null||n===void 0?void 0:n.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}};t_=Symbol.toStringTag;El[t_]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(El.prototype);const $C=(r=>()=>++r)(-1);let Zs=class extends At{constructor(t,e,i,n){super(L.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?$C():we(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}};e_=Symbol.toStringTag;Zs[e_]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Zs.prototype);function Ui(r){const t=r;switch(r.typeId){case L.Decimal:return r.bitWidth/32;case L.Interval:return 1+t.unit;case L.FixedSizeList:return t.listSize;case L.FixedSizeBinary:return t.byteWidth;default:return 1}}let ie=class{visitMany(t,...e){return t.map((i,n)=>this.visit(i,...e.map(s=>s[n])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return VC(this,t,e)}getVisitFnByTypeId(t,e=!0){return As(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}};function VC(r,t,e=!0){return typeof t=="number"?As(r,t,e):typeof t=="string"&&t in L?As(r,L[t],e):t&&t instanceof At?As(r,wp(t),e):t!=null&&t.type&&t.type instanceof At?As(r,wp(t.type),e):As(r,L.NONE,e)}function As(r,t,e=!0){let i=null;switch(t){case L.Null:i=r.visitNull;break;case L.Bool:i=r.visitBool;break;case L.Int:i=r.visitInt;break;case L.Int8:i=r.visitInt8||r.visitInt;break;case L.Int16:i=r.visitInt16||r.visitInt;break;case L.Int32:i=r.visitInt32||r.visitInt;break;case L.Int64:i=r.visitInt64||r.visitInt;break;case L.Uint8:i=r.visitUint8||r.visitInt;break;case L.Uint16:i=r.visitUint16||r.visitInt;break;case L.Uint32:i=r.visitUint32||r.visitInt;break;case L.Uint64:i=r.visitUint64||r.visitInt;break;case L.Float:i=r.visitFloat;break;case L.Float16:i=r.visitFloat16||r.visitFloat;break;case L.Float32:i=r.visitFloat32||r.visitFloat;break;case L.Float64:i=r.visitFloat64||r.visitFloat;break;case L.Utf8:i=r.visitUtf8;break;case L.LargeUtf8:i=r.visitLargeUtf8;break;case L.Binary:i=r.visitBinary;break;case L.LargeBinary:i=r.visitLargeBinary;break;case L.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case L.Date:i=r.visitDate;break;case L.DateDay:i=r.visitDateDay||r.visitDate;break;case L.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case L.Timestamp:i=r.visitTimestamp;break;case L.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case L.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case L.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case L.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case L.Time:i=r.visitTime;break;case L.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case L.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case L.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case L.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case L.Decimal:i=r.visitDecimal;break;case L.List:i=r.visitList;break;case L.Struct:i=r.visitStruct;break;case L.Union:i=r.visitUnion;break;case L.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case L.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case L.Dictionary:i=r.visitDictionary;break;case L.Interval:i=r.visitInterval;break;case L.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case L.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case L.Duration:i=r.visitDuration;break;case L.DurationSecond:i=r.visitDurationSecond||r.visitDuration;break;case L.DurationMillisecond:i=r.visitDurationMillisecond||r.visitDuration;break;case L.DurationMicrosecond:i=r.visitDurationMicrosecond||r.visitDuration;break;case L.DurationNanosecond:i=r.visitDurationNanosecond||r.visitDuration;break;case L.FixedSizeList:i=r.visitFixedSizeList;break;case L.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!e)return()=>null;throw new Error(`Unrecognized type '${L[t]}'`)}function wp(r){switch(r.typeId){case L.Null:return L.Null;case L.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?L.Int8:L.Uint8;case 16:return e?L.Int16:L.Uint16;case 32:return e?L.Int32:L.Uint32;case 64:return e?L.Int64:L.Uint64}return L.Int}case L.Float:switch(r.precision){case tr.HALF:return L.Float16;case tr.SINGLE:return L.Float32;case tr.DOUBLE:return L.Float64}return L.Float;case L.Binary:return L.Binary;case L.LargeBinary:return L.LargeBinary;case L.Utf8:return L.Utf8;case L.LargeUtf8:return L.LargeUtf8;case L.Bool:return L.Bool;case L.Decimal:return L.Decimal;case L.Time:switch(r.unit){case zt.SECOND:return L.TimeSecond;case zt.MILLISECOND:return L.TimeMillisecond;case zt.MICROSECOND:return L.TimeMicrosecond;case zt.NANOSECOND:return L.TimeNanosecond}return L.Time;case L.Timestamp:switch(r.unit){case zt.SECOND:return L.TimestampSecond;case zt.MILLISECOND:return L.TimestampMillisecond;case zt.MICROSECOND:return L.TimestampMicrosecond;case zt.NANOSECOND:return L.TimestampNanosecond}return L.Timestamp;case L.Date:switch(r.unit){case Hr.DAY:return L.DateDay;case Hr.MILLISECOND:return L.DateMillisecond}return L.Date;case L.Interval:switch(r.unit){case Si.DAY_TIME:return L.IntervalDayTime;case Si.YEAR_MONTH:return L.IntervalYearMonth}return L.Interval;case L.Duration:switch(r.unit){case zt.SECOND:return L.DurationSecond;case zt.MILLISECOND:return L.DurationMillisecond;case zt.MICROSECOND:return L.DurationMicrosecond;case zt.NANOSECOND:return L.DurationNanosecond}return L.Duration;case L.Map:return L.Map;case L.List:return L.List;case L.Struct:return L.Struct;case L.Union:switch(r.mode){case er.Dense:return L.DenseUnion;case er.Sparse:return L.SparseUnion}return L.Union;case L.FixedSizeBinary:return L.FixedSizeBinary;case L.FixedSizeList:return L.FixedSizeList;case L.Dictionary:return L.Dictionary}throw new Error(`Unrecognized type '${L[r.typeId]}'`)}ie.prototype.visitInt8=null;ie.prototype.visitInt16=null;ie.prototype.visitInt32=null;ie.prototype.visitInt64=null;ie.prototype.visitUint8=null;ie.prototype.visitUint16=null;ie.prototype.visitUint32=null;ie.prototype.visitUint64=null;ie.prototype.visitFloat16=null;ie.prototype.visitFloat32=null;ie.prototype.visitFloat64=null;ie.prototype.visitDateDay=null;ie.prototype.visitDateMillisecond=null;ie.prototype.visitTimestampSecond=null;ie.prototype.visitTimestampMillisecond=null;ie.prototype.visitTimestampMicrosecond=null;ie.prototype.visitTimestampNanosecond=null;ie.prototype.visitTimeSecond=null;ie.prototype.visitTimeMillisecond=null;ie.prototype.visitTimeMicrosecond=null;ie.prototype.visitTimeNanosecond=null;ie.prototype.visitDenseUnion=null;ie.prototype.visitSparseUnion=null;ie.prototype.visitIntervalDayTime=null;ie.prototype.visitIntervalYearMonth=null;ie.prototype.visitDuration=null;ie.prototype.visitDurationSecond=null;ie.prototype.visitDurationMillisecond=null;ie.prototype.visitDurationMicrosecond=null;ie.prototype.visitDurationNanosecond=null;const r_=new Float64Array(1),gs=new Uint32Array(r_.buffer);function i_(r){const t=(r&31744)>>10,e=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return i*(e?Number.NaN:1/0);case 0:return i*(e?6103515625e-14*e:0)}return i*Math.pow(2,t-15)*(1+e)}function GC(r){if(r!==r)return 32256;r_[0]=r;const t=(gs[1]&2147483648)>>16&65535;let e=gs[1]&2146435072,i=0;return e>=1089470464?gs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(gs[1]&1048575)>>10):e<=1056964608?(i=1048576+(gs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(gs[1]&1048575)+512>>10),t|e|i&65535}let jt=class extends ie{};function Xt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const WC=(r,t,e)=>{r[t]=Math.floor(e/864e5)},n_=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},sf=({values:r},t,e)=>{r[t]=e},s_=({values:r},t,e)=>{r[t]=GC(e)},XC=(r,t,e)=>{switch(r.type.precision){case tr.HALF:return s_(r,t,e);case tr.SINGLE:case tr.DOUBLE:return sf(r,t,e)}},o_=({values:r},t,e)=>{WC(r,t,e.valueOf())},a_=({values:r},t,e)=>{r[t]=BigInt(e)},YC=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},l_=({values:r,valueOffsets:t},e,i)=>n_(r,t,e,i),u_=({values:r,valueOffsets:t},e,i)=>n_(r,t,e,ef(i)),qC=(r,t,e)=>{r.type.unit===Hr.DAY?o_(r,t,e):a_(r,t,e)},c_=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},h_=({values:r},t,e)=>{r[t]=BigInt(e)},f_=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},d_=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},QC=(r,t,e)=>{switch(r.type.unit){case zt.SECOND:return c_(r,t,e);case zt.MILLISECOND:return h_(r,t,e);case zt.MICROSECOND:return f_(r,t,e);case zt.NANOSECOND:return d_(r,t,e)}},p_=({values:r},t,e)=>{r[t]=e},m_=({values:r},t,e)=>{r[t]=e},y_=({values:r},t,e)=>{r[t]=e},g_=({values:r},t,e)=>{r[t]=e},KC=(r,t,e)=>{switch(r.type.unit){case zt.SECOND:return p_(r,t,e);case zt.MILLISECOND:return m_(r,t,e);case zt.MICROSECOND:return y_(r,t,e);case zt.NANOSECOND:return g_(r,t,e)}},ZC=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},JC=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Xr.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=n[t],l=n[t+1];a{const i=r.children[0],{valueOffsets:n}=r,s=Xr.getVisitFn(i);let{[t]:o,[t+1]:a}=n;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(i,o,u),++o>=a)break},eA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),rA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),iA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),nA=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),sA=(r,t,e)=>{const i=r.type.children.map(s=>Xr.getVisitFn(s.type)),n=e instanceof Map?iA(t,e):e instanceof Me?rA(t,e):Array.isArray(e)?eA(t,e):nA(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},oA=(r,t,e)=>{r.type.mode===er.Dense?v_(r,t,e):__(r,t,e)},v_=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Xr.visit(n,r.valueOffsets[t],e)},__=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Xr.visit(n,t,e)},aA=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},lA=(r,t,e)=>{r.type.unit===Si.DAY_TIME?b_(r,t,e):w_(r,t,e)},b_=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},w_=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},x_=({values:r},t,e)=>{r[t]=e},S_=({values:r},t,e)=>{r[t]=e},T_=({values:r},t,e)=>{r[t]=e},I_=({values:r},t,e)=>{r[t]=e},uA=(r,t,e)=>{switch(r.type.unit){case zt.SECOND:return x_(r,t,e);case zt.MILLISECOND:return S_(r,t,e);case zt.MICROSECOND:return T_(r,t,e);case zt.NANOSECOND:return I_(r,t,e)}},cA=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Xr.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${Xo(t)}: ${Xo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new hA(this[Kr],this[$s])}},hA=class{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[Kr].type.children.findIndex(i=>i.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[Kr].type.children.findIndex(i=>i.name===e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Kr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=mr.visit(t[Kr].children[i],t[$s]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Kr].type.children.findIndex(s=>s.name===e);return n!==-1?(Xr.visit(t[Kr].children[n],t[$s],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}},Mt=class extends ie{};function $t(r){return(t,e)=>t.getValid(e)?r(t,e):null}const dA=(r,t)=>864e5*r[t],pA=(r,t)=>null,E_=(r,t,e)=>{if(e+1>=t.length)return null;const i=we(t[e]),n=we(t[e+1]);return r.subarray(i,n)},mA=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<dA(r,t),A_=({values:r},t)=>we(r[t]),wn=({stride:r,values:t},e)=>t[r*e],yA=({stride:r,values:t},e)=>i_(t[r*e]),O_=({values:r},t)=>r[t],gA=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),F_=({values:r,valueOffsets:t},e)=>E_(r,t,e),P_=({values:r,valueOffsets:t},e)=>{const i=E_(r,t,e);return i!==null?eh(i):null},vA=({values:r},t)=>r[t],_A=({type:r,values:t},e)=>r.precision!==tr.HALF?t[e]:i_(t[e]),bA=(r,t)=>r.type.unit===Hr.DAY?C_(r,t):A_(r,t),M_=({values:r},t)=>1e3*we(r[t]),D_=({values:r},t)=>we(r[t]),R_=({values:r},t)=>Pv(r[t],BigInt(1e3)),N_=({values:r},t)=>Pv(r[t],BigInt(1e6)),wA=(r,t)=>{switch(r.type.unit){case zt.SECOND:return M_(r,t);case zt.MILLISECOND:return D_(r,t);case zt.MICROSECOND:return R_(r,t);case zt.NANOSECOND:return N_(r,t)}},L_=({values:r},t)=>r[t],B_=({values:r},t)=>r[t],k_=({values:r},t)=>r[t],U_=({values:r},t)=>r[t],xA=(r,t)=>{switch(r.type.unit){case zt.SECOND:return L_(r,t);case zt.MILLISECOND:return B_(r,t);case zt.MICROSECOND:return k_(r,t);case zt.NANOSECOND:return U_(r,t)}},SA=({values:r,stride:t},e)=>jC.decimal(r.subarray(t*e,t*(e+1))),TA=(r,t)=>{const{valueOffsets:e,stride:i,children:n}=r,{[t*i]:s,[t*i+1]:o}=e,l=n[0].slice(s,o-s);return new Me([l])},IA=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new af(o.slice(n,s-n))},EA=(r,t)=>new of(r,t),CA=(r,t)=>r.type.mode===er.Dense?z_(r,t):j_(r,t),z_=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return mr.visit(i,r.valueOffsets[t])},j_=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return mr.visit(i,t)},AA=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},OA=(r,t)=>r.type.unit===Si.DAY_TIME?$_(r,t):V_(r,t),$_=({values:r},t)=>r.subarray(2*t,2*(t+1)),V_=({values:r},t)=>{const e=r[t],i=new Int32Array(2);return i[0]=Math.trunc(e/12),i[1]=Math.trunc(e%12),i},G_=({values:r},t)=>r[t],W_=({values:r},t)=>r[t],H_=({values:r},t)=>r[t],X_=({values:r},t)=>r[t],FA=(r,t)=>{switch(r.type.unit){case zt.SECOND:return G_(r,t);case zt.MILLISECOND:return W_(r,t);case zt.MICROSECOND:return H_(r,t);case zt.NANOSECOND:return X_(r,t)}},PA=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Me([s])};Mt.prototype.visitNull=$t(pA);Mt.prototype.visitBool=$t(mA);Mt.prototype.visitInt=$t(vA);Mt.prototype.visitInt8=$t(wn);Mt.prototype.visitInt16=$t(wn);Mt.prototype.visitInt32=$t(wn);Mt.prototype.visitInt64=$t(O_);Mt.prototype.visitUint8=$t(wn);Mt.prototype.visitUint16=$t(wn);Mt.prototype.visitUint32=$t(wn);Mt.prototype.visitUint64=$t(O_);Mt.prototype.visitFloat=$t(_A);Mt.prototype.visitFloat16=$t(yA);Mt.prototype.visitFloat32=$t(wn);Mt.prototype.visitFloat64=$t(wn);Mt.prototype.visitUtf8=$t(P_);Mt.prototype.visitLargeUtf8=$t(P_);Mt.prototype.visitBinary=$t(F_);Mt.prototype.visitLargeBinary=$t(F_);Mt.prototype.visitFixedSizeBinary=$t(gA);Mt.prototype.visitDate=$t(bA);Mt.prototype.visitDateDay=$t(C_);Mt.prototype.visitDateMillisecond=$t(A_);Mt.prototype.visitTimestamp=$t(wA);Mt.prototype.visitTimestampSecond=$t(M_);Mt.prototype.visitTimestampMillisecond=$t(D_);Mt.prototype.visitTimestampMicrosecond=$t(R_);Mt.prototype.visitTimestampNanosecond=$t(N_);Mt.prototype.visitTime=$t(xA);Mt.prototype.visitTimeSecond=$t(L_);Mt.prototype.visitTimeMillisecond=$t(B_);Mt.prototype.visitTimeMicrosecond=$t(k_);Mt.prototype.visitTimeNanosecond=$t(U_);Mt.prototype.visitDecimal=$t(SA);Mt.prototype.visitList=$t(TA);Mt.prototype.visitStruct=$t(EA);Mt.prototype.visitUnion=$t(CA);Mt.prototype.visitDenseUnion=$t(z_);Mt.prototype.visitSparseUnion=$t(j_);Mt.prototype.visitDictionary=$t(AA);Mt.prototype.visitInterval=$t(OA);Mt.prototype.visitIntervalDayTime=$t($_);Mt.prototype.visitIntervalYearMonth=$t(V_);Mt.prototype.visitDuration=$t(FA);Mt.prototype.visitDurationSecond=$t(G_);Mt.prototype.visitDurationMillisecond=$t(W_);Mt.prototype.visitDurationMicrosecond=$t(H_);Mt.prototype.visitDurationNanosecond=$t(X_);Mt.prototype.visitFixedSizeList=$t(PA);Mt.prototype.visitMap=$t(IA);const mr=new Mt,Os=Symbol.for("keys"),Vs=Symbol.for("vals"),Fs=Symbol.for("kKeysAsStrings"),lh=Symbol.for("_kKeysAsStrings");let af=class{constructor(t){return this[Os]=new Me([t.children[0]]).memoize(),this[Vs]=t.children[1],new Proxy(this,new DA)}get[Fs](){return this[lh]||(this[lh]=Array.from(this[Os].toArray(),String))}[Symbol.iterator](){return new MA(this[Os],this[Vs])}get size(){return this[Os].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Os],e=this[Vs],i={};for(let n=-1,s=t.length;++n`${Xo(t)}: ${Xo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},MA=class{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),mr.visit(this.vals,t)]})}},DA=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Fs]}has(t,e){return t[Fs].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Fs].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Fs].indexOf(e);if(i!==-1){const n=mr.visit(Reflect.get(t,Vs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Fs].indexOf(e);return n!==-1?(Xr.visit(Reflect.get(t,Vs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}};Object.defineProperties(af.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Os]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Vs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[lh]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let xp;function Y_(r,t,e,i){const{length:n=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?n:e;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),on&&(o=n),i?i(r,s,o):[s,o]}const lf=(r,t)=>r<0?t+r:r,Sp=r=>r!==r;function so(r){if(typeof r!=="object"||r===null)return Sp(r)?Sp:e=>e===r;if(r instanceof Date){const e=r.valueOf();return i=>i instanceof Date?i.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?FC(r,e):!1:r instanceof Map?NA(r):Array.isArray(r)?RA(r):r instanceof Me?LA(r):BA(r,!0)}function RA(r){const t=[];for(let e=-1,i=r.length;++e!1;const i=[];for(let n=-1,s=e.length;++n{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return kA(r,e);case Map:return Tp(r,e,e.keys());case af:case of:case Object:case void 0:return Tp(r,e,t||Object.keys(e))}return e instanceof Me?UA(r,e):!1}}function kA(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function Cl(r,t,e){const i=e.byteLength+7&-8;if(r>0||e.byteLength>3):Al(new uf(e,r,t,null,q_)).subarray(0,i)),n}return e}function Al(r){const t=[];let e=0,i=0,n=0;for(const o of r)o&&(n|=1<0)&&(t[e++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}let uf=class{constructor(t,e,i,n,s){this.bytes=t,this.length=i,this.context=n,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,n=t+(t%8===0?0:8-t%8);return uh(r,t,n)+uh(r,i,e)+jA(r,n>>3,i-n>>3)}function jA(r,t,e){let i=0,n=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:n+e;for(;o-n>=4;)i+=Yu(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=Yu(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=Yu(s.getUint8(n)),n+=1;return i}function Yu(r){let t=Math.trunc(r);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const $A=-1;let Se=class ch{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return At.isSparseUnion(t)?this.children.some(e=>e.nullable):At.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:i,nullBitmap:n,typeIds:s}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(At.isUnion(this.type))return this.children.reduce((i,n)=>i+n.nullCount,0);let t=this._nullCount,e;return t<=$A&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-uh(e,this.offset,this.offset+this.length)),t}constructor(t,e,i,n,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1));let l;s instanceof ch?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=Ui(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(At.isUnion(e)){const i=e,n=this.children[i.typeIdToChildIndex[this.typeIds[t]]],s=i.mode===er.Dense?this.valueOffsets[t]:t;return n.getValid(s)}if(this.nullable&&this.nullCount>0){const i=this.offset+t;return(this.nullBitmap[i>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(Cl(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];i=(h&u)!==0,s[c]=e?h|u:h&~u}return i!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,i=this.length,n=this._nullCount,s=this,o=this.children){return new ch(t,e,i,n,s,o,this.dictionary)}slice(t,e){const{stride:i,typeId:n,children:s}=this,o=+(this._nullCount===0)-1,a=n===16?i:1,l=this._sliceBuffers(t,e,i,n);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===L.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:i}=this,n=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);n[e>>3]=(1<0&&n.set(Cl(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[ki.VALIDITY]=n,this.clone(this.type,0,t,i+(t-e),s)}_sliceBuffers(t,e,i,n){let s;const{buffers:o}=this;return(s=o[ki.TYPE])&&(o[ki.TYPE]=s.subarray(t,t+e)),(s=o[ki.OFFSET])&&(o[ki.OFFSET]=s.subarray(t,t+e+1))||(s=o[ki.DATA])&&(o[ki.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}};Se.prototype.children=Object.freeze([]);class Ro extends ie{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{["type"]:e,["offset"]:i=0,["length"]:n=0}=t;return new Se(e,i,n,n)}visitBool(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length>>3,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitInt(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitFloat(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitUtf8(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.data),s=ae(t.nullBitmap),o=yo(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitLargeUtf8(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.data),s=ae(t.nullBitmap),o=hp(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitBinary(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.data),s=ae(t.nullBitmap),o=yo(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitLargeBinary(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.data),s=ae(t.nullBitmap),o=hp(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,n,s])}visitFixedSizeBinary(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitDate(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitTimestamp(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitTime(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitDecimal(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitList(t){const{["type"]:e,["offset"]:i=0,["child"]:n}=t,s=ae(t.nullBitmap),o=yo(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,void 0,s],[n])}visitStruct(t){const{["type"]:e,["offset"]:i=0,["children"]:n=[]}=t,s=ae(t.nullBitmap),{length:o=n.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,void 0,s],n)}visitUnion(t){const{["type"]:e,["offset"]:i=0,["children"]:n=[]}=t,s=_e(e.ArrayType,t.typeIds),{["length"]:o=s.length,["nullCount"]:a=-1}=t;if(At.isSparseUnion(e))return new Se(e,i,o,a,[void 0,void 0,void 0,s],n);const l=yo(t.valueOffsets);return new Se(e,i,o,a,[l,void 0,void 0,s],n)}visitDictionary(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.indices.ArrayType,t.data),{["dictionary"]:o=new Me([new Ro().visit({type:e.dictionary})])}=t,{["length"]:a=s.length,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[void 0,s,n],[],o)}visitInterval(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitDuration(t){const{["type"]:e,["offset"]:i=0}=t,n=ae(t.nullBitmap),s=_e(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,s,n])}visitFixedSizeList(t){const{["type"]:e,["offset"]:i=0,["child"]:n=new Ro().visit({type:e.valueType})}=t,s=ae(t.nullBitmap),{["length"]:o=n.length/Ui(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new Se(e,i,o,a,[void 0,void 0,s],[n])}visitMap(t){const{["type"]:e,["offset"]:i=0,["child"]:n=new Ro().visit({type:e.childType})}=t,s=ae(t.nullBitmap),o=yo(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new Se(e,i,a,l,[o,void 0,s],[n])}}const VA=new Ro;function se(r){return VA.visit(r)}let Ip=class{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function Q_(r){return r.reduce((t,e)=>t+e.nullCount,0)}function K_(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function Z_(r,t,e,i){const n=[];for(let s=-1,o=r.length;++s=i)break;if(e>=l+u)continue;if(l>=e&&l+u<=i){n.push(a);continue}const c=Math.max(0,e-l),h=Math.min(i-l,u);n.push(a.slice(c,h-c))}return n.length===0&&n.push(r[0].slice(0,0)),n}function cf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function HA(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new uf(e,r.offset+(t||0),r.length,e,q_)){if(!n)return i;++i}return-1}function Qt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case L.Union:break;case L.Dictionary:break;default:return HA(r,e)}const i=mr.getVisitFn(r),n=so(t);for(let s=(e||0)-1,o=r.length;++s{const n=r.data[i];return n.values.subarray(0,n.length)[Symbol.iterator]()});let e=0;return new Ip(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new XA(o)})}let XA=class{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof Se)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:u}=i0[o.typeId],c=s[0];this.isValid=h=>hf(c,h),this.get=h=>a(c,h),this.set=(h,p)=>l(c,h,p),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,n0[o.typeId]),this._offsets=K_(s);break}this.data=s,this.type=o,this.stride=Ui(o),this.numChildren=(n=(i=o.children)===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return GA(this.data)}get nullCount(){return Q_(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${L[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(lf(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return ff.visit(this)}concat(...t){return new zn(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new zn(Y_(this,t,e,({data:i,_offsets:n},s,o)=>Z_(i,n,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:i,stride:n,ArrayType:s}=this;switch(t.typeId){case L.Int:case L.Float:case L.Decimal:case L.Time:case L.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,i*n);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*n),o.offset),o.offset+=l*n,o),{array:new s(i*n),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return At.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(At.isDictionary(this.type)){const t=new Ep(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new zn(e)}return new Ep(this)}unmemoize(){if(At.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new zn(e)}return this}};r0=Symbol.toStringTag;Me[r0]=(r=>{r.type=At.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(L).map(e=>L[e]).filter(e=>typeof e=="number"&&e!==L.NONE);for(const e of t){const i=mr.getVisitFnByTypeId(e),n=Xr.getVisitFnByTypeId(e),s=Fl.getVisitFnByTypeId(e);i0[e]={get:i,set:n,indexOf:s},n0[e]=Object.create(r,{isValid:{value:Ol(hf)},get:{value:Ol(mr.getVisitFnByTypeId(e))},set:{value:J_(Xr.getVisitFnByTypeId(e))},indexOf:{value:t0(Fl.getVisitFnByTypeId(e))}})}return"Vector"})(Me.prototype);let Ep=class s0 extends Me{constructor(t){super(t.data);const e=this.get,i=this.set,n=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){i.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new s0(n.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Me(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};class hh{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,i,n){return t.prep(8,24),t.writeInt64(BigInt(n??0)),t.pad(4),t.writeInt32(i),t.writeInt64(BigInt(e??0)),t.offset()}}class _r{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new _r).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+me),(e||new _r).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ke.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new ui).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const i=this.bb.__offset(this.bb_pos,8);return i?(e||new hh).__init(this.bb.__vector(this.bb_pos+i)+t*24,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const i=this.bb.__offset(this.bb_pos,10);return i?(e||new hh).__init(this.bb.__vector(this.bb_pos+i)+t*24,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const i=this.bb.__offset(this.bb_pos,12);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,ke.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}let Pe=class jn{constructor(t=[],e,i,n=ke.V5){this.fields=t||[],this.metadata=e||new Map,i||(i=fh(this.fields)),this.dictionaries=i,this.metadataVersion=n}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return`Schema<{ ${this.fields.map((t,e)=>`${e}: ${t}`).join(", ")} }>`}select(t){const e=new Set(t),i=this.fields.filter(n=>e.has(n.name));return new jn(i,this.metadata)}selectAt(t){const e=t.map(i=>this.fields[i]).filter(Boolean);return new jn(e,this.metadata)}assign(...t){const e=t[0]instanceof jn?t[0]:Array.isArray(t[0])?new jn(t[0]):new jn(t),i=[...this.fields],n=La(La(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{const l=i.findIndex(u=>u.name===a.name);return~l?(i[l]=a.clone({metadata:La(La(new Map,i[l].metadata),a.metadata)}))&&!1:!0}),o=fh(s,new Map);return new jn([...i,...s],n,new Map([...this.dictionaries,...o]))}};Pe.prototype.fields=null;Pe.prototype.metadata=null;Pe.prototype.dictionaries=null;class Ce{static new(...t){let[e,i,n,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],i===void 0&&(i=t[0].type),n===void 0&&(n=t[0].nullable),s===void 0&&(s=t[0].metadata)),new Ce(`${e}`,i,n,s)}constructor(t,e,i=!1,n){this.name=t,this.type=e,this.nullable=i,this.metadata=n||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,i,n,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,i=this.type,n=this.nullable,s=this.metadata]=t:{name:e=this.name,type:i=this.type,nullable:n=this.nullable,metadata:s=this.metadata}=t[0],Ce.new(e,i,n,s)}}Ce.prototype.type=null;Ce.prototype.name=null;Ce.prototype.nullable=null;Ce.prototype.metadata=null;function La(r,t){return new Map([...r||new Map,...t||new Map])}function fh(r,t=new Map){for(let e=-1,i=r.length;++e0&&fh(s.children,t)}return t}var YA=Cv,qA=Qs;class Ko{static decode(t){t=new qA(ae(t));const e=_r.getRootAsFooter(t),i=Pe.decode(e.schema(),new Map,e.version());return new QA(i,e)}static encode(t){const e=new YA,i=Pe.encode(e,t.schema);_r.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())mn.encode(e,o);const n=e.endVector();_r.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())mn.encode(e,o);const s=e.endVector();return _r.startFooter(e),_r.addSchema(e,i),_r.addVersion(e,ke.V5),_r.addRecordBatches(e,n),_r.addDictionaries(e,s),_r.finishFooterBuffer(e,_r.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=ke.V5,i,n){this.schema=t,this.version=e,i&&(this._recordBatches=i),n&&(this._dictionaryBatches=n)}*recordBatches(){for(let t,e=-1,i=this.numRecordBatches;++e=0&&t=0&&t=0&&t=0&&tthis._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return Zt(this,void 0,void 0,function*(){yield this.return(t)})}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this;for(;t.length>0;)t.shift().resolve(De);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return kr.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return kr.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return Zt(this,void 0,void 0,function*(){return yield this.abort(t),De})}return(t){return Zt(this,void 0,void 0,function*(){return yield this.close(),De})}read(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,i)=>{this.resolvers.push({resolve:e,reject:i})}):Promise.resolve(De)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class Wa extends KA{write(t){if((t=ae(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?eh(this.toUint8Array(!0)):this.toUint8Array(!1).then(eh)}toUint8Array(t=!1){return t?xi(this._values)[0]:Zt(this,void 0,void 0,function*(){var e,i,n,s;const o=[];let a=0;try{for(var l=!0,u=bi(this),c;c=yield u.next(),e=c.done,!e;l=!0){s=c.value,l=!1;const h=s;o.push(h),a+=h.byteLength}}catch(h){i={error:h}}finally{try{!l&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(i)throw i.error}}return xi(o,a)[0]})}}class Pl{constructor(t){t&&(this.source=new ZA(kr.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class Js{constructor(t){t instanceof Js?this.source=t.source:t instanceof Wa?this.source=new Mn(kr.fromAsyncIterable(t)):Sv(t)?this.source=new Mn(kr.fromNodeStream(t)):rf(t)?this.source=new Mn(kr.fromDOMStream(t)):xv(t)?this.source=new Mn(kr.fromDOMStream(t.body)):oa(t)?this.source=new Mn(kr.fromIterable(t)):rs(t)?this.source=new Mn(kr.fromAsyncIterable(t)):no(t)&&(this.source=new Mn(kr.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class ZA{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||De)}return(t){return Object.create(this.source.return&&this.source.return(t)||De)}}class Mn{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return Zt(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Zt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return Zt(this,arguments,void 0,function*(e,i="read"){return yield this.source.next({cmd:i,size:e})})}throw(t){return Zt(this,void 0,void 0,function*(){const e=this.source.throw&&(yield this.source.throw(t))||De;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return Zt(this,void 0,void 0,function*(){const e=this.source.return&&(yield this.source.return(t))||De;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}}class Ap extends Pl{constructor(t,e){super(),this.position=0,this.buffer=ae(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:i}=this.readAt(t,4);return new DataView(e,i).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Ns(this.buffer[3])} ${Ns(this.buffer[2])} ${Ns(this.buffer[1])} ${Ns(this.buffer[0])}`}static multiply(t,e){return new Ni(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new Ni(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return Ni.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return Ni.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new Ni(e);for(let o=i?1:0;o0&&this.readData(t,i)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:i}=this.nextBufferRange()){return this.bytes.subarray(i,i+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class eO extends a0{constructor(t,e,i,n,s){super(new Uint8Array(0),e,i,n,s),this.sources=t}readNullBitmap(t,e,{offset:i}=this.nextBufferRange()){return e<=0?new Uint8Array(0):Al(this.sources[i])}readOffsets(t,{offset:e}=this.nextBufferRange()){return _e(Uint8Array,_e(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return _e(Uint8Array,_e(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:i}=this;return At.isTimestamp(t)||(At.isInt(t)||At.isTime(t))&&t.bitWidth===64||At.isDuration(t)||At.isDate(t)&&t.unit===Hr.MILLISECOND?_e(Uint8Array,No.convertArray(i[e])):At.isDecimal(t)?_e(Uint8Array,tO.convertArray(i[e])):At.isBinary(t)||At.isLargeBinary(t)||At.isFixedSizeBinary(t)?rO(i[e]):At.isBool(t)?Al(i[e]):At.isUtf8(t)||At.isLargeUtf8(t)?ef(i[e].join("")):_e(Uint8Array,_e(t.ArrayType,i[e].map(n=>+n)))}}function rO(r){const t=r.join(""),e=new Uint8Array(t.length/2);for(let i=0;i>1]=Number.parseInt(t.slice(i,i+2),16);return e}let Nt=class extends ie{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((i,n)=>this.compareFields(i,e[n]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}};function lr(r,t){return t instanceof r.constructor}function us(r,t){return r===t||lr(r,t)}function Xi(r,t){return r===t||lr(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function ru(r,t){return r===t||lr(r,t)&&r.precision===t.precision}function iO(r,t){return r===t||lr(r,t)&&r.byteWidth===t.byteWidth}function mf(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function aa(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function la(r,t){return r===t||lr(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function nO(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&yn.compareManyFields(r.children,t.children)}function sO(r,t){return r===t||lr(r,t)&&r.children.length===t.children.length&&yn.compareManyFields(r.children,t.children)}function yf(r,t){return r===t||lr(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&yn.compareManyFields(r.children,t.children)}function oO(r,t){return r===t||lr(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&yn.visit(r.indices,t.indices)&&yn.visit(r.dictionary,t.dictionary)}function gf(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function ua(r,t){return r===t||lr(r,t)&&r.unit===t.unit}function aO(r,t){return r===t||lr(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&yn.compareManyFields(r.children,t.children)}function lO(r,t){return r===t||lr(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&yn.compareManyFields(r.children,t.children)}Nt.prototype.visitNull=us;Nt.prototype.visitBool=us;Nt.prototype.visitInt=Xi;Nt.prototype.visitInt8=Xi;Nt.prototype.visitInt16=Xi;Nt.prototype.visitInt32=Xi;Nt.prototype.visitInt64=Xi;Nt.prototype.visitUint8=Xi;Nt.prototype.visitUint16=Xi;Nt.prototype.visitUint32=Xi;Nt.prototype.visitUint64=Xi;Nt.prototype.visitFloat=ru;Nt.prototype.visitFloat16=ru;Nt.prototype.visitFloat32=ru;Nt.prototype.visitFloat64=ru;Nt.prototype.visitUtf8=us;Nt.prototype.visitLargeUtf8=us;Nt.prototype.visitBinary=us;Nt.prototype.visitLargeBinary=us;Nt.prototype.visitFixedSizeBinary=iO;Nt.prototype.visitDate=mf;Nt.prototype.visitDateDay=mf;Nt.prototype.visitDateMillisecond=mf;Nt.prototype.visitTimestamp=aa;Nt.prototype.visitTimestampSecond=aa;Nt.prototype.visitTimestampMillisecond=aa;Nt.prototype.visitTimestampMicrosecond=aa;Nt.prototype.visitTimestampNanosecond=aa;Nt.prototype.visitTime=la;Nt.prototype.visitTimeSecond=la;Nt.prototype.visitTimeMillisecond=la;Nt.prototype.visitTimeMicrosecond=la;Nt.prototype.visitTimeNanosecond=la;Nt.prototype.visitDecimal=us;Nt.prototype.visitList=nO;Nt.prototype.visitStruct=sO;Nt.prototype.visitUnion=yf;Nt.prototype.visitDenseUnion=yf;Nt.prototype.visitSparseUnion=yf;Nt.prototype.visitDictionary=oO;Nt.prototype.visitInterval=gf;Nt.prototype.visitIntervalDayTime=gf;Nt.prototype.visitIntervalYearMonth=gf;Nt.prototype.visitDuration=ua;Nt.prototype.visitDurationSecond=ua;Nt.prototype.visitDurationMillisecond=ua;Nt.prototype.visitDurationMicrosecond=ua;Nt.prototype.visitDurationNanosecond=ua;Nt.prototype.visitFixedSizeList=aO;Nt.prototype.visitMap=lO;const yn=new Nt;function dh(r,t){return yn.compareSchemas(r,t)}function qu(r,t){return uO(r,t.map(e=>e.data.concat()))}function uO(r,t){const e=[...r.fields],i=[],n={numBatches:t.reduce((h,p)=>Math.max(h,p.length),0)};let s=0,o=0,a=-1;const l=t.length;let u,c=[];for(;n.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a0&&(i[s++]=se({type:new sr(e),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(e),i.map(h=>new fr(r,h))]}function cO(r,t,e,i,n){var s;const o=(t+63&-64)>>3;for(let a=-1,l=i.length;++a=t)c===t?e[a]=u:(e[a]=u.slice(0,t),n.numBatches=Math.max(n.numBatches,i[a].unshift(u.slice(t,c-t))));else{const h=r[a];r[a]=h.clone({nullable:!0}),e[a]=(s=u==null?void 0:u._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:se({type:h.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var l0;let gn=class $n{constructor(...t){var e,i;if(t.length===0)return this.batches=[],this.schema=new Pe([]),this._offsets=[0],this;let n,s;t[0]instanceof Pe&&(n=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());const o=l=>{if(l){if(l instanceof fr)return[l];if(l instanceof $n)return l.batches;if(l instanceof Se){if(l.type instanceof sr)return[new fr(new Pe(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(u=>o(u));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(u=>o(u));if(typeof l=="object"){const u=Object.keys(l),c=u.map(f=>new Me([l[f]])),h=n??new Pe(u.map((f,y)=>new Ce(String(f),c[y].type,c[y].nullable))),[,p]=qu(h,c);return p.length===0?[new fr(l)]:p}}}return[]},a=t.flatMap(l=>o(l));if(n=(i=n??((e=a[0])===null||e===void 0?void 0:e.schema))!==null&&i!==void 0?i:new Pe([]),!(n instanceof Pe))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of a){if(!(l instanceof fr))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!dh(n,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=n,this.batches=a,this._offsets=s??K_(this.data)}get data(){return this.batches.map(({data:t})=>t)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((t,e)=>t+e.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=Q_(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(lf(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?ff.visit(new Me(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ ${this.toArray().join(`, `)} -]`}concat(...t){const e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new $n(e,i.map(n=>new fr(e,n)))}slice(t,e){const i=this.schema;[t,e]=Y_({length:this.numRows},t,e);const n=Z_(this.data,this._offsets,t,e);return new $n(i,n.map(s=>new fr(i,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&ti.children[t]);if(e.length===0){const{type:i}=this.schema.fields[t],n=se({type:i,length:0,nullCount:0});e.push(n._changeLengthAndBackfillNullBitmap(this.numRows))}return new Me(e)}return null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[i,n]=qu(i,a)}return new $n(i,n)}select(t){const e=this.schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(t.map(i=>e.get(i)).filter(i=>i>-1))}selectAt(t){const e=this.schema.selectAt(t),i=this.batches.map(n=>n.selectAt(t));return new $n(e,i)}assign(t){const e=this.schema.fields,[i,n]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,p=e.findIndex(f=>f.name===l.name);return~p?h[p]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,n[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...i.map(a=>t.getChildAt(a))].filter(Boolean);return new $n(...qu(s,o))}};l0=Symbol.toStringTag;gn[l0]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Ol(hf),r.get=Ol(mr.getVisitFn(L.Struct)),r.set=J_(Xr.getVisitFn(L.Struct)),r.indexOf=t0(Fl.getVisitFn(L.Struct)),"Table"))(gn.prototype);var u0;let fr=class Po{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Pe))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=se({nullCount:0,type:new sr(this.schema.fields),children:this.schema.fields.map(e=>se({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Se))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=Op(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:i,children:n,length:s}=Object.keys(e).reduce((l,u,c)=>(l.children[c]=e[u],l.length=Math.max(l.length,e[u].length),l.fields[c]=Ce.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Pe(i),a=se({type:new sr(i),length:s,children:n,nullCount:0});[this.schema,this.data]=Op(o,a.children,s);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=c0(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return mr.visit(this.data,t)}at(t){return this.get(lf(t,this.numRows))}set(t,e){return Xr.visit(this.data,t,e)}indexOf(t,e){return Fl.visit(this.data,t,e)}[Symbol.iterator](){return ff.visit(new Me([this.data]))}toArray(){return[...this]}concat(...t){return new gn(this.schema,[this,...t])}slice(t,e){const[i]=new Me([this.data]).slice(t,e).data;return new Po(this.schema,i)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&tn.name===t),e)}setChildAt(t,e){let i=this.schema,n=this.data;if(t>-1&&ta.name===s);~o&&(n[o]=this.data.children[o])}return new Po(e,se({type:i,length:this.numRows,children:n}))}selectAt(t){const e=this.schema.selectAt(t),i=t.map(s=>this.data.children[s]).filter(Boolean),n=se({type:new sr(e.fields),length:this.numRows,children:i});return new Po(e,n)}};u0=Symbol.toStringTag;fr[u0]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(fr.prototype);function Op(r,t,e=t.reduce((i,n)=>Math.max(i,n.length),0)){var i;const n=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of r.fields.entries()){const u=t[a];(!u||u.length!==e)&&(n[a]=l.clone({nullable:!0}),s[a]=(i=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&i!==void 0?i:se({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(n),se({type:new sr(n),length:e,children:s})]}function c0(r,t,e=new Map){var i,n;if(((i=r==null?void 0:r.length)!==null&&i!==void 0?i:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++sse({type:n.type})),i=se({type:new sr(t.fields),nullCount:0,children:e});super(t,i)}}let en=class ai{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(t,e){return(e||new ai).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+me),(e||new ai).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ke.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):fe.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const i=this.bb.__offset(this.bb_pos,12);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,ke.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,fe.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,i,n,s,o){return ai.startMessage(t),ai.addVersion(t,e),ai.addHeaderType(t,i),ai.addHeader(t,n),ai.addBodyLength(t,s),ai.addCustomMetadata(t,o),ai.endMessage(t)}};class hO extends ie{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return _p.startNull(e),_p.endNull(e)}visitInt(t,e){return xr.startInt(e),xr.addBitWidth(e,t.bitWidth),xr.addIsSigned(e,t.isSigned),xr.endInt(e)}visitFloat(t,e){return mi.startFloatingPoint(e),mi.addPrecision(e,t.precision),mi.endFloatingPoint(e)}visitBinary(t,e){return pp.startBinary(e),pp.endBinary(e)}visitLargeBinary(t,e){return yp.startLargeBinary(e),yp.endLargeBinary(e)}visitBool(t,e){return mp.startBool(e),mp.endBool(e)}visitUtf8(t,e){return bp.startUtf8(e),bp.endUtf8(e)}visitLargeUtf8(t,e){return gp.startLargeUtf8(e),gp.endLargeUtf8(e)}visitDecimal(t,e){return Ss.startDecimal(e),Ss.addScale(e,t.scale),Ss.addPrecision(e,t.precision),Ss.addBitWidth(e,t.bitWidth),Ss.endDecimal(e)}visitDate(t,e){return Ua.startDate(e),Ua.addUnit(e,t.unit),Ua.endDate(e)}visitTime(t,e){return zr.startTime(e),zr.addUnit(e,t.unit),zr.addBitWidth(e,t.bitWidth),zr.endTime(e)}visitTimestamp(t,e){const i=t.timezone&&e.createString(t.timezone)||void 0;return jr.startTimestamp(e),jr.addUnit(e,t.unit),i!==void 0&&jr.addTimezone(e,i),jr.endTimestamp(e)}visitInterval(t,e){return yi.startInterval(e),yi.addUnit(e,t.unit),yi.endInterval(e)}visitDuration(t,e){return za.startDuration(e),za.addUnit(e,t.unit),za.endDuration(e)}visitList(t,e){return vp.startList(e),vp.endList(e)}visitStruct(t,e){return Yn.startStruct_(e),Yn.endStruct_(e)}visitUnion(t,e){hr.startTypeIdsVector(e,t.typeIds.length);const i=hr.createTypeIdsVector(e,t.typeIds);return hr.startUnion(e),hr.addMode(e,t.mode),hr.addTypeIds(e,i),hr.endUnion(e)}visitDictionary(t,e){const i=this.visit(t.indices,e);return $i.startDictionaryEncoding(e),$i.addId(e,BigInt(t.id)),$i.addIsOrdered(e,t.isOrdered),i!==void 0&&$i.addIndexType(e,i),$i.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return ja.startFixedSizeBinary(e),ja.addByteWidth(e,t.byteWidth),ja.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return $a.startFixedSizeList(e),$a.addListSize(e,t.listSize),$a.endFixedSizeList(e)}visitMap(t,e){return Va.startMap(e),Va.addKeysSorted(e,t.keysSorted),Va.endMap(e)}}const Qu=new hO;function fO(r,t=new Map){return new Pe(pO(r,t),Ha(r.metadata),t)}function h0(r){return new Fr(r.count,f0(r.columns),d0(r.columns))}function dO(r){return new Ti(h0(r.data),r.id,r.isDelta)}function pO(r,t){return(r.fields||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function Fp(r,t){return(r.children||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function f0(r){return(r||[]).reduce((t,e)=>[...t,new vn(e.count,mO(e.VALIDITY)),...f0(e.children)],[])}function d0(r,t=[]){for(let e=-1,i=(r||[]).length;++et+ +(e===0),0)}function yO(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=Mp(r,Fp(r,t)),n=new Ce(r.name,o,r.nullable,Ha(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Pp(i):new Qo,a=new Zs(t.get(e),i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,Ha(r.metadata))):(i=(i=s.indexType)?Pp(i):new Qo,t.set(e,o=Mp(r,Fp(r,t))),a=new Zs(o,i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,Ha(r.metadata))),n||null}function Ha(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Pp(r){return new is(r.isSigned,r.bitWidth)}function Mp(r,t){const e=r.type.name;switch(e){case"NONE":return new pn;case"null":return new pn;case"binary":return new hl;case"largebinary":return new fl;case"utf8":return new dl;case"largeutf8":return new pl;case"bool":return new ml;case"list":return new xl((t||[])[0]);case"struct":return new sr(t||[]);case"struct_":return new sr(t||[])}switch(e){case"int":{const i=r.type;return new is(i.isSigned,i.bitWidth)}case"floatingpoint":{const i=r.type;return new cl(tr[i.precision])}case"decimal":{const i=r.type;return new yl(i.scale,i.precision,i.bitWidth)}case"date":{const i=r.type;return new gl(Hr[i.unit])}case"time":{const i=r.type;return new vl(zt[i.unit],i.bitWidth)}case"timestamp":{const i=r.type;return new _l(zt[i.unit],i.timezone)}case"interval":{const i=r.type;return new bl(Si[i.unit])}case"duration":{const i=r.type;return new wl(zt[i.unit])}case"union":{const i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new Sl(er[o],i.typeIds||[],t||[])}case"fixedsizebinary":{const i=r.type;return new Tl(i.byteWidth)}case"fixedsizelist":{const i=r.type;return new Il(i.listSize,(t||[])[0])}case"map":{const i=r.type;return new El((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var gO=Cv,vO=Qs;class or{static fromJSON(t,e){const i=new or(0,ke.V5,e);return i._createHeader=_O(t,e),i}static decode(t){t=new vO(ae(t));const e=en.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=new or(i,n,s);return o._createHeader=bO(e,s),o}static encode(t){const e=new gO;let i=-1;return t.isSchema()?i=Pe.encode(e,t.header()):t.isRecordBatch()?i=Fr.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ti.encode(e,t.header())),en.startMessage(e),en.addVersion(e,ke.V5),en.addHeader(e,i),en.addHeaderType(e,t.headerType),en.addBodyLength(e,BigInt(t.bodyLength)),en.finishMessageBuffer(e,en.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Pe)return new or(0,ke.V5,fe.Schema,t);if(t instanceof Fr)return new or(e,ke.V5,fe.RecordBatch,t);if(t instanceof Ti)return new or(e,ke.V5,fe.DictionaryBatch,t);throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===fe.Schema}isRecordBatch(){return this.headerType===fe.RecordBatch}isDictionaryBatch(){return this.headerType===fe.DictionaryBatch}constructor(t,e,i,n){this._version=e,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=we(t)}}class Fr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,i){this._nodes=e,this._buffers=i,this._length=we(t)}}class Ti{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,i=!1){this._data=t,this._isDelta=i,this._id=we(e)}}class vi{constructor(t,e){this.offset=we(t),this.length=we(e)}}class vn{constructor(t,e){this.length=we(t),this.nullCount=we(e)}}function _O(r,t){return()=>{switch(t){case fe.Schema:return Pe.fromJSON(r);case fe.RecordBatch:return Fr.fromJSON(r);case fe.DictionaryBatch:return Ti.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}function bO(r,t){return()=>{switch(t){case fe.Schema:return Pe.decode(r.header(new ui),new Map,r.version());case fe.RecordBatch:return Fr.decode(r.header(new Bi),r.version());case fe.DictionaryBatch:return Ti.decode(r.header(new ws),r.version())}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}Ce.encode=PO;Ce.decode=OO;Ce.fromJSON=yO;Pe.encode=FO;Pe.decode=wO;Pe.fromJSON=fO;Fr.encode=MO;Fr.decode=xO;Fr.fromJSON=h0;Ti.encode=DO;Ti.decode=SO;Ti.fromJSON=dO;vn.encode=RO;vn.decode=IO;vi.encode=NO;vi.decode=TO;function wO(r,t=new Map,e=ke.V5){const i=AO(r,t);return new Pe(i,Xa(r),t,e)}function xO(r,t=ke.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Fr(r.length(),EO(r),CO(r,t))}function SO(r,t=ke.V5){return new Ti(Fr.decode(r.data(),t),r.id(),r.isDelta())}function TO(r){return new vi(r.offset(),r.length())}function IO(r){return new vn(r.length(),r.nullCount())}function EO(r){const t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++iCe.encode(r,s));ui.startFieldsVector(r,e.length);const i=ui.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?ui.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return We.startKeyValue(r),We.addKey(r,a),We.addValue(r,l),We.endKeyValue(r)})):-1;return ui.startSchema(r),ui.addFields(r,i),ui.addEndianness(r,LO?Ks.Little:Ks.Big),n!==-1&&ui.addCustomMetadata(r,n),ui.endSchema(r)}function PO(r,t){let e=-1,i=-1,n=-1;const s=t.type;let o=t.typeId;At.isDictionary(s)?(o=s.dictionary.typeId,n=Qu.visit(s,r),i=Qu.visit(s.dictionary,r)):i=Qu.visit(s,r);const a=(s.children||[]).map(c=>Ce.encode(r,c)),l=Nr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Nr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const p=r.createString(`${c}`),f=r.createString(`${h}`);return We.startKeyValue(r),We.addKey(r,p),We.addValue(r,f),We.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Nr.startField(r),Nr.addType(r,i),Nr.addTypeType(r,o),Nr.addChildren(r,l),Nr.addNullable(r,!!t.nullable),e!==-1&&Nr.addName(r,e),n!==-1&&Nr.addDictionary(r,n),u!==-1&&Nr.addCustomMetadata(r,u),Nr.endField(r)}function MO(r,t){const e=t.nodes||[],i=t.buffers||[];Bi.startNodesVector(r,e.length);for(const o of e.slice().reverse())vn.encode(r,o);const n=r.endVector();Bi.startBuffersVector(r,i.length);for(const o of i.slice().reverse())vi.encode(r,o);const s=r.endVector();return Bi.startRecordBatch(r),Bi.addLength(r,BigInt(t.length)),Bi.addNodes(r,n),Bi.addBuffers(r,s),Bi.endRecordBatch(r)}function DO(r,t){const e=Fr.encode(r,t.data);return ws.startDictionaryBatch(r),ws.addId(r,BigInt(t.id)),ws.addIsDelta(r,t.isDelta),ws.addData(r,e),ws.endDictionaryBatch(r)}function RO(r,t){return Fv.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function NO(r,t){return Ov.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const LO=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),_f=r=>`Expected ${fe[r]} Message in stream, but was null or length 0.`,bf=r=>`Header pointer of flatbuffer-encoded ${fe[r]} Message is null or length 0.`,p0=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,m0=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class y0{constructor(t){this.source=t instanceof Pl?t:new Pl(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done||t.value===-1&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?De:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(_f(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=ae(this.source.read(t));if(e.byteLength[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(_f(t));return e.value}readSchema(){const t=fe.Schema,e=this.readMessage(t),i=e==null?void 0:e.header();if(!e||!i)throw new Error(bf(t));return i}}const iu=4,ph="ARROW1",Zo=new Uint8Array(ph.length);for(let r=0;rthis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return kr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return kr.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof Vr?t:rh(t)?VO(t):wv(t)?HO(t):rs(t)?Zt(this,void 0,void 0,function*(){return yield Vr.from(yield t)}):xv(t)||rf(t)||Sv(t)||no(t)?WO(new Js(t)):GO(new Pl(t))}static readAll(t){return t instanceof Vr?t.isSync()?Lp(t):Bp(t):rh(t)||ArrayBuffer.isView(t)||oa(t)||bv(t)?Lp(t):Bp(t)}}class Dl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return dr(this,arguments,function*(){yield Pt(yield*ts(bi(this[Symbol.iterator]())))})}}class Rl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return Zt(this,void 0,void 0,function*(){var t,e,i,n;const s=new Array;try{for(var o=!0,a=bi(this),l;l=yield a.next(),t=l.done,!t;o=!0){n=l.value,o=!1;const u=n;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(i=a.return)&&(yield i.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class v0 extends Dl{constructor(t){super(t),this._impl=t}}class zO extends Rl{constructor(t){super(t),this._impl=t}}class _0{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const i=this._loadVectors(t,e,this.schema.fields),n=se({type:new sr(this.schema.fields),length:t.length,children:i});return new fr(this.schema,n)}_loadDictionaryBatch(t,e){const{id:i,isDelta:n}=t,{dictionaries:s,schema:o}=this,a=s.get(i),l=o.dictionaries.get(i),u=this._loadVectors(t.data,e,[l]);return(a&&n?a.concat(new Me(u)):new Me(u)).memoize()}_loadVectors(t,e,i){return new a0(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}}class Nl extends _0{constructor(t,e){super(e),this._reader=rh(t)?new kO(this._handle=t):new y0(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=w0(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):De}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):De}next(){if(this.closed)return De;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new vf(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class Ll extends _0{constructor(t,e){super(e),this._reader=new BO(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Zt(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return Zt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=w0(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):De})}return(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):De})}next(){return Zt(this,void 0,void 0,function*(){if(this.closed)return De;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const i=t.header(),n=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new vf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class b0 extends Nl{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof Ap?t:new Ap(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-g0,i=t.readInt32(e),n=t.readAt(e-i,i);return Ko.decode(n)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Zt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Zt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Zt(this,void 0,void 0,function*(){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Zt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-g0,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return Ko.decode(n)})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?wf(t)?new v0(new b0(r.read())):new Dl(new Nl(r)):new Dl(new Nl(function*(){}()))}function WO(r){return Zt(this,void 0,void 0,function*(){const t=yield r.peek(ca+7&-8);return t&&t.byteLength>=4?wf(t)?new v0(new b0(yield r.read())):new Rl(new Ll(r)):new Rl(new Ll(function(){return dr(this,arguments,function*(){})}()))})}function HO(r){return Zt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Ml(r,t);return t>=UO&&wf(yield e.readAt(0,ca+7&-8))?new zO(new jO(e)):new Rl(new Ll(e))})}class Ne extends ie{static assemble(...t){const e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof fr?s.data.children:s.data),i=new Ne;return i.visitMany(e(t)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof Me)return this.visitMany(t.data),this;const{type:e}=t;if(!At.isDictionary(e)){const{length:i}=t;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(At.isUnion(e))this.nodes.push(new vn(i,0));else{const{nullCount:n}=t;At.isNull(e)||ti.call(this,n<=0?new Uint8Array(0):Cl(t.offset,i,t.nullBitmap)),this.nodes.push(new vn(i,n))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function ti(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new vi(this._byteLength,t)),this._byteLength+=t,this}function XO(r){var t;const{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(ti.call(this,n),e.mode===er.Sparse)return mh.call(this,r);if(e.mode===er.Dense){if(r.offset<=0)return ti.call(this,s),mh.call(this,r);{const o=new Int32Array(i),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],p=a[h],f=l[h];return u.slice(p,Math.min(i,f))}))}}return this}function YO(r){let t;return r.nullCount>=r.length?ti.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?ti.call(this,Cl(r.offset,r.length,t)):ti.call(this,Al(r.values))}function Yi(r){return ti.call(this,r.values.subarray(0,r.length*r.stride))}function nu(r){const{length:t,values:e,valueOffsets:i}=r,n=we(i[0]),s=we(i[t]),o=Math.min(s-n,e.byteLength-n);return ti.call(this,Iv(-n,t+1,i)),ti.call(this,e.subarray(n,n+o)),this}function xf(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:i,[t]:n}=e;return ti.call(this,Iv(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function mh(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}Ne.prototype.visitBool=YO;Ne.prototype.visitInt=Yi;Ne.prototype.visitFloat=Yi;Ne.prototype.visitUtf8=nu;Ne.prototype.visitLargeUtf8=nu;Ne.prototype.visitBinary=nu;Ne.prototype.visitLargeBinary=nu;Ne.prototype.visitFixedSizeBinary=Yi;Ne.prototype.visitDate=Yi;Ne.prototype.visitTimestamp=Yi;Ne.prototype.visitTime=Yi;Ne.prototype.visitDecimal=Yi;Ne.prototype.visitList=xf;Ne.prototype.visitStruct=mh;Ne.prototype.visitUnion=XO;Ne.prototype.visitInterval=Yi;Ne.prototype.visitDuration=Yi;Ne.prototype.visitFixedSizeList=xf;Ne.prototype.visitMap=xf;class x0 extends df{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}constructor(t){super(),this._position=0,this._started=!1,this._sink=new Wa,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,pr(t)||(t={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof t.autoDestroy=="boolean"?t.autoDestroy:!0,this._writeLegacyIpcFormat=typeof t.writeLegacyIpcFormat=="boolean"?t.writeLegacyIpcFormat:!1}toString(t=!1){return this._sink.toString(t)}toUint8Array(t=!1){return this._sink.toUint8Array(t)}writeAll(t){return rs(t)?t.then(e=>this.writeAll(e)):no(t)?Ef(this,t):If(this,t)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(t){return this._sink.toDOMStream(t)}toNodeStream(t){return this._sink.toNodeStream(t)}close(){return this.reset()._sink.close()}abort(t){return this.reset()._sink.abort(t)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(t=this._sink,e=null){return t===this._sink||t instanceof Wa?this._sink=t:(this._sink=new Wa,t&&SC(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&TC(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!e||!dh(e,this._schema))&&(e==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}write(t){let e=null;if(this._sink){if(t==null)return this.finish()&&void 0;if(t instanceof gn&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof fr&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!dh(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof fr?t instanceof vf||this._writeRecordBatch(t):t instanceof gn?this.writeAll(t.batches):oa(t)&&this.writeAll(t)}_writeMessage(t,e=8){const i=e-1,n=or.encode(t),s=n.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+i&~i,l=a-s-o;return t.headerType===fe.RecordBatch?this._recordBatchBlocks.push(new mn(a,t.bodyLength,this._position)):t.headerType===fe.DictionaryBatch&&this._dictionaryBlocks.push(new mn(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(n),this._writePadding(l)}_write(t){if(this._started){const e=ae(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(or.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Zo)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:i,bufferRegions:n,buffers:s}=Ne.assemble(t),o=new Fr(t.numRows,i,n),a=or.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,i=!1){const{byteLength:n,nodes:s,bufferRegions:o,buffers:a}=Ne.assemble(new Me([t])),l=new Fr(t.length,s,o),u=new Ti(l,e,i),c=or.from(u,n);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,i,n;for(let s=-1,o=t.length;++s0&&(this._write(e),(n=(i+7&-8)-i)>0&&this._writePadding(n));return this}_writeDictionaries(t){var e,i;for(const[n,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(n),l=(i=this._dictionaryDeltaOffsets.get(n))!==null&&i!==void 0?i:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,n,u>0);else if(li.writeAll(n)):no(t)?Ef(i,t):If(i,t)}}class Tf extends x0{static writeAll(t){const e=new Tf;return rs(t)?t.then(i=>e.writeAll(i)):no(t)?Ef(e,t):If(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,i=!1){if(!i&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,i)}_writeFooter(t){const e=Ko.encode(new Ko(t,ke.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function If(r,t){let e=t;t instanceof gn&&(e=t.batches,r.reset(void 0,t.schema));for(const i of e)r.write(i);return r.finish()}function Ef(r,t){return Zt(this,void 0,void 0,function*(){var e,i,n,s,o,a,l;try{for(e=!0,i=bi(t);n=yield i.next(),s=n.done,!s;e=!0){l=n.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return r.finish()})}function qO(r,t="stream"){return(t==="stream"?Sf:Tf).writeAll(r).toUint8Array(!0)}var QO=Object.create,S0=Object.defineProperty,KO=Object.getOwnPropertyDescriptor,ZO=Object.getOwnPropertyNames,JO=Object.getPrototypeOf,t2=Object.prototype.hasOwnProperty,e2=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),r2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ZO(t))!t2.call(r,n)&&n!==e&&S0(r,n,{get:()=>t[n],enumerable:!(i=KO(t,n))||i.enumerable});return r},i2=(r,t,e)=>(e=r!=null?QO(JO(r)):{},r2(!r||!r.__esModule?S0(e,"default",{value:r,enumerable:!0}):e,r)),n2=e2((r,t)=>{t.exports=Worker}),T0=(r=>(r[r.UNDEFINED=0]="UNDEFINED",r[r.AUTOMATIC=1]="AUTOMATIC",r[r.READ_ONLY=2]="READ_ONLY",r[r.READ_WRITE=3]="READ_WRITE",r))(T0||{}),s2=(r=>(r[r.IDENTIFIER=0]="IDENTIFIER",r[r.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",r[r.STRING_CONSTANT=2]="STRING_CONSTANT",r[r.OPERATOR=3]="OPERATOR",r[r.KEYWORD=4]="KEYWORD",r[r.COMMENT=5]="COMMENT",r))(s2||{}),o2=(r=>(r[r.NONE=0]="NONE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r))(o2||{}),a2=(r=>(r[r.NONE=0]="NONE",r[r.CONNECT=1]="CONNECT",r[r.DISCONNECT=2]="DISCONNECT",r[r.OPEN=3]="OPEN",r[r.QUERY=4]="QUERY",r[r.INSTANTIATE=5]="INSTANTIATE",r))(a2||{}),l2=(r=>(r[r.NONE=0]="NONE",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR",r[r.START=3]="START",r[r.RUN=4]="RUN",r[r.CAPTURE=5]="CAPTURE",r))(l2||{}),u2=(r=>(r[r.NONE=0]="NONE",r[r.WEB_WORKER=1]="WEB_WORKER",r[r.NODE_WORKER=2]="NODE_WORKER",r[r.BINDINGS=3]="BINDINGS",r[r.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",r))(u2||{}),c2=class{log(r){}},I0=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},h2=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(h2||{}),f2=class{constructor(r,t){this._bindings=r,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}async query(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let t=await this._bindings.runQuery(this._conn,r),e=Vr.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new gn(e)}async send(r,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r,t);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let i=new E0(this._bindings,this._conn,e),n=await Vr.from(i);return console.assert(n.isAsync()),console.assert(n.isStream()),n}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let t=await this._bindings.createPrepared(this._conn,r);return new d2(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=qO(r,"stream");await this.insertArrowFromIPCStream(e,t)}async insertArrowFromIPCStream(r,t){await this._bindings.insertArrowFromIPCStream(this._conn,r,t)}async insertCSVFromPath(r,t){await this._bindings.insertCSVFromPath(this._conn,r,t)}async insertJSONFromPath(r,t){await this._bindings.insertJSONFromPath(this._conn,r,t)}},E0=class{constructor(r,t,e){this.db=r,this.conn=t,this.header=e,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let r;return this._inFlight!=null?(r=await this._inFlight,this._inFlight=null):r=await this.db.fetchQueryResults(this.conn),this._depleted=r.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:r}}[Symbol.asyncIterator](){return this}},d2=class{constructor(r,t,e){this.bindings=r,this.connectionId=t,this.statementId=e}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...r){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,r),e=Vr.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new gn(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new E0(this.bindings,this.connectionId,t),i=await Vr.from(e);return console.assert(i.isAsync()),console.assert(i.isStream()),i}},p2=(r=>(r.CANCEL_PENDING_QUERY="CANCEL_PENDING_QUERY",r.CLOSE_PREPARED="CLOSE_PREPARED",r.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",r.REGISTER_OPFS_FILE_NAME="REGISTER_OPFS_FILE_NAME",r.CONNECT="CONNECT",r.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",r.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",r.CREATE_PREPARED="CREATE_PREPARED",r.DISCONNECT="DISCONNECT",r.DROP_FILE="DROP_FILE",r.DROP_FILES="DROP_FILES",r.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",r.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",r.FLUSH_FILES="FLUSH_FILES",r.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",r.GET_TABLE_NAMES="GET_TABLE_NAMES",r.GET_VERSION="GET_VERSION",r.GLOB_FILE_INFOS="GLOB_FILE_INFOS",r.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",r.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",r.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",r.INSTANTIATE="INSTANTIATE",r.OPEN="OPEN",r.PING="PING",r.POLL_PENDING_QUERY="POLL_PENDING_QUERY",r.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",r.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",r.REGISTER_FILE_URL="REGISTER_FILE_URL",r.RESET="RESET",r.RUN_PREPARED="RUN_PREPARED",r.RUN_QUERY="RUN_QUERY",r.SEND_PREPARED="SEND_PREPARED",r.START_PENDING_QUERY="START_PENDING_QUERY",r.TOKENIZE="TOKENIZE",r))(p2||{}),m2=(r=>(r.CONNECTION_INFO="CONNECTION_INFO",r.ERROR="ERROR",r.FEATURE_FLAGS="FEATURE_FLAGS",r.FILE_BUFFER="FILE_BUFFER",r.FILE_INFOS="FILE_INFOS",r.FILE_SIZE="FILE_SIZE",r.FILE_STATISTICS="FILE_STATISTICS",r.INSTANTIATE_PROGRESS="INSTANTIATE_PROGRESS",r.LOG="LOG",r.OK="OK",r.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",r.QUERY_PLAN="QUERY_PLAN",r.QUERY_RESULT="QUERY_RESULT",r.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",r.QUERY_RESULT_HEADER="QUERY_RESULT_HEADER",r.QUERY_RESULT_HEADER_OR_NULL="QUERY_RESULT_HEADER_OR_NULL",r.REGISTERED_FILE="REGISTERED_FILE",r.SCRIPT_TOKENS="SCRIPT_TOKENS",r.SUCCESS="SUCCESS",r.TABLE_NAMES="TABLE_NAMES",r.VERSION_STRING="VERSION_STRING",r))(m2||{}),ue=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,i)=>{this.promiseResolver=e,this.promiseRejecter=i})}};function Ya(r){switch(r.typeId){case L.Binary:return{sqlType:"binary"};case L.Bool:return{sqlType:"bool"};case L.Date:return{sqlType:"date"};case L.DateDay:return{sqlType:"date32[d]"};case L.DateMillisecond:return{sqlType:"date64[ms]"};case L.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case L.Float:return{sqlType:"float"};case L.Float16:return{sqlType:"float16"};case L.Float32:return{sqlType:"float32"};case L.Float64:return{sqlType:"float64"};case L.Int:return{sqlType:"int32"};case L.Int16:return{sqlType:"int16"};case L.Int32:return{sqlType:"int32"};case L.Int64:return{sqlType:"int64"};case L.Uint16:return{sqlType:"uint16"};case L.Uint32:return{sqlType:"uint32"};case L.Uint64:return{sqlType:"uint64"};case L.Uint8:return{sqlType:"uint8"};case L.IntervalDayTime:return{sqlType:"interval[dt]"};case L.IntervalYearMonth:return{sqlType:"interval[m]"};case L.List:return{sqlType:"list",valueType:Ya(r.valueType)};case L.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case L.Null:return{sqlType:"null"};case L.Utf8:return{sqlType:"utf8"};case L.Struct:return{sqlType:"struct",fields:r.children.map(t=>yh(t.name,t.type))};case L.Map:{let t=r;return{sqlType:"map",keyType:Ya(t.keyType),valueType:Ya(t.valueType)}}case L.Time:return{sqlType:"time[s]"};case L.TimeMicrosecond:return{sqlType:"time[us]"};case L.TimeMillisecond:return{sqlType:"time[ms]"};case L.TimeNanosecond:return{sqlType:"time[ns]"};case L.TimeSecond:return{sqlType:"time[s]"};case L.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case L.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case L.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case L.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case L.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function yh(r,t){let e=Ya(t);return e.name=r,e}var y2=new TextEncoder,g2=class{constructor(r,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((t,e)=>{this._workerShutdownResolver=t})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,t=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let e=this._nextMessageId++;return this._pendingRequests.set(e,r),this._worker.postMessage({messageId:e,type:r.type,data:r.data},t),await r.promise}onMessage(r){var t;let e=r.data;switch(e.type){case"LOG":{this._logger.log(e.data);return}case"INSTANTIATE_PROGRESS":{for(let n of this._onInstantiationProgress)n(e.data);return}}let i=this._pendingRequests.get(e.requestId);if(!i){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let n=new Error(e.data.message);n.name=e.data.name,(t=Object.getOwnPropertyDescriptor(n,"stack"))!=null&&t.writable&&(n.stack=e.data.stack),i.promiseRejecter(n);return}switch(i.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"REGISTER_OPFS_FILE_NAME":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(e.type=="OK"){i.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){i.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){i.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){i.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){i.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){i.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){i.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){i.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){i.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){i.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){i.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){i.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){i.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){i.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){i.promiseResolver(e.data);return}break}i.promiseRejecter(new Error("unexpected response type: ".concat(e.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new ue("RESET",null);return await this.postTask(r)}async ping(){let r=new ue("PING",null);await this.postTask(r)}async dropFile(r){let t=new ue("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new ue("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new ue("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=i=>{}){this._onInstantiationProgress.push(e);let i=new ue("INSTANTIATE",[r,t]);return await this.postTask(i)}async getVersion(){let r=new ue("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new ue("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new ue("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new ue("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new ue("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new f2(this,r)}async disconnect(r){let t=new ue("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new ue("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let i=new ue("START_PENDING_QUERY",[r,t,e]);return await this.postTask(i)}async pollPendingQuery(r){let t=new ue("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new ue("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new ue("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new ue("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new ue("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new ue("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let i=new ue("RUN_PREPARED",[r,t,e]);return await this.postTask(i)}async sendPrepared(r,t,e){let i=new ue("SEND_PREPARED",[r,t,e]);return await this.postTask(i)}async globFiles(r){let t=new ue("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=y2.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,i){t===void 0&&(t=r);let n=new ue("REGISTER_FILE_URL",[r,t,e,i]);await this.postTask(n)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new ue("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,i){let n=new ue("REGISTER_FILE_HANDLE",[r,t,e,i]);await this.postTask(n,[])}async registerOPFSFileName(r){let t=new ue("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new ue("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new ue("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new ue("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new ue("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let i=new ue("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(i,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(yh(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(i)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(yh(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(i)}};function v2(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}v2();var _2=(r=>(r[r.BUFFER=0]="BUFFER",r[r.NODE_FS=1]="NODE_FS",r[r.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",r[r.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",r[r.HTTP=4]="HTTP",r[r.S3=5]="S3",r))(_2||{}),b2=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),w2=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),x2=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),S2=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),T2={version:"1.29.1-dev68.0"},Cf=T2.version.split(".");Cf[0];Cf[1];Cf[2];var I2=()=>typeof navigator>"u",Ku=null,Zu=null,Ju=null,tc=null,ec=null;async function E2(){return Ku==null&&(Ku=typeof BigInt64Array<"u"),Zu==null&&(Zu=await w2()),Ju==null&&(Ju=await S2()),tc==null&&(tc=await x2()),ec==null&&(ec=await b2()),{bigInt64Array:Ku,crossOriginIsolated:I2()||globalThis.crossOriginIsolated||!1,wasmExceptions:Zu,wasmSIMD:tc,wasmThreads:Ju,wasmBulkMemory:ec}}async function kp(r){let t=await E2();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}i2(n2());const rc={},Mo={};function Lo(r,t){try{const i=(rc[r]||(rc[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return i in Mo?Mo[i]:Up(i,i.split(":"))}catch{if(r in Mo)return Mo[r];const e=r==null?void 0:r.match(C2);return e?Up(r,e.slice(1)):NaN}}const C2=/([+-]\d\d):?(\d\d)?/;function Up(r,t){const e=+t[0],i=+(t[1]||0);return Mo[r]=e>0?e*60+i:e*60-i}class Er extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Lo(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),C0(this),gh(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Er(...e,t):new Er(Date.now(),t)}withTimeZone(t){return new Er(+this,t)}getTimezoneOffset(){return-Lo(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),gh(this),+this}[Symbol.for("constructDateFrom")](t){return new Er(+new Date(t),this.timeZone)}}const zp=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!zp.test(r))return;const t=r.replace(zp,"$1UTC");Er.prototype[t]&&(r.startsWith("get")?Er.prototype[r]=function(){return this.internal[t]()}:(Er.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),A2(this),+this},Er.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),gh(this),+this}))});function gh(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function A2(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),C0(r)}function C0(r){const t=Lo(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const i=-new Date(+r).getTimezoneOffset(),n=-new Date(+e).getTimezoneOffset(),s=i-n,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=i-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=Lo(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,p=c-a;if(h&&p){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+p);const f=Lo(r.timeZone,r),y=l-f;y&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+y))}}const O2=new TextDecoder("utf-8"),F2=r=>O2.decode(r),P2=new TextEncoder,A0=r=>P2.encode(r),hi=r=>typeof r=="function",ha=r=>r!=null&&Object(r)===r,M2=r=>ha(r)&&hi(r.then),O0=r=>ha(r)&&hi(r[Symbol.iterator]),D2=r=>ha(r)&&hi(r[Symbol.asyncIterator]),R2=r=>ha(r)&&"done"in r&&"value"in r,N2=r=>ha(r)&&hi(r.clear)&&hi(r.bytes)&&hi(r.position)&&hi(r.setPosition)&&hi(r.capacity)&&hi(r.getBufferIdentifier)&&hi(r.createLong),Af=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function L2(r){const t=r[0]?[r[0]]:[];let e,i,n,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let n,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,i);for(const c=e.length;++lrr(Int8Array,r),U2=r=>rr(Int16Array,r),z2=r=>rr(Int32Array,r),j2=r=>rr(BigInt64Array,r),$2=r=>rr(Uint8Array,r),V2=r=>rr(Uint16Array,r),G2=r=>rr(Uint32Array,r),W2=r=>rr(BigUint64Array,r),H2=r=>rr(Float32Array,r),X2=r=>rr(Float64Array,r),Y2=r=>rr(Uint8ClampedArray,r),_h=r=>(r.next(),r);function*Oi(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Af?e(t):O0(t)?t:e(t);return yield*_h(function*(n){let s=null;do s=n.next(yield rr(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const q2=r=>Oi(Int8Array,r),Q2=r=>Oi(Int16Array,r),K2=r=>Oi(Int32Array,r),Z2=r=>Oi(Uint8Array,r),J2=r=>Oi(Uint16Array,r),tF=r=>Oi(Uint32Array,r),eF=r=>Oi(Float32Array,r),rF=r=>Oi(Float64Array,r),iF=r=>Oi(Uint8ClampedArray,r);function ii(r,t){return dr(this,arguments,function*(){if(M2(t))return yield Pt(yield Pt(yield*ts(bi(ii(r,yield Pt(t))))));const i=function(o){return dr(this,arguments,function*(){yield yield Pt(yield Pt(o))})},n=function(o){return dr(this,arguments,function*(){yield Pt(yield*ts(bi(_h(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Af?i(t):O0(t)?n(t):D2(t)?t:i(t);return yield Pt(yield*ts(bi(_h(function(o){return dr(this,arguments,function*(){let a=null;do a=yield Pt(o.next(yield yield Pt(rr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Pt(new r)})}const nF=r=>ii(Int8Array,r),sF=r=>ii(Int16Array,r),oF=r=>ii(Int32Array,r),aF=r=>ii(Uint8Array,r),lF=r=>ii(Uint16Array,r),uF=r=>ii(Uint32Array,r),cF=r=>ii(Float32Array,r),hF=r=>ii(Float64Array,r),fF=r=>ii(Uint8ClampedArray,r);function dF(r,t,e){if(r!==0){e=e.slice(0,t);for(let i=-1,n=e.length;++i0)do if(r[e]!==t[e])return!1;while(++eeo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const yF=Object.freeze(Object.defineProperty({__proto__:null,valueToString:eo},Symbol.toStringTag,{value:"Module"}));function ar(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function P0(r,t){return ar(r/t)+ar(r%t)/ar(t)}const M0=Symbol.for("isArrowBigNum");function ni(r,...t){return t.length===0?Object.setPrototypeOf(rr(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}ni.prototype[M0]=!0;ni.prototype.toJSON=function(){return`"${ro(this)}"`};ni.prototype.valueOf=function(r){return Of(this,r)};ni.prototype.toString=function(){return ro(this)};ni.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Of(this);case"string":return ro(this);case"default":return D0(this)}return ro(this)};function Gs(...r){return ni.apply(this,r)}function Ws(...r){return ni.apply(this,r)}function Jo(...r){return ni.apply(this,r)}Object.setPrototypeOf(Gs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ws.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Jo.prototype,Object.create(Uint32Array.prototype));Object.assign(Gs.prototype,ni.prototype,{constructor:Gs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ws.prototype,ni.prototype,{constructor:Ws,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Jo.prototype,ni.prototype,{constructor:Jo,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const gF=BigInt(4294967296)*BigInt(4294967296),vF=gF-BigInt(1);function Of(r,t){const{buffer:e,byteOffset:i,byteLength:n,signed:s}=r,o=new BigUint64Array(e,i,n/8),a=s&&o.at(-1)&BigInt(1)<=0)return ic(r);t=t.slice();let i=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Et.prototype);class jp extends Et{constructor(){super(W.Null)}toString(){return"Null"}}N0=Symbol.toStringTag;jp[N0]=(r=>r[Symbol.toStringTag]="Null")(jp.prototype);class $p extends Et{constructor(t,e){super(W.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}L0=Symbol.toStringTag;$p[L0]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))($p.prototype);class Vp extends Et{constructor(t){super(W.Float),this.precision=t}get ArrayType(){switch(this.precision){case Cr.HALF:return Uint16Array;case Cr.SINGLE:return Float32Array;case Cr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}B0=Symbol.toStringTag;Vp[B0]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Vp.prototype);class Gp extends Et{constructor(){super(W.Binary)}toString(){return"Binary"}}k0=Symbol.toStringTag;Gp[k0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Gp.prototype);class Wp extends Et{constructor(){super(W.LargeBinary)}toString(){return"LargeBinary"}}U0=Symbol.toStringTag;Wp[U0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Wp.prototype);class Hp extends Et{constructor(){super(W.Utf8)}toString(){return"Utf8"}}z0=Symbol.toStringTag;Hp[z0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Hp.prototype);class Xp extends Et{constructor(){super(W.LargeUtf8)}toString(){return"LargeUtf8"}}j0=Symbol.toStringTag;Xp[j0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(Xp.prototype);class Yp extends Et{constructor(){super(W.Bool)}toString(){return"Bool"}}$0=Symbol.toStringTag;Yp[$0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Yp.prototype);class qp extends Et{constructor(t,e,i=128){super(W.Decimal),this.scale=t,this.precision=e,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}V0=Symbol.toStringTag;qp[V0]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(qp.prototype);class Qp extends Et{constructor(t){super(W.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${_n[this.unit]}>`}get ArrayType(){return this.unit===_n.DAY?Int32Array:BigInt64Array}}G0=Symbol.toStringTag;Qp[G0]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Qp.prototype);class Kp extends Et{constructor(t,e){super(W.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${Jt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}W0=Symbol.toStringTag;Kp[W0]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Kp.prototype);class Zp extends Et{constructor(t,e){super(W.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Jt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}H0=Symbol.toStringTag;Zp[H0]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(Zp.prototype);class Jp extends Et{constructor(t){super(W.Interval),this.unit=t}toString(){return`Interval<${ns[this.unit]}>`}}X0=Symbol.toStringTag;Jp[X0]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Jp.prototype);class tm extends Et{constructor(t){super(W.Duration),this.unit=t}toString(){return`Duration<${Jt[this.unit]}>`}}Y0=Symbol.toStringTag;tm[Y0]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(tm.prototype);class em extends Et{constructor(t){super(W.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}q0=Symbol.toStringTag;em[q0]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(em.prototype);class bh extends Et{constructor(t){super(W.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}Q0=Symbol.toStringTag;bh[Q0]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(bh.prototype);class rm extends Et{constructor(t,e,i){super(W.Union),this.mode=t,this.children=i,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((n,s,o)=>(n[s]=o)&&n||n,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}K0=Symbol.toStringTag;rm[K0]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(rm.prototype);class im extends Et{constructor(t){super(W.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}Z0=Symbol.toStringTag;im[Z0]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(im.prototype);class nm extends Et{constructor(t,e){super(W.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}J0=Symbol.toStringTag;nm[J0]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(nm.prototype);class sm extends Et{constructor(t,e=!1){var i,n,s;if(super(W.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((i=t==null?void 0:t.type)===null||i===void 0)&&i.children)){const o=(n=t==null?void 0:t.type)===null||n===void 0?void 0:n.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}tb=Symbol.toStringTag;sm[tb]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(sm.prototype);const bF=(r=>()=>++r)(-1);class om extends Et{constructor(t,e,i,n){super(W.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?bF():ar(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}eb=Symbol.toStringTag;om[eb]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(om.prototype);function rb(r){const t=r;switch(r.typeId){case W.Decimal:return r.bitWidth/32;case W.Interval:return 1+t.unit;case W.FixedSizeList:return t.listSize;case W.FixedSizeBinary:return t.byteWidth;default:return 1}}class le{visitMany(t,...e){return t.map((i,n)=>this.visit(i,...e.map(s=>s[n])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return wF(this,t,e)}getVisitFnByTypeId(t,e=!0){return Ps(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function wF(r,t,e=!0){return typeof t=="number"?Ps(r,t,e):typeof t=="string"&&t in W?Ps(r,W[t],e):t&&t instanceof Et?Ps(r,am(t),e):t!=null&&t.type&&t.type instanceof Et?Ps(r,am(t.type),e):Ps(r,W.NONE,e)}function Ps(r,t,e=!0){let i=null;switch(t){case W.Null:i=r.visitNull;break;case W.Bool:i=r.visitBool;break;case W.Int:i=r.visitInt;break;case W.Int8:i=r.visitInt8||r.visitInt;break;case W.Int16:i=r.visitInt16||r.visitInt;break;case W.Int32:i=r.visitInt32||r.visitInt;break;case W.Int64:i=r.visitInt64||r.visitInt;break;case W.Uint8:i=r.visitUint8||r.visitInt;break;case W.Uint16:i=r.visitUint16||r.visitInt;break;case W.Uint32:i=r.visitUint32||r.visitInt;break;case W.Uint64:i=r.visitUint64||r.visitInt;break;case W.Float:i=r.visitFloat;break;case W.Float16:i=r.visitFloat16||r.visitFloat;break;case W.Float32:i=r.visitFloat32||r.visitFloat;break;case W.Float64:i=r.visitFloat64||r.visitFloat;break;case W.Utf8:i=r.visitUtf8;break;case W.LargeUtf8:i=r.visitLargeUtf8;break;case W.Binary:i=r.visitBinary;break;case W.LargeBinary:i=r.visitLargeBinary;break;case W.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case W.Date:i=r.visitDate;break;case W.DateDay:i=r.visitDateDay||r.visitDate;break;case W.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case W.Timestamp:i=r.visitTimestamp;break;case W.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case W.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case W.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case W.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case W.Time:i=r.visitTime;break;case W.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case W.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case W.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case W.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case W.Decimal:i=r.visitDecimal;break;case W.List:i=r.visitList;break;case W.Struct:i=r.visitStruct;break;case W.Union:i=r.visitUnion;break;case W.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case W.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case W.Dictionary:i=r.visitDictionary;break;case W.Interval:i=r.visitInterval;break;case W.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case W.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case W.Duration:i=r.visitDuration;break;case W.DurationSecond:i=r.visitDurationSecond||r.visitDuration;break;case W.DurationMillisecond:i=r.visitDurationMillisecond||r.visitDuration;break;case W.DurationMicrosecond:i=r.visitDurationMicrosecond||r.visitDuration;break;case W.DurationNanosecond:i=r.visitDurationNanosecond||r.visitDuration;break;case W.FixedSizeList:i=r.visitFixedSizeList;break;case W.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!e)return()=>null;throw new Error(`Unrecognized type '${W[t]}'`)}function am(r){switch(r.typeId){case W.Null:return W.Null;case W.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?W.Int8:W.Uint8;case 16:return e?W.Int16:W.Uint16;case 32:return e?W.Int32:W.Uint32;case 64:return e?W.Int64:W.Uint64}return W.Int}case W.Float:switch(r.precision){case Cr.HALF:return W.Float16;case Cr.SINGLE:return W.Float32;case Cr.DOUBLE:return W.Float64}return W.Float;case W.Binary:return W.Binary;case W.LargeBinary:return W.LargeBinary;case W.Utf8:return W.Utf8;case W.LargeUtf8:return W.LargeUtf8;case W.Bool:return W.Bool;case W.Decimal:return W.Decimal;case W.Time:switch(r.unit){case Jt.SECOND:return W.TimeSecond;case Jt.MILLISECOND:return W.TimeMillisecond;case Jt.MICROSECOND:return W.TimeMicrosecond;case Jt.NANOSECOND:return W.TimeNanosecond}return W.Time;case W.Timestamp:switch(r.unit){case Jt.SECOND:return W.TimestampSecond;case Jt.MILLISECOND:return W.TimestampMillisecond;case Jt.MICROSECOND:return W.TimestampMicrosecond;case Jt.NANOSECOND:return W.TimestampNanosecond}return W.Timestamp;case W.Date:switch(r.unit){case _n.DAY:return W.DateDay;case _n.MILLISECOND:return W.DateMillisecond}return W.Date;case W.Interval:switch(r.unit){case ns.DAY_TIME:return W.IntervalDayTime;case ns.YEAR_MONTH:return W.IntervalYearMonth}return W.Interval;case W.Duration:switch(r.unit){case Jt.SECOND:return W.DurationSecond;case Jt.MILLISECOND:return W.DurationMillisecond;case Jt.MICROSECOND:return W.DurationMicrosecond;case Jt.NANOSECOND:return W.DurationNanosecond}return W.Duration;case W.Map:return W.Map;case W.List:return W.List;case W.Struct:return W.Struct;case W.Union:switch(r.mode){case Ii.Dense:return W.DenseUnion;case Ii.Sparse:return W.SparseUnion}return W.Union;case W.FixedSizeBinary:return W.FixedSizeBinary;case W.FixedSizeList:return W.FixedSizeList;case W.Dictionary:return W.Dictionary}throw new Error(`Unrecognized type '${W[r.typeId]}'`)}le.prototype.visitInt8=null;le.prototype.visitInt16=null;le.prototype.visitInt32=null;le.prototype.visitInt64=null;le.prototype.visitUint8=null;le.prototype.visitUint16=null;le.prototype.visitUint32=null;le.prototype.visitUint64=null;le.prototype.visitFloat16=null;le.prototype.visitFloat32=null;le.prototype.visitFloat64=null;le.prototype.visitDateDay=null;le.prototype.visitDateMillisecond=null;le.prototype.visitTimestampSecond=null;le.prototype.visitTimestampMillisecond=null;le.prototype.visitTimestampMicrosecond=null;le.prototype.visitTimestampNanosecond=null;le.prototype.visitTimeSecond=null;le.prototype.visitTimeMillisecond=null;le.prototype.visitTimeMicrosecond=null;le.prototype.visitTimeNanosecond=null;le.prototype.visitDenseUnion=null;le.prototype.visitSparseUnion=null;le.prototype.visitIntervalDayTime=null;le.prototype.visitIntervalYearMonth=null;le.prototype.visitDuration=null;le.prototype.visitDurationSecond=null;le.prototype.visitDurationMillisecond=null;le.prototype.visitDurationMicrosecond=null;le.prototype.visitDurationNanosecond=null;const ib=new Float64Array(1),vs=new Uint32Array(ib.buffer);function Ff(r){const t=(r&31744)>>10,e=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return i*(e?Number.NaN:1/0);case 0:return i*(e?6103515625e-14*e:0)}return i*Math.pow(2,t-15)*(1+e)}function nb(r){if(r!==r)return 32256;ib[0]=r;const t=(vs[1]&2147483648)>>16&65535;let e=vs[1]&2146435072,i=0;return e>=1089470464?vs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(vs[1]&1048575)>>10):e<=1056964608?(i=1048576+(vs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(vs[1]&1048575)+512>>10),t|e|i&65535}const xF=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:nb,uint16ToFloat64:Ff},Symbol.toStringTag,{value:"Module"}));class Gt extends le{}function Yt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const SF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},sb=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},Pf=({values:r},t,e)=>{r[t]=e},ob=({values:r},t,e)=>{r[t]=nb(e)},IF=(r,t,e)=>{switch(r.type.precision){case Cr.HALF:return ob(r,t,e);case Cr.SINGLE:case Cr.DOUBLE:return Pf(r,t,e)}},ab=({values:r},t,e)=>{SF(r,t,e.valueOf())},lb=({values:r},t,e)=>{r[t]=BigInt(e)},EF=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},ub=({values:r,valueOffsets:t},e,i)=>sb(r,t,e,i),cb=({values:r,valueOffsets:t},e,i)=>sb(r,t,e,A0(i)),CF=(r,t,e)=>{r.type.unit===_n.DAY?ab(r,t,e):lb(r,t,e)},hb=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},fb=({values:r},t,e)=>{r[t]=BigInt(e)},db=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},pb=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},AF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return hb(r,t,e);case Jt.MILLISECOND:return fb(r,t,e);case Jt.MICROSECOND:return db(r,t,e);case Jt.NANOSECOND:return pb(r,t,e)}},mb=({values:r},t,e)=>{r[t]=e},yb=({values:r},t,e)=>{r[t]=e},gb=({values:r},t,e)=>{r[t]=e},vb=({values:r},t,e)=>{r[t]=e},OF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return mb(r,t,e);case Jt.MILLISECOND:return yb(r,t,e);case Jt.MICROSECOND:return gb(r,t,e);case Jt.NANOSECOND:return vb(r,t,e)}},FF=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},PF=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Ei.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=n[t],l=n[t+1];a{const i=r.children[0],{valueOffsets:n}=r,s=Ei.getVisitFn(i);let{[t]:o,[t+1]:a}=n;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(i,o,u),++o>=a)break},DF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),RF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),NF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),LF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),BF=(r,t,e)=>{const i=r.type.children.map(s=>Ei.getVisitFn(s.type)),n=e instanceof Map?NF(t,e):e instanceof Qe?RF(t,e):Array.isArray(e)?DF(t,e):LF(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},kF=(r,t,e)=>{r.type.mode===Ii.Dense?_b(r,t,e):bb(r,t,e)},_b=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ei.visit(n,r.valueOffsets[t],e)},bb=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ei.visit(n,t,e)},UF=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},zF=(r,t,e)=>{r.type.unit===ns.DAY_TIME?wb(r,t,e):xb(r,t,e)},wb=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},xb=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Sb=({values:r},t,e)=>{r[t]=e},Tb=({values:r},t,e)=>{r[t]=e},Ib=({values:r},t,e)=>{r[t]=e},Eb=({values:r},t,e)=>{r[t]=e},jF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return Sb(r,t,e);case Jt.MILLISECOND:return Tb(r,t,e);case Jt.MICROSECOND:return Ib(r,t,e);case Jt.NANOSECOND:return Eb(r,t,e)}},$F=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Ei.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${eo(t)}: ${eo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new VF(this[Zr],this[Hs])}}class VF{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[Zr].type.children.some(i=>i.name===e)}getOwnPropertyDescriptor(t,e){if(t[Zr].type.children.some(i=>i.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Zr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=Yr.visit(t[Zr].children[i],t[Hs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Zr].type.children.findIndex(s=>s.name===e);return n!==-1?(Ei.visit(t[Zr].children[n],t[Hs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}}const WF=new GF;class Lt extends le{}function Wt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const HF=(r,t)=>864e5*r[t],XF=(r,t)=>null,Cb=(r,t,e)=>{if(e+1>=t.length)return null;const i=ar(t[e]),n=ar(t[e+1]);return r.subarray(i,n)},YF=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<HF(r,t),Ob=({values:r},t)=>ar(r[t]),xn=({stride:r,values:t},e)=>t[r*e],qF=({stride:r,values:t},e)=>Ff(t[r*e]),Fb=({values:r},t)=>r[t],QF=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),Pb=({values:r,valueOffsets:t},e)=>Cb(r,t,e),Mb=({values:r,valueOffsets:t},e)=>{const i=Cb(r,t,e);return i!==null?F2(i):null},KF=({values:r},t)=>r[t],ZF=({type:r,values:t},e)=>r.precision!==Cr.HALF?t[e]:Ff(t[e]),JF=(r,t)=>r.type.unit===_n.DAY?Ab(r,t):Ob(r,t),Db=({values:r},t)=>1e3*ar(r[t]),Rb=({values:r},t)=>ar(r[t]),Nb=({values:r},t)=>P0(r[t],BigInt(1e3)),Lb=({values:r},t)=>P0(r[t],BigInt(1e6)),tP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Db(r,t);case Jt.MILLISECOND:return Rb(r,t);case Jt.MICROSECOND:return Nb(r,t);case Jt.NANOSECOND:return Lb(r,t)}},Bb=({values:r},t)=>r[t],kb=({values:r},t)=>r[t],Ub=({values:r},t)=>r[t],zb=({values:r},t)=>r[t],eP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Bb(r,t);case Jt.MILLISECOND:return kb(r,t);case Jt.MICROSECOND:return Ub(r,t);case Jt.NANOSECOND:return zb(r,t)}},rP=({values:r,stride:t},e)=>su.decimal(r.subarray(t*e,t*(e+1))),iP=(r,t)=>{const{valueOffsets:e,stride:i,children:n}=r,{[t*i]:s,[t*i+1]:o}=e,l=n[0].slice(s,o-s);return new Qe([l])},nP=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new Df(o.slice(n,s-n))},sP=(r,t)=>new Mf(r,t),oP=(r,t)=>r.type.mode===Ii.Dense?jb(r,t):$b(r,t),jb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return Yr.visit(i,r.valueOffsets[t])},$b=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return Yr.visit(i,t)},aP=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},lP=(r,t)=>r.type.unit===ns.DAY_TIME?Vb(r,t):Gb(r,t),Vb=({values:r},t)=>r.subarray(2*t,2*(t+1)),Gb=({values:r},t)=>{const e=r[t],i=new Int32Array(2);return i[0]=Math.trunc(e/12),i[1]=Math.trunc(e%12),i},Wb=({values:r},t)=>r[t],Hb=({values:r},t)=>r[t],Xb=({values:r},t)=>r[t],Yb=({values:r},t)=>r[t],uP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Wb(r,t);case Jt.MILLISECOND:return Hb(r,t);case Jt.MICROSECOND:return Xb(r,t);case Jt.NANOSECOND:return Yb(r,t)}},cP=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Qe([s])};Lt.prototype.visitNull=Wt(XF);Lt.prototype.visitBool=Wt(YF);Lt.prototype.visitInt=Wt(KF);Lt.prototype.visitInt8=Wt(xn);Lt.prototype.visitInt16=Wt(xn);Lt.prototype.visitInt32=Wt(xn);Lt.prototype.visitInt64=Wt(Fb);Lt.prototype.visitUint8=Wt(xn);Lt.prototype.visitUint16=Wt(xn);Lt.prototype.visitUint32=Wt(xn);Lt.prototype.visitUint64=Wt(Fb);Lt.prototype.visitFloat=Wt(ZF);Lt.prototype.visitFloat16=Wt(qF);Lt.prototype.visitFloat32=Wt(xn);Lt.prototype.visitFloat64=Wt(xn);Lt.prototype.visitUtf8=Wt(Mb);Lt.prototype.visitLargeUtf8=Wt(Mb);Lt.prototype.visitBinary=Wt(Pb);Lt.prototype.visitLargeBinary=Wt(Pb);Lt.prototype.visitFixedSizeBinary=Wt(QF);Lt.prototype.visitDate=Wt(JF);Lt.prototype.visitDateDay=Wt(Ab);Lt.prototype.visitDateMillisecond=Wt(Ob);Lt.prototype.visitTimestamp=Wt(tP);Lt.prototype.visitTimestampSecond=Wt(Db);Lt.prototype.visitTimestampMillisecond=Wt(Rb);Lt.prototype.visitTimestampMicrosecond=Wt(Nb);Lt.prototype.visitTimestampNanosecond=Wt(Lb);Lt.prototype.visitTime=Wt(eP);Lt.prototype.visitTimeSecond=Wt(Bb);Lt.prototype.visitTimeMillisecond=Wt(kb);Lt.prototype.visitTimeMicrosecond=Wt(Ub);Lt.prototype.visitTimeNanosecond=Wt(zb);Lt.prototype.visitDecimal=Wt(rP);Lt.prototype.visitList=Wt(iP);Lt.prototype.visitStruct=Wt(sP);Lt.prototype.visitUnion=Wt(oP);Lt.prototype.visitDenseUnion=Wt(jb);Lt.prototype.visitSparseUnion=Wt($b);Lt.prototype.visitDictionary=Wt(aP);Lt.prototype.visitInterval=Wt(lP);Lt.prototype.visitIntervalDayTime=Wt(Vb);Lt.prototype.visitIntervalYearMonth=Wt(Gb);Lt.prototype.visitDuration=Wt(uP);Lt.prototype.visitDurationSecond=Wt(Wb);Lt.prototype.visitDurationMillisecond=Wt(Hb);Lt.prototype.visitDurationMicrosecond=Wt(Xb);Lt.prototype.visitDurationNanosecond=Wt(Yb);Lt.prototype.visitFixedSizeList=Wt(cP);Lt.prototype.visitMap=Wt(nP);const Yr=new Lt,Ms=Symbol.for("keys"),Xs=Symbol.for("vals"),Ds=Symbol.for("kKeysAsStrings"),wh=Symbol.for("_kKeysAsStrings");class Df{constructor(t){return this[Ms]=new Qe([t.children[0]]).memoize(),this[Xs]=t.children[1],new Proxy(this,new fP)}get[Ds](){return this[wh]||(this[wh]=Array.from(this[Ms].toArray(),String))}[Symbol.iterator](){return new hP(this[Ms],this[Xs])}get size(){return this[Ms].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Ms],e=this[Xs],i={};for(let n=-1,s=t.length;++n`${eo(t)}: ${eo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class hP{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),Yr.visit(this.vals,t)]})}}class fP{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ds]}has(t,e){return t[Ds].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ds].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ds].indexOf(e);if(i!==-1){const n=Yr.visit(Reflect.get(t,Xs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ds].indexOf(e);return n!==-1?(Ei.visit(Reflect.get(t,Xs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}}Object.defineProperties(Df.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ms]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Xs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[wh]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let lm;function qb(r,t,e,i){const{length:n=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?n:e;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),on&&(o=n),i?i(r,s,o):[s,o]}const Qb=(r,t)=>r<0?t+r:r,um=r=>r!==r;function cs(r){if(typeof r!=="object"||r===null)return um(r)?um:e=>e===r;if(r instanceof Date){const e=r.valueOf();return i=>i instanceof Date?i.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?F0(r,e):!1:r instanceof Map?pP(r):Array.isArray(r)?dP(r):r instanceof Qe?mP(r):yP(r,!0)}function dP(r){const t=[];for(let e=-1,i=r.length;++e!1;const i=[];for(let n=-1,s=e.length;++n{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return gP(r,e);case Map:return cm(r,e,e.keys());case Df:case Mf:case Object:case void 0:return cm(r,e,t||Object.keys(e))}return e instanceof Qe?vP(r,e):!1}}function gP(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function bP(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):Zb(new au(e,r,t,null,Rf)).subarray(0,i)),n}return e}function Zb(r){const t=[];let e=0,i=0,n=0;for(const o of r)o&&(n|=1<0)&&(t[e++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class au{constructor(t,e,i,n,s){this.bytes=t,this.length=i,this.context=n,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,n=t+(t%8===0?0:8-t%8);return Bl(r,t,n)+Bl(r,i,e)+Jb(r,n>>3,i-n>>3)}function Jb(r,t,e){let i=0,n=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:n+e;for(;o-n>=4;)i+=qa(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=qa(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=qa(s.getUint8(n)),n+=1;return i}function qa(r){let t=Math.trunc(r);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const wP=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:au,getBit:Kb,getBool:Rf,packBools:Zb,popcnt_array:Jb,popcnt_bit_range:Bl,popcnt_uint32:qa,setBool:bP,truncateBitmap:xh},Symbol.toStringTag,{value:"Module"})),xP=-1;class ta{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return Et.isSparseUnion(t)?this.children.some(e=>e.nullable):Et.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:i,nullBitmap:n,typeIds:s}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Et.isUnion(this.type))return this.children.reduce((i,n)=>i+n.nullCount,0);let t=this._nullCount,e;return t<=xP&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Bl(e,this.offset,this.offset+this.length)),t}constructor(t,e,i,n,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1));let l;s instanceof ta?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=rb(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(Et.isUnion(e)){const i=e,n=this.children[i.typeIdToChildIndex[this.typeIds[t]]],s=i.mode===Ii.Dense?this.valueOffsets[t]:t;return n.getValid(s)}if(this.nullable&&this.nullCount>0){const i=this.offset+t;return(this.nullBitmap[i>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(xh(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];i=(h&u)!==0,s[c]=e?h|u:h&~u}return i!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,i=this.length,n=this._nullCount,s=this,o=this.children){return new ta(t,e,i,n,s,o,this.dictionary)}slice(t,e){const{stride:i,typeId:n,children:s}=this,o=+(this._nullCount===0)-1,a=n===16?i:1,l=this._sliceBuffers(t,e,i,n);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===W.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:i}=this,n=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);n[e>>3]=(1<0&&n.set(xh(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[zi.VALIDITY]=n,this.clone(this.type,0,t,i+(t-e),s)}_sliceBuffers(t,e,i,n){let s;const{buffers:o}=this;return(s=o[zi.TYPE])&&(o[zi.TYPE]=s.subarray(t,t+e)),(s=o[zi.OFFSET])&&(o[zi.OFFSET]=s.subarray(t,t+e+1))||(s=o[zi.DATA])&&(o[zi.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}}ta.prototype.children=Object.freeze([]);class hm{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function TP(r){return r.reduce((t,e)=>t+e.nullCount,0)}function IP(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function EP(r,t,e,i){const n=[];for(let s=-1,o=r.length;++s=i)break;if(e>=l+u)continue;if(l>=e&&l+u<=i){n.push(a);continue}const c=Math.max(0,e-l),h=Math.min(i-l,u);n.push(a.slice(c,h-c))}return n.length===0&&n.push(r[0].slice(0,0)),n}function Nf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function FP(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new au(e,r.offset+(t||0),r.length,e,Rf)){if(!n)return i;++i}return-1}function Kt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case W.Union:break;case W.Dictionary:break;default:return FP(r,e)}const i=Yr.getVisitFn(r),n=cs(t);for(let s=(e||0)-1,o=r.length;++s{const n=r.data[i];return n.values.subarray(0,n.length)[Symbol.iterator]()});let e=0;return new hm(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new PP(o)})}class PP{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ta)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:u}=iw[o.typeId],c=s[0];this.isValid=h=>tw(c,h),this.get=h=>a(c,h),this.set=(h,p)=>l(c,h,p),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,nw[o.typeId]),this._offsets=IP(s);break}this.data=s,this.type=o,this.stride=rb(o),this.numChildren=(n=(i=o.children)===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return SP(this.data)}get nullCount(){return TP(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${W[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(Qb(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return MP.visit(this)}concat(...t){return new Qe(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new Qe(qb(this,t,e,({data:i,_offsets:n},s,o)=>EP(i,n,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:i,stride:n,ArrayType:s}=this;switch(t.typeId){case W.Int:case W.Float:case W.Decimal:case W.Time:case W.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,i*n);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*n),o.offset),o.offset+=l*n,o),{array:new s(i*n),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Et.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Et.isDictionary(this.type)){const t=new kl(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return new kl(this)}unmemoize(){if(Et.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return this}}rw=Symbol.toStringTag;Qe[rw]=(r=>{r.type=Et.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(W).map(e=>W[e]).filter(e=>typeof e=="number"&&e!==W.NONE);for(const e of t){const i=Yr.getVisitFnByTypeId(e),n=Ei.getVisitFnByTypeId(e),s=dm.getVisitFnByTypeId(e);iw[e]={get:i,set:n,indexOf:s},nw[e]=Object.create(r,{isValid:{value:fm(tw)},get:{value:fm(Yr.getVisitFnByTypeId(e))},set:{value:CP(Ei.getVisitFnByTypeId(e))},indexOf:{value:AP(dm.getVisitFnByTypeId(e))}})}return"Vector"})(Qe.prototype);class kl extends Qe{constructor(t){super(t.data);const e=this.get,i=this.set,n=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){i.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new kl(n.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Qe(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const DP=65536;function Ls(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const io=8,Lf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class Bf{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Ls(this.buffer[3])} ${Ls(this.buffer[2])} ${Ls(this.buffer[1])} ${Ls(this.buffer[0])}`}static multiply(t,e){return new ci(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new ci(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return ci.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return ci.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new ci(e);for(let o=i?1:0;othis.compareFields(i,e[n]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function ur(r,t){return t instanceof r.constructor}function hs(r,t){return r===t||ur(r,t)}function Qi(r,t){return r===t||ur(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function lu(r,t){return r===t||ur(r,t)&&r.precision===t.precision}function NP(r,t){return r===t||ur(r,t)&&r.byteWidth===t.byteWidth}function kf(r,t){return r===t||ur(r,t)&&r.unit===t.unit}function fa(r,t){return r===t||ur(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function da(r,t){return r===t||ur(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function LP(r,t){return r===t||ur(r,t)&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}function BP(r,t){return r===t||ur(r,t)&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}function Uf(r,t){return r===t||ur(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Ci.compareManyFields(r.children,t.children)}function kP(r,t){return r===t||ur(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Ci.visit(r.indices,t.indices)&&Ci.visit(r.dictionary,t.dictionary)}function zf(r,t){return r===t||ur(r,t)&&r.unit===t.unit}function pa(r,t){return r===t||ur(r,t)&&r.unit===t.unit}function UP(r,t){return r===t||ur(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}function zP(r,t){return r===t||ur(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}Ut.prototype.visitNull=hs;Ut.prototype.visitBool=hs;Ut.prototype.visitInt=Qi;Ut.prototype.visitInt8=Qi;Ut.prototype.visitInt16=Qi;Ut.prototype.visitInt32=Qi;Ut.prototype.visitInt64=Qi;Ut.prototype.visitUint8=Qi;Ut.prototype.visitUint16=Qi;Ut.prototype.visitUint32=Qi;Ut.prototype.visitUint64=Qi;Ut.prototype.visitFloat=lu;Ut.prototype.visitFloat16=lu;Ut.prototype.visitFloat32=lu;Ut.prototype.visitFloat64=lu;Ut.prototype.visitUtf8=hs;Ut.prototype.visitLargeUtf8=hs;Ut.prototype.visitBinary=hs;Ut.prototype.visitLargeBinary=hs;Ut.prototype.visitFixedSizeBinary=NP;Ut.prototype.visitDate=kf;Ut.prototype.visitDateDay=kf;Ut.prototype.visitDateMillisecond=kf;Ut.prototype.visitTimestamp=fa;Ut.prototype.visitTimestampSecond=fa;Ut.prototype.visitTimestampMillisecond=fa;Ut.prototype.visitTimestampMicrosecond=fa;Ut.prototype.visitTimestampNanosecond=fa;Ut.prototype.visitTime=da;Ut.prototype.visitTimeSecond=da;Ut.prototype.visitTimeMillisecond=da;Ut.prototype.visitTimeMicrosecond=da;Ut.prototype.visitTimeNanosecond=da;Ut.prototype.visitDecimal=hs;Ut.prototype.visitList=LP;Ut.prototype.visitStruct=BP;Ut.prototype.visitUnion=Uf;Ut.prototype.visitDenseUnion=Uf;Ut.prototype.visitSparseUnion=Uf;Ut.prototype.visitDictionary=kP;Ut.prototype.visitInterval=zf;Ut.prototype.visitIntervalDayTime=zf;Ut.prototype.visitIntervalYearMonth=zf;Ut.prototype.visitDuration=pa;Ut.prototype.visitDurationSecond=pa;Ut.prototype.visitDurationMillisecond=pa;Ut.prototype.visitDurationMicrosecond=pa;Ut.prototype.visitDurationNanosecond=pa;Ut.prototype.visitFixedSizeList=UP;Ut.prototype.visitMap=zP;const Ci=new Ut;function jP(r,t){return Ci.compareSchemas(r,t)}function $P(r,t){return Ci.compareFields(r,t)}function VP(r,t){return Ci.visit(r,t)}const pm=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_F),RP),wP),xF),pF),_P),yF),{compareSchemas:jP,compareFields:$P,compareTypes:VP}),sw=6048e5,GP=864e5,mm=Symbol.for("constructDateFrom");function Gi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&mm in r?r[mm](t):r instanceof Date?new r.constructor(t):new Date(t)}function qr(r,t){return Gi(t||r,r)}let WP={};function uu(){return WP}function ea(r,t){var a,l,u,c;const e=uu(),i=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,n=qr(r,t==null?void 0:t.in),s=n.getDay(),o=(s=s.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function ym(r){const t=qr(r),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+r-+e}function HP(r,...t){const e=Gi.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function gm(r,t){const e=qr(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function XP(r,t,e){const[i,n]=HP(e==null?void 0:e.in,r,t),s=gm(i),o=gm(n),a=+s-ym(s),l=+o-ym(o);return Math.round((a-l)/GP)}function YP(r,t){const e=ow(r,t),i=Gi(r,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Ul(i)}function qP(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function QP(r){return!(!qP(r)&&typeof r!="number"||isNaN(+qr(r)))}function KP(r,t){const e=qr(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const ZP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},JP=(r,t,e)=>{let i;const n=ZP[r];return typeof n=="string"?i=n:t===1?i=n.one:i=n.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function nc(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const tM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iM={date:nc({formats:tM,defaultWidth:"full"}),time:nc({formats:eM,defaultWidth:"full"}),dateTime:nc({formats:rM,defaultWidth:"full"})},nM={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sM=(r,t,e,i)=>nM[r];function go(r){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let n;if(i==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;n=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;n=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return n[s]}}const oM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lM={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uM={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},cM={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hM={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fM=(r,t)=>{const e=Number(r),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},dM={ordinalNumber:fM,era:go({values:oM,defaultWidth:"wide"}),quarter:go({values:aM,defaultWidth:"wide",argumentCallback:r=>r-1}),month:go({values:lM,defaultWidth:"wide"}),day:go({values:uM,defaultWidth:"wide"}),dayPeriod:go({values:cM,defaultWidth:"wide",formattingValues:hM,defaultFormattingWidth:"wide"})};function vo(r){return(t,e={})=>{const i=e.width,n=i&&r.matchPatterns[i]||r.matchPatterns[r.defaultMatchWidth],s=t.match(n);if(!s)return null;const o=s[0],a=i&&r.parsePatterns[i]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?mM(a,h=>h.test(o)):pM(a,h=>h.test(o));let u;u=r.valueCallback?r.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function pM(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function mM(r,t){for(let e=0;e{const i=t.match(r.matchPattern);if(!i)return null;const n=i[0],s=t.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(n.length);return{value:o,rest:a}}}const gM=/^(\d+)(th|st|nd|rd)?/i,vM=/\d+/i,_M={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bM={any:[/^b/i,/^(a|c)/i]},wM={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xM={any:[/1/i,/2/i,/3/i,/4/i]},SM={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},TM={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},IM={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},EM={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},CM={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},AM={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},OM={ordinalNumber:yM({matchPattern:gM,parsePattern:vM,valueCallback:r=>parseInt(r,10)}),era:vo({matchPatterns:_M,defaultMatchWidth:"wide",parsePatterns:bM,defaultParseWidth:"any"}),quarter:vo({matchPatterns:wM,defaultMatchWidth:"wide",parsePatterns:xM,defaultParseWidth:"any",valueCallback:r=>r+1}),month:vo({matchPatterns:SM,defaultMatchWidth:"wide",parsePatterns:TM,defaultParseWidth:"any"}),day:vo({matchPatterns:IM,defaultMatchWidth:"wide",parsePatterns:EM,defaultParseWidth:"any"}),dayPeriod:vo({matchPatterns:CM,defaultMatchWidth:"any",parsePatterns:AM,defaultParseWidth:"any"})},FM={code:"en-US",formatDistance:JP,formatLong:iM,formatRelative:sM,localize:dM,match:OM,options:{weekStartsOn:0,firstWeekContainsDate:1}};function PM(r,t){const e=qr(r,t==null?void 0:t.in);return XP(e,KP(e))+1}function MM(r,t){const e=qr(r,t==null?void 0:t.in),i=+Ul(e)-+YP(e);return Math.round(i/sw)+1}function aw(r,t){var c,h,p,f;const e=qr(r,t==null?void 0:t.in),i=e.getFullYear(),n=uu(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(p=n.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,o=Gi((t==null?void 0:t.in)||r,0);o.setFullYear(i+1,0,s),o.setHours(0,0,0,0);const a=ea(o,t),l=Gi((t==null?void 0:t.in)||r,0);l.setFullYear(i,0,s),l.setHours(0,0,0,0);const u=ea(l,t);return+e>=+a?i+1:+e>=+u?i:i-1}function DM(r,t){var a,l,u,c;const e=uu(),i=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,n=aw(r,t),s=Gi((t==null?void 0:t.in)||r,0);return s.setFullYear(n,0,i),s.setHours(0,0,0,0),ea(s,t)}function RM(r,t){const e=qr(r,t==null?void 0:t.in),i=+ea(e,t)-+DM(e,t);return Math.round(i/sw)+1}function ve(r,t){const e=r<0?"-":"",i=Math.abs(r).toString().padStart(t,"0");return e+i}const rn={y(r,t){const e=r.getFullYear(),i=e>0?e:1-e;return ve(t==="yy"?i%100:i,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):ve(e+1,2)},d(r,t){return ve(r.getDate(),t.length)},a(r,t){const e=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(r,t){return ve(r.getHours()%12||12,t.length)},H(r,t){return ve(r.getHours(),t.length)},m(r,t){return ve(r.getMinutes(),t.length)},s(r,t){return ve(r.getSeconds(),t.length)},S(r,t){const e=t.length,i=r.getMilliseconds(),n=Math.trunc(i*Math.pow(10,e-3));return ve(n,t.length)}},_s={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vm={G:function(r,t,e){const i=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const i=r.getFullYear(),n=i>0?i:1-i;return e.ordinalNumber(n,{unit:"year"})}return rn.y(r,t)},Y:function(r,t,e,i){const n=aw(r,i),s=n>0?n:1-n;if(t==="YY"){const o=s%100;return ve(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):ve(s,t.length)},R:function(r,t){const e=ow(r);return ve(e,t.length)},u:function(r,t){const e=r.getFullYear();return ve(e,t.length)},Q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ve(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ve(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(r,t,e){const i=r.getMonth();switch(t){case"M":case"MM":return rn.M(r,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(r,t,e){const i=r.getMonth();switch(t){case"L":return String(i+1);case"LL":return ve(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(r,t,e,i){const n=RM(r,i);return t==="wo"?e.ordinalNumber(n,{unit:"week"}):ve(n,t.length)},I:function(r,t,e){const i=MM(r);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):ve(i,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):rn.d(r,t)},D:function(r,t,e){const i=PM(r);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):ve(i,t.length)},E:function(r,t,e){const i=r.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ve(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(n,{width:"short",context:"formatting"});case"eeee":default:return e.day(n,{width:"wide",context:"formatting"})}},c:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ve(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(n,{width:"narrow",context:"standalone"});case"cccccc":return e.day(n,{width:"short",context:"standalone"});case"cccc":default:return e.day(n,{width:"wide",context:"standalone"})}},i:function(r,t,e){const i=r.getDay(),n=i===0?7:i;switch(t){case"i":return String(n);case"ii":return ve(n,t.length);case"io":return e.ordinalNumber(n,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(r,t,e){const n=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(r,t,e){const i=r.getHours();let n;switch(i===12?n=_s.noon:i===0?n=_s.midnight:n=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(r,t,e){const i=r.getHours();let n;switch(i>=17?n=_s.evening:i>=12?n=_s.afternoon:i>=4?n=_s.morning:n=_s.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let i=r.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return rn.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):rn.H(r,t)},K:function(r,t,e){const i=r.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},k:function(r,t,e){let i=r.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):rn.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):rn.s(r,t)},S:function(r,t){return rn.S(r,t)},X:function(r,t,e){const i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return bm(i);case"XXXX":case"XX":return Vn(i);case"XXXXX":case"XXX":default:return Vn(i,":")}},x:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"x":return bm(i);case"xxxx":case"xx":return Vn(i);case"xxxxx":case"xxx":default:return Vn(i,":")}},O:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_m(i,":");case"OOOO":default:return"GMT"+Vn(i,":")}},z:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_m(i,":");case"zzzz":default:return"GMT"+Vn(i,":")}},t:function(r,t,e){const i=Math.trunc(+r/1e3);return ve(i,t.length)},T:function(r,t,e){return ve(+r,t.length)}};function _m(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=Math.trunc(i/60),s=i%60;return s===0?e+String(n):e+String(n)+t+ve(s,2)}function bm(r,t){return r%60===0?(r>0?"-":"+")+ve(Math.abs(r)/60,2):Vn(r,t)}function Vn(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=ve(Math.trunc(i/60),2),s=ve(i%60,2);return e+n+t+s}const wm=(r,t)=>{switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lw=(r,t)=>{switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},NM=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],i=e[1],n=e[2];if(!n)return wm(r,t);let s;switch(i){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",wm(i,t)).replace("{{time}}",lw(n,t))},LM={p:lw,P:NM},BM=/^D+$/,kM=/^Y+$/,UM=["D","DD","YY","YYYY"];function zM(r){return BM.test(r)}function jM(r){return kM.test(r)}function $M(r,t,e){const i=VM(r,t,e);if(console.warn(i),UM.includes(r))throw new RangeError(i)}function VM(r,t,e){const i=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const GM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HM=/^'([^]*?)'?$/,XM=/''/g,YM=/[a-zA-Z]/;function uw(r,t,e){var c,h,p,f;const i=uu(),n=i.locale??FM,s=i.firstWeekContainsDate??((h=(c=i.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=i.weekStartsOn??((f=(p=i.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,a=qr(r,e==null?void 0:e.in);if(!QP(a))throw new RangeError("Invalid time value");let l=t.match(WM).map(y=>{const g=y[0];if(g==="p"||g==="P"){const d=LM[g];return d(y,n.formatLong)}return y}).join("").match(GM).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:qM(y)};if(vm[g])return{isToken:!0,value:y};if(g.match(YM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:y}});n.localize.preprocessor&&(l=n.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:n};return l.map(y=>{if(!y.isToken)return y.value;const g=y.value;(jM(g)||zM(g))&&$M(g,t,String(r));const d=vm[g[0]];return d(a,g,n.localize,u)}).join("")}function qM(r){const t=r.match(HM);return t?t[1].replace(XM,"'"):r}function QM(r,t){return qr(r*1e3,t==null?void 0:t.in)}function KM(r,t){const e=ZM(t)?new t(0):Gi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function ZM(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function JM(r,t){let e=r.length;switch("string"){case"string":{if(t.length!==1)throw new Error("The 'chars' parameter should be a single character string.");for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function gr(r){return r==null}function tD(r){return r!=null}async function Sh(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await ln(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function eD(r){return gr(r)?!1:Et.isInt(r.type)&&!cw(r)||rD(r)}function rD(r){return gr(r)?!1:Et.isInt(r.type)&&r.type.isSigned===!1}function iD(r){return gr(r)?!1:Et.isFloat(r.type)??!1}function nD(r){return gr(r)?!1:Et.isDecimal(r.type)}function sD(r){return gr(r)?!1:Et.isBool(r.type)}function oD(r){return gr(r)?!1:Et.isDuration(r.type)}function cw(r){return gr(r)?!1:Et.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function aD(r){return gr(r)?!1:Et.isTimestamp(r.type)}function lD(r){return gr(r)?!1:Et.isDate(r.type)}function uD(r){return gr(r)?!1:Et.isTime(r.type)}function cD(r){return gr(r)?!1:Et.isList(r.type)||Et.isFixedSizeList(r.type)}function hD(r){return gr(r)?!1:Et.isStruct(r.type)||Et.isMap(r.type)}function fD(r){return gr(r)?!1:Et.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Et.isInterval(r.type)}function dD(r,t){let e;if(t===Jt.MILLISECOND)e=1e3;else if(t===Jt.MICROSECOND)e=1e3*1e3;else if(t===Jt.NANOSECOND)e=1e3*1e3*1e3;else return Number(r);return typeof r=="bigint"&&!Number.isSafeInteger(Number(r))?Number(r/BigInt(e)):Number(r)/e}function pD(r,t){var i;const e=dD(r,((i=t==null?void 0:t.type)==null?void 0:i.unit)??Jt.SECOND);return QM(e)}function mD(r,t){const e=pD(r,t);return uw(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function yD(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?uw(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function gD(r,t){var n;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const i=(n=t==null?void 0:t.type)==null?void 0:n.timezone;return typeof r=="number"?i?e=new Er(r,i):e=new Er(r):i?e=new Er(r,i):e=new Er(r),KM(e,Date)}function vD(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let i=pm.bigNumToString(new pm.BN(r)).padStart(e,"0");if(e===0)return i;let n="";i.startsWith("-")&&(n="-",i=i.slice(1));const s=i.slice(0,-e)||"0",o=JM(i.slice(-e),"0")||"";return`${n}${s}${o?`.${o}`:""}`}function _D(r){const t=r[0],e=r[1],i=[];return t!==0&&i.push(`${t} year${t>1?"s":""}`),e!==0&&i.push(`${e} month${e>1?"s":""}`),i.length?i.join(" "):"0 months"}function bD(r,t){var i,n,s,o;if(Et.isInterval(t==null?void 0:t.type))return _D(r);const e=t&&t.metadata.get("ARROW:extension:name");if(e&&e==="pandas.interval"){const a=JSON.parse(t.metadata.get("ARROW:extension:metadata")),{closed:l}=a,u=r.toJSON(),c=l==="both"||l==="left"?"[":"(",h=l==="both"||l==="right"?"]":")",p=Th(u.left,(n=(i=t.type)==null?void 0:i.children)==null?void 0:n[0]),f=Th(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+p}, ${f+h}`}return String(r)}function wD(r,t){return(t==null?void 0:t.type)instanceof bh?JSON.parse(JSON.stringify(r,(e,i)=>{if(tD(i))return typeof i=="bigint"?Number(i):i})):JSON.parse(JSON.stringify(r,(e,i)=>typeof i=="bigint"?Number(i):i))}function Th(r,t){if(gr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&lD(t))return yD(r);if(typeof r=="bigint"&&uD(t))return mD(Number(r),t);if(e&&aD(t))return gD(r,t);if(cw(t))throw new Error("Period type is not supported yet");if(fD(t))return bD(r,t);if(oD(t))throw new Error("Duration type is not supported yet");return nD(t)?vD(r,t):iD(t)&&Number.isFinite(r)||eD(t)?r:hD(t)||cD(t)?wD(r,t):sD(t)?!!r:String(r)}function xm(r){return((r.toArray()||[]).map(i=>i.toJSON())||[]).map(i=>(r.schema.fields.forEach(n=>i[n.name]=Th(i[n.name],n)),i))}var ra=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(ra||{});async function hw(r){const t=Cx(r,{logger:!1});let e,i;const n=await Sh();if(n==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await ln(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}i=await kp(await t.bundles),e=new Worker(i.mainWorker)}else if(n==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await ln(async()=>{const{getBundles:h}=await import("./default-node-CUehHPTd.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}i=await kp(await t.bundles);let l=i.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await ln(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${n}`);let s;t.logger===!0?s=new I0:t.logger===!1?s=new c2:s=t.logger;const o=new g2(s,e);if(await o.instantiate(i.mainModule,i.pthreadWorker),t.storage)switch(t.storage.type){case ra.ORIGIN_PRIVATE_FS:{try{let l=t.storage.path;l.startsWith("/")&&(l=l.slice(1)),await o.open({path:`opfs://${l}`,accessMode:t.storage.accessMode})}catch(l){throw await o.terminate(),await e.terminate(),l}break}case ra.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(l){throw await o.terminate(),await e.terminate(),l}break}}const a=await o.connect();return{worker:e,db:o,conn:a,query:async(l,u=[])=>{if(!u||u.length===0){const f=await a.query(l);return xm(f)}const c=await a.prepare(l),h=await c.query(...u),p=xm(h);return c.close(),p},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function xD(r,t){await(await r).conn.send("BEGIN TRANSACTION");try{const e=await t(r);return await(await r).conn.send("COMMIT"),e}catch(e){throw await(await r).conn.send("ROLLBACK"),e}}async function SD(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const i=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),i}catch(i){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),i}}const xt=Symbol.for("drizzle:entityKind");function lt(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,xt))throw new Error(`Class "${t.name??""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let e=Object.getPrototypeOf(r).constructor;if(e)for(;e;){if(xt in e&&e[xt]===t[xt])return!0;e=Object.getPrototypeOf(e)}return!1}var Mm;Mm=xt;class Ke{constructor(t,e){G(this,"name");G(this,"keyAsName");G(this,"primary");G(this,"notNull");G(this,"default");G(this,"defaultFn");G(this,"onUpdateFn");G(this,"hasDefault");G(this,"isUnique");G(this,"uniqueName");G(this,"uniqueType");G(this,"dataType");G(this,"columnType");G(this,"enumValues");G(this,"generated");G(this,"generatedIdentity");G(this,"config");this.table=t,this.config=e,this.name=e.name,this.keyAsName=e.keyAsName,this.notNull=e.notNull,this.default=e.default,this.defaultFn=e.defaultFn,this.onUpdateFn=e.onUpdateFn,this.hasDefault=e.hasDefault,this.primary=e.primaryKey,this.isUnique=e.isUnique,this.uniqueName=e.uniqueName,this.uniqueType=e.uniqueType,this.dataType=e.dataType,this.columnType=e.columnType,this.generated=e.generated,this.generatedIdentity=e.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}G(Ke,Mm,"Column");const Ys=Symbol.for("drizzle:Name");function TD(r,t){return`${r[Ys]}_${t.join("_")}_unique`}var Dm,Rm;class Ar extends(Rm=Ke,Dm=xt,Rm){constructor(t,e){e.uniqueName||(e.uniqueName=TD(t,[e.name])),super(t,e),this.table=t}}G(Ar,Dm,"PgColumn");const Sm=Symbol.for("drizzle:isPgEnum");function ID(r){return!!r&&typeof r=="function"&&Sm in r&&r[Sm]===!0}var Nm;Nm=xt;class Or{constructor(t,e,i,n=!1){this._={brand:"Subquery",sql:t,selectedFields:e,alias:i,isWith:n}}}G(Or,Nm,"Subquery");var Lm,Bm;class jf extends(Bm=Or,Lm=xt,Bm){}G(jf,Lm,"WithSubquery");const Pr={startActiveSpan(r,t){return t()}},He=Symbol.for("drizzle:ViewBaseConfig"),Qa=Symbol.for("drizzle:Schema"),Ih=Symbol.for("drizzle:Columns"),Tm=Symbol.for("drizzle:ExtraConfigColumns"),sc=Symbol.for("drizzle:OriginalName"),oc=Symbol.for("drizzle:BaseName"),zl=Symbol.for("drizzle:IsAlias"),Im=Symbol.for("drizzle:ExtraConfigBuilder"),ED=Symbol.for("drizzle:IsDrizzleTable");var km,Um,zm,jm,$m,Vm,Gm,Wm,Hm,Xm;Xm=xt,Hm=Ys,Wm=sc,Gm=Qa,Vm=Ih,$m=Tm,jm=oc,zm=zl,Um=ED,km=Im;class Tt{constructor(t,e,i){G(this,Hm);G(this,Wm);G(this,Gm);G(this,Vm);G(this,$m);G(this,jm);G(this,zm,!1);G(this,Um,!0);G(this,km);this[Ys]=this[sc]=t,this[Qa]=e,this[oc]=i}}G(Tt,Xm,"Table"),G(Tt,"Symbol",{Name:Ys,Schema:Qa,OriginalName:sc,Columns:Ih,ExtraConfigColumns:Tm,BaseName:oc,IsAlias:zl,ExtraConfigBuilder:Im});function qn(r){return r[Ys]}function ia(r){return`${r[Qa]??"public"}.${r[Ys]}`}function fw(r){return r!=null&&typeof r.getSQL=="function"}function CD(r){var e;const t={sql:"",params:[]};for(const i of r)t.sql+=i.sql,t.params.push(...i.params),(e=i.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...i.typings));return t}var Ym;Ym=xt;class Xe{constructor(t){G(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}G(Xe,Ym,"StringChunk");var qm;qm=xt;const Hn=class Hn{constructor(t){G(this,"decoder",dw);G(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Pr.startActiveSpan("drizzle.buildSQL",e=>{const i=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":i.sql,"drizzle.query.params":JSON.stringify(i.params)}),i})}buildQueryFromSourceParams(t,e){const i=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:n,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=i;return CD(t.map(c=>{var h;if(lt(c,Xe))return{sql:c.value.join(""),params:[]};if(lt(c,jl))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new Xe("(")];for(const[f,y]of c.entries())p.push(y),fr},pw={mapToDriverValue:r=>r};({...dw,...pw});var Km;Km=xt;class Wi{constructor(t,e=pw){G(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}G(Wi,Km,"Param");function X(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Xe(r[0]));for(const[i,n]of t.entries())e.push(n,new Xe(r[i+1]));return new Ft(e)}(r=>{function t(){return new Ft([])}r.empty=t;function e(l){return new Ft(l)}r.fromList=e;function i(l){return new Ft([new Xe(l)])}r.raw=i;function n(l,u){const c=[];for(const[h,p]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(p);return new Ft(c)}r.join=n;function s(l){return new jl(l)}r.identifier=s;function o(l){return new ss(l)}r.placeholder=o;function a(l,u){return new Wi(l,u)}r.param=a})(X||(X={}));(r=>{var e;e=xt;const i=class i{constructor(s,o){G(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}};G(i,e,"SQL.Aliased");let t=i;r.Aliased=t})(Ft||(Ft={}));var Zm;Zm=xt;class ss{constructor(t){this.name=t}getSQL(){return new Ft([this])}}G(ss,Zm,"Placeholder");function Em(r,t){return r.map(e=>{if(lt(e,ss)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(lt(e,Wi)&<(e.value,ss)){if(!(e.value.name in t))throw new Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const OD=Symbol.for("drizzle:IsDrizzleView");var Jm,ty,ey;ey=xt,ty=He,Jm=OD;class Sn{constructor({name:t,schema:e,selectedFields:i,query:n}){G(this,ty);G(this,Jm,!0);this[He]={name:t,originalName:t,schema:e,selectedFields:i,query:n,isExisting:!n,isAlias:!1}}getSQL(){return new Ft([this])}}G(Sn,ey,"View");Ke.prototype.getSQL=function(){return new Ft([this])};Tt.prototype.getSQL=function(){return new Ft([this])};Or.prototype.getSQL=function(){return new Ft([this])};var ry;ry=xt;class na{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}G(na,ry,"ColumnAliasProxyHandler");var iy;iy=xt;class cu{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===Tt.Symbol.IsAlias)return!0;if(e===Tt.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===Tt.Symbol.OriginalName)return this.alias;if(e===He)return{...t[He],name:this.alias,isAlias:!0};if(e===Tt.Symbol.Columns){const n=t[Tt.Symbol.Columns];if(!n)return n;const s={};return Object.keys(n).map(o=>{s[o]=new Proxy(n[o],new na(new Proxy(t,this)))}),s}const i=t[e];return lt(i,Ke)?new Proxy(i,new na(new Proxy(t,this))):i}}G(cu,iy,"TableAliasProxyHandler");function ac(r,t){return new Proxy(r,new cu(t,!1))}function Li(r,t){return new Proxy(r,new na(new Proxy(r.table,new cu(t,!1))))}function mw(r,t){return new Ft.Aliased($l(r.sql,t),r.fieldAlias)}function $l(r,t){return X.join(r.queryChunks.map(e=>lt(e,Ke)?Li(e,t):lt(e,Ft)?$l(e,t):lt(e,Ft.Aliased)?mw(e,t):e))}var ny,sy;class $f extends(sy=Error,ny=xt,sy){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}G($f,ny,"DrizzleError");var oy,ay;class yw extends(ay=$f,oy=xt,ay){constructor(){super({message:"Rollback"})}}G(yw,oy,"TransactionRollbackError");function yr(r,t){return AD(t)&&!fw(r)&&!lt(r,Wi)&&!lt(r,ss)&&!lt(r,Ke)&&!lt(r,Tt)&&!lt(r,Sn)?new Wi(r,t):r}const gw=(r,t)=>X`${r} = ${yr(t,r)}`,FD=(r,t)=>X`${r} <> ${yr(t,r)}`;function Eh(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Xe("("),X.join(t,new Xe(" and ")),new Xe(")")])}function PD(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Xe("("),X.join(t,new Xe(" or ")),new Xe(")")])}function MD(r){return X`not ${r}`}const DD=(r,t)=>X`${r} > ${yr(t,r)}`,RD=(r,t)=>X`${r} >= ${yr(t,r)}`,ND=(r,t)=>X`${r} < ${yr(t,r)}`,LD=(r,t)=>X`${r} <= ${yr(t,r)}`;function BD(r,t){return Array.isArray(t)?t.length===0?X`false`:X`${r} in ${t.map(e=>yr(e,r))}`:X`${r} in ${yr(t,r)}`}function kD(r,t){return Array.isArray(t)?t.length===0?X`true`:X`${r} not in ${t.map(e=>yr(e,r))}`:X`${r} not in ${yr(t,r)}`}function UD(r){return X`${r} is null`}function zD(r){return X`${r} is not null`}function jD(r){return X`exists ${r}`}function $D(r){return X`not exists ${r}`}function VD(r,t,e){return X`${r} between ${yr(t,r)} and ${yr(e,r)}`}function GD(r,t,e){return X`${r} not between ${yr(t,r)} and ${yr(e,r)}`}function WD(r,t){return X`${r} like ${t}`}function HD(r,t){return X`${r} not like ${t}`}function XD(r,t){return X`${r} ilike ${t}`}function YD(r,t){return X`${r} not ilike ${t}`}function qD(r){return X`${r} asc`}function QD(r){return X`${r} desc`}var ly;ly=xt;class vw{write(t){console.log(t)}}G(vw,ly,"ConsoleLogWriter");var uy;uy=xt;class _w{constructor(t){G(this,"writer");this.writer=(t==null?void 0:t.writer)??new vw}logQuery(t,e){const i=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),n=i.length?` -- params: [${i.join(", ")}]`:"";this.writer.write(`Query: ${t}${n}`)}}G(_w,uy,"DefaultLogger");var cy;cy=xt;class bw{logQuery(){}}G(bw,cy,"NoopLogger");var hy,fy;fy=xt,hy=Symbol.toStringTag;class Tn{constructor(){G(this,hy,"QueryPromise")}catch(t){return this.then(void 0,t)}finally(t){return this.then(e=>(t==null||t(),e),e=>{throw t==null||t(),e})}then(t,e){return this.execute().then(t,e)}}G(Tn,fy,"QueryPromise");function os(r,t){return Object.entries(r).reduce((e,[i,n])=>{if(typeof i!="string")return e;const s=t?[...t,i]:[i];return lt(n,Ke)||lt(n,Ft)||lt(n,Ft.Aliased)?e.push({path:s,field:n}):lt(n,Tt)?e.push(...os(n[Tt.Symbol.Columns],s)):e.push(...os(n,s)),e},[])}function Vf(r,t){const e=Object.keys(r),i=Object.keys(t);if(e.length!==i.length)return!1;for(const[n,s]of e.entries())if(s!==i[n])return!1;return!0}function ww(r,t){const e=Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>lt(n,Ft)||lt(n,Ke)?[i,n]:[i,new Wi(n,r[Tt.Symbol.Columns][i])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function KD(r,t){for(const e of t)for(const i of Object.getOwnPropertyNames(e.prototype))i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i)||Object.create(null))}function ZD(r){return r[Tt.Symbol.Columns]}function Wn(r){return lt(r,Or)?r._.alias:lt(r,Sn)?r[He].name:lt(r,Ft)?void 0:r[Tt.Symbol.IsAlias]?r[Tt.Symbol.Name]:r[Tt.Symbol.BaseName]}function JD(r){if(typeof r!="object"||r===null||r.constructor.name!=="Object")return!1;if("logger"in r){const t=typeof r.logger;return!(t!=="boolean"&&(t!=="object"||typeof r.logger.logQuery!="function")&&t!=="undefined")}if("schema"in r){const t=typeof r.schema;return!(t!=="object"&&t!=="undefined")}if("casing"in r){const t=typeof r.casing;return!(t!=="string"&&t!=="undefined")}if("mode"in r)return!(r.mode!=="default"||r.mode!=="planetscale"||r.mode!==void 0);if("connection"in r){const t=typeof r.connection;return!(t!=="string"&&t!=="object"&&t!=="undefined")}if("client"in r){const t=typeof r.client;return!(t!=="object"&&t!=="function"&&t!=="undefined")}return Object.keys(r).length===0}var dy,py;class xw extends(py=Ar,dy=xt,py){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}G(xw,dy,"PgDate");var my,yy;class Sw extends(yy=Ar,my=xt,yy){getSQLType(){return"date"}}G(Sw,my,"PgDateString");var gy,vy;class Tw extends(vy=Ar,gy=xt,vy){constructor(t,e){super(t,e)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}G(Tw,gy,"PgJson");var _y,by;class Iw extends(by=Ar,_y=xt,by){constructor(t,e){super(t,e)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}G(Iw,_y,"PgJsonb");var wy,xy;class Ew extends(xy=Ar,wy=xt,xy){constructor(e,i){super(e,i);G(this,"precision");G(this,"scale");this.precision=i.precision,this.scale=i.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}G(Ew,wy,"PgNumeric");var Sy,Ty;class Cw extends(Ty=Ar,Sy=xt,Ty){constructor(e,i){super(e,i);G(this,"withTimezone");G(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}G(Cw,Sy,"PgTime");var Iy,Ey;class Aw extends(Ey=Ar,Iy=xt,Ey){constructor(e,i){super(e,i);G(this,"withTimezone");G(this,"precision");G(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));G(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}G(Aw,Iy,"PgTimestamp");var Cy,Ay;class Ow extends(Ay=Ar,Cy=xt,Ay){constructor(e,i){super(e,i);G(this,"withTimezone");G(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}G(Ow,Cy,"PgTimestampString");var Oy,Fy;class Fw extends(Fy=Ar,Oy=xt,Fy){getSQLType(){return"uuid"}}G(Fw,Oy,"PgUUID");const Cm=Symbol.for("drizzle:PgInlineForeignKeys"),Am=Symbol.for("drizzle:EnableRLS");var Py,My,Dy,Ry,Ny,Ly;class Br extends(Ly=Tt,Ny=xt,Ry=Cm,Dy=Am,My=Tt.Symbol.ExtraConfigBuilder,Py=Tt.Symbol.ExtraConfigColumns,Ly){constructor(){super(...arguments);G(this,Ry,[]);G(this,Dy,!1);G(this,My);G(this,Py,{})}}G(Br,Ny,"PgTable"),G(Br,"Symbol",Object.assign({},Tt.Symbol,{InlineForeignKeys:Cm,EnableRLS:Am}));var By;By=xt;class Pw{constructor(t,e){G(this,"columns");G(this,"name");this.columns=t,this.name=e}build(t){return new Mw(t,this.columns,this.name)}}G(Pw,By,"PgPrimaryKeyBuilder");var ky;ky=xt;class Mw{constructor(t,e,i){G(this,"columns");G(this,"name");this.table=t,this.columns=e,this.name=i}getName(){return this.name??`${this.table[Br.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}G(Mw,ky,"PgPrimaryKey");var Uy;Uy=xt;class Gf{constructor(t,e,i){G(this,"referencedTableName");G(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=i,this.referencedTableName=e[Tt.Symbol.Name]}}G(Gf,Uy,"Relation");var zy;zy=xt;class Dw{constructor(t,e){this.table=t,this.config=e}}G(Dw,zy,"Relations");var jy,$y;const Wl=class Wl extends($y=Gf,jy=xt,$y){constructor(t,e,i,n){super(t,e,i==null?void 0:i.relationName),this.config=i,this.isNullable=n}withFieldName(t){const e=new Wl(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};G(Wl,jy,"One");let as=Wl;var Vy,Gy;const Hl=class Hl extends(Gy=Gf,Vy=xt,Gy){constructor(t,e,i){super(t,e,i==null?void 0:i.relationName),this.config=i}withFieldName(t){const e=new Hl(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};G(Hl,Vy,"Many");let Vl=Hl;function tR(){return{and:Eh,between:VD,eq:gw,exists:jD,gt:DD,gte:RD,ilike:XD,inArray:BD,isNull:UD,isNotNull:zD,like:WD,lt:ND,lte:LD,ne:FD,not:MD,notBetween:GD,notExists:$D,notLike:HD,notIlike:YD,notInArray:kD,or:PD,sql:X}}function eR(){return{sql:X,asc:qD,desc:QD}}function rR(r,t){var s;Object.keys(r).length===1&&"default"in r&&!lt(r.default,Tt)&&(r=r.default);const e={},i={},n={};for(const[o,a]of Object.entries(r))if(lt(a,Tt)){const l=ia(a),u=i[l];e[l]=o,n[o]={tsName:o,dbName:a[Tt.Symbol.Name],schema:a[Tt.Symbol.Schema],columns:a[Tt.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[Tt.Symbol.Columns]))h.primary&&n[o].primaryKey.push(h);const c=(s=a[Tt.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[Tt.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))lt(h,Pw)&&n[o].primaryKey.push(...h.columns)}else if(lt(a,Dw)){const l=ia(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[p,f]of Object.entries(c))if(u){const y=n[u];y.relations[p]=f}else l in i||(i[l]={relations:{},primaryKey:h}),i[l].relations[p]=f}return{tables:n,tableNamesMap:e}}function iR(r){return function(e,i){return new as(r,e,i,(i==null?void 0:i.fields.reduce((n,s)=>n&&s.notNull,!0))??!1)}}function nR(r){return function(e,i){return new Vl(r,e,i)}}function sR(r,t,e){if(lt(e,as)&&e.config)return{fields:e.config.fields,references:e.config.references};const i=t[ia(e.referencedTable)];if(!i)throw new Error(`Table "${e.referencedTable[Tt.Symbol.Name]}" not found in schema`);const n=r[i];if(!n)throw new Error(`Table "${i}" not found in schema`);const s=e.sourceTable,o=t[ia(s)];if(!o)throw new Error(`Table "${s[Tt.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(n.relations))(e.relationName&&e!==l&&l.relationName===e.relationName||!e.relationName&&l.referencedTable===e.sourceTable)&&a.push(l);if(a.length>1)throw e.relationName?new Error(`There are multiple relations with name "${e.relationName}" in table "${i}"`):new Error(`There are multiple relations between "${i}" and "${e.sourceTable[Tt.Symbol.Name]}". Please specify relation name`);if(a[0]&<(a[0],as)&&a[0].config)return{fields:a[0].config.references,references:a[0].config.fields};throw new Error(`There is not enough information to infer relation "${o}.${e.fieldName}"`)}function oR(r){return{one:iR(r),many:nR(r)}}function Ch(r,t,e,i,n=s=>s){const s={};for(const[o,a]of i.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=lt(l,as)?c&&Ch(r,r[a.relationTableTsKey],c,a.selection,n):c.map(h=>Ch(r,r[a.relationTableTsKey],h,a.selection,n))}else{const l=n(e[o]),u=a.field;let c;lt(u,Ke)?c=u:lt(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Wy;Wy=xt;const Xl=class Xl{constructor(t){G(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===He)return{...t[He],selectedFields:new Proxy(t[He].selectedFields,this)};if(typeof e=="symbol")return t[e];const n=(lt(t,Or)?t._.selectedFields:lt(t,Sn)?t[He].selectedFields:t)[e];if(lt(n,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!n.isSelectionField)return n.sql;const s=n.clone();return s.isSelectionField=!0,s}if(lt(n,Ft)){if(this.config.sqlBehavior==="sql")return n;throw new Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return lt(n,Ke)?this.config.alias?new Proxy(n,new na(new Proxy(n.table,new cu(this.config.alias,this.config.replaceOriginalName??!1)))):n:typeof n!="object"||n===null?n:new Proxy(n,new Xl(this.config))}};G(Xl,Wy,"SelectionProxyHandler");let Je=Xl;var Hy,Xy;class Ah extends(Xy=Tn,Hy=xt,Xy){constructor(e,i,n,s){super();G(this,"config");G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=n,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[Tt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=os(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:qn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}G(Ah,Hy,"PgDelete");function aR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function lR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,i,n)=>{const s=n===0?i.toLowerCase():`${i[0].toUpperCase()}${i.slice(1)}`;return e+s},"")}function uR(r){return r}var Yy;Yy=xt;class Rw{constructor(t){G(this,"cache",{});G(this,"cachedTables",{});G(this,"convert");this.convert=t==="snake_case"?aR:t==="camelCase"?lR:uR}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[Tt.Symbol.Schema]??"public",i=t.table[Tt.Symbol.OriginalName],n=`${e}.${i}.${t.name}`;return this.cache[n]||this.cacheTable(t.table),this.cache[n]}cacheTable(t){const e=t[Tt.Symbol.Schema]??"public",i=t[Tt.Symbol.OriginalName],n=`${e}.${i}`;if(!this.cachedTables[n]){for(const s of Object.values(t[Tt.Symbol.Columns])){const o=`${n}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}G(Rw,Yy,"CasingCache");var qy,Qy;class Wf extends(Qy=Sn,qy=xt,Qy){}G(Wf,qy,"PgViewBase");var Ky;Ky=xt;class Bo{constructor(t){G(this,"casing");this.casing=new Rw(t==null?void 0:t.casing)}async migrate(t,e,i){const n=typeof i=="string"?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",s=typeof i=="string"?"drizzle":i.migrationsSchema??"drizzle",o=X` +]`}concat(...t){const e=this.schema,i=this.data.concat(t.flatMap(({data:n})=>n));return new $n(e,i.map(n=>new fr(e,n)))}slice(t,e){const i=this.schema;[t,e]=Y_({length:this.numRows},t,e);const n=Z_(this.data,this._offsets,t,e);return new $n(i,n.map(s=>new fr(i,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&ti.children[t]);if(e.length===0){const{type:i}=this.schema.fields[t],n=se({type:i,length:0,nullCount:0});e.push(n._changeLengthAndBackfillNullBitmap(this.numRows))}return new Me(e)}return null}setChild(t,e){var i;return this.setChildAt((i=this.schema.fields)===null||i===void 0?void 0:i.findIndex(n=>n.name===t),e)}setChildAt(t,e){let i=this.schema,n=[...this.batches];if(t>-1&&tthis.getChildAt(u));[s[t],a[t]]=[o,e],[i,n]=qu(i,a)}return new $n(i,n)}select(t){const e=this.schema.fields.reduce((i,n,s)=>i.set(n.name,s),new Map);return this.selectAt(t.map(i=>e.get(i)).filter(i=>i>-1))}selectAt(t){const e=this.schema.selectAt(t),i=this.batches.map(n=>n.selectAt(t));return new $n(e,i)}assign(t){const e=this.schema.fields,[i,n]=t.schema.fields.reduce((a,l,u)=>{const[c,h]=a,p=e.findIndex(f=>f.name===l.name);return~p?h[p]=u:c.push(u),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,n[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...i.map(a=>t.getChildAt(a))].filter(Boolean);return new $n(...qu(s,o))}};l0=Symbol.toStringTag;gn[l0]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=Ol(hf),r.get=Ol(mr.getVisitFn(L.Struct)),r.set=J_(Xr.getVisitFn(L.Struct)),r.indexOf=t0(Fl.getVisitFn(L.Struct)),"Table"))(gn.prototype);var u0;let fr=class Po{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Pe))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=se({nullCount:0,type:new sr(this.schema.fields),children:this.schema.fields.map(e=>se({type:e.type,nullCount:0}))})]=t,!(this.data instanceof Se))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=Op(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:i,children:n,length:s}=Object.keys(e).reduce((l,u,c)=>(l.children[c]=e[u],l.length=Math.max(l.length,e[u].length),l.fields[c]=Ce.new({name:u,type:e[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Pe(i),a=se({type:new sr(i),length:s,children:n,nullCount:0});[this.schema,this.data]=Op(o,a.children,s);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=c0(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return mr.visit(this.data,t)}at(t){return this.get(lf(t,this.numRows))}set(t,e){return Xr.visit(this.data,t,e)}indexOf(t,e){return Fl.visit(this.data,t,e)}[Symbol.iterator](){return ff.visit(new Me([this.data]))}toArray(){return[...this]}concat(...t){return new gn(this.schema,[this,...t])}slice(t,e){const[i]=new Me([this.data]).slice(t,e).data;return new Po(this.schema,i)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&tn.name===t),e)}setChildAt(t,e){let i=this.schema,n=this.data;if(t>-1&&ta.name===s);~o&&(n[o]=this.data.children[o])}return new Po(e,se({type:i,length:this.numRows,children:n}))}selectAt(t){const e=this.schema.selectAt(t),i=t.map(s=>this.data.children[s]).filter(Boolean),n=se({type:new sr(e.fields),length:this.numRows,children:i});return new Po(e,n)}};u0=Symbol.toStringTag;fr[u0]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(fr.prototype);function Op(r,t,e=t.reduce((i,n)=>Math.max(i,n.length),0)){var i;const n=[...r.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of r.fields.entries()){const u=t[a];(!u||u.length!==e)&&(n[a]=l.clone({nullable:!0}),s[a]=(i=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&i!==void 0?i:se({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[r.assign(n),se({type:new sr(n),length:e,children:s})]}function c0(r,t,e=new Map){var i,n;if(((i=r==null?void 0:r.length)!==null&&i!==void 0?i:0)>0&&(r==null?void 0:r.length)===(t==null?void 0:t.length))for(let s=-1,o=r.length;++sse({type:n.type})),i=se({type:new sr(t.fields),nullCount:0,children:e});super(t,i)}}let en=class ai{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(t,e){return(e||new ai).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+me),(e||new ai).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ke.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):fe.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const i=this.bb.__offset(this.bb_pos,12);return i?(e||new We).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+i)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,ke.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,fe.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let i=e.length-1;i>=0;i--)t.addOffset(e[i]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,i,n,s,o){return ai.startMessage(t),ai.addVersion(t,e),ai.addHeaderType(t,i),ai.addHeader(t,n),ai.addBodyLength(t,s),ai.addCustomMetadata(t,o),ai.endMessage(t)}};class hO extends ie{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return _p.startNull(e),_p.endNull(e)}visitInt(t,e){return xr.startInt(e),xr.addBitWidth(e,t.bitWidth),xr.addIsSigned(e,t.isSigned),xr.endInt(e)}visitFloat(t,e){return mi.startFloatingPoint(e),mi.addPrecision(e,t.precision),mi.endFloatingPoint(e)}visitBinary(t,e){return pp.startBinary(e),pp.endBinary(e)}visitLargeBinary(t,e){return yp.startLargeBinary(e),yp.endLargeBinary(e)}visitBool(t,e){return mp.startBool(e),mp.endBool(e)}visitUtf8(t,e){return bp.startUtf8(e),bp.endUtf8(e)}visitLargeUtf8(t,e){return gp.startLargeUtf8(e),gp.endLargeUtf8(e)}visitDecimal(t,e){return Ss.startDecimal(e),Ss.addScale(e,t.scale),Ss.addPrecision(e,t.precision),Ss.addBitWidth(e,t.bitWidth),Ss.endDecimal(e)}visitDate(t,e){return Ua.startDate(e),Ua.addUnit(e,t.unit),Ua.endDate(e)}visitTime(t,e){return zr.startTime(e),zr.addUnit(e,t.unit),zr.addBitWidth(e,t.bitWidth),zr.endTime(e)}visitTimestamp(t,e){const i=t.timezone&&e.createString(t.timezone)||void 0;return jr.startTimestamp(e),jr.addUnit(e,t.unit),i!==void 0&&jr.addTimezone(e,i),jr.endTimestamp(e)}visitInterval(t,e){return yi.startInterval(e),yi.addUnit(e,t.unit),yi.endInterval(e)}visitDuration(t,e){return za.startDuration(e),za.addUnit(e,t.unit),za.endDuration(e)}visitList(t,e){return vp.startList(e),vp.endList(e)}visitStruct(t,e){return Yn.startStruct_(e),Yn.endStruct_(e)}visitUnion(t,e){hr.startTypeIdsVector(e,t.typeIds.length);const i=hr.createTypeIdsVector(e,t.typeIds);return hr.startUnion(e),hr.addMode(e,t.mode),hr.addTypeIds(e,i),hr.endUnion(e)}visitDictionary(t,e){const i=this.visit(t.indices,e);return $i.startDictionaryEncoding(e),$i.addId(e,BigInt(t.id)),$i.addIsOrdered(e,t.isOrdered),i!==void 0&&$i.addIndexType(e,i),$i.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return ja.startFixedSizeBinary(e),ja.addByteWidth(e,t.byteWidth),ja.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return $a.startFixedSizeList(e),$a.addListSize(e,t.listSize),$a.endFixedSizeList(e)}visitMap(t,e){return Va.startMap(e),Va.addKeysSorted(e,t.keysSorted),Va.endMap(e)}}const Qu=new hO;function fO(r,t=new Map){return new Pe(pO(r,t),Ha(r.metadata),t)}function h0(r){return new Fr(r.count,f0(r.columns),d0(r.columns))}function dO(r){return new Ti(h0(r.data),r.id,r.isDelta)}function pO(r,t){return(r.fields||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function Fp(r,t){return(r.children||[]).filter(Boolean).map(e=>Ce.fromJSON(e,t))}function f0(r){return(r||[]).reduce((t,e)=>[...t,new vn(e.count,mO(e.VALIDITY)),...f0(e.children)],[])}function d0(r,t=[]){for(let e=-1,i=(r||[]).length;++et+ +(e===0),0)}function yO(r,t){let e,i,n,s,o,a;return!t||!(s=r.dictionary)?(o=Mp(r,Fp(r,t)),n=new Ce(r.name,o,r.nullable,Ha(r.metadata))):t.has(e=s.id)?(i=(i=s.indexType)?Pp(i):new Qo,a=new Zs(t.get(e),i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,Ha(r.metadata))):(i=(i=s.indexType)?Pp(i):new Qo,t.set(e,o=Mp(r,Fp(r,t))),a=new Zs(o,i,e,s.isOrdered),n=new Ce(r.name,a,r.nullable,Ha(r.metadata))),n||null}function Ha(r=[]){return new Map(r.map(({key:t,value:e})=>[t,e]))}function Pp(r){return new is(r.isSigned,r.bitWidth)}function Mp(r,t){const e=r.type.name;switch(e){case"NONE":return new pn;case"null":return new pn;case"binary":return new hl;case"largebinary":return new fl;case"utf8":return new dl;case"largeutf8":return new pl;case"bool":return new ml;case"list":return new xl((t||[])[0]);case"struct":return new sr(t||[]);case"struct_":return new sr(t||[])}switch(e){case"int":{const i=r.type;return new is(i.isSigned,i.bitWidth)}case"floatingpoint":{const i=r.type;return new cl(tr[i.precision])}case"decimal":{const i=r.type;return new yl(i.scale,i.precision,i.bitWidth)}case"date":{const i=r.type;return new gl(Hr[i.unit])}case"time":{const i=r.type;return new vl(zt[i.unit],i.bitWidth)}case"timestamp":{const i=r.type;return new _l(zt[i.unit],i.timezone)}case"interval":{const i=r.type;return new bl(Si[i.unit])}case"duration":{const i=r.type;return new wl(zt[i.unit])}case"union":{const i=r.type,[n,...s]=(i.mode+"").toLowerCase(),o=n.toUpperCase()+s.join("");return new Sl(er[o],i.typeIds||[],t||[])}case"fixedsizebinary":{const i=r.type;return new Tl(i.byteWidth)}case"fixedsizelist":{const i=r.type;return new Il(i.listSize,(t||[])[0])}case"map":{const i=r.type;return new El((t||[])[0],i.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var gO=Cv,vO=Qs;class or{static fromJSON(t,e){const i=new or(0,ke.V5,e);return i._createHeader=_O(t,e),i}static decode(t){t=new vO(ae(t));const e=en.getRootAsMessage(t),i=e.bodyLength(),n=e.version(),s=e.headerType(),o=new or(i,n,s);return o._createHeader=bO(e,s),o}static encode(t){const e=new gO;let i=-1;return t.isSchema()?i=Pe.encode(e,t.header()):t.isRecordBatch()?i=Fr.encode(e,t.header()):t.isDictionaryBatch()&&(i=Ti.encode(e,t.header())),en.startMessage(e),en.addVersion(e,ke.V5),en.addHeader(e,i),en.addHeaderType(e,t.headerType),en.addBodyLength(e,BigInt(t.bodyLength)),en.finishMessageBuffer(e,en.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Pe)return new or(0,ke.V5,fe.Schema,t);if(t instanceof Fr)return new or(e,ke.V5,fe.RecordBatch,t);if(t instanceof Ti)return new or(e,ke.V5,fe.DictionaryBatch,t);throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===fe.Schema}isRecordBatch(){return this.headerType===fe.RecordBatch}isDictionaryBatch(){return this.headerType===fe.DictionaryBatch}constructor(t,e,i,n){this._version=e,this._headerType=i,this.body=new Uint8Array(0),n&&(this._createHeader=()=>n),this._bodyLength=we(t)}}class Fr{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,i){this._nodes=e,this._buffers=i,this._length=we(t)}}class Ti{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,i=!1){this._data=t,this._isDelta=i,this._id=we(e)}}class vi{constructor(t,e){this.offset=we(t),this.length=we(e)}}class vn{constructor(t,e){this.length=we(t),this.nullCount=we(e)}}function _O(r,t){return()=>{switch(t){case fe.Schema:return Pe.fromJSON(r);case fe.RecordBatch:return Fr.fromJSON(r);case fe.DictionaryBatch:return Ti.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}function bO(r,t){return()=>{switch(t){case fe.Schema:return Pe.decode(r.header(new ui),new Map,r.version());case fe.RecordBatch:return Fr.decode(r.header(new Bi),r.version());case fe.DictionaryBatch:return Ti.decode(r.header(new ws),r.version())}throw new Error(`Unrecognized Message type: { name: ${fe[t]}, type: ${t} }`)}}Ce.encode=PO;Ce.decode=OO;Ce.fromJSON=yO;Pe.encode=FO;Pe.decode=wO;Pe.fromJSON=fO;Fr.encode=MO;Fr.decode=xO;Fr.fromJSON=h0;Ti.encode=DO;Ti.decode=SO;Ti.fromJSON=dO;vn.encode=RO;vn.decode=IO;vi.encode=NO;vi.decode=TO;function wO(r,t=new Map,e=ke.V5){const i=AO(r,t);return new Pe(i,Xa(r),t,e)}function xO(r,t=ke.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Fr(r.length(),EO(r),CO(r,t))}function SO(r,t=ke.V5){return new Ti(Fr.decode(r.data(),t),r.id(),r.isDelta())}function TO(r){return new vi(r.offset(),r.length())}function IO(r){return new vn(r.length(),r.nullCount())}function EO(r){const t=[];for(let e,i=-1,n=-1,s=r.nodesLength();++iCe.encode(r,s));ui.startFieldsVector(r,e.length);const i=ui.createFieldsVector(r,e),n=t.metadata&&t.metadata.size>0?ui.createCustomMetadataVector(r,[...t.metadata].map(([s,o])=>{const a=r.createString(`${s}`),l=r.createString(`${o}`);return We.startKeyValue(r),We.addKey(r,a),We.addValue(r,l),We.endKeyValue(r)})):-1;return ui.startSchema(r),ui.addFields(r,i),ui.addEndianness(r,LO?Ks.Little:Ks.Big),n!==-1&&ui.addCustomMetadata(r,n),ui.endSchema(r)}function PO(r,t){let e=-1,i=-1,n=-1;const s=t.type;let o=t.typeId;At.isDictionary(s)?(o=s.dictionary.typeId,n=Qu.visit(s,r),i=Qu.visit(s.dictionary,r)):i=Qu.visit(s,r);const a=(s.children||[]).map(c=>Ce.encode(r,c)),l=Nr.createChildrenVector(r,a),u=t.metadata&&t.metadata.size>0?Nr.createCustomMetadataVector(r,[...t.metadata].map(([c,h])=>{const p=r.createString(`${c}`),f=r.createString(`${h}`);return We.startKeyValue(r),We.addKey(r,p),We.addValue(r,f),We.endKeyValue(r)})):-1;return t.name&&(e=r.createString(t.name)),Nr.startField(r),Nr.addType(r,i),Nr.addTypeType(r,o),Nr.addChildren(r,l),Nr.addNullable(r,!!t.nullable),e!==-1&&Nr.addName(r,e),n!==-1&&Nr.addDictionary(r,n),u!==-1&&Nr.addCustomMetadata(r,u),Nr.endField(r)}function MO(r,t){const e=t.nodes||[],i=t.buffers||[];Bi.startNodesVector(r,e.length);for(const o of e.slice().reverse())vn.encode(r,o);const n=r.endVector();Bi.startBuffersVector(r,i.length);for(const o of i.slice().reverse())vi.encode(r,o);const s=r.endVector();return Bi.startRecordBatch(r),Bi.addLength(r,BigInt(t.length)),Bi.addNodes(r,n),Bi.addBuffers(r,s),Bi.endRecordBatch(r)}function DO(r,t){const e=Fr.encode(r,t.data);return ws.startDictionaryBatch(r),ws.addId(r,BigInt(t.id)),ws.addIsDelta(r,t.isDelta),ws.addData(r,e),ws.endDictionaryBatch(r)}function RO(r,t){return Fv.createFieldNode(r,BigInt(t.length),BigInt(t.nullCount))}function NO(r,t){return Ov.createBuffer(r,BigInt(t.offset),BigInt(t.length))}const LO=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),_f=r=>`Expected ${fe[r]} Message in stream, but was null or length 0.`,bf=r=>`Header pointer of flatbuffer-encoded ${fe[r]} Message is null or length 0.`,p0=(r,t)=>`Expected to read ${r} metadata bytes, but only read ${t}.`,m0=(r,t)=>`Expected to read ${r} bytes for message body, but only read ${t}.`;class y0{constructor(t){this.source=t instanceof Pl?t:new Pl(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done||t.value===-1&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?De:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(_f(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=ae(this.source.read(t));if(e.byteLength[...n,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(_f(t));return e.value}readSchema(){const t=fe.Schema,e=this.readMessage(t),i=e==null?void 0:e.header();if(!e||!i)throw new Error(bf(t));return i}}const iu=4,ph="ARROW1",Zo=new Uint8Array(ph.length);for(let r=0;rthis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return kr.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return kr.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof Vr?t:rh(t)?VO(t):wv(t)?HO(t):rs(t)?Zt(this,void 0,void 0,function*(){return yield Vr.from(yield t)}):xv(t)||rf(t)||Sv(t)||no(t)?WO(new Js(t)):GO(new Pl(t))}static readAll(t){return t instanceof Vr?t.isSync()?Lp(t):Bp(t):rh(t)||ArrayBuffer.isView(t)||oa(t)||bv(t)?Lp(t):Bp(t)}}class Dl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return dr(this,arguments,function*(){yield Pt(yield*ts(bi(this[Symbol.iterator]())))})}}class Rl extends Vr{constructor(t){super(t),this._impl=t}readAll(){return Zt(this,void 0,void 0,function*(){var t,e,i,n;const s=new Array;try{for(var o=!0,a=bi(this),l;l=yield a.next(),t=l.done,!t;o=!0){n=l.value,o=!1;const u=n;s.push(u)}}catch(u){e={error:u}}finally{try{!o&&!t&&(i=a.return)&&(yield i.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class v0 extends Dl{constructor(t){super(t),this._impl=t}}class zO extends Rl{constructor(t){super(t),this._impl=t}}class _0{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const i=this._loadVectors(t,e,this.schema.fields),n=se({type:new sr(this.schema.fields),length:t.length,children:i});return new fr(this.schema,n)}_loadDictionaryBatch(t,e){const{id:i,isDelta:n}=t,{dictionaries:s,schema:o}=this,a=s.get(i),l=o.dictionaries.get(i),u=this._loadVectors(t.data,e,[l]);return(a&&n?a.concat(new Me(u)):new Me(u)).memoize()}_loadVectors(t,e,i){return new a0(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(i)}}class Nl extends _0{constructor(t,e){super(e),this._reader=rh(t)?new kO(this._handle=t):new y0(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=w0(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):De}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):De}next(){if(this.closed)return De;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new vf(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class Ll extends _0{constructor(t,e){super(e),this._reader=new BO(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Zt(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return Zt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=w0(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):De})}return(t){return Zt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):De})}next(){return Zt(this,void 0,void 0,function*(){if(this.closed)return De;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const i=t.header(),n=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(i,n)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const i=t.header(),n=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(i,n);this.dictionaries.set(i.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new vf(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class b0 extends Nl{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof Ap?t:new Ap(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&this._handle.seek(i.offset)){const n=this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-g0,i=t.readInt32(e),n=t.readAt(e-i,i);return Ko.decode(n)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Zt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const i of this._footer.dictionaryBatches())i&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Zt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const i=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.RecordBatch);if(n!=null&&n.isRecordBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Zt(this,void 0,void 0,function*(){var e;const i=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(i&&(yield this._handle.seek(i.offset))){const n=yield this._reader.readMessage(fe.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){const s=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Zt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-g0,i=yield t.readInt32(e),n=yield t.readAt(e-i,i);return Ko.decode(n)})}_readNextMessageAndValidate(t){return Zt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?wf(t)?new v0(new b0(r.read())):new Dl(new Nl(r)):new Dl(new Nl(function*(){}()))}function WO(r){return Zt(this,void 0,void 0,function*(){const t=yield r.peek(ca+7&-8);return t&&t.byteLength>=4?wf(t)?new v0(new b0(yield r.read())):new Rl(new Ll(r)):new Rl(new Ll(function(){return dr(this,arguments,function*(){})}()))})}function HO(r){return Zt(this,void 0,void 0,function*(){const{size:t}=yield r.stat(),e=new Ml(r,t);return t>=UO&&wf(yield e.readAt(0,ca+7&-8))?new zO(new jO(e)):new Rl(new Ll(e))})}class Ne extends ie{static assemble(...t){const e=n=>n.flatMap(s=>Array.isArray(s)?e(s):s instanceof fr?s.data.children:s.data),i=new Ne;return i.visitMany(e(t)),i}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof Me)return this.visitMany(t.data),this;const{type:e}=t;if(!At.isDictionary(e)){const{length:i}=t;if(i>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(At.isUnion(e))this.nodes.push(new vn(i,0));else{const{nullCount:n}=t;At.isNull(e)||ti.call(this,n<=0?new Uint8Array(0):Cl(t.offset,i,t.nullBitmap)),this.nodes.push(new vn(i,n))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function ti(r){const t=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new vi(this._byteLength,t)),this._byteLength+=t,this}function XO(r){var t;const{type:e,length:i,typeIds:n,valueOffsets:s}=r;if(ti.call(this,n),e.mode===er.Sparse)return mh.call(this,r);if(e.mode===er.Dense){if(r.offset<=0)return ti.call(this,s),mh.call(this,r);{const o=new Int32Array(i),a=Object.create(null),l=Object.create(null);for(let u,c,h=-1;++h{const h=e.typeIds[c],p=a[h],f=l[h];return u.slice(p,Math.min(i,f))}))}}return this}function YO(r){let t;return r.nullCount>=r.length?ti.call(this,new Uint8Array(0)):(t=r.values)instanceof Uint8Array?ti.call(this,Cl(r.offset,r.length,t)):ti.call(this,Al(r.values))}function Yi(r){return ti.call(this,r.values.subarray(0,r.length*r.stride))}function nu(r){const{length:t,values:e,valueOffsets:i}=r,n=we(i[0]),s=we(i[t]),o=Math.min(s-n,e.byteLength-n);return ti.call(this,Iv(-n,t+1,i)),ti.call(this,e.subarray(n,n+o)),this}function xf(r){const{length:t,valueOffsets:e}=r;if(e){const{[0]:i,[t]:n}=e;return ti.call(this,Iv(-i,t+1,e)),this.visit(r.children[0].slice(i,n-i))}return this.visit(r.children[0])}function mh(r){return this.visitMany(r.type.children.map((t,e)=>r.children[e]).filter(Boolean))[0]}Ne.prototype.visitBool=YO;Ne.prototype.visitInt=Yi;Ne.prototype.visitFloat=Yi;Ne.prototype.visitUtf8=nu;Ne.prototype.visitLargeUtf8=nu;Ne.prototype.visitBinary=nu;Ne.prototype.visitLargeBinary=nu;Ne.prototype.visitFixedSizeBinary=Yi;Ne.prototype.visitDate=Yi;Ne.prototype.visitTimestamp=Yi;Ne.prototype.visitTime=Yi;Ne.prototype.visitDecimal=Yi;Ne.prototype.visitList=xf;Ne.prototype.visitStruct=mh;Ne.prototype.visitUnion=XO;Ne.prototype.visitInterval=Yi;Ne.prototype.visitDuration=Yi;Ne.prototype.visitFixedSizeList=xf;Ne.prototype.visitMap=xf;class x0 extends df{static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}constructor(t){super(),this._position=0,this._started=!1,this._sink=new Wa,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,pr(t)||(t={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof t.autoDestroy=="boolean"?t.autoDestroy:!0,this._writeLegacyIpcFormat=typeof t.writeLegacyIpcFormat=="boolean"?t.writeLegacyIpcFormat:!1}toString(t=!1){return this._sink.toString(t)}toUint8Array(t=!1){return this._sink.toUint8Array(t)}writeAll(t){return rs(t)?t.then(e=>this.writeAll(e)):no(t)?Ef(this,t):If(this,t)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(t){return this._sink.toDOMStream(t)}toNodeStream(t){return this._sink.toNodeStream(t)}close(){return this.reset()._sink.close()}abort(t){return this.reset()._sink.abort(t)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(t=this._sink,e=null){return t===this._sink||t instanceof Wa?this._sink=t:(this._sink=new Wa,t&&SC(t)?this.toDOMStream({type:"bytes"}).pipeTo(t):t&&TC(t)&&this.toNodeStream({objectMode:!1}).pipe(t)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!e||!dh(e,this._schema))&&(e==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=e,this._writeSchema(e))),this}write(t){let e=null;if(this._sink){if(t==null)return this.finish()&&void 0;if(t instanceof gn&&!(e=t.schema))return this.finish()&&void 0;if(t instanceof fr&&!(e=t.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(e&&!dh(e,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,e)}t instanceof fr?t instanceof vf||this._writeRecordBatch(t):t instanceof gn?this.writeAll(t.batches):oa(t)&&this.writeAll(t)}_writeMessage(t,e=8){const i=e-1,n=or.encode(t),s=n.byteLength,o=this._writeLegacyIpcFormat?4:8,a=s+o+i&~i,l=a-s-o;return t.headerType===fe.RecordBatch?this._recordBatchBlocks.push(new mn(a,t.bodyLength,this._position)):t.headerType===fe.DictionaryBatch&&this._dictionaryBlocks.push(new mn(a,t.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(a-o)),s>0&&this._write(n),this._writePadding(l)}_write(t){if(this._started){const e=ae(t);e&&e.byteLength>0&&(this._sink.write(e),this._position+=e.byteLength)}return this}_writeSchema(t){return this._writeMessage(or.from(t))}_writeFooter(t){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(Zo)}_writePadding(t){return t>0?this._write(new Uint8Array(t)):this}_writeRecordBatch(t){const{byteLength:e,nodes:i,bufferRegions:n,buffers:s}=Ne.assemble(t),o=new Fr(t.numRows,i,n),a=or.from(o,e);return this._writeDictionaries(t)._writeMessage(a)._writeBodyBuffers(s)}_writeDictionaryBatch(t,e,i=!1){const{byteLength:n,nodes:s,bufferRegions:o,buffers:a}=Ne.assemble(new Me([t])),l=new Fr(t.length,s,o),u=new Ti(l,e,i),c=or.from(u,n);return this._writeMessage(c)._writeBodyBuffers(a)}_writeBodyBuffers(t){let e,i,n;for(let s=-1,o=t.length;++s0&&(this._write(e),(n=(i+7&-8)-i)>0&&this._writePadding(n));return this}_writeDictionaries(t){var e,i;for(const[n,s]of t.dictionaries){const o=(e=s==null?void 0:s.data)!==null&&e!==void 0?e:[],a=this._seenDictionaries.get(n),l=(i=this._dictionaryDeltaOffsets.get(n))!==null&&i!==void 0?i:0;if(!a||a.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,n,u>0);else if(li.writeAll(n)):no(t)?Ef(i,t):If(i,t)}}class Tf extends x0{static writeAll(t){const e=new Tf;return rs(t)?t.then(i=>e.writeAll(i)):no(t)?Ef(e,t):If(e,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,e,i=!1){if(!i&&this._seenDictionaries.has(e))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,e,i)}_writeFooter(t){const e=Ko.encode(new Ko(t,ke.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(e)._write(Int32Array.of(e.byteLength))._writeMagic()}}function If(r,t){let e=t;t instanceof gn&&(e=t.batches,r.reset(void 0,t.schema));for(const i of e)r.write(i);return r.finish()}function Ef(r,t){return Zt(this,void 0,void 0,function*(){var e,i,n,s,o,a,l;try{for(e=!0,i=bi(t);n=yield i.next(),s=n.done,!s;e=!0){l=n.value,e=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!e&&!s&&(a=i.return)&&(yield a.call(i))}finally{if(o)throw o.error}}return r.finish()})}function qO(r,t="stream"){return(t==="stream"?Sf:Tf).writeAll(r).toUint8Array(!0)}var QO=Object.create,S0=Object.defineProperty,KO=Object.getOwnPropertyDescriptor,ZO=Object.getOwnPropertyNames,JO=Object.getPrototypeOf,t2=Object.prototype.hasOwnProperty,e2=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),r2=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ZO(t))!t2.call(r,n)&&n!==e&&S0(r,n,{get:()=>t[n],enumerable:!(i=KO(t,n))||i.enumerable});return r},i2=(r,t,e)=>(e=r!=null?QO(JO(r)):{},r2(!r||!r.__esModule?S0(e,"default",{value:r,enumerable:!0}):e,r)),n2=e2((r,t)=>{t.exports=Worker}),T0=(r=>(r[r.UNDEFINED=0]="UNDEFINED",r[r.AUTOMATIC=1]="AUTOMATIC",r[r.READ_ONLY=2]="READ_ONLY",r[r.READ_WRITE=3]="READ_WRITE",r))(T0||{}),s2=(r=>(r[r.IDENTIFIER=0]="IDENTIFIER",r[r.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",r[r.STRING_CONSTANT=2]="STRING_CONSTANT",r[r.OPERATOR=3]="OPERATOR",r[r.KEYWORD=4]="KEYWORD",r[r.COMMENT=5]="COMMENT",r))(s2||{}),o2=(r=>(r[r.NONE=0]="NONE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r))(o2||{}),a2=(r=>(r[r.NONE=0]="NONE",r[r.CONNECT=1]="CONNECT",r[r.DISCONNECT=2]="DISCONNECT",r[r.OPEN=3]="OPEN",r[r.QUERY=4]="QUERY",r[r.INSTANTIATE=5]="INSTANTIATE",r))(a2||{}),l2=(r=>(r[r.NONE=0]="NONE",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR",r[r.START=3]="START",r[r.RUN=4]="RUN",r[r.CAPTURE=5]="CAPTURE",r))(l2||{}),u2=(r=>(r[r.NONE=0]="NONE",r[r.WEB_WORKER=1]="WEB_WORKER",r[r.NODE_WORKER=2]="NODE_WORKER",r[r.BINDINGS=3]="BINDINGS",r[r.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",r))(u2||{}),c2=class{log(r){}},I0=class{constructor(r=2){this.level=r}log(r){r.level>=this.level&&console.log(r)}},h2=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(h2||{}),f2=class{constructor(r,t){this._bindings=r,this._conn=t}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}async query(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let t=await this._bindings.runQuery(this._conn,r),e=Vr.from(t);return console.assert(e.isSync(),"Reader is not sync"),console.assert(e.isFile(),"Reader is not file"),new gn(e)}async send(r,t=!1){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r,t);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let i=new E0(this._bindings,this._conn,e),n=await Vr.from(i);return console.assert(n.isAsync()),console.assert(n.isStream()),n}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let t=await this._bindings.createPrepared(this._conn,r);return new d2(this._bindings,this._conn,t)}async insertArrowTable(r,t){let e=qO(r,"stream");await this.insertArrowFromIPCStream(e,t)}async insertArrowFromIPCStream(r,t){await this._bindings.insertArrowFromIPCStream(this._conn,r,t)}async insertCSVFromPath(r,t){await this._bindings.insertCSVFromPath(this._conn,r,t)}async insertJSONFromPath(r,t){await this._bindings.insertJSONFromPath(this._conn,r,t)}},E0=class{constructor(r,t,e){this.db=r,this.conn=t,this.header=e,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let r;return this._inFlight!=null?(r=await this._inFlight,this._inFlight=null):r=await this.db.fetchQueryResults(this.conn),this._depleted=r.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:r}}[Symbol.asyncIterator](){return this}},d2=class{constructor(r,t,e){this.bindings=r,this.connectionId=t,this.statementId=e}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...r){let t=await this.bindings.runPrepared(this.connectionId,this.statementId,r),e=Vr.from(t);return console.assert(e.isSync()),console.assert(e.isFile()),new gn(e)}async send(...r){let t=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),e=new E0(this.bindings,this.connectionId,t),i=await Vr.from(e);return console.assert(i.isAsync()),console.assert(i.isStream()),i}},p2=(r=>(r.CANCEL_PENDING_QUERY="CANCEL_PENDING_QUERY",r.CLOSE_PREPARED="CLOSE_PREPARED",r.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",r.REGISTER_OPFS_FILE_NAME="REGISTER_OPFS_FILE_NAME",r.CONNECT="CONNECT",r.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",r.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",r.CREATE_PREPARED="CREATE_PREPARED",r.DISCONNECT="DISCONNECT",r.DROP_FILE="DROP_FILE",r.DROP_FILES="DROP_FILES",r.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",r.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",r.FLUSH_FILES="FLUSH_FILES",r.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",r.GET_TABLE_NAMES="GET_TABLE_NAMES",r.GET_VERSION="GET_VERSION",r.GLOB_FILE_INFOS="GLOB_FILE_INFOS",r.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",r.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",r.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",r.INSTANTIATE="INSTANTIATE",r.OPEN="OPEN",r.PING="PING",r.POLL_PENDING_QUERY="POLL_PENDING_QUERY",r.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",r.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",r.REGISTER_FILE_URL="REGISTER_FILE_URL",r.RESET="RESET",r.RUN_PREPARED="RUN_PREPARED",r.RUN_QUERY="RUN_QUERY",r.SEND_PREPARED="SEND_PREPARED",r.START_PENDING_QUERY="START_PENDING_QUERY",r.TOKENIZE="TOKENIZE",r))(p2||{}),m2=(r=>(r.CONNECTION_INFO="CONNECTION_INFO",r.ERROR="ERROR",r.FEATURE_FLAGS="FEATURE_FLAGS",r.FILE_BUFFER="FILE_BUFFER",r.FILE_INFOS="FILE_INFOS",r.FILE_SIZE="FILE_SIZE",r.FILE_STATISTICS="FILE_STATISTICS",r.INSTANTIATE_PROGRESS="INSTANTIATE_PROGRESS",r.LOG="LOG",r.OK="OK",r.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",r.QUERY_PLAN="QUERY_PLAN",r.QUERY_RESULT="QUERY_RESULT",r.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",r.QUERY_RESULT_HEADER="QUERY_RESULT_HEADER",r.QUERY_RESULT_HEADER_OR_NULL="QUERY_RESULT_HEADER_OR_NULL",r.REGISTERED_FILE="REGISTERED_FILE",r.SCRIPT_TOKENS="SCRIPT_TOKENS",r.SUCCESS="SUCCESS",r.TABLE_NAMES="TABLE_NAMES",r.VERSION_STRING="VERSION_STRING",r))(m2||{}),ue=class{constructor(r,t){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=t,this.promise=new Promise((e,i)=>{this.promiseResolver=e,this.promiseRejecter=i})}};function Ya(r){switch(r.typeId){case L.Binary:return{sqlType:"binary"};case L.Bool:return{sqlType:"bool"};case L.Date:return{sqlType:"date"};case L.DateDay:return{sqlType:"date32[d]"};case L.DateMillisecond:return{sqlType:"date64[ms]"};case L.Decimal:{let t=r;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case L.Float:return{sqlType:"float"};case L.Float16:return{sqlType:"float16"};case L.Float32:return{sqlType:"float32"};case L.Float64:return{sqlType:"float64"};case L.Int:return{sqlType:"int32"};case L.Int16:return{sqlType:"int16"};case L.Int32:return{sqlType:"int32"};case L.Int64:return{sqlType:"int64"};case L.Uint16:return{sqlType:"uint16"};case L.Uint32:return{sqlType:"uint32"};case L.Uint64:return{sqlType:"uint64"};case L.Uint8:return{sqlType:"uint8"};case L.IntervalDayTime:return{sqlType:"interval[dt]"};case L.IntervalYearMonth:return{sqlType:"interval[m]"};case L.List:return{sqlType:"list",valueType:Ya(r.valueType)};case L.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case L.Null:return{sqlType:"null"};case L.Utf8:return{sqlType:"utf8"};case L.Struct:return{sqlType:"struct",fields:r.children.map(t=>yh(t.name,t.type))};case L.Map:{let t=r;return{sqlType:"map",keyType:Ya(t.keyType),valueType:Ya(t.valueType)}}case L.Time:return{sqlType:"time[s]"};case L.TimeMicrosecond:return{sqlType:"time[us]"};case L.TimeMillisecond:return{sqlType:"time[ms]"};case L.TimeNanosecond:return{sqlType:"time[ns]"};case L.TimeSecond:return{sqlType:"time[s]"};case L.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case L.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case L.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case L.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case L.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function yh(r,t){let e=Ya(t);return e.name=r,e}var y2=new TextEncoder,g2=class{constructor(r,t=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),t!=null&&this.attach(t)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((t,e)=>{this._workerShutdownResolver=t})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,t=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let e=this._nextMessageId++;return this._pendingRequests.set(e,r),this._worker.postMessage({messageId:e,type:r.type,data:r.data},t),await r.promise}onMessage(r){var t;let e=r.data;switch(e.type){case"LOG":{this._logger.log(e.data);return}case"INSTANTIATE_PROGRESS":{for(let n of this._onInstantiationProgress)n(e.data);return}}let i=this._pendingRequests.get(e.requestId);if(!i){console.warn("unassociated response: [".concat(e.requestId,", ").concat(e.type.toString(),"]"));return}if(this._pendingRequests.delete(e.requestId),e.type=="ERROR"){let n=new Error(e.data.message);n.name=e.data.name,(t=Object.getOwnPropertyDescriptor(n,"stack"))!=null&&t.writable&&(n.stack=e.data.stack),i.promiseRejecter(n);return}switch(i.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"REGISTER_OPFS_FILE_NAME":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(e.type=="OK"){i.promiseResolver(e.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],e.type=="OK"){i.promiseResolver(e.data);return}break;case"GLOB_FILE_INFOS":if(e.type=="FILE_INFOS"){i.promiseResolver(e.data);return}break;case"GET_VERSION":if(e.type=="VERSION_STRING"){i.promiseResolver(e.data);return}break;case"GET_FEATURE_FLAGS":if(e.type=="FEATURE_FLAGS"){i.promiseResolver(e.data);return}break;case"GET_TABLE_NAMES":if(e.type=="TABLE_NAMES"){i.promiseResolver(e.data);return}break;case"TOKENIZE":if(e.type=="SCRIPT_TOKENS"){i.promiseResolver(e.data);return}break;case"COPY_FILE_TO_BUFFER":if(e.type=="FILE_BUFFER"){i.promiseResolver(e.data);return}break;case"EXPORT_FILE_STATISTICS":if(e.type=="FILE_STATISTICS"){i.promiseResolver(e.data);return}break;case"CONNECT":if(e.type=="CONNECTION_INFO"){i.promiseResolver(e.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(e.type=="QUERY_RESULT"){i.promiseResolver(e.data);return}break;case"SEND_PREPARED":if(e.type=="QUERY_RESULT_HEADER"){i.promiseResolver(e.data);return}break;case"START_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"POLL_PENDING_QUERY":if(e.type=="QUERY_RESULT_HEADER_OR_NULL"){i.promiseResolver(e.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],e.type=="SUCCESS"){i.promiseResolver(e.data);return}break;case"FETCH_QUERY_RESULTS":if(e.type=="QUERY_RESULT_CHUNK"){i.promiseResolver(e.data);return}break;case"CREATE_PREPARED":if(e.type=="PREPARED_STATEMENT_ID"){i.promiseResolver(e.data);return}break}i.promiseRejecter(new Error("unexpected response type: ".concat(e.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new ue("RESET",null);return await this.postTask(r)}async ping(){let r=new ue("PING",null);await this.postTask(r)}async dropFile(r){let t=new ue("DROP_FILE",r);return await this.postTask(t)}async dropFiles(){let r=new ue("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new ue("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,t=null,e=i=>{}){this._onInstantiationProgress.push(e);let i=new ue("INSTANTIATE",[r,t]);return await this.postTask(i)}async getVersion(){let r=new ue("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new ue("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let t=new ue("OPEN",r);await this.postTask(t)}async tokenize(r){let t=new ue("TOKENIZE",r);return await this.postTask(t)}async connectInternal(){let r=new ue("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new f2(this,r)}async disconnect(r){let t=new ue("DISCONNECT",r);await this.postTask(t)}async runQuery(r,t){let e=new ue("RUN_QUERY",[r,t]);return await this.postTask(e)}async startPendingQuery(r,t,e=!1){let i=new ue("START_PENDING_QUERY",[r,t,e]);return await this.postTask(i)}async pollPendingQuery(r){let t=new ue("POLL_PENDING_QUERY",r);return await this.postTask(t)}async cancelPendingQuery(r){let t=new ue("CANCEL_PENDING_QUERY",r);return await this.postTask(t)}async fetchQueryResults(r){let t=new ue("FETCH_QUERY_RESULTS",r);return await this.postTask(t)}async getTableNames(r,t){let e=new ue("GET_TABLE_NAMES",[r,t]);return await this.postTask(e)}async createPrepared(r,t){let e=new ue("CREATE_PREPARED",[r,t]);return await this.postTask(e)}async closePrepared(r,t){let e=new ue("CLOSE_PREPARED",[r,t]);await this.postTask(e)}async runPrepared(r,t,e){let i=new ue("RUN_PREPARED",[r,t,e]);return await this.postTask(i)}async sendPrepared(r,t,e){let i=new ue("SEND_PREPARED",[r,t,e]);return await this.postTask(i)}async globFiles(r){let t=new ue("GLOB_FILE_INFOS",r);return await this.postTask(t)}async registerFileText(r,t){let e=y2.encode(t);await this.registerFileBuffer(r,e)}async registerFileURL(r,t,e,i){t===void 0&&(t=r);let n=new ue("REGISTER_FILE_URL",[r,t,e,i]);await this.postTask(n)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,t){let e=new ue("REGISTER_FILE_BUFFER",[r,t]);await this.postTask(e,[t.buffer])}async registerFileHandle(r,t,e,i){let n=new ue("REGISTER_FILE_HANDLE",[r,t,e,i]);await this.postTask(n,[])}async registerOPFSFileName(r){let t=new ue("REGISTER_OPFS_FILE_NAME",[r]);await this.postTask(t,[])}async collectFileStatistics(r,t){let e=new ue("COLLECT_FILE_STATISTICS",[r,t]);await this.postTask(e,[])}async exportFileStatistics(r){let t=new ue("EXPORT_FILE_STATISTICS",r);return await this.postTask(t,[])}async copyFileToBuffer(r){let t=new ue("COPY_FILE_TO_BUFFER",r);return await this.postTask(t)}async copyFileToPath(r,t){let e=new ue("COPY_FILE_TO_PATH",[r,t]);await this.postTask(e)}async insertArrowFromIPCStream(r,t,e){if(t.length==0)return;let i=new ue("INSERT_ARROW_FROM_IPC_STREAM",[r,t,e]);await this.postTask(i,[t.buffer])}async insertCSVFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(yh(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_CSV_FROM_PATH",[r,t,e]);await this.postTask(i)}async insertJSONFromPath(r,t,e){if(e.columns!==void 0){let n=[];for(let s in e.columns){let o=e.columns[s];n.push(yh(s,o))}e.columnsFlat=n,delete e.columns}let i=new ue("IMPORT_JSON_FROM_PATH",[r,t,e]);await this.postTask(i)}};function v2(){let r=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),r.decode(t))}v2();var _2=(r=>(r[r.BUFFER=0]="BUFFER",r[r.NODE_FS=1]="NODE_FS",r[r.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",r[r.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",r[r.HTTP=4]="HTTP",r[r.S3=5]="S3",r))(_2||{}),b2=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),w2=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),x2=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),S2=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),T2={version:"1.29.1-dev68.0"},Cf=T2.version.split(".");Cf[0];Cf[1];Cf[2];var I2=()=>typeof navigator>"u",Ku=null,Zu=null,Ju=null,tc=null,ec=null;async function E2(){return Ku==null&&(Ku=typeof BigInt64Array<"u"),Zu==null&&(Zu=await w2()),Ju==null&&(Ju=await S2()),tc==null&&(tc=await x2()),ec==null&&(ec=await b2()),{bigInt64Array:Ku,crossOriginIsolated:I2()||globalThis.crossOriginIsolated||!1,wasmExceptions:Zu,wasmSIMD:tc,wasmThreads:Ju,wasmBulkMemory:ec}}async function kp(r){let t=await E2();if(t.wasmExceptions){if(t.wasmSIMD&&t.wasmThreads&&t.crossOriginIsolated&&r.coi)return{mainModule:r.coi.mainModule,mainWorker:r.coi.mainWorker,pthreadWorker:r.coi.pthreadWorker};if(r.eh)return{mainModule:r.eh.mainModule,mainWorker:r.eh.mainWorker,pthreadWorker:null}}return{mainModule:r.mvp.mainModule,mainWorker:r.mvp.mainWorker,pthreadWorker:null}}i2(n2());const rc={},Mo={};function Lo(r,t){try{const i=(rc[r]||(rc[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return i in Mo?Mo[i]:Up(i,i.split(":"))}catch{if(r in Mo)return Mo[r];const e=r==null?void 0:r.match(C2);return e?Up(r,e.slice(1)):NaN}}const C2=/([+-]\d\d):?(\d\d)?/;function Up(r,t){const e=+t[0],i=+(t[1]||0);return Mo[r]=e>0?e*60+i:e*60-i}class Er extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Lo(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),C0(this),gh(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new Er(...e,t):new Er(Date.now(),t)}withTimeZone(t){return new Er(+this,t)}getTimezoneOffset(){return-Lo(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),gh(this),+this}[Symbol.for("constructDateFrom")](t){return new Er(+new Date(t),this.timeZone)}}const zp=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!zp.test(r))return;const t=r.replace(zp,"$1UTC");Er.prototype[t]&&(r.startsWith("get")?Er.prototype[r]=function(){return this.internal[t]()}:(Er.prototype[r]=function(){return Date.prototype[t].apply(this.internal,arguments),A2(this),+this},Er.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),gh(this),+this}))});function gh(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function A2(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),C0(r)}function C0(r){const t=Lo(r.timeZone,r),e=new Date(+r);e.setUTCHours(e.getUTCHours()-1);const i=-new Date(+r).getTimezoneOffset(),n=-new Date(+e).getTimezoneOffset(),s=i-n,o=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();s&&o&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+s);const a=i-t;a&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+a);const l=Lo(r.timeZone,r),c=-new Date(+r).getTimezoneOffset()-l,h=l!==t,p=c-a;if(h&&p){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+p);const f=Lo(r.timeZone,r),y=l-f;y&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+y))}}const O2=new TextDecoder("utf-8"),F2=r=>O2.decode(r),P2=new TextEncoder,A0=r=>P2.encode(r),hi=r=>typeof r=="function",ha=r=>r!=null&&Object(r)===r,M2=r=>ha(r)&&hi(r.then),O0=r=>ha(r)&&hi(r[Symbol.iterator]),D2=r=>ha(r)&&hi(r[Symbol.asyncIterator]),R2=r=>ha(r)&&"done"in r&&"value"in r,N2=r=>ha(r)&&hi(r.clear)&&hi(r.bytes)&&hi(r.position)&&hi(r.setPosition)&&hi(r.capacity)&&hi(r.getBufferIdentifier)&&hi(r.createLong),Af=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function L2(r){const t=r[0]?[r[0]]:[];let e,i,n,s;for(let o,a,l=0,u=0,c=r.length;++lc+h.byteLength,0);let n,s,o,a=0,l=-1;const u=Math.min(t||Number.POSITIVE_INFINITY,i);for(const c=e.length;++lrr(Int8Array,r),U2=r=>rr(Int16Array,r),z2=r=>rr(Int32Array,r),j2=r=>rr(BigInt64Array,r),$2=r=>rr(Uint8Array,r),V2=r=>rr(Uint16Array,r),G2=r=>rr(Uint32Array,r),W2=r=>rr(BigUint64Array,r),H2=r=>rr(Float32Array,r),X2=r=>rr(Float64Array,r),Y2=r=>rr(Uint8ClampedArray,r),_h=r=>(r.next(),r);function*Oi(r,t){const e=function*(n){yield n},i=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Af?e(t):O0(t)?t:e(t);return yield*_h(function*(n){let s=null;do s=n.next(yield rr(r,s));while(!s.done)}(i[Symbol.iterator]())),new r}const q2=r=>Oi(Int8Array,r),Q2=r=>Oi(Int16Array,r),K2=r=>Oi(Int32Array,r),Z2=r=>Oi(Uint8Array,r),J2=r=>Oi(Uint16Array,r),tF=r=>Oi(Uint32Array,r),eF=r=>Oi(Float32Array,r),rF=r=>Oi(Float64Array,r),iF=r=>Oi(Uint8ClampedArray,r);function ii(r,t){return dr(this,arguments,function*(){if(M2(t))return yield Pt(yield Pt(yield*ts(bi(ii(r,yield Pt(t))))));const i=function(o){return dr(this,arguments,function*(){yield yield Pt(yield Pt(o))})},n=function(o){return dr(this,arguments,function*(){yield Pt(yield*ts(bi(_h(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof Af?i(t):O0(t)?n(t):D2(t)?t:i(t);return yield Pt(yield*ts(bi(_h(function(o){return dr(this,arguments,function*(){let a=null;do a=yield Pt(o.next(yield yield Pt(rr(r,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Pt(new r)})}const nF=r=>ii(Int8Array,r),sF=r=>ii(Int16Array,r),oF=r=>ii(Int32Array,r),aF=r=>ii(Uint8Array,r),lF=r=>ii(Uint16Array,r),uF=r=>ii(Uint32Array,r),cF=r=>ii(Float32Array,r),hF=r=>ii(Float64Array,r),fF=r=>ii(Uint8ClampedArray,r);function dF(r,t,e){if(r!==0){e=e.slice(0,t);for(let i=-1,n=e.length;++i0)do if(r[e]!==t[e])return!1;while(++eeo(t))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(t,e)=>typeof e=="bigint"?`${e}`:e)}const yF=Object.freeze(Object.defineProperty({__proto__:null,valueToString:eo},Symbol.toStringTag,{value:"Module"}));function ar(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function P0(r,t){return ar(r/t)+ar(r%t)/ar(t)}const M0=Symbol.for("isArrowBigNum");function ni(r,...t){return t.length===0?Object.setPrototypeOf(rr(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...t),this.constructor.prototype)}ni.prototype[M0]=!0;ni.prototype.toJSON=function(){return`"${ro(this)}"`};ni.prototype.valueOf=function(r){return Of(this,r)};ni.prototype.toString=function(){return ro(this)};ni.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return Of(this);case"string":return ro(this);case"default":return D0(this)}return ro(this)};function Gs(...r){return ni.apply(this,r)}function Ws(...r){return ni.apply(this,r)}function Jo(...r){return ni.apply(this,r)}Object.setPrototypeOf(Gs.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Ws.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(Jo.prototype,Object.create(Uint32Array.prototype));Object.assign(Gs.prototype,ni.prototype,{constructor:Gs,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Ws.prototype,ni.prototype,{constructor:Ws,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(Jo.prototype,ni.prototype,{constructor:Jo,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const gF=BigInt(4294967296)*BigInt(4294967296),vF=gF-BigInt(1);function Of(r,t){const{buffer:e,byteOffset:i,byteLength:n,signed:s}=r,o=new BigUint64Array(e,i,n/8),a=s&&o.at(-1)&BigInt(1)<=0)return ic(r);t=t.slice();let i=1;for(let s=0;s(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Et.prototype);class jp extends Et{constructor(){super(W.Null)}toString(){return"Null"}}N0=Symbol.toStringTag;jp[N0]=(r=>r[Symbol.toStringTag]="Null")(jp.prototype);class $p extends Et{constructor(t,e){super(W.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}L0=Symbol.toStringTag;$p[L0]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))($p.prototype);class Vp extends Et{constructor(t){super(W.Float),this.precision=t}get ArrayType(){switch(this.precision){case Cr.HALF:return Uint16Array;case Cr.SINGLE:return Float32Array;case Cr.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}B0=Symbol.toStringTag;Vp[B0]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(Vp.prototype);class Gp extends Et{constructor(){super(W.Binary)}toString(){return"Binary"}}k0=Symbol.toStringTag;Gp[k0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(Gp.prototype);class Wp extends Et{constructor(){super(W.LargeBinary)}toString(){return"LargeBinary"}}U0=Symbol.toStringTag;Wp[U0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(Wp.prototype);class Hp extends Et{constructor(){super(W.Utf8)}toString(){return"Utf8"}}z0=Symbol.toStringTag;Hp[z0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(Hp.prototype);class Xp extends Et{constructor(){super(W.LargeUtf8)}toString(){return"LargeUtf8"}}j0=Symbol.toStringTag;Xp[j0]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(Xp.prototype);class Yp extends Et{constructor(){super(W.Bool)}toString(){return"Bool"}}$0=Symbol.toStringTag;Yp[$0]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(Yp.prototype);class qp extends Et{constructor(t,e,i=128){super(W.Decimal),this.scale=t,this.precision=e,this.bitWidth=i}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}V0=Symbol.toStringTag;qp[V0]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(qp.prototype);class Qp extends Et{constructor(t){super(W.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${_n[this.unit]}>`}get ArrayType(){return this.unit===_n.DAY?Int32Array:BigInt64Array}}G0=Symbol.toStringTag;Qp[G0]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(Qp.prototype);class Kp extends Et{constructor(t,e){super(W.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${Jt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}W0=Symbol.toStringTag;Kp[W0]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(Kp.prototype);class Zp extends Et{constructor(t,e){super(W.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${Jt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}H0=Symbol.toStringTag;Zp[H0]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(Zp.prototype);class Jp extends Et{constructor(t){super(W.Interval),this.unit=t}toString(){return`Interval<${ns[this.unit]}>`}}X0=Symbol.toStringTag;Jp[X0]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(Jp.prototype);class tm extends Et{constructor(t){super(W.Duration),this.unit=t}toString(){return`Duration<${Jt[this.unit]}>`}}Y0=Symbol.toStringTag;tm[Y0]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(tm.prototype);class em extends Et{constructor(t){super(W.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}q0=Symbol.toStringTag;em[q0]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(em.prototype);class bh extends Et{constructor(t){super(W.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}Q0=Symbol.toStringTag;bh[Q0]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(bh.prototype);class rm extends Et{constructor(t,e,i){super(W.Union),this.mode=t,this.children=i,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((n,s,o)=>(n[s]=o)&&n||n,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}K0=Symbol.toStringTag;rm[K0]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(rm.prototype);class im extends Et{constructor(t){super(W.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}Z0=Symbol.toStringTag;im[Z0]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(im.prototype);class nm extends Et{constructor(t,e){super(W.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}J0=Symbol.toStringTag;nm[J0]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(nm.prototype);class sm extends Et{constructor(t,e=!1){var i,n,s;if(super(W.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((i=t==null?void 0:t.type)===null||i===void 0)&&i.children)){const o=(n=t==null?void 0:t.type)===null||n===void 0?void 0:n.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}tb=Symbol.toStringTag;sm[tb]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(sm.prototype);const bF=(r=>()=>++r)(-1);class om extends Et{constructor(t,e,i,n){super(W.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=n||!1,this.id=i==null?bF():ar(i)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}eb=Symbol.toStringTag;om[eb]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(om.prototype);function rb(r){const t=r;switch(r.typeId){case W.Decimal:return r.bitWidth/32;case W.Interval:return 1+t.unit;case W.FixedSizeList:return t.listSize;case W.FixedSizeBinary:return t.byteWidth;default:return 1}}class le{visitMany(t,...e){return t.map((i,n)=>this.visit(i,...e.map(s=>s[n])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return wF(this,t,e)}getVisitFnByTypeId(t,e=!0){return Ps(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function wF(r,t,e=!0){return typeof t=="number"?Ps(r,t,e):typeof t=="string"&&t in W?Ps(r,W[t],e):t&&t instanceof Et?Ps(r,am(t),e):t!=null&&t.type&&t.type instanceof Et?Ps(r,am(t.type),e):Ps(r,W.NONE,e)}function Ps(r,t,e=!0){let i=null;switch(t){case W.Null:i=r.visitNull;break;case W.Bool:i=r.visitBool;break;case W.Int:i=r.visitInt;break;case W.Int8:i=r.visitInt8||r.visitInt;break;case W.Int16:i=r.visitInt16||r.visitInt;break;case W.Int32:i=r.visitInt32||r.visitInt;break;case W.Int64:i=r.visitInt64||r.visitInt;break;case W.Uint8:i=r.visitUint8||r.visitInt;break;case W.Uint16:i=r.visitUint16||r.visitInt;break;case W.Uint32:i=r.visitUint32||r.visitInt;break;case W.Uint64:i=r.visitUint64||r.visitInt;break;case W.Float:i=r.visitFloat;break;case W.Float16:i=r.visitFloat16||r.visitFloat;break;case W.Float32:i=r.visitFloat32||r.visitFloat;break;case W.Float64:i=r.visitFloat64||r.visitFloat;break;case W.Utf8:i=r.visitUtf8;break;case W.LargeUtf8:i=r.visitLargeUtf8;break;case W.Binary:i=r.visitBinary;break;case W.LargeBinary:i=r.visitLargeBinary;break;case W.FixedSizeBinary:i=r.visitFixedSizeBinary;break;case W.Date:i=r.visitDate;break;case W.DateDay:i=r.visitDateDay||r.visitDate;break;case W.DateMillisecond:i=r.visitDateMillisecond||r.visitDate;break;case W.Timestamp:i=r.visitTimestamp;break;case W.TimestampSecond:i=r.visitTimestampSecond||r.visitTimestamp;break;case W.TimestampMillisecond:i=r.visitTimestampMillisecond||r.visitTimestamp;break;case W.TimestampMicrosecond:i=r.visitTimestampMicrosecond||r.visitTimestamp;break;case W.TimestampNanosecond:i=r.visitTimestampNanosecond||r.visitTimestamp;break;case W.Time:i=r.visitTime;break;case W.TimeSecond:i=r.visitTimeSecond||r.visitTime;break;case W.TimeMillisecond:i=r.visitTimeMillisecond||r.visitTime;break;case W.TimeMicrosecond:i=r.visitTimeMicrosecond||r.visitTime;break;case W.TimeNanosecond:i=r.visitTimeNanosecond||r.visitTime;break;case W.Decimal:i=r.visitDecimal;break;case W.List:i=r.visitList;break;case W.Struct:i=r.visitStruct;break;case W.Union:i=r.visitUnion;break;case W.DenseUnion:i=r.visitDenseUnion||r.visitUnion;break;case W.SparseUnion:i=r.visitSparseUnion||r.visitUnion;break;case W.Dictionary:i=r.visitDictionary;break;case W.Interval:i=r.visitInterval;break;case W.IntervalDayTime:i=r.visitIntervalDayTime||r.visitInterval;break;case W.IntervalYearMonth:i=r.visitIntervalYearMonth||r.visitInterval;break;case W.Duration:i=r.visitDuration;break;case W.DurationSecond:i=r.visitDurationSecond||r.visitDuration;break;case W.DurationMillisecond:i=r.visitDurationMillisecond||r.visitDuration;break;case W.DurationMicrosecond:i=r.visitDurationMicrosecond||r.visitDuration;break;case W.DurationNanosecond:i=r.visitDurationNanosecond||r.visitDuration;break;case W.FixedSizeList:i=r.visitFixedSizeList;break;case W.Map:i=r.visitMap;break}if(typeof i=="function")return i;if(!e)return()=>null;throw new Error(`Unrecognized type '${W[t]}'`)}function am(r){switch(r.typeId){case W.Null:return W.Null;case W.Int:{const{bitWidth:t,isSigned:e}=r;switch(t){case 8:return e?W.Int8:W.Uint8;case 16:return e?W.Int16:W.Uint16;case 32:return e?W.Int32:W.Uint32;case 64:return e?W.Int64:W.Uint64}return W.Int}case W.Float:switch(r.precision){case Cr.HALF:return W.Float16;case Cr.SINGLE:return W.Float32;case Cr.DOUBLE:return W.Float64}return W.Float;case W.Binary:return W.Binary;case W.LargeBinary:return W.LargeBinary;case W.Utf8:return W.Utf8;case W.LargeUtf8:return W.LargeUtf8;case W.Bool:return W.Bool;case W.Decimal:return W.Decimal;case W.Time:switch(r.unit){case Jt.SECOND:return W.TimeSecond;case Jt.MILLISECOND:return W.TimeMillisecond;case Jt.MICROSECOND:return W.TimeMicrosecond;case Jt.NANOSECOND:return W.TimeNanosecond}return W.Time;case W.Timestamp:switch(r.unit){case Jt.SECOND:return W.TimestampSecond;case Jt.MILLISECOND:return W.TimestampMillisecond;case Jt.MICROSECOND:return W.TimestampMicrosecond;case Jt.NANOSECOND:return W.TimestampNanosecond}return W.Timestamp;case W.Date:switch(r.unit){case _n.DAY:return W.DateDay;case _n.MILLISECOND:return W.DateMillisecond}return W.Date;case W.Interval:switch(r.unit){case ns.DAY_TIME:return W.IntervalDayTime;case ns.YEAR_MONTH:return W.IntervalYearMonth}return W.Interval;case W.Duration:switch(r.unit){case Jt.SECOND:return W.DurationSecond;case Jt.MILLISECOND:return W.DurationMillisecond;case Jt.MICROSECOND:return W.DurationMicrosecond;case Jt.NANOSECOND:return W.DurationNanosecond}return W.Duration;case W.Map:return W.Map;case W.List:return W.List;case W.Struct:return W.Struct;case W.Union:switch(r.mode){case Ii.Dense:return W.DenseUnion;case Ii.Sparse:return W.SparseUnion}return W.Union;case W.FixedSizeBinary:return W.FixedSizeBinary;case W.FixedSizeList:return W.FixedSizeList;case W.Dictionary:return W.Dictionary}throw new Error(`Unrecognized type '${W[r.typeId]}'`)}le.prototype.visitInt8=null;le.prototype.visitInt16=null;le.prototype.visitInt32=null;le.prototype.visitInt64=null;le.prototype.visitUint8=null;le.prototype.visitUint16=null;le.prototype.visitUint32=null;le.prototype.visitUint64=null;le.prototype.visitFloat16=null;le.prototype.visitFloat32=null;le.prototype.visitFloat64=null;le.prototype.visitDateDay=null;le.prototype.visitDateMillisecond=null;le.prototype.visitTimestampSecond=null;le.prototype.visitTimestampMillisecond=null;le.prototype.visitTimestampMicrosecond=null;le.prototype.visitTimestampNanosecond=null;le.prototype.visitTimeSecond=null;le.prototype.visitTimeMillisecond=null;le.prototype.visitTimeMicrosecond=null;le.prototype.visitTimeNanosecond=null;le.prototype.visitDenseUnion=null;le.prototype.visitSparseUnion=null;le.prototype.visitIntervalDayTime=null;le.prototype.visitIntervalYearMonth=null;le.prototype.visitDuration=null;le.prototype.visitDurationSecond=null;le.prototype.visitDurationMillisecond=null;le.prototype.visitDurationMicrosecond=null;le.prototype.visitDurationNanosecond=null;const ib=new Float64Array(1),vs=new Uint32Array(ib.buffer);function Ff(r){const t=(r&31744)>>10,e=(r&1023)/1024,i=Math.pow(-1,(r&32768)>>15);switch(t){case 31:return i*(e?Number.NaN:1/0);case 0:return i*(e?6103515625e-14*e:0)}return i*Math.pow(2,t-15)*(1+e)}function nb(r){if(r!==r)return 32256;ib[0]=r;const t=(vs[1]&2147483648)>>16&65535;let e=vs[1]&2146435072,i=0;return e>=1089470464?vs[0]>0?e=31744:(e=(e&2080374784)>>16,i=(vs[1]&1048575)>>10):e<=1056964608?(i=1048576+(vs[1]&1048575),i=1048576+(i<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,i=(vs[1]&1048575)+512>>10),t|e|i&65535}const xF=Object.freeze(Object.defineProperty({__proto__:null,float64ToUint16:nb,uint16ToFloat64:Ff},Symbol.toStringTag,{value:"Module"}));class Gt extends le{}function Yt(r){return(t,e,i)=>{if(t.setValid(e,i!=null))return r(t,e,i)}}const SF=(r,t,e)=>{r[t]=Math.floor(e/864e5)},sb=(r,t,e,i)=>{if(e+1{const n=r+e;i?t[n>>3]|=1<>3]&=~(1<{r[t]=e},Pf=({values:r},t,e)=>{r[t]=e},ob=({values:r},t,e)=>{r[t]=nb(e)},IF=(r,t,e)=>{switch(r.type.precision){case Cr.HALF:return ob(r,t,e);case Cr.SINGLE:case Cr.DOUBLE:return Pf(r,t,e)}},ab=({values:r},t,e)=>{SF(r,t,e.valueOf())},lb=({values:r},t,e)=>{r[t]=BigInt(e)},EF=({stride:r,values:t},e,i)=>{t.set(i.subarray(0,r),r*e)},ub=({values:r,valueOffsets:t},e,i)=>sb(r,t,e,i),cb=({values:r,valueOffsets:t},e,i)=>sb(r,t,e,A0(i)),CF=(r,t,e)=>{r.type.unit===_n.DAY?ab(r,t,e):lb(r,t,e)},hb=({values:r},t,e)=>{r[t]=BigInt(e/1e3)},fb=({values:r},t,e)=>{r[t]=BigInt(e)},db=({values:r},t,e)=>{r[t]=BigInt(e*1e3)},pb=({values:r},t,e)=>{r[t]=BigInt(e*1e6)},AF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return hb(r,t,e);case Jt.MILLISECOND:return fb(r,t,e);case Jt.MICROSECOND:return db(r,t,e);case Jt.NANOSECOND:return pb(r,t,e)}},mb=({values:r},t,e)=>{r[t]=e},yb=({values:r},t,e)=>{r[t]=e},gb=({values:r},t,e)=>{r[t]=e},vb=({values:r},t,e)=>{r[t]=e},OF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return mb(r,t,e);case Jt.MILLISECOND:return yb(r,t,e);case Jt.MICROSECOND:return gb(r,t,e);case Jt.NANOSECOND:return vb(r,t,e)}},FF=({values:r,stride:t},e,i)=>{r.set(i.subarray(0,t),t*e)},PF=(r,t,e)=>{const i=r.children[0],n=r.valueOffsets,s=Ei.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=n[t],l=n[t+1];a{const i=r.children[0],{valueOffsets:n}=r,s=Ei.getVisitFn(i);let{[t]:o,[t+1]:a}=n;const l=e instanceof Map?e.entries():Object.entries(e);for(const u of l)if(s(i,o,u),++o>=a)break},DF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[s]),RF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(s)),NF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t.get(n.name)),LF=(r,t)=>(e,i,n,s)=>i&&e(i,r,t[n.name]),BF=(r,t,e)=>{const i=r.type.children.map(s=>Ei.getVisitFn(s.type)),n=e instanceof Map?NF(t,e):e instanceof Qe?RF(t,e):Array.isArray(e)?DF(t,e):LF(t,e);r.type.children.forEach((s,o)=>n(i[o],r.children[o],s,o))},kF=(r,t,e)=>{r.type.mode===Ii.Dense?_b(r,t,e):bb(r,t,e)},_b=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ei.visit(n,r.valueOffsets[t],e)},bb=(r,t,e)=>{const i=r.type.typeIdToChildIndex[r.typeIds[t]],n=r.children[i];Ei.visit(n,t,e)},UF=(r,t,e)=>{var i;(i=r.dictionary)===null||i===void 0||i.set(r.values[t],e)},zF=(r,t,e)=>{r.type.unit===ns.DAY_TIME?wb(r,t,e):xb(r,t,e)},wb=({values:r},t,e)=>{r.set(e.subarray(0,2),2*t)},xb=({values:r},t,e)=>{r[t]=e[0]*12+e[1]%12},Sb=({values:r},t,e)=>{r[t]=e},Tb=({values:r},t,e)=>{r[t]=e},Ib=({values:r},t,e)=>{r[t]=e},Eb=({values:r},t,e)=>{r[t]=e},jF=(r,t,e)=>{switch(r.type.unit){case Jt.SECOND:return Sb(r,t,e);case Jt.MILLISECOND:return Tb(r,t,e);case Jt.MICROSECOND:return Ib(r,t,e);case Jt.NANOSECOND:return Eb(r,t,e)}},$F=(r,t,e)=>{const{stride:i}=r,n=r.children[0],s=Ei.getVisitFn(n);if(Array.isArray(e))for(let o=-1,a=t*i;++o`${eo(t)}: ${eo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new VF(this[Zr],this[Hs])}}class VF{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[Zr].type.children.some(i=>i.name===e)}getOwnPropertyDescriptor(t,e){if(t[Zr].type.children.some(i=>i.name===e))return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Zr].type.children.findIndex(n=>n.name===e);if(i!==-1){const n=Yr.visit(t[Zr].children[i],t[Hs]);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Zr].type.children.findIndex(s=>s.name===e);return n!==-1?(Ei.visit(t[Zr].children[n],t[Hs],i),Reflect.set(t,e,i)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,i):!1}}const WF=new GF;class Lt extends le{}function Wt(r){return(t,e)=>t.getValid(e)?r(t,e):null}const HF=(r,t)=>864e5*r[t],XF=(r,t)=>null,Cb=(r,t,e)=>{if(e+1>=t.length)return null;const i=ar(t[e]),n=ar(t[e+1]);return r.subarray(i,n)},YF=({offset:r,values:t},e)=>{const i=r+e;return(t[i>>3]&1<HF(r,t),Ob=({values:r},t)=>ar(r[t]),xn=({stride:r,values:t},e)=>t[r*e],qF=({stride:r,values:t},e)=>Ff(t[r*e]),Fb=({values:r},t)=>r[t],QF=({stride:r,values:t},e)=>t.subarray(r*e,r*(e+1)),Pb=({values:r,valueOffsets:t},e)=>Cb(r,t,e),Mb=({values:r,valueOffsets:t},e)=>{const i=Cb(r,t,e);return i!==null?F2(i):null},KF=({values:r},t)=>r[t],ZF=({type:r,values:t},e)=>r.precision!==Cr.HALF?t[e]:Ff(t[e]),JF=(r,t)=>r.type.unit===_n.DAY?Ab(r,t):Ob(r,t),Db=({values:r},t)=>1e3*ar(r[t]),Rb=({values:r},t)=>ar(r[t]),Nb=({values:r},t)=>P0(r[t],BigInt(1e3)),Lb=({values:r},t)=>P0(r[t],BigInt(1e6)),tP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Db(r,t);case Jt.MILLISECOND:return Rb(r,t);case Jt.MICROSECOND:return Nb(r,t);case Jt.NANOSECOND:return Lb(r,t)}},Bb=({values:r},t)=>r[t],kb=({values:r},t)=>r[t],Ub=({values:r},t)=>r[t],zb=({values:r},t)=>r[t],eP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Bb(r,t);case Jt.MILLISECOND:return kb(r,t);case Jt.MICROSECOND:return Ub(r,t);case Jt.NANOSECOND:return zb(r,t)}},rP=({values:r,stride:t},e)=>su.decimal(r.subarray(t*e,t*(e+1))),iP=(r,t)=>{const{valueOffsets:e,stride:i,children:n}=r,{[t*i]:s,[t*i+1]:o}=e,l=n[0].slice(s,o-s);return new Qe([l])},nP=(r,t)=>{const{valueOffsets:e,children:i}=r,{[t]:n,[t+1]:s}=e,o=i[0];return new Df(o.slice(n,s-n))},sP=(r,t)=>new Mf(r,t),oP=(r,t)=>r.type.mode===Ii.Dense?jb(r,t):$b(r,t),jb=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return Yr.visit(i,r.valueOffsets[t])},$b=(r,t)=>{const e=r.type.typeIdToChildIndex[r.typeIds[t]],i=r.children[e];return Yr.visit(i,t)},aP=(r,t)=>{var e;return(e=r.dictionary)===null||e===void 0?void 0:e.get(r.values[t])},lP=(r,t)=>r.type.unit===ns.DAY_TIME?Vb(r,t):Gb(r,t),Vb=({values:r},t)=>r.subarray(2*t,2*(t+1)),Gb=({values:r},t)=>{const e=r[t],i=new Int32Array(2);return i[0]=Math.trunc(e/12),i[1]=Math.trunc(e%12),i},Wb=({values:r},t)=>r[t],Hb=({values:r},t)=>r[t],Xb=({values:r},t)=>r[t],Yb=({values:r},t)=>r[t],uP=(r,t)=>{switch(r.type.unit){case Jt.SECOND:return Wb(r,t);case Jt.MILLISECOND:return Hb(r,t);case Jt.MICROSECOND:return Xb(r,t);case Jt.NANOSECOND:return Yb(r,t)}},cP=(r,t)=>{const{stride:e,children:i}=r,s=i[0].slice(t*e,e);return new Qe([s])};Lt.prototype.visitNull=Wt(XF);Lt.prototype.visitBool=Wt(YF);Lt.prototype.visitInt=Wt(KF);Lt.prototype.visitInt8=Wt(xn);Lt.prototype.visitInt16=Wt(xn);Lt.prototype.visitInt32=Wt(xn);Lt.prototype.visitInt64=Wt(Fb);Lt.prototype.visitUint8=Wt(xn);Lt.prototype.visitUint16=Wt(xn);Lt.prototype.visitUint32=Wt(xn);Lt.prototype.visitUint64=Wt(Fb);Lt.prototype.visitFloat=Wt(ZF);Lt.prototype.visitFloat16=Wt(qF);Lt.prototype.visitFloat32=Wt(xn);Lt.prototype.visitFloat64=Wt(xn);Lt.prototype.visitUtf8=Wt(Mb);Lt.prototype.visitLargeUtf8=Wt(Mb);Lt.prototype.visitBinary=Wt(Pb);Lt.prototype.visitLargeBinary=Wt(Pb);Lt.prototype.visitFixedSizeBinary=Wt(QF);Lt.prototype.visitDate=Wt(JF);Lt.prototype.visitDateDay=Wt(Ab);Lt.prototype.visitDateMillisecond=Wt(Ob);Lt.prototype.visitTimestamp=Wt(tP);Lt.prototype.visitTimestampSecond=Wt(Db);Lt.prototype.visitTimestampMillisecond=Wt(Rb);Lt.prototype.visitTimestampMicrosecond=Wt(Nb);Lt.prototype.visitTimestampNanosecond=Wt(Lb);Lt.prototype.visitTime=Wt(eP);Lt.prototype.visitTimeSecond=Wt(Bb);Lt.prototype.visitTimeMillisecond=Wt(kb);Lt.prototype.visitTimeMicrosecond=Wt(Ub);Lt.prototype.visitTimeNanosecond=Wt(zb);Lt.prototype.visitDecimal=Wt(rP);Lt.prototype.visitList=Wt(iP);Lt.prototype.visitStruct=Wt(sP);Lt.prototype.visitUnion=Wt(oP);Lt.prototype.visitDenseUnion=Wt(jb);Lt.prototype.visitSparseUnion=Wt($b);Lt.prototype.visitDictionary=Wt(aP);Lt.prototype.visitInterval=Wt(lP);Lt.prototype.visitIntervalDayTime=Wt(Vb);Lt.prototype.visitIntervalYearMonth=Wt(Gb);Lt.prototype.visitDuration=Wt(uP);Lt.prototype.visitDurationSecond=Wt(Wb);Lt.prototype.visitDurationMillisecond=Wt(Hb);Lt.prototype.visitDurationMicrosecond=Wt(Xb);Lt.prototype.visitDurationNanosecond=Wt(Yb);Lt.prototype.visitFixedSizeList=Wt(cP);Lt.prototype.visitMap=Wt(nP);const Yr=new Lt,Ms=Symbol.for("keys"),Xs=Symbol.for("vals"),Ds=Symbol.for("kKeysAsStrings"),wh=Symbol.for("_kKeysAsStrings");class Df{constructor(t){return this[Ms]=new Qe([t.children[0]]).memoize(),this[Xs]=t.children[1],new Proxy(this,new fP)}get[Ds](){return this[wh]||(this[wh]=Array.from(this[Ms].toArray(),String))}[Symbol.iterator](){return new hP(this[Ms],this[Xs])}get size(){return this[Ms].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Ms],e=this[Xs],i={};for(let n=-1,s=t.length;++n`${eo(t)}: ${eo(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class hP{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),Yr.visit(this.vals,t)]})}}class fP{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ds]}has(t,e){return t[Ds].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ds].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const i=t[Ds].indexOf(e);if(i!==-1){const n=Yr.visit(Reflect.get(t,Xs),i);return Reflect.set(t,e,n),n}}set(t,e,i){const n=t[Ds].indexOf(e);return n!==-1?(Ei.visit(Reflect.get(t,Xs),n,i),Reflect.set(t,e,i)):Reflect.has(t,e)?Reflect.set(t,e,i):!1}}Object.defineProperties(Df.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ms]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Xs]:{writable:!0,enumerable:!1,configurable:!1,value:null},[wh]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let lm;function qb(r,t,e,i){const{length:n=0}=r;let s=typeof t!="number"?0:t,o=typeof e!="number"?n:e;return s<0&&(s=(s%n+n)%n),o<0&&(o=(o%n+n)%n),on&&(o=n),i?i(r,s,o):[s,o]}const Qb=(r,t)=>r<0?t+r:r,um=r=>r!==r;function cs(r){if(typeof r!=="object"||r===null)return um(r)?um:e=>e===r;if(r instanceof Date){const e=r.valueOf();return i=>i instanceof Date?i.valueOf()===e:!1}return ArrayBuffer.isView(r)?e=>e?F0(r,e):!1:r instanceof Map?pP(r):Array.isArray(r)?dP(r):r instanceof Qe?mP(r):yP(r,!0)}function dP(r){const t=[];for(let e=-1,i=r.length;++e!1;const i=[];for(let n=-1,s=e.length;++n{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return gP(r,e);case Map:return cm(r,e,e.keys());case Df:case Mf:case Object:case void 0:return cm(r,e,t||Object.keys(e))}return e instanceof Qe?vP(r,e):!1}}function gP(r,t){const e=r.length;if(t.length!==e)return!1;for(let i=-1;++i>i}function bP(r,t,e){return e?!!(r[t>>3]|=1<>3]&=~(1<0||e.byteLength>3):Zb(new au(e,r,t,null,Rf)).subarray(0,i)),n}return e}function Zb(r){const t=[];let e=0,i=0,n=0;for(const o of r)o&&(n|=1<0)&&(t[e++]=n);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class au{constructor(t,e,i,n,s){this.bytes=t,this.length=i,this.context=n,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,n=t+(t%8===0?0:8-t%8);return Bl(r,t,n)+Bl(r,i,e)+Jb(r,n>>3,i-n>>3)}function Jb(r,t,e){let i=0,n=Math.trunc(t);const s=new DataView(r.buffer,r.byteOffset,r.byteLength),o=e===void 0?r.byteLength:n+e;for(;o-n>=4;)i+=qa(s.getUint32(n)),n+=4;for(;o-n>=2;)i+=qa(s.getUint16(n)),n+=2;for(;o-n>=1;)i+=qa(s.getUint8(n)),n+=1;return i}function qa(r){let t=Math.trunc(r);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const wP=Object.freeze(Object.defineProperty({__proto__:null,BitIterator:au,getBit:Kb,getBool:Rf,packBools:Zb,popcnt_array:Jb,popcnt_bit_range:Bl,popcnt_uint32:qa,setBool:bP,truncateBitmap:xh},Symbol.toStringTag,{value:"Module"})),xP=-1;class ta{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return Et.isSparseUnion(t)?this.children.some(e=>e.nullable):Et.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:i,nullBitmap:n,typeIds:s}=this;return e&&(t+=e.byteLength),i&&(t+=i.byteLength),n&&(t+=n.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(Et.isUnion(this.type))return this.children.reduce((i,n)=>i+n.nullCount,0);let t=this._nullCount,e;return t<=xP&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Bl(e,this.offset,this.offset+this.length)),t}constructor(t,e,i,n,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(i||0,0)),this._nullCount=Math.floor(Math.max(n||0,-1));let l;s instanceof ta?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=rb(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(Et.isUnion(e)){const i=e,n=this.children[i.typeIdToChildIndex[this.typeIds[t]]],s=i.mode===Ii.Dense?this.valueOffsets[t]:t;return n.getValid(s)}if(this.nullable&&this.nullCount>0){const i=this.offset+t;return(this.nullBitmap[i>>3]&1<>3;(!s||s.byteLength<=c)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(xh(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const h=s[c];i=(h&u)!==0,s[c]=e?h|u:h&~u}return i!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,i=this.length,n=this._nullCount,s=this,o=this.children){return new ta(t,e,i,n,s,o,this.dictionary)}slice(t,e){const{stride:i,typeId:n,children:s}=this,o=+(this._nullCount===0)-1,a=n===16?i:1,l=this._sliceBuffers(t,e,i,n);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===W.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:i}=this,n=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);n[e>>3]=(1<0&&n.set(xh(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[zi.VALIDITY]=n,this.clone(this.type,0,t,i+(t-e),s)}_sliceBuffers(t,e,i,n){let s;const{buffers:o}=this;return(s=o[zi.TYPE])&&(o[zi.TYPE]=s.subarray(t,t+e)),(s=o[zi.OFFSET])&&(o[zi.OFFSET]=s.subarray(t,t+e+1))||(s=o[zi.DATA])&&(o[zi.DATA]=n===6?s:s.subarray(i*t,i*(t+e))),o}_sliceChildren(t,e,i){return t.map(n=>n.slice(e,i))}}ta.prototype.children=Object.freeze([]);class hm{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function TP(r){return r.reduce((t,e)=>t+e.nullCount,0)}function IP(r){return r.reduce((t,e,i)=>(t[i+1]=t[i]+e.length,t),new Uint32Array(r.length+1))}function EP(r,t,e,i){const n=[];for(let s=-1,o=r.length;++s=i)break;if(e>=l+u)continue;if(l>=e&&l+u<=i){n.push(a);continue}const c=Math.max(0,e-l),h=Math.min(i-l,u);n.push(a.slice(c,h-c))}return n.length===0&&n.push(r[0].slice(0,0)),n}function Nf(r,t,e,i){let n=0,s=0,o=t.length-1;do{if(n>=o-1)return e0?0:-1}function FP(r,t){const{nullBitmap:e}=r;if(!e||r.nullCount<=0)return-1;let i=0;for(const n of new au(e,r.offset+(t||0),r.length,e,Rf)){if(!n)return i;++i}return-1}function Kt(r,t,e){if(t===void 0)return-1;if(t===null)switch(r.typeId){case W.Union:break;case W.Dictionary:break;default:return FP(r,e)}const i=Yr.getVisitFn(r),n=cs(t);for(let s=(e||0)-1,o=r.length;++s{const n=r.data[i];return n.values.subarray(0,n.length)[Symbol.iterator]()});let e=0;return new hm(r.data.length,i=>{const s=r.data[i].length,o=r.slice(e,e+s);return e+=s,new PP(o)})}class PP{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ta)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:u}=iw[o.typeId],c=s[0];this.isValid=h=>tw(c,h),this.get=h=>a(c,h),this.set=(h,p)=>l(c,h,p),this.indexOf=h=>u(c,h),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,nw[o.typeId]),this._offsets=IP(s);break}this.data=s,this.type=o,this.stride=rb(o),this.numChildren=(n=(i=o.children)===null||i===void 0?void 0:i.length)!==null&&n!==void 0?n:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return SP(this.data)}get nullCount(){return TP(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${W[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(Qb(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return MP.visit(this)}concat(...t){return new Qe(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new Qe(qb(this,t,e,({data:i,_offsets:n},s,o)=>EP(i,n,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:i,stride:n,ArrayType:s}=this;switch(t.typeId){case W.Int:case W.Float:case W.Decimal:case W.Time:case W.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,i*n);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*n),o.offset),o.offset+=l*n,o),{array:new s(i*n),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(i=>i.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return Et.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Et.isDictionary(this.type)){const t=new kl(this.data[0].dictionary),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return new kl(this)}unmemoize(){if(Et.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(i=>{const n=i.clone();return n.dictionary=t,n});return new Qe(e)}return this}}rw=Symbol.toStringTag;Qe[rw]=(r=>{r.type=Et.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const t=Object.keys(W).map(e=>W[e]).filter(e=>typeof e=="number"&&e!==W.NONE);for(const e of t){const i=Yr.getVisitFnByTypeId(e),n=Ei.getVisitFnByTypeId(e),s=dm.getVisitFnByTypeId(e);iw[e]={get:i,set:n,indexOf:s},nw[e]=Object.create(r,{isValid:{value:fm(tw)},get:{value:fm(Yr.getVisitFnByTypeId(e))},set:{value:CP(Ei.getVisitFnByTypeId(e))},indexOf:{value:AP(dm.getVisitFnByTypeId(e))}})}return"Vector"})(Qe.prototype);class kl extends Qe{constructor(t){super(t.data);const e=this.get,i=this.set,n=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){i.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new kl(n.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new Qe(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}const DP=65536;function Ls(r){return r<0&&(r=4294967295+r+1),`0x${r.toString(16)}`}const io=8,Lf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];class Bf{constructor(t){this.buffer=t}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(t){const e=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),i=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let n=e[3]*i[3];this.buffer[0]=n&65535;let s=n>>>16;return n=e[2]*i[3],s+=n,n=e[3]*i[2]>>>0,s+=n,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*i[3]+e[2]*i[2]+e[3]*i[1],this.buffer[1]+=e[0]*i[3]+e[1]*i[2]+e[2]*i[1]+e[3]*i[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Ls(this.buffer[3])} ${Ls(this.buffer[2])} ${Ls(this.buffer[1])} ${Ls(this.buffer[0])}`}static multiply(t,e){return new ci(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new ci(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return ci.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return ci.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const i=t.startsWith("-"),n=t.length,s=new ci(e);for(let o=i?1:0;othis.compareFields(i,e[n]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function ur(r,t){return t instanceof r.constructor}function hs(r,t){return r===t||ur(r,t)}function Qi(r,t){return r===t||ur(r,t)&&r.bitWidth===t.bitWidth&&r.isSigned===t.isSigned}function lu(r,t){return r===t||ur(r,t)&&r.precision===t.precision}function NP(r,t){return r===t||ur(r,t)&&r.byteWidth===t.byteWidth}function kf(r,t){return r===t||ur(r,t)&&r.unit===t.unit}function fa(r,t){return r===t||ur(r,t)&&r.unit===t.unit&&r.timezone===t.timezone}function da(r,t){return r===t||ur(r,t)&&r.unit===t.unit&&r.bitWidth===t.bitWidth}function LP(r,t){return r===t||ur(r,t)&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}function BP(r,t){return r===t||ur(r,t)&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}function Uf(r,t){return r===t||ur(r,t)&&r.mode===t.mode&&r.typeIds.every((e,i)=>e===t.typeIds[i])&&Ci.compareManyFields(r.children,t.children)}function kP(r,t){return r===t||ur(r,t)&&r.id===t.id&&r.isOrdered===t.isOrdered&&Ci.visit(r.indices,t.indices)&&Ci.visit(r.dictionary,t.dictionary)}function zf(r,t){return r===t||ur(r,t)&&r.unit===t.unit}function pa(r,t){return r===t||ur(r,t)&&r.unit===t.unit}function UP(r,t){return r===t||ur(r,t)&&r.listSize===t.listSize&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}function zP(r,t){return r===t||ur(r,t)&&r.keysSorted===t.keysSorted&&r.children.length===t.children.length&&Ci.compareManyFields(r.children,t.children)}Ut.prototype.visitNull=hs;Ut.prototype.visitBool=hs;Ut.prototype.visitInt=Qi;Ut.prototype.visitInt8=Qi;Ut.prototype.visitInt16=Qi;Ut.prototype.visitInt32=Qi;Ut.prototype.visitInt64=Qi;Ut.prototype.visitUint8=Qi;Ut.prototype.visitUint16=Qi;Ut.prototype.visitUint32=Qi;Ut.prototype.visitUint64=Qi;Ut.prototype.visitFloat=lu;Ut.prototype.visitFloat16=lu;Ut.prototype.visitFloat32=lu;Ut.prototype.visitFloat64=lu;Ut.prototype.visitUtf8=hs;Ut.prototype.visitLargeUtf8=hs;Ut.prototype.visitBinary=hs;Ut.prototype.visitLargeBinary=hs;Ut.prototype.visitFixedSizeBinary=NP;Ut.prototype.visitDate=kf;Ut.prototype.visitDateDay=kf;Ut.prototype.visitDateMillisecond=kf;Ut.prototype.visitTimestamp=fa;Ut.prototype.visitTimestampSecond=fa;Ut.prototype.visitTimestampMillisecond=fa;Ut.prototype.visitTimestampMicrosecond=fa;Ut.prototype.visitTimestampNanosecond=fa;Ut.prototype.visitTime=da;Ut.prototype.visitTimeSecond=da;Ut.prototype.visitTimeMillisecond=da;Ut.prototype.visitTimeMicrosecond=da;Ut.prototype.visitTimeNanosecond=da;Ut.prototype.visitDecimal=hs;Ut.prototype.visitList=LP;Ut.prototype.visitStruct=BP;Ut.prototype.visitUnion=Uf;Ut.prototype.visitDenseUnion=Uf;Ut.prototype.visitSparseUnion=Uf;Ut.prototype.visitDictionary=kP;Ut.prototype.visitInterval=zf;Ut.prototype.visitIntervalDayTime=zf;Ut.prototype.visitIntervalYearMonth=zf;Ut.prototype.visitDuration=pa;Ut.prototype.visitDurationSecond=pa;Ut.prototype.visitDurationMillisecond=pa;Ut.prototype.visitDurationMicrosecond=pa;Ut.prototype.visitDurationNanosecond=pa;Ut.prototype.visitFixedSizeList=UP;Ut.prototype.visitMap=zP;const Ci=new Ut;function jP(r,t){return Ci.compareSchemas(r,t)}function $P(r,t){return Ci.compareFields(r,t)}function VP(r,t){return Ci.visit(r,t)}const pm=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_F),RP),wP),xF),pF),_P),yF),{compareSchemas:jP,compareFields:$P,compareTypes:VP}),sw=6048e5,GP=864e5,mm=Symbol.for("constructDateFrom");function Gi(r,t){return typeof r=="function"?r(t):r&&typeof r=="object"&&mm in r?r[mm](t):r instanceof Date?new r.constructor(t):new Date(t)}function qr(r,t){return Gi(t||r,r)}let WP={};function uu(){return WP}function ea(r,t){var a,l,u,c;const e=uu(),i=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,n=qr(r,t==null?void 0:t.in),s=n.getDay(),o=(s=s.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function ym(r){const t=qr(r),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+r-+e}function HP(r,...t){const e=Gi.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function gm(r,t){const e=qr(r,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function XP(r,t,e){const[i,n]=HP(e==null?void 0:e.in,r,t),s=gm(i),o=gm(n),a=+s-ym(s),l=+o-ym(o);return Math.round((a-l)/GP)}function YP(r,t){const e=ow(r,t),i=Gi(r,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Ul(i)}function qP(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function QP(r){return!(!qP(r)&&typeof r!="number"||isNaN(+qr(r)))}function KP(r,t){const e=qr(r,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const ZP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},JP=(r,t,e)=>{let i;const n=ZP[r];return typeof n=="string"?i=n:t===1?i=n.one:i=n.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function nc(r){return(t={})=>{const e=t.width?String(t.width):r.defaultWidth;return r.formats[e]||r.formats[r.defaultWidth]}}const tM={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},eM={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},rM={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},iM={date:nc({formats:tM,defaultWidth:"full"}),time:nc({formats:eM,defaultWidth:"full"}),dateTime:nc({formats:rM,defaultWidth:"full"})},nM={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},sM=(r,t,e,i)=>nM[r];function go(r){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let n;if(i==="formatting"&&r.formattingValues){const o=r.defaultFormattingWidth||r.defaultWidth,a=e!=null&&e.width?String(e.width):o;n=r.formattingValues[a]||r.formattingValues[o]}else{const o=r.defaultWidth,a=e!=null&&e.width?String(e.width):r.defaultWidth;n=r.values[a]||r.values[o]}const s=r.argumentCallback?r.argumentCallback(t):t;return n[s]}}const oM={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aM={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},lM={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},uM={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},cM={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},hM={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},fM=(r,t)=>{const e=Number(r),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},dM={ordinalNumber:fM,era:go({values:oM,defaultWidth:"wide"}),quarter:go({values:aM,defaultWidth:"wide",argumentCallback:r=>r-1}),month:go({values:lM,defaultWidth:"wide"}),day:go({values:uM,defaultWidth:"wide"}),dayPeriod:go({values:cM,defaultWidth:"wide",formattingValues:hM,defaultFormattingWidth:"wide"})};function vo(r){return(t,e={})=>{const i=e.width,n=i&&r.matchPatterns[i]||r.matchPatterns[r.defaultMatchWidth],s=t.match(n);if(!s)return null;const o=s[0],a=i&&r.parsePatterns[i]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(a)?mM(a,h=>h.test(o)):pM(a,h=>h.test(o));let u;u=r.valueCallback?r.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const c=t.slice(o.length);return{value:u,rest:c}}}function pM(r,t){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)&&t(r[e]))return e}function mM(r,t){for(let e=0;e{const i=t.match(r.matchPattern);if(!i)return null;const n=i[0],s=t.match(r.parsePattern);if(!s)return null;let o=r.valueCallback?r.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(n.length);return{value:o,rest:a}}}const gM=/^(\d+)(th|st|nd|rd)?/i,vM=/\d+/i,_M={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},bM={any:[/^b/i,/^(a|c)/i]},wM={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xM={any:[/1/i,/2/i,/3/i,/4/i]},SM={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},TM={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},IM={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},EM={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},CM={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},AM={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},OM={ordinalNumber:yM({matchPattern:gM,parsePattern:vM,valueCallback:r=>parseInt(r,10)}),era:vo({matchPatterns:_M,defaultMatchWidth:"wide",parsePatterns:bM,defaultParseWidth:"any"}),quarter:vo({matchPatterns:wM,defaultMatchWidth:"wide",parsePatterns:xM,defaultParseWidth:"any",valueCallback:r=>r+1}),month:vo({matchPatterns:SM,defaultMatchWidth:"wide",parsePatterns:TM,defaultParseWidth:"any"}),day:vo({matchPatterns:IM,defaultMatchWidth:"wide",parsePatterns:EM,defaultParseWidth:"any"}),dayPeriod:vo({matchPatterns:CM,defaultMatchWidth:"any",parsePatterns:AM,defaultParseWidth:"any"})},FM={code:"en-US",formatDistance:JP,formatLong:iM,formatRelative:sM,localize:dM,match:OM,options:{weekStartsOn:0,firstWeekContainsDate:1}};function PM(r,t){const e=qr(r,t==null?void 0:t.in);return XP(e,KP(e))+1}function MM(r,t){const e=qr(r,t==null?void 0:t.in),i=+Ul(e)-+YP(e);return Math.round(i/sw)+1}function aw(r,t){var c,h,p,f;const e=qr(r,t==null?void 0:t.in),i=e.getFullYear(),n=uu(),s=(t==null?void 0:t.firstWeekContainsDate)??((h=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(p=n.locale)==null?void 0:p.options)==null?void 0:f.firstWeekContainsDate)??1,o=Gi((t==null?void 0:t.in)||r,0);o.setFullYear(i+1,0,s),o.setHours(0,0,0,0);const a=ea(o,t),l=Gi((t==null?void 0:t.in)||r,0);l.setFullYear(i,0,s),l.setHours(0,0,0,0);const u=ea(l,t);return+e>=+a?i+1:+e>=+u?i:i-1}function DM(r,t){var a,l,u,c;const e=uu(),i=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((c=(u=e.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,n=aw(r,t),s=Gi((t==null?void 0:t.in)||r,0);return s.setFullYear(n,0,i),s.setHours(0,0,0,0),ea(s,t)}function RM(r,t){const e=qr(r,t==null?void 0:t.in),i=+ea(e,t)-+DM(e,t);return Math.round(i/sw)+1}function ve(r,t){const e=r<0?"-":"",i=Math.abs(r).toString().padStart(t,"0");return e+i}const rn={y(r,t){const e=r.getFullYear(),i=e>0?e:1-e;return ve(t==="yy"?i%100:i,t.length)},M(r,t){const e=r.getMonth();return t==="M"?String(e+1):ve(e+1,2)},d(r,t){return ve(r.getDate(),t.length)},a(r,t){const e=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(r,t){return ve(r.getHours()%12||12,t.length)},H(r,t){return ve(r.getHours(),t.length)},m(r,t){return ve(r.getMinutes(),t.length)},s(r,t){return ve(r.getSeconds(),t.length)},S(r,t){const e=t.length,i=r.getMilliseconds(),n=Math.trunc(i*Math.pow(10,e-3));return ve(n,t.length)}},_s={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vm={G:function(r,t,e){const i=r.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(r,t,e){if(t==="yo"){const i=r.getFullYear(),n=i>0?i:1-i;return e.ordinalNumber(n,{unit:"year"})}return rn.y(r,t)},Y:function(r,t,e,i){const n=aw(r,i),s=n>0?n:1-n;if(t==="YY"){const o=s%100;return ve(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):ve(s,t.length)},R:function(r,t){const e=ow(r);return ve(e,t.length)},u:function(r,t){const e=r.getFullYear();return ve(e,t.length)},Q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return ve(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(r,t,e){const i=Math.ceil((r.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return ve(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(r,t,e){const i=r.getMonth();switch(t){case"M":case"MM":return rn.M(r,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(r,t,e){const i=r.getMonth();switch(t){case"L":return String(i+1);case"LL":return ve(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(r,t,e,i){const n=RM(r,i);return t==="wo"?e.ordinalNumber(n,{unit:"week"}):ve(n,t.length)},I:function(r,t,e){const i=MM(r);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):ve(i,t.length)},d:function(r,t,e){return t==="do"?e.ordinalNumber(r.getDate(),{unit:"date"}):rn.d(r,t)},D:function(r,t,e){const i=PM(r);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):ve(i,t.length)},E:function(r,t,e){const i=r.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ve(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(n,{width:"short",context:"formatting"});case"eeee":default:return e.day(n,{width:"wide",context:"formatting"})}},c:function(r,t,e,i){const n=r.getDay(),s=(n-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ve(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(n,{width:"narrow",context:"standalone"});case"cccccc":return e.day(n,{width:"short",context:"standalone"});case"cccc":default:return e.day(n,{width:"wide",context:"standalone"})}},i:function(r,t,e){const i=r.getDay(),n=i===0?7:i;switch(t){case"i":return String(n);case"ii":return ve(n,t.length);case"io":return e.ordinalNumber(n,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(r,t,e){const n=r.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(r,t,e){const i=r.getHours();let n;switch(i===12?n=_s.noon:i===0?n=_s.midnight:n=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(r,t,e){const i=r.getHours();let n;switch(i>=17?n=_s.evening:i>=12?n=_s.afternoon:i>=4?n=_s.morning:n=_s.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(r,t,e){if(t==="ho"){let i=r.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return rn.h(r,t)},H:function(r,t,e){return t==="Ho"?e.ordinalNumber(r.getHours(),{unit:"hour"}):rn.H(r,t)},K:function(r,t,e){const i=r.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},k:function(r,t,e){let i=r.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):ve(i,t.length)},m:function(r,t,e){return t==="mo"?e.ordinalNumber(r.getMinutes(),{unit:"minute"}):rn.m(r,t)},s:function(r,t,e){return t==="so"?e.ordinalNumber(r.getSeconds(),{unit:"second"}):rn.s(r,t)},S:function(r,t){return rn.S(r,t)},X:function(r,t,e){const i=r.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return bm(i);case"XXXX":case"XX":return Vn(i);case"XXXXX":case"XXX":default:return Vn(i,":")}},x:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"x":return bm(i);case"xxxx":case"xx":return Vn(i);case"xxxxx":case"xxx":default:return Vn(i,":")}},O:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+_m(i,":");case"OOOO":default:return"GMT"+Vn(i,":")}},z:function(r,t,e){const i=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+_m(i,":");case"zzzz":default:return"GMT"+Vn(i,":")}},t:function(r,t,e){const i=Math.trunc(+r/1e3);return ve(i,t.length)},T:function(r,t,e){return ve(+r,t.length)}};function _m(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=Math.trunc(i/60),s=i%60;return s===0?e+String(n):e+String(n)+t+ve(s,2)}function bm(r,t){return r%60===0?(r>0?"-":"+")+ve(Math.abs(r)/60,2):Vn(r,t)}function Vn(r,t=""){const e=r>0?"-":"+",i=Math.abs(r),n=ve(Math.trunc(i/60),2),s=ve(i%60,2);return e+n+t+s}const wm=(r,t)=>{switch(r){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lw=(r,t)=>{switch(r){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},NM=(r,t)=>{const e=r.match(/(P+)(p+)?/)||[],i=e[1],n=e[2];if(!n)return wm(r,t);let s;switch(i){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",wm(i,t)).replace("{{time}}",lw(n,t))},LM={p:lw,P:NM},BM=/^D+$/,kM=/^Y+$/,UM=["D","DD","YY","YYYY"];function zM(r){return BM.test(r)}function jM(r){return kM.test(r)}function $M(r,t,e){const i=VM(r,t,e);if(console.warn(i),UM.includes(r))throw new RangeError(i)}function VM(r,t,e){const i=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const GM=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,WM=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HM=/^'([^]*?)'?$/,XM=/''/g,YM=/[a-zA-Z]/;function uw(r,t,e){var c,h,p,f;const i=uu(),n=i.locale??FM,s=i.firstWeekContainsDate??((h=(c=i.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,o=i.weekStartsOn??((f=(p=i.locale)==null?void 0:p.options)==null?void 0:f.weekStartsOn)??0,a=qr(r,e==null?void 0:e.in);if(!QP(a))throw new RangeError("Invalid time value");let l=t.match(WM).map(y=>{const g=y[0];if(g==="p"||g==="P"){const d=LM[g];return d(y,n.formatLong)}return y}).join("").match(GM).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const g=y[0];if(g==="'")return{isToken:!1,value:qM(y)};if(vm[g])return{isToken:!0,value:y};if(g.match(YM))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:y}});n.localize.preprocessor&&(l=n.localize.preprocessor(a,l));const u={firstWeekContainsDate:s,weekStartsOn:o,locale:n};return l.map(y=>{if(!y.isToken)return y.value;const g=y.value;(jM(g)||zM(g))&&$M(g,t,String(r));const d=vm[g[0]];return d(a,g,n.localize,u)}).join("")}function qM(r){const t=r.match(HM);return t?t[1].replace(XM,"'"):r}function QM(r,t){return qr(r*1e3,t==null?void 0:t.in)}function KM(r,t){const e=ZM(t)?new t(0):Gi(t,0);return e.setFullYear(r.getFullYear(),r.getMonth(),r.getDate()),e.setHours(r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),e}function ZM(r){var t;return typeof r=="function"&&((t=r.prototype)==null?void 0:t.constructor)===r}function JM(r,t){let e=r.length;switch("string"){case"string":{if(t.length!==1)throw new Error("The 'chars' parameter should be a single character string.");for(;e>0&&r[e-1]===t;)e--;break}}return r.substring(0,e)}function gr(r){return r==null}function tD(r){return r!=null}async function Sh(){if(typeof window<"u"&&window!==null)return"browser";try{const r=await ln(()=>import("./__vite-browser-external-FmFgRqLi.js"),[]);return typeof r<"u"&&r.versions!=null&&r.versions.node!=null?"node":"unknown"}catch{return"unknown"}}function eD(r){return gr(r)?!1:Et.isInt(r.type)&&!cw(r)||rD(r)}function rD(r){return gr(r)?!1:Et.isInt(r.type)&&r.type.isSigned===!1}function iD(r){return gr(r)?!1:Et.isFloat(r.type)??!1}function nD(r){return gr(r)?!1:Et.isDecimal(r.type)}function sD(r){return gr(r)?!1:Et.isBool(r.type)}function oD(r){return gr(r)?!1:Et.isDuration(r.type)}function cw(r){return gr(r)?!1:Et.isInt(r.type)&&r.metadata.get("ARROW:extension:name")==="period"}function aD(r){return gr(r)?!1:Et.isTimestamp(r.type)}function lD(r){return gr(r)?!1:Et.isDate(r.type)}function uD(r){return gr(r)?!1:Et.isTime(r.type)}function cD(r){return gr(r)?!1:Et.isList(r.type)||Et.isFixedSizeList(r.type)}function hD(r){return gr(r)?!1:Et.isStruct(r.type)||Et.isMap(r.type)}function fD(r){return gr(r)?!1:Et.isStruct(r.type)&&r.metadata.get("ARROW:extension:name")==="interval"||Et.isInterval(r.type)}function dD(r,t){let e;if(t===Jt.MILLISECOND)e=1e3;else if(t===Jt.MICROSECOND)e=1e3*1e3;else if(t===Jt.NANOSECOND)e=1e3*1e3*1e3;else return Number(r);return typeof r=="bigint"&&!Number.isSafeInteger(Number(r))?Number(r/BigInt(e)):Number(r)/e}function pD(r,t){var i;const e=dD(r,((i=t==null?void 0:t.type)==null?void 0:i.unit)??Jt.SECOND);return QM(e)}function mD(r,t){const e=pD(r,t);return uw(e,e.getMilliseconds()===0?"HH:mm:ss":"HH:mm:ss.SSS")}function yD(r){const t="yyyy-MM-dd";return r instanceof Date||typeof r=="number"&&Number.isFinite(r)?uw(r,t):(console.warn(`Unsupported date value: ${r}`),String(r))}function gD(r,t){var n;if(!(r instanceof Date||typeof r=="number"&&Number.isFinite(r)))return console.warn(`Unsupported datetime value: ${r}`),null;let e;const i=(n=t==null?void 0:t.type)==null?void 0:n.timezone;return typeof r=="number"?i?e=new Er(r,i):e=new Er(r):i?e=new Er(r,i):e=new Er(r),KM(e,Date)}function vD(r,t){var a;const e=((a=t==null?void 0:t.type)==null?void 0:a.scale)||0;let i=pm.bigNumToString(new pm.BN(r)).padStart(e,"0");if(e===0)return i;let n="";i.startsWith("-")&&(n="-",i=i.slice(1));const s=i.slice(0,-e)||"0",o=JM(i.slice(-e),"0")||"";return`${n}${s}${o?`.${o}`:""}`}function _D(r){const t=r[0],e=r[1],i=[];return t!==0&&i.push(`${t} year${t>1?"s":""}`),e!==0&&i.push(`${e} month${e>1?"s":""}`),i.length?i.join(" "):"0 months"}function bD(r,t){var i,n,s,o;if(Et.isInterval(t==null?void 0:t.type))return _D(r);const e=t&&t.metadata.get("ARROW:extension:name");if(e&&e==="pandas.interval"){const a=JSON.parse(t.metadata.get("ARROW:extension:metadata")),{closed:l}=a,u=r.toJSON(),c=l==="both"||l==="left"?"[":"(",h=l==="both"||l==="right"?"]":")",p=Th(u.left,(n=(i=t.type)==null?void 0:i.children)==null?void 0:n[0]),f=Th(u.right,(o=(s=t.type)==null?void 0:s.children)==null?void 0:o[1]);return`${c+p}, ${f+h}`}return String(r)}function wD(r,t){return(t==null?void 0:t.type)instanceof bh?JSON.parse(JSON.stringify(r,(e,i)=>{if(tD(i))return typeof i=="bigint"?Number(i):i})):JSON.parse(JSON.stringify(r,(e,i)=>typeof i=="bigint"?Number(i):i))}function Th(r,t){if(gr(r))return null;const e=r instanceof Date||Number.isFinite(r);if(e&&lD(t))return yD(r);if(typeof r=="bigint"&&uD(t))return mD(Number(r),t);if(e&&aD(t))return gD(r,t);if(cw(t))throw new Error("Period type is not supported yet");if(fD(t))return bD(r,t);if(oD(t))throw new Error("Duration type is not supported yet");return nD(t)?vD(r,t):iD(t)&&Number.isFinite(r)||eD(t)?r:hD(t)||cD(t)?wD(r,t):sD(t)?!!r:String(r)}function xm(r){return((r.toArray()||[]).map(i=>i.toJSON())||[]).map(i=>(r.schema.fields.forEach(n=>i[n.name]=Th(i[n.name],n)),i))}var ra=(r=>(r.ORIGIN_PRIVATE_FS="origin-private-fs",r.NODE_FS="node-fs",r))(ra||{});async function hw(r){const t=Cx(r,{logger:!1});let e,i;const n=await Sh();if(n==="browser"){if(typeof t.bundles>"u"){const{getBundles:l}=await ln(async()=>{const{getBundles:u}=await import("./default-browser-BrgSDbLD.js");return{getBundles:u}},[]);t.bundles=await l()}i=await kp(await t.bundles),e=new Worker(i.mainWorker)}else if(n==="node"){if(typeof t.bundles>"u"){const{getBundles:c}=await ln(async()=>{const{getBundles:h}=await import("./default-node-E6uRkI3P.js");return{getBundles:h}},__vite__mapDeps([0,1,2]));t.bundles=await c()}i=await kp(await t.bundles);let l=i.mainWorker;l.startsWith("/@fs/")&&(l=l.replace("/@fs/","file://"));const u=await ln(()=>import("./index-Cp8iQ_hy.js"),[]);e=new u.default(l,{type:"module"})}else throw new Error(`Unsupported environment: ${n}`);let s;t.logger===!0?s=new I0:t.logger===!1?s=new c2:s=t.logger;const o=new g2(s,e);if(await o.instantiate(i.mainModule,i.pthreadWorker),t.storage)switch(t.storage.type){case ra.ORIGIN_PRIVATE_FS:{try{let l=t.storage.path;l.startsWith("/")&&(l=l.slice(1)),await o.open({path:`opfs://${l}`,accessMode:t.storage.accessMode})}catch(l){throw await o.terminate(),await e.terminate(),l}break}case ra.NODE_FS:{try{await o.open({path:t.storage.path,accessMode:t.storage.accessMode,useDirectIO:!0})}catch(l){throw await o.terminate(),await e.terminate(),l}break}}const a=await o.connect();return{worker:e,db:o,conn:a,query:async(l,u=[])=>{if(!u||u.length===0){const f=await a.query(l);return xm(f)}const c=await a.prepare(l),h=await c.query(...u),p=xm(h);return c.close(),p},close:async()=>{await a.close(),await o.terminate(),await e.terminate()}}}async function xD(r,t){await(await r).conn.send("BEGIN TRANSACTION");try{const e=await t(r);return await(await r).conn.send("COMMIT"),e}catch(e){throw await(await r).conn.send("ROLLBACK"),e}}async function SD(r,t,e){await(await r).conn.send(`SAVEPOINT ${t}`);try{const i=await e(r);return await(await r).conn.send(`RELEASE SAVEPOINT ${t}`),i}catch(i){throw await(await r).conn.send(`ROLLBACK TO SAVEPOINT ${t}`),i}}const xt=Symbol.for("drizzle:entityKind");function lt(r,t){if(!r||typeof r!="object")return!1;if(r instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,xt))throw new Error(`Class "${t.name??""}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let e=Object.getPrototypeOf(r).constructor;if(e)for(;e;){if(xt in e&&e[xt]===t[xt])return!0;e=Object.getPrototypeOf(e)}return!1}var Mm;Mm=xt;class Ke{constructor(t,e){G(this,"name");G(this,"keyAsName");G(this,"primary");G(this,"notNull");G(this,"default");G(this,"defaultFn");G(this,"onUpdateFn");G(this,"hasDefault");G(this,"isUnique");G(this,"uniqueName");G(this,"uniqueType");G(this,"dataType");G(this,"columnType");G(this,"enumValues");G(this,"generated");G(this,"generatedIdentity");G(this,"config");this.table=t,this.config=e,this.name=e.name,this.keyAsName=e.keyAsName,this.notNull=e.notNull,this.default=e.default,this.defaultFn=e.defaultFn,this.onUpdateFn=e.onUpdateFn,this.hasDefault=e.hasDefault,this.primary=e.primaryKey,this.isUnique=e.isUnique,this.uniqueName=e.uniqueName,this.uniqueType=e.uniqueType,this.dataType=e.dataType,this.columnType=e.columnType,this.generated=e.generated,this.generatedIdentity=e.generatedIdentity}mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}}G(Ke,Mm,"Column");const Ys=Symbol.for("drizzle:Name");function TD(r,t){return`${r[Ys]}_${t.join("_")}_unique`}var Dm,Rm;class Ar extends(Rm=Ke,Dm=xt,Rm){constructor(t,e){e.uniqueName||(e.uniqueName=TD(t,[e.name])),super(t,e),this.table=t}}G(Ar,Dm,"PgColumn");const Sm=Symbol.for("drizzle:isPgEnum");function ID(r){return!!r&&typeof r=="function"&&Sm in r&&r[Sm]===!0}var Nm;Nm=xt;class Or{constructor(t,e,i,n=!1){this._={brand:"Subquery",sql:t,selectedFields:e,alias:i,isWith:n}}}G(Or,Nm,"Subquery");var Lm,Bm;class jf extends(Bm=Or,Lm=xt,Bm){}G(jf,Lm,"WithSubquery");const Pr={startActiveSpan(r,t){return t()}},He=Symbol.for("drizzle:ViewBaseConfig"),Qa=Symbol.for("drizzle:Schema"),Ih=Symbol.for("drizzle:Columns"),Tm=Symbol.for("drizzle:ExtraConfigColumns"),sc=Symbol.for("drizzle:OriginalName"),oc=Symbol.for("drizzle:BaseName"),zl=Symbol.for("drizzle:IsAlias"),Im=Symbol.for("drizzle:ExtraConfigBuilder"),ED=Symbol.for("drizzle:IsDrizzleTable");var km,Um,zm,jm,$m,Vm,Gm,Wm,Hm,Xm;Xm=xt,Hm=Ys,Wm=sc,Gm=Qa,Vm=Ih,$m=Tm,jm=oc,zm=zl,Um=ED,km=Im;class Tt{constructor(t,e,i){G(this,Hm);G(this,Wm);G(this,Gm);G(this,Vm);G(this,$m);G(this,jm);G(this,zm,!1);G(this,Um,!0);G(this,km);this[Ys]=this[sc]=t,this[Qa]=e,this[oc]=i}}G(Tt,Xm,"Table"),G(Tt,"Symbol",{Name:Ys,Schema:Qa,OriginalName:sc,Columns:Ih,ExtraConfigColumns:Tm,BaseName:oc,IsAlias:zl,ExtraConfigBuilder:Im});function qn(r){return r[Ys]}function ia(r){return`${r[Qa]??"public"}.${r[Ys]}`}function fw(r){return r!=null&&typeof r.getSQL=="function"}function CD(r){var e;const t={sql:"",params:[]};for(const i of r)t.sql+=i.sql,t.params.push(...i.params),(e=i.typings)!=null&&e.length&&(t.typings||(t.typings=[]),t.typings.push(...i.typings));return t}var Ym;Ym=xt;class Xe{constructor(t){G(this,"value");this.value=Array.isArray(t)?t:[t]}getSQL(){return new Ft([this])}}G(Xe,Ym,"StringChunk");var qm;qm=xt;const Hn=class Hn{constructor(t){G(this,"decoder",dw);G(this,"shouldInlineParams",!1);this.queryChunks=t}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Pr.startActiveSpan("drizzle.buildSQL",e=>{const i=this.buildQueryFromSourceParams(this.queryChunks,t);return e==null||e.setAttributes({"drizzle.query.text":i.sql,"drizzle.query.params":JSON.stringify(i.params)}),i})}buildQueryFromSourceParams(t,e){const i=Object.assign({},e,{inlineParams:e.inlineParams||this.shouldInlineParams,paramStartIndex:e.paramStartIndex||{value:0}}),{casing:n,escapeName:s,escapeParam:o,prepareTyping:a,inlineParams:l,paramStartIndex:u}=i;return CD(t.map(c=>{var h;if(lt(c,Xe))return{sql:c.value.join(""),params:[]};if(lt(c,jl))return{sql:s(c.value),params:[]};if(c===void 0)return{sql:"",params:[]};if(Array.isArray(c)){const p=[new Xe("(")];for(const[f,y]of c.entries())p.push(y),fr},pw={mapToDriverValue:r=>r};({...dw,...pw});var Km;Km=xt;class Wi{constructor(t,e=pw){G(this,"brand");this.value=t,this.encoder=e}getSQL(){return new Ft([this])}}G(Wi,Km,"Param");function X(r,...t){const e=[];(t.length>0||r.length>0&&r[0]!=="")&&e.push(new Xe(r[0]));for(const[i,n]of t.entries())e.push(n,new Xe(r[i+1]));return new Ft(e)}(r=>{function t(){return new Ft([])}r.empty=t;function e(l){return new Ft(l)}r.fromList=e;function i(l){return new Ft([new Xe(l)])}r.raw=i;function n(l,u){const c=[];for(const[h,p]of l.entries())h>0&&u!==void 0&&c.push(u),c.push(p);return new Ft(c)}r.join=n;function s(l){return new jl(l)}r.identifier=s;function o(l){return new ss(l)}r.placeholder=o;function a(l,u){return new Wi(l,u)}r.param=a})(X||(X={}));(r=>{var e;e=xt;const i=class i{constructor(s,o){G(this,"isSelectionField",!1);this.sql=s,this.fieldAlias=o}getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}};G(i,e,"SQL.Aliased");let t=i;r.Aliased=t})(Ft||(Ft={}));var Zm;Zm=xt;class ss{constructor(t){this.name=t}getSQL(){return new Ft([this])}}G(ss,Zm,"Placeholder");function Em(r,t){return r.map(e=>{if(lt(e,ss)){if(!(e.name in t))throw new Error(`No value for placeholder "${e.name}" was provided`);return t[e.name]}if(lt(e,Wi)&<(e.value,ss)){if(!(e.value.name in t))throw new Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(t[e.value.name])}return e})}const OD=Symbol.for("drizzle:IsDrizzleView");var Jm,ty,ey;ey=xt,ty=He,Jm=OD;class Sn{constructor({name:t,schema:e,selectedFields:i,query:n}){G(this,ty);G(this,Jm,!0);this[He]={name:t,originalName:t,schema:e,selectedFields:i,query:n,isExisting:!n,isAlias:!1}}getSQL(){return new Ft([this])}}G(Sn,ey,"View");Ke.prototype.getSQL=function(){return new Ft([this])};Tt.prototype.getSQL=function(){return new Ft([this])};Or.prototype.getSQL=function(){return new Ft([this])};var ry;ry=xt;class na{constructor(t){this.table=t}get(t,e){return e==="table"?this.table:t[e]}}G(na,ry,"ColumnAliasProxyHandler");var iy;iy=xt;class cu{constructor(t,e){this.alias=t,this.replaceOriginalName=e}get(t,e){if(e===Tt.Symbol.IsAlias)return!0;if(e===Tt.Symbol.Name)return this.alias;if(this.replaceOriginalName&&e===Tt.Symbol.OriginalName)return this.alias;if(e===He)return{...t[He],name:this.alias,isAlias:!0};if(e===Tt.Symbol.Columns){const n=t[Tt.Symbol.Columns];if(!n)return n;const s={};return Object.keys(n).map(o=>{s[o]=new Proxy(n[o],new na(new Proxy(t,this)))}),s}const i=t[e];return lt(i,Ke)?new Proxy(i,new na(new Proxy(t,this))):i}}G(cu,iy,"TableAliasProxyHandler");function ac(r,t){return new Proxy(r,new cu(t,!1))}function Li(r,t){return new Proxy(r,new na(new Proxy(r.table,new cu(t,!1))))}function mw(r,t){return new Ft.Aliased($l(r.sql,t),r.fieldAlias)}function $l(r,t){return X.join(r.queryChunks.map(e=>lt(e,Ke)?Li(e,t):lt(e,Ft)?$l(e,t):lt(e,Ft.Aliased)?mw(e,t):e))}var ny,sy;class $f extends(sy=Error,ny=xt,sy){constructor({message:t,cause:e}){super(t),this.name="DrizzleError",this.cause=e}}G($f,ny,"DrizzleError");var oy,ay;class yw extends(ay=$f,oy=xt,ay){constructor(){super({message:"Rollback"})}}G(yw,oy,"TransactionRollbackError");function yr(r,t){return AD(t)&&!fw(r)&&!lt(r,Wi)&&!lt(r,ss)&&!lt(r,Ke)&&!lt(r,Tt)&&!lt(r,Sn)?new Wi(r,t):r}const gw=(r,t)=>X`${r} = ${yr(t,r)}`,FD=(r,t)=>X`${r} <> ${yr(t,r)}`;function Eh(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Xe("("),X.join(t,new Xe(" and ")),new Xe(")")])}function PD(...r){const t=r.filter(e=>e!==void 0);if(t.length!==0)return t.length===1?new Ft(t):new Ft([new Xe("("),X.join(t,new Xe(" or ")),new Xe(")")])}function MD(r){return X`not ${r}`}const DD=(r,t)=>X`${r} > ${yr(t,r)}`,RD=(r,t)=>X`${r} >= ${yr(t,r)}`,ND=(r,t)=>X`${r} < ${yr(t,r)}`,LD=(r,t)=>X`${r} <= ${yr(t,r)}`;function BD(r,t){return Array.isArray(t)?t.length===0?X`false`:X`${r} in ${t.map(e=>yr(e,r))}`:X`${r} in ${yr(t,r)}`}function kD(r,t){return Array.isArray(t)?t.length===0?X`true`:X`${r} not in ${t.map(e=>yr(e,r))}`:X`${r} not in ${yr(t,r)}`}function UD(r){return X`${r} is null`}function zD(r){return X`${r} is not null`}function jD(r){return X`exists ${r}`}function $D(r){return X`not exists ${r}`}function VD(r,t,e){return X`${r} between ${yr(t,r)} and ${yr(e,r)}`}function GD(r,t,e){return X`${r} not between ${yr(t,r)} and ${yr(e,r)}`}function WD(r,t){return X`${r} like ${t}`}function HD(r,t){return X`${r} not like ${t}`}function XD(r,t){return X`${r} ilike ${t}`}function YD(r,t){return X`${r} not ilike ${t}`}function qD(r){return X`${r} asc`}function QD(r){return X`${r} desc`}var ly;ly=xt;class vw{write(t){console.log(t)}}G(vw,ly,"ConsoleLogWriter");var uy;uy=xt;class _w{constructor(t){G(this,"writer");this.writer=(t==null?void 0:t.writer)??new vw}logQuery(t,e){const i=e.map(s=>{try{return JSON.stringify(s)}catch{return String(s)}}),n=i.length?` -- params: [${i.join(", ")}]`:"";this.writer.write(`Query: ${t}${n}`)}}G(_w,uy,"DefaultLogger");var cy;cy=xt;class bw{logQuery(){}}G(bw,cy,"NoopLogger");var hy,fy;fy=xt,hy=Symbol.toStringTag;class Tn{constructor(){G(this,hy,"QueryPromise")}catch(t){return this.then(void 0,t)}finally(t){return this.then(e=>(t==null||t(),e),e=>{throw t==null||t(),e})}then(t,e){return this.execute().then(t,e)}}G(Tn,fy,"QueryPromise");function os(r,t){return Object.entries(r).reduce((e,[i,n])=>{if(typeof i!="string")return e;const s=t?[...t,i]:[i];return lt(n,Ke)||lt(n,Ft)||lt(n,Ft.Aliased)?e.push({path:s,field:n}):lt(n,Tt)?e.push(...os(n[Tt.Symbol.Columns],s)):e.push(...os(n,s)),e},[])}function Vf(r,t){const e=Object.keys(r),i=Object.keys(t);if(e.length!==i.length)return!1;for(const[n,s]of e.entries())if(s!==i[n])return!1;return!0}function ww(r,t){const e=Object.entries(t).filter(([,i])=>i!==void 0).map(([i,n])=>lt(n,Ft)||lt(n,Ke)?[i,n]:[i,new Wi(n,r[Tt.Symbol.Columns][i])]);if(e.length===0)throw new Error("No values to set");return Object.fromEntries(e)}function KD(r,t){for(const e of t)for(const i of Object.getOwnPropertyNames(e.prototype))i!=="constructor"&&Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(e.prototype,i)||Object.create(null))}function ZD(r){return r[Tt.Symbol.Columns]}function Wn(r){return lt(r,Or)?r._.alias:lt(r,Sn)?r[He].name:lt(r,Ft)?void 0:r[Tt.Symbol.IsAlias]?r[Tt.Symbol.Name]:r[Tt.Symbol.BaseName]}function JD(r){if(typeof r!="object"||r===null||r.constructor.name!=="Object")return!1;if("logger"in r){const t=typeof r.logger;return!(t!=="boolean"&&(t!=="object"||typeof r.logger.logQuery!="function")&&t!=="undefined")}if("schema"in r){const t=typeof r.schema;return!(t!=="object"&&t!=="undefined")}if("casing"in r){const t=typeof r.casing;return!(t!=="string"&&t!=="undefined")}if("mode"in r)return!(r.mode!=="default"||r.mode!=="planetscale"||r.mode!==void 0);if("connection"in r){const t=typeof r.connection;return!(t!=="string"&&t!=="object"&&t!=="undefined")}if("client"in r){const t=typeof r.client;return!(t!=="object"&&t!=="function"&&t!=="undefined")}return Object.keys(r).length===0}var dy,py;class xw extends(py=Ar,dy=xt,py){getSQLType(){return"date"}mapFromDriverValue(t){return new Date(t)}mapToDriverValue(t){return t.toISOString()}}G(xw,dy,"PgDate");var my,yy;class Sw extends(yy=Ar,my=xt,yy){getSQLType(){return"date"}}G(Sw,my,"PgDateString");var gy,vy;class Tw extends(vy=Ar,gy=xt,vy){constructor(t,e){super(t,e)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}G(Tw,gy,"PgJson");var _y,by;class Iw extends(by=Ar,_y=xt,by){constructor(t,e){super(t,e)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}}G(Iw,_y,"PgJsonb");var wy,xy;class Ew extends(xy=Ar,wy=xt,xy){constructor(e,i){super(e,i);G(this,"precision");G(this,"scale");this.precision=i.precision,this.scale=i.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}}G(Ew,wy,"PgNumeric");var Sy,Ty;class Cw extends(Ty=Ar,Sy=xt,Ty){constructor(e,i){super(e,i);G(this,"withTimezone");G(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}G(Cw,Sy,"PgTime");var Iy,Ey;class Aw extends(Ey=Ar,Iy=xt,Ey){constructor(e,i){super(e,i);G(this,"withTimezone");G(this,"precision");G(this,"mapFromDriverValue",e=>new Date(this.withTimezone?e:e+"+0000"));G(this,"mapToDriverValue",e=>e.toISOString());this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}}G(Aw,Iy,"PgTimestamp");var Cy,Ay;class Ow extends(Ay=Ar,Cy=xt,Ay){constructor(e,i){super(e,i);G(this,"withTimezone");G(this,"precision");this.withTimezone=i.withTimezone,this.precision=i.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}}G(Ow,Cy,"PgTimestampString");var Oy,Fy;class Fw extends(Fy=Ar,Oy=xt,Fy){getSQLType(){return"uuid"}}G(Fw,Oy,"PgUUID");const Cm=Symbol.for("drizzle:PgInlineForeignKeys"),Am=Symbol.for("drizzle:EnableRLS");var Py,My,Dy,Ry,Ny,Ly;class Br extends(Ly=Tt,Ny=xt,Ry=Cm,Dy=Am,My=Tt.Symbol.ExtraConfigBuilder,Py=Tt.Symbol.ExtraConfigColumns,Ly){constructor(){super(...arguments);G(this,Ry,[]);G(this,Dy,!1);G(this,My);G(this,Py,{})}}G(Br,Ny,"PgTable"),G(Br,"Symbol",Object.assign({},Tt.Symbol,{InlineForeignKeys:Cm,EnableRLS:Am}));var By;By=xt;class Pw{constructor(t,e){G(this,"columns");G(this,"name");this.columns=t,this.name=e}build(t){return new Mw(t,this.columns,this.name)}}G(Pw,By,"PgPrimaryKeyBuilder");var ky;ky=xt;class Mw{constructor(t,e,i){G(this,"columns");G(this,"name");this.table=t,this.columns=e,this.name=i}getName(){return this.name??`${this.table[Br.Symbol.Name]}_${this.columns.map(t=>t.name).join("_")}_pk`}}G(Mw,ky,"PgPrimaryKey");var Uy;Uy=xt;class Gf{constructor(t,e,i){G(this,"referencedTableName");G(this,"fieldName");this.sourceTable=t,this.referencedTable=e,this.relationName=i,this.referencedTableName=e[Tt.Symbol.Name]}}G(Gf,Uy,"Relation");var zy;zy=xt;class Dw{constructor(t,e){this.table=t,this.config=e}}G(Dw,zy,"Relations");var jy,$y;const Wl=class Wl extends($y=Gf,jy=xt,$y){constructor(t,e,i,n){super(t,e,i==null?void 0:i.relationName),this.config=i,this.isNullable=n}withFieldName(t){const e=new Wl(this.sourceTable,this.referencedTable,this.config,this.isNullable);return e.fieldName=t,e}};G(Wl,jy,"One");let as=Wl;var Vy,Gy;const Hl=class Hl extends(Gy=Gf,Vy=xt,Gy){constructor(t,e,i){super(t,e,i==null?void 0:i.relationName),this.config=i}withFieldName(t){const e=new Hl(this.sourceTable,this.referencedTable,this.config);return e.fieldName=t,e}};G(Hl,Vy,"Many");let Vl=Hl;function tR(){return{and:Eh,between:VD,eq:gw,exists:jD,gt:DD,gte:RD,ilike:XD,inArray:BD,isNull:UD,isNotNull:zD,like:WD,lt:ND,lte:LD,ne:FD,not:MD,notBetween:GD,notExists:$D,notLike:HD,notIlike:YD,notInArray:kD,or:PD,sql:X}}function eR(){return{sql:X,asc:qD,desc:QD}}function rR(r,t){var s;Object.keys(r).length===1&&"default"in r&&!lt(r.default,Tt)&&(r=r.default);const e={},i={},n={};for(const[o,a]of Object.entries(r))if(lt(a,Tt)){const l=ia(a),u=i[l];e[l]=o,n[o]={tsName:o,dbName:a[Tt.Symbol.Name],schema:a[Tt.Symbol.Schema],columns:a[Tt.Symbol.Columns],relations:(u==null?void 0:u.relations)??{},primaryKey:(u==null?void 0:u.primaryKey)??[]};for(const h of Object.values(a[Tt.Symbol.Columns]))h.primary&&n[o].primaryKey.push(h);const c=(s=a[Tt.Symbol.ExtraConfigBuilder])==null?void 0:s.call(a,a[Tt.Symbol.ExtraConfigColumns]);if(c)for(const h of Object.values(c))lt(h,Pw)&&n[o].primaryKey.push(...h.columns)}else if(lt(a,Dw)){const l=ia(a.table),u=e[l],c=a.config(t(a.table));let h;for(const[p,f]of Object.entries(c))if(u){const y=n[u];y.relations[p]=f}else l in i||(i[l]={relations:{},primaryKey:h}),i[l].relations[p]=f}return{tables:n,tableNamesMap:e}}function iR(r){return function(e,i){return new as(r,e,i,(i==null?void 0:i.fields.reduce((n,s)=>n&&s.notNull,!0))??!1)}}function nR(r){return function(e,i){return new Vl(r,e,i)}}function sR(r,t,e){if(lt(e,as)&&e.config)return{fields:e.config.fields,references:e.config.references};const i=t[ia(e.referencedTable)];if(!i)throw new Error(`Table "${e.referencedTable[Tt.Symbol.Name]}" not found in schema`);const n=r[i];if(!n)throw new Error(`Table "${i}" not found in schema`);const s=e.sourceTable,o=t[ia(s)];if(!o)throw new Error(`Table "${s[Tt.Symbol.Name]}" not found in schema`);const a=[];for(const l of Object.values(n.relations))(e.relationName&&e!==l&&l.relationName===e.relationName||!e.relationName&&l.referencedTable===e.sourceTable)&&a.push(l);if(a.length>1)throw e.relationName?new Error(`There are multiple relations with name "${e.relationName}" in table "${i}"`):new Error(`There are multiple relations between "${i}" and "${e.sourceTable[Tt.Symbol.Name]}". Please specify relation name`);if(a[0]&<(a[0],as)&&a[0].config)return{fields:a[0].config.references,references:a[0].config.fields};throw new Error(`There is not enough information to infer relation "${o}.${e.fieldName}"`)}function oR(r){return{one:iR(r),many:nR(r)}}function Ch(r,t,e,i,n=s=>s){const s={};for(const[o,a]of i.entries())if(a.isJson){const l=t.relations[a.tsKey],u=e[o],c=typeof u=="string"?JSON.parse(u):u;s[a.tsKey]=lt(l,as)?c&&Ch(r,r[a.relationTableTsKey],c,a.selection,n):c.map(h=>Ch(r,r[a.relationTableTsKey],h,a.selection,n))}else{const l=n(e[o]),u=a.field;let c;lt(u,Ke)?c=u:lt(u,Ft)?c=u.decoder:c=u.sql.decoder,s[a.tsKey]=l===null?null:c.mapFromDriverValue(l)}return s}var Wy;Wy=xt;const Xl=class Xl{constructor(t){G(this,"config");this.config={...t}}get(t,e){if(e==="_")return{...t._,selectedFields:new Proxy(t._.selectedFields,this)};if(e===He)return{...t[He],selectedFields:new Proxy(t[He].selectedFields,this)};if(typeof e=="symbol")return t[e];const n=(lt(t,Or)?t._.selectedFields:lt(t,Sn)?t[He].selectedFields:t)[e];if(lt(n,Ft.Aliased)){if(this.config.sqlAliasedBehavior==="sql"&&!n.isSelectionField)return n.sql;const s=n.clone();return s.isSelectionField=!0,s}if(lt(n,Ft)){if(this.config.sqlBehavior==="sql")return n;throw new Error(`You tried to reference "${e}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return lt(n,Ke)?this.config.alias?new Proxy(n,new na(new Proxy(n.table,new cu(this.config.alias,this.config.replaceOriginalName??!1)))):n:typeof n!="object"||n===null?n:new Proxy(n,new Xl(this.config))}};G(Xl,Wy,"SelectionProxyHandler");let Je=Xl;var Hy,Xy;class Ah extends(Xy=Tn,Hy=xt,Xy){constructor(e,i,n,s){super();G(this,"config");G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=n,this.config={table:e,withList:s}}where(e){return this.config.where=e,this}returning(e=this.config.table[Tt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=os(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:qn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}G(Ah,Hy,"PgDelete");function aR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function lR(r){return(r.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,i,n)=>{const s=n===0?i.toLowerCase():`${i[0].toUpperCase()}${i.slice(1)}`;return e+s},"")}function uR(r){return r}var Yy;Yy=xt;class Rw{constructor(t){G(this,"cache",{});G(this,"cachedTables",{});G(this,"convert");this.convert=t==="snake_case"?aR:t==="camelCase"?lR:uR}getColumnCasing(t){if(!t.keyAsName)return t.name;const e=t.table[Tt.Symbol.Schema]??"public",i=t.table[Tt.Symbol.OriginalName],n=`${e}.${i}.${t.name}`;return this.cache[n]||this.cacheTable(t.table),this.cache[n]}cacheTable(t){const e=t[Tt.Symbol.Schema]??"public",i=t[Tt.Symbol.OriginalName],n=`${e}.${i}`;if(!this.cachedTables[n]){for(const s of Object.values(t[Tt.Symbol.Columns])){const o=`${n}.${s.name}`;this.cache[o]=this.convert(s.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}G(Rw,Yy,"CasingCache");var qy,Qy;class Wf extends(Qy=Sn,qy=xt,Qy){}G(Wf,qy,"PgViewBase");var Ky;Ky=xt;class Bo{constructor(t){G(this,"casing");this.casing=new Rw(t==null?void 0:t.casing)}async migrate(t,e,i){const n=typeof i=="string"?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",s=typeof i=="string"?"drizzle":i.migrationsSchema??"drizzle",o=X` CREATE TABLE IF NOT EXISTS ${X.identifier(s)}.${X.identifier(n)} ( id SERIAL PRIMARY KEY, hash text NOT NULL, created_at bigint ) - `;await e.execute(X`CREATE SCHEMA IF NOT EXISTS ${X.identifier(s)}`),await e.execute(o);const l=(await e.all(X`select id, hash, created_at from ${X.identifier(s)}.${X.identifier(n)} order by created_at desc limit 1`))[0];await e.transaction(async u=>{for await(const c of t)if(!l||Number(l.created_at){var a;return e[o]!==void 0||((a=i[o])==null?void 0:a.onUpdateFn)!==void 0}),s=n.length;return X.join(n.flatMap((o,a)=>{const l=i[o],u=e[o]??X.param(l.onUpdateFn(),l),c=X`${X.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(lt(s,Ft.Aliased)&&s.isSelectionField)a.push(X.identifier(s.fieldAlias));else if(lt(s,Ft.Aliased)||lt(s,Ft)){const l=lt(s,Ft.Aliased)?s.sql:s;e?a.push(new Ft(l.queryChunks.map(u=>lt(u,Ar)?X.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),lt(s,Ft.Aliased)&&a.push(X` as ${X.identifier(s.fieldAlias)}`)}else lt(s,Ke)&&(e?a.push(X.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:M})=>M===(it[Tt.Symbol.IsAlias]?qn(it):it[Tt.Symbol.BaseName])))(w.field.table)){const it=qn(w.field.table);throw new Error(`Your "${w.path.join("->")}" field references a column "${it}"."${w.field.name}", but the table "${it}" is not part of the query! Did you forget to join it?`)}const d=!a||a.length===0,m=this.buildWithCTE(t);let _;f&&(_=f===!0?X` distinct`:X` distinct on (${X.join(f.on,X`, `)})`);const S=this.buildSelection(g,{isSingleTable:d}),E=this.buildFromTable(o),b=this.buildJoins(a),F=n?X` where ${n}`:void 0,x=s?X` having ${s}`:void 0;let z;l&&l.length>0&&(z=X` order by ${X.join(l,X`, `)}`);let B;u&&u.length>0&&(B=X` group by ${X.join(u,X`, `)}`);const tt=typeof c=="object"||typeof c=="number"&&c>=0?X` limit ${c}`:void 0,st=h?X` offset ${h}`:void 0,I=X.empty();if(p){const w=X` for ${X.raw(p.strength)}`;p.config.of&&w.append(X` of ${X.join(Array.isArray(p.config.of)?p.config.of:[p.config.of],X`, `)}`),p.config.noWait?w.append(X` no wait`):p.config.skipLocked&&w.append(X` skip locked`),I.append(w)}const Z=X`${m}select${_} ${S} from ${E}${b}${F}${B}${x}${z}${tt}${st}${I}`;return y.length>0?this.buildSetOperations(Z,y):Z}buildSetOperations(t,e){const[i,...n]=e;if(!i)throw new Error("Cannot pass undefined values to any set operator");return n.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:i}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:i}),n)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:i,rightSelect:n,limit:s,orderBy:o,offset:a}}){const l=X`(${t.getSQL()}) `,u=X`(${n.getSQL()})`;let c;if(o&&o.length>0){const y=[];for(const g of o)if(lt(g,Ar))y.push(X.identifier(g.name));else if(lt(g,Ft)){for(let d=0;d=0?X` limit ${s}`:void 0,p=X.raw(`${e} ${i?"all ":""}`),f=a?X` offset ${a}`:void 0;return X`${l}${p}${u}${c}${h}${f}`}buildInsertQuery({table:t,values:e,onConflict:i,returning:n,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[Tt.Symbol.Columns],c=Object.entries(u).filter(([m,_])=>!_.shouldDisableInsert()),h=c.map(([,m])=>X.identifier(this.casing.getColumnCasing(m)));if(o){const m=e;lt(m,Ft)?l.push(m):l.push(m.getSQL())}else{const m=e;l.push(X.raw("values "));for(const[_,S]of m.entries()){const E=[];for(const[b,F]of c){const x=S[b];if(x===void 0||lt(x,Wi)&&x.value===void 0)if(F.defaultFn!==void 0){const z=F.defaultFn(),B=lt(z,Ft)?z:X.param(z,F);E.push(B)}else if(!F.default&&F.onUpdateFn!==void 0){const z=F.onUpdateFn(),B=lt(z,Ft)?z:X.param(z,F);E.push(B)}else E.push(X`default`);else E.push(x)}l.push(E),_({dbKey:S.name,tsKey:_,field:Li(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const m=Object.fromEntries(Object.entries(s.columns).map(([x,z])=>[x,Li(z,a)]));if(o.where){const x=typeof o.where=="function"?o.where(m,tR()):o.where;y=x&&$l(x,a)}const _=[];let S=[];if(o.columns){let x=!1;for(const[z,B]of Object.entries(o.columns))B!==void 0&&z in s.columns&&(!x&&B===!0&&(x=!0),S.push(z));S.length>0&&(S=x?S.filter(z=>{var B;return((B=o.columns)==null?void 0:B[z])===!0}):Object.keys(s.columns).filter(z=>!S.includes(z)))}else S=Object.keys(s.columns);for(const x of S){const z=s.columns[x];_.push({tsKey:x,value:z})}let E=[];o.with&&(E=Object.entries(o.with).filter(x=>!!x[1]).map(([x,z])=>({tsKey:x,queryConfig:z,relation:s.relations[x]})));let b;if(o.extras){b=typeof o.extras=="function"?o.extras(m,{sql:X}):o.extras;for(const[x,z]of Object.entries(b))_.push({tsKey:x,value:mw(z,a)})}for(const{tsKey:x,value:z}of _)c.push({dbKey:lt(z,Ft.Aliased)?z.fieldAlias:s.columns[x].name,tsKey:x,field:lt(z,Ke)?Li(z,a):z,relationTableTsKey:void 0,isJson:!1,selection:[]});let F=typeof o.orderBy=="function"?o.orderBy(m,eR()):o.orderBy??[];Array.isArray(F)||(F=[F]),f=F.map(x=>lt(x,Ke)?Li(x,a):$l(x,a)),h=o.limit,p=o.offset;for(const{tsKey:x,queryConfig:z,relation:B}of E){const tt=sR(e,i,B),st=ia(B.referencedTable),I=i[st],Z=`${a}_${x}`,w=Eh(...tt.fields.map((O,D)=>gw(Li(tt.references[D],Z),Li(O,a)))),it=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:i,table:t[I],tableConfig:e[I],queryConfig:lt(B,as)?z===!0?{limit:1}:{...z,limit:1}:z,tableAlias:Z,joinOn:w,nestedQueryRelation:B}),M=X`${X.identifier(Z)}.${X.identifier("data")}`.as(x);g.push({on:X`true`,table:new Or(it.sql,{},Z),alias:Z,joinType:"left",lateral:!0}),c.push({dbKey:x,tsKey:x,field:M,relationTableTsKey:I,isJson:!0,selection:it.selection})}}if(c.length===0)throw new $f({message:`No fields selected for table "${s.tsName}" ("${a}")`});let d;if(y=Eh(u,y),l){let m=X`json_build_array(${X.join(c.map(({field:E,tsKey:b,isJson:F})=>F?X`${X.identifier(`${a}_${b}`)}.${X.identifier("data")}`:lt(E,Ft.Aliased)?E.sql:E),X`, `)})`;lt(l,Vl)&&(m=X`coalesce(json_agg(${m}${f.length>0?X` order by ${X.join(f,X`, `)}`:void 0}), '[]'::json)`);const _=[{dbKey:"data",tsKey:"data",field:m.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||p!==void 0||f.length>0?(d=this.buildSelectQuery({table:ac(n,a),fields:{},fieldsFlat:[{path:[],field:X.raw("*")}],where:y,limit:h,offset:p,orderBy:f,setOperators:[]}),y=void 0,h=void 0,p=void 0,f=[]):d=ac(n,a),d=this.buildSelectQuery({table:lt(d,Br)?d:new Or(d,{},a),fields:{},fieldsFlat:_.map(({field:E})=>({path:[],field:lt(E,Ke)?Li(E,a):E})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]})}else d=this.buildSelectQuery({table:ac(n,a),fields:{},fieldsFlat:c.map(({field:m})=>({path:[],field:lt(m,Ke)?Li(m,a):m})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]});return{tableTsKey:s.tsName,sql:d,selection:c}}}G(Bo,Ky,"PgDialect");var Zy;Zy=xt;class Nw{getSelectedFields(){return this._.selectedFields}}G(Nw,Zy,"TypedQueryBuilder");var Jy;Jy=xt;class Sr{constructor(t){G(this,"fields");G(this,"session");G(this,"dialect");G(this,"withList",[]);G(this,"distinct");G(this,"authToken");this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(t){return this.authToken=t,this}from(t){const e=!!this.fields,i=t;let n;return this.fields?n=this.fields:lt(i,Or)?n=Object.fromEntries(Object.keys(i._.selectedFields).map(s=>[s,i[s]])):lt(i,Wf)?n=i[He].selectedFields:lt(i,Ft)?n={}:n=ZD(i),new Hf({table:i,fields:n,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}G(Sr,Jy,"PgSelectBuilder");var tg,eg;class Lw extends(eg=Nw,tg=xt,eg){constructor({table:e,fields:i,isPartialSelect:n,session:s,dialect:o,withList:a,distinct:l}){super();G(this,"_");G(this,"config");G(this,"joinsNotNullableMap");G(this,"tableName");G(this,"isPartialSelect");G(this,"session");G(this,"dialect");G(this,"leftJoin",this.createJoin("left"));G(this,"rightJoin",this.createJoin("right"));G(this,"innerJoin",this.createJoin("inner"));G(this,"fullJoin",this.createJoin("full"));G(this,"union",this.createSetOperator("union",!1));G(this,"unionAll",this.createSetOperator("union",!0));G(this,"intersect",this.createSetOperator("intersect",!1));G(this,"intersectAll",this.createSetOperator("intersect",!0));G(this,"except",this.createSetOperator("except",!1));G(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...i},distinct:l,setOperators:[]},this.isPartialSelect=n,this.session=s,this.dialect=o,this._={selectedFields:i},this.tableName=Wn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(i,n)=>{var a;const s=this.tableName,o=Wn(i);if(typeof o=="string"&&((a=this.config.joins)!=null&&a.some(l=>l.alias===o)))throw new Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof s=="string"&&(this.config.fields={[s]:this.config.fields}),typeof o=="string"&&!lt(i,Ft))){const l=lt(i,Or)?i._.selectedFields:lt(i,Sn)?i[He].selectedFields:i[Tt.Symbol.Columns];this.config.fields[o]=l}if(typeof n=="function"&&(n=n(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:n,table:i,joinType:e,alias:o}),typeof o=="string")switch(e){case"left":{this.joinsNotNullableMap[o]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!0;break}case"inner":{this.joinsNotNullableMap[o]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!1;break}}return this}}createSetOperator(e,i){return n=>{const s=typeof n=="function"?n(cR()):n;if(!Vf(this.getSelectedFields(),s.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:i,rightSelect:s}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const i=e[0](new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(i)?i:[i]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const i=e[0](new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),n=Array.isArray(i)?i:[i];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}else{const i=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,i={}){return this.config.lockingClause={strength:e,config:i},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}as(e){return new Proxy(new Or(this.getSQL(),this.config.fields,e),new Je({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new Je({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}G(Lw,tg,"PgSelectQueryBuilder");var rg,ig;class Hf extends(ig=Lw,rg=xt,ig){constructor(){super(...arguments);G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:i,config:n,dialect:s,joinsNotNullableMap:o,authToken:a}=this;if(!i)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return Pr.startActiveSpan("drizzle.prepareQuery",()=>{const l=os(n.fields),u=i.prepareQuery(s.sqlToQuery(this.getSQL()),l,e,!0);return u.joinsNotNullableMap=o,u.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}G(Hf,rg,"PgSelect");KD(Hf,[Tn]);function oo(r,t){return(e,i,...n)=>{const s=[i,...n].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!Vf(e.getSelectedFields(),o.rightSelect.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return e.addSetOperators(s)}}const cR=()=>({union:hR,unionAll:fR,intersect:dR,intersectAll:pR,except:mR,exceptAll:yR}),hR=oo("union",!1),fR=oo("union",!0),dR=oo("intersect",!1),pR=oo("intersect",!0),mR=oo("except",!1),yR=oo("except",!0);var ng;ng=xt;class Xf{constructor(t){G(this,"dialect");G(this,"dialectConfig");G(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(i)),new Proxy(new jf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=lt(t,Bo)?t:void 0,this.dialectConfig=lt(t,Bo)?void 0:t}with(...t){const e=this;function i(o){return new Sr({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function n(o){return new Sr({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new Sr({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:i,selectDistinct:n,selectDistinctOn:s}}select(t){return new Sr({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new Sr({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new Sr({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new Bo(this.dialectConfig)),this.dialect}}G(Xf,ng,"PgQueryBuilder");var sg;sg=xt;class Oh{constructor(t,e,i,n,s){G(this,"authToken");this.table=t,this.session=e,this.dialect=i,this.withList=n,this.overridingSystemValue_=s}setToken(t){return this.authToken=t,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(t){if(t=Array.isArray(t)?t:[t],t.length===0)throw new Error("values() must be called with at least one value");const e=t.map(i=>{const n={},s=this.table[Tt.Symbol.Columns];for(const o of Object.keys(i)){const a=i[o];n[o]=lt(a,Ft)?a:new Wi(a,s[o])}return n});return new Fh(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new Xf):t;if(!lt(e,Ft)&&!Vf(this.table[Ih],e._.selectedFields))throw new Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new Fh(this.table,e,this.session,this.dialect,this.withList,!0)}}G(Oh,sg,"PgInsertBuilder");var og,ag;class Fh extends(ag=Tn,og=xt,ag){constructor(e,i,n,s,o,a,l){super();G(this,"config");G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=s,this.config={table:e,values:i,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[Tt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=os(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=X`do nothing`;else{let i="";i=Array.isArray(e.target)?e.target.map(s=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(s))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));const n=e.where?X` where ${e.where}`:void 0;this.config.onConflict=X`(${X.raw(i)})${n} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');const i=e.where?X` where ${e.where}`:void 0,n=e.targetWhere?X` where ${e.targetWhere}`:void 0,s=e.setWhere?X` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,ww(this.config.table,e.set));let a="";return a=Array.isArray(e.target)?e.target.map(l=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(l))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=X`(${X.raw(a)})${n} do update set ${o}${i}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:qn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}G(Fh,og,"PgInsert");var lg,ug;class Bw extends(ug=Tn,lg=xt,ug){constructor(e,i,n){super();G(this,"config");G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=n,this.config={view:e}}concurrently(){if(this.config.withNoData!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}G(Bw,lg,"PgRefreshMaterializedView");var cg;cg=xt;class Ph{constructor(t,e,i,n){G(this,"authToken");this.table=t,this.session=e,this.dialect=i,this.withList=n}setToken(t){return this.authToken=t,this}set(t){return new kw(this.table,ww(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}G(Ph,cg,"PgUpdateBuilder");var hg,fg;class kw extends(fg=Tn,hg=xt,fg){constructor(e,i,n,s,o){super();G(this,"config");G(this,"tableName");G(this,"joinsNotNullableMap");G(this,"leftJoin",this.createJoin("left"));G(this,"rightJoin",this.createJoin("right"));G(this,"innerJoin",this.createJoin("inner"));G(this,"fullJoin",this.createJoin("full"));G(this,"authToken");G(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=n,this.dialect=s,this.config={set:i,table:e,withList:o,joins:[]},this.tableName=Wn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const i=e,n=Wn(i);return typeof n=="string"&&(this.joinsNotNullableMap[n]=!0),this.config.from=i,this}getTableLikeFields(e){return lt(e,Br)?e[Tt.Symbol.Columns]:lt(e,Or)?e._.selectedFields:e[He].selectedFields}createJoin(e){return(i,n)=>{const s=Wn(i);if(typeof s=="string"&&this.config.joins.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(typeof n=="function"){const o=this.config.from&&!lt(this.config.from,Ft)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[Tt.Symbol.Columns],new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:n,table:i,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[Tt.Symbol.Columns]),this.config.from)){const i=Wn(this.config.from);if(typeof i=="string"&&this.config.from&&!lt(this.config.from,Ft)){const n=this.getTableLikeFields(this.config.from);e[i]=n}for(const n of this.config.joins){const s=Wn(n.table);if(typeof s=="string"&&!lt(n.table,Ft)){const o=this.getTableLikeFields(n.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=os(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){const i=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0);return i.joinsNotNullableMap=this.joinsNotNullableMap,i}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:qn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}G(kw,hg,"PgUpdate");var dg,pg,mg;const Uo=class Uo extends(mg=Ft,pg=xt,dg=Symbol.toStringTag,mg){constructor(e){super(Uo.buildEmbeddedCount(e.source,e.filters).queryChunks);G(this,"sql");G(this,"token");G(this,dg,"PgCountBuilder");G(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=Uo.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,i){return X`(select count(*) from ${e}${X.raw(" where ").if(i)}${i})`}static buildCount(e,i){return X`select count(*) as count from ${e}${X.raw(" where ").if(i)}${i};`}setToken(e){return this.token=e,this}then(e,i){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,i)}catch(e){return this.then(void 0,e)}finally(e){return this.then(i=>(e==null||e(),i),i=>{throw e==null||e(),i})}};G(Uo,pg,"PgCountBuilder");let Mh=Uo;var yg;yg=xt;class Uw{constructor(t,e,i,n,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=i,this.table=n,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Dh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Dh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}G(Uw,yg,"PgRelationalQueryBuilder");var gg,vg;class Dh extends(vg=Tn,gg=xt,vg){constructor(e,i,n,s,o,a,l,u,c){super();G(this,"authToken");this.fullSchema=e,this.schema=i,this.tableNamesMap=n,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>{const{query:i,builtQuery:n}=this._toSQL();return this.session.prepareQuery(n,void 0,e,!0,(s,o)=>{const a=s.map(l=>Ch(this.schema,this.tableConfig,l,i.selection,o));return this.mode==="first"?a[0]:a})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){const e=this._getQuery(),i=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:i}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}G(Dh,gg,"PgRelationalQuery");var _g,bg;class zw extends(bg=Tn,_g=xt,bg){constructor(t,e,i,n){super(),this.execute=t,this.sql=e,this.query=i,this.mapBatchResult=n}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}G(zw,_g,"PgRaw");var wg;wg=xt;class Yf{constructor(t,e,i){G(this,"query");G(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(new Xf(i.dialect))),new Proxy(new jf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});G(this,"authToken");if(this.dialect=t,this.session=e,this._=i?{schema:i.schema,fullSchema:i.fullSchema,tableNamesMap:i.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[n,s]of Object.entries(this._.schema))this.query[n]=new Uw(i.fullSchema,this._.schema,this._.tableNamesMap,i.fullSchema[n],s,t,e)}$count(t,e){return new Mh({source:t,filters:e,session:this.session})}with(...t){const e=this;function i(u){return new Sr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function n(u){return new Sr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new Sr({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new Ph(u,e.session,e.dialect,t)}function a(u){return new Oh(u,e.session,e.dialect,t)}function l(u){return new Ah(u,e.session,e.dialect,t)}return{select:i,selectDistinct:n,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new Sr({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new Sr({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new Sr({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new Ph(t,this.session,this.dialect)}insert(t){return new Oh(t,this.session,this.dialect)}delete(t){return new Ah(t,this.session,this.dialect)}refreshMaterializedView(t){return new Bw(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?X.raw(t):t.getSQL(),i=this.dialect.sqlToQuery(e),n=this.session.prepareQuery(i,void 0,void 0,!1);return new zw(()=>n.execute(void 0,this.authToken),e,i,s=>n.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}G(Yf,wg,"PgDatabase");var xg;xg=xt;class jw{constructor(t){G(this,"authToken");G(this,"joinsNotNullableMap");this.query=t}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}}G(jw,xg,"PgPreparedQuery");var Sg;Sg=xt;class $w{constructor(t){this.dialect=t}execute(t,e){return Pr.startActiveSpan("drizzle.operation",()=>Pr.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1)).setToken(e).execute(void 0,e))}all(t){return this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1).all()}async count(t,e){const i=await this.execute(t,e);return Number(i[0].count)}}G($w,Sg,"PgSession");var Tg,Ig;class Vw extends(Ig=Yf,Tg=xt,Ig){constructor(t,e,i,n=0){super(t,e,i),this.schema=i,this.nestedIndex=n}rollback(){throw new yw}getTransactionConfigSQL(t){const e=[];return t.isolationLevel&&e.push(`isolation level ${t.isolationLevel}`),t.accessMode&&e.push(t.accessMode),typeof t.deferrable=="boolean"&&e.push(t.deferrable?"deferrable":"not deferrable"),X.raw(e.join(" "))}setTransaction(t){return this.session.execute(X`set transaction ${this.getTransactionConfigSQL(t)}`)}}G(Vw,Tg,"PgTransaction");function Om(r){return typeof r=="string"&&/^true$/i.test(r)}function gR(r){const t={scheme:"duckdb-wasm:"},e=new URL(r);if(!e.protocol.startsWith("duckdb-wasm:"))throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${e.protocol}"`);e.searchParams.get("bundles")==="import-url"&&(t.bundles="import-url");const i=e.searchParams.get("logger");i&&Om(i)&&(t.logger=!0);const n=e.searchParams.get("storage");switch(n){case ra.ORIGIN_PRIVATE_FS:{e.host.length>0&&console.warn(`Host "${e.host}" will be ignored while using Origin Private FS`);const s=e.searchParams.get("write");t.storage={type:ra.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&Om(s)&&{accessMode:T0.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${n}"`);break}return t}var Eg,Cg;class Gw extends(Cg=jw,Eg=xt,Cg){constructor(t,e,i,n,s,o){super({sql:e,params:i}),this.client=t,this.queryString=e,this.params=i,this.logger=n,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=Em(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:i,queryString:n,client:s,customResultMapper:o}=this,a=await s;return a.query(n,e)}async all(t={}){const e=Em(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}G(Gw,Eg,"DuckDBWasmPreparedQuery");var Ag,Og;const Yl=class Yl extends(Og=$w,Ag=xt,Og){constructor(e,i,n,s={}){super(i);G(this,"logger");this.client=e,this.schema=n,this.options=s,this.logger=s.logger??new bw}prepareQuery(e,i,n,s,o){return new Gw(this.client,e.sql,e.params,this.logger,i,o)}async query(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}async queryObjects(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}transaction(e,i){return xD(this.client,async n=>{const s=new Yl(n,this.dialect,this.schema,this.options),o=new Rh(this.dialect,s,this.schema);return i&&await o.setTransaction(i),e(o)})}};G(Yl,Ag,"DuckDBWasmSession");let Gl=Yl;var Fg,Pg;const ql=class ql extends(Pg=Vw,Fg=xt,Pg){constructor(e,i,n,s=0){super(e,i,n,s);G(this,"dialect");G(this,"session");this.dialect=e,this.session=i}async transaction(e){return SD(this.session.client,"",async i=>{const n=new Gl(i,this.dialect,this.schema,this.session.options),s=new ql(this.dialect,n,this.schema);return e(s)})}};G(ql,Fg,"DuckDBWasmTransaction");let Rh=ql;var Mg,Dg;class Ww extends(Dg=Yf,Mg=xt,Dg){}G(Ww,Mg,"DuckDBWasmDatabase");function ko(r,t={}){const e=new Bo({casing:t.casing});let i;t.logger===!0?i=new _w:t.logger!==!1&&(i=t.logger);let n;if(t.schema){const a=rR(t.schema,oR);n={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Gl(r,e,n,{logger:i}),o=new Ww(e,s,n);return o.$client=r,o}function Fm(r,t){const e=gR(r);let i;return e.bundles==="import-url"?i=(async()=>{const s=await Sh();switch(s){case"browser":return(await ln(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await ln(async()=>{const{getImportUrlBundles:o}=await import("./import-url-node-BfNoxhRr.js");return{getImportUrlBundles:o}},__vite__mapDeps([5,4]))).getImportUrlBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})():i=(async()=>{const s=await Sh();switch(s){case"browser":return(await ln(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await ln(async()=>{const{getBundles:o}=await import("./default-node-CUehHPTd.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),ko(hw({bundles:i,logger:e.logger?new I0:void 0,storage:e.storage}),t)}function Pm(...r){if(typeof r[0]=="string")return Fm(r[0],r[1]);if(JD(r[0])){const{connection:t,client:e,...i}=r[0];if(e)return ko(e,i);if(typeof t=="string")return Fm(t,i);if(typeof t>"u")throw new Error("connection option is required");return ko(hw({bundles:t.bundles,logger:t.logger,storage:t.storage}),i)}return ko(r[0],r[1])}(r=>{function t(e){return ko({options:{parsers:{},serializers:{}}},e)}r.mock=t})(Pm||(Pm={}));export{L1 as A,TR as D,xR as I,pC as J,eI as L,_c as M,wR as T,fi as a,Re as b,Pm as d,sa as e,SR as l}; + `;await e.execute(X`CREATE SCHEMA IF NOT EXISTS ${X.identifier(s)}`),await e.execute(o);const l=(await e.all(X`select id, hash, created_at from ${X.identifier(s)}.${X.identifier(n)} order by created_at desc limit 1`))[0];await e.transaction(async u=>{for await(const c of t)if(!l||Number(l.created_at){var a;return e[o]!==void 0||((a=i[o])==null?void 0:a.onUpdateFn)!==void 0}),s=n.length;return X.join(n.flatMap((o,a)=>{const l=i[o],u=e[o]??X.param(l.onUpdateFn(),l),c=X`${X.identifier(this.casing.getColumnCasing(l))} = ${u}`;return a{const a=[];if(lt(s,Ft.Aliased)&&s.isSelectionField)a.push(X.identifier(s.fieldAlias));else if(lt(s,Ft.Aliased)||lt(s,Ft)){const l=lt(s,Ft.Aliased)?s.sql:s;e?a.push(new Ft(l.queryChunks.map(u=>lt(u,Ar)?X.identifier(this.casing.getColumnCasing(u)):u))):a.push(l),lt(s,Ft.Aliased)&&a.push(X` as ${X.identifier(s.fieldAlias)}`)}else lt(s,Ke)&&(e?a.push(X.identifier(this.casing.getColumnCasing(s))):a.push(s));return oa==null?void 0:a.some(({alias:M})=>M===(it[Tt.Symbol.IsAlias]?qn(it):it[Tt.Symbol.BaseName])))(w.field.table)){const it=qn(w.field.table);throw new Error(`Your "${w.path.join("->")}" field references a column "${it}"."${w.field.name}", but the table "${it}" is not part of the query! Did you forget to join it?`)}const d=!a||a.length===0,m=this.buildWithCTE(t);let _;f&&(_=f===!0?X` distinct`:X` distinct on (${X.join(f.on,X`, `)})`);const S=this.buildSelection(g,{isSingleTable:d}),E=this.buildFromTable(o),b=this.buildJoins(a),F=n?X` where ${n}`:void 0,x=s?X` having ${s}`:void 0;let z;l&&l.length>0&&(z=X` order by ${X.join(l,X`, `)}`);let B;u&&u.length>0&&(B=X` group by ${X.join(u,X`, `)}`);const tt=typeof c=="object"||typeof c=="number"&&c>=0?X` limit ${c}`:void 0,st=h?X` offset ${h}`:void 0,I=X.empty();if(p){const w=X` for ${X.raw(p.strength)}`;p.config.of&&w.append(X` of ${X.join(Array.isArray(p.config.of)?p.config.of:[p.config.of],X`, `)}`),p.config.noWait?w.append(X` no wait`):p.config.skipLocked&&w.append(X` skip locked`),I.append(w)}const Z=X`${m}select${_} ${S} from ${E}${b}${F}${B}${x}${z}${tt}${st}${I}`;return y.length>0?this.buildSetOperations(Z,y):Z}buildSetOperations(t,e){const[i,...n]=e;if(!i)throw new Error("Cannot pass undefined values to any set operator");return n.length===0?this.buildSetOperationQuery({leftSelect:t,setOperator:i}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:t,setOperator:i}),n)}buildSetOperationQuery({leftSelect:t,setOperator:{type:e,isAll:i,rightSelect:n,limit:s,orderBy:o,offset:a}}){const l=X`(${t.getSQL()}) `,u=X`(${n.getSQL()})`;let c;if(o&&o.length>0){const y=[];for(const g of o)if(lt(g,Ar))y.push(X.identifier(g.name));else if(lt(g,Ft)){for(let d=0;d=0?X` limit ${s}`:void 0,p=X.raw(`${e} ${i?"all ":""}`),f=a?X` offset ${a}`:void 0;return X`${l}${p}${u}${c}${h}${f}`}buildInsertQuery({table:t,values:e,onConflict:i,returning:n,withList:s,select:o,overridingSystemValue_:a}){const l=[],u=t[Tt.Symbol.Columns],c=Object.entries(u).filter(([m,_])=>!_.shouldDisableInsert()),h=c.map(([,m])=>X.identifier(this.casing.getColumnCasing(m)));if(o){const m=e;lt(m,Ft)?l.push(m):l.push(m.getSQL())}else{const m=e;l.push(X.raw("values "));for(const[_,S]of m.entries()){const E=[];for(const[b,F]of c){const x=S[b];if(x===void 0||lt(x,Wi)&&x.value===void 0)if(F.defaultFn!==void 0){const z=F.defaultFn(),B=lt(z,Ft)?z:X.param(z,F);E.push(B)}else if(!F.default&&F.onUpdateFn!==void 0){const z=F.onUpdateFn(),B=lt(z,Ft)?z:X.param(z,F);E.push(B)}else E.push(X`default`);else E.push(x)}l.push(E),_({dbKey:S.name,tsKey:_,field:Li(S,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{const m=Object.fromEntries(Object.entries(s.columns).map(([x,z])=>[x,Li(z,a)]));if(o.where){const x=typeof o.where=="function"?o.where(m,tR()):o.where;y=x&&$l(x,a)}const _=[];let S=[];if(o.columns){let x=!1;for(const[z,B]of Object.entries(o.columns))B!==void 0&&z in s.columns&&(!x&&B===!0&&(x=!0),S.push(z));S.length>0&&(S=x?S.filter(z=>{var B;return((B=o.columns)==null?void 0:B[z])===!0}):Object.keys(s.columns).filter(z=>!S.includes(z)))}else S=Object.keys(s.columns);for(const x of S){const z=s.columns[x];_.push({tsKey:x,value:z})}let E=[];o.with&&(E=Object.entries(o.with).filter(x=>!!x[1]).map(([x,z])=>({tsKey:x,queryConfig:z,relation:s.relations[x]})));let b;if(o.extras){b=typeof o.extras=="function"?o.extras(m,{sql:X}):o.extras;for(const[x,z]of Object.entries(b))_.push({tsKey:x,value:mw(z,a)})}for(const{tsKey:x,value:z}of _)c.push({dbKey:lt(z,Ft.Aliased)?z.fieldAlias:s.columns[x].name,tsKey:x,field:lt(z,Ke)?Li(z,a):z,relationTableTsKey:void 0,isJson:!1,selection:[]});let F=typeof o.orderBy=="function"?o.orderBy(m,eR()):o.orderBy??[];Array.isArray(F)||(F=[F]),f=F.map(x=>lt(x,Ke)?Li(x,a):$l(x,a)),h=o.limit,p=o.offset;for(const{tsKey:x,queryConfig:z,relation:B}of E){const tt=sR(e,i,B),st=ia(B.referencedTable),I=i[st],Z=`${a}_${x}`,w=Eh(...tt.fields.map((O,D)=>gw(Li(tt.references[D],Z),Li(O,a)))),it=this.buildRelationalQueryWithoutPK({fullSchema:t,schema:e,tableNamesMap:i,table:t[I],tableConfig:e[I],queryConfig:lt(B,as)?z===!0?{limit:1}:{...z,limit:1}:z,tableAlias:Z,joinOn:w,nestedQueryRelation:B}),M=X`${X.identifier(Z)}.${X.identifier("data")}`.as(x);g.push({on:X`true`,table:new Or(it.sql,{},Z),alias:Z,joinType:"left",lateral:!0}),c.push({dbKey:x,tsKey:x,field:M,relationTableTsKey:I,isJson:!0,selection:it.selection})}}if(c.length===0)throw new $f({message:`No fields selected for table "${s.tsName}" ("${a}")`});let d;if(y=Eh(u,y),l){let m=X`json_build_array(${X.join(c.map(({field:E,tsKey:b,isJson:F})=>F?X`${X.identifier(`${a}_${b}`)}.${X.identifier("data")}`:lt(E,Ft.Aliased)?E.sql:E),X`, `)})`;lt(l,Vl)&&(m=X`coalesce(json_agg(${m}${f.length>0?X` order by ${X.join(f,X`, `)}`:void 0}), '[]'::json)`);const _=[{dbKey:"data",tsKey:"data",field:m.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:c}];h!==void 0||p!==void 0||f.length>0?(d=this.buildSelectQuery({table:ac(n,a),fields:{},fieldsFlat:[{path:[],field:X.raw("*")}],where:y,limit:h,offset:p,orderBy:f,setOperators:[]}),y=void 0,h=void 0,p=void 0,f=[]):d=ac(n,a),d=this.buildSelectQuery({table:lt(d,Br)?d:new Or(d,{},a),fields:{},fieldsFlat:_.map(({field:E})=>({path:[],field:lt(E,Ke)?Li(E,a):E})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]})}else d=this.buildSelectQuery({table:ac(n,a),fields:{},fieldsFlat:c.map(({field:m})=>({path:[],field:lt(m,Ke)?Li(m,a):m})),joins:g,where:y,limit:h,offset:p,orderBy:f,setOperators:[]});return{tableTsKey:s.tsName,sql:d,selection:c}}}G(Bo,Ky,"PgDialect");var Zy;Zy=xt;class Nw{getSelectedFields(){return this._.selectedFields}}G(Nw,Zy,"TypedQueryBuilder");var Jy;Jy=xt;class Sr{constructor(t){G(this,"fields");G(this,"session");G(this,"dialect");G(this,"withList",[]);G(this,"distinct");G(this,"authToken");this.fields=t.fields,this.session=t.session,this.dialect=t.dialect,t.withList&&(this.withList=t.withList),this.distinct=t.distinct}setToken(t){return this.authToken=t,this}from(t){const e=!!this.fields,i=t;let n;return this.fields?n=this.fields:lt(i,Or)?n=Object.fromEntries(Object.keys(i._.selectedFields).map(s=>[s,i[s]])):lt(i,Wf)?n=i[He].selectedFields:lt(i,Ft)?n={}:n=ZD(i),new Hf({table:i,fields:n,isPartialSelect:e,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}G(Sr,Jy,"PgSelectBuilder");var tg,eg;class Lw extends(eg=Nw,tg=xt,eg){constructor({table:e,fields:i,isPartialSelect:n,session:s,dialect:o,withList:a,distinct:l}){super();G(this,"_");G(this,"config");G(this,"joinsNotNullableMap");G(this,"tableName");G(this,"isPartialSelect");G(this,"session");G(this,"dialect");G(this,"leftJoin",this.createJoin("left"));G(this,"rightJoin",this.createJoin("right"));G(this,"innerJoin",this.createJoin("inner"));G(this,"fullJoin",this.createJoin("full"));G(this,"union",this.createSetOperator("union",!1));G(this,"unionAll",this.createSetOperator("union",!0));G(this,"intersect",this.createSetOperator("intersect",!1));G(this,"intersectAll",this.createSetOperator("intersect",!0));G(this,"except",this.createSetOperator("except",!1));G(this,"exceptAll",this.createSetOperator("except",!0));this.config={withList:a,table:e,fields:{...i},distinct:l,setOperators:[]},this.isPartialSelect=n,this.session=s,this.dialect=o,this._={selectedFields:i},this.tableName=Wn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}createJoin(e){return(i,n)=>{var a;const s=this.tableName,o=Wn(i);if(typeof o=="string"&&((a=this.config.joins)!=null&&a.some(l=>l.alias===o)))throw new Error(`Alias "${o}" is already used in this query`);if(!this.isPartialSelect&&(Object.keys(this.joinsNotNullableMap).length===1&&typeof s=="string"&&(this.config.fields={[s]:this.config.fields}),typeof o=="string"&&!lt(i,Ft))){const l=lt(i,Or)?i._.selectedFields:lt(i,Sn)?i[He].selectedFields:i[Tt.Symbol.Columns];this.config.fields[o]=l}if(typeof n=="function"&&(n=n(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:n,table:i,joinType:e,alias:o}),typeof o=="string")switch(e){case"left":{this.joinsNotNullableMap[o]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!0;break}case"inner":{this.joinsNotNullableMap[o]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([l])=>[l,!1])),this.joinsNotNullableMap[o]=!1;break}}return this}}createSetOperator(e,i){return n=>{const s=typeof n=="function"?n(cR()):n;if(!Vf(this.getSelectedFields(),s.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:i,rightSelect:s}),this}}addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return typeof e=="function"&&(e=e(new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if(typeof e[0]=="function"){const i=e[0](new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(i)?i:[i]}else this.config.groupBy=e;return this}orderBy(...e){if(typeof e[0]=="function"){const i=e[0](new Proxy(this.config.fields,new Je({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),n=Array.isArray(i)?i:[i];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=n:this.config.orderBy=n}else{const i=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,i={}){return this.config.lockingClause={strength:e,config:i},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}as(e){return new Proxy(new Or(this.getSQL(),this.config.fields,e),new Je({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new Je({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}G(Lw,tg,"PgSelectQueryBuilder");var rg,ig;class Hf extends(ig=Lw,rg=xt,ig){constructor(){super(...arguments);G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)))}_prepare(e){const{session:i,config:n,dialect:s,joinsNotNullableMap:o,authToken:a}=this;if(!i)throw new Error("Cannot execute a query on a query builder. Please use a database instance instead.");return Pr.startActiveSpan("drizzle.prepareQuery",()=>{const l=os(n.fields),u=i.prepareQuery(s.sqlToQuery(this.getSQL()),l,e,!0);return u.joinsNotNullableMap=o,u.setToken(a)})}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}G(Hf,rg,"PgSelect");KD(Hf,[Tn]);function oo(r,t){return(e,i,...n)=>{const s=[i,...n].map(o=>({type:r,isAll:t,rightSelect:o}));for(const o of s)if(!Vf(e.getSelectedFields(),o.rightSelect.getSelectedFields()))throw new Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return e.addSetOperators(s)}}const cR=()=>({union:hR,unionAll:fR,intersect:dR,intersectAll:pR,except:mR,exceptAll:yR}),hR=oo("union",!1),fR=oo("union",!0),dR=oo("intersect",!1),pR=oo("intersect",!0),mR=oo("except",!1),yR=oo("except",!0);var ng;ng=xt;class Xf{constructor(t){G(this,"dialect");G(this,"dialectConfig");G(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(i)),new Proxy(new jf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});this.dialect=lt(t,Bo)?t:void 0,this.dialectConfig=lt(t,Bo)?void 0:t}with(...t){const e=this;function i(o){return new Sr({fields:o??void 0,session:void 0,dialect:e.getDialect(),withList:t})}function n(o){return new Sr({fields:o??void 0,session:void 0,dialect:e.getDialect(),distinct:!0})}function s(o,a){return new Sr({fields:a??void 0,session:void 0,dialect:e.getDialect(),distinct:{on:o}})}return{select:i,selectDistinct:n,selectDistinctOn:s}}select(t){return new Sr({fields:t??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(t){return new Sr({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(t,e){return new Sr({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:t}})}getDialect(){return this.dialect||(this.dialect=new Bo(this.dialectConfig)),this.dialect}}G(Xf,ng,"PgQueryBuilder");var sg;sg=xt;class Oh{constructor(t,e,i,n,s){G(this,"authToken");this.table=t,this.session=e,this.dialect=i,this.withList=n,this.overridingSystemValue_=s}setToken(t){return this.authToken=t,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(t){if(t=Array.isArray(t)?t:[t],t.length===0)throw new Error("values() must be called with at least one value");const e=t.map(i=>{const n={},s=this.table[Tt.Symbol.Columns];for(const o of Object.keys(i)){const a=i[o];n[o]=lt(a,Ft)?a:new Wi(a,s[o])}return n});return new Fh(this.table,e,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(t){const e=typeof t=="function"?t(new Xf):t;if(!lt(e,Ft)&&!Vf(this.table[Ih],e._.selectedFields))throw new Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new Fh(this.table,e,this.session,this.dialect,this.withList,!0)}}G(Oh,sg,"PgInsertBuilder");var og,ag;class Fh extends(ag=Tn,og=xt,ag){constructor(e,i,n,s,o,a,l){super();G(this,"config");G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=n,this.dialect=s,this.config={table:e,values:i,withList:o,select:a,overridingSystemValue_:l}}returning(e=this.config.table[Tt.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=os(e),this}onConflictDoNothing(e={}){if(e.target===void 0)this.config.onConflict=X`do nothing`;else{let i="";i=Array.isArray(e.target)?e.target.map(s=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(s))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));const n=e.where?X` where ${e.where}`:void 0;this.config.onConflict=X`(${X.raw(i)})${n} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw new Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');const i=e.where?X` where ${e.where}`:void 0,n=e.targetWhere?X` where ${e.targetWhere}`:void 0,s=e.setWhere?X` where ${e.setWhere}`:void 0,o=this.dialect.buildUpdateSet(this.config.table,ww(this.config.table,e.set));let a="";return a=Array.isArray(e.target)?e.target.map(l=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(l))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=X`(${X.raw(a)})${n} do update set ${o}${i}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:qn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}G(Fh,og,"PgInsert");var lg,ug;class Bw extends(ug=Tn,lg=xt,ug){constructor(e,i,n){super();G(this,"config");G(this,"authToken");G(this,"execute",e=>Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken)));this.session=i,this.dialect=n,this.config={view:e}}concurrently(){if(this.config.withNoData!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(this.config.concurrently!==void 0)throw new Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}}G(Bw,lg,"PgRefreshMaterializedView");var cg;cg=xt;class Ph{constructor(t,e,i,n){G(this,"authToken");this.table=t,this.session=e,this.dialect=i,this.withList=n}setToken(t){return this.authToken=t,this}set(t){return new kw(this.table,ww(this.table,t),this.session,this.dialect,this.withList).setToken(this.authToken)}}G(Ph,cg,"PgUpdateBuilder");var hg,fg;class kw extends(fg=Tn,hg=xt,fg){constructor(e,i,n,s,o){super();G(this,"config");G(this,"tableName");G(this,"joinsNotNullableMap");G(this,"leftJoin",this.createJoin("left"));G(this,"rightJoin",this.createJoin("right"));G(this,"innerJoin",this.createJoin("inner"));G(this,"fullJoin",this.createJoin("full"));G(this,"authToken");G(this,"execute",e=>this._prepare().execute(e,this.authToken));this.session=n,this.dialect=s,this.config={set:i,table:e,withList:o,joins:[]},this.tableName=Wn(e),this.joinsNotNullableMap=typeof this.tableName=="string"?{[this.tableName]:!0}:{}}from(e){const i=e,n=Wn(i);return typeof n=="string"&&(this.joinsNotNullableMap[n]=!0),this.config.from=i,this}getTableLikeFields(e){return lt(e,Br)?e[Tt.Symbol.Columns]:lt(e,Or)?e._.selectedFields:e[He].selectedFields}createJoin(e){return(i,n)=>{const s=Wn(i);if(typeof s=="string"&&this.config.joins.some(o=>o.alias===s))throw new Error(`Alias "${s}" is already used in this query`);if(typeof n=="function"){const o=this.config.from&&!lt(this.config.from,Ft)?this.getTableLikeFields(this.config.from):void 0;n=n(new Proxy(this.config.table[Tt.Symbol.Columns],new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),o&&new Proxy(o,new Je({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:n,table:i,joinType:e,alias:s}),typeof s=="string")switch(e){case"left":{this.joinsNotNullableMap[s]=!1;break}case"right":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!0;break}case"inner":{this.joinsNotNullableMap[s]=!0;break}case"full":{this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([o])=>[o,!1])),this.joinsNotNullableMap[s]=!1;break}}return this}}where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[Tt.Symbol.Columns]),this.config.from)){const i=Wn(this.config.from);if(typeof i=="string"&&this.config.from&&!lt(this.config.from,Ft)){const n=this.getTableLikeFields(this.config.from);e[i]=n}for(const n of this.config.joins){const s=Wn(n.table);if(typeof s=="string"&&!lt(n.table,Ft)){const o=this.getTableLikeFields(n.table);e[s]=o}}}return this.config.returningFields=e,this.config.returning=os(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){const{typings:e,...i}=this.dialect.sqlToQuery(this.getSQL());return i}_prepare(e){const i=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0);return i.joinsNotNullableMap=this.joinsNotNullableMap,i}prepare(e){return this._prepare(e)}setToken(e){return this.authToken=e,this}getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new Je({alias:qn(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}G(kw,hg,"PgUpdate");var dg,pg,mg;const Uo=class Uo extends(mg=Ft,pg=xt,dg=Symbol.toStringTag,mg){constructor(e){super(Uo.buildEmbeddedCount(e.source,e.filters).queryChunks);G(this,"sql");G(this,"token");G(this,dg,"PgCountBuilder");G(this,"session");this.params=e,this.mapWith(Number),this.session=e.session,this.sql=Uo.buildCount(e.source,e.filters)}static buildEmbeddedCount(e,i){return X`(select count(*) from ${e}${X.raw(" where ").if(i)}${i})`}static buildCount(e,i){return X`select count(*) as count from ${e}${X.raw(" where ").if(i)}${i};`}setToken(e){return this.token=e,this}then(e,i){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,i)}catch(e){return this.then(void 0,e)}finally(e){return this.then(i=>(e==null||e(),i),i=>{throw e==null||e(),i})}};G(Uo,pg,"PgCountBuilder");let Mh=Uo;var yg;yg=xt;class Uw{constructor(t,e,i,n,s,o,a){this.fullSchema=t,this.schema=e,this.tableNamesMap=i,this.table=n,this.tableConfig=s,this.dialect=o,this.session=a}findMany(t){return new Dh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t||{},"many")}findFirst(t){return new Dh(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,t?{...t,limit:1}:{limit:1},"first")}}G(Uw,yg,"PgRelationalQueryBuilder");var gg,vg;class Dh extends(vg=Tn,gg=xt,vg){constructor(e,i,n,s,o,a,l,u,c){super();G(this,"authToken");this.fullSchema=e,this.schema=i,this.tableNamesMap=n,this.table=s,this.tableConfig=o,this.dialect=a,this.session=l,this.config=u,this.mode=c}_prepare(e){return Pr.startActiveSpan("drizzle.prepareQuery",()=>{const{query:i,builtQuery:n}=this._toSQL();return this.session.prepareQuery(n,void 0,e,!0,(s,o)=>{const a=s.map(l=>Ch(this.schema,this.tableConfig,l,i.selection,o));return this.mode==="first"?a[0]:a})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){const e=this._getQuery(),i=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:i}}toSQL(){return this._toSQL().builtQuery}setToken(e){return this.authToken=e,this}execute(){return Pr.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}G(Dh,gg,"PgRelationalQuery");var _g,bg;class zw extends(bg=Tn,_g=xt,bg){constructor(t,e,i,n){super(),this.execute=t,this.sql=e,this.query=i,this.mapBatchResult=n}getSQL(){return this.sql}getQuery(){return this.query}mapResult(t,e){return e?this.mapBatchResult(t):t}_prepare(){return this}isResponseInArrayMode(){return!1}}G(zw,_g,"PgRaw");var wg;wg=xt;class Yf{constructor(t,e,i){G(this,"query");G(this,"$with",(t,e)=>{const i=this;return{as:s=>(typeof s=="function"&&(s=s(new Xf(i.dialect))),new Proxy(new jf(s.getSQL(),e??("getSelectedFields"in s?s.getSelectedFields()??{}:{}),t,!0),new Je({alias:t,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}});G(this,"authToken");if(this.dialect=t,this.session=e,this._=i?{schema:i.schema,fullSchema:i.fullSchema,tableNamesMap:i.tableNamesMap,session:e}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:e},this.query={},this._.schema)for(const[n,s]of Object.entries(this._.schema))this.query[n]=new Uw(i.fullSchema,this._.schema,this._.tableNamesMap,i.fullSchema[n],s,t,e)}$count(t,e){return new Mh({source:t,filters:e,session:this.session})}with(...t){const e=this;function i(u){return new Sr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t})}function n(u){return new Sr({fields:u??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:!0})}function s(u,c){return new Sr({fields:c??void 0,session:e.session,dialect:e.dialect,withList:t,distinct:{on:u}})}function o(u){return new Ph(u,e.session,e.dialect,t)}function a(u){return new Oh(u,e.session,e.dialect,t)}function l(u){return new Ah(u,e.session,e.dialect,t)}return{select:i,selectDistinct:n,selectDistinctOn:s,update:o,insert:a,delete:l}}select(t){return new Sr({fields:t??void 0,session:this.session,dialect:this.dialect})}selectDistinct(t){return new Sr({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(t,e){return new Sr({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:{on:t}})}update(t){return new Ph(t,this.session,this.dialect)}insert(t){return new Oh(t,this.session,this.dialect)}delete(t){return new Ah(t,this.session,this.dialect)}refreshMaterializedView(t){return new Bw(t,this.session,this.dialect)}execute(t){const e=typeof t=="string"?X.raw(t):t.getSQL(),i=this.dialect.sqlToQuery(e),n=this.session.prepareQuery(i,void 0,void 0,!1);return new zw(()=>n.execute(void 0,this.authToken),e,i,s=>n.mapResult(s,!0))}transaction(t,e){return this.session.transaction(t,e)}}G(Yf,wg,"PgDatabase");var xg;xg=xt;class jw{constructor(t){G(this,"authToken");G(this,"joinsNotNullableMap");this.query=t}getQuery(){return this.query}mapResult(t,e){return t}setToken(t){return this.authToken=t,this}}G(jw,xg,"PgPreparedQuery");var Sg;Sg=xt;class $w{constructor(t){this.dialect=t}execute(t,e){return Pr.startActiveSpan("drizzle.operation",()=>Pr.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1)).setToken(e).execute(void 0,e))}all(t){return this.prepareQuery(this.dialect.sqlToQuery(t),void 0,void 0,!1).all()}async count(t,e){const i=await this.execute(t,e);return Number(i[0].count)}}G($w,Sg,"PgSession");var Tg,Ig;class Vw extends(Ig=Yf,Tg=xt,Ig){constructor(t,e,i,n=0){super(t,e,i),this.schema=i,this.nestedIndex=n}rollback(){throw new yw}getTransactionConfigSQL(t){const e=[];return t.isolationLevel&&e.push(`isolation level ${t.isolationLevel}`),t.accessMode&&e.push(t.accessMode),typeof t.deferrable=="boolean"&&e.push(t.deferrable?"deferrable":"not deferrable"),X.raw(e.join(" "))}setTransaction(t){return this.session.execute(X`set transaction ${this.getTransactionConfigSQL(t)}`)}}G(Vw,Tg,"PgTransaction");function Om(r){return typeof r=="string"&&/^true$/i.test(r)}function gR(r){const t={scheme:"duckdb-wasm:"},e=new URL(r);if(!e.protocol.startsWith("duckdb-wasm:"))throw new Error(`Expected scheme to be "duckdb-wasm:" but got "${e.protocol}"`);e.searchParams.get("bundles")==="import-url"&&(t.bundles="import-url");const i=e.searchParams.get("logger");i&&Om(i)&&(t.logger=!0);const n=e.searchParams.get("storage");switch(n){case ra.ORIGIN_PRIVATE_FS:{e.host.length>0&&console.warn(`Host "${e.host}" will be ignored while using Origin Private FS`);const s=e.searchParams.get("write");t.storage={type:ra.ORIGIN_PRIVATE_FS,path:e.pathname.startsWith("/")?e.pathname.slice(1):e.pathname,...s&&Om(s)&&{accessMode:T0.READ_WRITE}};break}case null:break;default:console.warn(`Unknown storage type "${n}"`);break}return t}var Eg,Cg;class Gw extends(Cg=jw,Eg=xt,Cg){constructor(t,e,i,n,s,o){super({sql:e,params:i}),this.client=t,this.queryString=e,this.params=i,this.logger=n,this.fields=s,this.customResultMapper=o}async execute(t={}){const e=Em(this.params,t);this.logger.logQuery(this.queryString,e);const{fields:i,queryString:n,client:s,customResultMapper:o}=this,a=await s;return a.query(n,e)}async all(t={}){const e=Em(this.params,t);return this.logger.logQuery(this.queryString,e),(await this.client).query(this.queryString,e)}}G(Gw,Eg,"DuckDBWasmPreparedQuery");var Ag,Og;const Yl=class Yl extends(Og=$w,Ag=xt,Og){constructor(e,i,n,s={}){super(i);G(this,"logger");this.client=e,this.schema=n,this.options=s,this.logger=s.logger??new bw}prepareQuery(e,i,n,s,o){return new Gw(this.client,e.sql,e.params,this.logger,i,o)}async query(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}async queryObjects(e,i){return this.logger.logQuery(e,i),(await this.client).query(e,i)}transaction(e,i){return xD(this.client,async n=>{const s=new Yl(n,this.dialect,this.schema,this.options),o=new Rh(this.dialect,s,this.schema);return i&&await o.setTransaction(i),e(o)})}};G(Yl,Ag,"DuckDBWasmSession");let Gl=Yl;var Fg,Pg;const ql=class ql extends(Pg=Vw,Fg=xt,Pg){constructor(e,i,n,s=0){super(e,i,n,s);G(this,"dialect");G(this,"session");this.dialect=e,this.session=i}async transaction(e){return SD(this.session.client,"",async i=>{const n=new Gl(i,this.dialect,this.schema,this.session.options),s=new ql(this.dialect,n,this.schema);return e(s)})}};G(ql,Fg,"DuckDBWasmTransaction");let Rh=ql;var Mg,Dg;class Ww extends(Dg=Yf,Mg=xt,Dg){}G(Ww,Mg,"DuckDBWasmDatabase");function ko(r,t={}){const e=new Bo({casing:t.casing});let i;t.logger===!0?i=new _w:t.logger!==!1&&(i=t.logger);let n;if(t.schema){const a=rR(t.schema,oR);n={fullSchema:t.schema,schema:a.tables,tableNamesMap:a.tableNamesMap}}const s=new Gl(r,e,n,{logger:i}),o=new Ww(e,s,n);return o.$client=r,o}function Fm(r,t){const e=gR(r);let i;return e.bundles==="import-url"?i=(async()=>{const s=await Sh();switch(s){case"browser":return(await ln(async()=>{const{getImportUrlBundles:o}=await import("./import-url-browser-CPN8ipMD.js");return{getImportUrlBundles:o}},__vite__mapDeps([3,4]))).getImportUrlBundles();case"node":return await(await ln(async()=>{const{getImportUrlBundles:o}=await import("./import-url-node-BfNoxhRr.js");return{getImportUrlBundles:o}},__vite__mapDeps([5,4]))).getImportUrlBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})():i=(async()=>{const s=await Sh();switch(s){case"browser":return(await ln(async()=>{const{getBundles:o}=await import("./default-browser-BrgSDbLD.js");return{getBundles:o}},[])).getBundles();case"node":return await(await ln(async()=>{const{getBundles:o}=await import("./default-node-E6uRkI3P.js");return{getBundles:o}},__vite__mapDeps([0,1,2]))).getBundles();default:throw new Error(`Unsupported environment: "${s}"`)}})(),ko(hw({bundles:i,logger:e.logger?new I0:void 0,storage:e.storage}),t)}function Pm(...r){if(typeof r[0]=="string")return Fm(r[0],r[1]);if(JD(r[0])){const{connection:t,client:e,...i}=r[0];if(e)return ko(e,i);if(typeof t=="string")return Fm(t,i);if(typeof t>"u")throw new Error("connection option is required");return ko(hw({bundles:t.bundles,logger:t.logger,storage:t.storage}),i)}return ko(r[0],r[1])}(r=>{function t(e){return ko({options:{parsers:{},serializers:{}}},e)}r.mock=t})(Pm||(Pm={}));export{L1 as A,TR as D,xR as I,pC as J,eI as L,_c as M,wR as T,fi as a,Re as b,Pm as d,sa as e,SR as l}; diff --git a/assets/Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js b/assets/Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js similarity index 71% rename from assets/Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js rename to assets/Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js index 8aaf89b3b97e0f6f60c620dafed88c7c96543af1..3504ac6ff159217650aaf76cea1e65833152e61c 100644 --- a/assets/Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js +++ b/assets/Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js @@ -1 +1 @@ -import{_ as u}from"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";import{d as t,bL as r,m as n,o as d}from"./index-5LjD1Eoi.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=r(o,"modelValue");return(s,a)=>(d(),n(u,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,["modelValue"]))}});export{p as _}; +import{_ as u}from"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";import{d as t,bL as r,m as n,o as d}from"./index-DCMFRrFG.js";const p=t({__name:"Textarea",props:{modelValue:{default:""},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=r(o,"modelValue");return(s,a)=>(d(),n(u,{modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l),border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","rounded-lg":"","px-3":"","py-2":"","text-sm":"","outline-none":""},null,8,["modelValue"]))}});export{p as _}; diff --git a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js similarity index 93% rename from assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js rename to assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js index ff08b1580d0633eebde7c019019796d202878f52..8663f2807e299b1e7779ab594e33eee301fc5251 100644 --- a/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js +++ b/assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js @@ -1 +1 @@ -import{d as m,m as T,o as l,bE as B,E as b,B as v}from"./index-5LjD1Eoi.js";const n="0px",E=m({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(c){const r=c;function p(o){return{height:o.style.height,width:o.style.width,position:o.style.position,visibility:o.style.visibility,overflow:o.style.overflow,paddingTop:o.style.paddingTop,paddingBottom:o.style.paddingBottom,borderTopWidth:o.style.borderTopWidth,borderBottomWidth:o.style.borderBottomWidth,marginTop:o.style.marginTop,marginBottom:o.style.marginBottom}}function y(o,t){const{width:i}=getComputedStyle(o);o.style.width=i,o.style.position="absolute",o.style.visibility="hidden",o.style.height="";const{height:s}=getComputedStyle(o);return o.style.width=t.width,o.style.position=t.position,o.style.visibility=t.visibility,o.style.height=n,o.style.overflow="hidden",t.height&&t.height!==n?t.height:s}function h(o,t,i,s,d){const e=o.animate(s,d);o.style.height=t.height,e.onfinish=()=>{o.style.overflow=t.overflow,i()}}function g(o,t){return[{height:n,opacity:r.opacityClosed,paddingTop:n,paddingBottom:n,borderTopWidth:n,borderBottomWidth:n,marginTop:n,marginBottom:n},{height:o,opacity:r.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function u(o,t){const i=o,s=p(i),d=y(i,s),e=g(d,s),a={duration:r.duration,easing:r.easingEnter};h(i,s,t,e,a)}function f(o,t){const i=o,s=p(i),{height:d}=getComputedStyle(i);i.style.height=d,i.style.overflow="hidden";const e=g(d,s).reverse(),a={duration:r.duration,easing:r.easingLeave};h(i,s,t,e,a)}return(o,t)=>(l(),T(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{E as _}; +import{d as m,m as T,o as l,bE as B,E as b,B as v}from"./index-DCMFRrFG.js";const n="0px",E=m({__name:"TransitionVertical",props:{duration:{default:250},easingEnter:{default:"ease-in-out"},easingLeave:{default:"ease-in-out"},opacityClosed:{default:0},opacityOpened:{default:1}},setup(c){const r=c;function p(o){return{height:o.style.height,width:o.style.width,position:o.style.position,visibility:o.style.visibility,overflow:o.style.overflow,paddingTop:o.style.paddingTop,paddingBottom:o.style.paddingBottom,borderTopWidth:o.style.borderTopWidth,borderBottomWidth:o.style.borderBottomWidth,marginTop:o.style.marginTop,marginBottom:o.style.marginBottom}}function y(o,t){const{width:i}=getComputedStyle(o);o.style.width=i,o.style.position="absolute",o.style.visibility="hidden",o.style.height="";const{height:s}=getComputedStyle(o);return o.style.width=t.width,o.style.position=t.position,o.style.visibility=t.visibility,o.style.height=n,o.style.overflow="hidden",t.height&&t.height!==n?t.height:s}function h(o,t,i,s,d){const e=o.animate(s,d);o.style.height=t.height,e.onfinish=()=>{o.style.overflow=t.overflow,i()}}function g(o,t){return[{height:n,opacity:r.opacityClosed,paddingTop:n,paddingBottom:n,borderTopWidth:n,borderBottomWidth:n,marginTop:n,marginBottom:n},{height:o,opacity:r.opacityOpened,paddingTop:t.paddingTop,paddingBottom:t.paddingBottom,borderTopWidth:t.borderTopWidth,borderBottomWidth:t.borderBottomWidth,marginTop:t.marginTop,marginBottom:t.marginBottom}]}function u(o,t){const i=o,s=p(i),d=y(i,s),e=g(d,s),a={duration:r.duration,easing:r.easingEnter};h(i,s,t,e,a)}function f(o,t){const i=o,s=p(i),{height:d}=getComputedStyle(i);i.style.height=d,i.style.overflow="hidden";const e=g(d,s).reverse(),a={duration:r.duration,easing:r.easingLeave};h(i,s,t,e,a)}return(o,t)=>(l(),T(B,{css:!1,onEnter:u,onLeave:f},{default:b(()=>[v(o.$slots,"default")]),_:3}))}});export{E as _}; diff --git a/assets/_...all_-CoqBSN50.js b/assets/_...all_-64lFrRuT.js similarity index 63% rename from assets/_...all_-CoqBSN50.js rename to assets/_...all_-64lFrRuT.js index e964aada8c4cace17513ec9f45fec87a3641a22e..27a6dc45765ae2b2534fa4d094cc5b95c40d072f 100644 --- a/assets/_...all_-CoqBSN50.js +++ b/assets/_...all_-64lFrRuT.js @@ -1 +1 @@ -import{bq as e,c,o as n}from"./index-5LjD1Eoi.js";const o={};function _(t,r){return n(),c("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default}; +import{bq as e,c,o as n}from"./index-DCMFRrFG.js";const o={};function _(t,r){return n(),c("div",null," 404 - Page not found ")}const s=e(o,[["render",_]]);export{s as default}; diff --git a/assets/airi-card-BWkmdsVt.js b/assets/airi-card-DTE6eySa.js similarity index 94% rename from assets/airi-card-BWkmdsVt.js rename to assets/airi-card-DTE6eySa.js index 121544e06b282ab3afe923a4baed6012cde3add4..23bc0c3472920887f92b81c2fbb7a90c1dccffc0 100644 --- a/assets/airi-card-BWkmdsVt.js +++ b/assets/airi-card-DTE6eySa.js @@ -1,4 +1,4 @@ -import{v as W,bG as L,l as g,s as O,f as $,k as b,w as k}from"./index-5LjD1Eoi.js";import{e as D}from"./emotions-CAex_2dA.js";import{u as H}from"./consciousness-D7jKnAf3.js";import{u as N}from"./speech-BYL-UWPg.js";function q(a,u){return{role:"system",content:[a,D.map(n=>`- ${n}`).join(` +import{v as W,bG as L,l as g,s as O,f as $,k as b,w as k}from"./index-DCMFRrFG.js";import{e as D}from"./emotions-CAex_2dA.js";import{u as H}from"./consciousness-DGPhIG2M.js";import{u as N}from"./speech-Bc-BAopv.js";function q(a,u){return{role:"system",content:[a,D.map(n=>`- ${n}`).join(` `),u].join(` `)}}const Q=W("airi-card",()=>{const a=L("airi-cards",new Map),u=L("airi-card-active-id","default"),n=g(()=>a.value.get(u.value)),P=H(),R=N(),{activeModel:l}=O(P),{activeSpeechVoiceId:m,activeSpeechModel:p}=O(R),B=s=>{const e=crypto.randomUUID();return a.value.set(e,f(s)),e},G=s=>{a.value.delete(s)},V=s=>a.value.get(s);function v(s){var t,r,i,c,d,h,_,y,S,x,C,M,I,w,E,A,T,U,j;const e="data"in s?(r=(t=s.data)==null?void 0:t.extensions)==null?void 0:r.airi:(i=s.extensions)==null?void 0:i.airi,o={consciousness:{model:l.value},speech:{model:p.value,voice_id:m.value}};return e?{modules:{consciousness:{model:((d=(c=e.modules)==null?void 0:c.consciousness)==null?void 0:d.model)??o.consciousness.model},speech:{model:((_=(h=e.modules)==null?void 0:h.speech)==null?void 0:_.model)??o.speech.model,voice_id:((S=(y=e.modules)==null?void 0:y.speech)==null?void 0:S.voice_id)??o.speech.voice_id,pitch:(C=(x=e.modules)==null?void 0:x.speech)==null?void 0:C.pitch,rate:(I=(M=e.modules)==null?void 0:M.speech)==null?void 0:I.rate,ssml:(E=(w=e.modules)==null?void 0:w.speech)==null?void 0:E.ssml,language:(T=(A=e.modules)==null?void 0:A.speech)==null?void 0:T.language},vrm:(U=e.modules)==null?void 0:U.vrm,live2d:(j=e.modules)==null?void 0:j.live2d},agents:e.agents??{}}:{modules:o,agents:{}}}function f(s){if("data"in s){const e=s;return{name:e.data.name,version:e.data.character_version??"1.0.0",description:e.data.description??"",creator:e.data.creator??"",notes:e.data.creator_notes??"",notesMultilingual:e.data.creator_notes_multilingual,personality:e.data.personality??"",scenario:e.data.scenario??"",greetings:[e.data.first_mes,...e.data.alternate_greetings??[]],greetingsGroupOnly:e.data.group_only_greetings??[],systemPrompt:e.data.system_prompt??"",postHistoryInstructions:e.data.post_history_instructions??"",messageExample:e.data.mes_example?e.data.mes_example.split(` diff --git a/assets/alibaba-cloud-model-studio-Dsotw8H2.js b/assets/alibaba-cloud-model-studio-B6pk_ef1.js similarity index 72% rename from assets/alibaba-cloud-model-studio-Dsotw8H2.js rename to assets/alibaba-cloud-model-studio-B6pk_ef1.js index 5ad7093ee2b469622c1c33735597ece0805a82be..8c9f195f98cdfbd42ac2aa14af45608dd315cfc0 100644 --- a/assets/alibaba-cloud-model-studio-Dsotw8H2.js +++ b/assets/alibaba-cloud-model-studio-B6pk_ef1.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as x,r as m,s as k,k as F,l as V,f as $,w as v,m as B,o as E,E as y,b as c,u as i,a as I}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as U}from"./providers-CIeQW25J.js";import{u as K}from"./speech-BYL-UWPg.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js";/* empty css */import{_ as L,a as N}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js";import{b as P}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";const T={flex:"~ col gap-4"},o="alibaba-cloud-model-studio",_="cosyvoice-v1",z=x({__name:"alibaba-cloud-model-studio",setup(G){const u={speed:1},d=m(0),l=m(1),n=m(0),p=K(),a=U(),{providers:g}=k(a),{t:s}=F(),h=V(()=>{var e;return!!((e=g.value[o])!=null&&e.apiKey)}),w=V(()=>p.availableVoices[o]||[]);async function M(e,r,t){const b=a.getProviderInstance(o);if(!b)throw new Error("Failed to initialize speech provider");const C=a.getProviderConfig(o),S=C.model||_;return await p.speech(b,S,e,r,{...C,...u})}return $(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),v(d,async()=>{const e=a.getProviderConfig(o);e.pitch=d.value}),v(l,async()=>{const e=a.getProviderConfig(o);e.speed=l.value}),v(n,async()=>{const e=a.getProviderConfig(o);e.volume=n.value}),v(g,async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,r)=>(E(),B(i(N),{"provider-id":o,"default-model":_,"additional-settings":u},{"voice-settings":y(()=>[I("div",T,[c(i(f),{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=t=>d.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"]),c(i(f),{modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=t=>l.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.speed.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),c(i(f),{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=t=>n.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.volume.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"])])]),playground:y(()=>[c(i(L),{"available-voices":w.value,"generate-speech":M,"api-key-configured":h.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof P=="function"&&P(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as x,r as m,s as k,k as F,l as V,f as $,w as v,m as B,o as E,E as y,b as c,u as i,a as I}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as U}from"./providers-DHuI5XmA.js";import{u as K}from"./speech-Bc-BAopv.js";import{_ as f}from"./FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js";/* empty css */import{_ as L,a as N}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js";import{b as P}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";const T={flex:"~ col gap-4"},o="alibaba-cloud-model-studio",_="cosyvoice-v1",z=x({__name:"alibaba-cloud-model-studio",setup(G){const u={speed:1},d=m(0),l=m(1),n=m(0),p=K(),a=U(),{providers:g}=k(a),{t:s}=F(),h=V(()=>{var e;return!!((e=g.value[o])!=null&&e.apiKey)}),w=V(()=>p.availableVoices[o]||[]);async function M(e,r,t){const b=a.getProviderInstance(o);if(!b)throw new Error("Failed to initialize speech provider");const C=a.getProviderConfig(o),S=C.model||_;return await p.speech(b,S,e,r,{...C,...u})}return $(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),v(d,async()=>{const e=a.getProviderConfig(o);e.pitch=d.value}),v(l,async()=>{const e=a.getProviderConfig(o);e.speed=l.value}),v(n,async()=>{const e=a.getProviderConfig(o);e.volume=n.value}),v(g,async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await p.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,r)=>(E(),B(i(N),{"provider-id":o,"default-model":_,"additional-settings":u},{"voice-settings":y(()=>[I("div",T,[c(i(f),{modelValue:d.value,"onUpdate:modelValue":r[0]||(r[0]=t=>d.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"]),c(i(f),{modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=t=>l.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.speed.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),c(i(f),{modelValue:n.value,"onUpdate:modelValue":r[2]||(r[2]=t=>n.value=t),label:i(s)("settings.pages.providers.provider.common.fields.field.volume.label"),description:i(s)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":t=>`${t}%`},null,8,["modelValue","label","description","format-value"])])]),playground:y(()=>[c(i(L),{"available-voices":w.value,"generate-speech":M,"api-key-configured":h.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof P=="function"&&P(z);export{z as default}; diff --git a/assets/anthropic-Bb59KvNZ.js b/assets/anthropic-BqfnlV64.js similarity index 79% rename from assets/anthropic-Bb59KvNZ.js rename to assets/anthropic-BqfnlV64.js index 87aa14925807921d6942ad73ffc6008a39643da8..4e11876e9141c59b5d30c4e3dc7d11c6d9aae046 100644 --- a/assets/anthropic-Bb59KvNZ.js +++ b/assets/anthropic-BqfnlV64.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as S,k as x,h as U,s as w,l as v,f as V,w as C,m as K,o as R,E as u,a as i,b as l,bN as p,u as a}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as N}from"./providers-CIeQW25J.js";/* empty css */import{_ as O,a as $}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as I,a as B}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as T}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:c}=x(),g=U(),h=N(),{providers:o}=w(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.apiKey)||""},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].apiKey=t}}),n=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.baseUrl)||"https://api.anthropic.com/v1/"},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].baseUrl=t}});V(()=>{var t,r;o.value[e]||(o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((t=o.value[e])==null?void 0:t.apiKey)||"",n.value=((r=o.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),C([s,n],()=>{o.value[e]={...o.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function y(){o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(t,r)=>{var f,b;return R(),K(a(T),{"provider-name":((f=m.value)==null?void 0:f.localizedName)||"Anthropic | Claude","provider-icon":(b=m.value)==null?void 0:b.icon,"on-back":()=>a(g).back()},{default:u(()=>[r[2]||(r[2]=i("div",{bg:"orange-50 dark:orange-900/20","rounded-xl":"","p-4":"",flex:"~ col gap-3"},[i("h2",{"text-xl":"","font-bold":"",text:"orange-700 dark:orange-500"}," Before you start "),i("p",null,[p(" While Anthropic recently did announce that they are having a beta support for OpenAI SDK compatibility "),i("a",{underline:"",href:"https://docs.anthropic.com/en/api/openai-sdk"},"(you can read more here)"),p(", but due to the implementation details comes with "),i("a",{underline:"",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS"},"CORS"),p(" restrictions which not aligned with the OpenAI SDK, it's currently not possible to use this provider in the browser. ")]),i("p",null,[p(" If you do need to use this provider, you will need a dedicated proxy backend like a Serverless Function running on "),i("a",{underline:"",href:"https://workers.cloudflare.com/"},"Cloudflare Workers"),p(" or some CORS bypassing services to bypass the CORS restrictions. ")])],-1)),l(a(I),null,{default:u(()=>[l(a(B),{title:a(c)("settings.pages.providers.common.section.basic.title"),description:a(c)("settings.pages.providers.common.section.basic.description"),"on-reset":y},{default:u(()=>{var d;return[l(a(A),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=k=>s.value=k),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(a(O),{title:a(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(a($),{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),placeholder:"https://api.anthropic.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(z);export{z as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as S,k as x,h as U,s as w,l as v,f as V,w as C,m as K,o as R,E as u,a as i,b as l,bN as p,u as a}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as N}from"./providers-DHuI5XmA.js";/* empty css */import{_ as O,a as $}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as A}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as I,a as B}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as T}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const e="anthropic",z=S({__name:"anthropic",setup(M){const{t:c}=x(),g=U(),h=N(),{providers:o}=w(h),m=v(()=>h.getProviderMetadata(e)),s=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.apiKey)||""},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].apiKey=t}}),n=v({get:()=>{var t;return((t=o.value[e])==null?void 0:t.baseUrl)||"https://api.anthropic.com/v1/"},set:t=>{o.value[e]||(o.value[e]={}),o.value[e].baseUrl=t}});V(()=>{var t,r;o.value[e]||(o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((t=o.value[e])==null?void 0:t.apiKey)||"",n.value=((r=o.value[e])==null?void 0:r.baseUrl)||"https://api.anthropic.com/v1/"}),C([s,n],()=>{o.value[e]={...o.value[e],apiKey:s.value,baseUrl:n.value||"https://api.anthropic.com/v1/"}});function y(){o.value[e]={baseUrl:"https://api.anthropic.com/v1/"}}return(t,r)=>{var f,b;return R(),K(a(T),{"provider-name":((f=m.value)==null?void 0:f.localizedName)||"Anthropic | Claude","provider-icon":(b=m.value)==null?void 0:b.icon,"on-back":()=>a(g).back()},{default:u(()=>[r[2]||(r[2]=i("div",{bg:"orange-50 dark:orange-900/20","rounded-xl":"","p-4":"",flex:"~ col gap-3"},[i("h2",{"text-xl":"","font-bold":"",text:"orange-700 dark:orange-500"}," Before you start "),i("p",null,[p(" While Anthropic recently did announce that they are having a beta support for OpenAI SDK compatibility "),i("a",{underline:"",href:"https://docs.anthropic.com/en/api/openai-sdk"},"(you can read more here)"),p(", but due to the implementation details comes with "),i("a",{underline:"",href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS"},"CORS"),p(" restrictions which not aligned with the OpenAI SDK, it's currently not possible to use this provider in the browser. ")]),i("p",null,[p(" If you do need to use this provider, you will need a dedicated proxy backend like a Serverless Function running on "),i("a",{underline:"",href:"https://workers.cloudflare.com/"},"Cloudflare Workers"),p(" or some CORS bypassing services to bypass the CORS restrictions. ")])],-1)),l(a(I),null,{default:u(()=>[l(a(B),{title:a(c)("settings.pages.providers.common.section.basic.title"),description:a(c)("settings.pages.providers.common.section.basic.description"),"on-reset":y},{default:u(()=>{var d;return[l(a(A),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=k=>s.value=k),"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Anthropic",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(a(O),{title:a(c)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(a($),{modelValue:n.value,"onUpdate:modelValue":r[1]||(r[1]=d=>n.value=d),placeholder:"https://api.anthropic.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(z);export{z as default}; diff --git a/assets/audio-CbrHTbIi.js b/assets/audio--U4J5B5-.js similarity index 88% rename from assets/audio-CbrHTbIi.js rename to assets/audio--U4J5B5-.js index 693c3c87643e7f83f71df308bb1151512e5c73c4..ccfbc119b6623039b314300c60864bd826ab5283 100644 --- a/assets/audio-CbrHTbIi.js +++ b/assets/audio--U4J5B5-.js @@ -1 +1 @@ -import{d as s,r as f,c as d,o as p,a as t}from"./index-5LjD1Eoi.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default}; +import{d as s,r as f,c as d,o as p,a as t}from"./index-DCMFRrFG.js";const R=s({__name:"audio",setup(_){const a=f(),l=f();function u(o){var r,c,i;if(!o)return;const n=(c=(r=l.value)==null?void 0:r.files)==null?void 0:c[0];if(!n)return;const e=document.createElement("audio");(i=a.value)==null||i.appendChild(e),e.src=URL.createObjectURL(n),e.controls=!0,e.load(),e.play()}return(o,n)=>(p(),d("div",null,[t("div",null,[t("div",{ref_key:"containerRef",ref:a},null,512),t("input",{ref_key:"fileInputRef",ref:l,type:"file",onChange:u},null,544)])]))}});export{R as default}; diff --git a/assets/background-remove-CAElzeUN.js b/assets/background-remove-DG4rn_jW.js similarity index 99% rename from assets/background-remove-CAElzeUN.js rename to assets/background-remove-DG4rn_jW.js index b603bbf0bc8017af2bf40b2dde10c8e5d9368fa0..35613b01c2d9d3a90f81b9fae845bad5caac3615 100644 --- a/assets/background-remove-CAElzeUN.js +++ b/assets/background-remove-DG4rn_jW.js @@ -1,4 +1,4 @@ -var uv=Object.defineProperty;var dv=(e,r,t)=>r in e?uv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var te=(e,r,t)=>dv(e,typeof r!="symbol"?r+"":r,t);/* empty css */import{_ as cv}from"./InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js";import{d as pv,r as ks,l as hv,f as mv,c as Tn,o as En,a as Sr,b as fv,t as wf,bA as bf,bB as Mf,i as yf,q as _v,u as gv}from"./index-5LjD1Eoi.js";const la=new Map,kn=[],wv=(e,r,t)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){const s=la.get(e);if(s===void 0)la.set(e,{backend:r,priority:t});else{if(s.priority>t)return;if(s.priority===t&&s.backend!==r)throw new Error(`cannot register backend "${e}" using priority ${t}`)}if(t>=0){const o=kn.indexOf(e);o!==-1&&kn.splice(o,1);for(let n=0;n{const r=la.get(e);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{const t=!!r.initPromise;try{return t||(r.initPromise=r.backend.init(e)),await r.initPromise,r.initialized=!0,r.backend}catch(s){return t||(r.error=`${s}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Mv=async e=>{const r=e.executionProviders||[],t=r.map(l=>typeof l=="string"?l:l.name),s=t.length===0?kn:t;let o;const n=[],i=new Set;for(const l of s){const u=await bv(l);typeof u=="string"?n.push({name:l,err:u}):(o||(o=u),o===u&&i.add(l))}if(!o)throw new Error(`no available backend found. ERR: ${n.map(l=>`[${l.name}] ${l.err}`).join(", ")}`);for(const{name:l,err:u}of n)t.includes(l)&&console.warn(`removing requested execution provider "${l}" from session options because it is not available: ${u}`);const a=r.filter(l=>i.has(typeof l=="string"?l:l.name));return[o,new Proxy(e,{get:(l,u)=>u==="executionProviders"?a:Reflect.get(l,u)})]},yv="1.21.1";let vf="warning";const ms={wasm:{},webgl:{},webgpu:{},versions:{common:yv},set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);vf=e}},get logLevel(){return vf}};Object.defineProperty(ms,"logLevel",{enumerable:!0});const vv=ms,xv=(e,r)=>{const t=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);t.width=e.dims[3],t.height=e.dims[2];const s=t.getContext("2d");if(s!=null){let o,n;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[3]):(o=e.dims[3],n=e.dims[2]);const i=(r==null?void 0:r.format)!==void 0?r.format:"RGB",a=r==null?void 0:r.norm;let l,u;a===void 0||a.mean===void 0?l=[255,255,255,255]:typeof a.mean=="number"?l=[a.mean,a.mean,a.mean,a.mean]:(l=[a.mean[0],a.mean[1],a.mean[2],0],a.mean[3]!==void 0&&(l[3]=a.mean[3])),a===void 0||a.bias===void 0?u=[0,0,0,0]:typeof a.bias=="number"?u=[a.bias,a.bias,a.bias,a.bias]:(u=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(u[3]=a.bias[3]));const p=n*o;let d=0,c=p,_=p*2,f=-1;i==="RGBA"?(d=0,c=p,_=p*2,f=p*3):i==="RGB"?(d=0,c=p,_=p*2):i==="RBG"&&(d=0,_=p,c=p*2);for(let v=0;v{const t=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");let s;if(t!=null){let o,n,i;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[1],i=e.dims[3]):(o=e.dims[3],n=e.dims[2],i=e.dims[1]);const a=r!==void 0&&r.format!==void 0?r.format:"RGB",l=r==null?void 0:r.norm;let u,p;l===void 0||l.mean===void 0?u=[255,255,255,255]:typeof l.mean=="number"?u=[l.mean,l.mean,l.mean,l.mean]:(u=[l.mean[0],l.mean[1],l.mean[2],255],l.mean[3]!==void 0&&(u[3]=l.mean[3])),l===void 0||l.bias===void 0?p=[0,0,0,0]:typeof l.bias=="number"?p=[l.bias,l.bias,l.bias,l.bias]:(p=[l.bias[0],l.bias[1],l.bias[2],0],l.bias[3]!==void 0&&(p[3]=l.bias[3]));const d=n*o;if(r!==void 0&&(r.format!==void 0&&i===4&&r.format!=="RGBA"||i===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");const c=4;let _=0,f=1,v=2,$=3,w=0,g=d,C=d*2,E=-1;a==="RGBA"?(w=0,g=d,C=d*2,E=d*3):a==="RGB"?(w=0,g=d,C=d*2):a==="RBG"&&(w=0,C=d,g=d*2),s=t.createImageData(o,n);for(let y=0;y{if(e===void 0)throw new Error("Image buffer must be defined");if(r.height===void 0||r.width===void 0)throw new Error("Image height and width must be defined");if(r.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");const{height:t,width:s}=r,o=r.norm??{mean:255,bias:0};let n,i;typeof o.mean=="number"?n=[o.mean,o.mean,o.mean,o.mean]:n=[o.mean[0],o.mean[1],o.mean[2],o.mean[3]??255],typeof o.bias=="number"?i=[o.bias,o.bias,o.bias,o.bias]:i=[o.bias[0],o.bias[1],o.bias[2],o.bias[3]??0];const a=r.format!==void 0?r.format:"RGBA",l=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",u=t*s,p=l==="RGBA"?new Float32Array(u*4):new Float32Array(u*3);let d=4,c=0,_=1,f=2,v=3,$=0,w=u,g=u*2,C=-1;a==="RGB"&&(d=3,c=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,g=u,w=u*2):l==="BGR"&&(g=0,w=u,$=u*2);for(let y=0;y{const t=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,s=typeof ImageData<"u"&&e instanceof ImageData,o=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,n=typeof e=="string";let i,a=r??{};const l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=p=>typeof HTMLCanvasElement<"u"&&p instanceof HTMLCanvasElement||p instanceof OffscreenCanvas?p.getContext("2d"):null;if(t){const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){let c=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(c=r.resizedHeight,_=r.resizedWidth),r!==void 0){if(a=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");a.tensorFormat="RGBA",a.height=c,a.width=_}else a.tensorFormat="RGBA",a.height=c,a.width=_;d.drawImage(e,0,0),i=d.getImageData(0,0,_,c).data}else throw new Error("Can not access image data")}else if(s){let p,d;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,d=r.resizedWidth):(p=e.height,d=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=d,r!==void 0){const c=l();c.width=d,c.height=p;const _=u(c);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,d,p).data;else throw new Error("Can not access image data")}else i=e.data}else if(o){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){const c=e.height,_=e.width;return d.drawImage(e,0,0,_,c),i=d.getImageData(0,0,_,c).data,a.height=c,a.width=_,kl(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,d)=>{const c=l(),_=u(c);if(!e||!_)return d();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{c.width=f.width,c.height=f.height,_.drawImage(f,0,0,c.width,c.height);const v=_.getImageData(0,0,c.width,c.height);a.height=c.height,a.width=c.width,p(kl(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return kl(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Pv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new Qr({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Cv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Sv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},$v=(e,r,t)=>new Qr({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),so=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),ua=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);let xf=!1;const kv=()=>{if(!xf){xf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(so.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(so.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(so.set("float16",t),ua.set(t,"float16")):so.set("float16",Uint16Array)}},Iv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new Qr(e.type,e.data,r);case"cpu-pinned":return new Qr({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new Qr({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new Qr({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new Qr({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let Qr=class{constructor(r,t,s){kv();let o,n;if(typeof r=="object"&&"location"in r)switch(this.dataLocation=r.location,o=r.type,n=r.dims,r.location){case"cpu-pinned":{const a=so.get(o);if(!a)throw new TypeError(`unsupported type "${o}" to create tensor from pinned buffer`);if(!(r.data instanceof a))throw new TypeError(`buffer should be of type ${a.name}`);this.cpuData=r.data;break}case"texture":{if(o!=="float32")throw new TypeError(`unsupported type "${o}" to create tensor from texture`);this.gpuTextureData=r.texture,this.downloader=r.download,this.disposer=r.dispose;break}case"gpu-buffer":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from gpu buffer`);this.gpuBufferData=r.gpuBuffer,this.downloader=r.download,this.disposer=r.dispose;break}case"ml-tensor":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint64"&&o!=="int8"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from MLTensor`);this.mlTensorData=r.mlTensor,this.downloader=r.download,this.disposer=r.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,l;if(typeof r=="string")if(o=r,l=s,r==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const u=so.get(r);if(u===void 0)throw new TypeError(`Unsupported tensor type: ${r}.`);if(Array.isArray(t)){if(r==="float16"&&u===Uint16Array||r==="uint4"||r==="int4")throw new TypeError(`Creating a ${r} tensor from number array is not supported. Please use ${u.name} as data.`);r==="uint64"||r==="int64"?a=u.from(t,BigInt):a=u.from(t)}else if(t instanceof u)a=t;else if(t instanceof Uint8ClampedArray)if(r==="uint8")a=Uint8Array.from(t);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(r==="float16"&&t instanceof Uint16Array&&u!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw new TypeError(`A ${o} tensor's data must be type of ${u}`)}else if(l=t,Array.isArray(r)){if(r.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const u=typeof r[0];if(u==="string")o="string",a=r;else if(u==="boolean")o="bool",a=Uint8Array.from(r);else throw new TypeError(`Invalid element type of data array: ${u}.`)}else if(r instanceof Uint8ClampedArray)o="uint8",a=Uint8Array.from(r);else{const u=ua.get(r.constructor);if(u===void 0)throw new TypeError(`Unsupported type for tensor data: ${r.constructor}.`);o=u,a=r}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");n=l,this.cpuData=a,this.dataLocation="cpu"}const i=Iv(n);if(this.cpuData&&i!==this.cpuData.length&&!((o==="uint4"||o==="int4")&&Math.ceil(i/2)===this.cpuData.length))throw new Error(`Tensor's size(${i}) does not match data length(${this.cpuData.length}).`);this.type=o,this.dims=n,this.size=i}static async fromImage(r,t){return Ev(r,t)}static fromTexture(r,t){return Pv(r,t)}static fromGpuBuffer(r,t){return Cv(r,t)}static fromMLTensor(r,t){return Sv(r,t)}static fromPinnedBuffer(r,t,s){return $v(r,t,s)}toDataURL(r){return xv(this,r)}toImageData(r){return Tv(this,r)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(r){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;const t=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=t,r&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(r){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return Av(this,r)}};const to=Qr,nb=(e,r)=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||console.timeStamp(`${e}::ORT::${r}`)},ob=(e,r)=>{var o;const t=((o=new Error().stack)==null?void 0:o.split(/\r\n|\r|\n/g))||[];let s=!1;for(let n=0;n{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("BEGIN",e)},Iu=e=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("END",e)};let Fv=class ib{constructor(r){this.handler=r}async run(r,t,s){ku();const o={};let n={};if(typeof r!="object"||r===null||r instanceof to||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let i=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof to)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");i=!1;for(const u of t){if(typeof u!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(u)===-1)throw new RangeError(`'fetches' contains invalid output name: ${u}.`);o[u]=null}if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else{let u=!1;const p=Object.getOwnPropertyNames(t);for(const d of this.outputNames)if(p.indexOf(d)!==-1){const c=t[d];(c===null||c instanceof to)&&(u=!0,i=!1,o[d]=c)}if(u){if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else n=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const u of this.inputNames)if(typeof r[u]>"u")throw new Error(`input '${u}' is missing in 'feeds'.`);if(i)for(const u of this.outputNames)o[u]=null;const a=await this.handler.run(r,o,n),l={};for(const u in a)if(Object.hasOwnProperty.call(a,u)){const p=a[u];p instanceof to?l[u]=p:l[u]=new to(p.type,p.data,p.dims)}return Iu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){ku();let n,i={};if(typeof r=="string"){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const p=r;let d=0,c=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(d=t,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(c=r.byteLength-d,typeof s=="number"){if(c=s,!Number.isSafeInteger(c))throw new RangeError("'byteLength' must be an integer.");if(c<=0||d+c>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-d}].`);if(typeof o=="object"&&o!==null)i=o;else if(typeof o<"u")throw new TypeError("'options' must be an object.")}else if(typeof s<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");n=new Uint8Array(p,d,c)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Mv(i),u=await a.createInferenceSessionHandler(n,l);return Iu(),new ib(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const Ov=Fv,Dv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Ov,TRACE:nb,TRACE_FUNC_BEGIN:ku,TRACE_FUNC_END:Iu,Tensor:to,env:vv,registerBackend:wv},Symbol.toStringTag,{value:"Module"}));/*! +var uv=Object.defineProperty;var dv=(e,r,t)=>r in e?uv(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var te=(e,r,t)=>dv(e,typeof r!="symbol"?r+"":r,t);/* empty css */import{_ as cv}from"./InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js";import{d as pv,r as ks,l as hv,f as mv,c as Tn,o as En,a as Sr,b as fv,t as wf,bA as bf,bB as Mf,i as yf,q as _v,u as gv}from"./index-DCMFRrFG.js";const la=new Map,kn=[],wv=(e,r,t)=>{if(r&&typeof r.init=="function"&&typeof r.createInferenceSessionHandler=="function"){const s=la.get(e);if(s===void 0)la.set(e,{backend:r,priority:t});else{if(s.priority>t)return;if(s.priority===t&&s.backend!==r)throw new Error(`cannot register backend "${e}" using priority ${t}`)}if(t>=0){const o=kn.indexOf(e);o!==-1&&kn.splice(o,1);for(let n=0;n{const r=la.get(e);if(!r)return"backend not found.";if(r.initialized)return r.backend;if(r.aborted)return r.error;{const t=!!r.initPromise;try{return t||(r.initPromise=r.backend.init(e)),await r.initPromise,r.initialized=!0,r.backend}catch(s){return t||(r.error=`${s}`,r.aborted=!0),r.error}finally{delete r.initPromise}}},Mv=async e=>{const r=e.executionProviders||[],t=r.map(l=>typeof l=="string"?l:l.name),s=t.length===0?kn:t;let o;const n=[],i=new Set;for(const l of s){const u=await bv(l);typeof u=="string"?n.push({name:l,err:u}):(o||(o=u),o===u&&i.add(l))}if(!o)throw new Error(`no available backend found. ERR: ${n.map(l=>`[${l.name}] ${l.err}`).join(", ")}`);for(const{name:l,err:u}of n)t.includes(l)&&console.warn(`removing requested execution provider "${l}" from session options because it is not available: ${u}`);const a=r.filter(l=>i.has(typeof l=="string"?l:l.name));return[o,new Proxy(e,{get:(l,u)=>u==="executionProviders"?a:Reflect.get(l,u)})]},yv="1.21.1";let vf="warning";const ms={wasm:{},webgl:{},webgpu:{},versions:{common:yv},set logLevel(e){if(e!==void 0){if(typeof e!="string"||["verbose","info","warning","error","fatal"].indexOf(e)===-1)throw new Error(`Unsupported logging level: ${e}`);vf=e}},get logLevel(){return vf}};Object.defineProperty(ms,"logLevel",{enumerable:!0});const vv=ms,xv=(e,r)=>{const t=typeof document<"u"?document.createElement("canvas"):new OffscreenCanvas(1,1);t.width=e.dims[3],t.height=e.dims[2];const s=t.getContext("2d");if(s!=null){let o,n;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[3]):(o=e.dims[3],n=e.dims[2]);const i=(r==null?void 0:r.format)!==void 0?r.format:"RGB",a=r==null?void 0:r.norm;let l,u;a===void 0||a.mean===void 0?l=[255,255,255,255]:typeof a.mean=="number"?l=[a.mean,a.mean,a.mean,a.mean]:(l=[a.mean[0],a.mean[1],a.mean[2],0],a.mean[3]!==void 0&&(l[3]=a.mean[3])),a===void 0||a.bias===void 0?u=[0,0,0,0]:typeof a.bias=="number"?u=[a.bias,a.bias,a.bias,a.bias]:(u=[a.bias[0],a.bias[1],a.bias[2],0],a.bias[3]!==void 0&&(u[3]=a.bias[3]));const p=n*o;let d=0,c=p,_=p*2,f=-1;i==="RGBA"?(d=0,c=p,_=p*2,f=p*3):i==="RGB"?(d=0,c=p,_=p*2):i==="RBG"&&(d=0,_=p,c=p*2);for(let v=0;v{const t=typeof document<"u"?document.createElement("canvas").getContext("2d"):new OffscreenCanvas(1,1).getContext("2d");let s;if(t!=null){let o,n,i;(r==null?void 0:r.tensorLayout)!==void 0&&r.tensorLayout==="NHWC"?(o=e.dims[2],n=e.dims[1],i=e.dims[3]):(o=e.dims[3],n=e.dims[2],i=e.dims[1]);const a=r!==void 0&&r.format!==void 0?r.format:"RGB",l=r==null?void 0:r.norm;let u,p;l===void 0||l.mean===void 0?u=[255,255,255,255]:typeof l.mean=="number"?u=[l.mean,l.mean,l.mean,l.mean]:(u=[l.mean[0],l.mean[1],l.mean[2],255],l.mean[3]!==void 0&&(u[3]=l.mean[3])),l===void 0||l.bias===void 0?p=[0,0,0,0]:typeof l.bias=="number"?p=[l.bias,l.bias,l.bias,l.bias]:(p=[l.bias[0],l.bias[1],l.bias[2],0],l.bias[3]!==void 0&&(p[3]=l.bias[3]));const d=n*o;if(r!==void 0&&(r.format!==void 0&&i===4&&r.format!=="RGBA"||i===3&&r.format!=="RGB"&&r.format!=="BGR"))throw new Error("Tensor format doesn't match input tensor dims");const c=4;let _=0,f=1,v=2,$=3,w=0,g=d,C=d*2,E=-1;a==="RGBA"?(w=0,g=d,C=d*2,E=d*3):a==="RGB"?(w=0,g=d,C=d*2):a==="RBG"&&(w=0,C=d,g=d*2),s=t.createImageData(o,n);for(let y=0;y{if(e===void 0)throw new Error("Image buffer must be defined");if(r.height===void 0||r.width===void 0)throw new Error("Image height and width must be defined");if(r.tensorLayout==="NHWC")throw new Error("NHWC Tensor layout is not supported yet");const{height:t,width:s}=r,o=r.norm??{mean:255,bias:0};let n,i;typeof o.mean=="number"?n=[o.mean,o.mean,o.mean,o.mean]:n=[o.mean[0],o.mean[1],o.mean[2],o.mean[3]??255],typeof o.bias=="number"?i=[o.bias,o.bias,o.bias,o.bias]:i=[o.bias[0],o.bias[1],o.bias[2],o.bias[3]??0];const a=r.format!==void 0?r.format:"RGBA",l=r.tensorFormat!==void 0&&r.tensorFormat!==void 0?r.tensorFormat:"RGB",u=t*s,p=l==="RGBA"?new Float32Array(u*4):new Float32Array(u*3);let d=4,c=0,_=1,f=2,v=3,$=0,w=u,g=u*2,C=-1;a==="RGB"&&(d=3,c=0,_=1,f=2,v=-1),l==="RGBA"?C=u*3:l==="RBG"?($=0,g=u,w=u*2):l==="BGR"&&(g=0,w=u,$=u*2);for(let y=0;y{const t=typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement,s=typeof ImageData<"u"&&e instanceof ImageData,o=typeof ImageBitmap<"u"&&e instanceof ImageBitmap,n=typeof e=="string";let i,a=r??{};const l=()=>{if(typeof document<"u")return document.createElement("canvas");if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(1,1);throw new Error("Canvas is not supported")},u=p=>typeof HTMLCanvasElement<"u"&&p instanceof HTMLCanvasElement||p instanceof OffscreenCanvas?p.getContext("2d"):null;if(t){const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){let c=e.height,_=e.width;if(r!==void 0&&r.resizedHeight!==void 0&&r.resizedWidth!==void 0&&(c=r.resizedHeight,_=r.resizedWidth),r!==void 0){if(a=r,r.tensorFormat!==void 0)throw new Error("Image input config format must be RGBA for HTMLImageElement");a.tensorFormat="RGBA",a.height=c,a.width=_}else a.tensorFormat="RGBA",a.height=c,a.width=_;d.drawImage(e,0,0),i=d.getImageData(0,0,_,c).data}else throw new Error("Can not access image data")}else if(s){let p,d;if(r!==void 0&&r.resizedWidth!==void 0&&r.resizedHeight!==void 0?(p=r.resizedHeight,d=r.resizedWidth):(p=e.height,d=e.width),r!==void 0&&(a=r),a.format="RGBA",a.height=p,a.width=d,r!==void 0){const c=l();c.width=d,c.height=p;const _=u(c);if(_!=null)_.putImageData(e,0,0),i=_.getImageData(0,0,d,p).data;else throw new Error("Can not access image data")}else i=e.data}else if(o){if(r===void 0)throw new Error("Please provide image config with format for Imagebitmap");const p=l();p.width=e.width,p.height=e.height;const d=u(p);if(d!=null){const c=e.height,_=e.width;return d.drawImage(e,0,0,_,c),i=d.getImageData(0,0,_,c).data,a.height=c,a.width=_,kl(i,a)}else throw new Error("Can not access image data")}else{if(n)return new Promise((p,d)=>{const c=l(),_=u(c);if(!e||!_)return d();const f=new Image;f.crossOrigin="Anonymous",f.src=e,f.onload=()=>{c.width=f.width,c.height=f.height,_.drawImage(f,0,0,c.width,c.height);const v=_.getImageData(0,0,c.width,c.height);a.height=c.height,a.width=c.width,p(kl(v.data,a))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(i!==void 0)return kl(i,a);throw new Error("Input data provided is not supported - aborted tensor creation")},Pv=(e,r)=>{const{width:t,height:s,download:o,dispose:n}=r,i=[1,s,t,4];return new Qr({location:"texture",type:"float32",texture:e,dims:i,download:o,dispose:n})},Cv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"gpu-buffer",type:t??"float32",gpuBuffer:e,dims:s,download:o,dispose:n})},Sv=(e,r)=>{const{dataType:t,dims:s,download:o,dispose:n}=r;return new Qr({location:"ml-tensor",type:t??"float32",mlTensor:e,dims:s,download:o,dispose:n})},$v=(e,r,t)=>new Qr({location:"cpu-pinned",type:e,data:r,dims:t??[r.length]}),so=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array],["int4",Uint8Array],["uint4",Uint8Array]]),ua=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);let xf=!1;const kv=()=>{if(!xf){xf=!0;const e=typeof BigInt64Array<"u"&&BigInt64Array.from,r=typeof BigUint64Array<"u"&&BigUint64Array.from,t=globalThis.Float16Array,s=typeof t<"u"&&t.from;e&&(so.set("int64",BigInt64Array),ua.set(BigInt64Array,"int64")),r&&(so.set("uint64",BigUint64Array),ua.set(BigUint64Array,"uint64")),s?(so.set("float16",t),ua.set(t,"float16")):so.set("float16",Uint16Array)}},Iv=e=>{let r=1;for(let t=0;t{switch(e.location){case"cpu":return new Qr(e.type,e.data,r);case"cpu-pinned":return new Qr({location:"cpu-pinned",data:e.data,type:e.type,dims:r});case"texture":return new Qr({location:"texture",texture:e.texture,type:e.type,dims:r});case"gpu-buffer":return new Qr({location:"gpu-buffer",gpuBuffer:e.gpuBuffer,type:e.type,dims:r});case"ml-tensor":return new Qr({location:"ml-tensor",mlTensor:e.mlTensor,type:e.type,dims:r});default:throw new Error(`tensorReshape: tensor location ${e.location} is not supported`)}};let Qr=class{constructor(r,t,s){kv();let o,n;if(typeof r=="object"&&"location"in r)switch(this.dataLocation=r.location,o=r.type,n=r.dims,r.location){case"cpu-pinned":{const a=so.get(o);if(!a)throw new TypeError(`unsupported type "${o}" to create tensor from pinned buffer`);if(!(r.data instanceof a))throw new TypeError(`buffer should be of type ${a.name}`);this.cpuData=r.data;break}case"texture":{if(o!=="float32")throw new TypeError(`unsupported type "${o}" to create tensor from texture`);this.gpuTextureData=r.texture,this.downloader=r.download,this.disposer=r.dispose;break}case"gpu-buffer":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from gpu buffer`);this.gpuBufferData=r.gpuBuffer,this.downloader=r.download,this.disposer=r.dispose;break}case"ml-tensor":{if(o!=="float32"&&o!=="float16"&&o!=="int32"&&o!=="int64"&&o!=="uint32"&&o!=="uint64"&&o!=="int8"&&o!=="uint8"&&o!=="bool"&&o!=="uint4"&&o!=="int4")throw new TypeError(`unsupported type "${o}" to create tensor from MLTensor`);this.mlTensorData=r.mlTensor,this.downloader=r.download,this.disposer=r.dispose;break}default:throw new Error(`Tensor constructor: unsupported location '${this.dataLocation}'`)}else{let a,l;if(typeof r=="string")if(o=r,l=s,r==="string"){if(!Array.isArray(t))throw new TypeError("A string tensor's data must be a string array.");a=t}else{const u=so.get(r);if(u===void 0)throw new TypeError(`Unsupported tensor type: ${r}.`);if(Array.isArray(t)){if(r==="float16"&&u===Uint16Array||r==="uint4"||r==="int4")throw new TypeError(`Creating a ${r} tensor from number array is not supported. Please use ${u.name} as data.`);r==="uint64"||r==="int64"?a=u.from(t,BigInt):a=u.from(t)}else if(t instanceof u)a=t;else if(t instanceof Uint8ClampedArray)if(r==="uint8")a=Uint8Array.from(t);else throw new TypeError("A Uint8ClampedArray tensor's data must be type of uint8");else if(r==="float16"&&t instanceof Uint16Array&&u!==Uint16Array)a=new globalThis.Float16Array(t.buffer,t.byteOffset,t.length);else throw new TypeError(`A ${o} tensor's data must be type of ${u}`)}else if(l=t,Array.isArray(r)){if(r.length===0)throw new TypeError("Tensor type cannot be inferred from an empty array.");const u=typeof r[0];if(u==="string")o="string",a=r;else if(u==="boolean")o="bool",a=Uint8Array.from(r);else throw new TypeError(`Invalid element type of data array: ${u}.`)}else if(r instanceof Uint8ClampedArray)o="uint8",a=Uint8Array.from(r);else{const u=ua.get(r.constructor);if(u===void 0)throw new TypeError(`Unsupported type for tensor data: ${r.constructor}.`);o=u,a=r}if(l===void 0)l=[a.length];else if(!Array.isArray(l))throw new TypeError("A tensor's dims must be a number array");n=l,this.cpuData=a,this.dataLocation="cpu"}const i=Iv(n);if(this.cpuData&&i!==this.cpuData.length&&!((o==="uint4"||o==="int4")&&Math.ceil(i/2)===this.cpuData.length))throw new Error(`Tensor's size(${i}) does not match data length(${this.cpuData.length}).`);this.type=o,this.dims=n,this.size=i}static async fromImage(r,t){return Ev(r,t)}static fromTexture(r,t){return Pv(r,t)}static fromGpuBuffer(r,t){return Cv(r,t)}static fromMLTensor(r,t){return Sv(r,t)}static fromPinnedBuffer(r,t,s){return $v(r,t,s)}toDataURL(r){return xv(this,r)}toImageData(r){return Tv(this,r)}get data(){if(this.ensureValid(),!this.cpuData)throw new Error("The data is not on CPU. Use `getData()` to download GPU data to CPU, or use `texture` or `gpuBuffer` property to access the GPU data directly.");return this.cpuData}get location(){return this.dataLocation}get texture(){if(this.ensureValid(),!this.gpuTextureData)throw new Error("The data is not stored as a WebGL texture.");return this.gpuTextureData}get gpuBuffer(){if(this.ensureValid(),!this.gpuBufferData)throw new Error("The data is not stored as a WebGPU buffer.");return this.gpuBufferData}get mlTensor(){if(this.ensureValid(),!this.mlTensorData)throw new Error("The data is not stored as a WebNN MLTensor.");return this.mlTensorData}async getData(r){switch(this.ensureValid(),this.dataLocation){case"cpu":case"cpu-pinned":return this.data;case"texture":case"gpu-buffer":case"ml-tensor":{if(!this.downloader)throw new Error("The current tensor is not created with a specified data downloader.");if(this.isDownloading)throw new Error("The current tensor is being downloaded.");try{this.isDownloading=!0;const t=await this.downloader();return this.downloader=void 0,this.dataLocation="cpu",this.cpuData=t,r&&this.disposer&&(this.disposer(),this.disposer=void 0),t}finally{this.isDownloading=!1}}default:throw new Error(`cannot get data from location: ${this.dataLocation}`)}}dispose(){if(this.isDownloading)throw new Error("The current tensor is being downloaded.");this.disposer&&(this.disposer(),this.disposer=void 0),this.cpuData=void 0,this.gpuTextureData=void 0,this.gpuBufferData=void 0,this.mlTensorData=void 0,this.downloader=void 0,this.isDownloading=void 0,this.dataLocation="none"}ensureValid(){if(this.dataLocation==="none")throw new Error("The tensor is disposed.")}reshape(r){if(this.ensureValid(),this.downloader||this.disposer)throw new Error("Cannot reshape a tensor that owns GPU resource.");return Av(this,r)}};const to=Qr,nb=(e,r)=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||console.timeStamp(`${e}::ORT::${r}`)},ob=(e,r)=>{var o;const t=((o=new Error().stack)==null?void 0:o.split(/\r\n|\r|\n/g))||[];let s=!1;for(let n=0;n{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("BEGIN",e)},Iu=e=>{(typeof ms.trace>"u"?!ms.wasm.trace:!ms.trace)||ob("END",e)};let Fv=class ib{constructor(r){this.handler=r}async run(r,t,s){ku();const o={};let n={};if(typeof r!="object"||r===null||r instanceof to||Array.isArray(r))throw new TypeError("'feeds' must be an object that use input names as keys and OnnxValue as corresponding values.");let i=!0;if(typeof t=="object"){if(t===null)throw new TypeError("Unexpected argument[1]: cannot be null.");if(t instanceof to)throw new TypeError("'fetches' cannot be a Tensor");if(Array.isArray(t)){if(t.length===0)throw new TypeError("'fetches' cannot be an empty array.");i=!1;for(const u of t){if(typeof u!="string")throw new TypeError("'fetches' must be a string array or an object.");if(this.outputNames.indexOf(u)===-1)throw new RangeError(`'fetches' contains invalid output name: ${u}.`);o[u]=null}if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else{let u=!1;const p=Object.getOwnPropertyNames(t);for(const d of this.outputNames)if(p.indexOf(d)!==-1){const c=t[d];(c===null||c instanceof to)&&(u=!0,i=!1,o[d]=c)}if(u){if(typeof s=="object"&&s!==null)n=s;else if(typeof s<"u")throw new TypeError("'options' must be an object.")}else n=t}}else if(typeof t<"u")throw new TypeError("Unexpected argument[1]: must be 'fetches' or 'options'.");for(const u of this.inputNames)if(typeof r[u]>"u")throw new Error(`input '${u}' is missing in 'feeds'.`);if(i)for(const u of this.outputNames)o[u]=null;const a=await this.handler.run(r,o,n),l={};for(const u in a)if(Object.hasOwnProperty.call(a,u)){const p=a[u];p instanceof to?l[u]=p:l[u]=new to(p.type,p.data,p.dims)}return Iu(),l}async release(){return this.handler.dispose()}static async create(r,t,s,o){ku();let n,i={};if(typeof r=="string"){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof Uint8Array){if(n=r,typeof t=="object"&&t!==null)i=t;else if(typeof t<"u")throw new TypeError("'options' must be an object.")}else if(r instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&r instanceof SharedArrayBuffer){const p=r;let d=0,c=r.byteLength;if(typeof t=="object"&&t!==null)i=t;else if(typeof t=="number"){if(d=t,!Number.isSafeInteger(d))throw new RangeError("'byteOffset' must be an integer.");if(d<0||d>=p.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${p.byteLength}).`);if(c=r.byteLength-d,typeof s=="number"){if(c=s,!Number.isSafeInteger(c))throw new RangeError("'byteLength' must be an integer.");if(c<=0||d+c>p.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${p.byteLength-d}].`);if(typeof o=="object"&&o!==null)i=o;else if(typeof o<"u")throw new TypeError("'options' must be an object.")}else if(typeof s<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof t<"u")throw new TypeError("'options' must be an object.");n=new Uint8Array(p,d,c)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const[a,l]=await Mv(i),u=await a.createInferenceSessionHandler(n,l);return Iu(),new ib(u)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const Ov=Fv,Dv=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession:Ov,TRACE:nb,TRACE_FUNC_BEGIN:ku,TRACE_FUNC_END:Iu,Tensor:to,env:vv,registerBackend:wv},Symbol.toStringTag,{value:"Module"}));/*! * ONNX Runtime Web v1.22.0-dev.20250409-89f8206ba4 * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. diff --git a/assets/chat-D6nUliHw.js b/assets/chat-Du_qMEYx.js similarity index 99% rename from assets/chat-D6nUliHw.js rename to assets/chat-Du_qMEYx.js index ea45e497a80b7dbc673b9484ed4153a6b3bc1c4c..b8217da2154b60ba8e5504507ecd0816b13c1cdb 100644 --- a/assets/chat-D6nUliHw.js +++ b/assets/chat-Du_qMEYx.js @@ -1 +1 @@ -import{d as P,bG as W,r as S,c as h,o as y,a as i,G as C,bH as E,u as M,ag as A,bA as q,bB as z,x as D,i as U,t as $}from"./index-5LjD1Eoi.js";import{s as H}from"./index-C4mUnpiM.js";import"./index-LHmcipjy.js";var O=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(r,o){e=r;try{return o()}finally{e=null}}}},K=new WeakMap,G=new WeakMap,I=0,T=0,_=e=>{const r=`${I++}`,o={include:t=>n.has(t),with:t=>{const d=`${T++}`,l={[Symbol.toStringTag]:`WorkflowEvent(${r}.${d})`,toString:()=>`WorkflowEvent(${r}.${d})`,toJSON:()=>({event:r,data:t}),get data(){return t}};return n.add(l),Object.freeze(l),G.set(l,o),l}},n=new WeakSet;return K.set(o,n),Object.defineProperty(o,Symbol.toStringTag,{get:()=>`WorkflowEvent<${r}>`}),Object.defineProperty(o,"displayName",{value:`WorkflowEvent<${r}>`}),o.toString=()=>`WorkflowEvent<${r}>`,Object.freeze(o),o},j=e=>e!=null&&typeof e=="object"&&"data"in e,F=e=>e!=null&&typeof e.then=="function";function R(e,r){const o=new Array(e.length);for(const n of r)for(let t=0;t{const r=[],o=(a,f,p)=>{let c;const g={get abortController(){return c||(c=new AbortController),c},handler:a,inputs:f,outputs:[],prev:p,next:new Set};g.prev.next.add(g);const v=d(g);J.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];N.run(v,()=>{let u=0;const b=()=>{if(u===s.length){let k;try{k=a(...f)}catch(m){if(c??l)(c??l).abort(m);else throw console.error("unhandled error in handler",m),m}F(k)?k.then(m=>{j(m)&&v.sendEvent(m)}):j(k)&&v.sendEvent(k)}const L=s[u];L&&(u++,L(v,f,b))};b()})})},n=a=>{const f=[...r];[...e].filter(([p])=>R(p,f).length===p.length).map(([p,c])=>{const g=R(p,f);g.forEach(v=>{r.splice(r.indexOf(v),1)});for(const v of c)o(v.handler,g,a)})},t=[],d=a=>({get stream(){let f;return new ReadableStream({start:async p=>{f=c=>{let g=B.get(c);for(;g;){if(g===a){p.enqueue(c);break}g=g.prev}},t.push(f)}})},get signal(){return a.abortController.signal},sendEvent:(...f)=>{f.forEach(p=>{B.set(p,a),a.outputs.push(p),r.push(p),t.forEach(c=>c(p)),n(a)})},__internal__call_context:new Set});let l=new AbortController;const x=d({get abortController(){return l||(l=new AbortController),l},inputs:[],outputs:[],handler:null,prev:null,next:new Set});return x};function X(){const e={steps:new Map};return{handle:(r,o)=>{if(e.steps.has(r)){const n=e.steps.get(r),t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),t}else{const n=new Set,t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),e.steps.set(r,n),t}},createContext(){return Q({listeners:e.steps})}}}async function Y(e,r,o){const{stream:n,sendEvent:t}=e.createContext();t(r);for await(const d of n)if(o.include(d))return d;throw new Error("Workflow did not return a stop event")}function Z(e,r){const o=(...n)=>{const t=r.filter(([w])=>w.every((x,a)=>x.include(n[a]))).map(([w,x])=>x),l=V().sendEvent;return(...w)=>{let x=!1;for(let a=0;ap.include(w[c]))){x=!0;break}}return x&&console.warn("Invalid input detected [%s]",w.map(a=>a.data).join(", ")),l(...w)}};return{...e,handle:(n,t)=>{const d=(...l)=>{const w=V();return t(w.safeSendEvent,...l)};return e.handle(n,d)},createContext(){const n=e.createContext();return n.__internal__call_context.add((t,d,l)=>{t.safeSendEvent=o(...d),l()}),n}}}const ee={flex:"","flex-col":"","gap-2":""},te={flex:"~ col","gap-2":""},ne={flex:"","flex-col":"","gap-2":""},re={grid:"","grid-cols-2":"","gap-2":""},oe={flex:"","items-center":"","gap-2":""},ae={flex:"","items-center":"","gap-2":""},le={flex:"","items-center":"","gap-2":""},se={key:0},ue={key:1},fe=P({__name:"chat",setup(e){const r=W("settings/llm/baseUrl","https://openrouter.ai/api/v1/"),o=W("settings/llm/apiKey",""),n=W("settings/llm/model","openai/gpt-4o-mini"),t=S(""),d=S([]),l=S({role:"assistant",content:""}),w=S(!1),x=_(),a=_(),f=_(),p=_(),c=_();async function g(){w.value=!0;try{const v=Z(X(),[[[x],[a,c]],[[a],[f]],[[f],[p]]]);v.handle([x],async s=>{l.value={role:"assistant",content:""},d.value.push({role:"user",content:t.value}),d.value.push(l.value);const u=await H({baseURL:r.value,apiKey:o.value,model:n.value,messages:d.value.slice(0,d.value.length-1).map(b=>D(b))});for await(const b of u.chunkStream)s(a.with(b.choices[0].delta.content||""));return c.with()}),v.handle([a],async(s,u)=>{l.value.content?l.value.content+=u.data:l.value.content=u.data}),await Y(v,x.with(),c)}catch(v){console.error(v)}finally{w.value=!1}}return(v,s)=>(y(),h("div",ee,[i("div",te,[i("div",ne,[s[7]||(s[7]=i("div",null,[i("span",{"text-neutral-500":"","dark:text-neutral-400":""},"LLM")],-1)),i("div",re,[i("label",oe,[s[4]||(s[4]=i("span",{"text-nowrap":""}," Base URL ",-1)),C(i("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>A(r)?r.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(r)]])]),i("label",ae,[s[5]||(s[5]=i("span",{"text-nowrap":""}," API Key ",-1)),C(i("input",{"onUpdate:modelValue":s[1]||(s[1]=u=>A(o)?o.value=u:null),type:"password",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(o)]])]),i("label",le,[s[6]||(s[6]=i("span",{"text-nowrap":""}," Model ",-1)),C(i("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>A(n)?n.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(n)]])])])]),i("div",null,[C(i("textarea",{"onUpdate:modelValue":s[3]||(s[3]=u=>t.value=u),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,t.value]])]),i("button",{"rounded-lg":"",bg:"blue-100 dark:blue-900","px-4":"","py-2":"",onClick:g}," Send "),i("div",null,[(y(!0),h(q,null,z(d.value,(u,b)=>(y(),h("div",{key:b},[u.role==="user"?(y(),h("div",se,[i("span",null,$(u.content),1)])):U("",!0),u.role==="assistant"?(y(),h("div",ue,[i("span",null,$(u.content),1)])):U("",!0)]))),128))])])]))}});export{fe as default}; +import{d as P,bG as W,r as S,c as h,o as y,a as i,G as C,bH as E,u as M,ag as A,bA as q,bB as z,x as D,i as U,t as $}from"./index-DCMFRrFG.js";import{s as H}from"./index-C4mUnpiM.js";import"./index-LHmcipjy.js";var O=()=>{let e=null;return{getStore:()=>(e===null&&console.warn("Woops! Looks like you are calling `getContext` after `await fn()`. Please move `getContext` to top level of handler."),e),run(r,o){e=r;try{return o()}finally{e=null}}}},K=new WeakMap,G=new WeakMap,I=0,T=0,_=e=>{const r=`${I++}`,o={include:t=>n.has(t),with:t=>{const d=`${T++}`,l={[Symbol.toStringTag]:`WorkflowEvent(${r}.${d})`,toString:()=>`WorkflowEvent(${r}.${d})`,toJSON:()=>({event:r,data:t}),get data(){return t}};return n.add(l),Object.freeze(l),G.set(l,o),l}},n=new WeakSet;return K.set(o,n),Object.defineProperty(o,Symbol.toStringTag,{get:()=>`WorkflowEvent<${r}>`}),Object.defineProperty(o,"displayName",{value:`WorkflowEvent<${r}>`}),o.toString=()=>`WorkflowEvent<${r}>`,Object.freeze(o),o},j=e=>e!=null&&typeof e=="object"&&"data"in e,F=e=>e!=null&&typeof e.then=="function";function R(e,r){const o=new Array(e.length);for(const n of r)for(let t=0;t{const r=[],o=(a,f,p)=>{let c;const g={get abortController(){return c||(c=new AbortController),c},handler:a,inputs:f,outputs:[],prev:p,next:new Set};g.prev.next.add(g);const v=d(g);J.run(g,()=>{const s=[...new Set([...x.__internal__call_context,...v.__internal__call_context])];N.run(v,()=>{let u=0;const b=()=>{if(u===s.length){let k;try{k=a(...f)}catch(m){if(c??l)(c??l).abort(m);else throw console.error("unhandled error in handler",m),m}F(k)?k.then(m=>{j(m)&&v.sendEvent(m)}):j(k)&&v.sendEvent(k)}const L=s[u];L&&(u++,L(v,f,b))};b()})})},n=a=>{const f=[...r];[...e].filter(([p])=>R(p,f).length===p.length).map(([p,c])=>{const g=R(p,f);g.forEach(v=>{r.splice(r.indexOf(v),1)});for(const v of c)o(v.handler,g,a)})},t=[],d=a=>({get stream(){let f;return new ReadableStream({start:async p=>{f=c=>{let g=B.get(c);for(;g;){if(g===a){p.enqueue(c);break}g=g.prev}},t.push(f)}})},get signal(){return a.abortController.signal},sendEvent:(...f)=>{f.forEach(p=>{B.set(p,a),a.outputs.push(p),r.push(p),t.forEach(c=>c(p)),n(a)})},__internal__call_context:new Set});let l=new AbortController;const x=d({get abortController(){return l||(l=new AbortController),l},inputs:[],outputs:[],handler:null,prev:null,next:new Set});return x};function X(){const e={steps:new Map};return{handle:(r,o)=>{if(e.steps.has(r)){const n=e.steps.get(r),t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),t}else{const n=new Set,t={get handler(){return o},unsubscribe:()=>{n.delete(t),n.size===0&&e.steps.delete(r)}};return n.add(t),e.steps.set(r,n),t}},createContext(){return Q({listeners:e.steps})}}}async function Y(e,r,o){const{stream:n,sendEvent:t}=e.createContext();t(r);for await(const d of n)if(o.include(d))return d;throw new Error("Workflow did not return a stop event")}function Z(e,r){const o=(...n)=>{const t=r.filter(([w])=>w.every((x,a)=>x.include(n[a]))).map(([w,x])=>x),l=V().sendEvent;return(...w)=>{let x=!1;for(let a=0;ap.include(w[c]))){x=!0;break}}return x&&console.warn("Invalid input detected [%s]",w.map(a=>a.data).join(", ")),l(...w)}};return{...e,handle:(n,t)=>{const d=(...l)=>{const w=V();return t(w.safeSendEvent,...l)};return e.handle(n,d)},createContext(){const n=e.createContext();return n.__internal__call_context.add((t,d,l)=>{t.safeSendEvent=o(...d),l()}),n}}}const ee={flex:"","flex-col":"","gap-2":""},te={flex:"~ col","gap-2":""},ne={flex:"","flex-col":"","gap-2":""},re={grid:"","grid-cols-2":"","gap-2":""},oe={flex:"","items-center":"","gap-2":""},ae={flex:"","items-center":"","gap-2":""},le={flex:"","items-center":"","gap-2":""},se={key:0},ue={key:1},fe=P({__name:"chat",setup(e){const r=W("settings/llm/baseUrl","https://openrouter.ai/api/v1/"),o=W("settings/llm/apiKey",""),n=W("settings/llm/model","openai/gpt-4o-mini"),t=S(""),d=S([]),l=S({role:"assistant",content:""}),w=S(!1),x=_(),a=_(),f=_(),p=_(),c=_();async function g(){w.value=!0;try{const v=Z(X(),[[[x],[a,c]],[[a],[f]],[[f],[p]]]);v.handle([x],async s=>{l.value={role:"assistant",content:""},d.value.push({role:"user",content:t.value}),d.value.push(l.value);const u=await H({baseURL:r.value,apiKey:o.value,model:n.value,messages:d.value.slice(0,d.value.length-1).map(b=>D(b))});for await(const b of u.chunkStream)s(a.with(b.choices[0].delta.content||""));return c.with()}),v.handle([a],async(s,u)=>{l.value.content?l.value.content+=u.data:l.value.content=u.data}),await Y(v,x.with(),c)}catch(v){console.error(v)}finally{w.value=!1}}return(v,s)=>(y(),h("div",ee,[i("div",te,[i("div",ne,[s[7]||(s[7]=i("div",null,[i("span",{"text-neutral-500":"","dark:text-neutral-400":""},"LLM")],-1)),i("div",re,[i("label",oe,[s[4]||(s[4]=i("span",{"text-nowrap":""}," Base URL ",-1)),C(i("input",{"onUpdate:modelValue":s[0]||(s[0]=u=>A(r)?r.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(r)]])]),i("label",ae,[s[5]||(s[5]=i("span",{"text-nowrap":""}," API Key ",-1)),C(i("input",{"onUpdate:modelValue":s[1]||(s[1]=u=>A(o)?o.value=u:null),type:"password",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(o)]])]),i("label",le,[s[6]||(s[6]=i("span",{"text-nowrap":""}," Model ",-1)),C(i("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>A(n)?n.value=u:null),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,M(n)]])])])]),i("div",null,[C(i("textarea",{"onUpdate:modelValue":s[3]||(s[3]=u=>t.value=u),border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",text:"disabled:neutral-400 dark:disabled:neutral-600",cursor:"disabled:not-allowed","w-full":"","rounded-lg":"","px-2":"","py-1":"","text-nowrap":"","text-sm":"","outline-none":"",shadow:"sm",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900"},null,512),[[E,t.value]])]),i("button",{"rounded-lg":"",bg:"blue-100 dark:blue-900","px-4":"","py-2":"",onClick:g}," Send "),i("div",null,[(y(!0),h(q,null,z(d.value,(u,b)=>(y(),h("div",{key:b},[u.role==="user"?(y(),h("div",se,[i("span",null,$(u.content),1)])):U("",!0),u.role==="assistant"?(y(),h("div",ue,[i("span",null,$(u.content),1)])):U("",!0)]))),128))])])]))}});export{fe as default}; diff --git a/assets/cloudflare-workers-ai-BUu3BYqf.js b/assets/cloudflare-workers-ai-BLel_peE.js similarity index 81% rename from assets/cloudflare-workers-ai-BUu3BYqf.js rename to assets/cloudflare-workers-ai-BLel_peE.js index d6bc95857e6526af6e4e4b2cab54f446182ba2bc..e8bddb721e7ee31b11c6ecaeb33b7fa08c83b9ad 100644 --- a/assets/cloudflare-workers-ai-BUu3BYqf.js +++ b/assets/cloudflare-workers-ai-BLel_peE.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as V,bK as y,bL as K,m as I,o as h,u as l,k as M,h as $,s as q,l as v,f as x,w as P,E as f,b as c}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const S=V({__name:"ProviderAccountIdInput",props:y({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=K(p,"modelValue");return(n,e)=>(h(),I(l(A),{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),label:r.label||"Account ID",description:r.description||"Account ID",placeholder:r.placeholder,required:r.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}}),a="cloudflare-workers-ai",U=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=M(),u=$(),n=z(),{providers:e}=q(n),t=v(()=>n.getProviderMetadata(a)),s=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.apiKey)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].apiKey=o}}),d=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.accountId)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].accountId=o}});x(()=>{var o,i;n.initializeProvider(a),s.value=((o=e.value[a])==null?void 0:o.apiKey)||"",d.value=((i=e.value[a])==null?void 0:i.accountId)||""}),P([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function w(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,b;return h(),I(l(R),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(b=t.value)==null?void 0:b.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(C),null,{default:f(()=>[c(l(N),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:f(()=>{var g;return[c(l(B),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(g=t.value)==null?void 0:g.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(S),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=m=>d.value=m),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof k=="function"&&k(U);export{U as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as V,bK as y,bL as K,m as I,o as h,u as l,k as M,h as $,s as q,l as v,f as x,w as P,E as f,b as c}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as A}from"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import{_ as B}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as C,a as N}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as R}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as k}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const S=V({__name:"ProviderAccountIdInput",props:y({placeholder:null,required:{type:Boolean},label:null,description:null},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const r=p,u=K(p,"modelValue");return(n,e)=>(h(),I(l(A),{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),label:r.label||"Account ID",description:r.description||"Account ID",placeholder:r.placeholder,required:r.required,type:"text"},null,8,["modelValue","label","description","placeholder","required"]))}}),a="cloudflare-workers-ai",U=V({__name:"cloudflare-workers-ai",setup(p){const{t:r}=M(),u=$(),n=z(),{providers:e}=q(n),t=v(()=>n.getProviderMetadata(a)),s=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.apiKey)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].apiKey=o}}),d=v({get:()=>{var o;return((o=e.value[a])==null?void 0:o.accountId)||""},set:o=>{e.value[a]||(e.value[a]={}),e.value[a].accountId=o}});x(()=>{var o,i;n.initializeProvider(a),s.value=((o=e.value[a])==null?void 0:o.apiKey)||"",d.value=((i=e.value[a])==null?void 0:i.accountId)||""}),P([s,d],()=>{e.value[a]={...e.value[a],apiKey:s.value,accountId:d.value}});function w(){var o;e.value[a]={...(o=t.value)==null?void 0:o.defaultOptions}}return(o,i)=>{var _,b;return h(),I(l(R),{"provider-name":(_=t.value)==null?void 0:_.localizedName,"provider-icon-color":(b=t.value)==null?void 0:b.iconColor,"on-back":()=>l(u).back()},{default:f(()=>[c(l(C),null,{default:f(()=>[c(l(N),{title:l(r)("settings.pages.providers.common.section.basic.title"),description:l(r)("settings.pages.providers.common.section.basic.description"),"on-reset":w},{default:f(()=>{var g;return[c(l(B),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=m=>s.value=m),"provider-name":(g=t.value)==null?void 0:g.localizedName,placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.api-key.placeholder")},null,8,["modelValue","provider-name","placeholder"]),c(l(S),{modelValue:d.value,"onUpdate:modelValue":i[1]||(i[1]=m=>d.value=m),label:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.label"),description:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.description"),placeholder:l(r)("settings.pages.providers.provider.cloudflare-workers-ai.fields.field.account-id.placeholder")},null,8,["modelValue","label","description","placeholder"])]}),_:1},8,["title","description"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof k=="function"&&k(U);export{U as default}; diff --git a/assets/consciousness-Bdu7qyU-.js b/assets/consciousness-BqrnV6uz.js similarity index 93% rename from assets/consciousness-Bdu7qyU-.js rename to assets/consciousness-BqrnV6uz.js index b589c34712f900f2e677e25dc5262ac133ef0be5..b6a8595147f6321fd1500fb1383b34442711a445 100644 --- a/assets/consciousness-Bdu7qyU-.js +++ b/assets/consciousness-BqrnV6uz.js @@ -1 +1 @@ -import{d as R,s as b,k as z,f as B,bz as U,c as r,o as n,a as e,G as h,i as f,t as i,u as s,bA as k,bB as D,b as q,E,br as T,m as y,ag as u,bH as j}from"./index-5LjD1Eoi.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as A}from"./consciousness-D7jKnAf3.js";import{u as F}from"./providers-CIeQW25J.js";/* empty css */import{R as G,a as Q}from"./RadioCardSimple-D24jggBz.js";import{b as M}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const H={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},I={flex:"~ col gap-4"},J={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},K={text:"neutral-400 dark:neutral-400"},O={"max-w-full":""},W={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},X={key:1},Y={key:0},Z={flex:"~ col gap-4"},$={class:"text-lg md:text-2xl"},ee={text:"neutral-400 dark:neutral-400"},se={key:0,class:"flex items-center justify-center py-4"},te={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},oe={class:"flex flex-col"},ie={class:"font-medium"},ne={class:"text-sm text-red-600 dark:text-red-400"},le={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},re={class:"flex flex-col"},de={class:"font-medium"},ae={class:"text-sm text-amber-600 dark:text-amber-400"},ce={key:1},ue={flex:"~ col gap-4"},pe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},me={text:"neutral-400 dark:neutral-500"},xe={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},ve={class:"flex flex-col"},ge={class:"font-medium"},_e={class:"dark:text-primary-400 text-primary-600 text-sm"},be={class:"mt-2"},he={class:"mb-1 block text-sm font-medium"},fe=["placeholder"],ke={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},ye=R({__name:"consciousness",setup(Me){const w=F(),m=A(),{availableProviders:V,availableTextGenerationsProvidersMetadata:C}=b(w),{activeProvider:d,activeModel:a,customModelName:P,modelSearchQuery:c,supportsModelListing:x,providerModels:p,isLoadingActiveProviderModels:v,activeProviderModelError:g}=b(m),{t}=z();B(async()=>{await m.loadModelsForProvider(d.value)});function S(_){P.value=_}return(_,o)=>{const N=U("motion");return n(),r(k,null,[e("div",H,[e("div",null,[e("div",I,[e("div",null,[e("h2",J,i(s(t)("settings.pages.providers.title")),1),e("div",K,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",O,[s(V).length>0?(n(),r("fieldset",W,[(n(!0),r(k,null,D(s(C),l=>(n(),y(s(Q),{id:l.id,key:l.id,modelValue:s(d),"onUpdate:modelValue":o[0]||(o[0]=L=>u(d)?d.value=L:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),r("div",X,[q(s(T),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:E(()=>o[4]||(o[4]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(d)&&s(x)?(n(),r("div",Y,[e("div",Z,[e("div",null,[e("h2",$,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",ee,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(n(),r("div",se,[o[5]||(o[5]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(g)?(n(),r("div",te,[o[6]||(o[6]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",oe,[e("span",ie,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",ne,i(s(g)),1)])])):s(p).length===0&&!s(v)?(n(),r("div",le,[o[7]||(o[7]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",re,[e("span",de,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ae,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(p).length>0?(n(),y(s(G),{key:3,modelValue:s(a),"onUpdate:modelValue":o[1]||(o[1]=l=>u(a)?a.value=l:null),"search-query":s(c),"onUpdate:searchQuery":o[2]||(o[2]=l=>u(c)?c.value=l:null),items:s(p),searchable:!0,"search-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":S},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):f("",!0)])])):s(d)&&!s(x)?(n(),r("div",ce,[e("div",ue,[e("div",null,[e("h2",pe,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",me,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",xe,[o[8]||(o[8]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ve,[e("span",ge,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",_e,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",be,[e("label",he,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),h(e("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>u(a)?a.value=l:null),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900",placeholder:s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,fe),[[j,s(a)]])])])])):f("",!0)]),h((n(),r("div",ke,o[9]||(o[9]=[e("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof M=="function"&&M(ye);export{ye as default}; +import{d as R,s as b,k as z,f as B,bz as U,c as r,o as n,a as e,G as h,i as f,t as i,u as s,bA as k,bB as D,b as q,E,br as T,m as y,ag as u,bH as j}from"./index-DCMFRrFG.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as A}from"./consciousness-DGPhIG2M.js";import{u as F}from"./providers-DHuI5XmA.js";/* empty css */import{R as G,a as Q}from"./RadioCardSimple-_IHIrHb5.js";import{b as M}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const H={bg:"neutral-50 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4"},I={flex:"~ col gap-4"},J={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-500"},K={text:"neutral-400 dark:neutral-400"},O={"max-w-full":""},W={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},X={key:1},Y={key:0},Z={flex:"~ col gap-4"},$={class:"text-lg md:text-2xl"},ee={text:"neutral-400 dark:neutral-400"},se={key:0,class:"flex items-center justify-center py-4"},te={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},oe={class:"flex flex-col"},ie={class:"font-medium"},ne={class:"text-sm text-red-600 dark:text-red-400"},le={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},re={class:"flex flex-col"},de={class:"font-medium"},ae={class:"text-sm text-amber-600 dark:text-amber-400"},ce={key:1},ue={flex:"~ col gap-4"},pe={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},me={text:"neutral-400 dark:neutral-500"},xe={class:"bg-primary-50 border-primary-200 dark:bg-primary-900/20 dark:border-primary-800 flex items-center gap-3 border rounded-lg p-4"},ve={class:"flex flex-col"},ge={class:"font-medium"},_e={class:"dark:text-primary-400 text-primary-600 text-sm"},be={class:"mt-2"},he={class:"mb-1 block text-sm font-medium"},fe=["placeholder"],ke={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},ye=R({__name:"consciousness",setup(Me){const w=F(),m=A(),{availableProviders:V,availableTextGenerationsProvidersMetadata:C}=b(w),{activeProvider:d,activeModel:a,customModelName:P,modelSearchQuery:c,supportsModelListing:x,providerModels:p,isLoadingActiveProviderModels:v,activeProviderModelError:g}=b(m),{t}=z();B(async()=>{await m.loadModelsForProvider(d.value)});function S(_){P.value=_}return(_,o)=>{const N=U("motion");return n(),r(k,null,[e("div",H,[e("div",null,[e("div",I,[e("div",null,[e("h2",J,i(s(t)("settings.pages.providers.title")),1),e("div",K,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.description")),1)])]),e("div",O,[s(V).length>0?(n(),r("fieldset",W,[(n(!0),r(k,null,D(s(C),l=>(n(),y(s(Q),{id:l.id,key:l.id,modelValue:s(d),"onUpdate:modelValue":o[0]||(o[0]=L=>u(d)?d.value=L:null),name:"provider",value:l.id,title:l.localizedName,description:l.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(n(),r("div",X,[q(s(T),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:E(()=>o[4]||(o[4]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your LLM providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])])]),s(d)&&s(x)?(n(),r("div",Y,[e("div",Z,[e("div",null,[e("h2",$,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",ee,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),s(v)?(n(),r("div",se,[o[5]||(o[5]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):s(g)?(n(),r("div",te,[o[6]||(o[6]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",oe,[e("span",ie,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",ne,i(s(g)),1)])])):s(p).length===0&&!s(v)?(n(),r("div",le,[o[7]||(o[7]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",re,[e("span",de,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",ae,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):s(p).length>0?(n(),y(s(G),{key:3,modelValue:s(a),"onUpdate:modelValue":o[1]||(o[1]=l=>u(a)?a.value=l:null),"search-query":s(c),"onUpdate:searchQuery":o[2]||(o[2]=l=>u(c)?c.value=l:null),items:s(p),searchable:!0,"search-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:s(c)}),"search-results-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":S},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):f("",!0)])])):s(d)&&!s(x)?(n(),r("div",ce,[e("div",ue,[e("div",null,[e("h2",pe,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",me,[e("span",null,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),e("div",xe,[o[8]||(o[8]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-primary-500 dark:text-primary-400 text-2xl"},null,-1)),e("div",ve,[e("span",ge,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported")),1),e("span",_e,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.not_supported_description")),1)])]),e("div",be,[e("label",he,i(s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_name")),1),h(e("input",{"onUpdate:modelValue":o[3]||(o[3]=l=>u(a)?a.value=l:null),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900",placeholder:s(t)("settings.pages.modules.consciousness.sections.section.provider-model-selection.manual_model_placeholder")},null,8,fe),[[j,s(a)]])])])])):f("",!0)]),h((n(),r("div",ke,o[9]||(o[9]=[e("div",{text:"60","i-solar:ghost-bold-duotone":""},null,-1)]))),[[N]])],64)}}});typeof M=="function"&&M(ye);export{ye as default}; diff --git a/assets/consciousness-D7jKnAf3.js b/assets/consciousness-DGPhIG2M.js similarity index 90% rename from assets/consciousness-D7jKnAf3.js rename to assets/consciousness-DGPhIG2M.js index 0584d41e428cfa549f3dd2c15bbd1d4f0bc0dd73..4eafc0c1a94ce3fe4b01dbcc06823662b69c149c 100644 --- a/assets/consciousness-D7jKnAf3.js +++ b/assets/consciousness-DGPhIG2M.js @@ -1 +1 @@ -import{v as P,bG as n,r as M,l as r,w as L}from"./index-5LjD1Eoi.js";import{u as w}from"./providers-CIeQW25J.js";const h=P("consciousness",()=>{const o=w(),s=n("settings/consciousness/active-provider",""),c=n("settings/consciousness/active-model",""),d=n("settings/consciousness/active-custom-model",""),l=M({}),i=M(""),m=r(()=>{var e;return((e=o.getProviderMetadata(s.value))==null?void 0:e.capabilities.listModels)!==void 0}),a=r(()=>o.getModelsForProvider(s.value)),p=r(()=>o.isLoadingModels[s.value]||!1),f=r(()=>o.modelLoadError[s.value]||null),g=r(()=>{if(!i.value.trim())return a.value;const e=i.value.toLowerCase().trim();return a.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function u(){c.value="",d.value="",l.value={},i.value=""}async function v(e){var t;e&&((t=o.getProviderMetadata(s.value))==null?void 0:t.capabilities.listModels)!==void 0&&o.getModelsForProvider(e).length===0&&await o.fetchModelsForProvider(e)}return L(s,async e=>{await v(e),u()}),{activeProvider:s,activeModel:c,customModelName:d,expandedDescriptions:l,modelSearchQuery:i,supportsModelListing:m,providerModels:a,isLoadingActiveProviderModels:p,activeProviderModelError:f,filteredModels:g,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; +import{v as P,bG as n,r as M,l as r,w as L}from"./index-DCMFRrFG.js";import{u as w}from"./providers-DHuI5XmA.js";const h=P("consciousness",()=>{const o=w(),s=n("settings/consciousness/active-provider",""),c=n("settings/consciousness/active-model",""),d=n("settings/consciousness/active-custom-model",""),l=M({}),i=M(""),m=r(()=>{var e;return((e=o.getProviderMetadata(s.value))==null?void 0:e.capabilities.listModels)!==void 0}),a=r(()=>o.getModelsForProvider(s.value)),p=r(()=>o.isLoadingModels[s.value]||!1),f=r(()=>o.modelLoadError[s.value]||null),g=r(()=>{if(!i.value.trim())return a.value;const e=i.value.toLowerCase().trim();return a.value.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.description&&t.description.toLowerCase().includes(e))});function u(){c.value="",d.value="",l.value={},i.value=""}async function v(e){var t;e&&((t=o.getProviderMetadata(s.value))==null?void 0:t.capabilities.listModels)!==void 0&&o.getModelsForProvider(e).length===0&&await o.fetchModelsForProvider(e)}return L(s,async e=>{await v(e),u()}),{activeProvider:s,activeModel:c,customModelName:d,expandedDescriptions:l,modelSearchQuery:i,supportsModelListing:m,providerModels:a,isLoadingActiveProviderModels:p,activeProviderModelError:f,filteredModels:g,resetModelSelection:u,loadModelsForProvider:v}});export{h as u}; diff --git a/assets/deepseek-CEOMgyK9.js b/assets/deepseek-DJRX_KJQ.js similarity index 68% rename from assets/deepseek-CEOMgyK9.js rename to assets/deepseek-DJRX_KJQ.js index 69ec7e972c9ed38cced9f04bf064ac90181f25f7..3ee423667f3e43608a5df90a762a776b7b83e096 100644 --- a/assets/deepseek-CEOMgyK9.js +++ b/assets/deepseek-DJRX_KJQ.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as U,k as V,h as y,s as $,l as c,f as K,w as h,m as w,o as x,E as u,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="deepseek",B=U({__name:"deepseek",setup(I){const{t:m}=V(),b=y(),d=z(),{providers:o}=$(d),n=c(()=>d.getProviderMetadata(a)),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,r;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),h([s,i],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:i.value||""}});function k(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":k},{default:u(()=>{var p;return[l(t(N),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=g=>s.value=g),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:i.value,"onUpdate:modelValue":r[1]||(r[1]=p=>i.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as U,k as V,h as y,s as $,l as c,f as K,w as h,m as w,o as x,E as u,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="deepseek",B=U({__name:"deepseek",setup(I){const{t:m}=V(),b=y(),d=z(),{providers:o}=$(d),n=c(()=>d.getProviderMetadata(a)),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,r;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",i.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),h([s,i],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:i.value||""}});function k(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":k},{default:u(()=>{var p;return[l(t(N),{modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=g=>s.value=g),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:i.value,"onUpdate:modelValue":r[1]||(r[1]=p=>i.value=p),placeholder:"https://api.deepseek.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/default-BAwuh7oV.js b/assets/default-Bb1hdJNb.js similarity index 89% rename from assets/default-BAwuh7oV.js rename to assets/default-Bb1hdJNb.js index fca1294c6f6d80cbd7ffbaf7bbaf6401b431fcef..587a5ce3427a27fe646593e3b492311f6edc4619 100644 --- a/assets/default-BAwuh7oV.js +++ b/assets/default-Bb1hdJNb.js @@ -1 +1 @@ -import{d as t,c as s,a as e,b as a,u as o,R as n,o as p}from"./index-5LjD1Eoi.js";import{H as d}from"./HeaderLink-Bp3oK7dP.js";const r={style:{paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingTop:"env(safe-area-inset-top, 0px)",paddingRight:"env(safe-area-inset-right, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)"}},i={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},c={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},u=t({__name:"default",setup(m){return(f,l)=>(p(),s("div",r,[e("div",i,[a(d)]),e("div",c,[a(o(n))])]))}});export{u as default}; +import{d as t,c as s,a as e,b as a,u as o,R as n,o as p}from"./index-DCMFRrFG.js";import{H as d}from"./HeaderLink-DPXtT-kx.js";const r={style:{paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingTop:"env(safe-area-inset-top, 0px)",paddingRight:"env(safe-area-inset-right, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)"}},i={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},c={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},u=t({__name:"default",setup(m){return(f,l)=>(p(),s("div",r,[e("div",i,[a(d)]),e("div",c,[a(o(n))])]))}});export{u as default}; diff --git a/assets/default-node-CUehHPTd.js b/assets/default-node-E6uRkI3P.js similarity index 89% rename from assets/default-node-CUehHPTd.js rename to assets/default-node-E6uRkI3P.js index 4dc5466f891291c61d505f6b0abc0f4151771672..99cd4fa09c1a31c1c627123c8623c320c0f4eb78 100644 --- a/assets/default-node-CUehHPTd.js +++ b/assets/default-node-E6uRkI3P.js @@ -1 +1 @@ -import{ch as t}from"./index-5LjD1Eoi.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles}; +import{ch as t}from"./index-DCMFRrFG.js";async function s(){const{createRequire:a}=await t(async()=>{const{createRequire:o}=await import("./__vite-browser-external-FmFgRqLi.js");return{createRequire:o}},[]),{dirname:n,resolve:e}=await t(async()=>{const{dirname:o,resolve:c}=await import("./__vite-browser-external-FmFgRqLi.js");return{dirname:o,resolve:c}},[]),d=a(import.meta.url),r=n(d.resolve("@duckdb/duckdb-wasm"));return{mvp:{mainModule:e(r,"./duckdb-mvp.wasm"),mainWorker:e(r,"./duckdb-node-mvp.worker.cjs")},eh:{mainModule:e(r,"./duckdb-eh.wasm"),mainWorker:e(r,"./duckdb-node-eh.worker.cjs")}}}export{s as getBundles}; diff --git a/assets/delays-Dt1XFqWS.js b/assets/delays-C8Nh_P2J.js similarity index 78% rename from assets/delays-Dt1XFqWS.js rename to assets/delays-C8Nh_P2J.js index 45503461bc1990df54dff49c259241f12ded09f8..8cbf579b86acbcc04a4479cb4ef89cf7b58f4d3b 100644 --- a/assets/delays-Dt1XFqWS.js +++ b/assets/delays-C8Nh_P2J.js @@ -1 +1 @@ -import"./index-BLNYI9W3.js";import{b as g,l as _}from"./queues-L5OE-bsn.js";import"./three-vrm-animation.module-C_NwwsBw.js";/* empty css */import{_ as b}from"./Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js";import{d as k,r,c as n,o as t,a as e,b as y,u as x,t as i,bA as f,bB as m}from"./index-5LjD1Eoi.js";import"./emotions-CAex_2dA.js";import"./queue-D8d866Tb.js";import"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},h={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},B={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},E={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},L=k({__name:"delays",setup(S){const s=r(""),c=r([]),p=r([]),u=r(!1),d=g();d.onHandlerEvent("delay",a=>{p.value.push(a)});function v(){u.value=!0;const a=s.value.split("");for(const o of a)d.add(o);d.add(_),s.value="",u.value=!1}return(a,o)=>(t(),n("div",w,[e("div",h,[y(x(b),{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value=l),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",M,i(u.value?"Processing...":"Send"),1)]),e("div",V,[e("div",B,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(t(!0),n(f,null,m(c.value,l=>(t(),n("div",{key:l},[e("div",null,i(l),1)]))),128))]),e("div",E,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(t(!0),n(f,null,m(p.value,l=>(t(),n("div",{key:l},[e("div",null,i(l)+"s",1)]))),128))])])]))}});export{L as default}; +import"./index-DT9YP6z9.js";import{b as g,l as _}from"./queues-xZ787FAF.js";import"./three-vrm-animation.module-BGS11oHQ.js";/* empty css */import{_ as b}from"./Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js";import{d as k,r,c as n,o as t,a as e,b as y,u as x,t as i,bA as f,bB as m}from"./index-DCMFRrFG.js";import"./emotions-CAex_2dA.js";import"./queue-DDsFBepK.js";import"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";const w={flex:"","flex-col":"","gap-2":"","p-2":""},h={flex:"","flex-row":"","gap-2":""},M={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"",flex:"","flex-row":"","gap-4":""},B={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},E={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},L=k({__name:"delays",setup(S){const s=r(""),c=r([]),p=r([]),u=r(!1),d=g();d.onHandlerEvent("delay",a=>{p.value.push(a)});function v(){u.value=!0;const a=s.value.split("");for(const o of a)d.add(o);d.add(_),s.value="",u.value=!1}return(a,o)=>(t(),n("div",w,[e("div",h,[y(x(b),{modelValue:s.value,"onUpdate:modelValue":o[0]||(o[0]=l=>s.value=l),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",M,i(u.value?"Processing...":"Send"),1)]),e("div",V,[e("div",B,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Emotion Message ",-1)),(t(!0),n(f,null,m(c.value,l=>(t(),n("div",{key:l},[e("div",null,i(l),1)]))),128))]),e("div",E,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Delays ",-1)),(t(!0),n(f,null,m(p.value,l=>(t(),n("div",{key:l},[e("div",null,i(l)+"s",1)]))),128))])])]))}});export{L as default}; diff --git a/assets/elevenlabs-DaUCWrgU.js b/assets/elevenlabs-CH5uoIl4.js similarity index 81% rename from assets/elevenlabs-DaUCWrgU.js rename to assets/elevenlabs-CH5uoIl4.js index 7dd30795d0d64ee333bc90818dc9bd7ec617414f..bcd43efd082167860232611ed042fee2f2ea319d 100644 --- a/assets/elevenlabs-DaUCWrgU.js +++ b/assets/elevenlabs-CH5uoIl4.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as h,r as n,s as F,k as E,l as k,f as I,w as r,m as K,o as L,E as x,b as d,u as o,a as N}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as T}from"./providers-CIeQW25J.js";import{u as z}from"./speech-BYL-UWPg.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js";/* empty css */import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";const j={flex:"~ col gap-4"},l="elevenlabs",_="eleven_multilingual_v2",q=h({__name:"elevenlabs",setup(A){const V={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},v=n(0),m=n(1),u=n(0),f=n(0),c=n(.5),g=n(.75),b=n(!1),y=z(),t=T(),{providers:C}=F(t),{t:a}=E(),B=k(()=>{var e;return!!((e=C.value[l])!=null&&e.apiKey)}),M=k(()=>y.availableVoices[l]||[]);async function U(e,i,s){const P=t.getProviderInstance(l);if(!P)throw new Error("Failed to initialize speech provider");const S=t.getProviderConfig(l),$=S.model||_;return await y.speech(P,$,e,i,{...S,...V})}return I(async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)}),r(v,async()=>{const e=t.getProviderConfig(l);e.pitch=v.value}),r(m,async()=>{const e=t.getProviderConfig(l);e.speed=m.value}),r(u,async()=>{const e=t.getProviderConfig(l);e.volume=u.value}),r(f,async()=>{const e=t.getProviderConfig(l);e.style=f.value}),r(c,async()=>{const e=t.getProviderConfig(l);e.stability=c.value}),r(g,async()=>{const e=t.getProviderConfig(l);e.similarityBoost=g.value}),r(b,async()=>{const e=t.getProviderConfig(l);e.useSpeakerBoost=b.value}),r(C,async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(L(),K(o(R),{"provider-id":l,"default-model":_,"additional-settings":V},{"voice-settings":x(()=>[N("div",j,[d(o(p),{modelValue:v.value,"onUpdate:modelValue":i[0]||(i[0]=s=>v.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=s=>m.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.speed.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:u.value,"onUpdate:modelValue":i[2]||(i[2]=s=>u.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.volume.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=s=>f.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:c.value,"onUpdate:modelValue":i[4]||(i[4]=s=>c.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:g.value,"onUpdate:modelValue":i[5]||(i[5]=s=>g.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(G),{modelValue:b.value,"onUpdate:modelValue":i[6]||(i[6]=s=>b.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])])]),playground:x(()=>[d(o(H),{"available-voices":M.value,"generate-speech":U,"api-key-configured":B.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof w=="function"&&w(q);export{q as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as h,r as n,s as F,k as E,l as k,f as I,w as r,m as K,o as L,E as x,b as d,u as o,a as N}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as T}from"./providers-DHuI5XmA.js";import{u as z}from"./speech-Bc-BAopv.js";import{_ as p,a as G}from"./FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js";/* empty css */import{_ as H,a as R}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js";import{b as w}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";const j={flex:"~ col gap-4"},l="elevenlabs",_="eleven_multilingual_v2",q=h({__name:"elevenlabs",setup(A){const V={similarityBoost:.75,stability:.5,speed:1,style:0,useSpeakerBoost:!0},v=n(0),m=n(1),u=n(0),f=n(0),c=n(.5),g=n(.75),b=n(!1),y=z(),t=T(),{providers:C}=F(t),{t:a}=E(),B=k(()=>{var e;return!!((e=C.value[l])!=null&&e.apiKey)}),M=k(()=>y.availableVoices[l]||[]);async function U(e,i,s){const P=t.getProviderInstance(l);if(!P)throw new Error("Failed to initialize speech provider");const S=t.getProviderConfig(l),$=S.model||_;return await y.speech(P,$,e,i,{...S,...V})}return I(async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)}),r(v,async()=>{const e=t.getProviderConfig(l);e.pitch=v.value}),r(m,async()=>{const e=t.getProviderConfig(l);e.speed=m.value}),r(u,async()=>{const e=t.getProviderConfig(l);e.volume=u.value}),r(f,async()=>{const e=t.getProviderConfig(l);e.style=f.value}),r(c,async()=>{const e=t.getProviderConfig(l);e.stability=c.value}),r(g,async()=>{const e=t.getProviderConfig(l);e.similarityBoost=g.value}),r(b,async()=>{const e=t.getProviderConfig(l);e.useSpeakerBoost=b.value}),r(C,async()=>{const e=t.getProviderConfig(l);await t.getProviderMetadata(l).validators.validateProviderConfig(e)?await y.loadVoicesForProvider(l):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(L(),K(o(R),{"provider-id":l,"default-model":_,"additional-settings":V},{"voice-settings":x(()=>[N("div",j,[d(o(p),{modelValue:v.value,"onUpdate:modelValue":i[0]||(i[0]=s=>v.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=s=>m.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.speed.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:u.value,"onUpdate:modelValue":i[2]||(i[2]=s=>u.value=s),label:o(a)("settings.pages.providers.provider.common.fields.field.volume.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":s=>`${s}%`},null,8,["modelValue","label","description","format-value"]),d(o(p),{modelValue:f.value,"onUpdate:modelValue":i[3]||(i[3]=s=>f.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.style.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:c.value,"onUpdate:modelValue":i[4]||(i[4]=s=>c.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.stability.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(p),{modelValue:g.value,"onUpdate:modelValue":i[5]||(i[5]=s=>g.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.simularity-boost.description"),min:0,max:1,step:.01},null,8,["modelValue","label","description"]),d(o(G),{modelValue:b.value,"onUpdate:modelValue":i[6]||(i[6]=s=>b.value=s),label:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.label"),description:o(a)("settings.pages.providers.provider.elevenlabs.fields.field.speaker-boost.description")},null,8,["modelValue","label","description"])])]),playground:x(()=>[d(o(H),{"available-voices":M.value,"generate-speech":U,"api-key-configured":B.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof w=="function"&&w(q);export{q as default}; diff --git a/assets/emotions-CL6JuFTp.js b/assets/emotions-DY0lA_Uh.js similarity index 81% rename from assets/emotions-CL6JuFTp.js rename to assets/emotions-DY0lA_Uh.js index de798ea89c2be869b714a9d54c0d1668b2adc2c1..e9d93907e0fb721ef183744c924c2f3263c821a6 100644 --- a/assets/emotions-CL6JuFTp.js +++ b/assets/emotions-DY0lA_Uh.js @@ -1 +1 @@ -import{u as _}from"./queue-D8d866Tb.js";import{a as b,l as k}from"./queues-L5OE-bsn.js";/* empty css */import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js";import{d as h,r as u,c as s,o as t,a as e,b as w,u as M,t as d,bA as f,bB as p}from"./index-5LjD1Eoi.js";import"./emotions-CAex_2dA.js";import"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";const V={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},B={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},T=h({__name:"emotions",setup(P){const l=u(""),c=u([]),i=u([]),r=u(!1),g=_({handlers:[async a=>{i.value.push(a.data)}]}),m=b(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(k),l.value="",r.value=!1}return(a,o)=>(t(),s("div",V,[e("div",y,[w(M(x),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",B,d(r.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,p(c.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,p(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{T as default}; +import{u as _}from"./queue-DDsFBepK.js";import{a as b,l as k}from"./queues-xZ787FAF.js";/* empty css */import{_ as x}from"./Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js";import{d as h,r as u,c as s,o as t,a as e,b as w,u as M,t as d,bA as f,bB as p}from"./index-DCMFRrFG.js";import"./emotions-CAex_2dA.js";import"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";const V={flex:"","flex-col":"","gap-2":"","p-2":""},y={flex:"","flex-row":"","gap-2":""},B={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},E={"w-full":"",flex:"","flex-row":"","gap-4":""},Q={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},S={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},T=h({__name:"emotions",setup(P){const l=u(""),c=u([]),i=u([]),r=u(!1),g=_({handlers:[async a=>{i.value.push(a.data)}]}),m=b(g);function v(){r.value=!0;const a=l.value.split("");for(const o of a)m.add(o);m.add(k),l.value="",r.value=!1}return(a,o)=>(t(),s("div",V,[e("div",y,[w(M(x),{modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=n=>l.value=n),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:v},null,8,["modelValue"]),e("button",B,d(r.value?"Processing...":"Send"),1)]),e("div",E,[e("div",Q,[o[1]||(o[1]=e("h3",{"font-semibold":""}," Messages ",-1)),(t(!0),s(f,null,p(c.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))]),e("div",S,[o[2]||(o[2]=e("h3",{"font-semibold":""}," Emotions ",-1)),(t(!0),s(f,null,p(i.value,n=>(t(),s("div",{key:n},[e("div",null,d(n),1)]))),128))])])]))}});export{T as default}; diff --git a/assets/featherless-ai-DEpw2GD4.js b/assets/featherless-ai-BtKCHCM3.js similarity index 68% rename from assets/featherless-ai-DEpw2GD4.js rename to assets/featherless-ai-BtKCHCM3.js index 5ec44d1fbe89bbade785f36bbc69ce6057ab6f0f..649f888f42b113e06675beaf16fcba40b841fbc5 100644 --- a/assets/featherless-ai-DEpw2GD4.js +++ b/assets/featherless-ai-BtKCHCM3.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as k,k as U,h as V,s as y,l as v,f as $,w as K,m as w,o as x,E as u,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="featherless-ai",C=k({__name:"featherless-ai",setup(I){const{t:m}=U(),b=V(),d=z(),{providers:o}=y(d),n=v(()=>d.getProviderMetadata(a)),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=p=>r.value=p),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as k,k as U,h as V,s as y,l as v,f as $,w as K,m as w,o as x,E as u,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="featherless-ai",C=k({__name:"featherless-ai",setup(I){const{t:m}=U(),b=V(),d=z(),{providers:o}=y(d),n=v(()=>d.getProviderMetadata(a)),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=p=>r.value=p),placeholder:"https://api.featherless.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/filter-message-DkqUMahb.js b/assets/filter-message-C-jZFKv3.js similarity index 87% rename from assets/filter-message-DkqUMahb.js rename to assets/filter-message-C-jZFKv3.js index eb29b32147660c511b20f07e3e06d4890da3f274..f779c1dc1f71151ff122a1b7d40304f13cb070e8 100644 --- a/assets/filter-message-DkqUMahb.js +++ b/assets/filter-message-C-jZFKv3.js @@ -1 +1 @@ -/* empty css */import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js";import{d as g,r as c,c as v,o as _,a as s,b,u as x,t as d}from"./index-5LjD1Eoi.js";import"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},k={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},N=g({__name:"filter-message",setup(M){const o=c(""),u=c(!1),r=c({content:""});async function f(i){return new Promise(e=>setTimeout(e,i))}async function p(){u.value=!0;const i=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let t="literal",l="";for(const a of i){await f(50);let n=t;a==="<"?n="special":a===">"&&(n="literal"),t==="literal"&&n==="special"&&(r.value.content+=l,l=""),t==="special"&&n==="literal"&&(l=""),t==="literal"&&n==="literal"&&(r.value.content+=a,l=""),t=n}l&&(r.value.content+=l),o.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[s("div",k,[b(x(m),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",w,d(u.value?"Processing...":"Send"),1)]),s("div",V,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(r.value.content),1)])]))}});export{N as default}; +/* empty css */import{_ as m}from"./Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js";import{d as g,r as c,c as v,o as _,a as s,b,u as x,t as d}from"./index-DCMFRrFG.js";import"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},k={flex:"","flex-row":"","gap-2":""},w={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},V={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},N=g({__name:"filter-message",setup(M){const o=c(""),u=c(!1),r=c({content:""});async function f(i){return new Promise(e=>setTimeout(e,i))}async function p(){u.value=!0;const i=o.value.split("");let e;(a=>{a.Literal="literal",a.Special="special"})(e||(e={}));let t="literal",l="";for(const a of i){await f(50);let n=t;a==="<"?n="special":a===">"&&(n="literal"),t==="literal"&&n==="special"&&(r.value.content+=l,l=""),t==="special"&&n==="literal"&&(l=""),t==="literal"&&n==="literal"&&(r.value.content+=a,l=""),t=n}l&&(r.value.content+=l),o.value="",u.value=!1}return(i,e)=>(_(),v("div",S,[s("div",k,[b(x(m),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=t=>o.value=t),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:p},null,8,["modelValue"]),s("button",w,d(u.value?"Processing...":"Send"),1)]),s("div",V,[e[1]||(e[1]=s("h3",{"font-semibold":""}," Streaming Message ",-1)),s("div",null,d(r.value.content),1)])]))}});export{N as default}; diff --git a/assets/fireworks-ai-pAanQKa6.js b/assets/fireworks-ai-B3FRJ_5H.js similarity index 68% rename from assets/fireworks-ai-pAanQKa6.js rename to assets/fireworks-ai-B3FRJ_5H.js index fa71e5f77fe89b2e6143e8c524534a2c2a355309..8d8c0078cc27a40a3973c7efa6dd36091d9392e7 100644 --- a/assets/fireworks-ai-pAanQKa6.js +++ b/assets/fireworks-ai-B3FRJ_5H.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as w,k as U,h as V,s as y,l as c,f as $,w as K,m as h,o as x,E as u,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="fireworks-ai",C=w({__name:"fireworks-ai",setup(I){const{t:m}=U(),b=V(),d=z(),{providers:o}=y(d),n=c(()=>d.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),h(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as w,k as U,h as V,s as y,l as c,f as $,w as K,m as h,o as x,E as u,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="fireworks-ai",C=w({__name:"fireworks-ai",setup(I){const{t:m}=U(),b=V(),d=z(),{providers:o}=y(d),n=c(()=>d.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),h(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"fw-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.fireworks.ai/inference/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/google-generative-ai-BHkmDd8D.js b/assets/google-generative-ai-aFKQLVZT.js similarity index 73% rename from assets/google-generative-ai-BHkmDd8D.js rename to assets/google-generative-ai-aFKQLVZT.js index 335405e7cdcf9b085e48cfa63a73e33a94d6bb3b..cb0599682cdb2229ae5cd61f001fc1737ded3302 100644 --- a/assets/google-generative-ai-BHkmDd8D.js +++ b/assets/google-generative-ai-aFKQLVZT.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as U,k,h as V,s as y,l as v,f as $,w as K,m as w,o as x,E as p,b as r,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as G}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const e="google-generative-ai",C=U({__name:"google-generative-ai",setup(I){const{t:u}=k(),_=V(),c=G(),{providers:a}=y(c),m=v(()=>c.getProviderMetadata(e)),s=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),l=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});$(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",l.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),K([s,l],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:l.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function b(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return x(),w(t(B),{"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=m.value)==null?void 0:g.icon,"on-back":()=>t(_).back()},{default:p(()=>[r(t(S),null,{default:p(()=>[r(t(z),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[r(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":((n=m.value)==null?void 0:n.localizedName)||"Google",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(M),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[r(t(N),{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=n=>l.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof f=="function"&&f(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as U,k,h as V,s as y,l as v,f as $,w as K,m as w,o as x,E as p,b as r,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as G}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as f}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const e="google-generative-ai",C=U({__name:"google-generative-ai",setup(I){const{t:u}=k(),_=V(),c=G(),{providers:a}=y(c),m=v(()=>c.getProviderMetadata(e)),s=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),l=v({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});$(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.anthropic.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",l.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://generativelanguage.googleapis.com/v1beta/openai/"}),K([s,l],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:l.value||"https://generativelanguage.googleapis.com/v1beta/openai/"}});function b(){a.value[e]={baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"}}return(o,i)=>{var d,g;return x(),w(t(B),{"provider-name":((d=m.value)==null?void 0:d.localizedName)||"Google | Gemini","provider-icon":(g=m.value)==null?void 0:g.icon,"on-back":()=>t(_).back()},{default:p(()=>[r(t(S),null,{default:p(()=>[r(t(z),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:p(()=>{var n;return[r(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":((n=m.value)==null?void 0:n.localizedName)||"Google",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),r(t(M),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[r(t(N),{modelValue:l.value,"onUpdate:modelValue":i[1]||(i[1]=n=>l.value=n),placeholder:"https://generativelanguage.googleapis.com/v1beta/openai/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof f=="function"&&f(C);export{C as default}; diff --git a/assets/image-B7dDdCyb.js b/assets/image-457vStJH.js similarity index 95% rename from assets/image-B7dDdCyb.js rename to assets/image-457vStJH.js index d9c59885ae109a9bdab1b7ef396c081a8a3cc9f2..4f0dd723090d8b7933b86b730396e50062127919 100644 --- a/assets/image-B7dDdCyb.js +++ b/assets/image-457vStJH.js @@ -1,2 +1,2 @@ -import{d as _,r as c,bI as y,c as d,o as u,a,i as x,t as b,u as v,bq as w}from"./index-5LjD1Eoi.js";const h={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},C={key:0},U=["src"],R={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},k=_({__name:"image",setup(D){const p=c(),n=c(""),{copy:g}=y({source:n});async function m(s){return new Promise((e,o)=>{const t=new FileReader;t.onload=r=>{var l,i;e(((i=(l=r.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=r=>{o(r)},t.readAsDataURL(s)})}async function f(s){var t;const o=(t=s.target.files)==null?void 0:t[0];if(o){p.value=o;const r=await m(o);n.value=r}}return(s,e)=>(u(),d("div",null,[a("label",h,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),n.value?(u(),d("div",C,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",R," "+b(n.value)+` +import{d as _,r as c,bI as y,c as d,o as u,a,i as x,t as b,u as v,bq as w}from"./index-DCMFRrFG.js";const h={bg:"neutral-100",flex:"~ col","items-center":"","justify-center":"","rounded-lg":"","px-4":"","py-3":""},C={key:0},U=["src"],R={bg:"neutral-100",class:"text-wrap-any","max-h":"100","overflow-scroll":"","rounded-lg":"","text-wrap":"","text-black":"","font-mono":""},k=_({__name:"image",setup(D){const p=c(),n=c(""),{copy:g}=y({source:n});async function m(s){return new Promise((e,o)=>{const t=new FileReader;t.onload=r=>{var l,i;e(((i=(l=r.target)==null?void 0:l.result)==null?void 0:i.toString())||"")},t.onerror=r=>{o(r)},t.readAsDataURL(s)})}async function f(s){var t;const o=(t=s.target.files)==null?void 0:t[0];if(o){p.value=o;const r=await m(o);n.value=r}}return(s,e)=>(u(),d("div",null,[a("label",h,[a("input",{type:"file",accept:"image/*",hidden:"",onChange:f},null,32),e[1]||(e[1]=a("span",null,"Upload Image",-1))]),n.value?(u(),d("div",C,[a("img",{src:n.value,alt:"Uploaded Image","w-100":""},null,8,U),a("pre",R," "+b(n.value)+` `,1),a("button",{bg:"primary-500",text:"white","mt-4":"","rounded-lg":"","px-4":"","py-2":"",onClick:e[0]||(e[0]=()=>v(g)())}," Copy Data URL ")])):x("",!0)]))}}),I=w(k,[["__scopeId","data-v-7edd53e6"]]);export{I as default}; diff --git a/assets/index-D9G3cbGf.js b/assets/index-AE7leN3M.js similarity index 88% rename from assets/index-D9G3cbGf.js rename to assets/index-AE7leN3M.js index 51974ee7641de7cb3dd88de47fe2e8be9bcb93ff..dab7125274a953e58eebb3f031e305c70b0667f3 100644 --- a/assets/index-D9G3cbGf.js +++ b/assets/index-AE7leN3M.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as h,k as b,l as v,bz as k,c as t,o as i,a as c,m as d,G as m,bA as l,bB as _,u as s}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{I as x}from"./IconStatusItem-BHtW75ra.js";/* empty css */import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js";import{u as z}from"./useIconAnimation-BkxpLoyr.js";import{b as g}from"./route-block-B_A1xBdJ.js";const B={grid:"~ cols-1 sm:cols-2 gap-4"},A={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},w=h({__name:"index",setup(C){const{t:e}=b(),p=v(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-solar:ghost-bold-duotone",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-solar:user-speak-rounded-bold-duotone",to:"/settings/modules/speech",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-solar:microphone-3-bold-duotone",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-solar:eye-closed-bold-duotone",to:"",configured:!1},{id:"memory-short-term",name:e("settings.pages.modules.memory-short-term.title"),description:e("settings.pages.modules.memory-short-term.description"),icon:"i-solar:bookmark-bold-duotone",to:"/settings/modules/memory-short-term",configured:!1},{id:"memory-long-term",name:e("settings.pages.modules.memory-long-term.title"),description:e("settings.pages.modules.memory-long-term.description"),icon:"i-solar:book-bookmark-bold-duotone",to:"/settings/modules/memory-long-term",configured:!1},{id:"messaging-discord",name:e("settings.pages.modules.messaging-discord.title"),description:e("settings.pages.modules.messaging-discord.description"),icon:"i-simple-icons:discord",to:"",configured:!1},{id:"x",name:e("settings.pages.modules.x.title"),description:e("settings.pages.modules.x.description"),icon:"i-simple-icons:x",to:"",configured:!1},{id:"game-minecraft",name:e("settings.pages.modules.gaming-minecraft.title"),description:e("settings.pages.modules.gaming-minecraft.description"),iconColor:"i-vscode-icons:file-type-minecraft",to:"",configured:!1},{id:"game-factorio",name:e("settings.pages.modules.gaming-factorio.title"),description:e("settings.pages.modules.gaming-factorio.description"),iconImage:"",to:"",configured:!1}]),{iconAnimationStarted:u,showIconAnimation:f,animationIcon:y}=z("i-solar:layers-bold-duotone");return(D,n)=>{const r=k("motion");return i(),t(l,null,[c("div",B,[(i(!0),t(l,null,_(p.value,(o,a)=>m((i(),d(s(x),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*50,title:o.name,description:o.description,icon:o.icon,"icon-color":o.iconColor,"icon-image":o.iconImage,to:o.to,configured:o.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[r]])),128))]),s(f)?(i(),d(I,{key:0,icon:s(y),"icon-size":12,duration:1e3,started:s(u),"is-reverse":!0,"z-index":-1,"text-color":"text-neutral-200/50 dark:text-neutral-600/20",position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)"},null,8,["icon","started"])):m((i(),t("div",A,n[0]||(n[0]=[c("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[r]])],64)}}});typeof g=="function"&&g(w);export{w as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as h,k as b,l as v,bz as k,c as t,o as i,a as c,m as d,G as m,bA as l,bB as _,u as s}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{I as x}from"./IconStatusItem-TmDrxILn.js";/* empty css */import{_ as I}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js";import{u as z}from"./useIconAnimation-CvSuZDEE.js";import{b as g}from"./route-block-B_A1xBdJ.js";const B={grid:"~ cols-1 sm:cols-2 gap-4"},A={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},w=h({__name:"index",setup(C){const{t:e}=b(),p=v(()=>[{id:"consciousness",name:e("settings.pages.modules.consciousness.title"),description:e("settings.pages.modules.consciousness.description"),icon:"i-solar:ghost-bold-duotone",to:"/settings/modules/consciousness",configured:!1},{id:"speech",name:e("settings.pages.modules.speech.title"),description:e("settings.pages.modules.speech.description"),icon:"i-solar:user-speak-rounded-bold-duotone",to:"/settings/modules/speech",configured:!1},{id:"hearing",name:e("settings.pages.modules.hearing.title"),description:e("settings.pages.modules.hearing.description"),icon:"i-solar:microphone-3-bold-duotone",to:"",configured:!1},{id:"vision",name:e("settings.pages.modules.vision.title"),description:e("settings.pages.modules.vision.description"),icon:"i-solar:eye-closed-bold-duotone",to:"",configured:!1},{id:"memory-short-term",name:e("settings.pages.modules.memory-short-term.title"),description:e("settings.pages.modules.memory-short-term.description"),icon:"i-solar:bookmark-bold-duotone",to:"/settings/modules/memory-short-term",configured:!1},{id:"memory-long-term",name:e("settings.pages.modules.memory-long-term.title"),description:e("settings.pages.modules.memory-long-term.description"),icon:"i-solar:book-bookmark-bold-duotone",to:"/settings/modules/memory-long-term",configured:!1},{id:"messaging-discord",name:e("settings.pages.modules.messaging-discord.title"),description:e("settings.pages.modules.messaging-discord.description"),icon:"i-simple-icons:discord",to:"",configured:!1},{id:"x",name:e("settings.pages.modules.x.title"),description:e("settings.pages.modules.x.description"),icon:"i-simple-icons:x",to:"",configured:!1},{id:"game-minecraft",name:e("settings.pages.modules.gaming-minecraft.title"),description:e("settings.pages.modules.gaming-minecraft.description"),iconColor:"i-vscode-icons:file-type-minecraft",to:"",configured:!1},{id:"game-factorio",name:e("settings.pages.modules.gaming-factorio.title"),description:e("settings.pages.modules.gaming-factorio.description"),iconImage:"",to:"",configured:!1}]),{iconAnimationStarted:u,showIconAnimation:f,animationIcon:y}=z("i-solar:layers-bold-duotone");return(D,n)=>{const r=k("motion");return i(),t(l,null,[c("div",B,[(i(!0),t(l,null,_(p.value,(o,a)=>m((i(),d(s(x),{key:o.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+a*10,delay:a*50,title:o.name,description:o.description,icon:o.icon,"icon-color":o.iconColor,"icon-image":o.iconImage,to:o.to,configured:o.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[r]])),128))]),s(f)?(i(),d(I,{key:0,icon:s(y),"icon-size":12,duration:1e3,started:s(u),"is-reverse":!0,"z-index":-1,"text-color":"text-neutral-200/50 dark:text-neutral-600/20",position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)"},null,8,["icon","started"])):m((i(),t("div",A,n[0]||(n[0]=[c("div",{text:"60","i-solar:layers-bold-duotone":""},null,-1)]))),[[r]])],64)}}});typeof g=="function"&&g(w);export{w as default}; diff --git a/assets/index-CfAHq90W.js b/assets/index-BLy_7xCj.js similarity index 79% rename from assets/index-CfAHq90W.js rename to assets/index-BLy_7xCj.js index 315b0dc1f3c8701d4a3957b8185cbe975f652947..f0b8536c5325fa1c687c464237b3b9b7409ecfbf 100644 --- a/assets/index-CfAHq90W.js +++ b/assets/index-BLy_7xCj.js @@ -1 +1 @@ -import{d as i,bz as n,G as r,o as a,c as s,a as c}from"./index-5LjD1Eoi.js";import{b as t}from"./route-block-B_A1xBdJ.js";const l={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},d=i({__name:"index",setup(m){return(p,e)=>{const o=n("motion");return r((a(),s("div",l,e[0]||(e[0]=[c("div",{text:"60","i-solar:leaf-bold-duotone":""},null,-1)]))),[[o]])}}});typeof t=="function"&&t(d);export{d as default}; +import{d as i,bz as n,G as r,o as a,c as s,a as c}from"./index-DCMFRrFG.js";import{b as t}from"./route-block-B_A1xBdJ.js";const l={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},d=i({__name:"index",setup(m){return(p,e)=>{const o=n("motion");return r((a(),s("div",l,e[0]||(e[0]=[c("div",{text:"60","i-solar:leaf-bold-duotone":""},null,-1)]))),[[o]])}}});typeof t=="function"&&t(d);export{d as default}; diff --git a/assets/index-BCRPLUuu.js b/assets/index-BWcUvqbr.js similarity index 89% rename from assets/index-BCRPLUuu.js rename to assets/index-BWcUvqbr.js index 5bc711b7fa1615ddddaff110356792c176d8cf24..fcd5c4d75761bae6762a98ee0236e9090a35bf76 100644 --- a/assets/index-BCRPLUuu.js +++ b/assets/index-BWcUvqbr.js @@ -1 +1 @@ -import{d as M,k as T,s as G,r as c,w as H,l as C,bz as Q,c as m,o as d,a,b as h,G as w,bH as R,u as r,t as l,bJ as K,F as P,i as V,E as W,bA as B,bB as X,m as Y}from"./index-5LjD1Eoi.js";import{u as Z}from"./airi-card-BWkmdsVt.js";/* empty css */import{_ as ee}from"./InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js";import{_ as te}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-Dq2ynzTu.js";import{_ as ae}from"./CardListItem.vue_vue_type_script_setup_true_lang-Dt75YOm9.js";import{_ as se}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./emotions-CAex_2dA.js";import"./consciousness-D7jKnAf3.js";import"./providers-CIeQW25J.js";import"./index-LHmcipjy.js";import"./speech-BYL-UWPg.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./index-BdorYkr1.js";const re={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},oe={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},ne={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},le=["placeholder"],ie={class:"flex items-center gap-2"},de={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ue={value:"nameAsc"},ce={value:"nameDesc"},me={value:"recent"},pe={key:0,flex:"","flex-col":"","items-center":""},fe={"font-medium":"",text:"neutral-600 dark:neutral-300"},ve={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},xe={key:1,flex:"","flex-col":"","items-center":""},ge={"font-medium":"",text:"primary-600 dark:primary-300"},_e={key:1,class:"col-span-full rounded-xl p-8 text-center",border:"~ neutral-200/50 dark:neutral-700/30",bg:"neutral-50/50 dark:neutral-900/50"},be={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},ke={class:"flex flex-col"},ye={class:"font-medium"},Ce={class:"text-sm text-amber-600 dark:text-amber-400"},he={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},we=M({__name:"index",setup(Ve){const{t:n}=T(),k=Z(),{addCard:j,removeCard:E}=k,{cards:p,activeCardId:D}=G(k),_=c(""),f=c(!1),v=c(""),x=c("nameAsc"),y=c([]);H(y,async s=>{const e=s[0];if(e)try{const o=await e.text(),i=JSON.parse(o);_.value=j(i),f.value=!0}catch(o){console.error("Error processing card file:",o)}});const S=C(()=>Array.from(p.value.entries()).map(([s,e])=>({id:s,name:e.name,description:e.description}))),F=C(()=>{if(!v.value)return S.value;const s=v.value.toLowerCase();return S.value.filter(e=>e.name.toLowerCase().includes(s)||e.description&&e.description.toLowerCase().includes(s))}),A=C(()=>{const s=[...F.value];return x.value==="nameAsc"?s.sort((e,o)=>e.name.localeCompare(o.name)):x.value==="nameDesc"?s.sort((e,o)=>o.name.localeCompare(e.name)):x.value==="recent"?s.sort((e,o)=>o.id.localeCompare(e.id)):s}),b=c(!1),u=c(null);function L(){u.value&&(E(u.value),u.value=null,b.value=!1)}function O(s){u.value=s,b.value=!0}function q(s){_.value=s,f.value=!0}function I(s){D.value=s}function J(s){const e=p.value.get(s);return(e==null?void 0:e.version)||"1.0.0"}function $(s,e){var t,g,z,N;const o=p.value.get(s);if(!o||!((g=(t=o.extensions)==null?void 0:t.airi)!=null&&g.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(z=i.consciousness)!=null&&z.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&((N=i.speech)==null?void 0:N.voice_id)||"default"}return(s,e)=>{var i;const o=Q("motion");return d(),m(B,null,[a("div",re,[a("div",oe,[a("div",ne,[e[6]||(e[6]=a("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[a("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),w(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>v.value=t),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:r(n)("settings.pages.card.search")},null,8,le),[[R,v.value]])]),a("div",ie,[a("div",de,l(r(n)("settings.pages.card.sort_by"))+": ",1),w(a("select",{"onUpdate:modelValue":e[1]||(e[1]=t=>x.value=t),class:"rounded-lg p-1.5 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",bg:"white dark:neutral-900"},[a("option",ue,l(r(n)("settings.pages.card.name_asc")),1),a("option",ce,l(r(n)("settings.pages.card.name_desc")),1),a("option",me,l(r(n)("settings.pages.card.recent")),1)],512),[[K,x.value]])])]),a("div",{class:P(["mt-4",{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":r(p).size>0}])},[h(r(ee),{modelValue:y.value,"onUpdate:modelValue":e[2]||(e[2]=t=>y.value=t),accept:"*.json"},{default:W(({isDragging:t})=>[t?(d(),m("div",xe,[e[8]||(e[8]=a("div",{"i-solar:upload-minimalistic-bold":"",class:"text-primary-500 dark:text-primary-400 mb-2 text-5xl"},null,-1)),a("p",ge,l(r(n)("settings.pages.card.drop_here")),1)])):(d(),m("div",pe,[e[7]||(e[7]=a("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),a("p",fe,l(r(n)("settings.pages.card.upload")),1),a("p",ve,l(r(n)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(p).size>0?(d(!0),m(B,{key:0},X(A.value,t=>(d(),Y(ae,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(D),"is-selected":t.id===_.value&&f.value,version:J(t.id),"consciousness-model":$(t.id,"consciousness"),"voice-model":$(t.id,"voice"),onSelect:g=>q(t.id),onActivate:g=>I(t.id),onDelete:g=>O(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):V("",!0),r(p).size===0?(d(),m("div",_e,[e[9]||(e[9]=a("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),a("p",null,l(r(n)("settings.pages.card.no_cards")),1)])):V("",!0),v.value&&A.value.length===0?(d(),m("div",be,[e[10]||(e[10]=a("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),a("div",ke,[a("span",ye,l(r(n)("settings.pages.card.no_results")),1),a("span",Ce,l(r(n)("settings.pages.card.try_different_search")),1)])])):V("",!0)],2)]),h(se,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=t=>b.value=t),"card-name":u.value?(i=r(k).getCard(u.value))==null?void 0:i.name:"",onConfirm:L,onCancel:e[4]||(e[4]=t=>u.value=null)},null,8,["modelValue","card-name"]),h(te,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=t=>f.value=t),"card-id":_.value},null,8,["modelValue","card-id"]),w((d(),m("div",he,e[11]||(e[11]=[a("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof U=="function"&&U(we);export{we as default}; +import{d as M,k as T,s as G,r as c,w as H,l as C,bz as Q,c as m,o as d,a,b as h,G as w,bH as R,u as r,t as l,bJ as K,F as P,i as V,E as W,bA as B,bB as X,m as Y}from"./index-DCMFRrFG.js";import{u as Z}from"./airi-card-DTE6eySa.js";/* empty css */import{_ as ee}from"./InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js";import{_ as te}from"./CardDetailDialog.vue_vue_type_script_setup_true_lang-B2jcuDUm.js";import{_ as ae}from"./CardListItem.vue_vue_type_script_setup_true_lang-BCG0Y9FB.js";import{_ as se}from"./DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js";import{b as U}from"./route-block-B_A1xBdJ.js";import"./emotions-CAex_2dA.js";import"./consciousness-DGPhIG2M.js";import"./providers-DHuI5XmA.js";import"./index-LHmcipjy.js";import"./speech-Bc-BAopv.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./index-GwMN-Az5.js";const re={"rounded-xl":"","p-4":"",flex:"~ col gap-4"},oe={flex:"~ row","flex-wrap":"","items-center":"","justify-between":"","gap-4":""},ne={class:"relative min-w-[200px] flex-1","inline-flex":"~","w-full":"","items-center":""},le=["placeholder"],ie={class:"flex items-center gap-2"},de={"text-sm":"","text-neutral-500":"","dark:text-neutral-400":""},ue={value:"nameAsc"},ce={value:"nameDesc"},me={value:"recent"},pe={key:0,flex:"","flex-col":"","items-center":""},fe={"font-medium":"",text:"neutral-600 dark:neutral-300"},ve={text:"neutral-500 dark:neutral-400","mt-2":"","text-sm":""},xe={key:1,flex:"","flex-col":"","items-center":""},ge={"font-medium":"",text:"primary-600 dark:primary-300"},_e={key:1,class:"col-span-full rounded-xl p-8 text-center",border:"~ neutral-200/50 dark:neutral-700/30",bg:"neutral-50/50 dark:neutral-900/50"},be={key:2,class:"col-span-full flex items-center gap-3 border-2 border-amber-200 rounded-xl bg-amber-50/80 p-4 dark:border-amber-800 dark:bg-amber-900/30"},ke={class:"flex flex-col"},ye={class:"font-medium"},Ce={class:"text-sm text-amber-600 dark:text-amber-400"},he={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},we=M({__name:"index",setup(Ve){const{t:n}=T(),k=Z(),{addCard:j,removeCard:E}=k,{cards:p,activeCardId:D}=G(k),_=c(""),f=c(!1),v=c(""),x=c("nameAsc"),y=c([]);H(y,async s=>{const e=s[0];if(e)try{const o=await e.text(),i=JSON.parse(o);_.value=j(i),f.value=!0}catch(o){console.error("Error processing card file:",o)}});const S=C(()=>Array.from(p.value.entries()).map(([s,e])=>({id:s,name:e.name,description:e.description}))),F=C(()=>{if(!v.value)return S.value;const s=v.value.toLowerCase();return S.value.filter(e=>e.name.toLowerCase().includes(s)||e.description&&e.description.toLowerCase().includes(s))}),A=C(()=>{const s=[...F.value];return x.value==="nameAsc"?s.sort((e,o)=>e.name.localeCompare(o.name)):x.value==="nameDesc"?s.sort((e,o)=>o.name.localeCompare(e.name)):x.value==="recent"?s.sort((e,o)=>o.id.localeCompare(e.id)):s}),b=c(!1),u=c(null);function L(){u.value&&(E(u.value),u.value=null,b.value=!1)}function O(s){u.value=s,b.value=!0}function q(s){_.value=s,f.value=!0}function I(s){D.value=s}function J(s){const e=p.value.get(s);return(e==null?void 0:e.version)||"1.0.0"}function $(s,e){var t,g,z,N;const o=p.value.get(s);if(!o||!((g=(t=o.extensions)==null?void 0:t.airi)!=null&&g.modules))return"default";const i=o.extensions.airi.modules;return e==="consciousness"?(z=i.consciousness)!=null&&z.model&&i.consciousness.model.split("-").pop()||"default":e==="voice"&&((N=i.speech)==null?void 0:N.voice_id)||"default"}return(s,e)=>{var i;const o=Q("motion");return d(),m(B,null,[a("div",re,[a("div",oe,[a("div",ne,[e[6]||(e[6]=a("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[a("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),w(a("input",{"onUpdate:modelValue":e[0]||(e[0]=t=>v.value=t),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:r(n)("settings.pages.card.search")},null,8,le),[[R,v.value]])]),a("div",ie,[a("div",de,l(r(n)("settings.pages.card.sort_by"))+": ",1),w(a("select",{"onUpdate:modelValue":e[1]||(e[1]=t=>x.value=t),class:"rounded-lg p-1.5 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",bg:"white dark:neutral-900"},[a("option",ue,l(r(n)("settings.pages.card.name_asc")),1),a("option",ce,l(r(n)("settings.pages.card.name_desc")),1),a("option",me,l(r(n)("settings.pages.card.recent")),1)],512),[[K,x.value]])])]),a("div",{class:P(["mt-4",{"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4 grid-auto-rows-[minmax(min-content,max-content)] grid-auto-flow-dense sm:grid-cols-[repeat(auto-fill,minmax(240px,1fr))] sm:gap-5 md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] lg:grid-cols-[repeat(auto-fill,minmax(250px,1fr))]":r(p).size>0}])},[h(r(ee),{modelValue:y.value,"onUpdate:modelValue":e[2]||(e[2]=t=>y.value=t),accept:"*.json"},{default:W(({isDragging:t})=>[t?(d(),m("div",xe,[e[8]||(e[8]=a("div",{"i-solar:upload-minimalistic-bold":"",class:"text-primary-500 dark:text-primary-400 mb-2 text-5xl"},null,-1)),a("p",ge,l(r(n)("settings.pages.card.drop_here")),1)])):(d(),m("div",pe,[e[7]||(e[7]=a("div",{"i-solar:upload-square-line-duotone":"","mb-4":"","text-5xl":"",text:"neutral-400 dark:neutral-500"},null,-1)),a("p",fe,l(r(n)("settings.pages.card.upload")),1),a("p",ve,l(r(n)("settings.pages.card.upload_desc")),1)]))]),_:1},8,["modelValue"]),r(p).size>0?(d(!0),m(B,{key:0},X(A.value,t=>(d(),Y(ae,{id:t.id,key:t.id,name:t.name,description:t.description,"is-active":t.id===r(D),"is-selected":t.id===_.value&&f.value,version:J(t.id),"consciousness-model":$(t.id,"consciousness"),"voice-model":$(t.id,"voice"),onSelect:g=>q(t.id),onActivate:g=>I(t.id),onDelete:g=>O(t.id)},null,8,["id","name","description","is-active","is-selected","version","consciousness-model","voice-model","onSelect","onActivate","onDelete"]))),128)):V("",!0),r(p).size===0?(d(),m("div",_e,[e[9]||(e[9]=a("div",{"i-solar:card-search-broken":"","mx-auto":"","mb-3":"","text-6xl":"","text-neutral-400":""},null,-1)),a("p",null,l(r(n)("settings.pages.card.no_cards")),1)])):V("",!0),v.value&&A.value.length===0?(d(),m("div",be,[e[10]||(e[10]=a("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),a("div",ke,[a("span",ye,l(r(n)("settings.pages.card.no_results")),1),a("span",Ce,l(r(n)("settings.pages.card.try_different_search")),1)])])):V("",!0)],2)]),h(se,{modelValue:b.value,"onUpdate:modelValue":e[3]||(e[3]=t=>b.value=t),"card-name":u.value?(i=r(k).getCard(u.value))==null?void 0:i.name:"",onConfirm:L,onCancel:e[4]||(e[4]=t=>u.value=null)},null,8,["modelValue","card-name"]),h(te,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=t=>f.value=t),"card-id":_.value},null,8,["modelValue","card-id"]),w((d(),m("div",he,e[11]||(e[11]=[a("div",{text:"60","i-solar:emoji-funny-square-bold-duotone":""},null,-1)]))),[[o]])],64)}}});typeof U=="function"&&U(we);export{we as default}; diff --git a/assets/index-B-G1GokQ.js b/assets/index-CNArLVJj.js similarity index 95% rename from assets/index-B-G1GokQ.js rename to assets/index-CNArLVJj.js index 60a0206760a05e206572e56b0c23e72f51b552ab..f2ba10f764f4a6cf64dcb19002e70c4c9f61d955 100644 --- a/assets/index-B-G1GokQ.js +++ b/assets/index-CNArLVJj.js @@ -1 +1 @@ -import{d as A,bK as S,bL as _,c as r,o,G as a,a as e,b as c,H as V,bN as h,i as H,t as u,E as g,F as x,bE as U,D as M,bF as N,k as O,r as j,w as P,bz as z,m as f,ag as L,u as i,bJ as R,bH as I,bA as k,bB as q,bq as G}from"./index-5LjD1Eoi.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";/* empty css */import{_ as C,a as J}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DhP-gZZO.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./index-BdorYkr1.js";const K={class:"w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},Q=["aria-checked"],W={key:0,text:"sm neutral-500"},B=A({__name:"CheckBar",props:S({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const n=_(p,"modelValue");return(y,m)=>(o(),r("label",K,[a(e("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>n.value=v),"aria-checked":n.value,type:"checkbox",hidden:""},null,8,Q),[[V,n.value]]),e("div",null,[h(u(y.$t(p.text))+" ",1),p.description?(o(),r("div",W,u(y.$t(p.description)),1)):H("",!0)]),c(U,{name:"slide-away",mode:"out-in"},{default:g(()=>[n.value?(o(),r("div",{key:0,class:x(p.iconOn),transition:"all ease-in-out duration-250"},null,2)):(o(),r("div",{key:1,class:x(p.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),X=[[],["#A5978B","#D8CAAF","#B8B4A7","#C4BCB1","#E5DED8","#9A8F7D","#BEB5A7","#C9C0B6"],["#7A9EAF","#B8C7CC","#D4B79C","#8B9D77","#C7D5CB","#E6D0B1","#94A7B1","#B4C8C3"],["#D9B48F","#B5917A","#8C7A6B","#A17F5F","#B98C46","#C7A252","#DAB300","#D19826"],["#9BA7B0","#C1CBD4","#A5ADB6","#8B959E","#D4DCE4","#7F8A94","#B3BCC6","#98A4AE"],["#E4C6D0","#A61B29","#5D513C","#789262","#1C0D1A","#F7C242","#62A9DD","#8C4B3C"]],Y={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+3*10,delay:3*50,transition:"all ease-in-out duration-250"},Z={value:"en-US"},ee={value:"zh-CN"},te={flex:"","items-center":"","justify-between":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+5*10,delay:5*50,transition:"all ease-in-out duration-250"},ie={"text-lg":"","font-semibold":""},ne={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},ae=["disabled"],oe={class:"color-bar",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+7*10,delay:7*50,transition:"all ease-in-out duration-250"},se={"text-white":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+8*10,delay:8*50,transition:"all ease-in-out duration-250"},le={class:"color-bar transparency-grid",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+9*10,delay:9*50,transition:"all ease-in-out duration-250"},re=["duration","delay"],de={"font-medium":""},ue={text:"sm neutral-500"},pe={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[65dvh]","right--15":"","z--1":"",initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:"","items-center":"","justify-center":""},w=A({__name:"index",setup(p){const n=M(),y=N(),{t:m}=O(),v=j(!1);return P(()=>[n.usePageSpecificTransitions,n.disableTransitions],()=>{v.value=!0}),(d,t)=>{const s=z("motion");return o(),r(k,null,[a((o(),f(i(C),{title:i(m)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+1*10,delay:1*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(c(B,{modelValue:i(y),"onUpdate:modelValue":t[0]||(t[0]=l=>L(y)?y.value=l:null),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+2*10,delay:2*50,"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme",transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a((o(),r("div",Y,[h(u(d.$t("settings.language.title"))+" ",1),a(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>i(n).language=l),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",Z,u(d.$t("settings.language.english")),1),e("option",ee,u(d.$t("settings.language.chinese")),1)],512),[[R,i(n).language]])])),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:i(m)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+4*10,delay:4*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a((o(),r("div",te,[e("span",ie,u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ne,[a(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i(n).themeColorsHueDynamic=l),type:"checkbox",class:"peer sr-only"},null,512),[[V,i(n).themeColorsHueDynamic]]),t[6]||(t[6]=e("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),h(" "+u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[s]]),a(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>i(n).themeColorsHue=l),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,transition:"all ease-in-out duration-250",type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",i(n).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:i(n).themeColorsHueDynamic},null,10,ae),[[I,i(n).themeColorsHue],[s]]),a((o(),r("div",oe,[t[8]||(t[8]=e("span",{"bg-primary-50":""},"50",-1)),t[9]||(t[9]=e("span",{"bg-primary-100":""},"100",-1)),t[10]||(t[10]=e("span",{"bg-primary-200":""},"200",-1)),t[11]||(t[11]=e("span",{"bg-primary-300":""},"300",-1)),t[12]||(t[12]=e("span",{"bg-primary-400":""},"400",-1)),t[13]||(t[13]=e("span",{"bg-primary-500":""},"500",-1)),a((o(),r("div",se,t[7]||(t[7]=[e("span",{"bg-primary-600":""},"600",-1),e("span",{"bg-primary-700":""},"700",-1),e("span",{"bg-primary-800":""},"800",-1),e("span",{"bg-primary-900":""},"900",-1),e("span",{"bg-primary-950":""},"950",-1)]))),[[s]])])),[[s]]),a((o(),r("div",le,t[14]||(t[14]=[e("span",{bg:"primary-500/5"},"500/5",-1),e("span",{bg:"primary-500/10"},"500/10",-1),e("span",{bg:"primary-500/20"},"500/20",-1),e("span",{bg:"primary-500/30"},"500/30",-1),e("span",{bg:"primary-500/40"},"500/40",-1),e("span",{bg:"primary-500/50"},"500/50",-1),e("span",{bg:"primary-500/60"},"500/60",-1),e("span",{bg:"primary-500/70"},"500/70",-1),e("span",{bg:"primary-500/80"},"500/80",-1),e("span",{bg:"primary-500/90"},"500/90",-1),e("span",{bg:"primary-500"},"500",-1)]))),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+10*10,delay:10*50,transition:"all ease-in-out duration-250"},{default:g(()=>[(o(!0),r(k,null,q(d.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:l,description:$,colors:E},b)=>a((o(),r("div",{key:b,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+11*10+b*10,delay:11*50+b*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",de,u(d.$rt(l)),1),e("div",ue,u(d.$rt($)),1)]),c(J,{colors:E.map((T,F)=>({hex:i(X)[b][F],name:d.$rt(T)}))},null,8,["colors"])],8,re)),[[s]])),128))]),_:1})),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+18*10,delay:18*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(c(B,{modelValue:i(n).disableTransitions,"onUpdate:modelValue":t[4]||(t[4]=l=>i(n).disableTransitions=l),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+19*10,delay:19*50,transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a(c(B,{modelValue:i(n).usePageSpecificTransitions,"onUpdate:modelValue":t[5]||(t[5]=l=>i(n).usePageSpecificTransitions=l),disabled:i(n).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+20*10,delay:20*50,transition:"all ease-in-out duration-250"},null,8,["modelValue","disabled"]),[[s]])]),_:1})),[[s]]),a((o(),r("div",pe,t[15]||(t[15]=[e("div",{text:"60","i-solar:filters-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof D=="function"&&D(w);const xe=G(w,[["__scopeId","data-v-0edbb762"]]);export{xe as default}; +import{d as A,bK as S,bL as _,c as r,o,G as a,a as e,b as c,H as V,bN as h,i as H,t as u,E as g,F as x,bE as U,D as M,bF as N,k as O,r as j,w as P,bz as z,m as f,ag as L,u as i,bJ as R,bH as I,bA as k,bB as q,bq as G}from"./index-DCMFRrFG.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";/* empty css */import{_ as C,a as J}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DQW4hQKz.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./index-GwMN-Az5.js";const K={class:"w-full flex cursor-pointer items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700"},Q=["aria-checked"],W={key:0,text:"sm neutral-500"},B=A({__name:"CheckBar",props:S({text:null,iconOn:null,iconOff:null,description:null},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(p){const n=_(p,"modelValue");return(y,m)=>(o(),r("label",K,[a(e("input",{"onUpdate:modelValue":m[0]||(m[0]=v=>n.value=v),"aria-checked":n.value,type:"checkbox",hidden:""},null,8,Q),[[V,n.value]]),e("div",null,[h(u(y.$t(p.text))+" ",1),p.description?(o(),r("div",W,u(y.$t(p.description)),1)):H("",!0)]),c(U,{name:"slide-away",mode:"out-in"},{default:g(()=>[n.value?(o(),r("div",{key:0,class:x(p.iconOn),transition:"all ease-in-out duration-250"},null,2)):(o(),r("div",{key:1,class:x(p.iconOff),transition:"all ease-in-out duration-250"},null,2))]),_:1})]))}}),X=[[],["#A5978B","#D8CAAF","#B8B4A7","#C4BCB1","#E5DED8","#9A8F7D","#BEB5A7","#C9C0B6"],["#7A9EAF","#B8C7CC","#D4B79C","#8B9D77","#C7D5CB","#E6D0B1","#94A7B1","#B4C8C3"],["#D9B48F","#B5917A","#8C7A6B","#A17F5F","#B98C46","#C7A252","#DAB300","#D19826"],["#9BA7B0","#C1CBD4","#A5ADB6","#8B959E","#D4DCE4","#7F8A94","#B3BCC6","#98A4AE"],["#E4C6D0","#A61B29","#5D513C","#789262","#1C0D1A","#F7C242","#62A9DD","#8C4B3C"]],Y={class:"w-full flex items-center justify-between rounded-lg px-4 py-3 text-sm outline-none transition-all duration-250 ease-in-out",bg:"neutral-50 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+3*10,delay:3*50,transition:"all ease-in-out duration-250"},Z={value:"en-US"},ee={value:"zh-CN"},te={flex:"","items-center":"","justify-between":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+5*10,delay:5*50,transition:"all ease-in-out duration-250"},ie={"text-lg":"","font-semibold":""},ne={relative:"",flex:"","cursor-pointer":"","items-center":"","gap-2":""},ae=["disabled"],oe={class:"color-bar",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+7*10,delay:7*50,transition:"all ease-in-out duration-250"},se={"text-white":"",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+8*10,delay:8*50,transition:"all ease-in-out duration-250"},le={class:"color-bar transparency-grid",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+9*10,delay:9*50,transition:"all ease-in-out duration-250"},re=["duration","delay"],de={"font-medium":""},ue={text:"sm neutral-500"},pe={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[65dvh]","right--15":"","z--1":"",initial:{scale:.9,opacity:0,rotate:30},enter:{scale:1,opacity:1,rotate:0},duration:250,flex:"","items-center":"","justify-center":""},w=A({__name:"index",setup(p){const n=M(),y=N(),{t:m}=O(),v=j(!1);return P(()=>[n.usePageSpecificTransitions,n.disableTransitions],()=>{v.value=!0}),(d,t)=>{const s=z("motion");return o(),r(k,null,[a((o(),f(i(C),{title:i(m)("settings.sections.section.general.title"),icon:"i-solar:filters-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+1*10,delay:1*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(c(B,{modelValue:i(y),"onUpdate:modelValue":t[0]||(t[0]=l=>L(y)?y.value=l:null),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+2*10,delay:2*50,"icon-on":"i-solar:moon-stars-bold-duotone","icon-off":"i-solar:sun-fog-bold-duotone",text:"settings.theme",transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a((o(),r("div",Y,[h(u(d.$t("settings.language.title"))+" ",1),a(e("select",{"onUpdate:modelValue":t[1]||(t[1]=l=>i(n).language=l),transition:"all ease-in-out duration-250","cursor-pointer":"","bg-transparent":"","text-right":"","outline-none":""},[e("option",Z,u(d.$t("settings.language.english")),1),e("option",ee,u(d.$t("settings.language.chinese")),1)],512),[[R,i(n).language]])])),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:i(m)("settings.pages.themes.sections.section.custom-color.title"),icon:"i-solar:pallete-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+4*10,delay:4*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a((o(),r("div",te,[e("span",ie,u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.label")),1),e("label",ne,[a(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>i(n).themeColorsHueDynamic=l),type:"checkbox",class:"peer sr-only"},null,512),[[V,i(n).themeColorsHueDynamic]]),t[6]||(t[6]=e("div",{class:"peer-checked:bg-primary-500 h-6 w-11 rounded-full bg-neutral-200 after:absolute after:left-[2px] after:top-[2px] after:h-5 after:w-5 after:rounded-full after:bg-white dark:bg-neutral-600 after:transition-all after:content-[''] peer-checked:after:translate-x-full peer-checked:after:border-white"},null,-1)),h(" "+u(d.$t("settings.pages.themes.sections.section.custom-color.fields.field.primary-color.rgb-on.title")),1)])])),[[s]]),a(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>i(n).themeColorsHue=l),initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+6*10,delay:6*50,transition:"all ease-in-out duration-250",type:"range",min:"0",max:"360",step:"0.01",class:x(["theme-hue-slider",i(n).themeColorsHueDynamic?"opacity-25 cursor-not-allowed":"cursor-pointer"]),disabled:i(n).themeColorsHueDynamic},null,10,ae),[[I,i(n).themeColorsHue],[s]]),a((o(),r("div",oe,[t[8]||(t[8]=e("span",{"bg-primary-50":""},"50",-1)),t[9]||(t[9]=e("span",{"bg-primary-100":""},"100",-1)),t[10]||(t[10]=e("span",{"bg-primary-200":""},"200",-1)),t[11]||(t[11]=e("span",{"bg-primary-300":""},"300",-1)),t[12]||(t[12]=e("span",{"bg-primary-400":""},"400",-1)),t[13]||(t[13]=e("span",{"bg-primary-500":""},"500",-1)),a((o(),r("div",se,t[7]||(t[7]=[e("span",{"bg-primary-600":""},"600",-1),e("span",{"bg-primary-700":""},"700",-1),e("span",{"bg-primary-800":""},"800",-1),e("span",{"bg-primary-900":""},"900",-1),e("span",{"bg-primary-950":""},"950",-1)]))),[[s]])])),[[s]]),a((o(),r("div",le,t[14]||(t[14]=[e("span",{bg:"primary-500/5"},"500/5",-1),e("span",{bg:"primary-500/10"},"500/10",-1),e("span",{bg:"primary-500/20"},"500/20",-1),e("span",{bg:"primary-500/30"},"500/30",-1),e("span",{bg:"primary-500/40"},"500/40",-1),e("span",{bg:"primary-500/50"},"500/50",-1),e("span",{bg:"primary-500/60"},"500/60",-1),e("span",{bg:"primary-500/70"},"500/70",-1),e("span",{bg:"primary-500/80"},"500/80",-1),e("span",{bg:"primary-500/90"},"500/90",-1),e("span",{bg:"primary-500"},"500",-1)]))),[[s]])]),_:1},8,["title"])),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.theme-presets.title",icon:"i-solar:magic-stick-2-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+10*10,delay:10*50,transition:"all ease-in-out duration-250"},{default:g(()=>[(o(!0),r(k,null,q(d.$tm("settings.pages.themes.sections.section.theme-presets.presets"),({title:l,description:$,colors:E},b)=>a((o(),r("div",{key:b,class:"w-full flex items-center justify-between rounded-lg px-4 py-3 outline-none transition-all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+11*10+b*10,delay:11*50+b*50,transition:"all ease-in-out duration-250"},[e("div",null,[e("span",de,u(d.$rt(l)),1),e("div",ue,u(d.$rt($)),1)]),c(J,{colors:E.map((T,F)=>({hex:i(X)[b][F],name:d.$rt(T)}))},null,8,["colors"])],8,re)),[[s]])),128))]),_:1})),[[s]]),a((o(),f(i(C),{title:"settings.pages.themes.sections.section.developer.title",icon:"i-solar:code-bold-duotone",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+18*10,delay:18*50,transition:"all ease-in-out duration-250"},{default:g(()=>[a(c(B,{modelValue:i(n).disableTransitions,"onUpdate:modelValue":t[4]||(t[4]=l=>i(n).disableTransitions=l),"icon-on":"i-solar:people-nearby-bold-duotone","icon-off":"i-solar:running-2-line-duotone",text:"settings.animations.stage-transitions.title",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+19*10,delay:19*50,transition:"all ease-in-out duration-250"},null,8,["modelValue"]),[[s]]),a(c(B,{modelValue:i(n).usePageSpecificTransitions,"onUpdate:modelValue":t[5]||(t[5]=l=>i(n).usePageSpecificTransitions=l),disabled:i(n).disableTransitions,"icon-on":"i-solar:running-2-line-duotone","icon-off":"i-solar:people-nearby-bold-duotone",text:"settings.animations.use-page-specific-transitions.title",description:"settings.animations.use-page-specific-transitions.description",initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+20*10,delay:20*50,transition:"all ease-in-out duration-250"},null,8,["modelValue","disabled"]),[[s]])]),_:1})),[[s]]),a((o(),r("div",pe,t[15]||(t[15]=[e("div",{text:"60","i-solar:filters-bold-duotone":""},null,-1)]))),[[s]])],64)}}});typeof D=="function"&&D(w);const xe=G(w,[["__scopeId","data-v-0edbb762"]]);export{xe as default}; diff --git a/assets/index-Bhj7Acgo.js b/assets/index-CcNeofx3.js similarity index 78% rename from assets/index-Bhj7Acgo.js rename to assets/index-CcNeofx3.js index 9e3f4fc36f41254cd9b68228c50231e5dee3b692..a4e7f6a9830ebf4a3e286a5338ef7ab77af1563b 100644 --- a/assets/index-Bhj7Acgo.js +++ b/assets/index-CcNeofx3.js @@ -1 +1 @@ -import{_ as g}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as b,s as k,bz as v,c as e,o,a as c,m as s,G as l,bA as m,bB as I,u as i}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";import{I as h}from"./IconStatusItem-BHtW75ra.js";/* empty css */import{u as A}from"./useIconAnimation-BkxpLoyr.js";import{b as d}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";const B={grid:"~ cols-2 gap-4"},S={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},w=b({__name:"index",setup(D){const u=z(),{allProvidersMetadata:p}=k(u),{iconAnimationStarted:f,showIconAnimation:_,animationIcon:y}=A("i-solar:box-minimalistic-bold-duotone");return(C,n)=>{const x=g,a=v("motion");return o(),e(m,null,[c("div",B,[(o(!0),e(m,null,I(i(p),(t,r)=>l((o(),s(i(h),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+r*10,delay:r*50,title:t.localizedName,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),i(_)?(o(),s(x,{key:0,"z-index":-1,icon:i(y),"icon-size":12,duration:1e3,started:i(f),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):l((o(),e("div",S,n[0]||(n[0]=[c("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof d=="function"&&d(w);export{w as default}; +import{_ as g}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as b,s as k,bz as v,c as e,o,a as c,m as s,G as l,bA as m,bB as I,u as i}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";import{I as h}from"./IconStatusItem-TmDrxILn.js";/* empty css */import{u as A}from"./useIconAnimation-CvSuZDEE.js";import{b as d}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";const B={grid:"~ cols-2 gap-4"},S={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},w=b({__name:"index",setup(D){const u=z(),{allProvidersMetadata:p}=k(u),{iconAnimationStarted:f,showIconAnimation:_,animationIcon:y}=A("i-solar:box-minimalistic-bold-duotone");return(C,n)=>{const x=g,a=v("motion");return o(),e(m,null,[c("div",B,[(o(!0),e(m,null,I(i(p),(t,r)=>l((o(),s(i(h),{key:t.id,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250+r*10,delay:r*50,title:t.localizedName,description:t.localizedDescription,icon:t.icon,"icon-color":t.iconColor,"icon-image":t.iconImage,to:`/settings/providers/${t.id}`,configured:t.configured},null,8,["duration","delay","title","description","icon","icon-color","icon-image","to","configured"])),[[a]])),128))]),i(_)?(o(),s(x,{key:0,"z-index":-1,icon:i(y),"icon-size":12,duration:1e3,started:i(f),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):l((o(),e("div",S,n[0]||(n[0]=[c("div",{text:"60","i-solar:box-minimalistic-bold-duotone":""},null,-1)]))),[[a]])],64)}}});typeof d=="function"&&d(w);export{w as default}; diff --git a/assets/index-5LjD1Eoi.js b/assets/index-DCMFRrFG.js similarity index 99% rename from assets/index-5LjD1Eoi.js rename to assets/index-DCMFRrFG.js index fe091b205266a7d4efc5de0ab16baf92904bd997..4152910e261d22239bd9fc22e939e0686db3d5b2 100644 --- a/assets/index-5LjD1Eoi.js +++ b/assets/index-DCMFRrFG.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-BAwuh7oV.js","assets/HeaderLink-Bp3oK7dP.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-DAzbwih-.js","assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js","assets/Stage-B0Lug85R.css","assets/three-vrm-animation.module-C_NwwsBw.js","assets/emotions-CAex_2dA.js","assets/providers-CIeQW25J.js","assets/index-LHmcipjy.js","assets/Radio-Dsd6Nuzv.css","assets/index-BXn61H3H.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-BYL-UWPg.js","assets/queue-D8d866Tb.js","assets/queues-L5OE-bsn.js","assets/index-C4mUnpiM.js","assets/airi-card-BWkmdsVt.js","assets/consciousness-D7jKnAf3.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js","assets/Model.vue_vue_type_script_setup_true_lang-B5b_VmSW.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js","assets/index-BLNYI9W3.js","assets/Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js","assets/route-block-B_A1xBdJ.js","assets/index-BfhcFkpL.css","assets/background-remove-CAElzeUN.js","assets/InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js","assets/chat-D6nUliHw.js","assets/image-B7dDdCyb.js","assets/image-BhuwcwI9.css","assets/vibrant-Oen8O70m.js","assets/browser-CkchkNbv.js","assets/queue-BuTiRx_t.js","assets/index-DveSPBFG.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js","assets/index-BCRPLUuu.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-Dq2ynzTu.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BJJL0P-M.js","assets/index-BdorYkr1.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-Dt75YOm9.js","assets/CardDetailDialog-BV3jfrnh.js","assets/CardListItem-R5lVEmON.js","assets/DeleteCardDialog-ShTTK-bk.js","assets/index-B-G1GokQ.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-DhP-gZZO.js","assets/index-CHoWYJ6u.css","assets/index-CfAHq90W.js","assets/index-Dgjn_5PB.js","assets/useIconAnimation-BkxpLoyr.js","assets/index-rlpEp8ML.css","assets/index-D9G3cbGf.js","assets/IconStatusItem-BHtW75ra.js","assets/consciousness-Bdu7qyU-.js","assets/RadioCardSimple-D24jggBz.js","assets/Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js","assets/memory-long-term-r86GQRQ8.js","assets/memory-short-term-9VI9bErb.js","assets/speech-C_w-q0H3.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js","assets/Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js","assets/index-Bhj7Acgo.js","assets/alibaba-cloud-model-studio-Dsotw8H2.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js","assets/anthropic-Bb59KvNZ.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js","assets/cloudflare-workers-ai-BUu3BYqf.js","assets/deepseek-CEOMgyK9.js","assets/elevenlabs-DaUCWrgU.js","assets/featherless-ai-DEpw2GD4.js","assets/fireworks-ai-pAanQKa6.js","assets/google-generative-ai-BHkmDd8D.js","assets/microsoft-speech-D22NL1kj.js","assets/mistral-ai-3GBsQ0V-.js","assets/moonshot-ai-GQSErYLo.js","assets/novita-ai-Bj8AIzPS.js","assets/ollama-BpQSwC2U.js","assets/openai-DVEjYgEm.js","assets/openrouter-ai-DH4s4Ijd.js","assets/together-ai-Bd3_7cAF.js","assets/volcengine-BFyGxF3P.js","assets/xai-BCkQH5yt.js","assets/index-5EHBT8-2.js","assets/filter-message-DkqUMahb.js","assets/delays-Dt1XFqWS.js","assets/emotions-CL6JuFTp.js","assets/messages-Dav99Qqj.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/default-Bb1hdJNb.js","assets/HeaderLink-DPXtT-kx.js","assets/HeaderLink-DsxHr3rn.css","assets/settings-Y9Sl4QEx.js","assets/Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js","assets/Stage-B0Lug85R.css","assets/three-vrm-animation.module-BGS11oHQ.js","assets/emotions-CAex_2dA.js","assets/providers-DHuI5XmA.js","assets/index-LHmcipjy.js","assets/Radio-CYvjI7WT.css","assets/index-fMkwekS6.js","assets/import-url-browser-CPN8ipMD.js","assets/duckdb-mvp-CaaD-olE.js","assets/speech-Bc-BAopv.js","assets/queue-DDsFBepK.js","assets/queues-xZ787FAF.js","assets/index-C4mUnpiM.js","assets/airi-card-DTE6eySa.js","assets/consciousness-DGPhIG2M.js","assets/TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js","assets/Model.vue_vue_type_script_setup_true_lang-Oh2pzmo4.js","assets/Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js","assets/index-DT9YP6z9.js","assets/Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js","assets/route-block-B_A1xBdJ.js","assets/index-BfhcFkpL.css","assets/background-remove-DG4rn_jW.js","assets/InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js","assets/chat-Du_qMEYx.js","assets/image-457vStJH.js","assets/image-BhuwcwI9.css","assets/vibrant-MRFE1Mkk.js","assets/browser-CkchkNbv.js","assets/queue-B-z77HZh.js","assets/index-fFw9sI_s.js","assets/IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js","assets/index-BWcUvqbr.js","assets/CardDetailDialog.vue_vue_type_script_setup_true_lang-B2jcuDUm.js","assets/DeleteCardDialog.vue_vue_type_script_setup_true_lang-BQw9spiC.js","assets/index-GwMN-Az5.js","assets/CardListItem.vue_vue_type_script_setup_true_lang-BCG0Y9FB.js","assets/CardDetailDialog-CmoHJwWd.js","assets/CardListItem-B3688U82.js","assets/DeleteCardDialog-CjX_zGnB.js","assets/index-CNArLVJj.js","assets/ColorPalette.vue_vue_type_script_setup_true_lang-DQW4hQKz.js","assets/index-CHoWYJ6u.css","assets/index-BLy_7xCj.js","assets/index-DvtIggeg.js","assets/useIconAnimation-CvSuZDEE.js","assets/index-rlpEp8ML.css","assets/index-AE7leN3M.js","assets/IconStatusItem-TmDrxILn.js","assets/consciousness-BqrnV6uz.js","assets/RadioCardSimple-_IHIrHb5.js","assets/Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js","assets/memory-long-term-7F9G0rHp.js","assets/memory-short-term-DW9sGSpx.js","assets/speech-DslJ9VCL.js","assets/FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js","assets/FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js","assets/Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js","assets/index-CcNeofx3.js","assets/alibaba-cloud-model-studio-B6pk_ef1.js","assets/SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js","assets/ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js","assets/ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js","assets/ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js","assets/anthropic-BqfnlV64.js","assets/ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js","assets/cloudflare-workers-ai-BLel_peE.js","assets/deepseek-DJRX_KJQ.js","assets/elevenlabs-CH5uoIl4.js","assets/featherless-ai-BtKCHCM3.js","assets/fireworks-ai-B3FRJ_5H.js","assets/google-generative-ai-aFKQLVZT.js","assets/microsoft-speech-BpwwCTsY.js","assets/mistral-ai-BdVI7t8j.js","assets/moonshot-ai-DjtPuycx.js","assets/novita-ai-BIRgykIz.js","assets/ollama-DMTLWCIi.js","assets/openai-CbZevItC.js","assets/openrouter-ai-CEyG_wt7.js","assets/together-ai-BS6nRHMX.js","assets/volcengine-D4FqTSKw.js","assets/xai-dY1oJl1B.js","assets/index-yo1PjPQx.js","assets/filter-message-C-jZFKv3.js","assets/delays-C8Nh_P2J.js","assets/emotions-DY0lA_Uh.js","assets/messages-BAFAGeqg.js"])))=>i.map(i=>d[i]); var tC=Object.defineProperty;var nC=(n,e,t)=>e in n?tC(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var fi=(n,e,t)=>nC(n,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=t(s);fetch(s.href,r)}})();const iC="modulepreload",sC=function(n){return"/"+n},fv={},je=function(e,t,i){let s=Promise.resolve();if(t&&t.length>0){let o=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=o(t.map(c=>{if(c=sC(c),c in fv)return;fv[c]=!0;const u=c.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${f}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":iC,u||(d.as="script"),d.crossOrigin="",d.href=c,l&&d.setAttribute("nonce",l),document.head.appendChild(d),u)return new Promise((h,p)=>{d.addEventListener("load",h),d.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&r(a.reason);return e().catch(r)})};/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors @@ -3846,11 +3846,11 @@ void main() { * pinia v3.0.2 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Pw;const Xh=n=>Pw=n,Iw=Symbol();function Xg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var zl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(zl||(zl={}));function Oz(){const n=y0(!0),e=n.run(()=>et({}));let t=[],i=[];const s=T0({install(r){Xh(s),s._a=r,r.provide(Iw,s),r.config.globalProperties.$pinia=s,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const Lw=()=>{};function mx(n,e,t,i=Lw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&qd()&&b0(s),s}function na(n,...e){n.slice().forEach(t=>{t(...e)})}const Nz=n=>n(),gx=Symbol(),bm=Symbol();function $g(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],s=n[t];Xg(s)&&Xg(i)&&n.hasOwnProperty(t)&&!Pt(i)&&!Is(i)?n[t]=$g(s,i):n[t]=i}return n}const Uz=Symbol();function Fz(n){return!Xg(n)||!Object.prototype.hasOwnProperty.call(n,Uz)}const{assign:ir}=Object;function kz(n){return!!(Pt(n)&&n.effect)}function Bz(n,e,t,i){const{state:s,actions:r,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=s?s():{});const u=uS(t.state.value[n]);return ir(u,r,Object.keys(o||{}).reduce((f,d)=>(f[d]=T0(Me(()=>{Xh(t);const h=t._s.get(n);return o[d].call(h,h)})),f),{}))}return l=Dw(n,c,e,t,i,!0),l}function Dw(n,e,t={},i,s,r){let o;const a=ir({actions:{}},t),l={deep:!0};let c,u,f=[],d=[],h;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),et({});let _;function g(P){let x;c=u=!1,typeof P=="function"?(P(i.state.value[n]),x={type:zl.patchFunction,storeId:n,events:h}):($g(i.state.value[n],P),x={type:zl.patchObject,payload:P,storeId:n,events:h});const M=_=Symbol();wr().then(()=>{_===M&&(c=!0)}),u=!0,na(f,x,i.state.value[n])}const m=r?function(){const{state:x}=t,M=x?x():{};this.$patch(I=>{ir(I,M)})}:Lw;function y(){o.stop(),f=[],d=[],i._s.delete(n)}const b=(P,x="")=>{if(gx in P)return P[bm]=x,P;const M=function(){Xh(i);const I=Array.from(arguments),N=[],V=[];function j(ee){N.push(ee)}function te(ee){V.push(ee)}na(d,{args:I,name:M[bm],store:E,after:j,onError:te});let Z;try{Z=P.apply(this&&this.$id===n?this:E,I)}catch(ee){throw na(V,ee),ee}return Z instanceof Promise?Z.then(ee=>(na(N,ee),ee)).catch(ee=>(na(V,ee),Promise.reject(ee))):(na(N,Z),Z)};return M[gx]=!0,M[bm]=x,M},v={_p:i,$id:n,$onAction:mx.bind(null,d),$patch:g,$reset:m,$subscribe(P,x={}){const M=mx(f,P,x.detached,()=>I()),I=o.run(()=>Xe(()=>i.state.value[n],N=>{(x.flush==="sync"?u:c)&&P({storeId:n,type:zl.direct,events:h},N)},ir({},l,x)));return M},$dispose:y},E=xi(v);i._s.set(n,E);const S=(i._a&&i._a.runWithContext||Nz)(()=>i._e.run(()=>(o=y0()).run(()=>e({action:b}))));for(const P in S){const x=S[P];if(Pt(x)&&!kz(x)||Is(x))r||(p&&Fz(x)&&(Pt(x)?x.value=p[P]:$g(x,p[P])),i.state.value[n][P]=x);else if(typeof x=="function"){const M=b(x,P);S[P]=M,a.actions[P]=x}}return ir(E,S),ir(ut(E),S),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(x=>{ir(x,P)})}}),i._p.forEach(P=>{ir(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function zz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Rc();return o=o||(l?mn(Iw,null):null),o&&Xh(o),o=Pw,o._s.has(n)||(s?Dw(n,e,i,o):Bz(n,i,o)),o._s.get(n)}return r.$id=n,r}function Vz(n){const e=ut(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Me({get:()=>n[i],set(r){n[i]=r}}):(Pt(s)||Is(s))&&(t[i]=fS(n,i))}return t}const Hz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-BAwuh7oV.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>je(()=>import("./settings-DAzbwih-.js"),__vite__mapDeps([3,4,5,6,7,8,9,1,2,10])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-5MgbTKFk.js"),[])})).forEach(([s,r])=>{let o=s.replace("/src/layouts/","").replace(".vue","");e[o]=r});function i(s,r=!0){return s.map(o=>{var a,l,c,u,f,d;if(((a=o.children)==null?void 0:a.length)>0&&(o.children=i(o.children,!1)),r){if(!o.component&&((l=o.children)==null?void 0:l.find(p=>{var _;return(p.path===""||p.path==="/")&&((_=p.meta)==null?void 0:_.isLayout)})))return o;if(((c=o.meta)==null?void 0:c.layout)!==!1)return{path:o.path,component:e[((u=o.meta)==null?void 0:u.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(f=o.meta)!=null&&f.layout?{path:o.path,component:e[(d=o.meta)==null?void 0:d.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! + */let Pw;const Xh=n=>Pw=n,Iw=Symbol();function Xg(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var zl;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(zl||(zl={}));function Oz(){const n=y0(!0),e=n.run(()=>et({}));let t=[],i=[];const s=T0({install(r){Xh(s),s._a=r,r.provide(Iw,s),r.config.globalProperties.$pinia=s,i.forEach(o=>t.push(o)),i=[]},use(r){return this._a?t.push(r):i.push(r),this},_p:t,_a:null,_e:n,_s:new Map,state:e});return s}const Lw=()=>{};function mx(n,e,t,i=Lw){n.push(e);const s=()=>{const r=n.indexOf(e);r>-1&&(n.splice(r,1),i())};return!t&&qd()&&b0(s),s}function na(n,...e){n.slice().forEach(t=>{t(...e)})}const Nz=n=>n(),gx=Symbol(),bm=Symbol();function $g(n,e){n instanceof Map&&e instanceof Map?e.forEach((t,i)=>n.set(i,t)):n instanceof Set&&e instanceof Set&&e.forEach(n.add,n);for(const t in e){if(!e.hasOwnProperty(t))continue;const i=e[t],s=n[t];Xg(s)&&Xg(i)&&n.hasOwnProperty(t)&&!Pt(i)&&!Is(i)?n[t]=$g(s,i):n[t]=i}return n}const Uz=Symbol();function Fz(n){return!Xg(n)||!Object.prototype.hasOwnProperty.call(n,Uz)}const{assign:ir}=Object;function kz(n){return!!(Pt(n)&&n.effect)}function Bz(n,e,t,i){const{state:s,actions:r,getters:o}=e,a=t.state.value[n];let l;function c(){a||(t.state.value[n]=s?s():{});const u=uS(t.state.value[n]);return ir(u,r,Object.keys(o||{}).reduce((f,d)=>(f[d]=T0(Me(()=>{Xh(t);const h=t._s.get(n);return o[d].call(h,h)})),f),{}))}return l=Dw(n,c,e,t,i,!0),l}function Dw(n,e,t={},i,s,r){let o;const a=ir({actions:{}},t),l={deep:!0};let c,u,f=[],d=[],h;const p=i.state.value[n];!r&&!p&&(i.state.value[n]={}),et({});let _;function g(P){let x;c=u=!1,typeof P=="function"?(P(i.state.value[n]),x={type:zl.patchFunction,storeId:n,events:h}):($g(i.state.value[n],P),x={type:zl.patchObject,payload:P,storeId:n,events:h});const M=_=Symbol();wr().then(()=>{_===M&&(c=!0)}),u=!0,na(f,x,i.state.value[n])}const m=r?function(){const{state:x}=t,M=x?x():{};this.$patch(I=>{ir(I,M)})}:Lw;function y(){o.stop(),f=[],d=[],i._s.delete(n)}const b=(P,x="")=>{if(gx in P)return P[bm]=x,P;const M=function(){Xh(i);const I=Array.from(arguments),N=[],V=[];function j(ee){N.push(ee)}function te(ee){V.push(ee)}na(d,{args:I,name:M[bm],store:E,after:j,onError:te});let Z;try{Z=P.apply(this&&this.$id===n?this:E,I)}catch(ee){throw na(V,ee),ee}return Z instanceof Promise?Z.then(ee=>(na(N,ee),ee)).catch(ee=>(na(V,ee),Promise.reject(ee))):(na(N,Z),Z)};return M[gx]=!0,M[bm]=x,M},v={_p:i,$id:n,$onAction:mx.bind(null,d),$patch:g,$reset:m,$subscribe(P,x={}){const M=mx(f,P,x.detached,()=>I()),I=o.run(()=>Xe(()=>i.state.value[n],N=>{(x.flush==="sync"?u:c)&&P({storeId:n,type:zl.direct,events:h},N)},ir({},l,x)));return M},$dispose:y},E=xi(v);i._s.set(n,E);const S=(i._a&&i._a.runWithContext||Nz)(()=>i._e.run(()=>(o=y0()).run(()=>e({action:b}))));for(const P in S){const x=S[P];if(Pt(x)&&!kz(x)||Is(x))r||(p&&Fz(x)&&(Pt(x)?x.value=p[P]:$g(x,p[P])),i.state.value[n][P]=x);else if(typeof x=="function"){const M=b(x,P);S[P]=M,a.actions[P]=x}}return ir(E,S),ir(ut(E),S),Object.defineProperty(E,"$state",{get:()=>i.state.value[n],set:P=>{g(x=>{ir(x,P)})}}),i._p.forEach(P=>{ir(E,o.run(()=>P({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&t.hydrate&&t.hydrate(E.$state,p),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function zz(n,e,t){let i;const s=typeof e=="function";i=s?t:e;function r(o,a){const l=Rc();return o=o||(l?mn(Iw,null):null),o&&Xh(o),o=Pw,o._s.has(n)||(s?Dw(n,e,i,o):Bz(n,i,o)),o._s.get(n)}return r.$id=n,r}function Vz(n){const e=ut(n),t={};for(const i in e){const s=e[i];s.effect?t[i]=Me({get:()=>n[i],set(r){n[i]=r}}):(Pt(s)||Is(s))&&(t[i]=fS(n,i))}return t}const Hz=n=>{const e={};Object.entries(Object.assign({"/src/layouts/default.vue":()=>je(()=>import("./default-Bb1hdJNb.js"),__vite__mapDeps([0,1,2])),"/src/layouts/settings.vue":()=>je(()=>import("./settings-Y9Sl4QEx.js"),__vite__mapDeps([3,4,5,6,7,8,9,1,2,10])),"/src/layouts/stage.vue":()=>je(()=>import("./stage-CBKu5wDZ.js"),[])})).forEach(([s,r])=>{let o=s.replace("/src/layouts/","").replace(".vue","");e[o]=r});function i(s,r=!0){return s.map(o=>{var a,l,c,u,f,d;if(((a=o.children)==null?void 0:a.length)>0&&(o.children=i(o.children,!1)),r){if(!o.component&&((l=o.children)==null?void 0:l.find(p=>{var _;return(p.path===""||p.path==="/")&&((_=p.meta)==null?void 0:_.isLayout)})))return o;if(((c=o.meta)==null?void 0:c.layout)!==!1)return{path:o.path,component:e[((u=o.meta)==null?void 0:u.layout)||"default"],children:o.path==="/"?[o]:[{...o,path:""}],meta:{isLayout:!0}}}return(f=o.meta)!=null&&f.layout?{path:o.path,component:e[(d=o.meta)==null?void 0:d.layout],children:[{...o,path:""}],meta:{isLayout:!0}}:o})}return i(n)};/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const sa=typeof document<"u";function Ow(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function Gz(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&Ow(n.default)}const Mt=Object.assign;function xm(n,e){const t={};for(const i in e){const s=e[i];t[i]=Vi(s)?s.map(n):n(s)}return t}const Vl=()=>{},Vi=Array.isArray,Nw=/#/g,Wz=/&/g,Xz=/\//g,$z=/=/g,qz=/\?/g,Uw=/\+/g,Yz=/%5B/g,jz=/%5D/g,Fw=/%5E/g,Kz=/%60/g,kw=/%7B/g,Zz=/%7C/g,Bw=/%7D/g,Jz=/%20/g;function z_(n){return encodeURI(""+n).replace(Zz,"|").replace(Yz,"[").replace(jz,"]")}function Qz(n){return z_(n).replace(kw,"{").replace(Bw,"}").replace(Fw,"^")}function qg(n){return z_(n).replace(Uw,"%2B").replace(Jz,"+").replace(Nw,"%23").replace(Wz,"%26").replace(Kz,"`").replace(kw,"{").replace(Bw,"}").replace(Fw,"^")}function eV(n){return qg(n).replace($z,"%3D")}function tV(n){return z_(n).replace(Nw,"%23").replace(qz,"%3F")}function nV(n){return n==null?"":tV(n).replace(Xz,"%2F")}function xc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const iV=/\/$/,sV=n=>n.replace(iV,"");function Mm(n,e,t="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=n(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=lV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:xc(o)}}function rV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function _x(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function oV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Ia(e.matched[i],t.matched[s])&&zw(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Ia(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function zw(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!aV(n[t],e[t]))return!1;return!0}function aV(n,e){return Vi(n)?vx(n,e):Vi(e)?vx(e,n):n===e}function vx(n,e){return Vi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function lV(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=t.length-1,o,a;for(o=0;o1&&r--;else break;return t.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const tr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Mc;(function(n){n.pop="pop",n.push="push"})(Mc||(Mc={}));var Hl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Hl||(Hl={}));function cV(n){if(!n)if(sa){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),sV(n)}const uV=/^[^#]+#/;function fV(n,e){return n.replace(uV,"#")+e}function dV(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const $h=()=>({left:window.scrollX,top:window.scrollY});function hV(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=dV(s,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function yx(n,e){return(history.state?history.state.position-e:-1)+n}const Yg=new Map;function pV(n,e){Yg.set(n,e)}function mV(n){const e=Yg.get(n);return Yg.delete(n),e}let gV=()=>location.protocol+"//"+location.host;function Vw(n,e){const{pathname:t,search:i,hash:s}=e,r=n.indexOf("#");if(r>-1){let a=s.includes(n.slice(r))?n.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),_x(l,"")}return _x(t,n)+i+s}function _V(n,e,t,i){let s=[],r=[],o=null;const a=({state:d})=>{const h=Vw(n,location),p=t.value,_=e.value;let g=0;if(d){if(t.value=h,e.value=d,o&&o===p){o=null;return}g=_?d.position-_.position:0}else i(h);s.forEach(m=>{m(t.value,p,{delta:g,type:Mc.pop,direction:g?g>0?Hl.forward:Hl.back:Hl.unknown})})};function l(){o=t.value}function c(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return r.push(h),h}function u(){const{history:d}=window;d.state&&d.replaceState(Mt({},d.state,{scroll:$h()}),"")}function f(){for(const d of r)d();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function bx(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?$h():null}}function vV(n){const{history:e,location:t}=window,i={value:Vw(n,t)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=n.indexOf("#"),d=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:gV()+n+l;try{e[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(h){console.error(h),t[u?"replace":"assign"](d)}}function o(l,c){const u=Mt({},e.state,bx(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=Mt({},s.value,e.state,{forward:l,scroll:$h()});r(u.current,u,!0);const f=Mt({},bx(i.value,l,null),{position:u.position+1},c);r(l,f,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function yV(n){n=cV(n);const e=vV(n),t=_V(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=Mt({location:"",base:n,go:i,createHref:fV.bind(null,n)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function bV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),yV(n)}function xV(n){return typeof n=="string"||n&&typeof n=="object"}function Hw(n){return typeof n=="string"||typeof n=="symbol"}const Gw=Symbol("");var xx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(xx||(xx={}));function La(n,e){return Mt(new Error,{type:n,[Gw]:!0},e)}function ys(n,e){return n instanceof Error&&Gw in n&&(e==null||!!(n.type&e))}const Mx="[^/]+?",MV={sensitive:!1,strict:!1,start:!0,end:!0},SV=/[.+*?^${}()[\]/\\]/g;function EV(n,e){const t=Mt({},MV,e),i=[];let s=t.start?"^":"";const r=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function Ww(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const wV={type:0,value:""},AV=/[a-zA-Z0-9_]/;function CV(n){if(!n)return[[]];if(n==="/")return[[wV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(h){throw new Error(`ERR (${t})/"${c}": ${h}`)}let t=0,i=t;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function f(){c&&(t===0?r.push({type:0,value:c}):t===1||t===2||t===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a{o(b)}:Vl}function o(f){if(Hw(f)){const d=i.get(f);d&&(i.delete(f),t.splice(t.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=t.indexOf(f);d>-1&&(t.splice(d,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const d=DV(f,t);t.splice(d,0,f),f.record.name&&!wx(f)&&i.set(f.record.name,f)}function c(f,d){let h,p={},_,g;if("name"in f&&f.name){if(h=i.get(f.name),!h)throw La(1,{location:f});g=h.record.name,p=Mt(Ex(d.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Ex(f.params,h.keys.map(b=>b.name))),_=h.stringify(p)}else if(f.path!=null)_=f.path,h=t.find(b=>b.re.test(_)),h&&(p=h.parse(_),g=h.record.name);else{if(h=d.name?i.get(d.name):t.find(b=>b.re.test(d.path)),!h)throw La(1,{location:f,currentLocation:d});g=h.record.name,p=Mt({},d.params,f.params),_=h.stringify(p)}const m=[];let y=h;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:LV(m)}}n.forEach(f=>r(f));function u(){t.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Ex(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Tx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:IV(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function IV(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function wx(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function LV(n){return n.reduce((e,t)=>Mt(e,t.meta),{})}function Ax(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function DV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Ww(n,e[r])<0?i=r:t=r+1}const s=OV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function OV(n){let e=n;for(;e=e.parent;)if(Xw(e)&&Ww(n,e)===0)return e}function Xw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function NV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&qg(r)):[i&&qg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function UV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Vi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const FV=Symbol(""),Rx=Symbol(""),qh=Symbol(""),V_=Symbol(""),jg=Symbol("");function ul(){let n=[];function e(i){return n.push(i),()=>{const s=n.indexOf(i);s>-1&&n.splice(s,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function cr(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=d=>{d===!1?l(La(4,{from:t,to:e})):d instanceof Error?l(d):xV(d)?l(La(2,{from:e,to:d})):(o&&i.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},u=r(()=>n.call(i&&i.instances[s],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(d=>l(d))})}function Sm(n,e,t,i,s=r=>r()){const r=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(Ow(l)){const u=(l.__vccOpts||l)[e];u&&r.push(cr(u,t,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Gz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const h=(f.__vccOpts||f)[e];return h&&cr(h,t,i,o,a,s)()}))}}return r}function Px(n){const e=mn(qh),t=mn(V_),i=Me(()=>{const l=Ot(n.to);return e.resolve(l)}),s=Me(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const d=f.findIndex(Ia.bind(null,u));if(d>-1)return d;const h=Ix(l[c-2]);return c>1&&Ix(u)===h&&f[f.length-1].path!==h?f.findIndex(Ia.bind(null,l[c-2])):d}),r=Me(()=>s.value>-1&&HV(t.params,i.value.params)),o=Me(()=>s.value>-1&&s.value===t.matched.length-1&&zw(t.params,i.value.params));function a(l={}){if(VV(l)){const c=e[Ot(n.replace)?"replace":"push"](Ot(n.to)).catch(Vl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Me(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function kV(n){return n.length===1?n[0]:n}const BV=fn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Px,setup(n,{slots:e}){const t=xi(Px(n)),{options:i}=mn(qh),s=Me(()=>({[Lx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Lx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&kV(e.default(t));return n.custom?r:Ns("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),zV=BV;function VV(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function HV(n,e){for(const t in e){const i=e[t],s=n[t];if(typeof i=="string"){if(i!==s)return!1}else if(!Vi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Ix(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Lx=(n,e,t)=>n??e??t,GV=fn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=mn(jg),s=Me(()=>n.route||i.value),r=mn(Rx,0),o=Me(()=>{let c=Ot(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Me(()=>s.value.matched[o.value]);pr(Rx,Me(()=>o.value+1)),pr(FV,a),pr(jg,s);const l=et();return Xe(()=>[l.value,a.value,n.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Ia(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,d=f&&f.components[u];if(!d)return Dx(t.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,g=Ns(d,Mt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Dx(t.default,{Component:g,route:c})||g}}});function Dx(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const $w=GV;function WV(n){const e=PV(n.routes,n),t=n.parseQuery||NV,i=n.stringifyQuery||Cx,s=n.history,r=ul(),o=ul(),a=ul(),l=Oe(tr);let c=tr;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=xm.bind(null,$=>""+$),f=xm.bind(null,nV),d=xm.bind(null,xc);function h($,ae){let le,ce;return Hw($)?(le=e.getRecordMatcher($),ce=ae):ce=$,e.addRoute(ce,le)}function p($){const ae=e.getRecordMatcher($);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map($=>$.record)}function g($){return!!e.getRecordMatcher($)}function m($,ae){if(ae=Mt({},ae||l.value),typeof $=="string"){const w=Mm(t,$,ae.path),X=e.resolve({path:w.path},ae),G=s.createHref(w.fullPath);return Mt(w,X,{params:d(X.params),hash:xc(w.hash),redirectedFrom:void 0,href:G})}let le;if($.path!=null)le=Mt({},$,{path:Mm(t,$.path,ae.path).path});else{const w=Mt({},$.params);for(const X in w)w[X]==null&&delete w[X];le=Mt({},$,{params:f(w)}),ae.params=f(ae.params)}const ce=e.resolve(le,ae),He=$.hash||"";ce.params=u(d(ce.params));const F=rV(i,Mt({},$,{hash:Qz(He),path:ce.path})),k=s.createHref(F);return Mt({fullPath:F,hash:He,query:i===Cx?UV($.query):$.query||{}},ce,{redirectedFrom:void 0,href:k})}function y($){return typeof $=="string"?Mm(t,$,l.value.path):Mt({},$)}function b($,ae){if(c!==$)return La(8,{from:ae,to:$})}function v($){return S($)}function E($){return v(Mt(y($),{replace:!0}))}function T($){const ae=$.matched[$.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ce=typeof le=="function"?le($):le;return typeof ce=="string"&&(ce=ce.includes("?")||ce.includes("#")?ce=y(ce):{path:ce},ce.params={}),Mt({query:$.query,hash:$.hash,params:ce.path!=null?{}:$.params},ce)}}function S($,ae){const le=c=m($),ce=l.value,He=$.state,F=$.force,k=$.replace===!0,w=T(le);if(w)return S(Mt(y(w),{state:typeof w=="object"?Mt({},He,w.state):He,force:F,replace:k}),ae||le);const X=le;X.redirectedFrom=ae;let G;return!F&&oV(i,ce,le)&&(G=La(16,{to:X,from:ce}),se(ce,ce,!0,!1)),(G?Promise.resolve(G):M(X,ce)).catch(W=>ys(W)?ys(W,2)?W:be(W):J(W,X,ce)).then(W=>{if(W){if(ys(W,2))return S(Mt({replace:k},y(W.to),{state:typeof W.to=="object"?Mt({},He,W.to.state):He,force:F}),ae||X)}else W=N(X,ce,!0,k,He);return I(X,ce,W),W})}function P($,ae){const le=b($,ae);return le?Promise.reject(le):Promise.resolve()}function x($){const ae=re.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext($):$()}function M($,ae){let le;const[ce,He,F]=XV($,ae);le=Sm(ce.reverse(),"beforeRouteLeave",$,ae);for(const w of ce)w.leaveGuards.forEach(X=>{le.push(cr(X,$,ae))});const k=P.bind(null,$,ae);return le.push(k),xe(le).then(()=>{le=[];for(const w of r.list())le.push(cr(w,$,ae));return le.push(k),xe(le)}).then(()=>{le=Sm(He,"beforeRouteUpdate",$,ae);for(const w of He)w.updateGuards.forEach(X=>{le.push(cr(X,$,ae))});return le.push(k),xe(le)}).then(()=>{le=[];for(const w of F)if(w.beforeEnter)if(Vi(w.beforeEnter))for(const X of w.beforeEnter)le.push(cr(X,$,ae));else le.push(cr(w.beforeEnter,$,ae));return le.push(k),xe(le)}).then(()=>($.matched.forEach(w=>w.enterCallbacks={}),le=Sm(F,"beforeRouteEnter",$,ae,x),le.push(k),xe(le))).then(()=>{le=[];for(const w of o.list())le.push(cr(w,$,ae));return le.push(k),xe(le)}).catch(w=>ys(w,8)?w:Promise.reject(w))}function I($,ae,le){a.list().forEach(ce=>x(()=>ce($,ae,le)))}function N($,ae,le,ce,He){const F=b($,ae);if(F)return F;const k=ae===tr,w=sa?history.state:{};le&&(ce||k?s.replace($.fullPath,Mt({scroll:k&&w&&w.scroll},He)):s.push($.fullPath,He)),l.value=$,se($,ae,le,k),be()}let V;function j(){V||(V=s.listen(($,ae,le)=>{if(!ge.listening)return;const ce=m($),He=T(ce);if(He){S(Mt(He,{replace:!0,force:!0}),ce).catch(Vl);return}c=ce;const F=l.value;sa&&pV(yx(F.fullPath,le.delta),$h()),M(ce,F).catch(k=>ys(k,12)?k:ys(k,2)?(S(Mt(y(k.to),{force:!0}),ce).then(w=>{ys(w,20)&&!le.delta&&le.type===Mc.pop&&s.go(-1,!1)}).catch(Vl),Promise.reject()):(le.delta&&s.go(-le.delta,!1),J(k,ce,F))).then(k=>{k=k||N(ce,F,!1),k&&(le.delta&&!ys(k,8)?s.go(-le.delta,!1):le.type===Mc.pop&&ys(k,20)&&s.go(-1,!1)),I(ce,F,k)}).catch(Vl)}))}let te=ul(),Z=ul(),ee;function J($,ae,le){be($);const ce=Z.list();return ce.length?ce.forEach(He=>He($,ae,le)):console.error($),Promise.reject($)}function he(){return ee&&l.value!==tr?Promise.resolve():new Promise(($,ae)=>{te.add([$,ae])})}function be($){return ee||(ee=!$,j(),te.list().forEach(([ae,le])=>$?le($):ae()),te.reset()),$}function se($,ae,le,ce){const{scrollBehavior:He}=n;if(!sa||!He)return Promise.resolve();const F=!le&&mV(yx($.fullPath,0))||(ce||!le)&&history.state&&history.state.scroll||null;return wr().then(()=>He($,ae,F)).then(k=>k&&hV(k)).catch(k=>J(k,$,ae))}const ye=$=>s.go($);let Be;const re=new Set,ge={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:he,install($){const ae=this;$.component("RouterLink",zV),$.component("RouterView",$w),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ot(l)}),sa&&!Be&&l.value===tr&&(Be=!0,v(s.location).catch(He=>{}));const le={};for(const He in tr)Object.defineProperty(le,He,{get:()=>l.value[He],enumerable:!0});$.provide(qh,ae),$.provide(V_,oS(le)),$.provide(jg,l);const ce=$.unmount;re.add($),$.unmount=function(){re.delete($),re.size<1&&(c=tr,V&&V(),V=null,l.value=tr,Be=!1,ee=!1),ce()}}};function xe($){return $.reduce((ae,le)=>ae.then(()=>x(le)),Promise.resolve())}return ge}function XV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oIa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Ia(c,l))||s.push(l))}return[t,i,s]}function $V(){return mn(qh)}function OG(n){return mn(V_)}const qV=[{path:"/",name:"/",component:()=>je(()=>import("./index-BXn61H3H.js"),__vite__mapDeps([11,4,5,6,7,12,13,14,9,8,15,16,17,18,19,20,21,22,10,1,2,23,24,25,26])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-CoqBSN50.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio-CbrHTbIi.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-CAElzeUN.js"),__vite__mapDeps([27,28,10]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-D6nUliHw.js"),__vite__mapDeps([29,17,9]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-B7dDdCyb.js"),__vite__mapDeps([30,31]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-Oen8O70m.js"),__vite__mapDeps([32,28,33,10]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-BuTiRx_t.js"),__vite__mapDeps([34,15]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-DveSPBFG.js"),__vite__mapDeps([35,4,5,6,7,36,25,10])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-BCRPLUuu.js"),__vite__mapDeps([37,18,7,19,8,9,14,28,38,39,40,4,5,6,10,41,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-BV3jfrnh.js"),__vite__mapDeps([42,38,39,40,4,5,6,18,7,19,8,9,14,10]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-R5lVEmON.js"),__vite__mapDeps([43,41,4,5,6,7,10]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-ShTTK-bk.js"),__vite__mapDeps([44,39,40]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-B-G1GokQ.js"),__vite__mapDeps([45,4,5,6,7,46,22,20,10,40,25,47])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-CfAHq90W.js"),__vite__mapDeps([48,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-Dgjn_5PB.js"),__vite__mapDeps([49,36,4,5,21,6,7,33,46,22,20,10,40,50,25,51])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-D9G3cbGf.js"),__vite__mapDeps([52,4,5,6,7,53,36,50,25,10])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-Bdu7qyU-.js"),__vite__mapDeps([54,4,5,6,7,19,8,9,55,20,56,10,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-r86GQRQ8.js"),__vite__mapDeps([57,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-9VI9bErb.js"),__vite__mapDeps([58,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-C_w-q0H3.js"),__vite__mapDeps([59,60,4,5,10,6,7,8,9,14,61,56,62,24,55,20,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-Bhj7Acgo.js"),__vite__mapDeps([63,36,4,5,6,7,8,9,53,50,25,10])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"alibaba-cloud-model-studio",name:"/settings/providers/alibaba-cloud-model-studio",component:()=>je(()=>import("./alibaba-cloud-model-studio-Dsotw8H2.js"),__vite__mapDeps([64,4,5,6,7,8,9,14,60,10,65,66,22,20,61,56,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-Bb59KvNZ.js"),__vite__mapDeps([69,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-BUu3BYqf.js"),__vite__mapDeps([71,4,5,6,7,8,9,61,56,67,10,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-CEOMgyK9.js"),__vite__mapDeps([72,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-DaUCWrgU.js"),__vite__mapDeps([73,4,5,6,7,8,9,14,60,10,65,66,22,20,61,56,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-DEpw2GD4.js"),__vite__mapDeps([74,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-pAanQKa6.js"),__vite__mapDeps([75,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-BHkmDd8D.js"),__vite__mapDeps([76,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-D22NL1kj.js"),__vite__mapDeps([77,4,5,6,7,8,9,14,61,56,60,10,65,66,22,20,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-3GBsQ0V-.js"),__vite__mapDeps([78,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-GQSErYLo.js"),__vite__mapDeps([79,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-Bj8AIzPS.js"),__vite__mapDeps([80,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-BpQSwC2U.js"),__vite__mapDeps([81,4,5,6,7,8,9,56,66,22,20,10,61,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-DVEjYgEm.js"),__vite__mapDeps([82,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-DH4s4Ijd.js"),__vite__mapDeps([83,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-Bd3_7cAF.js"),__vite__mapDeps([84,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-BFyGxF3P.js"),__vite__mapDeps([85,4,5,6,7,8,9,14,61,56,60,10,65,66,22,20,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-BCkQH5yt.js"),__vite__mapDeps([86,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-5EHBT8-2.js"),__vite__mapDeps([87,36,50,7,25])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-DkqUMahb.js"),__vite__mapDeps([88,62,24,10]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-Dt1XFqWS.js"),__vite__mapDeps([89,23,16,7,15,6,62,24,10]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-CL6JuFTp.js"),__vite__mapDeps([90,15,16,7,62,24,10]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-Dav99Qqj.js"),__vite__mapDeps([91,15,16,7,62,24,10]))}]}]}],qw=(n,e)=>{if(typeof n=="number"){if(e===3)return{mode:"rgb",r:(n>>8&15|n>>4&240)/255,g:(n>>4&15|n&240)/255,b:(n&15|n<<4&240)/255};if(e===4)return{mode:"rgb",r:(n>>12&15|n>>8&240)/255,g:(n>>8&15|n>>4&240)/255,b:(n>>4&15|n&240)/255,alpha:(n&15|n<<4&240)/255};if(e===6)return{mode:"rgb",r:(n>>16&255)/255,g:(n>>8&255)/255,b:(n&255)/255};if(e===8)return{mode:"rgb",r:(n>>24&255)/255,g:(n>>16&255)/255,b:(n>>8&255)/255,alpha:(n&255)/255}}},YV={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},jV=n=>qw(YV[n.toLowerCase()],6),KV=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,ZV=n=>{let e;return(e=n.match(KV))?qw(parseInt(e[1],16),e[1].length):void 0},mr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Gl=`${mr}%`,H_=`(?:${mr}%|${mr})`,JV=`(?:${mr}(deg|grad|rad|turn)|${mr})`,Da="\\s*,\\s*",QV=new RegExp(`^rgba?\\(\\s*${mr}${Da}${mr}${Da}${mr}\\s*(?:,\\s*${H_}\\s*)?\\)$`),e6=new RegExp(`^rgba?\\(\\s*${Gl}${Da}${Gl}${Da}${Gl}\\s*(?:,\\s*${H_}\\s*)?\\)$`),t6=n=>{let e={mode:"rgb"},t;if(t=n.match(QV))t[1]!==void 0&&(e.r=t[1]/255),t[2]!==void 0&&(e.g=t[2]/255),t[3]!==void 0&&(e.b=t[3]/255);else if(t=n.match(e6))t[1]!==void 0&&(e.r=t[1]/100),t[2]!==void 0&&(e.g=t[2]/100),t[3]!==void 0&&(e.b=t[3]/100);else return;return t[4]!==void 0?e.alpha=Math.max(0,Math.min(1,t[4]/100)):t[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+t[5]))),e},n6=(n,e)=>n===void 0?void 0:typeof n!="object"?d6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,Yw=(n="rgb")=>e=>(e=n6(e,n))!==void 0?e.mode===n?e:Ji[e.mode][n]?Ji[e.mode][n](e):n==="rgb"?Ji[e.mode].rgb(e):Ji.rgb[n](Ji[e.mode].rgb(e)):void 0,Ji={},jw={},Od=[],Kw={},i6=n=>n,Et=n=>(Ji[n.mode]={...Ji[n.mode],...n.toMode},Object.keys(n.fromMode||{}).forEach(e=>{Ji[e]||(Ji[e]={}),Ji[e][n.mode]=n.fromMode[e]}),n.ranges||(n.ranges={}),n.difference||(n.difference={}),n.channels.forEach(e=>{if(n.ranges[e]===void 0&&(n.ranges[e]=[0,1]),!n.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof n.interpolate[e]=="function"&&(n.interpolate[e]={use:n.interpolate[e]}),n.interpolate[e].fixup||(n.interpolate[e].fixup=i6)}),jw[n.mode]=n,(n.parse||[]).forEach(e=>{r6(e,n.mode)}),Yw(n.mode)),s6=n=>jw[n],r6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");Kw[n]=e}else typeof n=="function"&&Od.indexOf(n)<0&&Od.push(n)},Kg=/[^\x00-\x7F]|[a-zA-Z_]/,o6=/[^\x00-\x7F]|[-\w]/,_e={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let $e=0;function uf(n){let e=n[$e],t=n[$e+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[$e+2]):e==="."?/\d/.test(t):/\d/.test(e)}function Zg(n){if($e>=n.length)return!1;let e=n[$e];if(Kg.test(e))return!0;if(e==="-"){if(n.length-$e<2)return!1;let t=n[$e+1];return!!(t==="-"||Kg.test(t))}return!1}const a6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function fl(n){let e="";if((n[$e]==="-"||n[$e]==="+")&&(e+=n[$e++]),e+=ff(n),n[$e]==="."&&/\d/.test(n[$e+1])&&(e+=n[$e++]+ff(n)),(n[$e]==="e"||n[$e]==="E")&&((n[$e+1]==="-"||n[$e+1]==="+")&&/\d/.test(n[$e+2])?e+=n[$e++]+n[$e++]+ff(n):/\d/.test(n[$e+1])&&(e+=n[$e++]+ff(n))),Zg(n)){let t=Nd(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:_e.Hue,value:e*a6[t]}:void 0}return n[$e]==="%"?($e++,{type:_e.Percentage,value:+e}):{type:_e.Number,value:+e}}function ff(n){let e="";for(;/\d/.test(n[$e]);)e+=n[$e++];return e}function Nd(n){let e="";for(;$e{},Vi=Array.isArray,Nw=/#/g,Wz=/&/g,Xz=/\//g,$z=/=/g,qz=/\?/g,Uw=/\+/g,Yz=/%5B/g,jz=/%5D/g,Fw=/%5E/g,Kz=/%60/g,kw=/%7B/g,Zz=/%7C/g,Bw=/%7D/g,Jz=/%20/g;function z_(n){return encodeURI(""+n).replace(Zz,"|").replace(Yz,"[").replace(jz,"]")}function Qz(n){return z_(n).replace(kw,"{").replace(Bw,"}").replace(Fw,"^")}function qg(n){return z_(n).replace(Uw,"%2B").replace(Jz,"+").replace(Nw,"%23").replace(Wz,"%26").replace(Kz,"`").replace(kw,"{").replace(Bw,"}").replace(Fw,"^")}function eV(n){return qg(n).replace($z,"%3D")}function tV(n){return z_(n).replace(Nw,"%23").replace(qz,"%3F")}function nV(n){return n==null?"":tV(n).replace(Xz,"%2F")}function xc(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const iV=/\/$/,sV=n=>n.replace(iV,"");function Mm(n,e,t="/"){let i,s={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(i=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),s=n(r)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=lV(i??e,t),{fullPath:i+(r&&"?")+r+o,path:i,query:s,hash:xc(o)}}function rV(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function _x(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function oV(n,e,t){const i=e.matched.length-1,s=t.matched.length-1;return i>-1&&i===s&&Ia(e.matched[i],t.matched[s])&&zw(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function Ia(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function zw(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!aV(n[t],e[t]))return!1;return!0}function aV(n,e){return Vi(n)?vx(n,e):Vi(e)?vx(e,n):n===e}function vx(n,e){return Vi(e)?n.length===e.length&&n.every((t,i)=>t===e[i]):n.length===1&&n[0]===e}function lV(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),i=n.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let r=t.length-1,o,a;for(o=0;o1&&r--;else break;return t.slice(0,r).join("/")+"/"+i.slice(o).join("/")}const tr={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Mc;(function(n){n.pop="pop",n.push="push"})(Mc||(Mc={}));var Hl;(function(n){n.back="back",n.forward="forward",n.unknown=""})(Hl||(Hl={}));function cV(n){if(!n)if(sa){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),sV(n)}const uV=/^[^#]+#/;function fV(n,e){return n.replace(uV,"#")+e}function dV(n,e){const t=document.documentElement.getBoundingClientRect(),i=n.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const $h=()=>({left:window.scrollX,top:window.scrollY});function hV(n){let e;if("el"in n){const t=n.el,i=typeof t=="string"&&t.startsWith("#"),s=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!s)return;e=dV(s,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function yx(n,e){return(history.state?history.state.position-e:-1)+n}const Yg=new Map;function pV(n,e){Yg.set(n,e)}function mV(n){const e=Yg.get(n);return Yg.delete(n),e}let gV=()=>location.protocol+"//"+location.host;function Vw(n,e){const{pathname:t,search:i,hash:s}=e,r=n.indexOf("#");if(r>-1){let a=s.includes(n.slice(r))?n.slice(r).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),_x(l,"")}return _x(t,n)+i+s}function _V(n,e,t,i){let s=[],r=[],o=null;const a=({state:d})=>{const h=Vw(n,location),p=t.value,_=e.value;let g=0;if(d){if(t.value=h,e.value=d,o&&o===p){o=null;return}g=_?d.position-_.position:0}else i(h);s.forEach(m=>{m(t.value,p,{delta:g,type:Mc.pop,direction:g?g>0?Hl.forward:Hl.back:Hl.unknown})})};function l(){o=t.value}function c(d){s.push(d);const h=()=>{const p=s.indexOf(d);p>-1&&s.splice(p,1)};return r.push(h),h}function u(){const{history:d}=window;d.state&&d.replaceState(Mt({},d.state,{scroll:$h()}),"")}function f(){for(const d of r)d();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function bx(n,e,t,i=!1,s=!1){return{back:n,current:e,forward:t,replaced:i,position:window.history.length,scroll:s?$h():null}}function vV(n){const{history:e,location:t}=window,i={value:Vw(n,t)},s={value:e.state};s.value||r(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const f=n.indexOf("#"),d=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:gV()+n+l;try{e[u?"replaceState":"pushState"](c,"",d),s.value=c}catch(h){console.error(h),t[u?"replace":"assign"](d)}}function o(l,c){const u=Mt({},e.state,bx(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});r(l,u,!0),i.value=l}function a(l,c){const u=Mt({},s.value,e.state,{forward:l,scroll:$h()});r(u.current,u,!0);const f=Mt({},bx(i.value,l,null),{position:u.position+1},c);r(l,f,!1),i.value=l}return{location:i,state:s,push:a,replace:o}}function yV(n){n=cV(n);const e=vV(n),t=_V(n,e.state,e.location,e.replace);function i(r,o=!0){o||t.pauseListeners(),history.go(r)}const s=Mt({location:"",base:n,go:i,createHref:fV.bind(null,n)},e,t);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function bV(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),yV(n)}function xV(n){return typeof n=="string"||n&&typeof n=="object"}function Hw(n){return typeof n=="string"||typeof n=="symbol"}const Gw=Symbol("");var xx;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(xx||(xx={}));function La(n,e){return Mt(new Error,{type:n,[Gw]:!0},e)}function ys(n,e){return n instanceof Error&&Gw in n&&(e==null||!!(n.type&e))}const Mx="[^/]+?",MV={sensitive:!1,strict:!1,start:!0,end:!0},SV=/[.+*?^${}()[\]/\\]/g;function EV(n,e){const t=Mt({},MV,e),i=[];let s=t.start?"^":"";const r=[];for(const c of n){const u=c.length?[]:[90];t.strict&&!c.length&&(s+="/");for(let f=0;fe.length?e.length===1&&e[0]===80?1:-1:0}function Ww(n,e){let t=0;const i=n.score,s=e.score;for(;t0&&e[e.length-1]<0}const wV={type:0,value:""},AV=/[a-zA-Z0-9_]/;function CV(n){if(!n)return[[]];if(n==="/")return[[wV]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(h){throw new Error(`ERR (${t})/"${c}": ${h}`)}let t=0,i=t;const s=[];let r;function o(){r&&s.push(r),r=[]}let a=0,l,c="",u="";function f(){c&&(t===0?r.push({type:0,value:c}):t===1||t===2||t===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function d(){c+=l}for(;a{o(b)}:Vl}function o(f){if(Hw(f)){const d=i.get(f);d&&(i.delete(f),t.splice(t.indexOf(d),1),d.children.forEach(o),d.alias.forEach(o))}else{const d=t.indexOf(f);d>-1&&(t.splice(d,1),f.record.name&&i.delete(f.record.name),f.children.forEach(o),f.alias.forEach(o))}}function a(){return t}function l(f){const d=DV(f,t);t.splice(d,0,f),f.record.name&&!wx(f)&&i.set(f.record.name,f)}function c(f,d){let h,p={},_,g;if("name"in f&&f.name){if(h=i.get(f.name),!h)throw La(1,{location:f});g=h.record.name,p=Mt(Ex(d.params,h.keys.filter(b=>!b.optional).concat(h.parent?h.parent.keys.filter(b=>b.optional):[]).map(b=>b.name)),f.params&&Ex(f.params,h.keys.map(b=>b.name))),_=h.stringify(p)}else if(f.path!=null)_=f.path,h=t.find(b=>b.re.test(_)),h&&(p=h.parse(_),g=h.record.name);else{if(h=d.name?i.get(d.name):t.find(b=>b.re.test(d.path)),!h)throw La(1,{location:f,currentLocation:d});g=h.record.name,p=Mt({},d.params,f.params),_=h.stringify(p)}const m=[];let y=h;for(;y;)m.unshift(y.record),y=y.parent;return{name:g,path:_,params:p,matched:m,meta:LV(m)}}n.forEach(f=>r(f));function u(){t.length=0,i.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function Ex(n,e){const t={};for(const i of e)i in n&&(t[i]=n[i]);return t}function Tx(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:IV(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function IV(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const i in n.components)e[i]=typeof t=="object"?t[i]:t;return e}function wx(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function LV(n){return n.reduce((e,t)=>Mt(e,t.meta),{})}function Ax(n,e){const t={};for(const i in n)t[i]=i in e?e[i]:n[i];return t}function DV(n,e){let t=0,i=e.length;for(;t!==i;){const r=t+i>>1;Ww(n,e[r])<0?i=r:t=r+1}const s=OV(n);return s&&(i=e.lastIndexOf(s,i-1)),i}function OV(n){let e=n;for(;e=e.parent;)if(Xw(e)&&Ww(n,e)===0)return e}function Xw({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function NV(n){const e={};if(n===""||n==="?")return e;const i=(n[0]==="?"?n.slice(1):n).split("&");for(let s=0;sr&&qg(r)):[i&&qg(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+t,r!=null&&(e+="="+r))})}return e}function UV(n){const e={};for(const t in n){const i=n[t];i!==void 0&&(e[t]=Vi(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const FV=Symbol(""),Rx=Symbol(""),qh=Symbol(""),V_=Symbol(""),jg=Symbol("");function ul(){let n=[];function e(i){return n.push(i),()=>{const s=n.indexOf(i);s>-1&&n.splice(s,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function cr(n,e,t,i,s,r=o=>o()){const o=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=d=>{d===!1?l(La(4,{from:t,to:e})):d instanceof Error?l(d):xV(d)?l(La(2,{from:e,to:d})):(o&&i.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},u=r(()=>n.call(i&&i.instances[s],e,t,c));let f=Promise.resolve(u);n.length<3&&(f=f.then(c)),f.catch(d=>l(d))})}function Sm(n,e,t,i,s=r=>r()){const r=[];for(const o of n)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(Ow(l)){const u=(l.__vccOpts||l)[e];u&&r.push(cr(u,t,i,o,a,s))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const f=Gz(u)?u.default:u;o.mods[a]=u,o.components[a]=f;const h=(f.__vccOpts||f)[e];return h&&cr(h,t,i,o,a,s)()}))}}return r}function Px(n){const e=mn(qh),t=mn(V_),i=Me(()=>{const l=Ot(n.to);return e.resolve(l)}),s=Me(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],f=t.matched;if(!u||!f.length)return-1;const d=f.findIndex(Ia.bind(null,u));if(d>-1)return d;const h=Ix(l[c-2]);return c>1&&Ix(u)===h&&f[f.length-1].path!==h?f.findIndex(Ia.bind(null,l[c-2])):d}),r=Me(()=>s.value>-1&&HV(t.params,i.value.params)),o=Me(()=>s.value>-1&&s.value===t.matched.length-1&&zw(t.params,i.value.params));function a(l={}){if(VV(l)){const c=e[Ot(n.replace)?"replace":"push"](Ot(n.to)).catch(Vl);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:i,href:Me(()=>i.value.href),isActive:r,isExactActive:o,navigate:a}}function kV(n){return n.length===1?n[0]:n}const BV=fn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Px,setup(n,{slots:e}){const t=xi(Px(n)),{options:i}=mn(qh),s=Me(()=>({[Lx(n.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[Lx(n.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const r=e.default&&kV(e.default(t));return n.custom?r:Ns("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:s.value},r)}}}),zV=BV;function VV(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function HV(n,e){for(const t in e){const i=e[t],s=n[t];if(typeof i=="string"){if(i!==s)return!1}else if(!Vi(s)||s.length!==i.length||i.some((r,o)=>r!==s[o]))return!1}return!0}function Ix(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const Lx=(n,e,t)=>n??e??t,GV=fn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const i=mn(jg),s=Me(()=>n.route||i.value),r=mn(Rx,0),o=Me(()=>{let c=Ot(r);const{matched:u}=s.value;let f;for(;(f=u[c])&&!f.components;)c++;return c}),a=Me(()=>s.value.matched[o.value]);pr(Rx,Me(()=>o.value+1)),pr(FV,a),pr(jg,s);const l=et();return Xe(()=>[l.value,a.value,n.name],([c,u,f],[d,h,p])=>{u&&(u.instances[f]=c,h&&h!==u&&c&&c===d&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Ia(u,h)||!d)&&(u.enterCallbacks[f]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,u=n.name,f=a.value,d=f&&f.components[u];if(!d)return Dx(t.default,{Component:d,route:c});const h=f.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,g=Ns(d,Mt({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(f.instances[u]=null)},ref:l}));return Dx(t.default,{Component:g,route:c})||g}}});function Dx(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const $w=GV;function WV(n){const e=PV(n.routes,n),t=n.parseQuery||NV,i=n.stringifyQuery||Cx,s=n.history,r=ul(),o=ul(),a=ul(),l=Oe(tr);let c=tr;sa&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=xm.bind(null,$=>""+$),f=xm.bind(null,nV),d=xm.bind(null,xc);function h($,ae){let le,ce;return Hw($)?(le=e.getRecordMatcher($),ce=ae):ce=$,e.addRoute(ce,le)}function p($){const ae=e.getRecordMatcher($);ae&&e.removeRoute(ae)}function _(){return e.getRoutes().map($=>$.record)}function g($){return!!e.getRecordMatcher($)}function m($,ae){if(ae=Mt({},ae||l.value),typeof $=="string"){const w=Mm(t,$,ae.path),X=e.resolve({path:w.path},ae),G=s.createHref(w.fullPath);return Mt(w,X,{params:d(X.params),hash:xc(w.hash),redirectedFrom:void 0,href:G})}let le;if($.path!=null)le=Mt({},$,{path:Mm(t,$.path,ae.path).path});else{const w=Mt({},$.params);for(const X in w)w[X]==null&&delete w[X];le=Mt({},$,{params:f(w)}),ae.params=f(ae.params)}const ce=e.resolve(le,ae),He=$.hash||"";ce.params=u(d(ce.params));const F=rV(i,Mt({},$,{hash:Qz(He),path:ce.path})),k=s.createHref(F);return Mt({fullPath:F,hash:He,query:i===Cx?UV($.query):$.query||{}},ce,{redirectedFrom:void 0,href:k})}function y($){return typeof $=="string"?Mm(t,$,l.value.path):Mt({},$)}function b($,ae){if(c!==$)return La(8,{from:ae,to:$})}function v($){return S($)}function E($){return v(Mt(y($),{replace:!0}))}function T($){const ae=$.matched[$.matched.length-1];if(ae&&ae.redirect){const{redirect:le}=ae;let ce=typeof le=="function"?le($):le;return typeof ce=="string"&&(ce=ce.includes("?")||ce.includes("#")?ce=y(ce):{path:ce},ce.params={}),Mt({query:$.query,hash:$.hash,params:ce.path!=null?{}:$.params},ce)}}function S($,ae){const le=c=m($),ce=l.value,He=$.state,F=$.force,k=$.replace===!0,w=T(le);if(w)return S(Mt(y(w),{state:typeof w=="object"?Mt({},He,w.state):He,force:F,replace:k}),ae||le);const X=le;X.redirectedFrom=ae;let G;return!F&&oV(i,ce,le)&&(G=La(16,{to:X,from:ce}),se(ce,ce,!0,!1)),(G?Promise.resolve(G):M(X,ce)).catch(W=>ys(W)?ys(W,2)?W:be(W):J(W,X,ce)).then(W=>{if(W){if(ys(W,2))return S(Mt({replace:k},y(W.to),{state:typeof W.to=="object"?Mt({},He,W.to.state):He,force:F}),ae||X)}else W=N(X,ce,!0,k,He);return I(X,ce,W),W})}function P($,ae){const le=b($,ae);return le?Promise.reject(le):Promise.resolve()}function x($){const ae=re.values().next().value;return ae&&typeof ae.runWithContext=="function"?ae.runWithContext($):$()}function M($,ae){let le;const[ce,He,F]=XV($,ae);le=Sm(ce.reverse(),"beforeRouteLeave",$,ae);for(const w of ce)w.leaveGuards.forEach(X=>{le.push(cr(X,$,ae))});const k=P.bind(null,$,ae);return le.push(k),xe(le).then(()=>{le=[];for(const w of r.list())le.push(cr(w,$,ae));return le.push(k),xe(le)}).then(()=>{le=Sm(He,"beforeRouteUpdate",$,ae);for(const w of He)w.updateGuards.forEach(X=>{le.push(cr(X,$,ae))});return le.push(k),xe(le)}).then(()=>{le=[];for(const w of F)if(w.beforeEnter)if(Vi(w.beforeEnter))for(const X of w.beforeEnter)le.push(cr(X,$,ae));else le.push(cr(w.beforeEnter,$,ae));return le.push(k),xe(le)}).then(()=>($.matched.forEach(w=>w.enterCallbacks={}),le=Sm(F,"beforeRouteEnter",$,ae,x),le.push(k),xe(le))).then(()=>{le=[];for(const w of o.list())le.push(cr(w,$,ae));return le.push(k),xe(le)}).catch(w=>ys(w,8)?w:Promise.reject(w))}function I($,ae,le){a.list().forEach(ce=>x(()=>ce($,ae,le)))}function N($,ae,le,ce,He){const F=b($,ae);if(F)return F;const k=ae===tr,w=sa?history.state:{};le&&(ce||k?s.replace($.fullPath,Mt({scroll:k&&w&&w.scroll},He)):s.push($.fullPath,He)),l.value=$,se($,ae,le,k),be()}let V;function j(){V||(V=s.listen(($,ae,le)=>{if(!ge.listening)return;const ce=m($),He=T(ce);if(He){S(Mt(He,{replace:!0,force:!0}),ce).catch(Vl);return}c=ce;const F=l.value;sa&&pV(yx(F.fullPath,le.delta),$h()),M(ce,F).catch(k=>ys(k,12)?k:ys(k,2)?(S(Mt(y(k.to),{force:!0}),ce).then(w=>{ys(w,20)&&!le.delta&&le.type===Mc.pop&&s.go(-1,!1)}).catch(Vl),Promise.reject()):(le.delta&&s.go(-le.delta,!1),J(k,ce,F))).then(k=>{k=k||N(ce,F,!1),k&&(le.delta&&!ys(k,8)?s.go(-le.delta,!1):le.type===Mc.pop&&ys(k,20)&&s.go(-1,!1)),I(ce,F,k)}).catch(Vl)}))}let te=ul(),Z=ul(),ee;function J($,ae,le){be($);const ce=Z.list();return ce.length?ce.forEach(He=>He($,ae,le)):console.error($),Promise.reject($)}function he(){return ee&&l.value!==tr?Promise.resolve():new Promise(($,ae)=>{te.add([$,ae])})}function be($){return ee||(ee=!$,j(),te.list().forEach(([ae,le])=>$?le($):ae()),te.reset()),$}function se($,ae,le,ce){const{scrollBehavior:He}=n;if(!sa||!He)return Promise.resolve();const F=!le&&mV(yx($.fullPath,0))||(ce||!le)&&history.state&&history.state.scroll||null;return wr().then(()=>He($,ae,F)).then(k=>k&&hV(k)).catch(k=>J(k,$,ae))}const ye=$=>s.go($);let Be;const re=new Set,ge={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:g,getRoutes:_,resolve:m,options:n,push:v,replace:E,go:ye,back:()=>ye(-1),forward:()=>ye(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:he,install($){const ae=this;$.component("RouterLink",zV),$.component("RouterView",$w),$.config.globalProperties.$router=ae,Object.defineProperty($.config.globalProperties,"$route",{enumerable:!0,get:()=>Ot(l)}),sa&&!Be&&l.value===tr&&(Be=!0,v(s.location).catch(He=>{}));const le={};for(const He in tr)Object.defineProperty(le,He,{get:()=>l.value[He],enumerable:!0});$.provide(qh,ae),$.provide(V_,oS(le)),$.provide(jg,l);const ce=$.unmount;re.add($),$.unmount=function(){re.delete($),re.size<1&&(c=tr,V&&V(),V=null,l.value=tr,Be=!1,ee=!1),ce()}}};function xe($){return $.reduce((ae,le)=>ae.then(()=>x(le)),Promise.resolve())}return ge}function XV(n,e){const t=[],i=[],s=[],r=Math.max(e.matched.length,n.matched.length);for(let o=0;oIa(c,a))?i.push(a):t.push(a));const l=n.matched[o];l&&(e.matched.find(c=>Ia(c,l))||s.push(l))}return[t,i,s]}function $V(){return mn(qh)}function OG(n){return mn(V_)}const qV=[{path:"/",name:"/",component:()=>je(()=>import("./index-fMkwekS6.js"),__vite__mapDeps([11,4,5,6,7,12,13,14,9,8,15,16,17,18,19,20,21,22,10,1,2,23,24,25,26])),meta:{layout:"stage",stageTransition:{name:"bubble-wave-out"}}},{path:"/:all(.*)",name:"/[...all]",component:()=>je(()=>import("./_...all_-64lFrRuT.js"),[])},{path:"/audio",name:"/audio",component:()=>je(()=>import("./audio--U4J5B5-.js"),[])},{path:"/devtools",children:[{path:"background-remove",name:"/devtools/background-remove",component:()=>je(()=>import("./background-remove-DG4rn_jW.js"),__vite__mapDeps([27,28,10]))},{path:"chat",name:"/devtools/chat",component:()=>je(()=>import("./chat-Du_qMEYx.js"),__vite__mapDeps([29,17,9]))},{path:"image",name:"/devtools/image",component:()=>je(()=>import("./image-457vStJH.js"),__vite__mapDeps([30,31]))},{path:"vibrant",name:"/devtools/vibrant",component:()=>je(()=>import("./vibrant-MRFE1Mkk.js"),__vite__mapDeps([32,28,33,10]))}]},{path:"/queue",name:"/queue",component:()=>je(()=>import("./queue-B-z77HZh.js"),__vite__mapDeps([34,15]))},{path:"/settings",children:[{path:"",name:"/settings/",component:()=>je(()=>import("./index-fFw9sI_s.js"),__vite__mapDeps([35,4,5,6,7,36,25,10])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"airi-card",children:[{path:"",name:"/settings/airi-card/",component:()=>je(()=>import("./index-BWcUvqbr.js"),__vite__mapDeps([37,18,7,19,8,9,14,28,38,39,40,4,5,6,10,41,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"components",children:[{path:"CardDetailDialog",name:"/settings/airi-card/components/CardDetailDialog",component:()=>je(()=>import("./CardDetailDialog-CmoHJwWd.js"),__vite__mapDeps([42,38,39,40,4,5,6,18,7,19,8,9,14,10]))},{path:"CardListItem",name:"/settings/airi-card/components/CardListItem",component:()=>je(()=>import("./CardListItem-B3688U82.js"),__vite__mapDeps([43,41,4,5,6,7,10]))},{path:"DeleteCardDialog",name:"/settings/airi-card/components/DeleteCardDialog",component:()=>je(()=>import("./DeleteCardDialog-CjX_zGnB.js"),__vite__mapDeps([44,39,40]))}]}]},{path:"appearance",children:[{path:"",name:"/settings/appearance/",component:()=>je(()=>import("./index-CNArLVJj.js"),__vite__mapDeps([45,4,5,6,7,46,22,20,10,40,25,47])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"memory",children:[{path:"",name:"/settings/memory/",component:()=>je(()=>import("./index-BLy_7xCj.js"),__vite__mapDeps([48,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"models",children:[{path:"",name:"/settings/models/",component:()=>je(()=>import("./index-DvtIggeg.js"),__vite__mapDeps([49,36,4,5,21,6,7,33,46,22,20,10,40,50,25,51])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]},{path:"modules",children:[{path:"",name:"/settings/modules/",component:()=>je(()=>import("./index-AE7leN3M.js"),__vite__mapDeps([52,4,5,6,7,53,36,50,25,10])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"consciousness",name:"/settings/modules/consciousness",component:()=>je(()=>import("./consciousness-BqrnV6uz.js"),__vite__mapDeps([54,4,5,6,7,19,8,9,55,20,56,10,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-long-term",name:"/settings/modules/memory-long-term",component:()=>je(()=>import("./memory-long-term-7F9G0rHp.js"),__vite__mapDeps([57,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"memory-short-term",name:"/settings/modules/memory-short-term",component:()=>je(()=>import("./memory-short-term-DW9sGSpx.js"),__vite__mapDeps([58,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"speech",name:"/settings/modules/speech",component:()=>je(()=>import("./speech-DslJ9VCL.js"),__vite__mapDeps([59,60,4,5,10,6,7,8,9,14,61,56,62,24,55,20,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"providers",children:[{path:"",name:"/settings/providers/",component:()=>je(()=>import("./index-CcNeofx3.js"),__vite__mapDeps([63,36,4,5,6,7,8,9,53,50,25,10])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}},{path:"alibaba-cloud-model-studio",name:"/settings/providers/alibaba-cloud-model-studio",component:()=>je(()=>import("./alibaba-cloud-model-studio-B6pk_ef1.js"),__vite__mapDeps([64,4,5,6,7,8,9,14,60,10,65,66,22,20,61,56,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"anthropic",name:"/settings/providers/anthropic",component:()=>je(()=>import("./anthropic-BqfnlV64.js"),__vite__mapDeps([69,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"cloudflare-workers-ai",name:"/settings/providers/cloudflare-workers-ai",component:()=>je(()=>import("./cloudflare-workers-ai-BLel_peE.js"),__vite__mapDeps([71,4,5,6,7,8,9,61,56,67,10,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"deepseek",name:"/settings/providers/deepseek",component:()=>je(()=>import("./deepseek-DJRX_KJQ.js"),__vite__mapDeps([72,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"elevenlabs",name:"/settings/providers/elevenlabs",component:()=>je(()=>import("./elevenlabs-CH5uoIl4.js"),__vite__mapDeps([73,4,5,6,7,8,9,14,60,10,65,66,22,20,61,56,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"featherless-ai",name:"/settings/providers/featherless-ai",component:()=>je(()=>import("./featherless-ai-BtKCHCM3.js"),__vite__mapDeps([74,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"fireworks-ai",name:"/settings/providers/fireworks-ai",component:()=>je(()=>import("./fireworks-ai-B3FRJ_5H.js"),__vite__mapDeps([75,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"google-generative-ai",name:"/settings/providers/google-generative-ai",component:()=>je(()=>import("./google-generative-ai-aFKQLVZT.js"),__vite__mapDeps([76,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"microsoft-speech",name:"/settings/providers/microsoft-speech",component:()=>je(()=>import("./microsoft-speech-BpwwCTsY.js"),__vite__mapDeps([77,4,5,6,7,8,9,14,61,56,60,10,65,66,22,20,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"mistral-ai",name:"/settings/providers/mistral-ai",component:()=>je(()=>import("./mistral-ai-BdVI7t8j.js"),__vite__mapDeps([78,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"moonshot-ai",name:"/settings/providers/moonshot-ai",component:()=>je(()=>import("./moonshot-ai-DjtPuycx.js"),__vite__mapDeps([79,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"novita-ai",name:"/settings/providers/novita-ai",component:()=>je(()=>import("./novita-ai-BIRgykIz.js"),__vite__mapDeps([80,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"ollama",name:"/settings/providers/ollama",component:()=>je(()=>import("./ollama-DMTLWCIi.js"),__vite__mapDeps([81,4,5,6,7,8,9,56,66,22,20,10,61,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openai",name:"/settings/providers/openai",component:()=>je(()=>import("./openai-CbZevItC.js"),__vite__mapDeps([82,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"openrouter-ai",name:"/settings/providers/openrouter-ai",component:()=>je(()=>import("./openrouter-ai-CEyG_wt7.js"),__vite__mapDeps([83,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"together-ai",name:"/settings/providers/together-ai",component:()=>je(()=>import("./together-ai-BS6nRHMX.js"),__vite__mapDeps([84,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"volcengine",name:"/settings/providers/volcengine",component:()=>je(()=>import("./volcengine-D4FqTSKw.js"),__vite__mapDeps([85,4,5,6,7,8,9,14,61,56,60,10,65,66,22,20,67,68,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}},{path:"xai",name:"/settings/providers/xai",component:()=>je(()=>import("./xai-dY1oJl1B.js"),__vite__mapDeps([86,4,5,6,7,8,9,66,22,20,10,61,56,67,68,70,25])),meta:{layout:"settings",stageTransition:{name:"slide"}}}]},{path:"scene",children:[{path:"",name:"/settings/scene/",component:()=>je(()=>import("./index-yo1PjPQx.js"),__vite__mapDeps([87,36,50,7,25])),meta:{layout:"settings",stageTransition:{name:"slide",pageSpecificAvailable:!0}}}]}]},{path:"/test",children:[{path:"filter-message",name:"/test/filter-message",component:()=>je(()=>import("./filter-message-C-jZFKv3.js"),__vite__mapDeps([88,62,24,10]))},{path:"queues",children:[{path:"delays",name:"/test/queues/delays",component:()=>je(()=>import("./delays-C8Nh_P2J.js"),__vite__mapDeps([89,23,16,7,15,6,62,24,10]))},{path:"emotions",name:"/test/queues/emotions",component:()=>je(()=>import("./emotions-DY0lA_Uh.js"),__vite__mapDeps([90,15,16,7,62,24,10]))},{path:"messages",name:"/test/queues/messages",component:()=>je(()=>import("./messages-BAFAGeqg.js"),__vite__mapDeps([91,15,16,7,62,24,10]))}]}]}],qw=(n,e)=>{if(typeof n=="number"){if(e===3)return{mode:"rgb",r:(n>>8&15|n>>4&240)/255,g:(n>>4&15|n&240)/255,b:(n&15|n<<4&240)/255};if(e===4)return{mode:"rgb",r:(n>>12&15|n>>8&240)/255,g:(n>>8&15|n>>4&240)/255,b:(n>>4&15|n&240)/255,alpha:(n&15|n<<4&240)/255};if(e===6)return{mode:"rgb",r:(n>>16&255)/255,g:(n>>8&255)/255,b:(n&255)/255};if(e===8)return{mode:"rgb",r:(n>>24&255)/255,g:(n>>16&255)/255,b:(n>>8&255)/255,alpha:(n&255)/255}}},YV={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},jV=n=>qw(YV[n.toLowerCase()],6),KV=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,ZV=n=>{let e;return(e=n.match(KV))?qw(parseInt(e[1],16),e[1].length):void 0},mr="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Gl=`${mr}%`,H_=`(?:${mr}%|${mr})`,JV=`(?:${mr}(deg|grad|rad|turn)|${mr})`,Da="\\s*,\\s*",QV=new RegExp(`^rgba?\\(\\s*${mr}${Da}${mr}${Da}${mr}\\s*(?:,\\s*${H_}\\s*)?\\)$`),e6=new RegExp(`^rgba?\\(\\s*${Gl}${Da}${Gl}${Da}${Gl}\\s*(?:,\\s*${H_}\\s*)?\\)$`),t6=n=>{let e={mode:"rgb"},t;if(t=n.match(QV))t[1]!==void 0&&(e.r=t[1]/255),t[2]!==void 0&&(e.g=t[2]/255),t[3]!==void 0&&(e.b=t[3]/255);else if(t=n.match(e6))t[1]!==void 0&&(e.r=t[1]/100),t[2]!==void 0&&(e.g=t[2]/100),t[3]!==void 0&&(e.b=t[3]/100);else return;return t[4]!==void 0?e.alpha=Math.max(0,Math.min(1,t[4]/100)):t[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+t[5]))),e},n6=(n,e)=>n===void 0?void 0:typeof n!="object"?d6(n):n.mode!==void 0?n:e?{...n,mode:e}:void 0,Yw=(n="rgb")=>e=>(e=n6(e,n))!==void 0?e.mode===n?e:Ji[e.mode][n]?Ji[e.mode][n](e):n==="rgb"?Ji[e.mode].rgb(e):Ji.rgb[n](Ji[e.mode].rgb(e)):void 0,Ji={},jw={},Od=[],Kw={},i6=n=>n,Et=n=>(Ji[n.mode]={...Ji[n.mode],...n.toMode},Object.keys(n.fromMode||{}).forEach(e=>{Ji[e]||(Ji[e]={}),Ji[e][n.mode]=n.fromMode[e]}),n.ranges||(n.ranges={}),n.difference||(n.difference={}),n.channels.forEach(e=>{if(n.ranges[e]===void 0&&(n.ranges[e]=[0,1]),!n.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof n.interpolate[e]=="function"&&(n.interpolate[e]={use:n.interpolate[e]}),n.interpolate[e].fixup||(n.interpolate[e].fixup=i6)}),jw[n.mode]=n,(n.parse||[]).forEach(e=>{r6(e,n.mode)}),Yw(n.mode)),s6=n=>jw[n],r6=(n,e)=>{if(typeof n=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");Kw[n]=e}else typeof n=="function"&&Od.indexOf(n)<0&&Od.push(n)},Kg=/[^\x00-\x7F]|[a-zA-Z_]/,o6=/[^\x00-\x7F]|[-\w]/,_e={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let $e=0;function uf(n){let e=n[$e],t=n[$e+1];return e==="-"||e==="+"?/\d/.test(t)||t==="."&&/\d/.test(n[$e+2]):e==="."?/\d/.test(t):/\d/.test(e)}function Zg(n){if($e>=n.length)return!1;let e=n[$e];if(Kg.test(e))return!0;if(e==="-"){if(n.length-$e<2)return!1;let t=n[$e+1];return!!(t==="-"||Kg.test(t))}return!1}const a6={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function fl(n){let e="";if((n[$e]==="-"||n[$e]==="+")&&(e+=n[$e++]),e+=ff(n),n[$e]==="."&&/\d/.test(n[$e+1])&&(e+=n[$e++]+ff(n)),(n[$e]==="e"||n[$e]==="E")&&((n[$e+1]==="-"||n[$e+1]==="+")&&/\d/.test(n[$e+2])?e+=n[$e++]+n[$e++]+ff(n):/\d/.test(n[$e+1])&&(e+=n[$e++]+ff(n))),Zg(n)){let t=Nd(n);return t==="deg"||t==="rad"||t==="turn"||t==="grad"?{type:_e.Hue,value:e*a6[t]}:void 0}return n[$e]==="%"?($e++,{type:_e.Percentage,value:+e}):{type:_e.Number,value:+e}}function ff(n){let e="";for(;/\d/.test(n[$e]);)e+=n[$e++];return e}function Nd(n){let e="";for(;$e4)){if(t.length===4){if(t[3].type!==_e.Alpha)return;t[3]=t[3].value}return t.length===3&&t.push({type:_e.None,value:void 0}),t.every(s=>s.type!==_e.Alpha)?t:void 0}}function f6(n,e){n._i=0;let t=n[n._i++];if(!t||t.type!==_e.Function)return;let i=Zw(n,e);if(i)return i.unshift(t.value),i}const d6=n=>{if(typeof n!="string")return;const e=c6(n),t=e?f6(e,!0):void 0;let i,s=0,r=Od.length;for(;sn==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,m6=(n,e,t)=>n+t*(e-n),g6=n=>{let e=[];for(let t=0;te=>{let t=g6(e);return i=>{let s=i*t.length,r=i>=1?t.length-1:Math.max(Math.floor(s),0),o=t[r];return o===void 0?void 0:n(o[0],o[1],s-r)}},we=_6(m6),on=n=>{let e=!1,t=n.map(i=>i!==void 0?(e=!0,i):1);return e?t:n},Wa={mode:"rgb",channels:["r","g","b","alpha"],parse:[h6,ZV,t6,jV,p6,"srgb"],serialize:"srgb",interpolate:{r:we,g:we,b:we,alpha:{use:we,fixup:on}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Em=(n=0)=>Math.pow(Math.abs(n),563/256)*Math.sign(n),Ox=n=>{let e=Em(n.r),t=Em(n.g),i=Em(n.b),s={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*t+.1882286462349947*i,y:.297344975250536*e+.6273635662554661*t+.0752914584939979*i,z:.0270313613864123*e+.0706888525358272*t+.9913375368376386*i};return n.alpha!==void 0&&(s.alpha=n.alpha),s},Tm=n=>Math.pow(Math.abs(n),256/563)*Math.sign(n),Nx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"a98",r:Tm(n*2.0415879038107465-e*.5650069742788597-.3447313507783297*t),g:Tm(n*-.9692436362808798+e*1.8759675015077206+.0415550574071756*t),b:Tm(n*.0134442806320312-e*.1183623922310184+1.0151749943912058*t)};return i!==void 0&&(s.alpha=i),s},wm=(n=0)=>{const e=Math.abs(n);return e<=.04045?n/12.92:(Math.sign(n)||1)*Math.pow((e+.055)/1.055,2.4)},Xa=({r:n,g:e,b:t,alpha:i})=>{let s={mode:"lrgb",r:wm(n),g:wm(e),b:wm(t)};return i!==void 0&&(s.alpha=i),s},Do=n=>{let{r:e,g:t,b:i,alpha:s}=Xa(n),r={mode:"xyz65",x:.4123907992659593*e+.357584339383878*t+.1804807884018343*i,y:.2126390058715102*e+.715168678767756*t+.0721923153607337*i,z:.0193308187155918*e+.119194779794626*t+.9505321522496607*i};return s!==void 0&&(r.alpha=s),r},Am=(n=0)=>{const e=Math.abs(n);return e>.0031308?(Math.sign(n)||1)*(1.055*Math.pow(e,1/2.4)-.055):n*12.92},$a=({r:n,g:e,b:t,alpha:i},s="rgb")=>{let r={mode:s,r:Am(n),g:Am(e),b:Am(t)};return i!==void 0&&(r.alpha=i),r},Oo=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=$a({r:n*3.2409699419045226-e*1.537383177570094-.4986107602930034*t,g:n*-.9692436362808796+e*1.8759675015077204+.0415550574071756*t,b:n*.0556300796969936-e*.2039769588889765+1.0569715142428784*t});return i!==void 0&&(s.alpha=i),s},v6={...Wa,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:n=>Nx(Do(n)),xyz65:Nx},toMode:{rgb:n=>Oo(Ox(n)),xyz65:Ox}},yn=n=>(n=n%360)<0?n+360:n,y6=(n,e)=>n.map((t,i,s)=>{if(t===void 0)return t;let r=yn(t);return i===0||n[i-1]===void 0?r:e(r-yn(s[i-1]))}).reduce((t,i)=>!t.length||i===void 0||t[t.length-1]===void 0?(t.push(i),t):(t.push(i+t[t.length-1]),t),[]),Xs=n=>y6(n,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),ln=[-.14861,1.78277,-.29227,-.90649,1.97294,0],b6=Math.PI/180,x6=180/Math.PI;let Ux=ln[3]*ln[4],Fx=ln[1]*ln[4],kx=ln[1]*ln[2]-ln[0]*ln[3];const M6=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(kx*t+n*Ux-e*Fx)/(kx+Ux-Fx),r=t-s,o=(ln[4]*(e-s)-ln[2]*r)/ln[3],a={mode:"cubehelix",l:s,s:s===0||s===1?void 0:Math.sqrt(r*r+o*o)/(ln[4]*s*(1-s))};return a.s&&(a.h=Math.atan2(o,r)*x6-120),i!==void 0&&(a.alpha=i),a},S6=({h:n,s:e,l:t,alpha:i})=>{let s={mode:"rgb"};n=(n===void 0?0:n+120)*b6,t===void 0&&(t=0);let r=e===void 0?0:e*t*(1-t),o=Math.cos(n),a=Math.sin(n);return s.r=t+r*(ln[0]*o+ln[1]*a),s.g=t+r*(ln[2]*o+ln[3]*a),s.b=t+r*(ln[4]*o+ln[5]*a),i!==void 0&&(s.alpha=i),s},Yh=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.s||!e.s)return 0;let t=yn(n.h),i=yn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.s*e.s)*s},E6=(n,e)=>{if(n.h===void 0||e.h===void 0)return 0;let t=yn(n.h),i=yn(e.h);return Math.abs(i-t)>180?t-(i-360*Math.sign(i-t)):i-t},jh=(n,e)=>{if(n.h===void 0||e.h===void 0||!n.c||!e.c)return 0;let t=yn(n.h),i=yn(e.h),s=Math.sin((i-t+360)/2*Math.PI/180);return 2*Math.sqrt(n.c*e.c)*s},$s=n=>{let e=n.reduce((i,s)=>{if(s!==void 0){let r=s*Math.PI/180;i.sin+=Math.sin(r),i.cos+=Math.cos(r)}return i},{sin:0,cos:0}),t=Math.atan2(e.sin,e.cos)*180/Math.PI;return t<0?360+t:t},T6={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:M6},toMode:{rgb:S6},interpolate:{h:{use:we,fixup:Xs},s:we,l:we,alpha:{use:we,fixup:on}},difference:{h:Yh},average:{h:$s}},Mr=({l:n,a:e,b:t,alpha:i},s="lch")=>{e===void 0&&(e=0),t===void 0&&(t=0);let r=Math.sqrt(e*e+t*t),o={mode:s,l:n,c:r};return r&&(o.h=yn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(o.alpha=i),o},Sr=({l:n,c:e,h:t,alpha:i},s="lab")=>{t===void 0&&(t=0);let r={mode:s,l:n,a:e?e*Math.cos(t/180*Math.PI):0,b:e?e*Math.sin(t/180*Math.PI):0};return i!==void 0&&(r.alpha=i),r},Jw=Math.pow(29,3)/Math.pow(3,3),Qw=Math.pow(6,3)/Math.pow(29,3),Jt={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},_a={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Cm=n=>Math.pow(n,3)>Qw?Math.pow(n,3):(116*n-16)/Jw;const eA=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+16)/116,r=e/500+s,o=s-t/200,a={mode:"xyz65",x:Cm(r)*_a.X,y:Cm(s)*_a.Y,z:Cm(o)*_a.Z};return i!==void 0&&(a.alpha=i),a},Kh=n=>Oo(eA(n)),Rm=n=>n>Qw?Math.cbrt(n):(Jw*n+16)/116,tA=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Rm(n/_a.X),r=Rm(e/_a.Y),o=Rm(t/_a.Z),a={mode:"lab65",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},Zh=n=>{let e=tA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Ud=1,nA=1,Sc=26/180*Math.PI,Fd=Math.cos(Sc),kd=Math.sin(Sc),iA=100/Math.log(139/100),Jg=({l:n,c:e,h:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"lab65",l:(Math.exp(n*Ud/iA)-1)/.0039},r=(Math.exp(.0435*e*nA*Ud)-1)/.075,o=r*Math.cos(t/180*Math.PI-Sc),a=r*Math.sin(t/180*Math.PI-Sc);return s.a=o*Fd-a/.83*kd,s.b=o*kd+a/.83*Fd,i!==void 0&&(s.alpha=i),s},Qg=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=e*Fd+t*kd,r=.83*(t*Fd-e*kd),o=Math.sqrt(s*s+r*r),a={mode:"dlch",l:iA/Ud*Math.log(1+.0039*n),c:Math.log(1+.075*o)/(.0435*nA*Ud)};return a.c&&(a.h=yn((Math.atan2(r,s)+Sc)/Math.PI*180)),i!==void 0&&(a.alpha=i),a},Bx=n=>Jg(Mr(n,"dlch")),zx=n=>Sr(Qg(n),"dlab"),w6={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Bx,rgb:n=>Kh(Bx(n))},fromMode:{lab65:zx,rgb:n=>zx(Zh(n))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:we,a:we,b:we,alpha:{use:we,fixup:on}}},A6={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Jg,dlab:n=>Sr(n,"dlab"),rgb:n=>Kh(Jg(n))},fromMode:{lab65:Qg,dlab:n=>Mr(n,"dlch"),rgb:n=>Qg(Zh(n))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:we,c:we,h:{use:we,fixup:Xs},alpha:{use:we,fixup:on}},difference:{h:jh},average:{h:$s}};function C6({h:n,s:e,i:t,alpha:i}){n=yn(n!==void 0?n:0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.abs(n/60%2-1),r;switch(Math.floor(n/60)){case 0:r={r:t*(1+e*(3/(2-s)-1)),g:t*(1+e*(3*(1-s)/(2-s)-1)),b:t*(1-e)};break;case 1:r={r:t*(1+e*(3*(1-s)/(2-s)-1)),g:t*(1+e*(3/(2-s)-1)),b:t*(1-e)};break;case 2:r={r:t*(1-e),g:t*(1+e*(3/(2-s)-1)),b:t*(1+e*(3*(1-s)/(2-s)-1))};break;case 3:r={r:t*(1-e),g:t*(1+e*(3*(1-s)/(2-s)-1)),b:t*(1+e*(3/(2-s)-1))};break;case 4:r={r:t*(1+e*(3*(1-s)/(2-s)-1)),g:t*(1-e),b:t*(1+e*(3/(2-s)-1))};break;case 5:r={r:t*(1+e*(3/(2-s)-1)),g:t*(1-e),b:t*(1+e*(3*(1-s)/(2-s)-1))};break;default:r={r:t*(1-e),g:t*(1-e),b:t*(1-e)}}return r.mode="rgb",i!==void 0&&(r.alpha=i),r}function R6({r:n,g:e,b:t,alpha:i}){n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.max(n,e,t),r=Math.min(n,e,t),o={mode:"hsi",s:n+e+t===0?0:1-3*r/(n+e+t),i:(n+e+t)/3};return s-r!==0&&(o.h=(s===n?(e-t)/(s-r)+(e{switch(e){case"deg":return+n;case"rad":return n/Math.PI*180;case"grad":return n/10*9;case"turn":return n*360}},O6=new RegExp(`^hsla?\\(\\s*${JV}${Da}${Gl}${Da}${Gl}\\s*(?:,\\s*${H_}\\s*)?\\)$`),N6=n=>{let e=n.match(O6);if(!e)return;let t={mode:"hsl"};return e[3]!==void 0?t.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(t.h=D6(e[1],e[2])),e[4]!==void 0&&(t.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(t.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?t.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+e[7]))),t};function U6(n,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const t={mode:"hsl"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Percentage)return;t.h=i.value}if(s.type!==_e.None){if(s.type===_e.Hue)return;t.s=s.value/100}if(r.type!==_e.None){if(r.type===_e.Hue)return;t.l=r.value/100}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const sA={mode:"hsl",toMode:{rgb:I6},fromMode:{rgb:L6},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[U6,N6],serialize:n=>`hsl(${n.h!==void 0?n.h:"none"} ${n.s!==void 0?n.s*100+"%":"none"} ${n.l!==void 0?n.l*100+"%":"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{h:{use:we,fixup:Xs},s:we,l:we,alpha:{use:we,fixup:on}},difference:{h:Yh},average:{h:$s}};function rA({h:n,s:e,v:t,alpha:i}){n=yn(n!==void 0?n:0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.abs(n/60%2-1),r;switch(Math.floor(n/60)){case 0:r={r:t,g:t*(1-e*s),b:t*(1-e)};break;case 1:r={r:t*(1-e*s),g:t,b:t*(1-e)};break;case 2:r={r:t*(1-e),g:t,b:t*(1-e*s)};break;case 3:r={r:t*(1-e),g:t*(1-e*s),b:t};break;case 4:r={r:t*(1-e*s),g:t*(1-e),b:t};break;case 5:r={r:t,g:t*(1-e),b:t*(1-e*s)};break;default:r={r:t*(1-e),g:t*(1-e),b:t*(1-e)}}return r.mode="rgb",i!==void 0&&(r.alpha=i),r}function oA({r:n,g:e,b:t,alpha:i}){n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.max(n,e,t),r=Math.min(n,e,t),o={mode:"hsv",s:s===0?0:1-r/s,v:s};return s-r!==0&&(o.h=(s===n?(e-t)/(s-r)+(e1){let s=e+t;e/=s,t/=s}return rA({h:n,s:t===1?1:1-e/(1-t),v:1-t,alpha:i})}function k6(n){let e=oA(n);if(e===void 0)return;let t=e.s!==void 0?e.s:0,i=e.v!==void 0?e.v:0,s={mode:"hwb",w:(1-t)*i,b:1-i};return e.h!==void 0&&(s.h=e.h),e.alpha!==void 0&&(s.alpha=e.alpha),s}function B6(n,e){if(!e||e[0]!=="hwb")return;const t={mode:"hwb"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Percentage)return;t.h=i.value}if(s.type!==_e.None){if(s.type===_e.Hue)return;t.w=s.value/100}if(r.type!==_e.None){if(r.type===_e.Hue)return;t.b=r.value/100}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const z6={mode:"hwb",toMode:{rgb:F6},fromMode:{rgb:k6},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[B6],serialize:n=>`hwb(${n.h!==void 0?n.h:"none"} ${n.w!==void 0?n.w*100+"%":"none"} ${n.b!==void 0?n.b*100+"%":"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{h:{use:we,fixup:Xs},w:we,b:we,alpha:{use:we,fixup:on}},difference:{h:E6},average:{h:$s}},lA=203,Jh=.1593017578125,cA=78.84375,Qh=.8359375,ep=18.8515625,tp=18.6875;function Pm(n){if(n<0)return 0;const e=Math.pow(n,1/cA);return 1e4*Math.pow(Math.max(0,e-Qh)/(ep-tp*e),1/Jh)}function Im(n){if(n<0)return 0;const e=Math.pow(n/1e4,Jh);return Math.pow((Qh+ep*e)/(1+tp*e),cA)}const Lm=n=>Math.max(n/lA,0),Vx=({i:n,t:e,p:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s=Pm(n+.008609037037932761*e+.11102962500302593*t),r=Pm(n-.00860903703793275*e-.11102962500302599*t),o=Pm(n+.5600313357106791*e-.32062717498731885*t),a={mode:"xyz65",x:Lm(2.070152218389422*s-1.3263473389671556*r+.2066510476294051*o),y:Lm(.3647385209748074*s+.680566024947227*r-.0453045459220346*o),z:Lm(-.049747207535812*s-.0492609666966138*r+1.1880659249923042*o)};return i!==void 0&&(a.alpha=i),a},Dm=(n=0)=>Math.max(n*lA,0),Hx=({x:n,y:e,z:t,alpha:i})=>{const s=Dm(n),r=Dm(e),o=Dm(t),a=Im(.3592832590121217*s+.6976051147779502*r-.0358915932320289*o),l=Im(-.1920808463704995*s+1.1004767970374323*r+.0753748658519118*o),c=Im(.0070797844607477*s+.0748396662186366*r+.8433265453898765*o),u=.5*a+.5*l,f=1.61376953125*a-3.323486328125*l+1.709716796875*c,d=4.378173828125*a-4.24560546875*l-.132568359375*c,h={mode:"itp",i:u,t:f,p:d};return i!==void 0&&(h.alpha=i),h},V6={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Vx,rgb:n=>Oo(Vx(n))},fromMode:{xyz65:Hx,rgb:n=>Hx(Do(n))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:we,t:we,p:we,alpha:{use:we,fixup:on}}},H6=134.03437499999998,G6=16295499532821565e-27,Om=n=>{if(n<0)return 0;let e=Math.pow(n/1e4,Jh);return Math.pow((Qh+ep*e)/(1+tp*e),H6)},Nm=(n=0)=>Math.max(n*203,0),uA=({x:n,y:e,z:t,alpha:i})=>{n=Nm(n),e=Nm(e),t=Nm(t);let s=1.15*n-.15*t,r=.66*e+.34*n,o=Om(.41478972*s+.579999*r+.014648*t),a=Om(-.20151*s+1.120649*r+.0531008*t),l=Om(-.0166008*s+.2648*r+.6684799*t),c=(o+a)/2,u={mode:"jab",j:.44*c/(1-.56*c)-G6,a:3.524*o-4.066708*a+.542708*l,b:.199076*o+1.096799*a-1.295875*l};return i!==void 0&&(u.alpha=i),u},W6=134.03437499999998,Gx=16295499532821565e-27,Um=n=>{if(n<0)return 0;let e=Math.pow(n,1/W6);return 1e4*Math.pow((Qh-e)/(tp*e-ep),1/Jh)},Fm=n=>n/203,fA=({j:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+Gx)/(.44+.56*(n+Gx)),r=Um(s+.13860504*e+.058047316*t),o=Um(s-.13860504*e-.058047316*t),a=Um(s-.096019242*e-.8118919*t),l={mode:"xyz65",x:Fm(1.661373024652174*r-.914523081304348*o+.23136208173913045*a),y:Fm(-.3250758611844533*r+1.571847026732543*o-.21825383453227928*a),z:Fm(-.090982811*r-.31272829*o+1.5227666*a)};return i!==void 0&&(l.alpha=i),l},dA=n=>{let e=uA(Do(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},hA=n=>Oo(fA(n)),X6={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:dA,xyz65:uA},toMode:{rgb:hA,xyz65:fA},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:we,a:we,b:we,alpha:{use:we,fixup:on}}},Wx=({j:n,a:e,b:t,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.sqrt(e*e+t*t),r={mode:"jch",j:n,c:s};return s&&(r.h=yn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},Xx=({j:n,c:e,h:t,alpha:i})=>{t===void 0&&(t=0);let s={mode:"jab",j:n,a:e?e*Math.cos(t/180*Math.PI):0,b:e?e*Math.sin(t/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},$6={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Xx,rgb:n=>hA(Xx(n))},fromMode:{rgb:n=>Wx(dA(n)),jab:Wx},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:we,fixup:Xs},c:we,j:we,alpha:{use:we,fixup:on}},difference:{h:jh},average:{h:$s}},np=Math.pow(29,3)/Math.pow(3,3),G_=Math.pow(6,3)/Math.pow(29,3);let km=n=>Math.pow(n,3)>G_?Math.pow(n,3):(116*n-16)/np;const W_=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=(n+16)/116,r=e/500+s,o=s-t/200,a={mode:"xyz50",x:km(r)*Jt.X,y:km(s)*Jt.Y,z:km(o)*Jt.Z};return i!==void 0&&(a.alpha=i),a},Zc=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=$a({r:n*3.1341359569958707-e*1.6173863321612538-.4906619460083532*t,g:n*-.978795502912089+e*1.916254567259524+.03344273116131949*t,b:n*.07195537988411677-e*.2289768264158322+1.405386058324125*t});return i!==void 0&&(s.alpha=i),s},pA=n=>Zc(W_(n)),Jc=n=>{let{r:e,g:t,b:i,alpha:s}=Xa(n),r={mode:"xyz50",x:.436065742824811*e+.3851514688337912*t+.14307845442264197*i,y:.22249319175623702*e+.7168870538238823*t+.06061979053616537*i,z:.013923904500943465*e+.09708128566574634*t+.7140993584005155*i};return s!==void 0&&(r.alpha=s),r},Bm=n=>n>G_?Math.cbrt(n):(np*n+16)/116,X_=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Bm(n/Jt.X),r=Bm(e/Jt.Y),o=Bm(t/Jt.Z),a={mode:"lab",l:116*r-16,a:500*(s-r),b:200*(r-o)};return i!==void 0&&(a.alpha=i),a},mA=n=>{let e=X_(Jc(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e};function q6(n,e){if(!e||e[0]!=="lab")return;const t={mode:"lab"},[,i,s,r,o]=e;if(!(i.type===_e.Hue||s.type===_e.Hue||r.type===_e.Hue))return i.type!==_e.None&&(t.l=Math.min(Math.max(0,i.value),100)),s.type!==_e.None&&(t.a=s.type===_e.Number?s.value:s.value*125/100),r.type!==_e.None&&(t.b=r.type===_e.Number?r.value:r.value*125/100),o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const $_={mode:"lab",toMode:{xyz50:W_,rgb:pA},fromMode:{xyz50:X_,rgb:mA},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-100,100],b:[-100,100]},parse:[q6],serialize:n=>`lab(${n.l!==void 0?n.l:"none"} ${n.a!==void 0?n.a:"none"} ${n.b!==void 0?n.b:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{l:we,a:we,b:we,alpha:{use:we,fixup:on}}},Y6={...$_,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:eA,rgb:Kh},fromMode:{xyz65:tA,rgb:Zh},ranges:{l:[0,100],a:[-86.182,98.234],b:[-107.86,94.477]}};function j6(n,e){if(!e||e[0]!=="lch")return;const t={mode:"lch"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Hue)return;t.l=Math.min(Math.max(0,i.value),100)}if(s.type!==_e.None&&(t.c=Math.max(0,s.type===_e.Number?s.value:s.value*150/100)),r.type!==_e.None){if(r.type===_e.Percentage)return;t.h=r.value}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const q_={mode:"lch",toMode:{lab:Sr,rgb:n=>pA(Sr(n))},fromMode:{rgb:n=>Mr(mA(n)),lab:Mr},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[j6],serialize:n=>`lch(${n.l!==void 0?n.l:"none"} ${n.c!==void 0?n.c:"none"} ${n.h!==void 0?n.h:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,interpolate:{h:{use:we,fixup:Xs},c:we,l:we,alpha:{use:we,fixup:on}},difference:{h:jh},average:{h:$s}},K6={...q_,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:n=>Sr(n,"lab65"),rgb:n=>Kh(Sr(n,"lab65"))},fromMode:{rgb:n=>Mr(Zh(n),"lch65"),lab65:n=>Mr(n,"lch65")},ranges:{l:[0,100],c:[0,133.807],h:[0,360]}},gA=({l:n,u:e,v:t,alpha:i})=>{e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.sqrt(e*e+t*t),r={mode:"lchuv",l:n,c:s};return s&&(r.h=yn(Math.atan2(t,e)*180/Math.PI)),i!==void 0&&(r.alpha=i),r},_A=({l:n,c:e,h:t,alpha:i})=>{t===void 0&&(t=0);let s={mode:"luv",l:n,u:e?e*Math.cos(t/180*Math.PI):0,v:e?e*Math.sin(t/180*Math.PI):0};return i!==void 0&&(s.alpha=i),s},vA=(n,e,t)=>4*n/(n+15*e+3*t),yA=(n,e,t)=>9*e/(n+15*e+3*t),Z6=vA(Jt.X,Jt.Y,Jt.Z),J6=yA(Jt.X,Jt.Y,Jt.Z),Q6=n=>n<=G_?np*n:116*Math.cbrt(n)-16,e0=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Q6(e/Jt.Y),r=vA(n,e,t),o=yA(n,e,t);!isFinite(r)||!isFinite(o)?s=r=o=0:(r=13*s*(r-Z6),o=13*s*(o-J6));let a={mode:"luv",l:s,u:r,v:o};return i!==void 0&&(a.alpha=i),a},eH=(n,e,t)=>4*n/(n+15*e+3*t),tH=(n,e,t)=>9*e/(n+15*e+3*t),nH=eH(Jt.X,Jt.Y,Jt.Z),iH=tH(Jt.X,Jt.Y,Jt.Z),t0=({l:n,u:e,v:t,alpha:i})=>{if(n===void 0&&(n=0),n===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),t===void 0&&(t=0);let s=e/(13*n)+nH,r=t/(13*n)+iH,o=Jt.Y*(n<=8?n/np:Math.pow((n+16)/116,3)),a=o*(9*s)/(4*r),l=o*(12-3*s-20*r)/(4*r),c={mode:"xyz50",x:a,y:o,z:l};return i!==void 0&&(c.alpha=i),c},sH=n=>gA(e0(Jc(n))),rH=n=>Zc(t0(_A(n))),oH={mode:"lchuv",toMode:{luv:_A,rgb:rH},fromMode:{rgb:sH,luv:gA},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:we,fixup:Xs},c:we,l:we,alpha:{use:we,fixup:on}},difference:{h:jh},average:{h:$s}},aH={...Wa,mode:"lrgb",toMode:{rgb:$a},fromMode:{rgb:Xa},parse:["srgb-linear"],serialize:"srgb-linear"},lH={mode:"luv",toMode:{xyz50:t0,rgb:n=>Zc(t0(n))},fromMode:{xyz50:e0,rgb:n=>e0(Jc(n))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:we,u:we,v:we,alpha:{use:we,fixup:on}}},bA=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.cbrt(.41222147079999993*n+.5363325363*e+.0514459929*t),r=Math.cbrt(.2119034981999999*n+.6806995450999999*e+.1073969566*t),o=Math.cbrt(.08830246189999998*n+.2817188376*e+.6299787005000002*t),a={mode:"oklab",l:.2104542553*s+.793617785*r-.0040720468*o,a:1.9779984951*s-2.428592205*r+.4505937099*o,b:.0259040371*s+.7827717662*r-.808675766*o};return i!==void 0&&(a.alpha=i),a},ip=n=>{let e=bA(Xa(n));return n.r===n.b&&n.b===n.g&&(e.a=e.b=0),e},Qc=({l:n,a:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=Math.pow(n*.9999999984505198+.39633779217376786*e+.2158037580607588*t,3),r=Math.pow(n*1.0000000088817609-.10556134232365635*e-.06385417477170591*t,3),o=Math.pow(n*1.0000000546724108-.08948418209496575*e-1.2914855378640917*t,3),a={mode:"lrgb",r:4.076741661347994*s-3.307711590408193*r+.230969928729428*o,g:-1.2684380040921763*s+2.6097574006633715*r-.3413193963102197*o,b:-.004196086541837188*s-.7034186144594493*r+1.7076147009309444*o};return i!==void 0&&(a.alpha=i),a},sp=n=>$a(Qc(n));function n0(n){const i=1.170873786407767;return .5*(i*n-.206+Math.sqrt((i*n-.206)*(i*n-.206)+4*.03*i*n))}function Bd(n){return(n*n+.206*n)/(1.170873786407767*(n+.03))}function cH(n,e){let t,i,s,r,o,a,l,c;-1.88170328*n-.80936493*e>1?(t=1.19086277,i=1.76576728,s=.59662641,r=.75515197,o=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*n-1.19445276*e>1?(t=.73956515,i=-.45954404,s=.08285427,r=.1254107,o=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(t=1.35733652,i=-.00915799,s=-1.1513021,r=-.50559606,o=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let u=t+i*n+s*e+r*n*n+o*n*e,f=.3963377774*n+.2158037573*e,d=-.1055613458*n-.0638541728*e,h=-.0894841775*n-1.291485548*e;{let p=1+u*f,_=1+u*d,g=1+u*h,m=p*p*p,y=_*_*_,b=g*g*g,v=3*f*p*p,E=3*d*_*_,T=3*h*g*g,S=6*f*f*p,P=6*d*d*_,x=6*h*h*g,M=a*m+l*y+c*b,I=a*v+l*E+c*T,N=a*S+l*P+c*x;u=u-M*I/(I*I-.5*M*N)}return u}function Y_(n,e){let t=cH(n,e),i=Qc({l:1,a:t*n,b:t*e}),s=Math.cbrt(1/Math.max(i.r,i.g,i.b)),r=s*t;return[s,r]}function uH(n,e,t,i,s,r=null){r||(r=Y_(n,e));let o;if((t-s)*r[1]-(r[0]-s)*i<=0)o=r[1]*s/(i*r[0]+r[1]*(s-t));else{o=r[1]*(s-1)/(i*(r[0]-1)+r[1]*(s-t));{let a=t-s,l=i,c=.3963377774*n+.2158037573*e,u=-.1055613458*n-.0638541728*e,f=-.0894841775*n-1.291485548*e,d=a+l*c,h=a+l*u,p=a+l*f;{let _=s*(1-o)+o*t,g=o*i,m=_+g*c,y=_+g*u,b=_+g*f,v=m*m*m,E=y*y*y,T=b*b*b,S=3*d*m*m,P=3*h*y*y,x=3*p*b*b,M=6*d*d*m,I=6*h*h*y,N=6*p*p*b,V=4.0767416621*v-3.3077115913*E+.2309699292*T-1,j=4.0767416621*S-3.3077115913*P+.2309699292*x,te=4.0767416621*M-3.3077115913*I+.2309699292*N,Z=j/(j*j-.5*V*te),ee=-V*Z,J=-1.2684380046*v+2.6097574011*E-.3413193965*T-1,he=-1.2684380046*S+2.6097574011*P-.3413193965*x,be=-1.2684380046*M+2.6097574011*I-.3413193965*N,se=he/(he*he-.5*J*be),ye=-J*se,Be=-.0041960863*v-.7034186147*E+1.707614701*T-1,re=-.0041960863*S-.7034186147*P+1.707614701*x,ge=-.0041960863*M-.7034186147*I+1.707614701*N,xe=re/(re*re-.5*Be*ge),$=-Be*xe;ee=Z>=0?ee:1e6,ye=se>=0?ye:1e6,$=xe>=0?$:1e6,o+=Math.min(ee,Math.min(ye,$))}}}return o}function j_(n,e,t=null){t||(t=Y_(n,e));let i=t[0],s=t[1];return[s/i,s/(1-i)]}function xA(n,e,t){let i=Y_(e,t),s=uH(e,t,n,1,n,i),r=j_(e,t,i),o=.11516993+1/(7.4477897+4.1590124*t+e*(-2.19557347+1.75198401*t+e*(-2.13704948-10.02301043*t+e*(-4.24894561+5.38770819*t+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*t+e*(.40370612+.90148123*t+e*(-.27087943+.6122399*t+e*(.00299215-.45399568*t-.14661872*e)))),l=s/Math.min(n*r[0],(1-n)*r[1]),c=n*o,u=(1-n)*a,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(u*u*u*u))));return c=n*.4,u=(1-n)*.8,[Math.sqrt(1/(1/(c*c)+1/(u*u))),f,s]}function $x(n){const e=n.l!==void 0?n.l:0,t=n.a!==void 0?n.a:0,i=n.b!==void 0?n.b:0,s={mode:"okhsl",l:n0(e)};n.alpha!==void 0&&(s.alpha=n.alpha);let r=Math.sqrt(t*t+i*i);if(!r)return s.s=0,s;let[o,a,l]=xA(e,t/r,i/r),c;if(r$x(ip(n))},toMode:{oklab:qx,rgb:n=>sp(qx(n))}};function Yx(n){let e=n.l!==void 0?n.l:0,t=n.a!==void 0?n.a:0,i=n.b!==void 0?n.b:0,s=Math.sqrt(t*t+i*i),r=s?t/s:1,o=s?i/s:1,[a,l]=j_(r,o),c=.5,u=1-c/a,f=l/(s+e*l),d=f*e,h=f*s,p=Bd(d),_=h*p/d,g=Qc({l:p,a:r*_,b:o*_}),m=Math.cbrt(1/Math.max(g.r,g.g,g.b,0));e=e/m,s=s/m*n0(e)/e,e=n0(e);const y={mode:"okhsv",s:s?(c+l)*h/(l*c+l*u*h):0,v:e?e/d:0};return y.s&&(y.h=yn(Math.atan2(i,t)*180/Math.PI)),n.alpha!==void 0&&(y.alpha=n.alpha),y}function jx(n){const e={mode:"oklab"};n.alpha!==void 0&&(e.alpha=n.alpha);const t=n.h!==void 0?n.h:0,i=n.s!==void 0?n.s:0,s=n.v!==void 0?n.v:0,r=Math.cos(t/180*Math.PI),o=Math.sin(t/180*Math.PI),[a,l]=j_(r,o),c=.5,u=1-c/a,f=1-i*c/(c+l-l*u*i),d=i*l*c/(c+l-l*u*i),h=Bd(f),p=d*h/f,_=Qc({l:h,a:r*p,b:o*p}),g=Math.cbrt(1/Math.max(_.r,_.g,_.b,0)),m=Bd(s*f),y=d*m/f;return e.l=m*g,e.a=y*r*g,e.b=y*o*g,e}const dH={...aA,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Yx,rgb:n=>Yx(ip(n))},toMode:{oklab:jx,rgb:n=>sp(jx(n))}};function hH(n,e){if(!e||e[0]!=="oklab")return;const t={mode:"oklab"},[,i,s,r,o]=e;if(!(i.type===_e.Hue||s.type===_e.Hue||r.type===_e.Hue))return i.type!==_e.None&&(t.l=Math.min(Math.max(0,i.type===_e.Number?i.value:i.value/100),1)),s.type!==_e.None&&(t.a=s.type===_e.Number?s.value:s.value*.4/100),r.type!==_e.None&&(t.b=r.type===_e.Number?r.value:r.value*.4/100),o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const pH={...$_,mode:"oklab",toMode:{lrgb:Qc,rgb:sp},fromMode:{lrgb:bA,rgb:ip},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[hH],serialize:n=>`oklab(${n.l!==void 0?n.l:"none"} ${n.a!==void 0?n.a:"none"} ${n.b!==void 0?n.b:"none"}${n.alpha<1?` / ${n.alpha}`:""})`};function mH(n,e){if(!e||e[0]!=="oklch")return;const t={mode:"oklch"},[,i,s,r,o]=e;if(i.type!==_e.None){if(i.type===_e.Hue)return;t.l=Math.min(Math.max(0,i.type===_e.Number?i.value:i.value/100),1)}if(s.type!==_e.None&&(t.c=Math.max(0,s.type===_e.Number?s.value:s.value*.4/100)),r.type!==_e.None){if(r.type===_e.Percentage)return;t.h=r.value}return o.type!==_e.None&&(t.alpha=Math.min(1,Math.max(0,o.type===_e.Number?o.value:o.value/100))),t}const gH={...q_,mode:"oklch",toMode:{oklab:n=>Sr(n,"oklab"),rgb:n=>sp(Sr(n,"oklab"))},fromMode:{rgb:n=>Mr(ip(n),"oklch"),oklab:n=>Mr(n,"oklch")},parse:[mH],serialize:n=>`oklch(${n.l!==void 0?n.l:"none"} ${n.c!==void 0?n.c:"none"} ${n.h!==void 0?n.h:"none"}${n.alpha<1?` / ${n.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Kx=n=>{let{r:e,g:t,b:i,alpha:s}=Xa(n),r={mode:"xyz65",x:.486570948648216*e+.265667693169093*t+.1982172852343625*i,y:.2289745640697487*e+.6917385218365062*t+.079286914093745*i,z:0*e+.0451133818589026*t+1.043944368900976*i};return s!==void 0&&(r.alpha=s),r},Zx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s=$a({r:n*2.4934969119414263-e*.9313836179191242-.402710784450717*t,g:n*-.8294889695615749+e*1.7626640603183465+.0236246858419436*t,b:n*.0358458302437845-e*.0761723892680418+.9568845240076871*t},"p3");return i!==void 0&&(s.alpha=i),s},_H={...Wa,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:n=>Zx(Do(n)),xyz65:Zx},toMode:{rgb:n=>Oo(Kx(n)),xyz65:Kx}},zm=n=>{let e=Math.abs(n);return e>=1/512?Math.sign(n)*Math.pow(e,1/1.8):16*n},Jx=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"prophoto",r:zm(n*1.3457868816471585-e*.2555720873797946-.0511018649755453*t),g:zm(n*-.5446307051249019+e*1.5082477428451466+.0205274474364214*t),b:zm(n*0+e*0+1.2119675456389452*t)};return i!==void 0&&(s.alpha=i),s},Vm=(n=0)=>{let e=Math.abs(n);return e>=16/512?Math.sign(n)*Math.pow(e,1.8):n/16},Qx=n=>{let e=Vm(n.r),t=Vm(n.g),i=Vm(n.b),s={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*t+.0313477341283922*i,y:.2880748288194013*e+.7118352342418731*t+899369387256e-16*i,z:0*e+0*t+.8251046025104602*i};return n.alpha!==void 0&&(s.alpha=n.alpha),s},vH={...Wa,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Jx,rgb:n=>Jx(Jc(n))},toMode:{xyz50:Qx,rgb:n=>Zc(Qx(n))}},eM=1.09929682680944,yH=.018053968510807,Hm=n=>{const e=Math.abs(n);return e>yH?(Math.sign(n)||1)*(eM*Math.pow(e,.45)-(eM-1)):4.5*n},tM=({x:n,y:e,z:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);let s={mode:"rec2020",r:Hm(n*1.7166511879712683-e*.3556707837763925-.2533662813736599*t),g:Hm(n*-.6666843518324893+e*1.6164812366349395+.0157685458139111*t),b:Hm(n*.0176398574453108-e*.0427706132578085+.9421031212354739*t)};return i!==void 0&&(s.alpha=i),s},nM=1.09929682680944,bH=.018053968510807,Gm=(n=0)=>{let e=Math.abs(n);return e{let e=Gm(n.r),t=Gm(n.g),i=Gm(n.b),s={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*t+.1688809751641721*i,y:.262700212011267*e+.6779980715188708*t+.059301716469862*i,z:0*e+.0280726930490874*t+1.0609850577107909*i};return n.alpha!==void 0&&(s.alpha=n.alpha),s},xH={...Wa,mode:"rec2020",fromMode:{xyz65:tM,rgb:n=>tM(Do(n))},toMode:{xyz65:iM,rgb:n=>Oo(iM(n))},parse:["rec2020"],serialize:"rec2020"},yo=.0037930732552754493,MA=Math.cbrt(yo),Wm=n=>Math.cbrt(n)-MA,MH=n=>{const{r:e,g:t,b:i,alpha:s}=Xa(n),r=Wm(.3*e+.622*t+.078*i+yo),o=Wm(.23*e+.692*t+.078*i+yo),a=Wm(.2434226892454782*e+.2047674442449682*t+.5518098665095535*i+yo),l={mode:"xyb",x:(r-o)/2,y:(r+o)/2,b:a-(r+o)/2};return s!==void 0&&(l.alpha=s),l},Xm=n=>Math.pow(n+MA,3),SH=({x:n,y:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s=Xm(n+e)-yo,r=Xm(e-n)-yo,o=Xm(t+e)-yo,a=$a({r:11.031566904639861*s-9.866943908131562*r-.16462299650829934*o,g:-3.2541473810744237*s+4.418770377582723*r-.16462299650829934*o,b:-3.6588512867136815*s+2.7129230459360922*r+1.9459282407775895*o});return i!==void 0&&(a.alpha=i),a},EH={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:SH},fromMode:{rgb:MH},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:we,y:we,b:we,alpha:{use:we,fixup:on}}},TH={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Zc,lab:X_},fromMode:{rgb:Jc,lab:W_},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:we,y:we,z:we,alpha:{use:we,fixup:on}}},wH=n=>{let{x:e,y:t,z:i,alpha:s}=n;e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0);let r={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*t-.0501922295431356*i,y:.0296278156881593*e+.990434484573249*t-.0170738250293851*i,z:-.0092430581525912*e+.0150551448965779*t+.7518742899580008*i};return s!==void 0&&(r.alpha=s),r},AH=n=>{let{x:e,y:t,z:i,alpha:s}=n;e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0);let r={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*t+.0632593086610217*i,y:-.0283697069632081*e+1.0099954580058226*t+.021041398966943*i,z:.0123140016883199*e-.0205076964334779*t+1.3303659366080753*i};return s!==void 0&&(r.alpha=s),r},CH={mode:"xyz65",toMode:{rgb:Oo,xyz50:wH},fromMode:{rgb:Do,xyz50:AH},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:we,y:we,z:we,alpha:{use:we,fixup:on}}},RH=({r:n,g:e,b:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s={mode:"yiq",y:.29889531*n+.58662247*e+.11448223*t,i:.59597799*n-.2741761*e-.32180189*t,q:.21147017*n-.52261711*e+.31114694*t};return i!==void 0&&(s.alpha=i),s},PH=({y:n,i:e,q:t,alpha:i})=>{n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0);const s={mode:"rgb",r:n+.95608445*e+.6208885*t,g:n-.27137664*e-.6486059*t,b:n-1.10561724*e+1.70250126*t};return i!==void 0&&(s.alpha=i),s},IH={mode:"yiq",toMode:{rgb:PH},fromMode:{rgb:RH},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:we,i:we,q:we,alpha:{use:we,fixup:on}}};Et(v6);Et(T6);Et(w6);Et(A6);Et(P6);Et(sA);Et(aA);Et(z6);Et(V6);Et(X6);Et($6);Et($_);Et(Y6);Et(q_);Et(K6);Et(oH);Et(aH);Et(lH);Et(fH);Et(dH);Et(pH);Et(gH);Et(_H);Et(vH);Et(xH);Et(Wa);Et(EH);Et(TH);Et(CH);Et(IH);const i0=220.44,LH=Yw("oklch"),sM=n=>{var e;return n?(e=LH(n))==null?void 0:e.h:i0},DH=zz("settings",()=>{const n=et(),e=vs("settings/language","en-US"),t=vs("settings/stage/view/model-renderer","2d"),i=vs("settings/audio/input","false"),s=Me(()=>{var T;return(T=n.value)==null?void 0:T.deviceId}),{audioInputs:r,ensurePermissions:o}=WB({constraints:{audio:!0}}),a=et(),l=et("/assets/live2d/models/hiyori_pro_zh.zip"),c=et("url"),u=et(!1),f=vs("settings/live2d/position",{x:0,y:0}),d=et({group:"Idle",index:0}),h=et([]),p=vs("settings/live2d/motion-map",{}),_=vs("settings/disable-transitions",!0),g=vs("settings/use-page-specific-transitions",!0),m=vs("settings/theme/colors/hue",i0),y=vs("settings/theme/colors/hue-dynamic",!1);function b(T=i0){m.value=T,y.value=!1}function v(T){b(sM(T))}function E(T){if(y.value)return!1;const S=sM(T);if(!S)return!1;const P=Math.abs(S-m.value);return P<.01||P>359.99}return Xe(i,T=>{T==="false"&&(n.value=void 0),T==="true"&&o().then(()=>{n.value=r.value[0]})}),Xe(r,()=>{i.value==="true"&&!n.value&&(n.value=r.value[0])},{immediate:!0}),{live2dModelFile:a,live2dModelUrl:l,live2dLoadSource:c,live2dCurrentMotion:d,live2dPosition:f,availableLive2dMotions:h,live2dMotionMap:p,loadingLive2dModel:u,disableTransitions:_,usePageSpecificTransitions:g,language:e,stageView:t,themeColorsHue:m,themeColorsHueDynamic:y,isAudioInputOn:i,selectedAudioDevice:n,selectedAudioDeviceId:s,setThemeColorsHue:b,applyPrimaryColorFrom:v,isColorSelectedForPrimary:E}}),OH=fn({__name:"ArrowTransition",props:{stageTransition:{default:()=>({primaryColor:"#666",secondaryColor:"#ccc"})}},setup(n){const e=n,t=Me(()=>e.stageTransition),i=Me(()=>t.value.primaryColor||"#666"),s=Me(()=>t.value.secondaryColor||"#ccc");return Hn(()=>{document.documentElement.style.setProperty("--stage-transition-3-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-3-overlay-color-2",s.value)}),(r,o)=>(gn(),yi("div",{class:"stage-transition-3",style:Si({zIndex:t.value.zIndex||100})},null,4))}}),No=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},NH=No(OH,[["__scopeId","data-v-df576df0"]]),UH=fn({__name:"BubbleWaveOutTransition",props:{stageTransition:null},setup(n){const e=n,t=Me(()=>{var i;return((i=e.stageTransition)==null?void 0:i.colors)||["#eee","#ebcb8b","#c56370","#3f3b52"]});return Hn(()=>{var i,s;document.documentElement.style.setProperty("--circle-expansion-delay",`${((i=e.stageTransition)==null?void 0:i.delay)||0}s`),document.documentElement.style.setProperty("--circle-expansion-duration",`${((s=e.stageTransition)==null?void 0:s.duration)||.4}s`),t.value.forEach((r,o)=>{document.documentElement.style.setProperty(`--circle-expansion-color-${o+1}`,r)})}),(i,s)=>{var r;return gn(),yi("div",{class:"circle-expansion-transition",style:Si({zIndex:((r=n.stageTransition)==null?void 0:r.zIndex)||100})},[(gn(!0),yi(jt,null,d2(t.value,(o,a)=>(gn(),yi("div",{key:a}))),128))],4)}}}),FH=No(UH,[["__scopeId","data-v-0c29056c"]]),kH=fn({__name:"FantasyFallTransition",props:{stageTransition:null},setup(n){const e=n,t=Me(()=>{var s;return((s=e.stageTransition)==null?void 0:s.direction)||"up"}),i=Me(()=>`fantasy-fall-${t.value}`);return Hn(()=>{var s,r,o,a,l,c,u,f,d;document.documentElement.style.setProperty("--fantasy-fall-color",((s=e.stageTransition)==null?void 0:s.primaryColor)||"#eee"),document.documentElement.style.setProperty("--fantasy-fall-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--fantasy-fall-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--fantasy-fall-radius-sm",`${((l=(a=e.stageTransition)==null?void 0:a.borderRadius)==null?void 0:l.sm)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-md",`${((u=(c=e.stageTransition)==null?void 0:c.borderRadius)==null?void 0:u.md)||"14rem"}`),document.documentElement.style.setProperty("--fantasy-fall-radius-lg",`${((d=(f=e.stageTransition)==null?void 0:f.borderRadius)==null?void 0:d.lg)||"50%"}`)}),(s,r)=>{var o;return gn(),yi("div",{class:Ua(["fantasy-fall-transition",i.value]),style:Si({zIndex:((o=n.stageTransition)==null?void 0:o.zIndex)??100})},null,6)}}}),BH=No(kH,[["__scopeId","data-v-e62bf496"]]),zH=fn({__name:"MultipleBlocksRevealTransition",props:{stageTransition:null},setup(n){const e=n,t=Me(()=>e.stageTransition),i=Me(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Me(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Hn(()=>{document.documentElement.style.setProperty("--stage-transition-4-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-4-overlay-color-2",s.value)}),(r,o)=>{var a;return gn(),yi("div",{class:"stage-transition-4",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},o[0]||(o[0]=[X2('
',5)]),4)}}}),VH=No(zH,[["__scopeId","data-v-6d1179fc"]]),HH=fn({__name:"SlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Me(()=>e.stageTransition),i=Me(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)||"#666"}),s=Me(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)||"#ccc"});return Xe([t,i,s],()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),Hn(()=>{document.documentElement.style.setProperty("--stage-transition-1-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-1-overlay-color-2",s.value)}),(r,o)=>{var a;return gn(),yi("div",{class:"stage-transition-1",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),GH=No(HH,[["__scopeId","data-v-bf1d1566"]]),WH=fn({__name:"SlopeSlideTransition",props:{stageTransition:null},setup(n){const e=n,t=Me(()=>e.stageTransition),i=Me(()=>{var r;return((r=t.value)==null?void 0:r.primaryColor)??"#666"}),s=Me(()=>{var r;return((r=t.value)==null?void 0:r.secondaryColor)??"#ccc"});return Hn(()=>{document.documentElement.style.setProperty("--stage-transition-2-overlay-color-1",i.value),document.documentElement.style.setProperty("--stage-transition-2-overlay-color-2",s.value)}),(r,o)=>{var a;return gn(),yi("div",{class:"stage-transition-2",style:Si({zIndex:((a=t.value)==null?void 0:a.zIndex)??100})},null,4)}}}),XH=No(WH,[["__scopeId","data-v-8ff7120f"]]),$H=fn({__name:"RectanglesRotateTransition",props:{stageTransition:null},setup(n){const e=n;return Hn(()=>{var t,i,s,r,o,a,l;document.documentElement.style.setProperty("--rectangle-rotate-1-color",((t=e.stageTransition)==null?void 0:t.primaryColor)||"#ebcb8b"),document.documentElement.style.setProperty("--rectangle-rotate-2-color",((i=e.stageTransition)==null?void 0:i.secondaryColor)||"#c56370"),document.documentElement.style.setProperty("--rectangle-rotate-3-color",((s=e.stageTransition)==null?void 0:s.tertiaryColor)||"#43445b"),document.documentElement.style.setProperty("--rectangle-rotate-duration",`${((r=e.stageTransition)==null?void 0:r.duration)||.6}s`),document.documentElement.style.setProperty("--rectangle-rotate-delay",`${((o=e.stageTransition)==null?void 0:o.delay)||0}s`),document.documentElement.style.setProperty("--rectangle-rotate-stagger",`${((a=e.stageTransition)==null?void 0:a.staggerDelay)||.1}s`),document.documentElement.style.setProperty("--rectangle-rotate-rotation",`${((l=e.stageTransition)==null?void 0:l.rotation)||270}deg`)}),(t,i)=>{var s;return gn(),yi("div",{class:"rectangle-rotate-transition",style:Si({zIndex:((s=n.stageTransition)==null?void 0:s.zIndex)??100})},i[0]||(i[0]=[or("div",{class:"rectangle rectangle-rotate-1"},[or("div")],-1),or("div",{class:"rectangle rectangle-rotate-2"},[or("div")],-1),or("div",{class:"rectangle rectangle-rotate-3"},[or("div")],-1)]),4)}}}),qH=No($H,[["__scopeId","data-v-f4b1dc64"]]),YH=fn({__name:"StageTransitionGroup",props:{primaryColor:null,secondaryColor:null,tertiaryColor:null,colors:null,zIndex:null,disableTransitions:{type:Boolean},usePageSpecificTransitions:{type:Boolean}},setup(n){const e=n,t=$V(),i=et(!1),s=et(),r=et(""),o=et(),a=Oe({slide:{component:GH,duration:2700},"slope-slide":{component:XH,duration:2700},arrow:{component:NH,duration:2700},"multiple-blocks-reveal":{component:VH,duration:2800},"fantasy-fall":{component:BH,duration:2700},"rectangles-rotate":{component:qH,duration:2700},"bubble-wave-out":{component:FH,duration:1e3}}),l=et([]);function c(h){return l.value.push(h),()=>{const p=l.value.indexOf(h);p>=0&&l.value.splice(p,1)}}async function u(h,p={}){s.value=h;for(const _ of l.value)try{await Promise.resolve(_(h,p))}catch(g){console.error(`Error in transition hook at stage "${h}":`,g)}}async function f(h,p,_){if(h.name==="none"||!h.name){p(),_();return}const g=a.value[h.name];if(!g){console.error(`Transition ${h.name} not found`),p(),_();return}const m=g.nextDelay!==void 0?g.nextDelay:g.duration/3;let y=!1;const v=c(E=>{E==="navigation"&&!y&&(y=!0,p())});try{await u("before-enter",{transitionName:h.name}),i.value&&(await u("before-leave",{transitionName:r.value}),r.value="",o.value=void 0,i.value=!1,await u("after-leave",{transitionName:r.value}),await new Promise(T=>setTimeout(T,50))),r.value=h.name,o.value=h,i.value=!0,await u("enter-active",{transitionName:name}),setTimeout(async()=>{await u("navigation",{transitionName:h.name,config:g}),y||(y=!0,p())},m),setTimeout(async()=>{await u("after-enter",{transitionName:h.name})},g.duration),setTimeout(async()=>{await u("before-leave",{transitionName:h.name})},g.duration+10),setTimeout(async()=>{await u("leave-active",{transitionName:h.name})},g.duration+20);const E=g.exitDuration??0;setTimeout(async()=>{i.value=!1,r.value="",o.value=void 0,await u("after-leave",{transitionName:h.name}),_()},g.duration+E)}catch(E){console.error(E)}finally{v(),setTimeout(()=>{y||(y=!0,p())},g.duration*2)}}function d(h,p){return new Promise(_=>{f(h,p,_)})}return t.beforeEach((h,p,_)=>{if(e.disableTransitions){_();return}if(typeof h.meta.stageTransition!="object"){_();return}const g=h.meta.stageTransition;if(e.usePageSpecificTransitions&&g.pageSpecificAvailable){_();return}typeof e.primaryColor<"u"&&(g.primaryColor=e.primaryColor),typeof e.secondaryColor<"u"&&(g.secondaryColor=e.secondaryColor),typeof e.tertiaryColor<"u"&&(g.tertiaryColor=e.tertiaryColor),typeof e.colors<"u"&&(g.colors=e.colors),typeof e.zIndex<"u"&&(g.zIndex=e.zIndex),d(g,_)}),(h,p)=>(gn(),yi(jt,null,[h2(h.$slots,"default"),i.value?(gn(),yi(jt,{key:0},[a.value[r.value]?(gn(),Kl(f2(a.value[r.value].component),{key:0,"stage-transition":o.value},null,8,["stage-transition"])):Pv("",!0)],64)):Pv("",!0)],64))}});/*! diff --git a/assets/index-BLNYI9W3.js b/assets/index-DT9YP6z9.js similarity index 99% rename from assets/index-BLNYI9W3.js rename to assets/index-DT9YP6z9.js index d2f8eff6ba5e6117ca965b92e5897e86337bd280..d687970c7f3071e49eb6e4304f837d125797d62a 100644 --- a/assets/index-BLNYI9W3.js +++ b/assets/index-DT9YP6z9.js @@ -1,4 +1,4 @@ -import{cp as getAugmentedNamespace}from"./index-5LjD1Eoi.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! +import{cp as getAugmentedNamespace}from"./index-DCMFRrFG.js";var dist={},ortWeb_min={exports:{}};const backends={},backendsSortedByPriority=[],registerBackend=(D,u,b)=>{if(u&&typeof u.init=="function"&&typeof u.createSessionHandler=="function"){const g=backends[D];if(g===void 0)backends[D]={backend:u,priority:b};else{if(g.priority>b)return;if(g.priority===b&&g.backend!==u)throw new Error(`cannot register backend "${D}" using priority ${b}`)}if(b>=0){const p=backendsSortedByPriority.indexOf(D);p!==-1&&backendsSortedByPriority.splice(p,1);for(let h=0;h{const u=D.length===0?backendsSortedByPriority:D,b=[];for(const g of u){const p=backends[g];if(p){if(p.initialized)return p.backend;if(p.aborted)continue;const h=!!p.initPromise;try{return h||(p.initPromise=p.backend.init()),await p.initPromise,p.initialized=!0,p.backend}catch(o){h||b.push({name:g,err:o}),p.aborted=!0}finally{delete p.initPromise}}}throw new Error(`no available backend found. ERR: ${b.map(g=>`[${g.name}] ${g.err}`).join(", ")}`)};class EnvImpl{constructor(){this.wasm={},this.webgl={},this.logLevelInternal="warning"}set logLevel(u){if(u!==void 0){if(typeof u!="string"||["verbose","info","warning","error","fatal"].indexOf(u)===-1)throw new Error(`Unsupported logging level: ${u}`);this.logLevelInternal=u}}get logLevel(){return this.logLevelInternal}}const env=new EnvImpl,isBigInt64ArrayAvailable=typeof BigInt64Array<"u"&&typeof BigInt64Array.from=="function",isBigUint64ArrayAvailable=typeof BigUint64Array<"u"&&typeof BigUint64Array.from=="function",NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP=new Map([["float32",Float32Array],["uint8",Uint8Array],["int8",Int8Array],["uint16",Uint16Array],["int16",Int16Array],["int32",Int32Array],["bool",Uint8Array],["float64",Float64Array],["uint32",Uint32Array]]),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP=new Map([[Float32Array,"float32"],[Uint8Array,"uint8"],[Int8Array,"int8"],[Uint16Array,"uint16"],[Int16Array,"int16"],[Int32Array,"int32"],[Float64Array,"float64"],[Uint32Array,"uint32"]]);isBigInt64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("int64",BigInt64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigInt64Array,"int64"));isBigUint64ArrayAvailable&&(NUMERIC_TENSOR_TYPE_TO_TYPEDARRAY_MAP.set("uint64",BigUint64Array),NUMERIC_TENSOR_TYPEDARRAY_TO_TYPE_MAP.set(BigUint64Array,"uint64"));const calculateSize=D=>{let u=1;for(let b=0;b{const t=document.createElement("canvas"),e=t.getContext("2d");if(!u||!e)return i();const n=new Image;n.crossOrigin="Anonymous",n.src=u,n.onload=()=>{t.width=n.width,t.height=n.height,e.drawImage(n,0,0,t.width,t.height);const r=e.getImageData(0,0,t.width,t.height);if(b!==void 0){if(b.height!==void 0&&b.height!==t.height)throw new Error("Image input config height doesn't match ImageBitmap height");if(f.height=t.height,b.width!==void 0&&b.width!==t.width)throw new Error("Image input config width doesn't match ImageBitmap width");f.width=t.width}else f.height=t.height,f.width=t.width;s(at.bufferToTensor(r.data,f))}});throw new Error("Input data provided is not supported - aborted tensor creation")}if(c!==void 0)return at.bufferToTensor(c,f);throw new Error("Input data provided is not supported - aborted tensor creation")}toImageData(u){var b,g;const p=document.createElement("canvas").getContext("2d");let h;if(p!=null){const o=this.dims[3],c=this.dims[2],f=this.dims[1],s=u!==void 0&&u.format!==void 0?u.format:"RGB",i=u!==void 0&&((b=u.norm)===null||b===void 0?void 0:b.mean)!==void 0?u.norm.mean:255,t=u!==void 0&&((g=u.norm)===null||g===void 0?void 0:g.bias)!==void 0?u.norm.bias:0,e=c*o;if(u!==void 0){if(u.height!==void 0&&u.height!==c)throw new Error("Image output config height doesn't match tensor height");if(u.width!==void 0&&u.width!==o)throw new Error("Image output config width doesn't match tensor width");if(u.format!==void 0&&f===4&&u.format!=="RGBA"||f===3&&u.format!=="RGB"&&u.format!=="BGR")throw new Error("Tensor format doesn't match input tensor dims")}const n=4;let r=0,a=1,l=2,d=3,m=0,y=e,v=e*2,_=-1;s==="RGBA"?(m=0,y=e,v=e*2,_=e*3):s==="RGB"?(m=0,y=e,v=e*2):s==="RBG"&&(m=0,v=e,y=e*2),h=p.createImageData(o,c);for(let T=0;T"u")throw new Error(`input '${s}' is missing in 'feeds'.`);if(o)for(const s of this.outputNames)p[s]=null;const c=await this.handler.run(u,p,h),f={};for(const s in c)Object.hasOwnProperty.call(c,s)&&(f[s]=new Tensor(c[s].type,c[s].data,c[s].dims));return f}static async create(u,b,g,p){let h,o={};if(typeof u=="string"){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof Uint8Array){if(h=u,typeof b=="object"&&b!==null)o=b;else if(typeof b<"u")throw new TypeError("'options' must be an object.")}else if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer){const t=u;let e=0,n=u.byteLength;if(typeof b=="object"&&b!==null)o=b;else if(typeof b=="number"){if(e=b,!Number.isSafeInteger(e))throw new RangeError("'byteOffset' must be an integer.");if(e<0||e>=t.byteLength)throw new RangeError(`'byteOffset' is out of range [0, ${t.byteLength}).`);if(n=u.byteLength-e,typeof g=="number"){if(n=g,!Number.isSafeInteger(n))throw new RangeError("'byteLength' must be an integer.");if(n<=0||e+n>t.byteLength)throw new RangeError(`'byteLength' is out of range (0, ${t.byteLength-e}].`);if(typeof p=="object"&&p!==null)o=p;else if(typeof p<"u")throw new TypeError("'options' must be an object.")}else if(typeof g<"u")throw new TypeError("'byteLength' must be a number.")}else if(typeof b<"u")throw new TypeError("'options' must be an object.");h=new Uint8Array(t,e,n)}else throw new TypeError("Unexpected argument[0]: must be 'path' or 'buffer'.");const f=(o.executionProviders||[]).map(t=>typeof t=="string"?t:t.name),i=await(await resolveBackend(f)).createSessionHandler(h,o);return new cn(i)}startProfiling(){this.handler.startProfiling()}endProfiling(){this.handler.endProfiling()}get inputNames(){return this.handler.inputNames}get outputNames(){return this.handler.outputNames}};const InferenceSession=InferenceSession$1,lib=Object.freeze(Object.defineProperty({__proto__:null,InferenceSession,Tensor,env,registerBackend},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(lib);/*! * ONNX Runtime Web v1.14.0 * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. diff --git a/assets/index-Dgjn_5PB.js b/assets/index-DvtIggeg.js similarity index 90% rename from assets/index-Dgjn_5PB.js rename to assets/index-DvtIggeg.js index e1f6372457bd8de5a4007db0984edb10eee43623..a77b131a45ad53f078a6fa1f0e8cc0c8fe0bdd44 100644 --- a/assets/index-Dgjn_5PB.js +++ b/assets/index-DvtIggeg.js @@ -1 +1 @@ -import{_ as T}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js";import{l as Z,J as q}from"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{_ as G,a as H}from"./Model.vue_vue_type_script_setup_true_lang-B5b_VmSW.js";import{d as E,D as I,c as f,o as s,u as t,B as Q,k as W,bP as K,s as X,r as F,w as Y,bQ as ee,b as l,m as A,i as te,E as c,a as u,G as O,bH as oe,bN as g,t as $,bA as U,bB as B,bJ as ne,bq as ie,A as ae,bz as le}from"./index-5LjD1Eoi.js";/* empty css */import{f as R,g as se}from"./emotions-CAex_2dA.js";import"./three-vrm-animation.module-C_NwwsBw.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as V,a as de}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DhP-gZZO.js";import{u as ce}from"./useIconAnimation-BkxpLoyr.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./index-BdorYkr1.js";const ue=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(j){const m=I();return(r,n)=>(s(),f("button",{disabled:t(m).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:n[0]||(n[0]=p=>r.$emit("click"))},[Q(r.$slots,"default")],8,ue))}}),me={flex:"~ col gap-4"},fe={flex:"","items-center":"","gap-2":""},pe=["disabled","placeholder"],ve={"font-medium":""},be={flex:"","gap-2":""},_e=["onUpdate:modelValue"],ge=["href","download"],he=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(j){const{t:m}=W(),r=K({accept:"application/zip"}),n=I(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:x,availableLive2dMotions:L,live2dModelUrl:M}=X(n),b=F(M.value);r.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",x.value=!0)}),Y(()=>n.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in R?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function _(o,e){if(!Object.keys(e).length)return o;const a=await new q().loadAsync(o),d=Object.keys(a.files).find(N=>N.endsWith("model3.json"));if(!d)throw new Error("model3.json not found");const J=await a.file(d).async("string"),z=JSON.parse(J),C={};Object.entries(e).forEach(([N,S])=>{if(C[S]){C[S].push({File:N});return}C[S]=[{File:N}]}),z.FileReferences.Motions=C,a.file(d,JSON.stringify(z,null,2));const P=await a.generateAsync({type:"blob"});return new File([P],o.name,{type:o.type,lastModified:o.lastModified})}async function w(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await _(o,v.value);p.value=e,y.value="file",x.value=!0}const k=ee(p);return(o,e)=>(s(),f("div",me,[l(t(V),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:c(()=>[u("div",fe,[O(u("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>b.value=i),disabled:t(n).loadingLive2dModel,class:"form-control flex-1",border:"neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out",placeholder:t(m)("settings.live2d.change-model.from-url-placeholder")},null,8,pe),[[oe,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=i=>M.value=b.value)},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=i=>t(r).open())},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=i=>o.$emit("extractColorsFromModel"))},{default:c(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1}),l(de,{colors:j.palette.map(i=>({hex:i,name:i}))},null,8,["colors"])]),_:1}),t(n).live2dLoadSource==="file"?(s(),A(t(V),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:c(()=>{var i;return[(s(!0),f(U,null,B(t(n).availableLive2dMotions,a=>(s(),f("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[u("span",ve,$(a.fileName),1),u("div",be,[O(u("select",{"onUpdate:modelValue":d=>t(n).live2dMotionMap[a.fileName]=d},[(s(!0),f(U,null,B(Object.keys(t(R)),d=>(s(),f("option",{key:d},$(d),1))),128))],8,_e),[[ne,t(n).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:d=>t(n).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:c(()=>e[5]||(e[5]=[g(" Play ")])),_:2},1032,["onClick"])])]))),128)),l(h,{onClick:w},{default:c(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1}),u("a",{"mt-2":"",block:"",href:t(k),download:`${((i=t(n).live2dModelFile)==null?void 0:i.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:c(()=>e[7]||(e[7]=[g("Export")])),_:1})],8,ge)]}),_:1})):te("",!0)]))}}),ye=ie(he,[["__scopeId","data-v-b2e16668"]]),ke={flex:""},xe={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Me=E({__name:"index",setup(j){const m=F(),r=F(),{width:n,height:p}=ae(m),v=F([]);async function y(){if(!r.value)return;const b=await r.value.captureFrame();if(!b){console.error("No frame captured");return}const _=URL.createObjectURL(b);try{const k=await new re(_).getPalette();v.value=Object.values(k).map(o=>o==null?void 0:o.hex).filter(o=>typeof o=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:x,showIconAnimation:L,animationIcon:M}=ce("i-solar:people-nearby-bold-duotone");return(b,_)=>{const w=T,k=le("motion");return s(),f(U,null,[u("div",ke,[u("div",{ref_key:"live2dContainerRef",ref:m,w:"50%",h:"80vh"},[l(t(H),{ref_key:"live2dCanvasRef",ref:r,width:t(n),height:t(p)},{default:c(({app:o})=>[l(t(G),{app:o,"mouth-open-size":0,width:t(n),height:t(p),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),l(ye,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),A(w,{key:0,"z-index":-1,icon:t(M),"icon-size":12,duration:1e3,started:t(x),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):O((s(),f("div",xe,_[0]||(_[0]=[u("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[k]])],64)}}});typeof D=="function"&&D(Me);export{Me as default}; +import{_ as T}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js";import{l as Z,J as q}from"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{_ as G,a as H}from"./Model.vue_vue_type_script_setup_true_lang-Oh2pzmo4.js";import{d as E,D as I,c as f,o as s,u as t,B as Q,k as W,bP as K,s as X,r as F,w as Y,bQ as ee,b as l,m as A,i as te,E as c,a as u,G as O,bH as oe,bN as g,t as $,bA as U,bB as B,bJ as ne,bq as ie,A as ae,bz as le}from"./index-DCMFRrFG.js";/* empty css */import{f as R,g as se}from"./emotions-CAex_2dA.js";import"./three-vrm-animation.module-BGS11oHQ.js";import{V as re}from"./browser-CkchkNbv.js";import{_ as V,a as de}from"./ColorPalette.vue_vue_type_script_setup_true_lang-DQW4hQKz.js";import{u as ce}from"./useIconAnimation-CvSuZDEE.js";import{b as D}from"./route-block-B_A1xBdJ.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./index-GwMN-Az5.js";const ue=["disabled"],h=E({__name:"Live2DModelControlButton",emits:["click"],setup(j){const m=I();return(r,n)=>(s(),f("button",{disabled:t(m).loadingLive2dModel,bg:"neutral-100 dark:neutral-800",hover:"bg-neutral-200 dark:bg-neutral-700",transition:"all ease-in-out duration-250",rounded:"",onClick:n[0]||(n[0]=p=>r.$emit("click"))},[Q(r.$slots,"default")],8,ue))}}),me={flex:"~ col gap-4"},fe={flex:"","items-center":"","gap-2":""},pe=["disabled","placeholder"],ve={"font-medium":""},be={flex:"","gap-2":""},_e=["onUpdate:modelValue"],ge=["href","download"],he=E({__name:"Live2DSettings",props:{palette:null},emits:["extractColorsFromModel"],setup(j){const{t:m}=W(),r=K({accept:"application/zip"}),n=I(),{live2dModelFile:p,live2dMotionMap:v,live2dLoadSource:y,loadingLive2dModel:x,availableLive2dMotions:L,live2dModelUrl:M}=X(n),b=F(M.value);r.onChange(o=>{o&&o.length>0&&(v.value={},p.value=o[0],y.value="file",x.value=!0)}),Y(()=>n.loadingLive2dModel,o=>{o||y.value==="file"&&L.value.forEach(e=>{e.motionName in R?v.value[e.fileName]=e.motionName:v.value[e.fileName]=se})});async function _(o,e){if(!Object.keys(e).length)return o;const a=await new q().loadAsync(o),d=Object.keys(a.files).find(N=>N.endsWith("model3.json"));if(!d)throw new Error("model3.json not found");const J=await a.file(d).async("string"),z=JSON.parse(J),C={};Object.entries(e).forEach(([N,S])=>{if(C[S]){C[S].push({File:N});return}C[S]=[{File:N}]}),z.FileReferences.Motions=C,a.file(d,JSON.stringify(z,null,2));const P=await a.generateAsync({type:"blob"});return new File([P],o.name,{type:o.type,lastModified:o.lastModified})}async function w(){const o=await Z.getItem("live2dModel");if(!o)return;const e=await _(o,v.value);p.value=e,y.value="file",x.value=!0}const k=ee(p);return(o,e)=>(s(),f("div",me,[l(t(V),{title:"settings.live2d.change-model.title",icon:"i-solar:magic-stick-3-bold-duotone","inner-class":"text-sm"},{default:c(()=>[u("div",fe,[O(u("input",{"onUpdate:modelValue":e[0]||(e[0]=i=>b.value=i),disabled:t(n).loadingLive2dModel,class:"form-control flex-1",border:"neutral-300 dark:neutral-800 solid 1 focus:neutral-400 dark:focus:neutral-600",transition:"border duration-250 ease-in-out",placeholder:t(m)("settings.live2d.change-model.from-url-placeholder")},null,8,pe),[[oe,b.value]]),l(h,{class:"form-control",onClick:e[1]||(e[1]=i=>M.value=b.value)},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-url")),1)]),_:1})]),l(h,{class:"form-control place-self-end",onClick:e[2]||(e[2]=i=>t(r).open())},{default:c(()=>[g($(t(m)("settings.live2d.change-model.from-file"))+"... ",1)]),_:1}),l(h,{class:"form-control",onClick:e[3]||(e[3]=i=>o.$emit("extractColorsFromModel"))},{default:c(()=>e[4]||(e[4]=[g(" Extract colors from model ")])),_:1}),l(de,{colors:j.palette.map(i=>({hex:i,name:i}))},null,8,["colors"])]),_:1}),t(n).live2dLoadSource==="file"?(s(),A(t(V),{key:0,title:"settings.live2d.edit-motion-map.title",icon:"i-solar:face-scan-circle-bold-duotone"},{default:c(()=>{var i;return[(s(!0),f(U,null,B(t(n).availableLive2dMotions,a=>(s(),f("div",{key:a.fileName,flex:"","items-center":"","justify-between":"","text-sm":""},[u("span",ve,$(a.fileName),1),u("div",be,[O(u("select",{"onUpdate:modelValue":d=>t(n).live2dMotionMap[a.fileName]=d},[(s(!0),f(U,null,B(Object.keys(t(R)),d=>(s(),f("option",{key:d},$(d),1))),128))],8,_e),[[ne,t(n).live2dMotionMap[a.fileName]]]),l(h,{class:"form-control",onClick:d=>t(n).live2dCurrentMotion={group:a.motionName,index:a.motionIndex}},{default:c(()=>e[5]||(e[5]=[g(" Play ")])),_:2},1032,["onClick"])])]))),128)),l(h,{onClick:w},{default:c(()=>e[6]||(e[6]=[g(" Save and patch ")])),_:1}),u("a",{"mt-2":"",block:"",href:t(k),download:`${((i=t(n).live2dModelFile)==null?void 0:i.name)||"live2d"}-motion-edited.zip`},[l(h,{"w-full":""},{default:c(()=>e[7]||(e[7]=[g("Export")])),_:1})],8,ge)]}),_:1})):te("",!0)]))}}),ye=ie(he,[["__scopeId","data-v-b2e16668"]]),ke={flex:""},xe={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:15},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},Me=E({__name:"index",setup(j){const m=F(),r=F(),{width:n,height:p}=ae(m),v=F([]);async function y(){if(!r.value)return;const b=await r.value.captureFrame();if(!b){console.error("No frame captured");return}const _=URL.createObjectURL(b);try{const k=await new re(_).getPalette();v.value=Object.values(k).map(o=>o==null?void 0:o.hex).filter(o=>typeof o=="string")}finally{URL.revokeObjectURL(_)}}const{iconAnimationStarted:x,showIconAnimation:L,animationIcon:M}=ce("i-solar:people-nearby-bold-duotone");return(b,_)=>{const w=T,k=le("motion");return s(),f(U,null,[u("div",ke,[u("div",{ref_key:"live2dContainerRef",ref:m,w:"50%",h:"80vh"},[l(t(H),{ref_key:"live2dCanvasRef",ref:r,width:t(n),height:t(p)},{default:c(({app:o})=>[l(t(G),{app:o,"mouth-open-size":0,width:t(n),height:t(p),paused:!1},null,8,["app","width","height"])]),_:1},8,["width","height"])],512),l(ye,{w:"50%",h:"80vh",palette:v.value,onExtractColorsFromModel:y},null,8,["palette"])]),t(L)?(s(),A(w,{key:0,"z-index":-1,icon:t(M),"icon-size":12,duration:1e3,started:t(x),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):O((s(),f("div",xe,_[0]||(_[0]=[u("div",{text:"60","i-solar:people-nearby-bold-duotone":""},null,-1)]))),[[k]])],64)}}});typeof D=="function"&&D(Me);export{Me as default}; diff --git a/assets/index-BdorYkr1.js b/assets/index-GwMN-Az5.js similarity index 99% rename from assets/index-BdorYkr1.js rename to assets/index-GwMN-Az5.js index 9868ff37515ab6deeb23f1385dd2869bcbe82335..05714a1eb5dc072b1f36ff3451444104b9581693 100644 --- a/assets/index-BdorYkr1.js +++ b/assets/index-GwMN-Az5.js @@ -1,3 +1,3 @@ -import{l as O,r as E,K as Mt,w as j,ak as Lt,al as Ft,bV as xe,u as m,d as D,m as T,o as B,E as A,B as P,bW as de,bX as fe,bY as F,bO as Ze,by as he,f as De,I as lt,i as Nt,b as me,bZ as yn,b_ as ye,b$ as wn,c0 as kt,c1 as bn,c2 as ke,c3 as xn,c4 as On,bu as Cn,g as It,bA as An,c5 as Wt,c6 as En,c7 as Ht,c8 as xt,ai as K,ae as Dn,bN as Pn,t as _n,c as Vt,q as st,c9 as jt,ca as Bn,cb as zt,cc as Tn,cd as Rn,a as $n,ce as Sn,cf as Mn}from"./index-5LjD1Eoi.js";const Ln=["top","right","bottom","left"],ae=Math.min,H=Math.max,Ie=Math.round,Me=Math.floor,G=e=>({x:e,y:e}),Fn={left:"right",right:"left",bottom:"top",top:"bottom"},Nn={start:"end",end:"start"};function Qe(e,t,n){return H(e,ae(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function Pe(e){return e.split("-")[1]}function at(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function ue(e){return["top","bottom"].includes(te(e))?"y":"x"}function ct(e){return at(ue(e))}function kn(e,t,n){n===void 0&&(n=!1);const o=Pe(e),i=ct(e),r=ut(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=We(l)),[l,We(l)]}function In(e){const t=We(e);return[et(e),t,et(t)]}function et(e){return e.replace(/start|end/g,t=>Nn[t])}function Wn(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:l;default:return[]}}function Hn(e,t,n,o){const i=Pe(e);let r=Wn(te(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(et)))),r}function We(e){return e.replace(/left|right|bottom|top/g,t=>Fn[t])}function Vn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kt(e){return typeof e!="number"?Vn(e):{top:e,right:e,bottom:e,left:e}}function He(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ot(e,t,n){let{reference:o,floating:i}=e;const r=ue(t),l=ct(t),s=ut(l),d=te(t),c=r==="y",a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(d){case"top":f={x:a,y:o.y-i.height};break;case"bottom":f={x:a,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Pe(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1);break}return f}const jn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:u}=Ot(c,o,d),p=o,f={},v=0;for(let h=0;h({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:l,elements:s,middlewareData:d}=t,{element:c,padding:a=0}=ee(e,t)||{};if(c==null)return{};const u=Kt(a),p={x:n,y:o},f=ct(i),v=ut(f),h=await l.getDimensions(c),g=f==="y",y=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",C=r.reference[v]+r.reference[f]-p[f]-r.floating[v],x=p[f]-r.reference[f],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let _=S?S[w]:0;(!_||!await(l.isElement==null?void 0:l.isElement(S)))&&(_=s.floating[w]||r.floating[v]);const M=C/2-x/2,N=_/2-h[v]/2-1,R=ae(u[y],N),z=ae(u[b],N),k=R,W=_-h[v]-z,L=_/2-h[v]/2+M,oe=Qe(k,L,W),I=!d.arrow&&Pe(i)!=null&&L!==oe&&r.reference[v]/2-(LL<=0)){var z,k;const L=(((z=r.flip)==null?void 0:z.index)||0)+1,oe=_[L];if(oe)return{data:{index:L,overflows:R},reset:{placement:oe}};let I=(k=R.filter(q=>q.overflows[0]<=0).sort((q,ie)=>q.overflows[1]-ie.overflows[1])[0])==null?void 0:k.placement;if(!I)switch(f){case"bestFit":{var W;const q=(W=R.filter(ie=>{if(S){const re=ue(ie.placement);return re===b||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,hn)=>re+hn,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:W[0];q&&(I=q);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function Ct(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function At(e){return Ln.some(t=>e[t]>=0)}const Un=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=ee(e,t);switch(o){case"referenceHidden":{const r=await _e(t,{...i,elementContext:"reference"}),l=Ct(r,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:At(l)}}}case"escaped":{const r=await _e(t,{...i,altBoundary:!0}),l=Ct(r,n.floating);return{data:{escapedOffsets:l,escaped:At(l)}}}default:return{}}}}};async function Yn(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=te(n),s=Pe(n),d=ue(n)==="y",c=["left","top"].includes(l)?-1:1,a=r&&d?-1:1,u=ee(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),d?{x:f*a,y:p*c}:{x:p*c,y:f*a}}const Xn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=t,d=await Yn(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},qn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...d}=ee(e,t),c={x:n,y:o},a=await _e(t,d),u=ue(te(i)),p=at(u);let f=c[p],v=c[u];if(r){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=f+a[g],w=f-a[y];f=Qe(b,f,w)}if(l){const g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",b=v+a[g],w=v-a[y];v=Qe(b,v,w)}const h=s.fn({...t,[p]:f,[u]:v});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:r,[u]:l}}}}}},Gn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:d=!0,crossAxis:c=!0}=ee(e,t),a={x:n,y:o},u=ue(i),p=at(u);let f=a[p],v=a[u];const h=ee(s,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(d){const w=p==="y"?"height":"width",C=r.reference[p]-r.floating[w]+g.mainAxis,x=r.reference[p]+r.reference[w]-g.mainAxis;fx&&(f=x)}if(c){var y,b;const w=p==="y"?"width":"height",C=["top","left"].includes(te(i)),x=r.reference[u]-r.floating[w]+(C&&((y=l.offset)==null?void 0:y[u])||0)+(C?0:g.crossAxis),S=r.reference[u]+r.reference[w]+(C?0:((b=l.offset)==null?void 0:b[u])||0)-(C?g.crossAxis:0);vS&&(v=S)}return{[p]:f,[u]:v}}}},Jn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:l,elements:s}=t,{apply:d=()=>{},...c}=ee(e,t),a=await _e(t,c),u=te(i),p=Pe(i),f=ue(i)==="y",{width:v,height:h}=r.floating;let g,y;u==="top"||u==="bottom"?(g=u,y=p===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,g=p==="end"?"top":"bottom");const b=h-a.top-a.bottom,w=v-a.left-a.right,C=ae(h-a[g],b),x=ae(v-a[y],w),S=!t.middlewareData.shift;let _=C,M=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(_=b),S&&!p){const R=H(a.left,0),z=H(a.right,0),k=H(a.top,0),W=H(a.bottom,0);f?M=v-2*(R!==0||z!==0?R+z:H(a.left,a.right)):_=h-2*(k!==0||W!==0?k+W:H(a.top,a.bottom))}await d({...t,availableWidth:M,availableHeight:_});const N=await l.getDimensions(s.floating);return v!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function je(){return typeof window<"u"}function we(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return je()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return je()?e instanceof Element||e instanceof V(e).Element:!1}function J(e){return je()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function Et(e){return!je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function Te(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Zn(e){return["table","td","th"].includes(we(e))}function ze(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ft(e){const t=pt(),n=U(e)?Y(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Qn(e){let t=ce(e);for(;J(t)&&!Ee(t);){if(ft(t))return t;if(ze(t))return null;t=ce(t)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ee(e){return["html","body","#document"].includes(we(e))}function Y(e){return V(e).getComputedStyle(e)}function Ke(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(we(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||Z(e);return Et(t)?t.host:t}function Ut(e){const t=ce(e);return Ee(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Te(t)?t:Ut(t)}function Be(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ut(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=V(i);if(r){const s=tt(l);return t.concat(l,l.visualViewport||[],Te(i)?i:[],s&&n?Be(s):[])}return t.concat(i,Be(i,[],n))}function tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yt(e){const t=Y(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=J(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=Ie(n)!==r||Ie(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function vt(e){return U(e)?e:e.contextElement}function Ae(e){const t=vt(e);if(!J(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Yt(t);let l=(r?Ie(n.width):n.width)/o,s=(r?Ie(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const eo=G(0);function Xt(e){const t=V(e);return!pt()||!t.visualViewport?eo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function to(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function ge(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=vt(e);let l=G(1);t&&(o?U(o)&&(l=Ae(o)):l=Ae(e));const s=to(r,n,o)?Xt(r):G(0);let d=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,a=i.width/l.x,u=i.height/l.y;if(r){const p=V(r),f=o&&U(o)?V(o):o;let v=p,h=tt(v);for(;h&&o&&f!==v;){const g=Ae(h),y=h.getBoundingClientRect(),b=Y(h),w=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,C=y.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;d*=g.x,c*=g.y,a*=g.x,u*=g.y,d+=w,c+=C,v=V(h),h=tt(v)}}return He({width:a,height:u,x:d,y:c})}function mt(e,t){const n=Ke(e).scrollLeft;return t?t.left+n:ge(Z(e)).left+n}function qt(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-(n?0:mt(e,o)),r=o.top+t.scrollTop;return{x:i,y:r}}function no(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",l=Z(o),s=t?ze(t.floating):!1;if(o===l||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=G(1);const a=G(0),u=J(o);if((u||!u&&!r)&&((we(o)!=="body"||Te(l))&&(d=Ke(o)),J(o))){const f=ge(o);c=Ae(o),a.x=f.x+o.clientLeft,a.y=f.y+o.clientTop}const p=l&&!u&&!r?qt(l,d,!0):G(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+a.x+p.x,y:n.y*c.y-d.scrollTop*c.y+a.y+p.y}}function oo(e){return Array.from(e.getClientRects())}function io(e){const t=Z(e),n=Ke(e),o=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=H(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+mt(e);const s=-n.scrollTop;return Y(o).direction==="rtl"&&(l+=H(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function ro(e,t){const n=V(e),o=Z(e),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,d=0;if(i){r=i.width,l=i.height;const c=pt();(!c||c&&t==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:s,y:d}}function lo(e,t){const n=ge(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=J(e)?Ae(e):G(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:s,x:d,y:c}}function Dt(e,t,n){let o;if(t==="viewport")o=ro(e,n);else if(t==="document")o=io(Z(e));else if(U(t))o=lo(t,n);else{const i=Xt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return He(o)}function Gt(e,t){const n=ce(e);return n===t||!U(n)||Ee(n)?!1:Y(n).position==="fixed"||Gt(n,t)}function so(e,t){const n=t.get(e);if(n)return n;let o=Be(e,[],!1).filter(s=>U(s)&&we(s)!=="body"),i=null;const r=Y(e).position==="fixed";let l=r?ce(e):e;for(;U(l)&&!Ee(l);){const s=Y(l),d=ft(l);!d&&s.position==="fixed"&&(i=null),(r?!d&&!i:!d&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Te(l)&&!d&&Gt(e,l))?o=o.filter(a=>a!==l):i=s,l=ce(l)}return t.set(e,o),o}function ao(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:so(t,this._c):[].concat(n),o],s=l[0],d=l.reduce((c,a)=>{const u=Dt(t,a,i);return c.top=H(u.top,c.top),c.right=ae(u.right,c.right),c.bottom=ae(u.bottom,c.bottom),c.left=H(u.left,c.left),c},Dt(t,s,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function uo(e){const{width:t,height:n}=Yt(e);return{width:t,height:n}}function co(e,t,n){const o=J(t),i=Z(t),r=n==="fixed",l=ge(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const d=G(0);if(o||!o&&!r)if((we(t)!=="body"||Te(i))&&(s=Ke(t)),o){const p=ge(t,!0,r,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&(d.x=mt(i));const c=i&&!o&&!r?qt(i,s):G(0),a=l.left+s.scrollLeft-d.x-c.x,u=l.top+s.scrollTop-d.y-c.y;return{x:a,y:u,width:l.width,height:l.height}}function Ye(e){return Y(e).position==="static"}function Pt(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Jt(e,t){const n=V(e);if(ze(e))return n;if(!J(e)){let i=ce(e);for(;i&&!Ee(i);){if(U(i)&&!Ye(i))return i;i=ce(i)}return n}let o=Pt(e,t);for(;o&&Zn(o)&&Ye(o);)o=Pt(o,t);return o&&Ee(o)&&Ye(o)&&!ft(o)?n:o||Qn(e)||n}const fo=async function(e){const t=this.getOffsetParent||Jt,n=this.getDimensions,o=await n(e.floating);return{reference:co(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function po(e){return Y(e).direction==="rtl"}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:no,getDocumentElement:Z,getClippingRect:ao,getOffsetParent:Jt,getElementRects:fo,getClientRects:oo,getDimensions:uo,getScale:Ae,isElement:U,isRTL:po};function Zt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mo(e,t){let n=null,o;const i=Z(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function l(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=e.getBoundingClientRect(),{left:a,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const v=Me(u),h=Me(i.clientWidth-(a+p)),g=Me(i.clientHeight-(u+f)),y=Me(a),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-y+"px",threshold:H(0,ae(1,d))||1};let C=!0;function x(S){const _=S[0].intersectionRatio;if(_!==d){if(!C)return l();_?l(!1,_):o=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!Zt(c,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return l(!0),r}function go(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=vt(e),a=i||r?[...c?Be(c):[],...Be(t)]:[];a.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const u=c&&s?mo(c,n):null;let p=-1,f=null;l&&(f=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!d&&f.observe(c),f.observe(t));let v,h=d?ge(e):null;d&&g();function g(){const y=ge(e);h&&!Zt(h,y)&&n(),h=y,v=requestAnimationFrame(g)}return n(),()=>{var y;a.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u==null||u(),(y=f)==null||y.disconnect(),f=null,d&&cancelAnimationFrame(v)}}const ho=Xn,yo=qn,_t=Kn,wo=Jn,bo=Un,xo=zn,Oo=Gn,Co=(e,t,n)=>{const o=new Map,i={platform:vo,...n},r={...i.platform,_c:o};return jn(e,t,{...i,platform:r})};function Ao(e){return e!=null&&typeof e=="object"&&"$el"in e}function nt(e){if(Ao(e)){const t=e.$el;return dt(t)&&we(t)==="#comment"?null:t}return e}function Ce(e){return typeof e=="function"?e():m(e)}function Eo(e){return{name:"arrow",options:e,fn(t){const n=nt(Ce(e.element));return n==null?{}:xo({element:n,padding:e.padding}).fn(t)}}}function Qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bt(e,t){const n=Qt(e);return Math.round(t*n)/n}function Do(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=O(()=>{var _;return(_=Ce(n.open))!=null?_:!0}),r=O(()=>Ce(n.middleware)),l=O(()=>{var _;return(_=Ce(n.placement))!=null?_:"bottom"}),s=O(()=>{var _;return(_=Ce(n.strategy))!=null?_:"absolute"}),d=O(()=>{var _;return(_=Ce(n.transform))!=null?_:!0}),c=O(()=>nt(e.value)),a=O(()=>nt(t.value)),u=E(0),p=E(0),f=E(s.value),v=E(l.value),h=Mt({}),g=E(!1),y=O(()=>{const _={position:f.value,left:"0",top:"0"};if(!a.value)return _;const M=Bt(a.value,u.value),N=Bt(a.value,p.value);return d.value?{..._,transform:"translate("+M+"px, "+N+"px)",...Qt(a.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:M+"px",top:N+"px"}});let b;function w(){if(c.value==null||a.value==null)return;const _=i.value;Co(c.value,a.value,{middleware:r.value,placement:l.value,strategy:s.value}).then(M=>{u.value=M.x,p.value=M.y,f.value=M.strategy,v.value=M.placement,h.value=M.middlewareData,g.value=_!==!1})}function C(){typeof b=="function"&&(b(),b=void 0)}function x(){if(C(),o===void 0){w();return}if(c.value!=null&&a.value!=null){b=o(c.value,a.value,w);return}}function S(){i.value||(g.value=!1)}return j([r,l,s,i],w,{flush:"sync"}),j([c,a],x,{flush:"sync"}),j(i,S,{flush:"sync"}),Lt()&&Ft(C),{x:xe(u),y:xe(p),strategy:xe(f),placement:xe(v),middlewareData:xe(h),isPositioned:xe(g),floatingStyles:y,update:w}}function be(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[i=>{const r=bn(o,i);if(r||r===null)return r;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(Mn(o,i),i)]}function en(e,t,n){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(i)}function Po(e,t){var n;const o=Mt();return K(()=>{o.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Ht(o)}function Re(e){return Lt()?(Ft(e),!0):!1}function _o(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const o=()=>t(n);return Re(o),{off:o}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(o=>o(...n)))}}function Bo(e){let t=!1,n;const o=jt(!0);return(...i)=>(t||(n=o.run(()=>e(...i)),t=!0),n)}function To(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...r)=>(t+=1,n||(o=jt(!0),n=o.run(()=>e(...r))),Re(i),n)}function ve(e){return typeof e=="function"?e():m(e)}const pe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ro=e=>typeof e<"u",$o=Object.prototype.toString,So=e=>$o.call(e)==="[object Object]",Mo=()=>{},Tt=Lo();function Lo(){var e,t;return pe&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Fo(e){return ye()}function No(e,t=1e4){return Sn((n,o)=>{let i=ve(e),r;const l=()=>setTimeout(()=>{i=ve(e),o()},ve(t));return Re(()=>{clearTimeout(r)}),{get(){return n(),i},set(s){i=s,o(),clearTimeout(r),r=l()}}})}function ko(e,t){Fo()&&Bn(e,t)}function tn(e,t,n={}){const{immediate:o=!0}=n,i=E(!1);let r=null;function l(){r&&(clearTimeout(r),r=null)}function s(){i.value=!1,l()}function d(...c){l(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},ve(t))}return o&&(i.value=!0,pe&&d()),Re(s),{isPending:Ht(i),start:d,stop:s}}function $e(e){var t;const n=ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const gt=pe?window:void 0;function Ve(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=gt):[t,n,o,i]=e,!t)return Mo;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],l=()=>{r.forEach(a=>a()),r.length=0},s=(a,u,p,f)=>(a.addEventListener(u,p,f),()=>a.removeEventListener(u,p,f)),d=j(()=>[$e(t),ve(i)],([a,u])=>{if(l(),!a)return;const p=So(u)?{...u}:u;r.push(...n.flatMap(f=>o.map(v=>s(a,f,v,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return Re(c),c}function Io(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Wo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=gt,eventName:r="keydown",passive:l=!1,dedupe:s=!1}=o,d=Io(t);return Ve(i,r,c=>{c.repeat&&ve(s)||d(c)&&n(c)},l)}function Ho(){const e=E(!1),t=ye();return t&&De(()=>{e.value=!0},t),e}function Vo(e){return JSON.parse(JSON.stringify(e))}function nn(e,t,n,o={}){var i,r,l;const{clone:s=!1,passive:d=!1,eventName:c,deep:a=!1,defaultValue:u,shouldEmit:p}=o,f=ye(),v=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((l=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:l.bind(f==null?void 0:f.proxy));let h=c;h=h||`update:${t.toString()}`;const g=w=>s?typeof s=="function"?s(w):Vo(w):w,y=()=>Ro(e[t])?g(e[t]):u,b=w=>{p?p(w)&&v(h,w):v(h,w)};if(d){const w=y(),C=E(w);let x=!1;return j(()=>e[t],S=>{x||(x=!0,C.value=g(S),he(()=>x=!1))}),j(C,S=>{!x&&(S!==e[t]||a)&&b(S)},{deep:a}),C}else return O({get(){return y()},set(w){b(w)}})}function ht(e){return e?e.flatMap(t=>t.type===An?ht(t.children):[t]):[]}function se(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Xe(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ot(e,t,n=".",o){if(!Xe(t))return ot(e,{},n);const i=Object.assign({},t);for(const r in e){if(r==="__proto__"||r==="constructor")continue;const l=e[r];l!=null&&(Array.isArray(l)&&Array.isArray(i[r])?i[r]=[...l,...i[r]]:Xe(l)&&Xe(i[r])?i[r]=ot(l,i[r],(n?`${n}.`:"")+r.toString()):i[r]=l)}return i}function jo(e){return(...t)=>t.reduce((n,o)=>ot(n,o,""),{})}const zo=jo(),[on,nr]=be("ConfigProvider");let Ko="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Uo=(e=21)=>{let t="",n=e;for(;n--;)t+=Ko[Math.random()*64|0];return t};const Yo=To(()=>{const e=E(new Map),t=E(),n=O(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=on({scrollBody:E(!0)});let i=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",Tt&&(i==null||i()),t.value=void 0};return j(n,(l,s)=>{var d;if(!pe)return;if(!l){s&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,a={padding:c,margin:0},u=(d=o.scrollBody)!=null&&d.value?typeof o.scrollBody.value=="object"?zo({padding:o.scrollBody.value.padding===!0?c:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?c:o.scrollBody.value.margin},a):a:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),Tt&&(i=Ve(document,"touchmove",p=>qo(p),{passive:!1})),he(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Xo(e){const t=Uo(6),n=Yo();n.value.set(t,e);const o=O({get:()=>n.value.get(t)??!1,set:i=>n.value.set(t,i)});return ko(()=>{n.value.delete(t)}),o}function rn(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Se(e){const t=ye(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{o[wn(kt(i))]=(...r)=>e(i,...r)}),o}function ln(e){const t=ye(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,r)=>{const l=(t==null?void 0:t.type.props[r]).default;return l!==void 0&&(i[r]=l),i},{}),o=Cn(e);return O(()=>{const i={},r=(t==null?void 0:t.vnode.props)??{};return Object.keys(r).forEach(l=>{i[kt(l)]=r[l]}),Object.keys({...n,...i}).reduce((l,s)=>(o.value[s]!==void 0&&(l[s]=o.value[s]),l),{})})}function sn(e,t){const n=ln(e),o=t?Se(t):{};return O(()=>({...n.value,...o}))}function $(){const e=ye(),t=E(),n=O(()=>{var l,s;return["#text","#comment"].includes((l=t.value)==null?void 0:l.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:$e(t)}),o=Object.assign({},e.exposed),i={};for(const l in e.props)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(l){t.value=l,l&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}function Go(e,t){const n=No(!1,300),o=E(null),i=_o();function r(){o.value=null,n.value=!1}function l(s,d){const c=s.currentTarget,a={x:s.clientX,y:s.clientY},u=Jo(a,c.getBoundingClientRect()),p=Zo(a,u),f=Qo(d.getBoundingClientRect()),v=ti([...p,...f]);o.value=v,n.value=!0}return K(s=>{if(e.value&&t.value){const d=a=>l(a,t.value),c=a=>l(a,e.value);e.value.addEventListener("pointerleave",d),t.value.addEventListener("pointerleave",c),s(()=>{var a,u;(a=e.value)==null||a.removeEventListener("pointerleave",d),(u=t.value)==null||u.removeEventListener("pointerleave",c)})}}),K(s=>{var d;if(o.value){const c=a=>{var u,p;if(!o.value)return;const f=a.target,v={x:a.clientX,y:a.clientY},h=((u=e.value)==null?void 0:u.contains(f))||((p=t.value)==null?void 0:p.contains(f)),g=!ei(v,o.value),y=!!f.closest("[data-grace-area-trigger]");h?r():(g||y)&&(r(),i.trigger())};(d=e.value)==null||d.ownerDocument.addEventListener("pointermove",c),s(()=>{var a;return(a=e.value)==null?void 0:a.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function Jo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Zo(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Qo(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ei(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,l=t.length-1;ro!=a>o&&n<(c-s)*(o-d)/(a-d)+s&&(i=!i)}return i}function ti(e){const t=e.slice();return t.sort((n,o)=>n.xo.x?1:n.yo.y?1:0),ni(t)}function ni(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o=2;){const r=t[t.length-1],l=t[t.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],l=n[n.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oe=new WeakMap,Le=new WeakMap,Fe={},qe=0,an=function(e){return e&&(e.host||an(e.parentNode))},ii=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=an(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ri=function(e,t,n,o){var i=ii(t,Array.isArray(e)?e:[e]);Fe[n]||(Fe[n]=new WeakMap);var r=Fe[n],l=[],s=new Set,d=new Set(i),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};i.forEach(c);var a=function(u){!u||d.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))a(p);else try{var f=p.getAttribute(o),v=f!==null&&f!=="false",h=(Oe.get(p)||0)+1,g=(r.get(p)||0)+1;Oe.set(p,h),r.set(p,g),l.push(p),h===1&&v&&Le.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return a(t),s.clear(),qe++,function(){l.forEach(function(u){var p=Oe.get(u)-1,f=r.get(u)-1;Oe.set(u,p),r.set(u,f),p||(Le.has(u)||u.removeAttribute(o),Le.delete(u)),f||u.removeAttribute(n)}),qe--,qe||(Oe=new WeakMap,Oe=new WeakMap,Le=new WeakMap,Fe={})}},li=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=oi(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),ri(o,i,n,"aria-hidden")):function(){return null}};function si(e){let t;j(()=>$e(e),n=>{n?t=li(n):t&&t()}),It(()=>{t&&t()})}let ai=0;function it(e,t="radix"){const n=on({useId:void 0});return xt?`${t}-${xt()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++ai}`}function ui(e){const t=E(),n=O(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),o=O(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return De(()=>{const i=$e(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let d,c;if("borderBoxSize"in s){const a=s.borderBoxSize,u=Array.isArray(a)?a[0]:a;d=u.inlineSize,c=u.blockSize}else d=i.offsetWidth,c=i.offsetHeight;t.value={width:d,height:c}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}function ci(e,t){const n=E(e);function o(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=o(i)}}}const di=D({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o,i;if(!n.default)return null;const r=ht(n.default()),l=r.findIndex(a=>a.type!==Wt);if(l===-1)return r;const s=r[l];(o=s.props)==null||delete o.ref;const d=s.props?F(t,s.props):t;t.class&&(i=s.props)!=null&&i.class&&delete s.props.class;const c=En(s,d);for(const a in d)a.startsWith("on")&&(c.props||(c.props={}),c.props[a]=d[a]);return r.length===1?c:(r[l]=c,r)}}}),X=D({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>ke(o,t):o!=="template"?()=>ke(e.as,t,{default:n.default}):()=>ke(di,t,{default:n.default})}});function fi(e,t){var n;const o=E({}),i=E("none"),r=E(e),l=e.value?"mounted":"unmounted";let s;const d=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??gt,{state:c,dispatch:a}=ci(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=g=>{var y;if(pe){const b=new CustomEvent(g,{bubbles:!1,cancelable:!1});(y=t.value)==null||y.dispatchEvent(b)}};j(e,async(g,y)=>{var b;const w=y!==g;if(await he(),w){const C=i.value,x=Ne(t.value);g?(a("MOUNT"),u("enter"),x==="none"&&u("after-enter")):x==="none"||((b=o.value)==null?void 0:b.display)==="none"?(a("UNMOUNT"),u("leave"),u("after-leave")):y&&C!==x?(a("ANIMATION_OUT"),u("leave")):(a("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=g=>{const y=Ne(t.value),b=y.includes(g.animationName),w=c.value==="mounted"?"enter":"leave";if(g.target===t.value&&b&&(u(`after-${w}`),a("ANIMATION_END"),!r.value)){const C=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",s=d==null?void 0:d.setTimeout(()=>{var x;((x=t.value)==null?void 0:x.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=C)})}g.target===t.value&&y==="none"&&a("ANIMATION_END")},f=g=>{g.target===t.value&&(i.value=Ne(t.value))},v=j(t,(g,y)=>{g?(o.value=getComputedStyle(g),g.addEventListener("animationstart",f),g.addEventListener("animationcancel",p),g.addEventListener("animationend",p)):(a("ANIMATION_END"),s!==void 0&&(d==null||d.clearTimeout(s)),y==null||y.removeEventListener("animationstart",f),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),h=j(c,()=>{const g=Ne(t.value);i.value=c.value==="mounted"?g:"none"});return It(()=>{v(),h()}),{isPresent:O(()=>["mounted","unmountSuspended"].includes(c.value))}}function Ne(e){return e&&getComputedStyle(e).animationName||"none"}const yt=D({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var o;const{present:i,forceMount:r}=lt(e),l=E(),{isPresent:s}=fi(i,l);n({present:s});let d=t.default({present:s});d=ht(d||[]);const c=ye();if(d&&(d==null?void 0:d.length)>1){const a=(o=c==null?void 0:c.parent)!=null&&o.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${a}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(` +import{l as O,r as E,K as Mt,w as j,ak as Lt,al as Ft,bV as xe,u as m,d as D,m as T,o as B,E as A,B as P,bW as de,bX as fe,bY as F,bO as Ze,by as he,f as De,I as lt,i as Nt,b as me,bZ as yn,b_ as ye,b$ as wn,c0 as kt,c1 as bn,c2 as ke,c3 as xn,c4 as On,bu as Cn,g as It,bA as An,c5 as Wt,c6 as En,c7 as Ht,c8 as xt,ai as K,ae as Dn,bN as Pn,t as _n,c as Vt,q as st,c9 as jt,ca as Bn,cb as zt,cc as Tn,cd as Rn,a as $n,ce as Sn,cf as Mn}from"./index-DCMFRrFG.js";const Ln=["top","right","bottom","left"],ae=Math.min,H=Math.max,Ie=Math.round,Me=Math.floor,G=e=>({x:e,y:e}),Fn={left:"right",right:"left",bottom:"top",top:"bottom"},Nn={start:"end",end:"start"};function Qe(e,t,n){return H(e,ae(t,n))}function ee(e,t){return typeof e=="function"?e(t):e}function te(e){return e.split("-")[0]}function Pe(e){return e.split("-")[1]}function at(e){return e==="x"?"y":"x"}function ut(e){return e==="y"?"height":"width"}function ue(e){return["top","bottom"].includes(te(e))?"y":"x"}function ct(e){return at(ue(e))}function kn(e,t,n){n===void 0&&(n=!1);const o=Pe(e),i=ct(e),r=ut(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(l=We(l)),[l,We(l)]}function In(e){const t=We(e);return[et(e),t,et(t)]}function et(e){return e.replace(/start|end/g,t=>Nn[t])}function Wn(e,t,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:o:t?o:i;case"left":case"right":return t?r:l;default:return[]}}function Hn(e,t,n,o){const i=Pe(e);let r=Wn(te(e),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),t&&(r=r.concat(r.map(et)))),r}function We(e){return e.replace(/left|right|bottom|top/g,t=>Fn[t])}function Vn(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kt(e){return typeof e!="number"?Vn(e):{top:e,right:e,bottom:e,left:e}}function He(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}function Ot(e,t,n){let{reference:o,floating:i}=e;const r=ue(t),l=ct(t),s=ut(l),d=te(t),c=r==="y",a=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,p=o[s]/2-i[s]/2;let f;switch(d){case"top":f={x:a,y:o.y-i.height};break;case"bottom":f={x:a,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(Pe(t)){case"start":f[l]-=p*(n&&c?-1:1);break;case"end":f[l]+=p*(n&&c?-1:1);break}return f}const jn=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,s=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let c=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:a,y:u}=Ot(c,o,d),p=o,f={},v=0;for(let h=0;h({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:i,rects:r,platform:l,elements:s,middlewareData:d}=t,{element:c,padding:a=0}=ee(e,t)||{};if(c==null)return{};const u=Kt(a),p={x:n,y:o},f=ct(i),v=ut(f),h=await l.getDimensions(c),g=f==="y",y=g?"top":"left",b=g?"bottom":"right",w=g?"clientHeight":"clientWidth",C=r.reference[v]+r.reference[f]-p[f]-r.floating[v],x=p[f]-r.reference[f],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let _=S?S[w]:0;(!_||!await(l.isElement==null?void 0:l.isElement(S)))&&(_=s.floating[w]||r.floating[v]);const M=C/2-x/2,N=_/2-h[v]/2-1,R=ae(u[y],N),z=ae(u[b],N),k=R,W=_-h[v]-z,L=_/2-h[v]/2+M,oe=Qe(k,L,W),I=!d.arrow&&Pe(i)!=null&&L!==oe&&r.reference[v]/2-(LL<=0)){var z,k;const L=(((z=r.flip)==null?void 0:z.index)||0)+1,oe=_[L];if(oe)return{data:{index:L,overflows:R},reset:{placement:oe}};let I=(k=R.filter(q=>q.overflows[0]<=0).sort((q,ie)=>q.overflows[1]-ie.overflows[1])[0])==null?void 0:k.placement;if(!I)switch(f){case"bestFit":{var W;const q=(W=R.filter(ie=>{if(S){const re=ue(ie.placement);return re===b||re==="y"}return!0}).map(ie=>[ie.placement,ie.overflows.filter(re=>re>0).reduce((re,hn)=>re+hn,0)]).sort((ie,re)=>ie[1]-re[1])[0])==null?void 0:W[0];q&&(I=q);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function Ct(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function At(e){return Ln.some(t=>e[t]>=0)}const Un=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...i}=ee(e,t);switch(o){case"referenceHidden":{const r=await _e(t,{...i,elementContext:"reference"}),l=Ct(r,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:At(l)}}}case"escaped":{const r=await _e(t,{...i,altBoundary:!0}),l=Ct(r,n.floating);return{data:{escapedOffsets:l,escaped:At(l)}}}default:return{}}}}};async function Yn(e,t){const{placement:n,platform:o,elements:i}=e,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=te(n),s=Pe(n),d=ue(n)==="y",c=["left","top"].includes(l)?-1:1,a=r&&d?-1:1,u=ee(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:v}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof v=="number"&&(f=s==="end"?v*-1:v),d?{x:f*a,y:p*c}:{x:p*c,y:f*a}}const Xn=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:r,placement:l,middlewareData:s}=t,d=await Yn(t,e);return l===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},qn=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...d}=ee(e,t),c={x:n,y:o},a=await _e(t,d),u=ue(te(i)),p=at(u);let f=c[p],v=c[u];if(r){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=f+a[g],w=f-a[y];f=Qe(b,f,w)}if(l){const g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",b=v+a[g],w=v-a[y];v=Qe(b,v,w)}const h=s.fn({...t,[p]:f,[u]:v});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[p]:r,[u]:l}}}}}},Gn=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:i,rects:r,middlewareData:l}=t,{offset:s=0,mainAxis:d=!0,crossAxis:c=!0}=ee(e,t),a={x:n,y:o},u=ue(i),p=at(u);let f=a[p],v=a[u];const h=ee(s,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(d){const w=p==="y"?"height":"width",C=r.reference[p]-r.floating[w]+g.mainAxis,x=r.reference[p]+r.reference[w]-g.mainAxis;fx&&(f=x)}if(c){var y,b;const w=p==="y"?"width":"height",C=["top","left"].includes(te(i)),x=r.reference[u]-r.floating[w]+(C&&((y=l.offset)==null?void 0:y[u])||0)+(C?0:g.crossAxis),S=r.reference[u]+r.reference[w]+(C?0:((b=l.offset)==null?void 0:b[u])||0)-(C?g.crossAxis:0);vS&&(v=S)}return{[p]:f,[u]:v}}}},Jn=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:r,platform:l,elements:s}=t,{apply:d=()=>{},...c}=ee(e,t),a=await _e(t,c),u=te(i),p=Pe(i),f=ue(i)==="y",{width:v,height:h}=r.floating;let g,y;u==="top"||u==="bottom"?(g=u,y=p===(await(l.isRTL==null?void 0:l.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,g=p==="end"?"top":"bottom");const b=h-a.top-a.bottom,w=v-a.left-a.right,C=ae(h-a[g],b),x=ae(v-a[y],w),S=!t.middlewareData.shift;let _=C,M=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(_=b),S&&!p){const R=H(a.left,0),z=H(a.right,0),k=H(a.top,0),W=H(a.bottom,0);f?M=v-2*(R!==0||z!==0?R+z:H(a.left,a.right)):_=h-2*(k!==0||W!==0?k+W:H(a.top,a.bottom))}await d({...t,availableWidth:M,availableHeight:_});const N=await l.getDimensions(s.floating);return v!==N.width||h!==N.height?{reset:{rects:!0}}:{}}}};function je(){return typeof window<"u"}function we(e){return dt(e)?(e.nodeName||"").toLowerCase():"#document"}function V(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){var t;return(t=(dt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dt(e){return je()?e instanceof Node||e instanceof V(e).Node:!1}function U(e){return je()?e instanceof Element||e instanceof V(e).Element:!1}function J(e){return je()?e instanceof HTMLElement||e instanceof V(e).HTMLElement:!1}function Et(e){return!je()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof V(e).ShadowRoot}function Te(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(i)}function Zn(e){return["table","td","th"].includes(we(e))}function ze(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ft(e){const t=pt(),n=U(e)?Y(e):e;return["transform","translate","scale","rotate","perspective"].some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Qn(e){let t=ce(e);for(;J(t)&&!Ee(t);){if(ft(t))return t;if(ze(t))return null;t=ce(t)}return null}function pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ee(e){return["html","body","#document"].includes(we(e))}function Y(e){return V(e).getComputedStyle(e)}function Ke(e){return U(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ce(e){if(we(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Et(e)&&e.host||Z(e);return Et(t)?t.host:t}function Ut(e){const t=ce(e);return Ee(t)?e.ownerDocument?e.ownerDocument.body:e.body:J(t)&&Te(t)?t:Ut(t)}function Be(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Ut(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),l=V(i);if(r){const s=tt(l);return t.concat(l,l.visualViewport||[],Te(i)?i:[],s&&n?Be(s):[])}return t.concat(i,Be(i,[],n))}function tt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yt(e){const t=Y(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=J(e),r=i?e.offsetWidth:n,l=i?e.offsetHeight:o,s=Ie(n)!==r||Ie(o)!==l;return s&&(n=r,o=l),{width:n,height:o,$:s}}function vt(e){return U(e)?e:e.contextElement}function Ae(e){const t=vt(e);if(!J(t))return G(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:r}=Yt(t);let l=(r?Ie(n.width):n.width)/o,s=(r?Ie(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const eo=G(0);function Xt(e){const t=V(e);return!pt()||!t.visualViewport?eo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function to(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==V(e)?!1:t}function ge(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),r=vt(e);let l=G(1);t&&(o?U(o)&&(l=Ae(o)):l=Ae(e));const s=to(r,n,o)?Xt(r):G(0);let d=(i.left+s.x)/l.x,c=(i.top+s.y)/l.y,a=i.width/l.x,u=i.height/l.y;if(r){const p=V(r),f=o&&U(o)?V(o):o;let v=p,h=tt(v);for(;h&&o&&f!==v;){const g=Ae(h),y=h.getBoundingClientRect(),b=Y(h),w=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,C=y.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;d*=g.x,c*=g.y,a*=g.x,u*=g.y,d+=w,c+=C,v=V(h),h=tt(v)}}return He({width:a,height:u,x:d,y:c})}function mt(e,t){const n=Ke(e).scrollLeft;return t?t.left+n:ge(Z(e)).left+n}function qt(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=o.left+t.scrollLeft-(n?0:mt(e,o)),r=o.top+t.scrollTop;return{x:i,y:r}}function no(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const r=i==="fixed",l=Z(o),s=t?ze(t.floating):!1;if(o===l||s&&r)return n;let d={scrollLeft:0,scrollTop:0},c=G(1);const a=G(0),u=J(o);if((u||!u&&!r)&&((we(o)!=="body"||Te(l))&&(d=Ke(o)),J(o))){const f=ge(o);c=Ae(o),a.x=f.x+o.clientLeft,a.y=f.y+o.clientTop}const p=l&&!u&&!r?qt(l,d,!0):G(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+a.x+p.x,y:n.y*c.y-d.scrollTop*c.y+a.y+p.y}}function oo(e){return Array.from(e.getClientRects())}function io(e){const t=Z(e),n=Ke(e),o=e.ownerDocument.body,i=H(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),r=H(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+mt(e);const s=-n.scrollTop;return Y(o).direction==="rtl"&&(l+=H(t.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:s}}function ro(e,t){const n=V(e),o=Z(e),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,d=0;if(i){r=i.width,l=i.height;const c=pt();(!c||c&&t==="fixed")&&(s=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:s,y:d}}function lo(e,t){const n=ge(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,r=J(e)?Ae(e):G(1),l=e.clientWidth*r.x,s=e.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:s,x:d,y:c}}function Dt(e,t,n){let o;if(t==="viewport")o=ro(e,n);else if(t==="document")o=io(Z(e));else if(U(t))o=lo(t,n);else{const i=Xt(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return He(o)}function Gt(e,t){const n=ce(e);return n===t||!U(n)||Ee(n)?!1:Y(n).position==="fixed"||Gt(n,t)}function so(e,t){const n=t.get(e);if(n)return n;let o=Be(e,[],!1).filter(s=>U(s)&&we(s)!=="body"),i=null;const r=Y(e).position==="fixed";let l=r?ce(e):e;for(;U(l)&&!Ee(l);){const s=Y(l),d=ft(l);!d&&s.position==="fixed"&&(i=null),(r?!d&&!i:!d&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Te(l)&&!d&&Gt(e,l))?o=o.filter(a=>a!==l):i=s,l=ce(l)}return t.set(e,o),o}function ao(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const l=[...n==="clippingAncestors"?ze(t)?[]:so(t,this._c):[].concat(n),o],s=l[0],d=l.reduce((c,a)=>{const u=Dt(t,a,i);return c.top=H(u.top,c.top),c.right=ae(u.right,c.right),c.bottom=ae(u.bottom,c.bottom),c.left=H(u.left,c.left),c},Dt(t,s,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function uo(e){const{width:t,height:n}=Yt(e);return{width:t,height:n}}function co(e,t,n){const o=J(t),i=Z(t),r=n==="fixed",l=ge(e,!0,r,t);let s={scrollLeft:0,scrollTop:0};const d=G(0);if(o||!o&&!r)if((we(t)!=="body"||Te(i))&&(s=Ke(t)),o){const p=ge(t,!0,r,t);d.x=p.x+t.clientLeft,d.y=p.y+t.clientTop}else i&&(d.x=mt(i));const c=i&&!o&&!r?qt(i,s):G(0),a=l.left+s.scrollLeft-d.x-c.x,u=l.top+s.scrollTop-d.y-c.y;return{x:a,y:u,width:l.width,height:l.height}}function Ye(e){return Y(e).position==="static"}function Pt(e,t){if(!J(e)||Y(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Jt(e,t){const n=V(e);if(ze(e))return n;if(!J(e)){let i=ce(e);for(;i&&!Ee(i);){if(U(i)&&!Ye(i))return i;i=ce(i)}return n}let o=Pt(e,t);for(;o&&Zn(o)&&Ye(o);)o=Pt(o,t);return o&&Ee(o)&&Ye(o)&&!ft(o)?n:o||Qn(e)||n}const fo=async function(e){const t=this.getOffsetParent||Jt,n=this.getDimensions,o=await n(e.floating);return{reference:co(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function po(e){return Y(e).direction==="rtl"}const vo={convertOffsetParentRelativeRectToViewportRelativeRect:no,getDocumentElement:Z,getClippingRect:ao,getOffsetParent:Jt,getElementRects:fo,getClientRects:oo,getDimensions:uo,getScale:Ae,isElement:U,isRTL:po};function Zt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mo(e,t){let n=null,o;const i=Z(e);function r(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function l(s,d){s===void 0&&(s=!1),d===void 0&&(d=1),r();const c=e.getBoundingClientRect(),{left:a,top:u,width:p,height:f}=c;if(s||t(),!p||!f)return;const v=Me(u),h=Me(i.clientWidth-(a+p)),g=Me(i.clientHeight-(u+f)),y=Me(a),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-y+"px",threshold:H(0,ae(1,d))||1};let C=!0;function x(S){const _=S[0].intersectionRatio;if(_!==d){if(!C)return l();_?l(!1,_):o=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!Zt(c,e.getBoundingClientRect())&&l(),C=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return l(!0),r}function go(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=vt(e),a=i||r?[...c?Be(c):[],...Be(t)]:[];a.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const u=c&&s?mo(c,n):null;let p=-1,f=null;l&&(f=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=f)==null||w.observe(t)})),n()}),c&&!d&&f.observe(c),f.observe(t));let v,h=d?ge(e):null;d&&g();function g(){const y=ge(e);h&&!Zt(h,y)&&n(),h=y,v=requestAnimationFrame(g)}return n(),()=>{var y;a.forEach(b=>{i&&b.removeEventListener("scroll",n),r&&b.removeEventListener("resize",n)}),u==null||u(),(y=f)==null||y.disconnect(),f=null,d&&cancelAnimationFrame(v)}}const ho=Xn,yo=qn,_t=Kn,wo=Jn,bo=Un,xo=zn,Oo=Gn,Co=(e,t,n)=>{const o=new Map,i={platform:vo,...n},r={...i.platform,_c:o};return jn(e,t,{...i,platform:r})};function Ao(e){return e!=null&&typeof e=="object"&&"$el"in e}function nt(e){if(Ao(e)){const t=e.$el;return dt(t)&&we(t)==="#comment"?null:t}return e}function Ce(e){return typeof e=="function"?e():m(e)}function Eo(e){return{name:"arrow",options:e,fn(t){const n=nt(Ce(e.element));return n==null?{}:xo({element:n,padding:e.padding}).fn(t)}}}function Qt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bt(e,t){const n=Qt(e);return Math.round(t*n)/n}function Do(e,t,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=O(()=>{var _;return(_=Ce(n.open))!=null?_:!0}),r=O(()=>Ce(n.middleware)),l=O(()=>{var _;return(_=Ce(n.placement))!=null?_:"bottom"}),s=O(()=>{var _;return(_=Ce(n.strategy))!=null?_:"absolute"}),d=O(()=>{var _;return(_=Ce(n.transform))!=null?_:!0}),c=O(()=>nt(e.value)),a=O(()=>nt(t.value)),u=E(0),p=E(0),f=E(s.value),v=E(l.value),h=Mt({}),g=E(!1),y=O(()=>{const _={position:f.value,left:"0",top:"0"};if(!a.value)return _;const M=Bt(a.value,u.value),N=Bt(a.value,p.value);return d.value?{..._,transform:"translate("+M+"px, "+N+"px)",...Qt(a.value)>=1.5&&{willChange:"transform"}}:{position:f.value,left:M+"px",top:N+"px"}});let b;function w(){if(c.value==null||a.value==null)return;const _=i.value;Co(c.value,a.value,{middleware:r.value,placement:l.value,strategy:s.value}).then(M=>{u.value=M.x,p.value=M.y,f.value=M.strategy,v.value=M.placement,h.value=M.middlewareData,g.value=_!==!1})}function C(){typeof b=="function"&&(b(),b=void 0)}function x(){if(C(),o===void 0){w();return}if(c.value!=null&&a.value!=null){b=o(c.value,a.value,w);return}}function S(){i.value||(g.value=!1)}return j([r,l,s,i],w,{flush:"sync"}),j([c,a],x,{flush:"sync"}),j(i,S,{flush:"sync"}),Lt()&&Ft(C),{x:xe(u),y:xe(p),strategy:xe(f),placement:xe(v),middlewareData:xe(h),isPositioned:xe(g),floatingStyles:y,update:w}}function be(e,t){const n=typeof e=="string"&&!t?`${e}Context`:t,o=Symbol(n);return[i=>{const r=bn(o,i);if(r||r===null)return r;throw new Error(`Injection \`${o.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`)},i=>(Mn(o,i),i)]}function en(e,t,n){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),o.dispatchEvent(i)}function Po(e,t){var n;const o=Mt();return K(()=>{o.value=e()},{...t,flush:(n=void 0)!=null?n:"sync"}),Ht(o)}function Re(e){return Lt()?(Ft(e),!0):!1}function _o(){const e=new Set,t=n=>{e.delete(n)};return{on:n=>{e.add(n);const o=()=>t(n);return Re(o),{off:o}},off:t,trigger:(...n)=>Promise.all(Array.from(e).map(o=>o(...n)))}}function Bo(e){let t=!1,n;const o=jt(!0);return(...i)=>(t||(n=o.run(()=>e(...i)),t=!0),n)}function To(e){let t=0,n,o;const i=()=>{t-=1,o&&t<=0&&(o.stop(),n=void 0,o=void 0)};return(...r)=>(t+=1,n||(o=jt(!0),n=o.run(()=>e(...r))),Re(i),n)}function ve(e){return typeof e=="function"?e():m(e)}const pe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ro=e=>typeof e<"u",$o=Object.prototype.toString,So=e=>$o.call(e)==="[object Object]",Mo=()=>{},Tt=Lo();function Lo(){var e,t;return pe&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Fo(e){return ye()}function No(e,t=1e4){return Sn((n,o)=>{let i=ve(e),r;const l=()=>setTimeout(()=>{i=ve(e),o()},ve(t));return Re(()=>{clearTimeout(r)}),{get(){return n(),i},set(s){i=s,o(),clearTimeout(r),r=l()}}})}function ko(e,t){Fo()&&Bn(e,t)}function tn(e,t,n={}){const{immediate:o=!0}=n,i=E(!1);let r=null;function l(){r&&(clearTimeout(r),r=null)}function s(){i.value=!1,l()}function d(...c){l(),i.value=!0,r=setTimeout(()=>{i.value=!1,r=null,e(...c)},ve(t))}return o&&(i.value=!0,pe&&d()),Re(s),{isPending:Ht(i),start:d,stop:s}}function $e(e){var t;const n=ve(e);return(t=n==null?void 0:n.$el)!=null?t:n}const gt=pe?window:void 0;function Ve(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=gt):[t,n,o,i]=e,!t)return Mo;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const r=[],l=()=>{r.forEach(a=>a()),r.length=0},s=(a,u,p,f)=>(a.addEventListener(u,p,f),()=>a.removeEventListener(u,p,f)),d=j(()=>[$e(t),ve(i)],([a,u])=>{if(l(),!a)return;const p=So(u)?{...u}:u;r.push(...n.flatMap(f=>o.map(v=>s(a,f,v,p))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return Re(c),c}function Io(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Wo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=gt,eventName:r="keydown",passive:l=!1,dedupe:s=!1}=o,d=Io(t);return Ve(i,r,c=>{c.repeat&&ve(s)||d(c)&&n(c)},l)}function Ho(){const e=E(!1),t=ye();return t&&De(()=>{e.value=!0},t),e}function Vo(e){return JSON.parse(JSON.stringify(e))}function nn(e,t,n,o={}){var i,r,l;const{clone:s=!1,passive:d=!1,eventName:c,deep:a=!1,defaultValue:u,shouldEmit:p}=o,f=ye(),v=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((l=(r=f==null?void 0:f.proxy)==null?void 0:r.$emit)==null?void 0:l.bind(f==null?void 0:f.proxy));let h=c;h=h||`update:${t.toString()}`;const g=w=>s?typeof s=="function"?s(w):Vo(w):w,y=()=>Ro(e[t])?g(e[t]):u,b=w=>{p?p(w)&&v(h,w):v(h,w)};if(d){const w=y(),C=E(w);let x=!1;return j(()=>e[t],S=>{x||(x=!0,C.value=g(S),he(()=>x=!1))}),j(C,S=>{!x&&(S!==e[t]||a)&&b(S)},{deep:a}),C}else return O({get(){return y()},set(w){b(w)}})}function ht(e){return e?e.flatMap(t=>t.type===An?ht(t.children):[t]):[]}function se(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Xe(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function ot(e,t,n=".",o){if(!Xe(t))return ot(e,{},n);const i=Object.assign({},t);for(const r in e){if(r==="__proto__"||r==="constructor")continue;const l=e[r];l!=null&&(Array.isArray(l)&&Array.isArray(i[r])?i[r]=[...l,...i[r]]:Xe(l)&&Xe(i[r])?i[r]=ot(l,i[r],(n?`${n}.`:"")+r.toString()):i[r]=l)}return i}function jo(e){return(...t)=>t.reduce((n,o)=>ot(n,o,""),{})}const zo=jo(),[on,nr]=be("ConfigProvider");let Ko="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Uo=(e=21)=>{let t="",n=e;for(;n--;)t+=Ko[Math.random()*64|0];return t};const Yo=To(()=>{const e=E(new Map),t=E(),n=O(()=>{for(const l of e.value.values())if(l)return!0;return!1}),o=on({scrollBody:E(!0)});let i=null;const r=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",Tt&&(i==null||i()),t.value=void 0};return j(n,(l,s)=>{var d;if(!pe)return;if(!l){s&&r();return}t.value===void 0&&(t.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,a={padding:c,margin:0},u=(d=o.scrollBody)!=null&&d.value?typeof o.scrollBody.value=="object"?zo({padding:o.scrollBody.value.padding===!0?c:o.scrollBody.value.padding,margin:o.scrollBody.value.margin===!0?c:o.scrollBody.value.margin},a):a:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof u.padding=="number"?`${u.padding}px`:String(u.padding),document.body.style.marginRight=typeof u.margin=="number"?`${u.margin}px`:String(u.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),Tt&&(i=Ve(document,"touchmove",p=>qo(p),{passive:!1})),he(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Xo(e){const t=Uo(6),n=Yo();n.value.set(t,e);const o=O({get:()=>n.value.get(t)??!1,set:i=>n.value.set(t,i)});return ko(()=>{n.value.delete(t)}),o}function rn(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Se(e){const t=ye(),n=t==null?void 0:t.type.emits,o={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${t==null?void 0:t.type.__name}`),n==null||n.forEach(i=>{o[wn(kt(i))]=(...r)=>e(i,...r)}),o}function ln(e){const t=ye(),n=Object.keys((t==null?void 0:t.type.props)??{}).reduce((i,r)=>{const l=(t==null?void 0:t.type.props[r]).default;return l!==void 0&&(i[r]=l),i},{}),o=Cn(e);return O(()=>{const i={},r=(t==null?void 0:t.vnode.props)??{};return Object.keys(r).forEach(l=>{i[kt(l)]=r[l]}),Object.keys({...n,...i}).reduce((l,s)=>(o.value[s]!==void 0&&(l[s]=o.value[s]),l),{})})}function sn(e,t){const n=ln(e),o=t?Se(t):{};return O(()=>({...n.value,...o}))}function $(){const e=ye(),t=E(),n=O(()=>{var l,s;return["#text","#comment"].includes((l=t.value)==null?void 0:l.$el.nodeName)?(s=t.value)==null?void 0:s.$el.nextElementSibling:$e(t)}),o=Object.assign({},e.exposed),i={};for(const l in e.props)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>e.props[l]});if(Object.keys(o).length>0)for(const l in o)Object.defineProperty(i,l,{enumerable:!0,configurable:!0,get:()=>o[l]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=i;function r(l){t.value=l,l&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>l instanceof Element?l:l.$el}),e.exposed=i)}return{forwardRef:r,currentRef:t,currentElement:n}}function Go(e,t){const n=No(!1,300),o=E(null),i=_o();function r(){o.value=null,n.value=!1}function l(s,d){const c=s.currentTarget,a={x:s.clientX,y:s.clientY},u=Jo(a,c.getBoundingClientRect()),p=Zo(a,u),f=Qo(d.getBoundingClientRect()),v=ti([...p,...f]);o.value=v,n.value=!0}return K(s=>{if(e.value&&t.value){const d=a=>l(a,t.value),c=a=>l(a,e.value);e.value.addEventListener("pointerleave",d),t.value.addEventListener("pointerleave",c),s(()=>{var a,u;(a=e.value)==null||a.removeEventListener("pointerleave",d),(u=t.value)==null||u.removeEventListener("pointerleave",c)})}}),K(s=>{var d;if(o.value){const c=a=>{var u,p;if(!o.value)return;const f=a.target,v={x:a.clientX,y:a.clientY},h=((u=e.value)==null?void 0:u.contains(f))||((p=t.value)==null?void 0:p.contains(f)),g=!ei(v,o.value),y=!!f.closest("[data-grace-area-trigger]");h?r():(g||y)&&(r(),i.trigger())};(d=e.value)==null||d.ownerDocument.addEventListener("pointermove",c),s(()=>{var a;return(a=e.value)==null?void 0:a.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function Jo(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,o,i,r)){case r:return"left";case i:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Zo(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Qo(e){const{top:t,right:n,bottom:o,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:o},{x:i,y:o}]}function ei(e,t){const{x:n,y:o}=e;let i=!1;for(let r=0,l=t.length-1;ro!=a>o&&n<(c-s)*(o-d)/(a-d)+s&&(i=!i)}return i}function ti(e){const t=e.slice();return t.sort((n,o)=>n.xo.x?1:n.yo.y?1:0),ni(t)}function ni(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o=2;){const r=t[t.length-1],l=t[t.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const i=e[o];for(;n.length>=2;){const r=n[n.length-1],l=n[n.length-2];if((r.x-l.x)*(i.y-l.y)>=(r.y-l.y)*(i.x-l.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oi=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Oe=new WeakMap,Le=new WeakMap,Fe={},qe=0,an=function(e){return e&&(e.host||an(e.parentNode))},ii=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=an(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ri=function(e,t,n,o){var i=ii(t,Array.isArray(e)?e:[e]);Fe[n]||(Fe[n]=new WeakMap);var r=Fe[n],l=[],s=new Set,d=new Set(i),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};i.forEach(c);var a=function(u){!u||d.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))a(p);else try{var f=p.getAttribute(o),v=f!==null&&f!=="false",h=(Oe.get(p)||0)+1,g=(r.get(p)||0)+1;Oe.set(p,h),r.set(p,g),l.push(p),h===1&&v&&Le.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return a(t),s.clear(),qe++,function(){l.forEach(function(u){var p=Oe.get(u)-1,f=r.get(u)-1;Oe.set(u,p),r.set(u,f),p||(Le.has(u)||u.removeAttribute(o),Le.delete(u)),f||u.removeAttribute(n)}),qe--,qe||(Oe=new WeakMap,Oe=new WeakMap,Le=new WeakMap,Fe={})}},li=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=oi(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),ri(o,i,n,"aria-hidden")):function(){return null}};function si(e){let t;j(()=>$e(e),n=>{n?t=li(n):t&&t()}),It(()=>{t&&t()})}let ai=0;function it(e,t="radix"){const n=on({useId:void 0});return xt?`${t}-${xt()}`:n.useId?`${t}-${n.useId()}`:`${t}-${++ai}`}function ui(e){const t=E(),n=O(()=>{var i;return((i=t.value)==null?void 0:i.width)??0}),o=O(()=>{var i;return((i=t.value)==null?void 0:i.height)??0});return De(()=>{const i=$e(e);if(i){t.value={width:i.offsetWidth,height:i.offsetHeight};const r=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let d,c;if("borderBoxSize"in s){const a=s.borderBoxSize,u=Array.isArray(a)?a[0]:a;d=u.inlineSize,c=u.blockSize}else d=i.offsetWidth,c=i.offsetHeight;t.value={width:d,height:c}});return r.observe(i,{box:"border-box"}),()=>r.unobserve(i)}else t.value=void 0}),{width:n,height:o}}function ci(e,t){const n=E(e);function o(i){return t[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=o(i)}}}const di=D({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{var o,i;if(!n.default)return null;const r=ht(n.default()),l=r.findIndex(a=>a.type!==Wt);if(l===-1)return r;const s=r[l];(o=s.props)==null||delete o.ref;const d=s.props?F(t,s.props):t;t.class&&(i=s.props)!=null&&i.class&&delete s.props.class;const c=En(s,d);for(const a in d)a.startsWith("on")&&(c.props||(c.props={}),c.props[a]=d[a]);return r.length===1?c:(r[l]=c,r)}}}),X=D({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(e,{attrs:t,slots:n}){const o=e.asChild?"template":e.as;return typeof o=="string"&&["area","img","input"].includes(o)?()=>ke(o,t):o!=="template"?()=>ke(e.as,t,{default:n.default}):()=>ke(di,t,{default:n.default})}});function fi(e,t){var n;const o=E({}),i=E("none"),r=E(e),l=e.value?"mounted":"unmounted";let s;const d=((n=t.value)==null?void 0:n.ownerDocument.defaultView)??gt,{state:c,dispatch:a}=ci(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),u=g=>{var y;if(pe){const b=new CustomEvent(g,{bubbles:!1,cancelable:!1});(y=t.value)==null||y.dispatchEvent(b)}};j(e,async(g,y)=>{var b;const w=y!==g;if(await he(),w){const C=i.value,x=Ne(t.value);g?(a("MOUNT"),u("enter"),x==="none"&&u("after-enter")):x==="none"||((b=o.value)==null?void 0:b.display)==="none"?(a("UNMOUNT"),u("leave"),u("after-leave")):y&&C!==x?(a("ANIMATION_OUT"),u("leave")):(a("UNMOUNT"),u("after-leave"))}},{immediate:!0});const p=g=>{const y=Ne(t.value),b=y.includes(g.animationName),w=c.value==="mounted"?"enter":"leave";if(g.target===t.value&&b&&(u(`after-${w}`),a("ANIMATION_END"),!r.value)){const C=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",s=d==null?void 0:d.setTimeout(()=>{var x;((x=t.value)==null?void 0:x.style.animationFillMode)==="forwards"&&(t.value.style.animationFillMode=C)})}g.target===t.value&&y==="none"&&a("ANIMATION_END")},f=g=>{g.target===t.value&&(i.value=Ne(t.value))},v=j(t,(g,y)=>{g?(o.value=getComputedStyle(g),g.addEventListener("animationstart",f),g.addEventListener("animationcancel",p),g.addEventListener("animationend",p)):(a("ANIMATION_END"),s!==void 0&&(d==null||d.clearTimeout(s)),y==null||y.removeEventListener("animationstart",f),y==null||y.removeEventListener("animationcancel",p),y==null||y.removeEventListener("animationend",p))},{immediate:!0}),h=j(c,()=>{const g=Ne(t.value);i.value=c.value==="mounted"?g:"none"});return It(()=>{v(),h()}),{isPresent:O(()=>["mounted","unmountSuspended"].includes(c.value))}}function Ne(e){return e&&getComputedStyle(e).animationName||"none"}const yt=D({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){var o;const{present:i,forceMount:r}=lt(e),l=E(),{isPresent:s}=fi(i,l);n({present:s});let d=t.default({present:s});d=ht(d||[]);const c=ye();if(d&&(d==null?void 0:d.length)>1){const a=(o=c==null?void 0:c.parent)!=null&&o.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${a}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(u=>` - ${u}`).join(` `)].join(` `))}return()=>r.value||i.value||s.value?ke(t.default({present:s})[0],{ref:a=>{const u=$e(a);return typeof(u==null?void 0:u.hasAttribute)>"u"||(u!=null&&u.hasAttribute("data-radix-popper-content-wrapper")?l.value=u.firstElementChild:l.value=u),u}}):null}}),[ne,pi]=be("DialogRoot"),vi=D({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=nn(n,"open",t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=E(),r=E(),{modal:l}=lt(n);return pi({open:o,modal:l,openModal:()=>{o.value=!0},onOpenChange:s=>{o.value=s},onOpenToggle:()=>{o.value=!o.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:r}),(s,d)=>P(s.$slots,"default",{open:m(o)})}}),wt=D({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=Ho();return(n,o)=>m(t)||n.forceMount?(B(),T(yn,{key:0,to:n.to,disabled:n.disabled},[P(n.$slots,"default")],8,["to","disabled"])):Nt("",!0)}}),or=D({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(B(),T(m(wt),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),mi="dismissableLayer.pointerDownOutside",gi="dismissableLayer.focusOutside";function un(e,t){const n=t.closest("[data-dismissable-layer]"),o=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),i=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&o===n||i.indexOf(o){});return K(l=>{if(!pe)return;const s=async c=>{const a=c.target;if(t!=null&&t.value){if(un(t.value,a)){i.value=!1;return}if(c.target&&!i.value){let u=function(){en(mi,e,p)};const p={originalEvent:c};c.pointerType==="touch"?(o.removeEventListener("click",r.value),r.value=u,o.addEventListener("click",r.value,{once:!0})):u()}else o.removeEventListener("click",r.value);i.value=!1}},d=window.setTimeout(()=>{o.addEventListener("pointerdown",s)},0);l(()=>{window.clearTimeout(d),o.removeEventListener("pointerdown",s),o.removeEventListener("click",r.value)})}),{onPointerDownCapture:()=>i.value=!0}}function yi(e,t){var n;const o=((n=t==null?void 0:t.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=E(!1);return K(r=>{if(!pe)return;const l=async s=>{t!=null&&t.value&&(await he(),!(!t.value||un(t.value,s.target))&&s.target&&!i.value&&en(gi,e,{originalEvent:s}))};o.addEventListener("focusin",l),r(()=>o.removeEventListener("focusin",l))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const Q=zt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cn=D({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,o=t,{forwardRef:i,currentElement:r}=$(),l=O(()=>{var v;return((v=r.value)==null?void 0:v.ownerDocument)??globalThis.document}),s=O(()=>Q.layersRoot),d=O(()=>r.value?Array.from(s.value).indexOf(r.value):-1),c=O(()=>Q.layersWithOutsidePointerEventsDisabled.size>0),a=O(()=>{const v=Array.from(s.value),[h]=[...Q.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(h);return d.value>=g}),u=hi(async v=>{const h=[...Q.branches].some(g=>g==null?void 0:g.contains(v.target));!a.value||h||(o("pointerDownOutside",v),o("interactOutside",v),await he(),v.defaultPrevented||o("dismiss"))},r),p=yi(v=>{[...Q.branches].some(h=>h==null?void 0:h.contains(v.target))||(o("focusOutside",v),o("interactOutside",v),v.defaultPrevented||o("dismiss"))},r);Wo("Escape",v=>{d.value===s.value.size-1&&(o("escapeKeyDown",v),v.defaultPrevented||o("dismiss"))});let f;return K(v=>{r.value&&(n.disableOutsidePointerEvents&&(Q.layersWithOutsidePointerEventsDisabled.size===0&&(f=l.value.body.style.pointerEvents,l.value.body.style.pointerEvents="none"),Q.layersWithOutsidePointerEventsDisabled.add(r.value)),s.value.add(r.value),v(()=>{n.disableOutsidePointerEvents&&Q.layersWithOutsidePointerEventsDisabled.size===1&&(l.value.body.style.pointerEvents=f)}))}),K(v=>{v(()=>{r.value&&(s.value.delete(r.value),Q.layersWithOutsidePointerEventsDisabled.delete(r.value))})}),(v,h)=>(B(),T(m(X),{ref:m(i),"as-child":v.asChild,as:v.as,"data-dismissable-layer":"",style:st({pointerEvents:c.value?a.value?"auto":"none":void 0}),onFocusCapture:m(p).onFocusCapture,onBlurCapture:m(p).onBlurCapture,onPointerdownCapture:m(u).onPointerDownCapture},{default:A(()=>[P(v.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Ge="focusScope.autoFocusOnMount",Je="focusScope.autoFocusOnUnmount",Rt={bubbles:!1,cancelable:!0};function wi(e,{select:t=!1}={}){const n=se();for(const o of e)if(le(o,{select:t}),se()!==n)return!0}function bi(e){const t=dn(e),n=$t(t,e),o=$t(t.reverse(),e);return[n,o]}function dn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const i=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||i?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $t(e,t){for(const n of e)if(!xi(n,{upTo:t}))return n}function xi(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Oi(e){return e instanceof HTMLInputElement&&"select"in e}function le(e,{select:t=!1}={}){if(e&&e.focus){const n=se();e.focus({preventScroll:!0}),e!==n&&Oi(e)&&t&&e.select()}}const Ci=Bo(()=>E([]));function Ai(){const e=Ci();return{add(t){const n=e.value[0];t!==n&&(n==null||n.pause()),e.value=St(e.value,t),e.value.unshift(t)},remove(t){var n;e.value=St(e.value,t),(n=e.value[0])==null||n.resume()}}}function St(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Ei(e){return e.filter(t=>t.tagName!=="A")}const Di=D({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,o=t,{currentRef:i,currentElement:r}=$(),l=E(null),s=Ai(),d=zt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});K(a=>{if(!pe)return;const u=r.value;if(!n.trapped)return;function p(g){if(d.paused||!u)return;const y=g.target;u.contains(y)?l.value=y:le(l.value,{select:!0})}function f(g){if(d.paused||!u)return;const y=g.relatedTarget;y!==null&&(u.contains(y)||le(l.value,{select:!0}))}function v(g){u.contains(l.value)||le(u)}document.addEventListener("focusin",p),document.addEventListener("focusout",f);const h=new MutationObserver(v);u&&h.observe(u,{childList:!0,subtree:!0}),a(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",f),h.disconnect()})}),K(async a=>{const u=r.value;if(await he(),!u)return;s.add(d);const p=se();if(!u.contains(p)){const f=new CustomEvent(Ge,Rt);u.addEventListener(Ge,v=>o("mountAutoFocus",v)),u.dispatchEvent(f),f.defaultPrevented||(wi(Ei(dn(u)),{select:!0}),se()===p&&le(u))}a(()=>{u.removeEventListener(Ge,h=>o("mountAutoFocus",h));const f=new CustomEvent(Je,Rt),v=h=>{o("unmountAutoFocus",h)};u.addEventListener(Je,v),u.dispatchEvent(f),setTimeout(()=>{f.defaultPrevented||le(p??document.body,{select:!0}),u.removeEventListener(Je,v),s.remove(d)},0)})});function c(a){if(!n.loop&&!n.trapped||d.paused)return;const u=a.key==="Tab"&&!a.altKey&&!a.ctrlKey&&!a.metaKey,p=se();if(u&&p){const f=a.currentTarget,[v,h]=bi(f);v&&h?!a.shiftKey&&p===h?(a.preventDefault(),n.loop&&le(v,{select:!0})):a.shiftKey&&p===v&&(a.preventDefault(),n.loop&&le(h,{select:!0})):p===f&&a.preventDefault()}}return(a,u)=>(B(),T(m(X),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":a.asChild,as:a.as,onKeydown:c},{default:A(()=>[P(a.$slots,"default")]),_:3},8,["as-child","as"]))}});function Pi(e){return e?"open":"closed"}const fn=D({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=ne(),{forwardRef:r,currentElement:l}=$();return i.titleId||(i.titleId=it(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=it(void 0,"radix-vue-dialog-description")),De(()=>{i.contentElement=l,se()!==document.body&&(i.triggerElement.value=se())}),(s,d)=>(B(),T(m(Di),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:d[5]||(d[5]=c=>o("openAutoFocus",c)),onUnmountAutoFocus:d[6]||(d[6]=c=>o("closeAutoFocus",c))},{default:A(()=>[me(m(cn),F({id:m(i).contentId,ref:m(r),as:s.as,"as-child":s.asChild,"disable-outside-pointer-events":s.disableOutsidePointerEvents,role:"dialog","aria-describedby":m(i).descriptionId,"aria-labelledby":m(i).titleId,"data-state":m(Pi)(m(i).open.value)},s.$attrs,{onDismiss:d[0]||(d[0]=c=>m(i).onOpenChange(!1)),onEscapeKeyDown:d[1]||(d[1]=c=>o("escapeKeyDown",c)),onFocusOutside:d[2]||(d[2]=c=>o("focusOutside",c)),onInteractOutside:d[3]||(d[3]=c=>o("interactOutside",c)),onPointerDownOutside:d[4]||(d[4]=c=>o("pointerDownOutside",c))}),{default:A(()=>[P(s.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),_i=D({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=ne(),r=Se(o),{forwardRef:l,currentElement:s}=$();return si(s),(d,c)=>(B(),T(fn,F({...n,...m(r)},{ref:m(l),"trap-focus":m(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=a=>{var u;a.defaultPrevented||(a.preventDefault(),(u=m(i).triggerElement.value)==null||u.focus())}),onPointerDownOutside:c[1]||(c[1]=a=>{const u=a.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0;(u.button===2||p)&&a.preventDefault()}),onFocusOutside:c[2]||(c[2]=a=>{a.preventDefault()})}),{default:A(()=>[P(d.$slots,"default")]),_:3},16,["trap-focus"]))}}),Bi=D({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=Se(t);$();const i=ne(),r=E(!1),l=E(!1);return(s,d)=>(B(),T(fn,F({...n,...m(o)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:d[0]||(d[0]=c=>{var a;c.defaultPrevented||(r.value||(a=m(i).triggerElement.value)==null||a.focus(),c.preventDefault()),r.value=!1,l.value=!1}),onInteractOutside:d[1]||(d[1]=c=>{var a;c.defaultPrevented||(r.value=!0,c.detail.originalEvent.type==="pointerdown"&&(l.value=!0));const u=c.target;(a=m(i).triggerElement.value)!=null&&a.contains(u)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&l.value&&c.preventDefault()})}),{default:A(()=>[P(s.$slots,"default")]),_:3},16))}}),Ti=D({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=t,i=ne(),r=Se(o),{forwardRef:l}=$();return(s,d)=>(B(),T(m(yt),{present:s.forceMount||m(i).open.value},{default:A(()=>[m(i).modal.value?(B(),T(_i,F({key:0,ref:m(l)},{...n,...m(r),...s.$attrs}),{default:A(()=>[P(s.$slots,"default")]),_:3},16)):(B(),T(Bi,F({key:1,ref:m(l)},{...n,...m(r),...s.$attrs}),{default:A(()=>[P(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Ri=D({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(e){const t=ne();return Xo(!0),$(),(n,o)=>(B(),T(m(X),{as:n.as,"as-child":n.asChild,"data-state":m(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:A(()=>[P(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),$i=D({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=ne(),{forwardRef:n}=$();return(o,i)=>{var r;return(r=m(t))!=null&&r.modal.value?(B(),T(m(yt),{key:0,present:o.forceMount||m(t).open.value},{default:A(()=>[me(Ri,F(o.$attrs,{ref:m(n),as:o.as,"as-child":o.asChild}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Nt("",!0)}}}),pn=D({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;$();const n=ne();return(o,i)=>(B(),T(m(X),F(t,{type:o.as==="button"?"button":void 0,onClick:i[0]||(i[0]=r=>m(n).onOpenChange(!1))}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["type"]))}}),Si=D({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e,n=ne();return $(),(o,i)=>(B(),T(m(X),F(t,{id:m(n).titleId}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["id"]))}}),Mi=D({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e;$();const n=ne();return(o,i)=>(B(),T(m(X),F(t,{id:m(n).descriptionId}),{default:A(()=>[P(o.$slots,"default")]),_:3},16,["id"]))}}),ir=D({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=sn(e,t);return $(),(o,i)=>(B(),T(m(vi),F(m(n),{modal:!0}),{default:A(()=>[P(o.$slots,"default")]),_:3},16))}}),rr=D({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(B(),T(m(wt),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),[Li,Fi]=be("AlertDialogContent"),lr=D({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,o=Se(t);$();const i=E();return Fi({onCancelElementChange:r=>{i.value=r}}),(r,l)=>(B(),T(m(Ti),F({...n,...m(o)},{role:"alertdialog",onPointerDownOutside:l[0]||(l[0]=Ze(()=>{},["prevent"])),onInteractOutside:l[1]||(l[1]=Ze(()=>{},["prevent"])),onOpenAutoFocus:l[2]||(l[2]=()=>{he(()=>{var s;(s=i.value)==null||s.focus({preventScroll:!0})})})}),{default:A(()=>[P(r.$slots,"default")]),_:3},16))}}),sr=D({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m($i),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),ar=D({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Li(),{forwardRef:o,currentElement:i}=$();return De(()=>{n.onCancelElementChange(i.value)}),(r,l)=>(B(),T(m(pn),F(t,{ref:m(o)}),{default:A(()=>[P(r.$slots,"default")]),_:3},16))}}),ur=D({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(Si),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),cr=D({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(Mi),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),dr=D({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(pn),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),[vn,Ni]=be("PopperRoot"),ki=D({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=E();return Ni({anchor:t,onAnchorChange:n=>t.value=n}),(n,o)=>P(n.$slots,"default")}}),Ii=D({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(e){const t=e,{forwardRef:n,currentElement:o}=$(),i=vn();return K(()=>{i.onAnchorChange(t.element??o.value)}),(r,l)=>(B(),T(m(X),{ref:m(n),as:r.as,"as-child":r.asChild},{default:A(()=>[P(r.$slots,"default")]),_:3},8,["as","as-child"]))}});function Wi(e){return e!==null}function Hi(e){return{name:"transformOrigin",options:e,fn(t){var n,o,i;const{placement:r,rects:l,middlewareData:s}=t,d=((n=s.arrow)==null?void 0:n.centerOffset)!==0,c=d?0:e.arrowWidth,a=d?0:e.arrowHeight,[u,p]=rt(r),f={start:"0%",center:"50%",end:"100%"}[p],v=(((o=s.arrow)==null?void 0:o.x)??0)+c/2,h=(((i=s.arrow)==null?void 0:i.y)??0)+a/2;let g="",y="";return u==="bottom"?(g=d?f:`${v}px`,y=`${-a}px`):u==="top"?(g=d?f:`${v}px`,y=`${l.floating.height+a}px`):u==="right"?(g=`${-a}px`,y=d?f:`${h}px`):u==="left"&&(g=`${l.floating.width+a}px`,y=d?f:`${h}px`),{data:{x:g,y}}}}}function rt(e){const[t,n="center"]=e.split("-");return[t,n]}const Vi={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[ji,zi]=be("PopperContent"),Ki=D({inheritAttrs:!1,__name:"PopperContent",props:Tn({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Vi}),emits:["placed"],setup(e,{emit:t}){const n=e,o=t,i=vn(),{forwardRef:r,currentElement:l}=$(),s=E(),d=E(),{width:c,height:a}=ui(d),u=O(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),p=O(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),f=O(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),v=O(()=>({padding:p.value,boundary:f.value.filter(Wi),altBoundary:f.value.length>0})),h=Po(()=>[ho({mainAxis:n.sideOffset+a.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&_t({...v.value}),n.avoidCollisions&&yo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?Oo():void 0,...v.value}),!n.prioritizePosition&&n.avoidCollisions&&_t({...v.value}),wo({...v.value,apply:({elements:R,rects:z,availableWidth:k,availableHeight:W})=>{const{width:L,height:oe}=z.reference,I=R.floating.style;I.setProperty("--radix-popper-available-width",`${k}px`),I.setProperty("--radix-popper-available-height",`${W}px`),I.setProperty("--radix-popper-anchor-width",`${L}px`),I.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),d.value&&Eo({element:d.value,padding:n.arrowPadding}),Hi({arrowWidth:c.value,arrowHeight:a.value}),n.hideWhenDetached&&bo({strategy:"referenceHidden",...v.value})]),{floatingStyles:g,placement:y,isPositioned:b,middlewareData:w}=Do(i.anchor,s,{strategy:"fixed",placement:u,whileElementsMounted:(...R)=>go(...R,{animationFrame:n.updatePositionStrategy==="always"}),middleware:h}),C=O(()=>rt(y.value)[0]),x=O(()=>rt(y.value)[1]);Rn(()=>{b.value&&o("placed")});const S=O(()=>{var R;return((R=w.value.arrow)==null?void 0:R.centerOffset)!==0}),_=E("");K(()=>{l.value&&(_.value=window.getComputedStyle(l.value).zIndex)});const M=O(()=>{var R;return((R=w.value.arrow)==null?void 0:R.x)??0}),N=O(()=>{var R;return((R=w.value.arrow)==null?void 0:R.y)??0});return zi({placedSide:C,onArrowChange:R=>d.value=R,arrowX:M,arrowY:N,shouldHideArrow:S}),(R,z)=>{var k,W,L;return B(),Vt("div",{ref_key:"floatingRef",ref:s,"data-radix-popper-content-wrapper":"",style:st({...m(g),transform:m(b)?m(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_.value,"--radix-popper-transform-origin":[(k=m(w).transformOrigin)==null?void 0:k.x,(W=m(w).transformOrigin)==null?void 0:W.y].join(" "),...((L=m(w).hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[me(m(X),F({ref:m(r)},R.$attrs,{"as-child":n.asChild,as:R.as,"data-side":C.value,"data-align":x.value,style:{animation:m(b)?void 0:"none"}}),{default:A(()=>[P(R.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Ui=$n("polygon",{points:"0,0 30,0 15,10"},null,-1),Yi=D({__name:"Arrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(X),F(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 30 10",preserveAspectRatio:n.asChild?void 0:"none"}),{default:A(()=>[P(n.$slots,"default",{},()=>[Ui])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),Xi={top:"bottom",right:"left",bottom:"top",left:"right"},qi=D({inheritAttrs:!1,__name:"PopperArrow",props:{width:{},height:{},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const{forwardRef:t}=$(),n=ji(),o=O(()=>Xi[n.placedSide.value]);return(i,r)=>{var l,s,d,c;return B(),Vt("span",{ref:a=>{m(n).onArrowChange(a)},style:st({position:"absolute",left:(l=m(n).arrowX)!=null&&l.value?`${(s=m(n).arrowX)==null?void 0:s.value}px`:void 0,top:(d=m(n).arrowY)!=null&&d.value?`${(c=m(n).arrowY)==null?void 0:c.value}px`:void 0,[o.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[m(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[m(n).placedSide.value],visibility:m(n).shouldHideArrow.value?"hidden":void 0})},[me(Yi,F(i.$attrs,{ref:m(t),style:{display:"block"},as:i.as,"as-child":i.asChild,width:i.width,height:i.height}),{default:A(()=>[P(i.$slots,"default")]),_:3},16,["as","as-child","width","height"])],4)}}}),Gi=D({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(e){return $(),(t,n)=>(B(),T(m(X),{as:t.as,"as-child":t.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:A(()=>[P(t.$slots,"default")]),_:3},8,["as","as-child"]))}});function Ji(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Ji();const mn="tooltip.open",[bt,Zi]=be("TooltipProvider"),fr=D({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(e){const t=e,{delayDuration:n,skipDelayDuration:o,disableHoverableContent:i,disableClosingTrigger:r,ignoreNonKeyboardFocus:l,disabled:s}=lt(t);$();const d=E(!0),c=E(!1),{start:a,stop:u}=tn(()=>{d.value=!0},o,{immediate:!1});return Zi({isOpenDelayed:d,delayDuration:n,onOpen(){u(),d.value=!1},onClose(){a()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:r,disabled:s,ignoreNonKeyboardFocus:l}),(p,f)=>P(p.$slots,"default")}}),[Ue,Qi]=be("TooltipRoot"),pr=D({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,o=t;$();const i=bt(),r=O(()=>n.disableHoverableContent??i.disableHoverableContent.value),l=O(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),s=O(()=>n.disabled??i.disabled.value),d=O(()=>n.delayDuration??i.delayDuration.value),c=O(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),a=nn(n,"open",o,{defaultValue:n.defaultOpen,passive:n.open===void 0});j(a,w=>{i.onClose&&(w?(i.onOpen(),document.dispatchEvent(new CustomEvent(mn))):i.onClose())});const u=E(!1),p=E(),f=O(()=>a.value?u.value?"delayed-open":"instant-open":"closed"),{start:v,stop:h}=tn(()=>{u.value=!0,a.value=!0},d,{immediate:!1});function g(){h(),u.value=!1,a.value=!0}function y(){h(),a.value=!1}function b(){v()}return Qi({contentId:"",open:a,stateAttribute:f,trigger:p,onTriggerChange(w){p.value=w},onTriggerEnter(){i.isOpenDelayed.value?b():g()},onTriggerLeave(){r.value?y():h()},onOpen:g,onClose:y,disableHoverableContent:r,disableClosingTrigger:l,disabled:s,ignoreNonKeyboardFocus:c}),(w,C)=>(B(),T(m(ki),null,{default:A(()=>[P(w.$slots,"default",{open:m(a)})]),_:3}))}}),vr=D({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e,n=Ue(),o=bt();n.contentId||(n.contentId=it(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:r}=$(),l=E(!1),s=E(!1),d=O(()=>n.disabled.value?{}:{click:h,focus:f,pointermove:u,pointerleave:p,pointerdown:a,blur:v});De(()=>{n.onTriggerChange(r.value)});function c(){setTimeout(()=>{l.value=!1},1)}function a(){l.value=!0,document.addEventListener("pointerup",c,{once:!0})}function u(g){g.pointerType!=="touch"&&!s.value&&!o.isPointerInTransitRef.value&&(n.onTriggerEnter(),s.value=!0)}function p(){n.onTriggerLeave(),s.value=!1}function f(g){var y,b;l.value||n.ignoreNonKeyboardFocus.value&&!((b=(y=g.target).matches)!=null&&b.call(y,":focus-visible"))||n.onOpen()}function v(){n.onClose()}function h(){n.disableClosingTrigger.value||n.onClose()}return(g,y)=>(B(),T(m(Ii),{"as-child":""},{default:A(()=>[me(m(X),F({ref:m(i),"aria-describedby":m(n).open.value?m(n).contentId:void 0,"data-state":m(n).stateAttribute.value,as:g.as,"as-child":t.asChild,"data-grace-area-trigger":""},xn(d.value)),{default:A(()=>[P(g.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),gn=D({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ue(),{forwardRef:r}=$(),l=Dn(),s=O(()=>{var a;return(a=l.default)==null?void 0:a.call(l)}),d=O(()=>{var a;if(n.ariaLabel)return n.ariaLabel;let u="";function p(f){typeof f.children=="string"&&f.type!==Wt?u+=f.children:Array.isArray(f.children)&&f.children.forEach(v=>p(v))}return(a=s.value)==null||a.forEach(f=>p(f)),u}),c=O(()=>{const{ariaLabel:a,...u}=n;return u});return De(()=>{Ve(window,"scroll",a=>{const u=a.target;u!=null&&u.contains(i.trigger.value)&&i.onClose()}),Ve(window,mn,i.onClose)}),(a,u)=>(B(),T(m(cn),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:u[0]||(u[0]=p=>o("escapeKeyDown",p)),onPointerDownOutside:u[1]||(u[1]=p=>{var f;m(i).disableClosingTrigger.value&&(f=m(i).trigger.value)!=null&&f.contains(p.target)&&p.preventDefault(),o("pointerDownOutside",p)}),onFocusOutside:u[2]||(u[2]=Ze(()=>{},["prevent"])),onDismiss:u[3]||(u[3]=p=>m(i).onClose())},{default:A(()=>[me(m(Ki),F({ref:m(r),"data-state":m(i).stateAttribute.value},{...a.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:A(()=>[P(a.$slots,"default"),me(m(Gi),{id:m(i).contentId,role:"tooltip"},{default:A(()=>[Pn(_n(d.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),er=D({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(e){const t=ln(e),{forwardRef:n,currentElement:o}=$(),{trigger:i,onClose:r}=Ue(),l=bt(),{isPointerInTransit:s,onPointerExit:d}=Go(i,o);return l.isPointerInTransitRef=s,d(()=>{r()}),(c,a)=>(B(),T(gn,F({ref:m(n)},m(t)),{default:A(()=>[P(c.$slots,"default")]),_:3},16))}}),mr=D({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const n=e,o=t,i=Ue(),r=sn(n,o),{forwardRef:l}=$();return(s,d)=>(B(),T(m(yt),{present:s.forceMount||m(i).open.value},{default:A(()=>[(B(),T(On(m(i).disableHoverableContent.value?gn:er),F({ref:m(l)},m(r)),{default:A(()=>[P(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),gr=D({__name:"TooltipArrow",props:{width:{default:10},height:{default:5},asChild:{type:Boolean},as:{default:"svg"}},setup(e){const t=e;return $(),(n,o)=>(B(),T(m(qi),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}}),hr=D({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(e){const t=e;return(n,o)=>(B(),T(m(wt),de(fe(t)),{default:A(()=>[P(n.$slots,"default")]),_:3},16))}});export{$i as $,rr as A,Si as B,cr as F,gr as G,fr as H,or as I,ar as M,dr as N,lr as O,Ti as P,ir as T,mr as U,ur as V,pr as W,vr as j,sr as k,vi as n,hr as q}; diff --git a/assets/index-DveSPBFG.js b/assets/index-fFw9sI_s.js similarity index 93% rename from assets/index-DveSPBFG.js rename to assets/index-fFw9sI_s.js index 855fccf1afa36f30d22969524639a0f6197e570e..cdcea4c44fc176ecdd035ed1c3703afb57b00ed9 100644 --- a/assets/index-DveSPBFG.js +++ b/assets/index-fFw9sI_s.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as I,p as E,m as x,o as n,E as A,a as s,c as p,i as w,B as D,t as C,F as q,bq as P,h as R,r,k as L,D as j,l as F,bz as N,G as _,bA as V,bB as G,u as y,q as O,by as H}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";/* empty css */import{_ as J}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js";import{b as B}from"./route-block-B_A1xBdJ.js";const K={"z-1":"","flex-1":""},M={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},Q={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},U=I({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(o){return(m,g)=>{const f=E("RouterLink");return n(),x(f,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-900",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:o.to},{default:A(()=>[s("div",K,[s("div",M,C(o.title),1),s("div",Q,[s("span",null,C(o.description),1)])]),typeof o.icon=="string"?(n(),p("div",{key:0,class:q(["menu-icon-item-icon",[o.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):w("",!0),o.iconTemplate?D(m.$slots,"icon",{key:1},void 0,!0):w("",!0)]),_:3},8,["to"])}}}),W=P(U,[["__scopeId","data-v-656e0116"]]),X={flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-12rem)]","bottom-0":"","right--10":"","z--1":"",initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},tt={text:"60","i-solar:settings-bold-duotone":""},et=I({__name:"index",setup(o){const m=R(),g=r(!1),f=r(),c=r(),{t}=L(),b=r(""),h=r(""),k=r(!1),d=j();function S(){var a;(a=c.value)==null||a.call(c)}async function $(a,l){const e=a.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const u=e.getBoundingClientRect(),v=`${u.left}px, ${u.top}px`;b.value=l.icon,h.value=v,k.value=!0,await H(),g.value=!0}const z=m.beforeEach(async(a,l,i)=>{if(!d.usePageSpecificTransitions||d.disableTransitions){i();return}await new Promise(e=>{c.value=e}),z(),i()}),T=F(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-solar:layers-bold-duotone",to:"/settings/modules"},{title:t("settings.pages.scene.title"),description:t("settings.pages.scene.description"),icon:"i-solar:armchair-2-bold-duotone",to:"/settings/scene"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-solar:people-nearby-bold-duotone",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-solar:leaf-bold-duotone",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-solar:box-minimalistic-bold-duotone",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-solar:filters-bold-duotone",to:"/settings/appearance"}]);return(a,l)=>{const i=N("motion");return n(),p("div",X,[l[0]||(l[0]=s("div",null,null,-1)),s("div",Y,[(n(!0),p(V,null,G(T.value,(e,u)=>_((n(),x(y(W),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:O({transitionDelay:`${u*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:v=>$(v,e)},null,8,["style","title","description","icon","to","onClick"])),[[i]])),128))]),k.value&&!y(d).disableTransitions&&y(d).usePageSpecificTransitions?(n(),x(J,{key:0,ref_key:"iconAnimation",ref:f,icon:b.value,"icon-size":6*1.2,position:h.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:g.value,onAnimationEndedOnce:S},null,8,["icon","position","started"])):_((n(),p("div",Z,[_(s("div",tt,null,512),[[i]])])),[[i]])])}}});typeof B=="function"&&B(et);export{et as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as I,p as E,m as x,o as n,E as A,a as s,c as p,i as w,B as D,t as C,F as q,bq as P,h as R,r,k as L,D as j,l as F,bz as N,G as _,bA as V,bB as G,u as y,q as O,by as H}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";/* empty css */import{_ as J}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js";import{b as B}from"./route-block-B_A1xBdJ.js";const K={"z-1":"","flex-1":""},M={"text-lg":"","font-bold":"",class:"menu-icon-item-title",transition:"all ease-in-out duration-400"},Q={text:"sm neutral-500 dark:neutral-400",class:"menu-icon-item-description",transition:"all ease-in-out duration-400"},U=I({__name:"IconItem",props:{title:null,description:null,icon:null,iconTemplate:{type:Boolean},to:null},setup(o){return(m,g)=>{const f=E("RouterLink");return n(),x(f,{box:"border",flex:"~ row",bg:"neutral-50 dark:neutral-900",border:"neutral-100 dark:neutral-800/25 hover:primary-500/30 dark:hover:primary-400/30 solid 2","drop-shadow":"none hover:[0px_4px_4px_rgba(220,220,220,0.4)] active:[0px_0px_0px_rgba(220,220,220,0.25)] dark:hover:none",class:"menu-icon-item",transition:"all ease-in-out duration-400",relative:"","w-full":"","items-center":"","overflow-hidden":"","rounded-lg":"","p-5":"","text-left":"",cursor:"pointer",to:o.to},{default:A(()=>[s("div",K,[s("div",M,C(o.title),1),s("div",Q,[s("span",null,C(o.description),1)])]),typeof o.icon=="string"?(n(),p("div",{key:0,class:q(["menu-icon-item-icon",[o.icon]]),transition:"all ease-in-out duration-400",absolute:"","right-0":"","size-24":"","translate-y-4":"",text:"neutral-400/50 dark:neutral-600/50"},null,2)):w("",!0),o.iconTemplate?D(m.$slots,"icon",{key:1},void 0,!0):w("",!0)]),_:3},8,["to"])}}}),W=P(U,[["__scopeId","data-v-656e0116"]]),X={flex:"~ col gap-4"},Y={flex:"~ col gap-4"},Z={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-12rem)]","bottom-0":"","right--10":"","z--1":"",initial:{scale:.9,opacity:0,rotate:180},enter:{scale:1,opacity:1,rotate:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},tt={text:"60","i-solar:settings-bold-duotone":""},et=I({__name:"index",setup(o){const m=R(),g=r(!1),f=r(),c=r(),{t}=L(),b=r(""),h=r(""),k=r(!1),d=j();function S(){var a;(a=c.value)==null||a.call(c)}async function $(a,l){const e=a.currentTarget.querySelector(".menu-icon-item-icon");if(!e)return;const u=e.getBoundingClientRect(),v=`${u.left}px, ${u.top}px`;b.value=l.icon,h.value=v,k.value=!0,await H(),g.value=!0}const z=m.beforeEach(async(a,l,i)=>{if(!d.usePageSpecificTransitions||d.disableTransitions){i();return}await new Promise(e=>{c.value=e}),z(),i()}),T=F(()=>[{title:t("settings.pages.card.title"),description:t("settings.pages.card.description"),icon:"i-solar:emoji-funny-square-bold-duotone",to:"/settings/airi-card"},{title:t("settings.pages.modules.title"),description:t("settings.pages.modules.description"),icon:"i-solar:layers-bold-duotone",to:"/settings/modules"},{title:t("settings.pages.scene.title"),description:t("settings.pages.scene.description"),icon:"i-solar:armchair-2-bold-duotone",to:"/settings/scene"},{title:t("settings.pages.models.title"),description:t("settings.pages.models.description"),icon:"i-solar:people-nearby-bold-duotone",to:"/settings/models"},{title:t("settings.pages.memory.title"),description:t("settings.pages.memory.description"),icon:"i-solar:leaf-bold-duotone",to:"/settings/memory"},{title:t("settings.pages.providers.title"),description:t("settings.pages.providers.description"),icon:"i-solar:box-minimalistic-bold-duotone",to:"/settings/providers"},{title:t("settings.pages.themes.title"),description:t("settings.pages.themes.description"),icon:"i-solar:filters-bold-duotone",to:"/settings/appearance"}]);return(a,l)=>{const i=N("motion");return n(),p("div",X,[l[0]||(l[0]=s("div",null,null,-1)),s("div",Y,[(n(!0),p(V,null,G(T.value,(e,u)=>_((n(),x(y(W),{key:e.to,initial:{opacity:0,y:10},enter:{opacity:1,y:0},duration:250,style:O({transitionDelay:`${u*50}ms`}),title:e.title,description:e.description,icon:e.icon,to:e.to,onClick:v=>$(v,e)},null,8,["style","title","description","icon","to","onClick"])),[[i]])),128))]),k.value&&!y(d).disableTransitions&&y(d).usePageSpecificTransitions?(n(),x(J,{key:0,ref_key:"iconAnimation",ref:f,icon:b.value,"icon-size":6*1.2,position:h.value,duration:1e3,"text-color":"text-neutral-400/50 dark:text-neutral-600/20",started:g.value,onAnimationEndedOnce:S},null,8,["icon","position","started"])):_((n(),p("div",Z,[_(s("div",tt,null,512),[[i]])])),[[i]])])}}});typeof B=="function"&&B(et);export{et as default}; diff --git a/assets/index-BXn61H3H.js b/assets/index-fMkwekS6.js similarity index 99% rename from assets/index-BXn61H3H.js rename to assets/index-fMkwekS6.js index 060747271adce92e53a7f7d351a7f7b35fccf230..cbca78696578a3f1b2d55a8cc77e46e46c30289c 100644 --- a/assets/index-BXn61H3H.js +++ b/assets/index-fMkwekS6.js @@ -1,4 +1,4 @@ -import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{v as Gn,r as W,l as je,s as Ke,x as bs,d as Fe,y as ws,z as ks,A as Zr,w as Be,f as pn,c as re,o as Z,B as gn,C as Ts,k as Zt,D as Wt,m as Xt,E as Ue,b as ke,a as O,F as st,G as Et,H as Qr,i as it,t as he,u as V,M as yt,T as _t,I as Jr,J as Yn,K as Yo,Z as On,g as Ot,L as _s,V as ae,S as Mi,Q as Fn,O as $t,N as Pe,P as Mt,U as Es,W as Ko,X as hn,Y as ei,_ as ze,$ as qo,a0 as Wo,a1 as ti,a2 as yn,a3 as Ms,a4 as ni,a5 as As,a6 as Xo,a7 as xt,a8 as ri,a9 as At,aa as Ss,ab as Zo,ac as Dt,ad as Qo,ae as Is,af as Rs,ag as Cs,ah as Ns,ai as Jo,aj as Kn,ak as Ls,al as Ps,am as Ds,an as Pt,ao as Os,ap as Fs,aq as Bs,ar as zs,as as er,at as Bn,au as Cr,av as Nt,aw as ea,ax as Nr,ay as Vt,az as Ai,aA as Lt,aB as Ht,aC as tr,aD as Us,aE as js,aF as Vs,aG as Hs,aH as ta,aI as na,aJ as zn,aK as ra,aL as ii,aM as Un,aN as ia,aO as $s,q as Lr,aP as Gs,aQ as Pr,aR as oa,aS as Ys,aT as cn,aU as aa,aV as ft,aW as vt,aX as mn,aY as Ks,aZ as qs,a_ as Ws,a$ as Xs,b0 as Zs,b1 as oi,b2 as Qs,b3 as Js,b4 as el,b5 as nr,b6 as tl,b7 as sa,b8 as nl,b9 as rl,ba as il,bb as ol,bc as al,bd as rr,be as sl,bf as ll,bg as ul,bh as Si,bi as Ii,bj as Ri,bk as Ci,bl as cl,bm as fl,bn as dl,bo as pl,bp as hl,bq as qn,br as ml,bs as la,bt as gl,bu as yl,bv as xl,bw as vl,bx as ua,by as jn,bz as ca,bA as ai,bB as si,bC as bl,bD as ir,bE as wl,bF as kl}from"./index-5LjD1Eoi.js";import{V as Tl,a as _l,c as El,r as Ml,b as Dr,d as Al}from"./three-vrm-animation.module-C_NwwsBw.js";import{E as Ni,a as Sl,b as Il,c as Rl,d as Cl}from"./emotions-CAex_2dA.js";/* empty css */import{getImportUrlBundles as Nl}from"./import-url-browser-CPN8ipMD.js";import{s as Gt,c as Li,u as Ll,g as Pl}from"./speech-BYL-UWPg.js";import{u as or}from"./queue-D8d866Tb.js";import{u as Dl,a as Ol,b as Fl,l as Bl}from"./queues-L5OE-bsn.js";import{l as zl,u as li}from"./providers-CIeQW25J.js";import{s as Ul}from"./index-C4mUnpiM.js";import{u as jl}from"./airi-card-BWkmdsVt.js";import{_ as ui}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import{_ as Vl,a as Hl,r as on}from"./Model.vue_vue_type_script_setup_true_lang-B5b_VmSW.js";import{_ as Pi}from"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import{H as $l}from"./HeaderLink-Bp3oK7dP.js";import{d as Di}from"./index-BLNYI9W3.js";import{u as fa}from"./consciousness-D7jKnAf3.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-LHmcipjy.js";async function*Gl(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function Yl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function Kl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),a=Math.max(...r)-i;let s;return a===0?s=r.map(()=>0):s=r.map(u=>(u-i)/a),s.reduce((u,c)=>u+c,0)/e.length}function ql(t,e="linear"){switch(e){case"linear":return Yl(t);case"minmax":return Kl(t)}}const pa=Gn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:ql})),Wl=Gn("SpeakingStore",()=>{const n=W(0),r=W(!1),i=je(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function _n(t,e,n){return e+n<0||e+n>=t.length-1?"":t[e+n]}function Xl(t){let e="literal",n="";return{async consume(r){var i,o,a;for(let s=0;s"?(l+=_n(r,s,1),u="literal",s++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((a=t.onLiteral)==null?void 0:a.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}const Zl=Gn("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await Ul({...r.chat(n),messages:i,headers:a})}async function e(n,r){if(n==="")return[];try{return await zl({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:e,stream:t}}),St=Gn("chat",()=>{const{stream:t}=Zl(),{systemPrompt:e}=Ke(jl()),n=W(!1),r=W([]),i=W([]),o=W([]),a=W([]),s=W([]),l=W([]),u=W([]),c=W([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function y(h){a.value.push(h)}function x(h){s.value.push(h)}function v(h){l.value.push(h)}function k(h){u.value.push(h)}function A(h){c.value.push(h)}const E=W([{role:"system",content:e.value}]),C=W({role:"assistant",content:""});async function P(h,I){var b;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);C.value={role:"assistant",content:""},E.value.push({role:"user",content:h}),E.value.push(C.value);const g=E.value.slice(0,E.value.length-1).map(D=>bs(D));for(const D of i.value)await D(h);for(const D of o.value)await D(h);const m=((b=I.providerConfig)==null?void 0:b.headers)||{},T=await t(I.model,I.chatProvider,g,{headers:m});for(const D of a.value)await D(h);let S="";const B=Xl({onLiteral:async D=>{for(const F of s.value)await F(D);C.value.content+=D},onSpecial:async D=>{for(const F of l.value)await F(D)}});for await(const D of Gl(T.textStream,async F=>F))S+=D,await B.consume(D);await B.end();for(const D of u.value)await D();for(const D of c.value)await D(S);console.debug("LLM output:",S)}catch(g){throw console.error("Error sending message:",g),g}finally{n.value=!1}}return{sending:n,messages:E,streamingMessage:C,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:y,onTokenLiteral:x,onTokenSpecial:v,onStreamEnd:k,onAssistantResponseEnd:A}}),ha=Fe({__name:"Screen",setup(t){const e=W(),n=ws(Ts),{width:r,height:i}=ks(),o=Zr(e,{immediate:!0,windowResize:!0,reset:!0}),a=je(()=>n.between("sm","md").value||n.smaller("sm").value),s=je(()=>n.between("md","lg").value),l=je(()=>n.greaterOrEqual("lg").value),u=je(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return Be([r,i,e],()=>{var p,d;const f=(d=(p=e.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||a.value||s.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),Be([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),pn(async()=>{e.value&&o.update()}),(f,p)=>(Z(),re("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[gn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),Ql={absolute:"",bottom:"3",right:"3"},Jl={flex:"~ row","cursor-pointer":""},eu=["checked","aria-checked"],tu={key:0,"min-w":"50vw",z:"(Z(),Xt(ha,{relative:""},{default:Ue(({width:a,height:s})=>[ke(Hl,{width:a,height:s},{default:Ue(({app:l})=>[ke(Vl,{app:l,"mouth-open-size":t.mouthOpenSize,width:a,height:s,paused:t.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),O("div",Ql,[O("div",Jl,[O("label",{class:st([n.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Et(O("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),checked:n.value,"aria-checked":n.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,eu),[[Qr,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),ke(V(ui),null,{default:Ue(()=>[n.value?(Z(),re("div",tu,[O("div",nu,[O("div",ru,[O("span",null,he(V(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",iu,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):it("",!0)]),_:1})])]),_:1}))}});var au=Object.defineProperty,su=(t,e,n)=>e in t?au(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lu=(t,e,n)=>su(t,e+"",n);function uu(t){return Ls()?(Ps(t),!0):!1}function ma(t){return typeof t=="function"?t():V(t)}const cu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fu=Object.prototype.toString,du=t=>fu.call(t)==="[object Object]",pu=()=>{},hu=cu?window:void 0;function mu(t){var e;const n=ma(t);return(e=n==null?void 0:n.$el)!=null?e:n}function ar(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=hu):[e,n,r,i]=t,!e)return pu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=Be(()=>[mu(e),ma(i)],([c,f])=>{if(a(),!c)return;const p=du(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(y=>s(c,d,y,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return uu(u),u}function ga(t,e,n,r){const i=class extends yn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=ni.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),lu(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Dt.generateUUID(),i}ga({color:new ze("white"),scale:new Pe(1,1),imageBounds:new Pe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` +import{d as vs}from"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{v as Gn,r as W,l as je,s as Ke,x as bs,d as Fe,y as ws,z as ks,A as Zr,w as Be,f as pn,c as re,o as Z,B as gn,C as Ts,k as Zt,D as Wt,m as Xt,E as Ue,b as ke,a as O,F as st,G as Et,H as Qr,i as it,t as he,u as V,M as yt,T as _t,I as Jr,J as Yn,K as Yo,Z as On,g as Ot,L as _s,V as ae,S as Mi,Q as Fn,O as $t,N as Pe,P as Mt,U as Es,W as Ko,X as hn,Y as ei,_ as ze,$ as qo,a0 as Wo,a1 as ti,a2 as yn,a3 as Ms,a4 as ni,a5 as As,a6 as Xo,a7 as xt,a8 as ri,a9 as At,aa as Ss,ab as Zo,ac as Dt,ad as Qo,ae as Is,af as Rs,ag as Cs,ah as Ns,ai as Jo,aj as Kn,ak as Ls,al as Ps,am as Ds,an as Pt,ao as Os,ap as Fs,aq as Bs,ar as zs,as as er,at as Bn,au as Cr,av as Nt,aw as ea,ax as Nr,ay as Vt,az as Ai,aA as Lt,aB as Ht,aC as tr,aD as Us,aE as js,aF as Vs,aG as Hs,aH as ta,aI as na,aJ as zn,aK as ra,aL as ii,aM as Un,aN as ia,aO as $s,q as Lr,aP as Gs,aQ as Pr,aR as oa,aS as Ys,aT as cn,aU as aa,aV as ft,aW as vt,aX as mn,aY as Ks,aZ as qs,a_ as Ws,a$ as Xs,b0 as Zs,b1 as oi,b2 as Qs,b3 as Js,b4 as el,b5 as nr,b6 as tl,b7 as sa,b8 as nl,b9 as rl,ba as il,bb as ol,bc as al,bd as rr,be as sl,bf as ll,bg as ul,bh as Si,bi as Ii,bj as Ri,bk as Ci,bl as cl,bm as fl,bn as dl,bo as pl,bp as hl,bq as qn,br as ml,bs as la,bt as gl,bu as yl,bv as xl,bw as vl,bx as ua,by as jn,bz as ca,bA as ai,bB as si,bC as bl,bD as ir,bE as wl,bF as kl}from"./index-DCMFRrFG.js";import{V as Tl,a as _l,c as El,r as Ml,b as Dr,d as Al}from"./three-vrm-animation.module-BGS11oHQ.js";import{E as Ni,a as Sl,b as Il,c as Rl,d as Cl}from"./emotions-CAex_2dA.js";/* empty css */import{getImportUrlBundles as Nl}from"./import-url-browser-CPN8ipMD.js";import{s as Gt,c as Li,u as Ll,g as Pl}from"./speech-Bc-BAopv.js";import{u as or}from"./queue-DDsFBepK.js";import{u as Dl,a as Ol,b as Fl,l as Bl}from"./queues-xZ787FAF.js";import{l as zl,u as li}from"./providers-DHuI5XmA.js";import{s as Ul}from"./index-C4mUnpiM.js";import{u as jl}from"./airi-card-DTE6eySa.js";import{_ as ui}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import{_ as Vl,a as Hl,r as on}from"./Model.vue_vue_type_script_setup_true_lang-Oh2pzmo4.js";import{_ as Pi}from"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import{H as $l}from"./HeaderLink-DPXtT-kx.js";import{d as Di}from"./index-DT9YP6z9.js";import{u as fa}from"./consciousness-DGPhIG2M.js";import{_ as da}from"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";import{b as Oi}from"./route-block-B_A1xBdJ.js";import"./duckdb-mvp-CaaD-olE.js";import"./index-LHmcipjy.js";async function*Gl(t,e){const n=t.getReader();try{for(;;){const{done:r,value:i}=await n.read();if(r)return;yield e(i)}}finally{n.releaseLock()}}function Yl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let i=0;i<700;i+=80)n.push(e[i]);return e.map(i=>i**1.2).map(i=>i*1.2).reduce((i,o)=>i+o,0)/e.length/100}function Kl(t){const e=new Uint8Array(t.frequencyBinCount);t.getByteFrequencyData(e);const n=[];for(let u=0;u<700;u+=80)n.push(e[u]);const r=e.map(u=>u**1.5),i=Math.min(...r),a=Math.max(...r)-i;let s;return a===0?s=r.map(()=>0):s=r.map(u=>(u-i)/a),s.reduce((u,c)=>u+c,0)/e.length}function ql(t,e="linear"){switch(e){case"linear":return Yl(t);case"minmax":return Kl(t)}}const pa=Gn("AudioContext",()=>({audioContext:new AudioContext,calculateVolume:ql})),Wl=Gn("SpeakingStore",()=>{const n=W(0),r=W(!1),i=je(()=>r.value?(30+70*n.value)/100:30);return{mouthOpenSize:n,nowSpeaking:r,nowSpeakingAvatarBorderOpacity:i}});function _n(t,e,n){return e+n<0||e+n>=t.length-1?"":t[e+n]}function Xl(t){let e="literal",n="";return{async consume(r){var i,o,a;for(let s=0;s"?(l+=_n(r,s,1),u="literal",s++):l==="<"?u="special":l===">"&&(u="literal"),e==="literal"&&u==="special"?n!==""&&(await((i=t.onLiteral)==null?void 0:i.call(t,n)),n=""):e==="special"&&u==="literal"&&n!==""&&(n+=l,await((o=t.onSpecial)==null?void 0:o.call(t,n)),n=""),e==="literal"&&u==="literal"?(await((a=t.onLiteral)==null?void 0:a.call(t,l)),n=""):e==="special"&&u==="literal"?n="":n+=l,e=u}},async end(){var r,i;n!==""&&(e==="literal"?await((r=t.onLiteral)==null?void 0:r.call(t,n)):n.endsWith("|>")&&await((i=t.onSpecial)==null?void 0:i.call(t,n)))}}}const Zl=Gn("llm",()=>{async function t(n,r,i,o){const a=o==null?void 0:o.headers;return await Ul({...r.chat(n),messages:i,headers:a})}async function e(n,r){if(n==="")return[];try{return await zl({baseURL:n.endsWith("/")?n:`${n}/`,apiKey:r})}catch(i){if(String(i).includes("Failed to construct 'URL': Invalid URL"))return[];throw i}}return{models:e,stream:t}}),St=Gn("chat",()=>{const{stream:t}=Zl(),{systemPrompt:e}=Ke(jl()),n=W(!1),r=W([]),i=W([]),o=W([]),a=W([]),s=W([]),l=W([]),u=W([]),c=W([]);function f(h){r.value.push(h)}function p(h){i.value.push(h)}function d(h){o.value.push(h)}function y(h){a.value.push(h)}function x(h){s.value.push(h)}function v(h){l.value.push(h)}function k(h){u.value.push(h)}function A(h){c.value.push(h)}const E=W([{role:"system",content:e.value}]),C=W({role:"assistant",content:""});async function P(h,I){var b;try{if(n.value=!0,!h)return;for(const D of r.value)await D(h);C.value={role:"assistant",content:""},E.value.push({role:"user",content:h}),E.value.push(C.value);const g=E.value.slice(0,E.value.length-1).map(D=>bs(D));for(const D of i.value)await D(h);for(const D of o.value)await D(h);const m=((b=I.providerConfig)==null?void 0:b.headers)||{},T=await t(I.model,I.chatProvider,g,{headers:m});for(const D of a.value)await D(h);let S="";const B=Xl({onLiteral:async D=>{for(const F of s.value)await F(D);C.value.content+=D},onSpecial:async D=>{for(const F of l.value)await F(D)}});for await(const D of Gl(T.textStream,async F=>F))S+=D,await B.consume(D);await B.end();for(const D of u.value)await D();for(const D of c.value)await D(S);console.debug("LLM output:",S)}catch(g){throw console.error("Error sending message:",g),g}finally{n.value=!1}}return{sending:n,messages:E,streamingMessage:C,send:P,onBeforeMessageComposed:f,onAfterMessageComposed:p,onBeforeSend:d,onAfterSend:y,onTokenLiteral:x,onTokenSpecial:v,onStreamEnd:k,onAssistantResponseEnd:A}}),ha=Fe({__name:"Screen",setup(t){const e=W(),n=ws(Ts),{width:r,height:i}=ks(),o=Zr(e,{immediate:!0,windowResize:!0,reset:!0}),a=je(()=>n.between("sm","md").value||n.smaller("sm").value),s=je(()=>n.between("md","lg").value),l=je(()=>n.greaterOrEqual("lg").value),u=je(()=>l.value?o.width.value:a.value||s.value?r.value-16:o.width.value),c=W(0);return Be([r,i,e],()=>{var p,d;const f=(d=(p=e.value)==null?void 0:p.parentElement)==null?void 0:d.getBoundingClientRect();l.value||a.value||s.value?c.value=(f==null?void 0:f.height)||0:c.value=600}),Be([o.width,o.height],()=>{l.value||a.value||s.value?c.value=o.height.value:c.value=600}),pn(async()=>{e.value&&o.update()}),(f,p)=>(Z(),re("div",{ref_key:"containerRef",ref:e,"h-full":"","w-full":""},[gn(f.$slots,"default",{width:u.value,height:c.value})],512))}}),Ql={absolute:"",bottom:"3",right:"3"},Jl={flex:"~ row","cursor-pointer":""},eu=["checked","aria-checked"],tu={key:0,"min-w":"50vw",z:"(Z(),Xt(ha,{relative:""},{default:Ue(({width:a,height:s})=>[ke(Hl,{width:a,height:s},{default:Ue(({app:l})=>[ke(Vl,{app:l,"mouth-open-size":t.mouthOpenSize,width:a,height:s,paused:t.paused},null,8,["app","mouth-open-size","width","height","paused"])]),_:2},1032,["width","height"]),O("div",Ql,[O("div",Jl,[O("label",{class:st([n.value?"bg-neutral-300 dark:bg-neutral-200":"bg-neutral-100 dark:bg-neutral-700"]),transition:"all ease-in-out duration-500",text:"lg neutral-500 dark:neutral-400","m-1":"","h-fit":"","w-fit":"","cursor-pointer":"","appearance-none":"","gap-1":"","rounded-lg":"","rounded-md":"","border-none":"","p-2":"","outline-none":""},[Et(O("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>n.value=l),checked:n.value,"aria-checked":n.value,name:"showLive2DViewerInspector",type:"checkbox",hidden:"","appearance-none":"","outline-none":""},null,8,eu),[[Qr,n.value]]),o[8]||(o[8]=O("div",{"select-none":""},[O("div",{"i-solar:bug-bold-duotone":""})],-1))],2)]),ke(V(ui),null,{default:Ue(()=>[n.value?(Z(),re("div",tu,[O("div",nu,[O("div",ru,[O("span",null,he(V(e)("stage.viewers.debug-menu.emotions")),1)]),O("div",iu,[O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[1]||(o[1]=l=>r.value={group:"Surprise",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.surprised")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[2]||(o[2]=l=>r.value={group:"Sad",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.sad")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[3]||(o[3]=l=>r.value={group:"Angry",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.angry")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[4]||(o[4]=l=>r.value={group:"Happy",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.happy")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[5]||(o[5]=l=>r.value={group:"Awkward",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.awkward")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[6]||(o[6]=l=>r.value={group:"Question",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.question")),1),O("button",{"rounded-lg":"",bg:"neutral-100/70 dark:neutral-800/50","px-2":"","py-1":"","backdrop-blur-sm":"",onClick:o[7]||(o[7]=l=>r.value={group:"Think",index:0})},he(V(e)("stage.viewers.debug-menu.emotions-btn.think")),1)])])])):it("",!0)]),_:1})])]),_:1}))}});var au=Object.defineProperty,su=(t,e,n)=>e in t?au(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lu=(t,e,n)=>su(t,e+"",n);function uu(t){return Ls()?(Ps(t),!0):!1}function ma(t){return typeof t=="function"?t():V(t)}const cu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fu=Object.prototype.toString,du=t=>fu.call(t)==="[object Object]",pu=()=>{},hu=cu?window:void 0;function mu(t){var e;const n=ma(t);return(e=n==null?void 0:n.$el)!=null?e:n}function ar(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=hu):[e,n,r,i]=t,!e)return pu;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,f,p,d)=>(c.addEventListener(f,p,d),()=>c.removeEventListener(f,p,d)),l=Be(()=>[mu(e),ma(i)],([c,f])=>{if(a(),!c)return;const p=du(f)?{...f}:f;o.push(...n.flatMap(d=>r.map(y=>s(c,d,y,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return uu(u),u}function ga(t,e,n,r){const i=class extends yn{constructor(o={}){const a=Object.entries(t);super({uniforms:a.reduce((s,[l,u])=>{const c=ni.clone({[l]:{value:u}});return{...s,...c}},{}),vertexShader:e,fragmentShader:n}),lu(this,"key",""),a.forEach(([s])=>Object.defineProperty(this,s,{get:()=>this.uniforms[s].value,set:l=>this.uniforms[s].value=l})),Object.assign(this,o)}};return i.key=Dt.generateUUID(),i}ga({color:new ze("white"),scale:new Pe(1,1),imageBounds:new Pe(1,1),resolution:1024,map:null,zoom:1,radius:0,grayscale:0,opacity:1},` varying vec2 vUv; varying vec2 vPos; void main() { diff --git a/assets/index-5EHBT8-2.js b/assets/index-yo1PjPQx.js similarity index 89% rename from assets/index-5EHBT8-2.js rename to assets/index-yo1PjPQx.js index 8441d376b1dab0a70e46bc6bd654ac8a5487bbaf..2a7efbee083cde301e91fe2bb7358321edda504f 100644 --- a/assets/index-5EHBT8-2.js +++ b/assets/index-yo1PjPQx.js @@ -1 +1 @@ -import{_ as d}from"./IconAnimation.vue_vue_type_script_setup_true_lang-CxU7tbtB.js";import{u}from"./useIconAnimation-BkxpLoyr.js";import{d as p,bz as f,c as n,o as e,a as i,m as _,G as v,u as o,bA as x}from"./index-5LjD1Eoi.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./emotions-CAex_2dA.js";const k={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},y=p({__name:"index",setup(b){const{iconAnimationStarted:a,showIconAnimation:s,animationIcon:c}=u("i-solar:armchair-2-bold-duotone");return(h,t)=>{const l=d,m=f("motion");return e(),n(x,null,[t[1]||(t[1]=i("div",null," Scene ",-1)),o(s)?(e(),_(l,{key:0,"z-index":-1,icon:o(c),"icon-size":12,duration:1e3,started:o(a),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):v((e(),n("div",k,t[0]||(t[0]=[i("div",{text:"60","i-solar:armchair-2-bold-duotone":""},null,-1)]))),[[m]])],64)}}});typeof r=="function"&&r(y);export{y as default}; +import{_ as d}from"./IconAnimation.vue_vue_type_script_setup_true_lang-BzXa30zF.js";import{u}from"./useIconAnimation-CvSuZDEE.js";import{d as p,bz as f,c as n,o as e,a as i,m as _,G as v,u as o,bA as x}from"./index-DCMFRrFG.js";import{b as r}from"./route-block-B_A1xBdJ.js";import"./emotions-CAex_2dA.js";const k={key:1,text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,y:20},enter:{scale:1,opacity:1,y:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},y=p({__name:"index",setup(b){const{iconAnimationStarted:a,showIconAnimation:s,animationIcon:c}=u("i-solar:armchair-2-bold-duotone");return(h,t)=>{const l=d,m=f("motion");return e(),n(x,null,[t[1]||(t[1]=i("div",null," Scene ",-1)),o(s)?(e(),_(l,{key:0,"z-index":-1,icon:o(c),"icon-size":12,duration:1e3,started:o(a),"is-reverse":!0,position:"calc(100dvw - 9.5rem), calc(100dvh - 9.5rem)","text-color":"text-neutral-200/50 dark:text-neutral-600/20"},null,8,["icon","started"])):v((e(),n("div",k,t[0]||(t[0]=[i("div",{text:"60","i-solar:armchair-2-bold-duotone":""},null,-1)]))),[[m]])],64)}}});typeof r=="function"&&r(y);export{y as default}; diff --git a/assets/memory-long-term-r86GQRQ8.js b/assets/memory-long-term-7F9G0rHp.js similarity index 71% rename from assets/memory-long-term-r86GQRQ8.js rename to assets/memory-long-term-7F9G0rHp.js index 1439e99d878f63abf743b91daeadf6b7be3d1d22..e7117523aa47ae23ec725ce71ea3e9f4b81f1d93 100644 --- a/assets/memory-long-term-r86GQRQ8.js +++ b/assets/memory-long-term-7F9G0rHp.js @@ -1 +1 @@ -import{d as o,c as t,o as n}from"./index-5LjD1Eoi.js";import{b as e}from"./route-block-B_A1xBdJ.js";const r=o({__name:"memory-long-term",setup(c){return(m,a)=>(n(),t("div"))}});typeof e=="function"&&e(r);export{r as default}; +import{d as o,c as t,o as n}from"./index-DCMFRrFG.js";import{b as e}from"./route-block-B_A1xBdJ.js";const r=o({__name:"memory-long-term",setup(c){return(m,a)=>(n(),t("div"))}});typeof e=="function"&&e(r);export{r as default}; diff --git a/assets/memory-short-term-9VI9bErb.js b/assets/memory-short-term-DW9sGSpx.js similarity index 71% rename from assets/memory-short-term-9VI9bErb.js rename to assets/memory-short-term-DW9sGSpx.js index 24b1dc65c97c722fb6d1570a2a37cf04bef87a49..43e66a074f46fa8dfe5da98612a6ce2e49fa5866 100644 --- a/assets/memory-short-term-9VI9bErb.js +++ b/assets/memory-short-term-DW9sGSpx.js @@ -1 +1 @@ -import{d as o,c as t,o as r}from"./index-5LjD1Eoi.js";import{b as e}from"./route-block-B_A1xBdJ.js";const n=o({__name:"memory-short-term",setup(c){return(m,a)=>(r(),t("div"))}});typeof e=="function"&&e(n);export{n as default}; +import{d as o,c as t,o as r}from"./index-DCMFRrFG.js";import{b as e}from"./route-block-B_A1xBdJ.js";const n=o({__name:"memory-short-term",setup(c){return(m,a)=>(r(),t("div"))}});typeof e=="function"&&e(n);export{n as default}; diff --git a/assets/messages-Dav99Qqj.js b/assets/messages-BAFAGeqg.js similarity index 77% rename from assets/messages-Dav99Qqj.js rename to assets/messages-BAFAGeqg.js index 8519352e529b6e4d7a72e1824ba2afd103689544..c3db9c36bf867f95a549c95531831fe4284d28ec 100644 --- a/assets/messages-Dav99Qqj.js +++ b/assets/messages-BAFAGeqg.js @@ -1 +1 @@ -import{u as c}from"./queue-D8d866Tb.js";import{u as g,l as _}from"./queues-L5OE-bsn.js";/* empty css */import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js";import{d as b,r as o,c as l,o as u,a as e,b as x,u as k,t as p,bA as h,bB as w}from"./index-5LjD1Eoi.js";import"./emotions-CAex_2dA.js";import"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},B={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},D=b({__name:"messages",setup(Q){const s=o(""),r=o([]),n=o(!1),m=c({handlers:[async i=>{r.value.push(i.data)}]}),d=g(m);async function f(){n.value=!0,d.add(s.value),d.add(_),s.value="",n.value=!1}return(i,t)=>(u(),l("div",S,[e("div",V,[x(k(v),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=a=>s.value=a),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:f},null,8,["modelValue"]),e("button",y,p(n.value?"Processing...":"Send"),1)]),e("div",B,[e("div",M,[t[1]||(t[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,w(r.value,a=>(u(),l("div",{key:a},[e("div",null,p(a),1)]))),128))])])]))}});export{D as default}; +import{u as c}from"./queue-DDsFBepK.js";import{u as g,l as _}from"./queues-xZ787FAF.js";/* empty css */import{_ as v}from"./Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js";import{d as b,r as o,c as l,o as u,a as e,b as x,u as k,t as p,bA as h,bB as w}from"./index-DCMFRrFG.js";import"./emotions-CAex_2dA.js";import"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";const S={flex:"","flex-col":"","gap-2":"","p-2":""},V={flex:"","flex-row":"","gap-2":""},y={"rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-4":""},B={"w-full":"",flex:"","flex-row":"","gap-4":""},M={"w-full":"","rounded-lg":"",bg:"neutral-100 dark:neutral-700","p-2":""},D=b({__name:"messages",setup(Q){const s=o(""),r=o([]),n=o(!1),m=c({handlers:[async i=>{r.value.push(i.data)}]}),d=g(m);async function f(){n.value=!0,d.add(s.value),d.add(_),s.value="",n.value=!1}return(i,t)=>(u(),l("div",S,[e("div",V,[x(k(v),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=a=>s.value=a),placeholder:"Message",p:"2",bg:"neutral-100 dark:neutral-700","w-full":"","rounded-lg":"","outline-none":"",onSubmit:f},null,8,["modelValue"]),e("button",y,p(n.value?"Processing...":"Send"),1)]),e("div",B,[e("div",M,[t[1]||(t[1]=e("h3",{"font-semibold":""}," TTS Message ",-1)),(u(!0),l(h,null,w(r.value,a=>(u(),l("div",{key:a},[e("div",null,p(a),1)]))),128))])])]))}});export{D as default}; diff --git a/assets/microsoft-speech-D22NL1kj.js b/assets/microsoft-speech-BpwwCTsY.js similarity index 74% rename from assets/microsoft-speech-D22NL1kj.js rename to assets/microsoft-speech-BpwwCTsY.js index de17c90d1fb702d66d8ba88f4833de2355dca776..380dd0c170cf39588ffe6bd998a561e0243b1ead 100644 --- a/assets/microsoft-speech-D22NL1kj.js +++ b/assets/microsoft-speech-BpwwCTsY.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as B,k as F,s as M,r as v,l as g,f as E,w as K,m as N,o as T,E as b,b as n,u as o,a as q}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";import{u as G}from"./speech-BYL-UWPg.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js";/* empty css */import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js";import{b as $}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";const A={flex:"~ col gap-4"},t="microsoft-speech",C="v1",D=B({__name:"microsoft-speech",setup(I){const{t:a}=F(),P={pitch:0,speed:1,volume:0},r=G(),p=z(),{providers:l}=M(p),m=v(0),V=v(1),_=v(0),d=g({get:()=>{var s;return((s=l.value[t])==null?void 0:s.region)||"eastasia"},set:s=>{l.value[t]||(l.value[t]={region:"eastasia"}),l.value[t].region=s}}),y=g(()=>{var s;return!!((s=l.value[t])!=null&&s.apiKey)}),w=g(()=>r.availableVoices[t]||[]);E(async()=>{await r.loadVoicesForProvider(t)}),K([y,d],async()=>{await r.loadVoicesForProvider(t)});async function U(s,i,e){const c=p.getProviderInstance(t);if(!c)throw new Error("Failed to initialize speech provider");const u=p.getProviderConfig(t),x=u.model||C,S={...u,region:d.value,disableSsml:!e};if(!e&&i){const k=w.value.find(f=>f.id===i);if(k){const f=r.generateSSML(s,k,{...u,pitch:m.value});return await r.speech(c,x,f,i,S)}}return await r.speech(c,x,s,i,S)}return(s,i)=>(T(),N(o(j),{"provider-id":t,"default-model":C,"additional-settings":P},{"basic-settings":b(()=>[n(o(H),{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),label:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":b(()=>[q("div",A,[n(o(h),{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=e=>m.value=e),label:o(a)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,["modelValue","label","description","format-value"]),n(o(h),{modelValue:V.value,"onUpdate:modelValue":i[2]||(i[2]=e=>V.value=e),label:o(a)("settings.pages.providers.provider.common.fields.field.speed.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),n(o(h),{modelValue:_.value,"onUpdate:modelValue":i[3]||(i[3]=e=>_.value=e),label:o(a)("settings.pages.providers.provider.common.fields.field.volume.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,["modelValue","label","description","format-value"])])]),playground:b(()=>[n(o(R),{"available-voices":w.value,"generate-speech":U,"api-key-configured":y.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof $=="function"&&$(D);export{D as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as B,k as F,s as M,r as v,l as g,f as E,w as K,m as N,o as T,E as b,b as n,u as o,a as q}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";import{u as G}from"./speech-Bc-BAopv.js";import{_ as H}from"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import{_ as h}from"./FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js";/* empty css */import{_ as R,a as j}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js";import{b as $}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";const A={flex:"~ col gap-4"},t="microsoft-speech",C="v1",D=B({__name:"microsoft-speech",setup(I){const{t:a}=F(),P={pitch:0,speed:1,volume:0},r=G(),p=z(),{providers:l}=M(p),m=v(0),V=v(1),_=v(0),d=g({get:()=>{var s;return((s=l.value[t])==null?void 0:s.region)||"eastasia"},set:s=>{l.value[t]||(l.value[t]={region:"eastasia"}),l.value[t].region=s}}),y=g(()=>{var s;return!!((s=l.value[t])!=null&&s.apiKey)}),w=g(()=>r.availableVoices[t]||[]);E(async()=>{await r.loadVoicesForProvider(t)}),K([y,d],async()=>{await r.loadVoicesForProvider(t)});async function U(s,i,e){const c=p.getProviderInstance(t);if(!c)throw new Error("Failed to initialize speech provider");const u=p.getProviderConfig(t),x=u.model||C,S={...u,region:d.value,disableSsml:!e};if(!e&&i){const k=w.value.find(f=>f.id===i);if(k){const f=r.generateSSML(s,k,{...u,pitch:m.value});return await r.speech(c,x,f,i,S)}}return await r.speech(c,x,s,i,S)}return(s,i)=>(T(),N(o(j),{"provider-id":t,"default-model":C,"additional-settings":P},{"basic-settings":b(()=>[n(o(H),{modelValue:d.value,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),label:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.label"),description:o(a)("settings.pages.providers.provider.microsoft-speech.fields.field.region.description"),placeholder:"eastasia",required:"",type:"text"},null,8,["modelValue","label","description"])]),"voice-settings":b(()=>[q("div",A,[n(o(h),{modelValue:m.value,"onUpdate:modelValue":i[1]||(i[1]=e=>m.value=e),label:o(a)("settings.pages.providers.provider.common.fields.field.pitch.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.pitch.description"),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,["modelValue","label","description","format-value"]),n(o(h),{modelValue:V.value,"onUpdate:modelValue":i[2]||(i[2]=e=>V.value=e),label:o(a)("settings.pages.providers.provider.common.fields.field.speed.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"]),n(o(h),{modelValue:_.value,"onUpdate:modelValue":i[3]||(i[3]=e=>_.value=e),label:o(a)("settings.pages.providers.provider.common.fields.field.volume.label"),description:o(a)("settings.pages.providers.provider.common.fields.field.volume.description"),min:-100,max:100,step:1,"format-value":e=>`${e}%`},null,8,["modelValue","label","description","format-value"])])]),playground:b(()=>[n(o(R),{"available-voices":w.value,"generate-speech":U,"api-key-configured":y.value,"default-text":"Hello! This is a test of the Microsoft Speech synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof $=="function"&&$(D);export{D as default}; diff --git a/assets/mistral-ai-3GBsQ0V-.js b/assets/mistral-ai-BdVI7t8j.js similarity index 68% rename from assets/mistral-ai-3GBsQ0V-.js rename to assets/mistral-ai-BdVI7t8j.js index d6d432b5f88ab6d8ae48024f1a02554324a79d69..fc81fa08c8cf72be70f194fea5a70f98b900bde3 100644 --- a/assets/mistral-ai-3GBsQ0V-.js +++ b/assets/mistral-ai-BdVI7t8j.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as U,k as V,h as y,s as $,l as c,f as K,w as h,m as w,o as x,E as p,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="mistral-ai",B=U({__name:"mistral-ai",setup(I){const{t:u}=V(),b=y(),d=z(),{providers:o}=$(d),n=c(()=>d.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.value=m),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as U,k as V,h as y,s as $,l as c,f as K,w as h,m as w,o as x,E as p,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="mistral-ai",B=U({__name:"mistral-ai",setup(I){const{t:u}=V(),b=y(),d=z(),{providers:o}=$(d),n=c(()=>d.getProviderMetadata(a)),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:p(()=>[l(t(P),null,{default:p(()=>[l(t(R),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"mis-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=m=>s.value=m),placeholder:"https://api.mistral.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/moonshot-ai-GQSErYLo.js b/assets/moonshot-ai-DjtPuycx.js similarity index 68% rename from assets/moonshot-ai-GQSErYLo.js rename to assets/moonshot-ai-DjtPuycx.js index bb66efffbb395e5934355fadd72031fca74cbb73..21a5bf116bbfc6a55dee7b4b57509441bd32a1f5 100644 --- a/assets/moonshot-ai-GQSErYLo.js +++ b/assets/moonshot-ai-DjtPuycx.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as k,k as U,h as V,s as y,l as c,f as $,w as K,m as w,o as x,E as p,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="moonshot-ai",C=k({__name:"moonshot-ai",setup(I){const{t:u}=U(),b=V(),d=z(),{providers:o}=y(d),n=c(()=>d.getProviderMetadata(a)),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:p(()=>[l(t(R),null,{default:p(()=>[l(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(P),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=m=>r.value=m),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as k,k as U,h as V,s as y,l as c,f as $,w as K,m as w,o as x,E as p,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="moonshot-ai",C=k({__name:"moonshot-ai",setup(I){const{t:u}=U(),b=V(),d=z(),{providers:o}=y(d),n=c(()=>d.getProviderMetadata(a)),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),r=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",r.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([s,r],()=>{o.value[a]={...o.value[a],apiKey:s.value,baseUrl:r.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var v,f;return x(),w(t(B),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:p(()=>[l(t(R),null,{default:p(()=>[l(t(S),{title:t(u)("settings.pages.providers.common.section.basic.title"),description:t(u)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:p(()=>{var m;return[l(t(P),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":(m=n.value)==null?void 0:m.localizedName,placeholder:"ms-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(u)("settings.pages.providers.common.section.advanced.title")},{default:p(()=>[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=m=>r.value=m),placeholder:"https://api.moonshot.cn/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/assets/novita-ai-Bj8AIzPS.js b/assets/novita-ai-BIRgykIz.js similarity index 68% rename from assets/novita-ai-Bj8AIzPS.js rename to assets/novita-ai-BIRgykIz.js index 4b83dc4d0b913f32142dce8e01a35fdbb0ffb4aa..5607848a0d85b17d42be092c93460ab638f76745 100644 --- a/assets/novita-ai-Bj8AIzPS.js +++ b/assets/novita-ai-BIRgykIz.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as U,k as V,h as y,s as $,l as v,f as K,w as h,m as w,o as x,E as u,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="novita-ai",B=U({__name:"novita-ai",setup(I){const{t:m}=V(),b=y(),d=z(),{providers:o}=$(d),n=v(()=>d.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as U,k as V,h as y,s as $,l as v,f as K,w as h,m as w,o as x,E as u,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="novita-ai",B=U({__name:"novita-ai",setup(I){const{t:m}=V(),b=y(),d=z(),{providers:o}=$(d),n=v(()=>d.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});K(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),h([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return x(),w(t(S),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(b).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"nvt-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.novita.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/ollama-BpQSwC2U.js b/assets/ollama-DMTLWCIi.js similarity index 86% rename from assets/ollama-BpQSwC2U.js rename to assets/ollama-DMTLWCIi.js index 2af73285d326bac6761d6efa7e036b88b2e2ad9d..d02f2c9049153ca06b591ae7cdb613cb3c36741d 100644 --- a/assets/ollama-BpQSwC2U.js +++ b/assets/ollama-DMTLWCIi.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as K,bK as x,bL as U,c as b,o as f,b as m,r as w,w as C,bz as z,a as _,G as O,bN as R,i as S,t as $,bA as D,bB as I,k as A,h as E,s as F,l as M,f as L,cb as T,m as G,E as k,u as a}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as j}from"./providers-CIeQW25J.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";/* empty css */import{a as H,_ as J}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as Q,a as W}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as X}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as B}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";const Y={flex:"~ gap-2"},Z=K({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const o=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,t)=>(f(),b("div",Y,[m(q,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value=i),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(q,{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=i=>u.value=i),placeholder:o.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),ee={"max-w-full":""},le={flex:"~ col gap-2"},te={class:"flex items-center gap-1 text-sm font-medium"},ae={key:0,class:"text-red-500"},oe={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},re={flex:"~ col gap-2"},se=["onClick"],ie=K({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:o}){const s=v,u=o,r=U(v,"modelValue"),t=w(""),i=w("");return C([t,i],()=>{u("add",t.value,i.value)}),(P,p)=>{const V=z("auto-animate");return f(),b("div",ee,[_("label",le,[_("div",null,[_("div",te,[R($(s.label)+" ",1),s.required!==!1?(f(),b("span",ae,"*")):S("",!0)]),_("div",oe,$(s.description),1)]),O((f(),b("div",re,[(f(!0),b(D,null,I(r.value,(y,l)=>(f(),b("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Z,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,se)]))),128))])),[[V]])])])}}}),d="ollama",ne=K({__name:"ollama",setup(v){const{t:o}=A(),s=E(),u=j(),{providers:r}=F(u),t=M(()=>u.getProviderMetadata(d)),i=M({get:()=>{var l,e,n;return((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});L(()=>{var l,e,n,g;u.initializeProvider(d),i.value=((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||"",(g=r.value[d])!=null&&g.headers||(r.value[d].headers={})});function P(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=T([{key:"",value:""}]);function V(l,e,n){l&&l.push({key:e,value:n})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return C(p,l=>{l.length>0&&(l[l.length-1].key!==""||l[l.length-1].value!=="")&&l.push({key:"",value:""})},{deep:!0,immediate:!0}),(l,e)=>{var n,g;return f(),G(a(X),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(g=t.value)==null?void 0:g.icon,"on-back":()=>a(s).back()},{default:k(()=>[m(a(Q),null,{default:k(()=>[m(a(W),{title:a(o)("settings.pages.providers.common.section.basic.title"),description:a(o)("settings.pages.providers.common.section.basic.description"),"on-reset":P},{default:k(()=>{var c,h;return[m(a(H),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((h=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:h.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(a(J),{title:a(o)("settings.pages.providers.common.section.advanced.title")},{default:k(()=>[m(a(ie),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,h)=>V(p,c,h)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof B=="function"&&B(ne);export{ne as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as K,bK as x,bL as U,c as b,o as f,b as m,r as w,w as C,bz as z,a as _,G as O,bN as R,i as S,t as $,bA as D,bB as I,k as A,h as E,s as F,l as M,f as L,cb as T,m as G,E as k,u as a}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as j}from"./providers-DHuI5XmA.js";import{_ as q}from"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";/* empty css */import{a as H,_ as J}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as Q,a as W}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as X}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as B}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";const Y={flex:"~ gap-2"},Z=K({__name:"InputKeyValue",props:x({name:null,keyPlaceholder:null,valuePlaceholder:null},{propertyKey:{required:!0},propertyKeyModifiers:{},propertyValue:{required:!0},propertyValueModifiers:{}}),emits:["update:propertyKey","update:propertyValue"],setup(v){const o=v,s=U(v,"propertyKey"),u=U(v,"propertyValue");return(r,t)=>(f(),b("div",Y,[m(q,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value=i),placeholder:o.keyPlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"]),m(q,{modelValue:u.value,"onUpdate:modelValue":t[1]||(t[1]=i=>u.value=i),placeholder:o.valuePlaceholder,class:"w-1/2"},null,8,["modelValue","placeholder"])]))}}),ee={"max-w-full":""},le={flex:"~ col gap-2"},te={class:"flex items-center gap-1 text-sm font-medium"},ae={key:0,class:"text-red-500"},oe={class:"text-xs text-neutral-500 dark:text-neutral-400","text-nowrap":""},re={flex:"~ col gap-2"},se=["onClick"],ie=K({__name:"FieldKeyValues",props:x({label:null,description:null,name:null,keyPlaceholder:null,valuePlaceholder:null,required:{type:Boolean},inputClass:null},{modelValue:{required:!0},modelModifiers:{}}),emits:x(["remove","add"],["update:modelValue"]),setup(v,{emit:o}){const s=v,u=o,r=U(v,"modelValue"),t=w(""),i=w("");return C([t,i],()=>{u("add",t.value,i.value)}),(P,p)=>{const V=z("auto-animate");return f(),b("div",ee,[_("label",le,[_("div",null,[_("div",te,[R($(s.label)+" ",1),s.required!==!1?(f(),b("span",ae,"*")):S("",!0)]),_("div",oe,$(s.description),1)]),O((f(),b("div",re,[(f(!0),b(D,null,I(r.value,(y,l)=>(f(),b("div",{key:l,"w-full":"",flex:"","items-center":"","gap-2":""},[m(Z,{"property-key":y.key,"onUpdate:propertyKey":e=>y.key=e,"property-value":y.value,"onUpdate:propertyValue":e=>y.value=e,"key-placeholder":s.keyPlaceholder,"value-placeholder":s.valuePlaceholder,"w-full":""},null,8,["property-key","onUpdate:propertyKey","property-value","onUpdate:propertyValue","key-placeholder","value-placeholder"]),_("button",{onClick:e=>u("remove",l)},p[0]||(p[0]=[_("div",{"i-solar:minus-circle-line-duotone":"",size:"6"},null,-1)]),8,se)]))),128))])),[[V]])])])}}}),d="ollama",ne=K({__name:"ollama",setup(v){const{t:o}=A(),s=E(),u=j(),{providers:r}=F(u),t=M(()=>u.getProviderMetadata(d)),i=M({get:()=>{var l,e,n;return((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||""},set:l=>{r.value[d]||(r.value[d]={}),r.value[d].baseUrl=l}});L(()=>{var l,e,n,g;u.initializeProvider(d),i.value=((l=r.value[d])==null?void 0:l.baseUrl)||((n=(e=t.value)==null?void 0:e.defaultOptions)==null?void 0:n.baseUrl)||"",(g=r.value[d])!=null&&g.headers||(r.value[d].headers={})});function P(){var l;r.value[d]={...(l=t.value)==null?void 0:l.defaultOptions}}const p=T([{key:"",value:""}]);function V(l,e,n){l&&l.push({key:e,value:n})}function y(l,e){e&&(e.length===1?(e[0].key="",e[0].value=""):e.splice(l,1))}return C(p,l=>{l.length>0&&(l[l.length-1].key!==""||l[l.length-1].value!=="")&&l.push({key:"",value:""})},{deep:!0,immediate:!0}),(l,e)=>{var n,g;return f(),G(a(X),{"provider-name":(n=t.value)==null?void 0:n.localizedName,"provider-icon":(g=t.value)==null?void 0:g.icon,"on-back":()=>a(s).back()},{default:k(()=>[m(a(Q),null,{default:k(()=>[m(a(W),{title:a(o)("settings.pages.providers.common.section.basic.title"),description:a(o)("settings.pages.providers.common.section.basic.description"),"on-reset":P},{default:k(()=>{var c,h;return[m(a(H),{modelValue:i.value,"onUpdate:modelValue":e[0]||(e[0]=N=>i.value=N),placeholder:((h=(c=t.value)==null?void 0:c.defaultOptions)==null?void 0:h.baseUrl)||"",required:""},null,8,["modelValue","placeholder"])]}),_:1},8,["title","description"]),m(a(J),{title:a(o)("settings.pages.providers.common.section.advanced.title")},{default:k(()=>[m(a(ie),{modelValue:p,"onUpdate:modelValue":e[1]||(e[1]=c=>p=c),label:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.label"),description:a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.description"),"key-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.key.placeholder"),"value-placeholder":a(o)("settings.pages.providers.common.section.advanced.fields.field.headers.value.placeholder"),onAdd:e[2]||(e[2]=(c,h)=>V(p,c,h)),onRemove:e[3]||(e[3]=c=>y(c,p))},null,8,["modelValue","label","description","key-placeholder","value-placeholder"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof B=="function"&&B(ne);export{ne as default}; diff --git a/assets/openai-DVEjYgEm.js b/assets/openai-CbZevItC.js similarity index 71% rename from assets/openai-DVEjYgEm.js rename to assets/openai-CbZevItC.js index aea41adb8a7e15be74b483282c9e119a1f75d708..0c4bdd538db475db308c06d44ed003a6ee7aab85 100644 --- a/assets/openai-DVEjYgEm.js +++ b/assets/openai-CbZevItC.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as U,k,h as V,s as y,l as c,f as $,w as K,m as I,o as w,E as n,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as x}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const e="openai",B=U({__name:"openai",setup(C){const{t:m}=k(),b=V(),v=x(),{providers:a}=y(v),u=c(()=>v.getProviderMetadata(e)),s=c({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),r=c({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.openai.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});$(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",r.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://api.openai.com/v1/"}),K([s,r],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,i)=>{var d,f;return w(),I(t(A),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=u.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:n(()=>[l(t(S),null,{default:n(()=>[l(t(z),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:n(()=>{var p;return[l(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":((p=u.value)==null?void 0:p.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:n(()=>[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=p=>r.value=p),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as U,k,h as V,s as y,l as c,f as $,w as K,m as I,o as w,E as n,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as x}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as R}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as S,a as z}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as A}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const e="openai",B=U({__name:"openai",setup(C){const{t:m}=k(),b=V(),v=x(),{providers:a}=y(v),u=c(()=>v.getProviderMetadata(e)),s=c({get:()=>{var o;return((o=a.value[e])==null?void 0:o.apiKey)||""},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].apiKey=o}}),r=c({get:()=>{var o;return((o=a.value[e])==null?void 0:o.baseUrl)||"https://api.openai.com/v1/"},set:o=>{a.value[e]||(a.value[e]={}),a.value[e].baseUrl=o}});$(()=>{var o,i;a.value[e]||(a.value[e]={baseUrl:"https://api.openai.com/v1/"}),s.value=((o=a.value[e])==null?void 0:o.apiKey)||"",r.value=((i=a.value[e])==null?void 0:i.baseUrl)||"https://api.openai.com/v1/"}),K([s,r],()=>{a.value[e]={...a.value[e],apiKey:s.value,baseUrl:r.value||"https://api.openai.com/v1/"}});function g(){a.value[e]={baseUrl:"https://api.openai.com/v1/"}}return(o,i)=>{var d,f;return w(),I(t(A),{"provider-name":((d=u.value)==null?void 0:d.localizedName)||"OpenAI","provider-icon":(f=u.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:n(()=>[l(t(S),null,{default:n(()=>[l(t(z),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:n(()=>{var p;return[l(t(R),{modelValue:s.value,"onUpdate:modelValue":i[0]||(i[0]=h=>s.value=h),"provider-name":((p=u.value)==null?void 0:p.localizedName)||"OpenAI",placeholder:"sk-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:n(()=>[l(t(N),{modelValue:r.value,"onUpdate:modelValue":i[1]||(i[1]=p=>r.value=p),placeholder:"https://api.openai.com/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/openrouter-ai-DH4s4Ijd.js b/assets/openrouter-ai-CEyG_wt7.js similarity index 71% rename from assets/openrouter-ai-DH4s4Ijd.js rename to assets/openrouter-ai-CEyG_wt7.js index 65ee3f332610e114c61148b6ed7d8da24764aa80..cc03bdf186a8008db53826769bd929ea8278411f 100644 --- a/assets/openrouter-ai-DH4s4Ijd.js +++ b/assets/openrouter-ai-CEyG_wt7.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as V,k as y,h as $,s as K,l as _,f as O,w as h,m as w,o as x,E as v,b as d,u as r}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="openrouter-ai",C=V({__name:"openrouter-ai",setup(I){const{t:c}=y(),U=$(),f=z(),{providers:o}=K(f),i=_(()=>f.getProviderMetadata(a)),s=_({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),n=_({get:()=>{var e,t,l;return((e=o.value[a])==null?void 0:e.baseUrl)||((l=(t=i.value)==null?void 0:t.defaultOptions)==null?void 0:l.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});O(()=>{var e,t,l,u;f.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(l=i.value)==null?void 0:l.defaultOptions)==null?void 0:u.baseUrl)||""}),h([s,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:s.value,baseUrl:n.value||((t=(e=i.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function g(){var e;o.value[a]={...(e=i.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var l,u;return x(),w(r(B),{"provider-name":(l=i.value)==null?void 0:l.localizedName,"provider-icon":(u=i.value)==null?void 0:u.icon,"on-back":()=>r(U).back()},{default:v(()=>[d(r(R),null,{default:v(()=>[d(r(S),{title:r(c)("settings.pages.providers.common.section.basic.title"),description:r(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:v(()=>{var p;return[d(r(P),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=m=>s.value=m),"provider-name":(p=i.value)==null?void 0:p.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),d(r(M),{title:r(c)("settings.pages.providers.common.section.advanced.title")},{default:v(()=>{var p,m;return[d(r(N),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=k=>n.value=k),placeholder:((m=(p=i.value)==null?void 0:p.defaultOptions)==null?void 0:m.baseUrl)||""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof b=="function"&&b(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as V,k as y,h as $,s as K,l as _,f as O,w as h,m as w,o as x,E as v,b as d,u as r}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="openrouter-ai",C=V({__name:"openrouter-ai",setup(I){const{t:c}=y(),U=$(),f=z(),{providers:o}=K(f),i=_(()=>f.getProviderMetadata(a)),s=_({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),n=_({get:()=>{var e,t,l;return((e=o.value[a])==null?void 0:e.baseUrl)||((l=(t=i.value)==null?void 0:t.defaultOptions)==null?void 0:l.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});O(()=>{var e,t,l,u;f.initializeProvider(a),s.value=((e=o.value[a])==null?void 0:e.apiKey)||"",n.value=((t=o.value[a])==null?void 0:t.baseUrl)||((u=(l=i.value)==null?void 0:l.defaultOptions)==null?void 0:u.baseUrl)||""}),h([s,n],()=>{var e,t;o.value[a]={...o.value[a],apiKey:s.value,baseUrl:n.value||((t=(e=i.value)==null?void 0:e.defaultOptions)==null?void 0:t.baseUrl)||""}});function g(){var e;o.value[a]={...(e=i.value)==null?void 0:e.defaultOptions}}return(e,t)=>{var l,u;return x(),w(r(B),{"provider-name":(l=i.value)==null?void 0:l.localizedName,"provider-icon":(u=i.value)==null?void 0:u.icon,"on-back":()=>r(U).back()},{default:v(()=>[d(r(R),null,{default:v(()=>[d(r(S),{title:r(c)("settings.pages.providers.common.section.basic.title"),description:r(c)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:v(()=>{var p;return[d(r(P),{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=m=>s.value=m),"provider-name":(p=i.value)==null?void 0:p.localizedName,placeholder:"sk-or-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),d(r(M),{title:r(c)("settings.pages.providers.common.section.advanced.title")},{default:v(()=>{var p,m;return[d(r(N),{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=k=>n.value=k),placeholder:((m=(p=i.value)==null?void 0:p.defaultOptions)==null?void 0:m.baseUrl)||""},null,8,["modelValue","placeholder"])]}),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof b=="function"&&b(C);export{C as default}; diff --git a/assets/providers-CIeQW25J.js b/assets/providers-DHuI5XmA.js similarity index 99% rename from assets/providers-CIeQW25J.js rename to assets/providers-DHuI5XmA.js index 194fdca7576a35b4841558b17e30965df6362ae8..463188b5373ce323b81b71de2a77ba70bf141441 100644 --- a/assets/providers-CIeQW25J.js +++ b/assets/providers-DHuI5XmA.js @@ -1 +1 @@ -var le=Object.defineProperty;var de=(a,i,n)=>i in a?le(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n;var G=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{v as ce,bG as pe,k as ue,r as U,w as ge,l as k}from"./index-5LjD1Eoi.js";import{r as me,a as ve,e as _e,o as N}from"./index-LHmcipjy.js";const b=async a=>(a.fetch??globalThis.fetch)(me("models",a.baseURL),{headers:ve(a.headers,a.apiKey),signal:a.abortSignal}).then(_e).then(({data:i})=>i),_=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),f=a=>({model:()=>a}),he=a=>({speech:i=>Object.assign(a,{model:i})}),fe=a=>({transcription:i=>Object.assign(a,{model:i})}),g=(a,i)=>({metadata:{id:a,...i}}),m=(...a)=>Object.assign(a[0],...a.slice(1)),be=(a,i="https://api.anthropic.com/v1/")=>m(g("anthropic"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),D=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),V=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),W=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),H=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),J=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),X=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),E=(a,i="https://api.openai.com/v1/")=>m(g("openai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i})),ye=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const h={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,s));let c;return u!=null&&(c=N(u)),N({models:v,provider:c})})(l):{},...h}}},f({apiKey:a,baseURL:i})),xe=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),_({apiKey:a,baseURL:i})),Z=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i,fetch:async(...n)=>globalThis.fetch(...n).then(async l=>l.json()).then(l=>Response.json({data:l,object:"list"}))})),Pe=(a,i)=>{const n=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return m(g("workers-ai"),_({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Q=(a,i="https://api.x.ai/v1/")=>m(g("xai"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),T=(a="http://localhost:11434/v1/")=>m(g("ollama"),_({baseURL:a}),w({baseURL:a}),f({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class j extends Error{constructor(n,l){super(n);G(this,"response");this.name="XSAIError",this.response=l}}const ke=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),K=a=>Object.fromEntries(Object.entries(a).map(([i,n])=>[ke(i),n])),we=a=>Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0)),Ke=(a,i)=>we({Authorization:i!==void 0?`Bearer ${i}`:void 0,...a}),Me=(a,i)=>{const n=i.toString();return new URL(a,n.endsWith("/")?n:`${n}/`)},Ce=async a=>{if(!a.ok)throw new j(`Remote sent ${a.status} response: ${await a.text()}`,a);if(!a.body)throw new j("Response body is empty from remote server",a);if(!(a.body instanceof ReadableStream))throw new j(`Expected Response body to be a ReadableStream, but got ${String(a.body)}; Content Type is ${a.headers.get("Content-Type")}`,a);return a},Oe=async a=>Ce(a).then(async i=>{const n=await i.text();try{return JSON.parse(n)}catch{throw new Error(`Failed to parse response, response body: ${n}`)}});var Y=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x,seed:M,voiceSettings:C})=>({extraBody:K({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x?x.map(B=>K(B)):void 0,seed:M,voiceSettings:K(C??{similarityBoost:.75,stability:.5})})});return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`elevenlabs/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...t?n(t):{},apiKey:a,baseURL:i})})},R=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{deploymentId:s,region:v,sampleRate:u}=t,c={deploymentId:s,region:v,sampleRate:u};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:K(c)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`microsoft/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:`region=${t==null?void 0:t.region}&provider=microsoft`,...t?n(t):{},apiKey:a,baseURL:i})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{var v,u;const s={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(s.app={...t.app,appid:(u=t.app)==null?void 0:u.appId,token:a}),typeof t.user<"u"&&(s.user=t.user),typeof t.audio<"u"&&(s.audio=t.audio),{extraBody:K(s)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`volcengine/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=volcengine",...t?n(t):{},apiKey:a,baseURL:i})})},ae=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,y={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(y).forEach(x=>y[x]===void 0&&delete y[x]),{extraBody:K(y)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let s=i;return s.endsWith("v1/")?s=s.slice(0,-3):s.endsWith("v1")&&(s=s.slice(0,-2)),{query:"provider=alibaba",...t?n(t):{},apiKey:a,baseURL:s}}})},q=async a=>(a.fetch??globalThis.fetch)(Me(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Ke({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Oe).then(({voices:i})=>i);const Se=[{model_id:"eleven_multilingual_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our most life-like, emotionally rich mode in 29 languages. Best for voice overs, audiobooks, post-production, or any other content creation needs.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"ru",name:"Russian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_flash_v2_5",name:"Eleven Flash v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in 32 languages. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"hu",name:"Hungarian"},{language_id:"no",name:"Norwegian"},{language_id:"vi",name:"Vietnamese"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our high quality, low latency model in 32 languages. Best for developer use cases where speed matters and you need non-English languages.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"vi",name:"Vietnamese"},{language_id:"no",name:"Norwegian"},{language_id:"hu",name:"Hungarian"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2",name:"Eleven Turbo v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our English-only, low latency model. Best for developer use cases where speed matters and you only need English. Performance is on par with Turbo v2.5.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_flash_v2",name:"Eleven Flash v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in english. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_english_sts_v2",name:"Eleven English v2",can_be_finetuned:!1,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our state-of-the-art speech to speech model suitable for scenarios where you need maximum control over the content and prosody of your generations.",requires_alpha_access:!1,max_characters_request_free_user:5e3,max_characters_request_subscribed_user:5e3,maximum_text_length_per_request:5e3,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_v1",name:"Eleven Multilingual v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first Multilingual model, capability of generating speech in 10 languages. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"de",name:"German"},{language_id:"pl",name:"Polish"},{language_id:"es",name:"Spanish"},{language_id:"it",name:"Italian"},{language_id:"fr",name:"French"},{language_id:"pt",name:"Portuguese"},{language_id:"hi",name:"Hindi"},{language_id:"ar",name:"Arabic"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_sts_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our cutting-edge, multilingual speech-to-speech model is designed for situations that demand unparalleled control over both the content and the prosody of the generated speech across various languages.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_monolingual_v1",name:"Eleven English v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first ever text to speech model. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"}],Be=ce("providers",()=>{const a=pe("settings/credentials/providers",{}),{t:i}=ue();async function n(e){try{const r=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch OpenRouter models: ${r.statusText}`);return(await r.json()).data.map(o=>({id:o.id,name:o.name||o.id,provider:"openrouter-ai",description:o.description||"",contextLength:o.context_length,deprecated:!1}))}catch(r){throw console.error("Error fetching OpenRouter models:",r),r}}const l={"openrouter-ai":{id:"openrouter-ai",nameKey:"settings.pages.providers.provider.openrouter.title",name:"OpenRouter",descriptionKey:"settings.pages.providers.provider.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",defaultOptions:{baseUrl:"https://openrouter.ai/api/v1/"},createProvider:e=>ye(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>n(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},ollama:{id:"ollama",nameKey:"settings.pages.providers.provider.ollama.title",name:"Ollama",descriptionKey:"settings.pages.providers.provider.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",defaultOptions:{baseUrl:"http://localhost:11434/v1/"},createProvider:e=>T(e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...T(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm",createProvider:e=>T(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:"anthropic",nameKey:"settings.pages.providers.provider.anthropic.title",name:"Anthropic",descriptionKey:"settings.pages.providers.provider.anthropic.description",description:"anthropic.com",icon:"i-lobe-icons:anthropic",defaultOptions:{baseUrl:"https://api.anthropic.com/v1/"},createProvider:e=>be(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"claude-3-7-sonnet-20250219",name:"Claude 3.7 Sonnet",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet (New)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20240620",name:"Claude 3.5 Sonnet (Old)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-opus-20240229",name:"Claude 3 Opus",provider:"anthropic",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:"google-generative-ai",nameKey:"settings.pages.providers.provider.google-generative-ai.title",name:"Google Gemini",descriptionKey:"settings.pages.providers.provider.google-generative-ai.description",description:"ai.google.dev",icon:"i-lobe-icons:gemini",defaultOptions:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"},createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Q(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>Y(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Se.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=Y(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(P=>P.name.includes("Aria")),p=d.findIndex(P=>P.name.includes("Bill")),I=o!==-1?o:0,F=p!==-1?p:d.length-1,z=Math.min(I,F),L=Math.max(I,F);return[...d.slice(0,z),...d.slice(L+1),...d.slice(z,L+1)].map(P=>({id:P.id,name:P.name,provider:"elevenlabs",previewURL:P.preview_audio_url,languages:P.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",nameKey:"settings.pages.providers.provider.microsoft-speech.title",name:"Microsoft / Azure Speech",descriptionKey:"settings.pages.providers.provider.microsoft-speech.description",description:"speech.microsoft.com",iconColor:"i-lobe-icons:microsoft",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"v1",name:"v1",provider:"microsoft-speech",description:"",contextLength:0,deprecated:!1}],listVoices:async e=>{const r=R(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice({region:e.region})})).map(o=>{var p;return{id:o.id,name:o.name,provider:"microsoft-speech",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",nameKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.title",name:"Alibaba Cloud Model Studio",descriptionKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.description",description:"bailian.console.aliyun.com",iconColor:"i-lobe-icons:alibabacloud",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ae(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"alibaba-cloud-model-studio",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"cozyvoice-v1",name:"CozyVoice",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1},{id:"cozyvoice-v2",name:"CozyVoice (New)",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:"volcengine",nameKey:"settings.pages.providers.provider.volcengine.title",name:"settings.pages.providers.provider.volcengine.title",descriptionKey:"settings.pages.providers.provider.volcengine.description",description:"volcengine.com",iconColor:"i-lobe-icons:volcengine",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ee(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"volcano-engine",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"v1",name:"v1",provider:"volcano-engine",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together",createProvider:e=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Z(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita",createProvider:e=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...X(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:"featherless-ai",nameKey:"settings.pages.providers.provider.featherless.title",name:"Featherless.ai",descriptionKey:"settings.pages.providers.provider.featherless.description",description:"featherless.ai",icon:"i-lobe-icons:featherless-ai",defaultOptions:{baseUrl:"https://api.featherless.ai/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare",createProvider:e=>Pe(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>xe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral",createProvider:e=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...J(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function h(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=U({});function s(e){var r;if(!a.value[e]){const d=l[e];a.value[e]={baseUrl:((r=d.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(l).forEach(s);async function v(){await Promise.all(Object.keys(l).map(async e=>{t.value[e]=await h(e)}))}v(),ge(a,v,{deep:!0});const u=k(()=>Object.keys(l).filter(e=>t.value[e])),c=U({}),y=U({}),x=U({});async function M(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];y.value[e]=!0,x.value[e]=null;try{const o=d.capabilities.listModels?await d.capabilities.listModels(r):[];return c.value[e]=o.map(p=>({id:p.id,name:p.name,description:p.description,contextLength:p.contextLength,deprecated:p.deprecated,provider:e})),c.value[e]}catch(o){return console.error(`Error fetching models for ${e}:`,o),x.value[e]=o instanceof Error?o.message:"Unknown error",[]}finally{y.value[e]=!1}}function C(e){return c.value[e]||[]}const B=k(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ie(){for(const e of u.value)l[e].capabilities.listModels&&await M(e)}function $(e){const r=l[e];if(!r)throw new Error(`Provider metadata for ${e} not found`);return{...r,localizedName:i(r.nameKey,r.name),localizedDescription:i(r.descriptionKey,r.description)}}const re=k(()=>Object.values(l).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function O(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const d=l[e];if(!d)throw new Error(`Provider metadata for ${e} not found`);try{return d.createProvider(r)}catch(o){throw console.error(`Error creating provider instance for ${e}:`,o),o}}const S=k(()=>u.value.map(e=>$(e))),te=k(()=>S.value.filter(e=>{const r=O(e.id);return"chat"in r&&typeof r.chat=="function"})),ne=k(()=>S.value.filter(e=>{const r=O(e.id);return"transcription"in r&&typeof r.transcription=="function"})),se=k(()=>S.value.filter(e=>{const r=O(e.id);return"speech"in r&&typeof r.speech=="function"}));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:$,allProvidersMetadata:re,initializeProvider:s,validateProvider:h,availableModels:c,isLoadingModels:y,modelLoadError:x,fetchModelsForProvider:M,getModelsForProvider:C,allAvailableModels:B,loadModelsForConfiguredProviders:ie,getProviderInstance:O,availableProvidersMetadata:S,availableTextGenerationsProvidersMetadata:te,availableAudioSpeechProvidersMetadata:se,availableAudioTranscriptionProvidersMetadata:ne}});export{b as l,Be as u}; +var le=Object.defineProperty;var de=(a,i,n)=>i in a?le(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n;var G=(a,i,n)=>de(a,typeof i!="symbol"?i+"":i,n);import{v as ce,bG as pe,k as ue,r as U,w as ge,l as k}from"./index-DCMFRrFG.js";import{r as me,a as ve,e as _e,o as N}from"./index-LHmcipjy.js";const b=async a=>(a.fetch??globalThis.fetch)(me("models",a.baseURL),{headers:ve(a.headers,a.apiKey),signal:a.abortSignal}).then(_e).then(({data:i})=>i),_=a=>({chat:i=>Object.assign(a,{model:i})}),w=a=>({embed:i=>Object.assign(a,{model:i})}),f=a=>({model:()=>a}),he=a=>({speech:i=>Object.assign(a,{model:i})}),fe=a=>({transcription:i=>Object.assign(a,{model:i})}),g=(a,i)=>({metadata:{id:a,...i}}),m=(...a)=>Object.assign(a[0],...a.slice(1)),be=(a,i="https://api.anthropic.com/v1/")=>m(g("anthropic"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),D=(a,i="https://api.deepseek.com/")=>m(g("deepseek"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),V=(a,i="https://api.fireworks.ai/inference/v1/")=>m(g("fireworks"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),W=(a,i="https://generativelanguage.googleapis.com/v1beta/openai/")=>m(g("google-generative-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),H=(a,i="https://api.mistral.ai/v1/")=>m(g("mistral"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),J=(a,i="https://api.moonshot.cn/v1/")=>m(g("moonshot"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),X=(a,i="https://api.novita.ai/v3/openai/")=>m(g("novita"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),E=(a,i="https://api.openai.com/v1/")=>m(g("openai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i}),he({apiKey:a,baseURL:i}),fe({apiKey:a,baseURL:i})),ye=(a,i="")=>m(g("openrouter"),{chat:(n,l)=>{const h={apiKey:a,baseURL:i,model:n};return{...l?(({extraHeaders:s,models:v,provider:u})=>{s!=null&&(h.headers??(h.headers={}),Object.assign(h.headers,s));let c;return u!=null&&(c=N(u)),N({models:v,provider:c})})(l):{},...h}}},f({apiKey:a,baseURL:i})),xe=(a,i="https://api.perplexity.ai/")=>m(g("perplexity"),_({apiKey:a,baseURL:i})),Z=(a,i="https://api.together.xyz/v1/")=>m(g("together-ai"),_({apiKey:a,baseURL:i}),w({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i,fetch:async(...n)=>globalThis.fetch(...n).then(async l=>l.json()).then(l=>Response.json({data:l,object:"list"}))})),Pe=(a,i)=>{const n=`https://api.cloudflare.com/client/v4/accounts/${i}/ai/v1/`;return m(g("workers-ai"),_({apiKey:a,baseURL:n}),w({apiKey:a,baseURL:n}))},Q=(a,i="https://api.x.ai/v1/")=>m(g("xai"),_({apiKey:a,baseURL:i}),f({apiKey:a,baseURL:i})),T=(a="http://localhost:11434/v1/")=>m(g("ollama"),_({baseURL:a}),w({baseURL:a}),f({baseURL:a})),A=(...a)=>Object.assign(a[0],...a.slice(1));class j extends Error{constructor(n,l){super(n);G(this,"response");this.name="XSAIError",this.response=l}}const ke=a=>a.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`),K=a=>Object.fromEntries(Object.entries(a).map(([i,n])=>[ke(i),n])),we=a=>Object.fromEntries(Object.entries(a).filter(([,i])=>i!==void 0)),Ke=(a,i)=>we({Authorization:i!==void 0?`Bearer ${i}`:void 0,...a}),Me=(a,i)=>{const n=i.toString();return new URL(a,n.endsWith("/")?n:`${n}/`)},Ce=async a=>{if(!a.ok)throw new j(`Remote sent ${a.status} response: ${await a.text()}`,a);if(!a.body)throw new j("Response body is empty from remote server",a);if(!(a.body instanceof ReadableStream))throw new j(`Expected Response body to be a ReadableStream, but got ${String(a.body)}; Content Type is ${a.headers.get("Content-Type")}`,a);return a},Oe=async a=>Ce(a).then(async i=>{const n=await i.text();try{return JSON.parse(n)}catch{throw new Error(`Failed to parse response, response body: ${n}`)}});var Y=(a,i="http://localhost:5933/v1/")=>{const n=({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x,seed:M,voiceSettings:C})=>({extraBody:K({applyTextNormalization:t,languageCode:s,nextRequestIds:v,nextText:u,previousRequestIds:c,previousText:y,pronunciationDictionaryLocators:x?x.map(B=>K(B)):void 0,seed:M,voiceSettings:K(C??{similarityBoost:.75,stability:.5})})});return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`elevenlabs/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=elevenlabs",...t?n(t):{},apiKey:a,baseURL:i})})},R=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{deploymentId:s,region:v,sampleRate:u}=t,c={deploymentId:s,region:v,sampleRate:u};return"disableSsml"in t?c.disableSsml=t.disableSsml:"lang"in t&&(c.lang=t.lang,c.gender=t.gender,c.voice=t.voice),{extraBody:K(c)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`microsoft/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:`region=${t==null?void 0:t.region}&provider=microsoft`,...t?n(t):{},apiKey:a,baseURL:i})})},ee=(a,i="http://localhost:5933/v1/")=>{const n=t=>{var v,u;const s={app:{appid:(v=t.app)==null?void 0:v.appId,token:a}};return typeof t.app<"u"&&(s.app={...t.app,appid:(u=t.app)==null?void 0:u.appId,token:a}),typeof t.user<"u"&&(s.user=t.user),typeof t.audio<"u"&&(s.audio=t.audio),{extraBody:K(s)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`volcengine/${t}`})},{voice:t=>(i.endsWith("v1/")?i=i.slice(0,-3):i.endsWith("v1")&&(i=i.slice(0,-2)),{query:"provider=volcengine",...t?n(t):{},apiKey:a,baseURL:i})})},ae=(a,i="http://localhost:5933/v1/")=>{const n=t=>{const{sampleRate:s,volume:v,rate:u,pitch:c}=t,y={sampleRate:s,volume:v,rate:u,pitch:c};return Object.keys(y).forEach(x=>y[x]===void 0&&delete y[x]),{extraBody:K(y)}};return A({speech:(t,s)=>({...s?n(s):{},apiKey:a,baseURL:i,model:`alibaba/${t}`})},{voice:t=>{let s=i;return s.endsWith("v1/")?s=s.slice(0,-3):s.endsWith("v1")&&(s=s.slice(0,-2)),{query:"provider=alibaba",...t?n(t):{},apiKey:a,baseURL:s}}})},q=async a=>(a.fetch??globalThis.fetch)(Me(a.query?`api/voices?${a.query}`:"api/voices",a.baseURL),{headers:Ke({...a.headers},a.apiKey),method:"GET",signal:a.abortSignal}).then(Oe).then(({voices:i})=>i);const Se=[{model_id:"eleven_multilingual_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our most life-like, emotionally rich mode in 29 languages. Best for voice overs, audiobooks, post-production, or any other content creation needs.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"ru",name:"Russian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_flash_v2_5",name:"Eleven Flash v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in 32 languages. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"hu",name:"Hungarian"},{language_id:"no",name:"Norwegian"},{language_id:"vi",name:"Vietnamese"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our high quality, low latency model in 32 languages. Best for developer use cases where speed matters and you need non-English languages.",requires_alpha_access:!1,max_characters_request_free_user:4e4,max_characters_request_subscribed_user:4e4,maximum_text_length_per_request:4e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"},{language_id:"vi",name:"Vietnamese"},{language_id:"no",name:"Norwegian"},{language_id:"hu",name:"Hungarian"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_turbo_v2",name:"Eleven Turbo v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our English-only, low latency model. Best for developer use cases where speed matters and you only need English. Performance is on par with Turbo v2.5.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_flash_v2",name:"Eleven Flash v2",can_be_finetuned:!0,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our ultra low latency model in english. Ideal for conversational use cases.",requires_alpha_access:!1,max_characters_request_free_user:3e4,max_characters_request_subscribed_user:3e4,maximum_text_length_per_request:3e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:.5},concurrency_group:"turbo"},{model_id:"eleven_english_sts_v2",name:"Eleven English v2",can_be_finetuned:!1,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our state-of-the-art speech to speech model suitable for scenarios where you need maximum control over the content and prosody of your generations.",requires_alpha_access:!1,max_characters_request_free_user:5e3,max_characters_request_subscribed_user:5e3,maximum_text_length_per_request:5e3,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_v1",name:"Eleven Multilingual v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first Multilingual model, capability of generating speech in 10 languages. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"de",name:"German"},{language_id:"pl",name:"Polish"},{language_id:"es",name:"Spanish"},{language_id:"it",name:"Italian"},{language_id:"fr",name:"French"},{language_id:"pt",name:"Portuguese"},{language_id:"hi",name:"Hindi"},{language_id:"ar",name:"Arabic"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_multilingual_sts_v2",name:"Eleven Multilingual v2",can_be_finetuned:!0,can_do_text_to_speech:!1,can_do_voice_conversion:!0,can_use_style:!0,can_use_speaker_boost:!0,serves_pro_voices:!1,token_cost_factor:1,description:"Our cutting-edge, multilingual speech-to-speech model is designed for situations that demand unparalleled control over both the content and the prosody of the generated speech across various languages.",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"},{language_id:"ja",name:"Japanese"},{language_id:"zh",name:"Chinese"},{language_id:"de",name:"German"},{language_id:"hi",name:"Hindi"},{language_id:"fr",name:"French"},{language_id:"ko",name:"Korean"},{language_id:"pt",name:"Portuguese"},{language_id:"it",name:"Italian"},{language_id:"es",name:"Spanish"},{language_id:"ru",name:"Russian"},{language_id:"id",name:"Indonesian"},{language_id:"nl",name:"Dutch"},{language_id:"tr",name:"Turkish"},{language_id:"fil",name:"Filipino"},{language_id:"pl",name:"Polish"},{language_id:"sv",name:"Swedish"},{language_id:"bg",name:"Bulgarian"},{language_id:"ro",name:"Romanian"},{language_id:"ar",name:"Arabic"},{language_id:"cs",name:"Czech"},{language_id:"el",name:"Greek"},{language_id:"fi",name:"Finnish"},{language_id:"hr",name:"Croatian"},{language_id:"ms",name:"Malay"},{language_id:"sk",name:"Slovak"},{language_id:"da",name:"Danish"},{language_id:"ta",name:"Tamil"},{language_id:"uk",name:"Ukrainian"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"},{model_id:"eleven_monolingual_v1",name:"Eleven English v1",can_be_finetuned:!1,can_do_text_to_speech:!0,can_do_voice_conversion:!1,can_use_style:!1,can_use_speaker_boost:!1,serves_pro_voices:!1,token_cost_factor:1,description:"Our first ever text to speech model. Now outclassed by Multilingual v2 (for content creation) and Turbo v2.5 (for low latency use cases).",requires_alpha_access:!1,max_characters_request_free_user:1e4,max_characters_request_subscribed_user:1e4,maximum_text_length_per_request:1e4,languages:[{language_id:"en",name:"English"}],model_rates:{character_cost_multiplier:1},concurrency_group:"standard"}],Be=ce("providers",()=>{const a=pe("settings/credentials/providers",{}),{t:i}=ue();async function n(e){try{const r=await fetch("https://openrouter.ai/api/v1/models",{headers:{Authorization:`Bearer ${e.apiKey.trim()}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`Failed to fetch OpenRouter models: ${r.statusText}`);return(await r.json()).data.map(o=>({id:o.id,name:o.name||o.id,provider:"openrouter-ai",description:o.description||"",contextLength:o.context_length,deprecated:!1}))}catch(r){throw console.error("Error fetching OpenRouter models:",r),r}}const l={"openrouter-ai":{id:"openrouter-ai",nameKey:"settings.pages.providers.provider.openrouter.title",name:"OpenRouter",descriptionKey:"settings.pages.providers.provider.openrouter.description",description:"openrouter.ai",icon:"i-lobe-icons:openrouter",defaultOptions:{baseUrl:"https://openrouter.ai/api/v1/"},createProvider:e=>ye(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>n(e)},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},ollama:{id:"ollama",nameKey:"settings.pages.providers.provider.ollama.title",name:"Ollama",descriptionKey:"settings.pages.providers.provider.ollama.description",description:"ollama.com",icon:"i-lobe-icons:ollama",defaultOptions:{baseUrl:"http://localhost:11434/v1/"},createProvider:e=>T(e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...T(e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"ollama",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.baseUrl}},vllm:{id:"vllm",nameKey:"settings.pages.providers.provider.vllm.title",name:"vLLM",descriptionKey:"settings.pages.providers.provider.vllm.description",description:"vllm.ai",iconColor:"i-lobe-icons:vllm",createProvider:e=>T(e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"llama-2-7b",name:"Llama 2 (7B)",provider:"vllm",description:"Meta's Llama 2 7B parameter model",contextLength:4096},{id:"llama-2-13b",name:"Llama 2 (13B)",provider:"vllm",description:"Meta's Llama 2 13B parameter model",contextLength:4096},{id:"llama-2-70b",name:"Llama 2 (70B)",provider:"vllm",description:"Meta's Llama 2 70B parameter model",contextLength:4096},{id:"mistral-7b",name:"Mistral (7B)",provider:"vllm",description:"Mistral AI's 7B parameter model",contextLength:8192},{id:"mixtral-8x7b",name:"Mixtral (8x7B)",provider:"vllm",description:"Mistral AI's Mixtral 8x7B MoE model",contextLength:32768},{id:"custom",name:"Custom Model",provider:"vllm",description:"Specify a custom model name",contextLength:0}]},validators:{validateProviderConfig:e=>!!e.baseUrl}},openai:{id:"openai",nameKey:"settings.pages.providers.provider.openai.title",name:"OpenAI",descriptionKey:"settings.pages.providers.provider.openai.description",description:"openai.com",icon:"i-lobe-icons:openai",defaultOptions:{baseUrl:"https://api.openai.com/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"openai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},anthropic:{id:"anthropic",nameKey:"settings.pages.providers.provider.anthropic.title",name:"Anthropic",descriptionKey:"settings.pages.providers.provider.anthropic.description",description:"anthropic.com",icon:"i-lobe-icons:anthropic",defaultOptions:{baseUrl:"https://api.anthropic.com/v1/"},createProvider:e=>be(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"claude-3-7-sonnet-20250219",name:"Claude 3.7 Sonnet",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20241022",name:"Claude 3.5 Sonnet (New)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-haiku-20241022",name:"Claude 3.5 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-5-sonnet-20240620",name:"Claude 3.5 Sonnet (Old)",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-haiku-20240307",name:"Claude 3 Haiku",provider:"anthropic",description:"",contextLength:0,deprecated:!1},{id:"claude-3-opus-20240229",name:"Claude 3 Opus",provider:"anthropic",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"google-generative-ai":{id:"google-generative-ai",nameKey:"settings.pages.providers.provider.google-generative-ai.title",name:"Google Gemini",descriptionKey:"settings.pages.providers.provider.google-generative-ai.description",description:"ai.google.dev",icon:"i-lobe-icons:gemini",defaultOptions:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai/"},createProvider:e=>W(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...W(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"google-generative-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},xai:{id:"xai",nameKey:"settings.pages.providers.provider.xai.title",name:"xAI",descriptionKey:"settings.pages.providers.provider.xai.description",description:"x.ai",icon:"i-lobe-icons:xai",createProvider:e=>Q(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Q(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"xai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},deepseek:{id:"deepseek",nameKey:"settings.pages.providers.provider.deepseek.title",name:"DeepSeek",descriptionKey:"settings.pages.providers.provider.deepseek.description",description:"deepseek.com",iconColor:"i-lobe-icons:deepseek",createProvider:e=>D(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...D(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"deepseek",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},elevenlabs:{id:"elevenlabs",nameKey:"settings.pages.providers.provider.elevenlabs.title",name:"ElevenLabs",descriptionKey:"settings.pages.providers.provider.elevenlabs.description",description:"elevenlabs.io",icon:"i-simple-icons:elevenlabs",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/",voiceSettings:{similarityBoost:.75,stability:.5}},createProvider:e=>Y(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>Se.map(e=>({id:e.model_id,name:e.name,provider:"elevenlabs",description:e.description,contextLength:0,deprecated:!1})),listVoices:async e=>{const r=Y(e.apiKey.trim(),e.baseUrl.trim()),d=await q({...r.voice()}),o=d.findIndex(P=>P.name.includes("Aria")),p=d.findIndex(P=>P.name.includes("Bill")),I=o!==-1?o:0,F=p!==-1?p:d.length-1,z=Math.min(I,F),L=Math.max(I,F);return[...d.slice(0,z),...d.slice(L+1),...d.slice(z,L+1)].map(P=>({id:P.id,name:P.name,provider:"elevenlabs",previewURL:P.preview_audio_url,languages:P.languages}))}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"microsoft-speech":{id:"microsoft-speech",nameKey:"settings.pages.providers.provider.microsoft-speech.title",name:"Microsoft / Azure Speech",descriptionKey:"settings.pages.providers.provider.microsoft-speech.description",description:"speech.microsoft.com",iconColor:"i-lobe-icons:microsoft",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>R(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"v1",name:"v1",provider:"microsoft-speech",description:"",contextLength:0,deprecated:!1}],listVoices:async e=>{const r=R(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice({region:e.region})})).map(o=>{var p;return{id:o.id,name:o.name,provider:"microsoft-speech",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})}},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"alibaba-cloud-model-studio":{id:"alibaba-cloud-model-studio",nameKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.title",name:"Alibaba Cloud Model Studio",descriptionKey:"settings.pages.providers.provider.alibaba-cloud-model-studio.description",description:"bailian.console.aliyun.com",iconColor:"i-lobe-icons:alibabacloud",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ae(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ae(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"alibaba-cloud-model-studio",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"cozyvoice-v1",name:"CozyVoice",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1},{id:"cozyvoice-v2",name:"CozyVoice (New)",provider:"alibaba-cloud-model-studio",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},volcengine:{id:"volcengine",nameKey:"settings.pages.providers.provider.volcengine.title",name:"settings.pages.providers.provider.volcengine.title",descriptionKey:"settings.pages.providers.provider.volcengine.description",description:"volcengine.com",iconColor:"i-lobe-icons:volcengine",defaultOptions:{baseUrl:"https://unspeech.hyp3r.link/v1/"},createProvider:e=>ee(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listVoices:async e=>{const r=ee(e.apiKey.trim(),e.baseUrl.trim());return(await q({...r.voice()})).map(o=>{var p;return{id:o.id,name:o.name,provider:"volcano-engine",previewURL:o.preview_audio_url,languages:o.languages,gender:(p=o.labels)==null?void 0:p.gender}})},listModels:async()=>[{id:"v1",name:"v1",provider:"volcano-engine",description:"",contextLength:0,deprecated:!1}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl&&!!e.app&&!!e.app.appId}},"together-ai":{id:"together-ai",nameKey:"settings.pages.providers.provider.together.title",name:"Together.ai",descriptionKey:"settings.pages.providers.provider.together.description",description:"together.ai",iconColor:"i-lobe-icons:together",createProvider:e=>Z(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...Z(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"together-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"novita-ai":{id:"novita-ai",nameKey:"settings.pages.providers.provider.novita.title",name:"Novita",descriptionKey:"settings.pages.providers.provider.novita.description",description:"novita.ai",iconColor:"i-lobe-icons:novita",createProvider:e=>X(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...X(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"novita-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"fireworks-ai":{id:"fireworks-ai",nameKey:"settings.pages.providers.provider.fireworks.title",name:"Fireworks.ai",descriptionKey:"settings.pages.providers.provider.fireworks.description",description:"fireworks.ai",icon:"i-lobe-icons:fireworks",createProvider:e=>V(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...V(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"fireworks-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"featherless-ai":{id:"featherless-ai",nameKey:"settings.pages.providers.provider.featherless.title",name:"Featherless.ai",descriptionKey:"settings.pages.providers.provider.featherless.description",description:"featherless.ai",icon:"i-lobe-icons:featherless-ai",defaultOptions:{baseUrl:"https://api.featherless.ai/v1/"},createProvider:e=>E(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...E(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"featherless-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"cloudflare-workers-ai":{id:"cloudflare-workers-ai",nameKey:"settings.pages.providers.provider.cloudflare-workers-ai.title",name:"Cloudflare Workers AI",descriptionKey:"settings.pages.providers.provider.cloudflare-workers-ai.description",description:"cloudflare.com",iconColor:"i-lobe-icons:cloudflare",createProvider:e=>Pe(e.apiKey.trim(),e.accountId),capabilities:{listModels:async()=>[]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.accountId}},"perplexity-ai":{id:"perplexity-ai",nameKey:"settings.pages.providers.provider.perplexity.title",name:"Perplexity",descriptionKey:"settings.pages.providers.provider.perplexity.description",description:"perplexity.ai",icon:"i-lobe-icons:perplexity",defaultOptions:{baseUrl:"https://api.perplexity.ai"},createProvider:e=>xe(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async()=>[{id:"sonar-small-online",name:"Sonar Small (Online)",provider:"perplexity-ai",description:"Efficient model with online search capabilities",contextLength:12e3},{id:"sonar-medium-online",name:"Sonar Medium (Online)",provider:"perplexity-ai",description:"Balanced model with online search capabilities",contextLength:12e3},{id:"sonar-large-online",name:"Sonar Large (Online)",provider:"perplexity-ai",description:"Powerful model with online search capabilities",contextLength:12e3},{id:"codey-small",name:"Codey Small",provider:"perplexity-ai",description:"Specialized for code generation and understanding",contextLength:12e3},{id:"codey-large",name:"Codey Large",provider:"perplexity-ai",description:"Advanced code generation and understanding",contextLength:12e3}]},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"mistral-ai":{id:"mistral-ai",nameKey:"settings.pages.providers.provider.mistral.title",name:"Mistral",descriptionKey:"settings.pages.providers.provider.mistral.description",description:"mistral.ai",iconColor:"i-lobe-icons:mistral",createProvider:e=>H(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...H(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"mistral-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}},"moonshot-ai":{id:"moonshot-ai",nameKey:"settings.pages.providers.provider.moonshot.title",name:"Moonshot AI",descriptionKey:"settings.pages.providers.provider.moonshot.description",description:"moonshot.ai",icon:"i-lobe-icons:moonshot",createProvider:e=>J(e.apiKey.trim(),e.baseUrl.trim()),capabilities:{listModels:async e=>(await b({...J(e.apiKey.trim(),e.baseUrl.trim()).model()})).map(r=>({id:r.id,name:r.id,provider:"moonshot-ai",description:"",contextLength:0,deprecated:!1}))},validators:{validateProviderConfig:e=>!!e.apiKey&&!!e.baseUrl}}};async function h(e){const r=a.value[e];if(!r)return!1;const d=l[e];return d?await d.validators.validateProviderConfig(r):!1}const t=U({});function s(e){var r;if(!a.value[e]){const d=l[e];a.value[e]={baseUrl:((r=d.defaultOptions)==null?void 0:r.baseUrl)||""}}}Object.keys(l).forEach(s);async function v(){await Promise.all(Object.keys(l).map(async e=>{t.value[e]=await h(e)}))}v(),ge(a,v,{deep:!0});const u=k(()=>Object.keys(l).filter(e=>t.value[e])),c=U({}),y=U({}),x=U({});async function M(e){const r=a.value[e];if(!r)return[];const d=l[e];if(!d)return[];y.value[e]=!0,x.value[e]=null;try{const o=d.capabilities.listModels?await d.capabilities.listModels(r):[];return c.value[e]=o.map(p=>({id:p.id,name:p.name,description:p.description,contextLength:p.contextLength,deprecated:p.deprecated,provider:e})),c.value[e]}catch(o){return console.error(`Error fetching models for ${e}:`,o),x.value[e]=o instanceof Error?o.message:"Unknown error",[]}finally{y.value[e]=!1}}function C(e){return c.value[e]||[]}const B=k(()=>{const e=[];for(const r of u.value)e.push(...c.value[r]||[]);return e});async function ie(){for(const e of u.value)l[e].capabilities.listModels&&await M(e)}function $(e){const r=l[e];if(!r)throw new Error(`Provider metadata for ${e} not found`);return{...r,localizedName:i(r.nameKey,r.name),localizedDescription:i(r.descriptionKey,r.description)}}const re=k(()=>Object.values(l).map(e=>({...e,localizedName:i(e.nameKey,e.name),localizedDescription:i(e.descriptionKey,e.description),configured:t.value[e.id]||!1})));function O(e){const r=a.value[e];if(!r)throw new Error(`Provider credentials for ${e} not found`);const d=l[e];if(!d)throw new Error(`Provider metadata for ${e} not found`);try{return d.createProvider(r)}catch(o){throw console.error(`Error creating provider instance for ${e}:`,o),o}}const S=k(()=>u.value.map(e=>$(e))),te=k(()=>S.value.filter(e=>{const r=O(e.id);return"chat"in r&&typeof r.chat=="function"})),ne=k(()=>S.value.filter(e=>{const r=O(e.id);return"transcription"in r&&typeof r.transcription=="function"})),se=k(()=>S.value.filter(e=>{const r=O(e.id);return"speech"in r&&typeof r.speech=="function"}));function oe(e){return a.value[e]}return{providers:a,getProviderConfig:oe,availableProviders:u,configuredProviders:t,providerMetadata:l,getProviderMetadata:$,allProvidersMetadata:re,initializeProvider:s,validateProvider:h,availableModels:c,isLoadingModels:y,modelLoadError:x,fetchModelsForProvider:M,getModelsForProvider:C,allAvailableModels:B,loadModelsForConfiguredProviders:ie,getProviderInstance:O,availableProvidersMetadata:S,availableTextGenerationsProvidersMetadata:te,availableAudioSpeechProvidersMetadata:se,availableAudioTranscriptionProvidersMetadata:ne}});export{b as l,Be as u}; diff --git a/assets/queue-BuTiRx_t.js b/assets/queue-B-z77HZh.js similarity index 90% rename from assets/queue-BuTiRx_t.js rename to assets/queue-B-z77HZh.js index d4189c1a04ce20fd7aac9c6158880dfd00250511..2c02112769236549fb8f9a1175e512965d59c96b 100644 --- a/assets/queue-BuTiRx_t.js +++ b/assets/queue-B-z77HZh.js @@ -1 +1 @@ -import{u as o}from"./queue-D8d866Tb.js";import{d as v,r as h,f as k,c as w,o as g,a as I}from"./index-5LjD1Eoi.js";const Q=v({__name:"queue",setup(P){function i(e){return new Promise(a=>setTimeout(a,e))}const n=h(""),d=o({handlers:[async e=>{console.log("ready to play speech audio for",e)}]}),u=o({handlers:[async e=>{console.log("ready to stream speech audio for",e),d.add(e.data)}]}),c=o({handlers:[async e=>{const a=[".","?","!"];let s=!1;for(const t of a){if(!e.data.includes(t))continue;const r=e.data.indexOf(t),p=e.data.slice(0,r+1),y=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=y,s=!0}s||(n.value+=e.data)}]}),l=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of l)await i(100),c.add(e)}async function m(){f()}return k(()=>{m()}),(e,a)=>(g(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; +import{u as o}from"./queue-DDsFBepK.js";import{d as v,r as h,f as k,c as w,o as g,a as I}from"./index-DCMFRrFG.js";const Q=v({__name:"queue",setup(P){function i(e){return new Promise(a=>setTimeout(a,e))}const n=h(""),d=o({handlers:[async e=>{console.log("ready to play speech audio for",e)}]}),u=o({handlers:[async e=>{console.log("ready to stream speech audio for",e),d.add(e.data)}]}),c=o({handlers:[async e=>{const a=[".","?","!"];let s=!1;for(const t of a){if(!e.data.includes(t))continue;const r=e.data.indexOf(t),p=e.data.slice(0,r+1),y=e.data.slice(r+1);n.value+=p,u.add(n.value.trim()),n.value=y,s=!0}s||(n.value+=e.data)}]}),l=["Hello"," N","eko","! I"," am"," an"," AI"," assistant"," trained"," to"," help"," with"," a"," variety"," of"," tasks"," such"," as"," answering"," questions",","," providing"," information",","," giving"," recommendations",","," and"," more",". How"," can"," I"," assist"," you"," today","?","Hello"," N","eko",","," I"," am"," an"," AI"," assistant","."," I"," can"," help"," answer"," questions",","," provide"," information",","," assist"," with"," tasks",","," and"," engage"," in"," conversation","."," How"," can"," I"," assist"," you"," today","?"];async function f(){for(const e of l)await i(100),c.add(e)}async function m(){f()}return k(()=>{m()}),(e,a)=>(g(),w("div",null,a[0]||(a[0]=[I("div",null,null,-1)])))}});export{Q as default}; diff --git a/assets/queue-D8d866Tb.js b/assets/queue-DDsFBepK.js similarity index 91% rename from assets/queue-D8d866Tb.js rename to assets/queue-DDsFBepK.js index 7255f22a9624cfdea201e4adc9a9a12991ce2456..7468a1f49648057a29a1997b8140f20feee79a50 100644 --- a/assets/queue-D8d866Tb.js +++ b/assets/queue-DDsFBepK.js @@ -1 +1 @@ -import{r as l}from"./index-5LjD1Eoi.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u}; +import{r as l}from"./index-DCMFRrFG.js";function m(f){const t=l([]),a=l(!1),d={add:[],pick:[],processing:[],error:[],processed:[],done:[]},s={};function c(n,e){d[n].push(e)}function r(n,...e){d[n].forEach(i=>{i(...e)})}function h(n,e){s[n]=s[n]||[],s[n].push(e)}function p(n,...e){(s[n]||[]).forEach(i=>{i(...e)})}async function v(n){t.value.push(n),r("add",n)}function E(){const n=t.value.shift();if(n)return r("pick",n),n}async function u(){if(a.value)return;const n=E();if(n){a.value=!0;for(const e of f.handlers){r("processing",n,e);try{const o=await e({data:n,itemsToBeProcessed:()=>t.value.length,emit:p});r("processed",n,o,e)}catch(o){r("error",n,o,e);continue}}a.value=!1,r("done",n),t.value.length>0&&u()}}return c("add",u),c("done",u),{add:v,on:c,onHandlerEvent:h,queue:t}}export{m as u}; diff --git a/assets/queues-L5OE-bsn.js b/assets/queues-xZ787FAF.js similarity index 94% rename from assets/queues-L5OE-bsn.js rename to assets/queues-xZ787FAF.js index 4d6674b20566ed71cd5b748c8251f4fb65eccad4..3f8c8edc1a5c12425af74f7b18ad87784a691cca 100644 --- a/assets/queues-L5OE-bsn.js +++ b/assets/queues-xZ787FAF.js @@ -1 +1 @@ -import{e as i}from"./emotions-CAex_2dA.js";import{u as s}from"./queue-D8d866Tb.js";import{r as d}from"./index-5LjD1Eoi.js";const l="<|llm_inference_end|>";function y(o){function t(e){for(const n of i)if(e.includes(n))return{ok:!0,emotion:n};return{ok:!1,emotion:""}}return s({handlers:[async e=>{if(i.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:n,emotion:a}=t(e.data);n&&(e.emit("emotion",a),await o.add(a))}}]})}function k(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const n=/<\|DELAY:(\d+)\|>/i.exec(e),a=n==null?void 0:n[1];if(!a)return{ok:!1,delay:0};const r=Number.parseFloat(a);return r<=0||Number.isNaN(r)?{ok:!0,delay:0}:{ok:!0,delay:r}}function t(e){return new Promise(n=>setTimeout(n,e))}return s({handlers:[async e=>{const{ok:n,delay:a}=o(e.data);n&&(e.emit("delay",a),await t(a*1e3))}]})}function p(o){const t=d("");return s({handlers:[async e=>{if(e.data===l){const a=t.value.trim();a&&await o.add(a),t.value="";return}const n=/[.?!]/;for(t.value+=e.data;t.value;){const a=n.exec(t.value);if(!a||typeof a.index>"u")break;const r=t.value.slice(0,a.index+1),u=t.value.slice(a.index+1);await o.add(r),t.value=u}}]})}export{y as a,k as b,l,p as u}; +import{e as i}from"./emotions-CAex_2dA.js";import{u as s}from"./queue-DDsFBepK.js";import{r as d}from"./index-DCMFRrFG.js";const l="<|llm_inference_end|>";function y(o){function t(e){for(const n of i)if(e.includes(n))return{ok:!0,emotion:n};return{ok:!1,emotion:""}}return s({handlers:[async e=>{if(i.includes(e.data)){e.emit("emotion",e.data),await o.add(e.data);return}{const{ok:n,emotion:a}=t(e.data);n&&(e.emit("emotion",a),await o.add(a))}}]})}function k(){function o(e){if(!/<\|DELAY:\d+\|>/i.test(e))return{ok:!1,delay:0};const n=/<\|DELAY:(\d+)\|>/i.exec(e),a=n==null?void 0:n[1];if(!a)return{ok:!1,delay:0};const r=Number.parseFloat(a);return r<=0||Number.isNaN(r)?{ok:!0,delay:0}:{ok:!0,delay:r}}function t(e){return new Promise(n=>setTimeout(n,e))}return s({handlers:[async e=>{const{ok:n,delay:a}=o(e.data);n&&(e.emit("delay",a),await t(a*1e3))}]})}function p(o){const t=d("");return s({handlers:[async e=>{if(e.data===l){const a=t.value.trim();a&&await o.add(a),t.value="";return}const n=/[.?!]/;for(t.value+=e.data;t.value;){const a=n.exec(t.value);if(!a||typeof a.index>"u")break;const r=t.value.slice(0,a.index+1),u=t.value.slice(a.index+1);await o.add(r),t.value=u}}]})}export{y as a,k as b,l,p as u}; diff --git a/assets/settings-DAzbwih-.js b/assets/settings-Y9Sl4QEx.js similarity index 91% rename from assets/settings-DAzbwih-.js rename to assets/settings-Y9Sl4QEx.js index c0480048e111754b4c5d1fc8a6c11e705c1666a7..2ae6bff31d9c956c5d5185762386eaba786a30aa 100644 --- a/assets/settings-DAzbwih-.js +++ b/assets/settings-Y9Sl4QEx.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as x,r as p,e as h,f as w,g as k,w as R,c as d,a as n,u as m,h as $,i as y,t as f,o as g,j as _,k as H,s as M,l as b,b as v,m as B,R as V}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as C}from"./providers-CIeQW25J.js";/* empty css */import{H as N}from"./HeaderLink-Bp3oK7dP.js";import"./index-LHmcipjy.js";const P={relative:""},S={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},L={text:"neutral-300 dark:neutral-500","text-nowrap":""},T={"text-nowrap":"","text-3xl":"","font-semibold":""},j=x({__name:"PageHeader",props:{title:null,subtitle:null},setup(c){const s=c,t=$(),u=_(),l=p(),o=p(s.title),i=p(s.subtitle),{apply:e}=h(l,{initial:{opacity:0,x:10,transition:{duration:250}},enter:{opacity:1,x:0,transition:{duration:250}},leave:{opacity:0,x:-5,transition:{duration:100}}});return w(async()=>{await e("initial"),await e("enter")}),k(async()=>{await e("leave")}),R([()=>s.title,()=>s.subtitle,u],async()=>{await e("leave"),o.value=s.title,i.value=s.subtitle,await e("initial"),await e("enter")}),(r,a)=>(g(),d("div",{ref_key:"pageHeaderRef",ref:l,style:{top:"env(safe-area-inset-top, 0px)",right:"env(safe-area-inset-right, 0px)",left:"env(safe-area-inset-left, 0px)"},sticky:"","inset-x-0":"","top-0":"","z-99":"","w-full":"","pb-6":"","pt-10":"",flex:"~ row items-center gap-2",bg:"$bg-color"},[n("button",{onClick:a[0]||(a[0]=I=>m(t).back())},a[1]||(a[1]=[n("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),n("h1",P,[i.value?(g(),d("div",S,[n("span",L,f(i.value),1)])):y("",!0),n("div",T,f(o.value),1)])],512))}}),z={style:{paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingTop:"env(safe-area-inset-top, 0px)",paddingRight:"env(safe-area-inset-right, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)"}},D={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},E={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},Q=x({__name:"settings",setup(c){const s=_(),{t}=H(),u=C(),{allProvidersMetadata:l}=M(u),o=b(()=>{var r;const e={"/settings/airi-card":{subtitle:t("settings.title"),title:t("settings.pages.card.title")},"/settings/appearance":{subtitle:t("settings.title"),title:t("settings.pages.themes.title")},"/settings/memory":{subtitle:t("settings.title"),title:t("settings.pages.memory.title")},"/settings/models":{subtitle:t("settings.title"),title:t("settings.pages.models.title")},"/settings/modules":{subtitle:t("settings.title"),title:t("settings.pages.modules.title")},"/settings/modules/consciousness":{subtitle:t("settings.title"),title:t("settings.pages.modules.consciousness.title")},"/settings/modules/speech":{subtitle:t("settings.title"),title:t("settings.pages.modules.speech.title")},"/settings/modules/hearing":{subtitle:t("settings.title"),title:t("settings.pages.modules.hearing.title")},"/settings/modules/memory-short-term":{subtitle:t("settings.title"),title:t("settings.pages.modules.memory-short-term.title")},"/settings/modules/memory-long-term":{subtitle:t("settings.title"),title:t("settings.pages.modules.memory-long-term.title")},"/settings/modules/messaging-discord":{subtitle:t("settings.title"),title:t("settings.pages.modules.messaging-discord.title")},"/settings/modules/x":{subtitle:t("settings.title"),title:t("settings.pages.modules.x.title")},"/settings/modules/gaming-minecraft":{subtitle:t("settings.title"),title:t("settings.pages.modules.gaming-minecraft.title")},"/settings/modules/gaming-factorio":{subtitle:t("settings.title"),title:t("settings.pages.modules.gaming-factorio.title")},"/settings/providers":{subtitle:t("settings.title"),title:t("settings.pages.providers.title")},"/settings/scene":{subtitle:t("settings.title"),title:t("settings.pages.scene.title")},"/settings":{title:t("settings.title")}};for(const a in l.value)e[`/settings/providers/${a}`]={subtitle:t("settings.title"),title:t((r=l.value[a])==null?void 0:r.nameKey)};return e}),i=b(()=>o.value[s.path]);return(e,r)=>(g(),d("div",z,[n("div",D,[v(N)]),n("div",E,[i.value?(g(),B(m(j),{key:0,title:i.value.title,subtitle:i.value.subtitle},null,8,["title","subtitle"])):y("",!0),v(m(V))])]))}});export{Q as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as x,r as p,e as h,f as w,g as k,w as R,c as d,a as n,u as m,h as $,i as y,t as f,o as g,j as _,k as H,s as M,l as b,b as v,m as B,R as V}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as C}from"./providers-DHuI5XmA.js";/* empty css */import{H as N}from"./HeaderLink-DPXtT-kx.js";import"./index-LHmcipjy.js";const P={relative:""},S={key:0,absolute:"","left-0":"","top-0":"","translate-y":"[-80%]"},L={text:"neutral-300 dark:neutral-500","text-nowrap":""},T={"text-nowrap":"","text-3xl":"","font-semibold":""},j=x({__name:"PageHeader",props:{title:null,subtitle:null},setup(c){const s=c,t=$(),u=_(),l=p(),o=p(s.title),i=p(s.subtitle),{apply:e}=h(l,{initial:{opacity:0,x:10,transition:{duration:250}},enter:{opacity:1,x:0,transition:{duration:250}},leave:{opacity:0,x:-5,transition:{duration:100}}});return w(async()=>{await e("initial"),await e("enter")}),k(async()=>{await e("leave")}),R([()=>s.title,()=>s.subtitle,u],async()=>{await e("leave"),o.value=s.title,i.value=s.subtitle,await e("initial"),await e("enter")}),(r,a)=>(g(),d("div",{ref_key:"pageHeaderRef",ref:l,style:{top:"env(safe-area-inset-top, 0px)",right:"env(safe-area-inset-right, 0px)",left:"env(safe-area-inset-left, 0px)"},sticky:"","inset-x-0":"","top-0":"","z-99":"","w-full":"","pb-6":"","pt-10":"",flex:"~ row items-center gap-2",bg:"$bg-color"},[n("button",{onClick:a[0]||(a[0]=I=>m(t).back())},a[1]||(a[1]=[n("div",{"i-solar:alt-arrow-left-line-duotone":"","text-2xl":""},null,-1)])),n("h1",P,[i.value?(g(),d("div",S,[n("span",L,f(i.value),1)])):y("",!0),n("div",T,f(o.value),1)])],512))}}),z={style:{paddingBottom:"env(safe-area-inset-bottom, 0px)",paddingTop:"env(safe-area-inset-top, 0px)",paddingRight:"env(safe-area-inset-right, 0px)",paddingLeft:"env(safe-area-inset-left, 0px)"}},D={class:"px-0 py-1 md:px-3 md:py-3","w-full":"","gap-2":"",bg:"$bg-color"},E={class:"px-3 py-2 md:px-5 md:py-5",flex:"~ col","mx-auto":"","max-w-screen-xl":""},Q=x({__name:"settings",setup(c){const s=_(),{t}=H(),u=C(),{allProvidersMetadata:l}=M(u),o=b(()=>{var r;const e={"/settings/airi-card":{subtitle:t("settings.title"),title:t("settings.pages.card.title")},"/settings/appearance":{subtitle:t("settings.title"),title:t("settings.pages.themes.title")},"/settings/memory":{subtitle:t("settings.title"),title:t("settings.pages.memory.title")},"/settings/models":{subtitle:t("settings.title"),title:t("settings.pages.models.title")},"/settings/modules":{subtitle:t("settings.title"),title:t("settings.pages.modules.title")},"/settings/modules/consciousness":{subtitle:t("settings.title"),title:t("settings.pages.modules.consciousness.title")},"/settings/modules/speech":{subtitle:t("settings.title"),title:t("settings.pages.modules.speech.title")},"/settings/modules/hearing":{subtitle:t("settings.title"),title:t("settings.pages.modules.hearing.title")},"/settings/modules/memory-short-term":{subtitle:t("settings.title"),title:t("settings.pages.modules.memory-short-term.title")},"/settings/modules/memory-long-term":{subtitle:t("settings.title"),title:t("settings.pages.modules.memory-long-term.title")},"/settings/modules/messaging-discord":{subtitle:t("settings.title"),title:t("settings.pages.modules.messaging-discord.title")},"/settings/modules/x":{subtitle:t("settings.title"),title:t("settings.pages.modules.x.title")},"/settings/modules/gaming-minecraft":{subtitle:t("settings.title"),title:t("settings.pages.modules.gaming-minecraft.title")},"/settings/modules/gaming-factorio":{subtitle:t("settings.title"),title:t("settings.pages.modules.gaming-factorio.title")},"/settings/providers":{subtitle:t("settings.title"),title:t("settings.pages.providers.title")},"/settings/scene":{subtitle:t("settings.title"),title:t("settings.pages.scene.title")},"/settings":{title:t("settings.title")}};for(const a in l.value)e[`/settings/providers/${a}`]={subtitle:t("settings.title"),title:t((r=l.value[a])==null?void 0:r.nameKey)};return e}),i=b(()=>o.value[s.path]);return(e,r)=>(g(),d("div",z,[n("div",D,[v(N)]),n("div",E,[i.value?(g(),B(m(j),{key:0,title:i.value.title,subtitle:i.value.subtitle},null,8,["title","subtitle"])):y("",!0),v(m(V))])]))}});export{Q as default}; diff --git a/assets/speech-BYL-UWPg.js b/assets/speech-Bc-BAopv.js similarity index 98% rename from assets/speech-BYL-UWPg.js rename to assets/speech-Bc-BAopv.js index 26c59a689d29583e715166be88c69ec8d2a61e71..023cc252874f58dd32d0ab6c1b426caa8be0ff94 100644 --- a/assets/speech-BYL-UWPg.js +++ b/assets/speech-Bc-BAopv.js @@ -1,2 +1,2 @@ -import{v as te,bG as g,r as b,l as p,w as P,f as re}from"./index-5LjD1Eoi.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-CIeQW25J.js";const ie=async e=>(e.fetch??globalThis.fetch)(ne("audio/speech",e.baseURL),{body:oe(e),headers:ae({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(se).then(async t=>t.arrayBuffer()),ue=/["&'<>`]/g,le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,de=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,me=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function D(e,t){if(e=e.replace(t.subset?fe(t.subset):ue,n),t.subset||t.escapeOnly)return e;return e.replace(le,r).replace(de,n);function r(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function n(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function fe(e){let t=U.get(e);return t||(t=ge(e),U.set(e,t)),t}function ge(e){const t=[];let r=-1;for(;++r",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Se=["cent","copy","divide","gt","lt","not","para","times"],j={}.hasOwnProperty,L={};let S;for(S in C)j.call(C,S)&&(L[C[S]]=S);const xe=/[^\dA-Za-z]/;function Ee(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&be.includes(s)&&!Se.includes(s)&&(!n||t&&t!==61&&xe.test(String.fromCharCode(t)))?l:l+";"}return""}function we(e,t,r){let n=he(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=Ee(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ye(e,t,r.omitOptionalSemicolons);s.length/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` +import{v as te,bG as g,r as b,l as p,w as P,f as re}from"./index-DCMFRrFG.js";import{r as ne,a as ae,b as oe,d as se}from"./index-LHmcipjy.js";import{u as ce}from"./providers-DHuI5XmA.js";const ie=async e=>(e.fetch??globalThis.fetch)(ne("audio/speech",e.baseURL),{body:oe(e),headers:ae({"Content-Type":"application/json",...e.headers},e.apiKey),method:"POST",signal:e.abortSignal}).then(se).then(async t=>t.arrayBuffer()),ue=/["&'<>`]/g,le=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,de=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,me=/[|\\{}()[\]^$+*?.]/g,U=new WeakMap;function D(e,t){if(e=e.replace(t.subset?fe(t.subset):ue,n),t.subset||t.escapeOnly)return e;return e.replace(le,r).replace(de,n);function r(a,s,l){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,l.charCodeAt(s+2),t)}function n(a,s,l){return t.format(a.charCodeAt(0),l.charCodeAt(s+1),t)}}function fe(e){let t=U.get(e);return t||(t=ge(e),U.set(e,t)),t}function ge(e){const t=[];let r=-1;for(;++r",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Se=["cent","copy","divide","gt","lt","not","para","times"],j={}.hasOwnProperty,L={};let S;for(S in C)j.call(C,S)&&(L[C[S]]=S);const xe=/[^\dA-Za-z]/;function Ee(e,t,r,n){const a=String.fromCharCode(e);if(j.call(L,a)){const s=L[a],l="&"+s;return r&&be.includes(s)&&!Se.includes(s)&&(!n||t&&t!==61&&xe.test(String.fromCharCode(t)))?l:l+";"}return""}function we(e,t,r){let n=he(e,t,r.omitOptionalSemicolons),a;if((r.useNamedReferences||r.useShortestReferences)&&(a=Ee(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!a)&&r.useShortestReferences){const s=ye(e,t,r.omitOptionalSemicolons);s.length/g,Te=[">"];function Le(e){return""}function Me(e){return""}const Re=[" ",` `," ",'"',"&","'","/","<","=",">"];function x(e){return y(e,Re)}function F(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,a=r.indexOf(t);for(;a!==-1;)n++,a=r.indexOf(t,a+t.length);return n}function M(e,t){const r=String(e);let n=t.options.quote||'"';if(t.options.quoteSmart){const a=n==='"'?"'":'"';F(r,n)>F(r,a)&&(n=a)}return n+y(r,["<","&",n])+n}function $e(e,t){const r=x(e.name),n=e.public,a=e.system;let s=""}const Ue={}.hasOwnProperty;function Fe(e,t){const r=x(e.name),n=k(e,t),a=e.attributes||{},s=n?!1:t.options.closeEmptyElements,l=[];let h;for(h in a)if(Ue.call(a,h)){const f=a[h];f!=null&&l.push(x(h)+"="+M(f,t))}return"<"+r+(l.length===0?"":" "+l.join(" "))+(s?(t.options.tightClose?"":" ")+"/":"")+">"+n+(s?"":"")}const Ne=/\?>/g,De=[">"];function je(e){const t=x(e.name)||"x",r=y(e.value,De,Ne);return""}const Ie=["&","<"];function I(e){return y(e.value,Ie)}function ze(e,t){return t.options.allowDangerousXml?e.value:I(e)}const ke={}.hasOwnProperty,N={cdata:Le,comment:Me,doctype:$e,element:Fe,instruction:je,raw:ze,root:k,text:I};function z(e,t){const r=e&&e.type;if(!r)throw new Error("Expected node, not `"+e+"`");if(!ke.call(N,r))throw new Error("Cannot compile unknown node `"+r+"`");const n=N[r];return n(e,t)}function k(e,t){const r=e&&e.children||[];let n=-1;const a=[];for(;++n{const e=ce(),t=g("settings/speech/active-provider",""),r=g("settings/speech/active-model","eleven_multilingual_v2"),n=g("settings/speech/voice",""),a=b(),s=g("settings/speech/pitch",0),l=g("settings/speech/rate",1),h=g("settings/speech/ssml-enabled",!1),f=b(!1),E=b(null),v=b({}),B=g("settings/speech/language","en-US"),w=b(""),H=p(()=>e.availableProviders.filter(o=>O(o)).map(o=>e.getProviderMetadata(o))),V=p(()=>{var o;return((o=e.getProviderMetadata(t.value))==null?void 0:o.capabilities.listModels)!==void 0}),A=p(()=>e.getModelsForProvider(t.value)),Y=p(()=>e.isLoadingModels[t.value]||!1),G=p(()=>e.modelLoadError[t.value]||null),X=p(()=>{if(!w.value.trim())return A.value;const o=w.value.toLowerCase().trim();return A.value.filter(c=>c.name.toLowerCase().includes(o)||c.id.toLowerCase().includes(o)||c.description&&c.description.toLowerCase().includes(o))}),_=p(()=>["elevenlabs","microsoft-speech","azure-speech","google","alibaba-cloud-model-studio","volcengine"].includes(t.value));function O(o){return["elevenlabs","microsoft-speech","azure-speech","google","amazon","alibaba-cloud-model-studio","volcengine"].includes(o)}async function q(o){var c,i;if(!o||!O(o))return[];f.value=!0,E.value=null;try{const u=await((i=(c=e.getProviderMetadata(o).capabilities).listVoices)==null?void 0:i.call(c,e.getProviderConfig(o)))||[];return v.value[o]=u,u}catch(u){return console.error(`Error fetching voices for ${o}:`,u),E.value=u instanceof Error?u.message:"Unknown error",[]}finally{f.value=!1}}function K(o){return v.value[o]||[]}P(t,async o=>{o&&await q(o)}),re(()=>{q(t.value).then(()=>{var o;n.value&&(a.value=(o=v.value[t.value])==null?void 0:o.find(c=>c.id===n.value))})}),P(n,o=>{var c;o&&(a.value=(c=v.value[t.value])==null?void 0:c.find(i=>i.id===o))},{immediate:!0}),P(v,o=>{var c;n.value&&(a.value=(c=o[t.value])==null?void 0:c.find(i=>i.id===n.value))},{immediate:!0});async function Q(o,c,i,u,m={}){return await ie({...o.speech(c,{...m}),input:i,voice:u})}function Z(o,c,i){var $;const u=i==null?void 0:i.pitch,m=i==null?void 0:i.speed,d=i==null?void 0:i.volume,W={pitch:u!=null?u>0?`+${u}%`:`-${u}%`:void 0,rate:m!=null?m!==1?`${m}`:"1":void 0,volume:d!=null?d>0?`+${d}%`:`${d}%`:void 0},J=T("speak",{version:"1.0",xmlns:"http://www.w3.org/2001/10/synthesis","xml:lang":(($=c.languages[0])==null?void 0:$.code)||"en-US"},[T("voice",{name:c.id,gender:c.gender||"neutral"},[Object.entries(W).filter(([Ve,ee])=>ee!=null).length>0?T("prosody",{pitch:u!=null?u>0?`+${u}%`:`-${u}%`:void 0,rate:m!=null?m!==1?`${m}`:"1":void 0,volume:d!=null?d>0?`+${d}%`:`${d}%`:void 0},[o]):o])]);return Be(J)}return{activeSpeechProvider:t,activeSpeechModel:r,activeSpeechVoice:a,activeSpeechVoiceId:n,pitch:s,rate:l,ssmlEnabled:h,selectedLanguage:B,isLoadingSpeechProviderVoices:f,speechProviderError:E,availableVoices:v,modelSearchQuery:w,availableSpeechProvidersMetadata:H,supportsSSML:_,supportsModelListing:V,providerModels:A,isLoadingActiveProviderModels:Y,activeProviderModelError:G,filteredModels:X,speech:Q,loadVoicesForProvider:q,getVoicesForProvider:K,generateSSML:Z,isSpeechProvider:O}});export{F as c,ie as g,_e as s,Ke as u}; diff --git a/assets/speech-C_w-q0H3.js b/assets/speech-DslJ9VCL.js similarity index 97% rename from assets/speech-C_w-q0H3.js rename to assets/speech-DslJ9VCL.js index 9fe32d03812648536d584eabe6190ddba18963f6..f428978b1a59ce6ab3eaa33f0d43f23a30d735b4 100644 --- a/assets/speech-C_w-q0H3.js +++ b/assets/speech-DslJ9VCL.js @@ -1 +1 @@ -import{d as D,r as V,f as ae,w as X,B as re,c as u,o as i,bA as H,bB as Y,a as e,q as ve,F as $,bK as W,bL as K,G as Q,bD as me,i as P,t as y,b as S,u as t,E as N,bq as Z,l as pe,ca as fe,bH as ne,m as J,k as ge,s as te,g as xe,bz as be,br as he,ag as F,bJ as ye}from"./index-5LjD1Eoi.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as we}from"./providers-CIeQW25J.js";import{u as _e,g as Se}from"./speech-BYL-UWPg.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";/* empty css */import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-DYkvi4WW.js";import{R as Ce,a as $e}from"./RadioCardSimple-D24jggBz.js";import{_ as Pe}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import{_ as Ue}from"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Basic.vue_vue_type_script_setup_true_lang-Xbv52Zmk.js";const Le=D({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(l){const o=l,g=V(Array.from({length:o.bars}).fill(0));ae(()=>{m()}),X(()=>o.stream,()=>{m()});function m(){if(!o.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),f=c.createMediaStreamSource(o.stream),v=c.createAnalyser();v.fftSize=2048,f.connect(v);const b=v.frequencyBinCount,M=new Uint8Array(b),p=c.sampleRate/v.fftSize,k=Math.floor(o.minFreq/p),U=Math.floor(o.maxFreq/p),q=U-k,E=Math.floor(q/o.bars),T=()=>{try{requestAnimationFrame(T),v.getByteFrequencyData(M);const A=Array.from({length:o.bars}).fill(0);for(let z=0;zre(c.$slots,"default",{frequencies:g.value})}}),qe={"h-full":"",flex:"","items-center":"","gap-1":""},Ae=5,Ee=D({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(l){const o=l;function g(c,f){return .1+(1-.1)*(c/f)}function m(c,f){const v=g(f,o.frequencies.length);return Math.min(100,Math.max(10,c*100*Ae*v))}return(c,f)=>(i(),u("div",qe,[(i(!0),u(H,null,Y(l.frequencies,(v,b)=>(i(),u("div",{key:b,"h-full":"",flex:"","flex-1":"","items-end":""},[e("div",{transition:"all 100 ease-in-out","mx-auto":"","my-0":"","w-full":"","rounded-full":"",class:$(l.barsClass),style:ve({height:`${m(v,b)}%`})},null,6)]))),128))]))}}),Re={class:"p-3"},Te={class:"flex items-start"},ze=["checked","name","value"],Be={class:"relative mr-3 mt-0.5 flex-shrink-0"},Fe={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ie={key:1,class:"mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600"},De={class:"flex-1 cursor-pointer"},je={class:"flex items-center"},Oe={key:0,class:"mt-1 flex flex-wrap gap-1"},Qe={key:1,class:"mt-3"},He={relative:""},Ge={key:0,class:"h-16 px-3 pb-2"},Je=D({__name:"VoiceCard",props:W({name:null,voice:null,currentlyPlayingId:null,customInputPlaceholder:{default:"Enter custom voice name"},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:""},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:""},"custom-voice-nameModifiers":{}}),emits:W(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(l,{emit:o}){const g=l,m=o,c=K(l,"voice-id"),f=K(l,"custom-voice-name");function v(h){return h.previewURL||h.preview_audio_url}function b(h){var k,U,q;const p=[];if((k=h.labels)!=null&&k.gender&&p.push(h.labels.gender),(U=h.labels)!=null&&U.age&&p.push(h.labels.age),(q=h.labels)!=null&&q.accent&&p.push(h.labels.accent),h.languages&&h.languages.length>0){const E=h.languages.map(T=>T.name).join(", ");p.push(E)}return p}function M(){m("togglePlayback",g.voice)}return(h,p)=>(i(),u("label",{border:"2px solid",class:$(["scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl",[c.value===g.voice.id?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",c.value===g.voice.id?"form_voice-card-active":""]]),transition:"all duration-200 ease-in-out"},[e("div",Re,[e("div",Te,[Q(e("input",{"onUpdate:modelValue":p[0]||(p[0]=k=>c.value=k),checked:c.value===g.voice.id,type:"radio",name:l.name,value:g.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,ze),[[me,c.value]]),e("div",Be,[e("div",{class:$(["size-5 border-2 rounded-full transition-colors duration-200",[c.value===g.voice.id?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:$(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[c.value===g.voice.id?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),v(l.voice)?(i(),u("button",{key:0,absolute:"","right-0":"",top:"0","z-3":"",class:$(["translate-x-[-50%] translate-y-[50%]",[l.currentlyPlayingId===l.voice.id?"text-white dark:text-white":""]]),onClick:M},[l.currentlyPlayingId===l.voice.id?(i(),u("div",Fe)):(i(),u("div",Ne))],2)):(i(),u("div",Ie," No preview available ")),e("div",De,[e("div",je,[e("span",{class:$(["line-clamp-1 font-medium",[c.value===l.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},y(l.voice.name),3)]),b(l.voice).length>0?(i(),u("div",Oe,[(i(!0),u(H,null,Y(b(l.voice),(k,U)=>(i(),u("span",{key:U,class:$(["inline-flex items-center rounded-md px-1.5 py-0.5 text-xs",[c.value===l.voice.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400":"bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"]])},y(k),3))),128))])):P("",!0),l.voice.customizable&&c.value===l.voice.id?(i(),u("div",Qe,[S(t(Ue),{modelValue:f.value,"onUpdate:modelValue":p[1]||(p[1]=k=>f.value=k),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:l.customInputPlaceholder},null,8,["modelValue","placeholder"])])):P("",!0),l.voice.description?(i(),u("div",{key:2,class:$(["line-clamp-2 mt-1 text-xs",[c.value===l.voice.id?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]])},y(l.voice.description),3)):P("",!0)])])]),e("div",He,[S(t(Pe),null,{default:N(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Ge,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:N(({frequencies:k})=>[S(t(Ee),{frequencies:k,"bars-class":c.value===l.voice.id?"bg-primary-500 dark:bg-primary-400":"bg-neutral-400 dark:bg-neutral-600"},null,8,["frequencies","bars-class"])]),_:1},8,["stream"])])):P("",!0)]),_:1})])],2))}}),Ke=Z(Je,[["__scopeId","data-v-a5ae8da9"]]),Ye={class:"voice-preview-player"},We={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Xe=["placeholder"],Ze={class:"mt-4 space-y-2"},et={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},tt={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},st={class:"flex flex-col"},lt={class:"font-medium"},ot={class:"text-sm text-amber-600 dark:text-amber-400"},at={class:"relative"},rt=D({__name:"VoiceCardManySelect",props:W({voices:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search voices..."},searchNoResultsTitle:{default:"No voices found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} voices"},customInputPlaceholder:{default:"Enter custom voice name"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},playButtonText:{default:"Play sample"},pauseButtonText:{default:"Pause"},showVisualizer:{type:Boolean,default:!0}},{"search-query":{required:!1,default:""},"search-queryModifiers":{},"voice-id":{required:!1,default:""},"voice-idModifiers":{}}),emits:["update:search-query","update:voice-id"],setup(l){const o=l,g=V(!1),m=V(),c=V(new Map),f=V(new Map),v=V(new Map),b=V(new Map),M=V(null);function h(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const p=K(l,"search-query"),k=K(l,"voice-id"),U=pe(()=>{if(!p.value)return o.voices;const a=p.value.toLowerCase();return o.voices.filter(r=>{const n=r.name.toLowerCase().includes(a),x=r.description&&r.description.toLowerCase().includes(a),w=r.tags&&r.tags.some(_=>_.toLowerCase().includes(a)),L=r.labels&&Object.values(r.labels).some(_=>typeof _=="string"&&_.toLowerCase().includes(a)),C=r.languages&&r.languages.some(_=>_.name.toLowerCase().includes(a)||_.code.toLowerCase().includes(a));return n||x||w||L||C})});function q(a){return a.previewURL||a.preview_audio_url}function E(a){const r=q(a);if(!r)return null;if(c.value.has(a.id))return c.value.get(a.id)||null;const n=new Audio(r);return n.crossOrigin="anonymous",n.preload="auto",n.addEventListener("ended",()=>{if(m.value===a.id){m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id))}}),c.value.set(a.id,n),n}function T(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=h();if(b.value.has(r)){const C=b.value.get(r),_=n.createMediaStreamDestination();C.connect(_);const j=_.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);b.value.set(r,x),x.connect(n.destination);const w=n.createMediaStreamDestination();x.connect(w);const L=w.stream;return f.value.set(r,L),L}catch(n){return console.error("Failed to create audio stream for visualizer:",n),null}}function A(a){try{if(!q(a))return;const n=E(a);if(!n)return;if(m.value===a.id){n.pause(),m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id));return}if(m.value){const x=c.value.get(m.value);x&&x.pause();const w=f.value.get(m.value);w&&(w.getTracks().forEach(L=>L.stop()),f.value.delete(m.value))}o.showVisualizer&&!f.value.has(a.id)&&T(n,a.id),n.currentTime=0,n.play().catch(x=>{console.error("Failed to play audio:",x)}),m.value=a.id}catch(r){console.error(r),m.value=void 0}}function z(){c.value.forEach(a=>{a.pause(),a.src=""}),c.value.clear(),f.value.forEach(a=>{a.getTracks().forEach(r=>r.stop())}),f.value.clear(),v.value.forEach(a=>{a.state!=="closed"&&a.close()}),v.value.clear(),b.value.clear(),m.value=void 0}X(p,()=>{if(m.value){const a=c.value.get(m.value);a&&a.pause();const r=f.value.get(m.value);r&&(r.getTracks().forEach(n=>n.stop()),f.value.delete(m.value)),m.value=void 0}}),fe(z);const B=V("");return(a,r)=>(i(),u("div",Ye,[l.searchable?(i(),u("div",We,[r[4]||(r[4]=e("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[e("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),Q(e("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>p.value=n),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:l.searchPlaceholder},null,8,Xe),[[ne,p.value]])])):P("",!0),e("div",Ze,[p.value?(i(),u("div",et,y(l.searchResultsText.replace("{count}",U.value.length.toString()).replace("{total}",l.voices.length.toString())),1)):P("",!0),p.value&&U.value.length===0?(i(),u("div",tt,[r[5]||(r[5]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",st,[e("span",lt,y(l.searchNoResultsTitle),1),e("span",ot,y(l.searchNoResultsDescription.replace("{query}",p.value)),1)])])):P("",!0),e("div",at,[e("div",{class:$(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto scrollbar-none",[g.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(i(!0),u(H,null,Y(U.value,n=>(i(),J(Ke,{key:n.id,"voice-id":k.value,"onUpdate:voiceId":r[1]||(r[1]=x=>k.value=x),"custom-voice-name":B.value,"onUpdate:customVoiceName":r[2]||(r[2]=x=>B.value=x),name:"voice",voice:n,"currently-playing-id":m.value,"custom-input-placeholder":l.customInputPlaceholder,"show-visualizer":l.showVisualizer,"audio-stream":f.value.get(n.id),onTogglePlayback:A},null,8,["voice-id","custom-voice-name","voice","currently-playing-id","custom-input-placeholder","show-visualizer","audio-stream"]))),128))],2),e("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:$([g.value?"w-full":"mt-4 w-full rounded-lg"])},[e("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:$([g.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:r[3]||(r[3]=n=>g.value=!g.value)},[e("span",null,y(g.value?l.collapseButtonText:l.expandButtonText),1),e("div",{class:$([g.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),nt=Z(rt,[["__scopeId","data-v-4dd3b9e2"]]),it=D({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(l){const o=l;return(g,m)=>(i(),u("div",{class:$(["skeleton",o.animation!=="none"?`skeleton-${o.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[re(g.$slots,"default",{},void 0,!0)],2))}}),O=Z(it,[["__scopeId","data-v-f404da2a"]]),ut={flex:"~ col md:row gap-6"},dt={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},ct={flex:"~ col gap-4"},vt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},mt={text:"neutral-400 dark:neutral-500"},pt={"max-w-full":""},ft={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},gt={key:1},xt={key:0},bt={flex:"~ col gap-4"},ht={class:"text-lg md:text-2xl"},yt={text:"neutral-400 dark:neutral-400"},kt={key:0,class:"flex items-center justify-center py-4"},wt={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},_t={class:"flex flex-col"},St={class:"font-medium"},Vt={class:"text-sm text-red-600 dark:text-red-400"},Mt={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Ct={class:"flex flex-col"},$t={class:"font-medium"},Pt={class:"text-sm text-amber-600 dark:text-amber-400"},Ut={key:0},Lt={flex:"~ col gap-4"},qt={key:0},At={class:"flex flex-col gap-4"},Et={flex:"~ row gap-4"},Rt={key:1,class:"space-y-6"},Tt={key:2,class:"flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},zt={class:"flex flex-col"},Bt={class:"text-sm text-red-600 dark:text-red-400"},Ft={key:3,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Nt={flex:"~ col gap-4"},It={key:4,class:"mt-2 space-y-6"},Dt={key:0},jt={flex:"~ col gap-4"},Ot={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Qt={"w-full":"","rounded-xl":""},Ht={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Gt={class:"inline-flex items-center gap-4"},Jt={flex:"~ col gap-4"},Kt={flex:"~ row","gap-4":""},Yt=["disabled"],Wt={flex:"~ row","items-center":"","gap-2":""},Xt=["src"],Zt={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},es=D({__name:"speech",setup(l){const{t:o}=ge(),g=we(),m=_e(),{availableProviders:c,availableAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:b,activeSpeechVoice:M,activeSpeechVoiceId:h,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:U,providerModels:q,isLoadingActiveProviderModels:E,activeProviderModelError:T,modelSearchQuery:A,speechProviderError:z,ssmlEnabled:B,availableVoices:a}=te(m),r=V(""),n=V(!1),x=V("Hello, my name is AI Assistant"),w=V(""),L=V(!1),C=V(""),_=V(null),j=V("");ae(async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)}),X(v,async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)});async function ie(){if(!x.value.trim()&&!n.value||n.value&&!w.value.trim())return;if(!b.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const R=g.getProviderInstance(v.value);if(!R){console.error("Failed to initialize speech provider");return}const s=g.getProviderConfig(v.value);L.value=!0,j.value="";try{C.value&&ee();const I=n.value?w.value:m.generateSSML(x.value,M.value,{...s,pitch:p.value}),G=await Se({...R.speech(b.value,s),input:I,voice:M.value.id});C.value=URL.createObjectURL(new Blob([G])),setTimeout(()=>{_.value&&_.value.play()},100)}catch(I){console.error("Error generating speech:",I),j.value=I instanceof Error?I.message:"An unknown error occurred"}finally{L.value=!1}}function ee(){_.value&&(_.value.pause(),_.value.currentTime=0),C.value&&(URL.revokeObjectURL(C.value),C.value="")}xe(()=>{C.value&&URL.revokeObjectURL(C.value)});function ue(R){M.value={id:R,name:R,description:R,previewURL:R,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(R){b.value=R}return(R,s)=>{var G;const I=be("motion");return i(),u(H,null,[e("div",ut,[e("div",dt,[e("div",null,[e("div",ct,[e("div",null,[e("h2",vt,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",mt,[e("span",null,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",pt,[t(c).length>0?(i(),u("fieldset",ft,[(i(!0),u(H,null,Y(t(f),d=>(i(),J(t($e),{id:d.id,key:d.id,modelValue:t(v),"onUpdate:modelValue":s[0]||(s[0]=ce=>F(v)?v.value=ce:null),name:"speech-provider",value:d.id,title:d.localizedName,description:d.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(i(),u("div",gt,[S(t(he),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:N(()=>s[13]||(s[13]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Speech Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your speech providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])]),e("div",null,[t(v)&&t(U)?(i(),u("div",xt,[e("div",bt,[e("div",null,[e("h2",ht,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",yt,[e("span",null,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(E)?(i(),u("div",kt,[s[14]||(s[14]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(T)?(i(),u("div",wt,[s[15]||(s[15]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",_t,[e("span",St,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Vt,y(t(T)),1)])])):t(q).length===0&&!t(E)?(i(),u("div",Mt,[s[16]||(s[16]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",Ct,[e("span",$t,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Pt,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),J(t(Ce),{key:3,modelValue:t(b),"onUpdate:modelValue":s[1]||(s[1]=d=>F(b)?b.value=d:null),"search-query":t(A),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(A)?A.value=d:null),items:t(q),searchable:!0,"search-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:t(A)}),"search-results-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":de},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):P("",!0)])])):P("",!0)])]),t(v)?(i(),u("div",Ut,[e("div",Lt,[s[27]||(s[27]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Voice Configuration "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Customize how your AI assistant speaks")])],-1)),t(k)?(i(),u("div",qt,[e("div",At,[S(t(O),{class:"w-full rounded-lg p-2.5 text-sm"},{default:N(()=>s[17]||(s[17]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),e("div",Et,[S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:N(()=>s[18]||(s[18]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:N(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:N(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1})]),S(t(O),{class:"w-full rounded-lg p-3 text-sm"},{default:N(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",Rt,[S(t(nt),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(h),"onUpdate:voiceId":s[4]||(s[4]=d=>F(h)?h.value=d:null),voices:(G=t(a)[t(v)])==null?void 0:G.map(d=>({id:d.id,name:d.name,description:d.description,previewURL:d.previewURL,customizable:!1})),searchable:!0,"search-placeholder":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices"),"search-no-results-description":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description"),"search-results-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results",{count:0,total:0}),"custom-input-placeholder":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder"),"expand-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_more"),"collapse-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_less"),"play-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample"),"pause-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.pause"),"onUpdate:customValue":ue},null,8,["search-query","voice-id","voices","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text","play-button-text","pause-button-text"])])):t(z)?(i(),u("div",Tt,[s[23]||(s[23]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",zt,[s[22]||(s[22]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Bt,y(t(z)),1)])])):(i(),u("div",Ft,s[24]||(s[24]=[e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No voices available"),e("span",{class:"text-sm text-amber-600 dark:text-amber-400"}," No voices were found for this provider. You can enter a custom voice name below. ")],-1)]))),e("div",Nt,[S(t(se),{modelValue:t(p),"onUpdate:modelValue":s[5]||(s[5]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"]),S(t(le),{modelValue:t(B),"onUpdate:modelValue":s[6]||(s[6]=d=>F(B)?B.value=d:null),label:"Enable SSML",description:"Enable Speech Synthesis Markup Language for more control over speech output"},null,8,["modelValue"])]),!t(a)[t(v)]||t(a)[t(v)].length===0?(i(),u("div",It,[S(t(Ve),{modelValue:t(h),"onUpdate:modelValue":s[7]||(s[7]=d=>F(h)?h.value=d:null),type:"text",label:"Voice ID",description:"Enter the voice ID for your custom voice",placeholder:"Enter voice name (e.g., 'Rachel', 'Josh')"},null,8,["modelValue"]),t(v)==="elevenlabs"?(i(),u("div",Dt,[s[26]||(s[26]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),Q(e("select",{"onUpdate:modelValue":s[8]||(s[8]=d=>F(b)?b.value=d:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},s[25]||(s[25]=[e("option",{value:"eleven_monolingual_v1"}," Monolingual v1 ",-1),e("option",{value:"eleven_multilingual_v1"}," Multilingual v1 ",-1),e("option",{value:"eleven_multilingual_v2"}," Multilingual v2 ",-1)]),512),[[ye,t(b)]])])):P("",!0),e("div",jt,[S(t(se),{modelValue:t(p),"onUpdate:modelValue":s[9]||(s[9]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"])])])):P("",!0)])])):P("",!0)]),e("div",Ot,[e("div",Qt,[e("h2",Ht,[e("div",Gt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Jt,[S(t(le),{modelValue:n.value,"onUpdate:modelValue":s[10]||(s[10]=d=>n.value=d),label:"Use Custom SSML",description:"Enable to input raw SSML instead of plain text"},null,8,["modelValue"]),n.value?Q((i(),u("textarea",{key:1,"onUpdate:modelValue":s[12]||(s[12]=d=>w.value=d),placeholder:"Enter SSML text...",border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,512)),[[ne,w.value]]):(i(),J(t(Me),{key:0,modelValue:x.value,"onUpdate:modelValue":s[11]||(s[11]=d=>x.value=d),"h-24":"","w-full":"",placeholder:t(o)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder")},null,8,["modelValue","placeholder"])),e("div",Kt,[e("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M),class:$({"opacity-50 cursor-not-allowed":L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M)}),bg:"neutral-700 dark:neutral-300",onClick:ie},[e("div",Wt,[s[28]||(s[28]=e("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),e("span",null,y(L.value?t(o)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):t(o)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Yt),C.value?(i(),u("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:ee},s[29]||(s[29]=[e("div",{flex:"~ row","items-center":"","gap-2":""},[e("div",{"i-solar:stop-circle-bold-duotone":""}),e("span",null,"Stop")],-1)]))):P("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:_,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Xt)):P("",!0)])])])]),Q((i(),u("div",Zt,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[I]])],64)}}});typeof oe=="function"&&oe(es);export{es as default}; +import{d as D,r as V,f as ae,w as X,B as re,c as u,o as i,bA as H,bB as Y,a as e,q as ve,F as $,bK as W,bL as K,G as Q,bD as me,i as P,t as y,b as S,u as t,E as N,bq as Z,l as pe,ca as fe,bH as ne,m as J,k as ge,s as te,g as xe,bz as be,br as he,ag as F,bJ as ye}from"./index-DCMFRrFG.js";import{_ as se,a as le,b as ke}from"./FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js";import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as we}from"./providers-DHuI5XmA.js";import{u as _e,g as Se}from"./speech-Bc-BAopv.js";import{_ as Ve}from"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";/* empty css */import{_ as Me}from"./Textarea.vue_vue_type_script_setup_true_lang-CSJMxNAW.js";import{R as Ce,a as $e}from"./RadioCardSimple-_IHIrHb5.js";import{_ as Pe}from"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import{_ as Ue}from"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";import{b as oe}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Basic.vue_vue_type_script_setup_true_lang-Csgn84Sg.js";const Le=D({__name:"AudioSpectrum",props:{stream:null,bars:{default:32},minFreq:{default:60},maxFreq:{default:4e3}},setup(l){const o=l,g=V(Array.from({length:o.bars}).fill(0));ae(()=>{m()}),X(()=>o.stream,()=>{m()});function m(){if(!o.stream)return;const c=new(window.AudioContext||window.webkitAudioContext),f=c.createMediaStreamSource(o.stream),v=c.createAnalyser();v.fftSize=2048,f.connect(v);const b=v.frequencyBinCount,M=new Uint8Array(b),p=c.sampleRate/v.fftSize,k=Math.floor(o.minFreq/p),U=Math.floor(o.maxFreq/p),q=U-k,E=Math.floor(q/o.bars),T=()=>{try{requestAnimationFrame(T),v.getByteFrequencyData(M);const A=Array.from({length:o.bars}).fill(0);for(let z=0;zre(c.$slots,"default",{frequencies:g.value})}}),qe={"h-full":"",flex:"","items-center":"","gap-1":""},Ae=5,Ee=D({__name:"AudioSpectrumVisualizer",props:{frequencies:null,barsClass:null},setup(l){const o=l;function g(c,f){return .1+(1-.1)*(c/f)}function m(c,f){const v=g(f,o.frequencies.length);return Math.min(100,Math.max(10,c*100*Ae*v))}return(c,f)=>(i(),u("div",qe,[(i(!0),u(H,null,Y(l.frequencies,(v,b)=>(i(),u("div",{key:b,"h-full":"",flex:"","flex-1":"","items-end":""},[e("div",{transition:"all 100 ease-in-out","mx-auto":"","my-0":"","w-full":"","rounded-full":"",class:$(l.barsClass),style:ve({height:`${m(v,b)}%`})},null,6)]))),128))]))}}),Re={class:"p-3"},Te={class:"flex items-start"},ze=["checked","name","value"],Be={class:"relative mr-3 mt-0.5 flex-shrink-0"},Fe={key:0,class:"i-solar:pause-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ne={key:1,class:"i-solar:play-circle-bold-duotone text-xl text-neutral-400 dark:text-neutral-500"},Ie={key:1,class:"mt-auto w-full flex items-center justify-center bg-neutral-50 py-3 text-xs text-neutral-400 italic dark:bg-neutral-800/50 dark:text-neutral-600"},De={class:"flex-1 cursor-pointer"},je={class:"flex items-center"},Oe={key:0,class:"mt-1 flex flex-wrap gap-1"},Qe={key:1,class:"mt-3"},He={relative:""},Ge={key:0,class:"h-16 px-3 pb-2"},Je=D({__name:"VoiceCard",props:W({name:null,voice:null,currentlyPlayingId:null,customInputPlaceholder:{default:"Enter custom voice name"},showVisualizer:{type:Boolean,default:!0},audioStream:{default:null}},{"voice-id":{required:!1,default:""},"voice-idModifiers":{},"custom-voice-name":{required:!1,default:""},"custom-voice-nameModifiers":{}}),emits:W(["togglePlayback"],["update:voice-id","update:custom-voice-name"]),setup(l,{emit:o}){const g=l,m=o,c=K(l,"voice-id"),f=K(l,"custom-voice-name");function v(h){return h.previewURL||h.preview_audio_url}function b(h){var k,U,q;const p=[];if((k=h.labels)!=null&&k.gender&&p.push(h.labels.gender),(U=h.labels)!=null&&U.age&&p.push(h.labels.age),(q=h.labels)!=null&&q.accent&&p.push(h.labels.accent),h.languages&&h.languages.length>0){const E=h.languages.map(T=>T.name).join(", ");p.push(E)}return p}function M(){m("togglePlayback",g.voice)}return(h,p)=>(i(),u("label",{border:"2px solid",class:$(["scroll-snap-align-start form_voice-card relative flex flex-col overflow-hidden rounded-xl",[c.value===g.voice.id?"bg-primary-50 dark:bg-primary-900/20 border-primary-100 dark:border-primary-900 hover:border-primary-500/30 dark:hover:border-primary-400/30":"bg-white dark:bg-neutral-900/20 border-neutral-100 dark:border-neutral-900 hover:border-primary-500/30 dark:hover:border-primary-400/30",c.value===g.voice.id?"form_voice-card-active":""]]),transition:"all duration-200 ease-in-out"},[e("div",Re,[e("div",Te,[Q(e("input",{"onUpdate:modelValue":p[0]||(p[0]=k=>c.value=k),checked:c.value===g.voice.id,type:"radio",name:l.name,value:g.voice.id,class:"absolute cursor-pointer opacity-0"},null,8,ze),[[me,c.value]]),e("div",Be,[e("div",{class:$(["size-5 border-2 rounded-full transition-colors duration-200",[c.value===g.voice.id?"border-primary-500 dark:border-primary-400":"border-neutral-300 dark:border-neutral-600"]])},[e("div",{class:$(["absolute left-1/2 top-1/2 size-3 rounded-full transition-opacity duration-200 -translate-x-1/2 -translate-y-1/2",[c.value===g.voice.id?"opacity-100 bg-primary-500 dark:bg-primary-400":"opacity-0"]])},null,2)],2)]),v(l.voice)?(i(),u("button",{key:0,absolute:"","right-0":"",top:"0","z-3":"",class:$(["translate-x-[-50%] translate-y-[50%]",[l.currentlyPlayingId===l.voice.id?"text-white dark:text-white":""]]),onClick:M},[l.currentlyPlayingId===l.voice.id?(i(),u("div",Fe)):(i(),u("div",Ne))],2)):(i(),u("div",Ie," No preview available ")),e("div",De,[e("div",je,[e("span",{class:$(["line-clamp-1 font-medium",[c.value===l.voice.id?"text-neutral-700 dark:text-neutral-300":"text-neutral-700 dark:text-neutral-400"]])},y(l.voice.name),3)]),b(l.voice).length>0?(i(),u("div",Oe,[(i(!0),u(H,null,Y(b(l.voice),(k,U)=>(i(),u("span",{key:U,class:$(["inline-flex items-center rounded-md px-1.5 py-0.5 text-xs",[c.value===l.voice.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-400":"bg-neutral-100 text-neutral-700 dark:bg-neutral-800 dark:text-neutral-300"]])},y(k),3))),128))])):P("",!0),l.voice.customizable&&c.value===l.voice.id?(i(),u("div",Qe,[S(t(Ue),{modelValue:f.value,"onUpdate:modelValue":p[1]||(p[1]=k=>f.value=k),type:"text",class:"w-full border border-neutral-300 rounded bg-white px-2 py-1 text-sm dark:border-neutral-700 dark:bg-neutral-900",placeholder:l.customInputPlaceholder},null,8,["modelValue","placeholder"])])):P("",!0),l.voice.description?(i(),u("div",{key:2,class:$(["line-clamp-2 mt-1 text-xs",[c.value===l.voice.id?"text-neutral-600 dark:text-neutral-400":"text-neutral-500 dark:text-neutral-500"]])},y(l.voice.description),3)):P("",!0)])])]),e("div",He,[S(t(Pe),null,{default:N(()=>[l.showVisualizer&&l.currentlyPlayingId===l.voice.id&&l.audioStream?(i(),u("div",Ge,[S(t(Le),{stream:l.audioStream,bars:24,"min-freq":60,"max-freq":4e3},{default:N(({frequencies:k})=>[S(t(Ee),{frequencies:k,"bars-class":c.value===l.voice.id?"bg-primary-500 dark:bg-primary-400":"bg-neutral-400 dark:bg-neutral-600"},null,8,["frequencies","bars-class"])]),_:1},8,["stream"])])):P("",!0)]),_:1})])],2))}}),Ke=Z(Je,[["__scopeId","data-v-a5ae8da9"]]),Ye={class:"voice-preview-player"},We={key:0,class:"relative","inline-flex":"~","w-full":"","items-center":""},Xe=["placeholder"],Ze={class:"mt-4 space-y-2"},et={key:0,class:"text-sm text-neutral-500 dark:text-neutral-400"},tt={key:1,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-xl bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},st={class:"flex flex-col"},lt={class:"font-medium"},ot={class:"text-sm text-amber-600 dark:text-amber-400"},at={class:"relative"},rt=D({__name:"VoiceCardManySelect",props:W({voices:null,searchable:{type:Boolean,default:!0},searchPlaceholder:{default:"Search voices..."},searchNoResultsTitle:{default:"No voices found"},searchNoResultsDescription:{default:"Try a different search term"},searchResultsText:{default:"{count} of {total} voices"},customInputPlaceholder:{default:"Enter custom voice name"},expandButtonText:{default:"Show more"},collapseButtonText:{default:"Show less"},playButtonText:{default:"Play sample"},pauseButtonText:{default:"Pause"},showVisualizer:{type:Boolean,default:!0}},{"search-query":{required:!1,default:""},"search-queryModifiers":{},"voice-id":{required:!1,default:""},"voice-idModifiers":{}}),emits:["update:search-query","update:voice-id"],setup(l){const o=l,g=V(!1),m=V(),c=V(new Map),f=V(new Map),v=V(new Map),b=V(new Map),M=V(null);function h(){return M.value||(M.value=new(window.AudioContext||window.webkitAudioContext)),M.value}const p=K(l,"search-query"),k=K(l,"voice-id"),U=pe(()=>{if(!p.value)return o.voices;const a=p.value.toLowerCase();return o.voices.filter(r=>{const n=r.name.toLowerCase().includes(a),x=r.description&&r.description.toLowerCase().includes(a),w=r.tags&&r.tags.some(_=>_.toLowerCase().includes(a)),L=r.labels&&Object.values(r.labels).some(_=>typeof _=="string"&&_.toLowerCase().includes(a)),C=r.languages&&r.languages.some(_=>_.name.toLowerCase().includes(a)||_.code.toLowerCase().includes(a));return n||x||w||L||C})});function q(a){return a.previewURL||a.preview_audio_url}function E(a){const r=q(a);if(!r)return null;if(c.value.has(a.id))return c.value.get(a.id)||null;const n=new Audio(r);return n.crossOrigin="anonymous",n.preload="auto",n.addEventListener("ended",()=>{if(m.value===a.id){m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id))}}),c.value.set(a.id,n),n}function T(a,r){try{if(f.value.has(r))return f.value.get(r)||null;const n=h();if(b.value.has(r)){const C=b.value.get(r),_=n.createMediaStreamDestination();C.connect(_);const j=_.stream;return f.value.set(r,j),j}const x=n.createMediaElementSource(a);b.value.set(r,x),x.connect(n.destination);const w=n.createMediaStreamDestination();x.connect(w);const L=w.stream;return f.value.set(r,L),L}catch(n){return console.error("Failed to create audio stream for visualizer:",n),null}}function A(a){try{if(!q(a))return;const n=E(a);if(!n)return;if(m.value===a.id){n.pause(),m.value=void 0;const x=f.value.get(a.id);x&&(x.getTracks().forEach(w=>w.stop()),f.value.delete(a.id));return}if(m.value){const x=c.value.get(m.value);x&&x.pause();const w=f.value.get(m.value);w&&(w.getTracks().forEach(L=>L.stop()),f.value.delete(m.value))}o.showVisualizer&&!f.value.has(a.id)&&T(n,a.id),n.currentTime=0,n.play().catch(x=>{console.error("Failed to play audio:",x)}),m.value=a.id}catch(r){console.error(r),m.value=void 0}}function z(){c.value.forEach(a=>{a.pause(),a.src=""}),c.value.clear(),f.value.forEach(a=>{a.getTracks().forEach(r=>r.stop())}),f.value.clear(),v.value.forEach(a=>{a.state!=="closed"&&a.close()}),v.value.clear(),b.value.clear(),m.value=void 0}X(p,()=>{if(m.value){const a=c.value.get(m.value);a&&a.pause();const r=f.value.get(m.value);r&&(r.getTracks().forEach(n=>n.stop()),f.value.delete(m.value)),m.value=void 0}}),fe(z);const B=V("");return(a,r)=>(i(),u("div",Ye,[l.searchable?(i(),u("div",We,[r[4]||(r[4]=e("div",{class:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3"},[e("div",{"i-solar:magnifer-line-duotone":"",class:"text-neutral-500 dark:text-neutral-400"})],-1)),Q(e("input",{"onUpdate:modelValue":r[0]||(r[0]=n=>p.value=n),type:"search",class:"w-full rounded-xl p-2.5 pl-10 text-sm outline-none",border:"focus:primary-100 dark:focus:primary-400/50 2 solid neutral-200 dark:neutral-800",transition:"all duration-200 ease-in-out",bg:"white dark:neutral-900",placeholder:l.searchPlaceholder},null,8,Xe),[[ne,p.value]])])):P("",!0),e("div",Ze,[p.value?(i(),u("div",et,y(l.searchResultsText.replace("{count}",U.value.length.toString()).replace("{total}",l.voices.length.toString())),1)):P("",!0),p.value&&U.value.length===0?(i(),u("div",tt,[r[5]||(r[5]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",st,[e("span",lt,y(l.searchNoResultsTitle),1),e("span",ot,y(l.searchNoResultsDescription.replace("{query}",p.value)),1)])])):P("",!0),e("div",at,[e("div",{class:$(["grid auto-cols-[350px] grid-flow-col max-h-[calc(100dvh-7lh)] gap-4 overflow-x-auto scrollbar-none",[g.value?"grid-cols-1 md:grid-cols-2 grid-flow-row auto-cols-auto":""]]),transition:"all duration-200 ease-in-out",style:{"scroll-snap-type":"x mandatory"}},[(i(!0),u(H,null,Y(U.value,n=>(i(),J(Ke,{key:n.id,"voice-id":k.value,"onUpdate:voiceId":r[1]||(r[1]=x=>k.value=x),"custom-voice-name":B.value,"onUpdate:customVoiceName":r[2]||(r[2]=x=>B.value=x),name:"voice",voice:n,"currently-playing-id":m.value,"custom-input-placeholder":l.customInputPlaceholder,"show-visualizer":l.showVisualizer,"audio-stream":f.value.get(n.id),onTogglePlayback:A},null,8,["voice-id","custom-voice-name","voice","currently-playing-id","custom-input-placeholder","show-visualizer","audio-stream"]))),128))],2),e("div",{bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"",class:$([g.value?"w-full":"mt-4 w-full rounded-lg"])},[e("button",{"w-full":"",flex:"","items-center":"","justify-center":"","gap-2":"","rounded-lg":"","py-2":"",transition:"all duration-200 ease-in-out",class:$([g.value?"bg-primary-500 hover:bg-primary-600 text-white":"bg-white dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800"]),onClick:r[3]||(r[3]=n=>g.value=!g.value)},[e("span",null,y(g.value?l.collapseButtonText:l.expandButtonText),1),e("div",{class:$([g.value?"rotate-180":"","text-lg"]),"i-solar:alt-arrow-down-bold-duotone":"",transition:"transform duration-200 ease-in-out"},null,2)],2)],2)])])]))}}),nt=Z(rt,[["__scopeId","data-v-4dd3b9e2"]]),it=D({__name:"Skeleton",props:{animation:{default:"pulse"}},setup(l){const o=l;return(g,m)=>(i(),u("div",{class:$(["skeleton",o.animation!=="none"?`skeleton-${o.animation}`:""]),bg:"neutral-200 dark:neutral-800",overflow:"hidden"},[re(g.$slots,"default",{},void 0,!0)],2))}}),O=Z(it,[["__scopeId","data-v-f404da2a"]]),ut={flex:"~ col md:row gap-6"},dt={bg:"neutral-100 dark:[rgba(0,0,0,0.3)]","rounded-xl":"","p-4":"",flex:"~ col gap-4",class:"w-full md:w-[40%]"},ct={flex:"~ col gap-4"},vt={class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"},mt={text:"neutral-400 dark:neutral-500"},pt={"max-w-full":""},ft={key:0,flex:"~ row gap-4",style:{"scrollbar-width":"none"},"min-w-0":"","of-x-scroll":"","scroll-smooth":"",role:"radiogroup"},gt={key:1},xt={key:0},bt={flex:"~ col gap-4"},ht={class:"text-lg md:text-2xl"},yt={text:"neutral-400 dark:neutral-400"},kt={key:0,class:"flex items-center justify-center py-4"},wt={key:1,class:"flex items-center gap-3 border border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},_t={class:"flex flex-col"},St={class:"font-medium"},Vt={class:"text-sm text-red-600 dark:text-red-400"},Mt={key:2,class:"flex items-center gap-3 border border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Ct={class:"flex flex-col"},$t={class:"font-medium"},Pt={class:"text-sm text-amber-600 dark:text-amber-400"},Ut={key:0},Lt={flex:"~ col gap-4"},qt={key:0},At={class:"flex flex-col gap-4"},Et={flex:"~ row gap-4"},Rt={key:1,class:"space-y-6"},Tt={key:2,class:"flex items-center gap-3 border border-2 border-red-200 rounded-lg bg-red-50 p-4 dark:border-red-800 dark:bg-red-900/20"},zt={class:"flex flex-col"},Bt={class:"text-sm text-red-600 dark:text-red-400"},Ft={key:3,class:"flex items-center gap-3 border border-2 border-amber-200 rounded-lg bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-900/20"},Nt={flex:"~ col gap-4"},It={key:4,class:"mt-2 space-y-6"},Dt={key:0},jt={flex:"~ col gap-4"},Ot={flex:"~ col gap-6",class:"w-full md:w-[60%]"},Qt={"w-full":"","rounded-xl":""},Ht={class:"mb-4 text-lg text-neutral-500 md:text-2xl dark:text-neutral-400","w-full":""},Gt={class:"inline-flex items-center gap-4"},Jt={flex:"~ col gap-4"},Kt={flex:"~ row","gap-4":""},Yt=["disabled"],Wt={flex:"~ row","items-center":"","gap-2":""},Xt=["src"],Zt={text:"neutral-200/50 dark:neutral-600/20","pointer-events-none":"",fixed:"",top:"[calc(100dvh-15rem)]","bottom-0":"","right--5":"","z--1":"",initial:{scale:.9,opacity:0,x:20},enter:{scale:1,opacity:1,x:0},duration:500,"size-60":"",flex:"","items-center":"","justify-center":""},es=D({__name:"speech",setup(l){const{t:o}=ge(),g=we(),m=_e(),{availableProviders:c,availableAudioSpeechProvidersMetadata:f}=te(g),{activeSpeechProvider:v,activeSpeechModel:b,activeSpeechVoice:M,activeSpeechVoiceId:h,pitch:p,isLoadingSpeechProviderVoices:k,supportsModelListing:U,providerModels:q,isLoadingActiveProviderModels:E,activeProviderModelError:T,modelSearchQuery:A,speechProviderError:z,ssmlEnabled:B,availableVoices:a}=te(m),r=V(""),n=V(!1),x=V("Hello, my name is AI Assistant"),w=V(""),L=V(!1),C=V(""),_=V(null),j=V("");ae(async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)}),X(v,async()=>{await g.loadModelsForConfiguredProviders(),await m.loadVoicesForProvider(v.value)});async function ie(){if(!x.value.trim()&&!n.value||n.value&&!w.value.trim())return;if(!b.value){console.error("No model selected");return}if(!M.value){console.error("No voice selected");return}const R=g.getProviderInstance(v.value);if(!R){console.error("Failed to initialize speech provider");return}const s=g.getProviderConfig(v.value);L.value=!0,j.value="";try{C.value&&ee();const I=n.value?w.value:m.generateSSML(x.value,M.value,{...s,pitch:p.value}),G=await Se({...R.speech(b.value,s),input:I,voice:M.value.id});C.value=URL.createObjectURL(new Blob([G])),setTimeout(()=>{_.value&&_.value.play()},100)}catch(I){console.error("Error generating speech:",I),j.value=I instanceof Error?I.message:"An unknown error occurred"}finally{L.value=!1}}function ee(){_.value&&(_.value.pause(),_.value.currentTime=0),C.value&&(URL.revokeObjectURL(C.value),C.value="")}xe(()=>{C.value&&URL.revokeObjectURL(C.value)});function ue(R){M.value={id:R,name:R,description:R,previewURL:R,languages:[{code:"en",title:"English"}],provider:v.value,gender:"male"}}function de(R){b.value=R}return(R,s)=>{var G;const I=be("motion");return i(),u(H,null,[e("div",ut,[e("div",dt,[e("div",null,[e("div",ct,[e("div",null,[e("h2",vt,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.title")),1),e("div",mt,[e("span",null,y(t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.description")),1)])]),e("div",pt,[t(c).length>0?(i(),u("fieldset",ft,[(i(!0),u(H,null,Y(t(f),d=>(i(),J(t($e),{id:d.id,key:d.id,modelValue:t(v),"onUpdate:modelValue":s[0]||(s[0]=ce=>F(v)?v.value=ce:null),name:"speech-provider",value:d.id,title:d.localizedName,description:d.localizedDescription},null,8,["id","modelValue","value","title","description"]))),128))])):(i(),u("div",gt,[S(t(he),{class:"flex items-center gap-3 rounded-lg p-4",border:"2 dashed neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-800",transition:"colors duration-200 ease-in-out",to:"/settings/providers"},{default:N(()=>s[13]||(s[13]=[e("div",{"i-solar:warning-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No Speech Providers Configured"),e("span",{class:"text-sm text-neutral-400 dark:text-neutral-500"},"Click here to set up your speech providers")],-1),e("div",{"i-solar:arrow-right-line-duotone":"",class:"ml-auto text-xl text-neutral-400 dark:text-neutral-500"},null,-1)])),_:1})]))])]),e("div",null,[t(v)&&t(U)?(i(),u("div",xt,[e("div",bt,[e("div",null,[e("h2",ht,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.title")),1),e("div",yt,[e("span",null,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.subtitle")),1)])]),t(E)?(i(),u("div",kt,[s[14]||(s[14]=e("div",{class:"mr-2 animate-spin"},[e("div",{"i-solar:spinner-line-duotone":"","text-xl":""})],-1)),e("span",null,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.loading")),1)])):t(T)?(i(),u("div",wt,[s[15]||(s[15]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",_t,[e("span",St,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.error")),1),e("span",Vt,y(t(T)),1)])])):t(q).length===0&&!t(E)?(i(),u("div",Mt,[s[16]||(s[16]=e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1)),e("div",Ct,[e("span",$t,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models")),1),e("span",Pt,y(t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_models_description")),1)])])):t(q).length>0?(i(),J(t(Ce),{key:3,modelValue:t(b),"onUpdate:modelValue":s[1]||(s[1]=d=>F(b)?b.value=d:null),"search-query":t(A),"onUpdate:searchQuery":s[2]||(s[2]=d=>F(A)?A.value=d:null),items:t(q),searchable:!0,"search-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results"),"search-no-results-description":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.no_search_results_description",{query:t(A)}),"search-results-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.search_results",{count:"{count}",total:"{total}"}),"custom-input-placeholder":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.custom_model_placeholder"),"expand-button-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.expand"),"collapse-button-text":t(o)("settings.pages.modules.consciousness.sections.section.provider-model-selection.collapse"),"onUpdate:customValue":de},null,8,["modelValue","search-query","items","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text"])):P("",!0)])])):P("",!0)])]),t(v)?(i(),u("div",Ut,[e("div",Lt,[s[27]||(s[27]=e("div",null,[e("h2",{class:"text-lg text-neutral-500 md:text-2xl dark:text-neutral-400"}," Voice Configuration "),e("div",{text:"neutral-400 dark:neutral-500"},[e("span",null,"Customize how your AI assistant speaks")])],-1)),t(k)?(i(),u("div",qt,[e("div",At,[S(t(O),{class:"w-full rounded-lg p-2.5 text-sm"},{default:N(()=>s[17]||(s[17]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),e("div",Et,[S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:N(()=>s[18]||(s[18]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:N(()=>s[19]||(s[19]=[e("div",{class:"h-1lh"},null,-1)])),_:1}),S(t(O),{class:"w-full rounded-lg p-4 text-sm"},{default:N(()=>s[20]||(s[20]=[e("div",{class:"h-1lh"},null,-1)])),_:1})]),S(t(O),{class:"w-full rounded-lg p-3 text-sm"},{default:N(()=>s[21]||(s[21]=[e("div",{class:"h-1lh"},null,-1)])),_:1})])])):t(a)[t(v)]&&t(a)[t(v)].length>0?(i(),u("div",Rt,[S(t(nt),{"search-query":r.value,"onUpdate:searchQuery":s[3]||(s[3]=d=>r.value=d),"voice-id":t(h),"onUpdate:voiceId":s[4]||(s[4]=d=>F(h)?h.value=d:null),voices:(G=t(a)[t(v)])==null?void 0:G.map(d=>({id:d.id,name:d.name,description:d.description,previewURL:d.previewURL,customizable:!1})),searchable:!0,"search-placeholder":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_placeholder"),"search-no-results-title":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices"),"search-no-results-description":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.no_voices_description"),"search-results-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.search_voices_results",{count:0,total:0}),"custom-input-placeholder":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.custom_voice_placeholder"),"expand-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_more"),"collapse-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.show_less"),"play-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.play_sample"),"pause-button-text":t(o)("settings.pages.modules.speech.sections.section.provider-voice-selection.pause"),"onUpdate:customValue":ue},null,8,["search-query","voice-id","voices","search-placeholder","search-no-results-title","search-no-results-description","search-results-text","custom-input-placeholder","expand-button-text","collapse-button-text","play-button-text","pause-button-text"])])):t(z)?(i(),u("div",Tt,[s[23]||(s[23]=e("div",{"i-solar:close-circle-line-duotone":"",class:"text-2xl text-red-500 dark:text-red-400"},null,-1)),e("div",zt,[s[22]||(s[22]=e("span",{class:"font-medium"},"Error loading voices",-1)),e("span",Bt,y(t(z)),1)])])):(i(),u("div",Ft,s[24]||(s[24]=[e("div",{"i-solar:info-circle-line-duotone":"",class:"text-2xl text-amber-500 dark:text-amber-400"},null,-1),e("div",{class:"flex flex-col"},[e("span",{class:"font-medium"},"No voices available"),e("span",{class:"text-sm text-amber-600 dark:text-amber-400"}," No voices were found for this provider. You can enter a custom voice name below. ")],-1)]))),e("div",Nt,[S(t(se),{modelValue:t(p),"onUpdate:modelValue":s[5]||(s[5]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"]),S(t(le),{modelValue:t(B),"onUpdate:modelValue":s[6]||(s[6]=d=>F(B)?B.value=d:null),label:"Enable SSML",description:"Enable Speech Synthesis Markup Language for more control over speech output"},null,8,["modelValue"])]),!t(a)[t(v)]||t(a)[t(v)].length===0?(i(),u("div",It,[S(t(Ve),{modelValue:t(h),"onUpdate:modelValue":s[7]||(s[7]=d=>F(h)?h.value=d:null),type:"text",label:"Voice ID",description:"Enter the voice ID for your custom voice",placeholder:"Enter voice name (e.g., 'Rachel', 'Josh')"},null,8,["modelValue"]),t(v)==="elevenlabs"?(i(),u("div",Dt,[s[26]||(s[26]=e("label",{class:"mb-1 block text-sm font-medium"}," Model ",-1)),Q(e("select",{"onUpdate:modelValue":s[8]||(s[8]=d=>F(b)?b.value=d:null),class:"w-full border border-neutral-300 rounded bg-white px-3 py-2 dark:border-neutral-700 dark:bg-neutral-900"},s[25]||(s[25]=[e("option",{value:"eleven_monolingual_v1"}," Monolingual v1 ",-1),e("option",{value:"eleven_multilingual_v1"}," Multilingual v1 ",-1),e("option",{value:"eleven_multilingual_v2"}," Multilingual v2 ",-1)]),512),[[ye,t(b)]])])):P("",!0),e("div",jt,[S(t(se),{modelValue:t(p),"onUpdate:modelValue":s[9]||(s[9]=d=>F(p)?p.value=d:null),label:"Pitch",description:"Tune the pitch of the voice",min:-100,max:100,step:1,"format-value":d=>`${d}%`},null,8,["modelValue","format-value"])])])):P("",!0)])])):P("",!0)]),e("div",Ot,[e("div",Qt,[e("h2",Ht,[e("div",Gt,[S(t(ke)),e("div",null,y(t(o)("settings.pages.providers.provider.elevenlabs.playground.title")),1)])]),e("div",Jt,[S(t(le),{modelValue:n.value,"onUpdate:modelValue":s[10]||(s[10]=d=>n.value=d),label:"Use Custom SSML",description:"Enable to input raw SSML instead of plain text"},null,8,["modelValue"]),n.value?Q((i(),u("textarea",{key:1,"onUpdate:modelValue":s[12]||(s[12]=d=>w.value=d),placeholder:"Enter SSML text...",border:"neutral-100 dark:neutral-800 solid 2 focus:neutral-200 dark:focus:neutral-700",transition:"all duration-250 ease-in-out",bg:"neutral-100 dark:neutral-800 focus:neutral-50 dark:focus:neutral-900","h-48":"","w-full":"","rounded-lg":"","px-3":"","py-2":"","text-sm":"","font-mono":"","outline-none":""},null,512)),[[ne,w.value]]):(i(),J(t(Me),{key:0,modelValue:x.value,"onUpdate:modelValue":s[11]||(s[11]=d=>x.value=d),"h-24":"","w-full":"",placeholder:t(o)("settings.pages.providers.provider.elevenlabs.playground.fields.field.input.placeholder")},null,8,["modelValue","placeholder"])),e("div",Kt,[e("button",{border:"neutral-800 dark:neutral-200 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"",text:"neutral-100 dark:neutral-900","py-2":"","text-sm":"",disabled:L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M),class:$({"opacity-50 cursor-not-allowed":L.value||!x.value.trim()&&!n.value||n.value&&!w.value.trim()||!t(M)}),bg:"neutral-700 dark:neutral-300",onClick:ie},[e("div",Wt,[s[28]||(s[28]=e("div",{"i-solar:play-circle-bold-duotone":""},null,-1)),e("span",null,y(L.value?t(o)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.generating"):t(o)("settings.pages.providers.provider.elevenlabs.playground.buttons.button.test-voice.label")),1)])],10,Yt),C.value?(i(),u("button",{key:0,border:"primary-300 dark:primary-800 solid 2",transition:"border duration-250 ease-in-out","rounded-lg":"","px-4":"","py-2":"","text-sm":"",onClick:ee},s[29]||(s[29]=[e("div",{flex:"~ row","items-center":"","gap-2":""},[e("div",{"i-solar:stop-circle-bold-duotone":""}),e("span",null,"Stop")],-1)]))):P("",!0)]),C.value?(i(),u("audio",{key:2,ref_key:"audioPlayer",ref:_,src:C.value,controls:"",class:"mt-2 w-full"},null,8,Xt)):P("",!0)])])])]),Q((i(),u("div",Zt,s[30]||(s[30]=[e("div",{text:"60","i-solar:user-speak-rounded-bold-duotone":""},null,-1)]))),[[I]])],64)}}});typeof oe=="function"&&oe(es);export{es as default}; diff --git a/assets/stage-5MgbTKFk.js b/assets/stage-CBKu5wDZ.js similarity index 84% rename from assets/stage-5MgbTKFk.js rename to assets/stage-CBKu5wDZ.js index 18ce4d5420e79cb3c877a9197d99a49d23636bce..9fbc177de82fe5f3654f2f7c278bc83bd864a2b3 100644 --- a/assets/stage-5MgbTKFk.js +++ b/assets/stage-CBKu5wDZ.js @@ -1 +1 @@ -import{d as p,n as s,c,b as d,p as i,q as m,u as e,o as l}from"./index-5LjD1Eoi.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; +import{d as p,n as s,c,b as d,p as i,q as m,u as e,o as l}from"./index-DCMFRrFG.js";const x=p({__name:"stage",setup(u){const{top:t,right:o,bottom:a,left:n}=s();return(f,_)=>{const r=i("RouterView");return l(),c("main",{text:"gray-700 dark:gray-200","h-full":"","font-cuteen":"",style:m({paddingTop:`${e(t)}px`,paddingRight:`${e(o)}px`,paddingBottom:`${e(a)}px`,paddingLeft:`${e(n)}px`})},[d(r)],4)}}});export{x as default}; diff --git a/assets/three-vrm-animation.module-C_NwwsBw.js b/assets/three-vrm-animation.module-BGS11oHQ.js similarity index 99% rename from assets/three-vrm-animation.module-C_NwwsBw.js rename to assets/three-vrm-animation.module-BGS11oHQ.js index 760c706331393df9a7ecd3e86a6c3e6944c375f0..fc531279332f8cf83cb4331c4a825daf7d3756c0 100644 --- a/assets/three-vrm-animation.module-C_NwwsBw.js +++ b/assets/three-vrm-animation.module-BGS11oHQ.js @@ -1,4 +1,4 @@ -import{_ as N,N as ae,V as _,ci as z,a7 as X,b5 as Bi,a3 as ki,ac as C,Q as T,a6 as ee,bd as le,ay as zt,aj as jt,an as Xt,b6 as Oe,b9 as at,cj as Fi,a2 as Hi,ck as Wi,a4 as zi,cl as ce,b1 as xe,av as U,cm as ji,$ as Y,ba as Xi,b8 as qi,cn as qt,be as lt,co as Yi,am as Ie,bf as Gi,bi as Qi,bj as $i}from"./index-5LjD1Eoi.js";const et=400,j=[[.075,800],[.11,0],[.125,0],[.14,0],[.125,0],[.05,0],[.04,0],[.03,0],[.02,0],[1,0]];for(let e=1;ed.getProviderMetadata(a)),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,r;d.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),K([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var v,f;return z(),x(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(g).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:u(()=>{var p;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=h=>i.value=h),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.value=p),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as k,k as y,h as U,s as V,l as c,f as $,w as K,m as x,o as z,E as u,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as w}from"./providers-DHuI5XmA.js";/* empty css */import{_ as C,a as M}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as N}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as P,a as R}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as S}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="together-ai",B=k({__name:"together-ai",setup(I){const{t:m}=y(),g=U(),d=w(),{providers:o}=V(d),n=c(()=>d.getProviderMetadata(a)),i=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=c({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,r;d.initializeProvider(a),i.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((r=o.value[a])==null?void 0:r.baseUrl)||""}),K([i,s],()=>{o.value[a]={...o.value[a],apiKey:i.value,baseUrl:s.value||""}});function b(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,r)=>{var v,f;return z(),x(t(S),{"provider-name":(v=n.value)==null?void 0:v.localizedName,"provider-icon-color":(f=n.value)==null?void 0:f.iconColor,"on-back":()=>t(g).back()},{default:u(()=>[l(t(P),null,{default:u(()=>[l(t(R),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":b},{default:u(()=>{var p;return[l(t(N),{modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=h=>i.value=h),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"togetherapi-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(C),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(M),{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=p=>s.value=p),placeholder:"https://api.together.xyz/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon-color","on-back"])}}});typeof _=="function"&&_(B);export{B as default}; diff --git a/assets/useIconAnimation-BkxpLoyr.js b/assets/useIconAnimation-CvSuZDEE.js similarity index 83% rename from assets/useIconAnimation-BkxpLoyr.js rename to assets/useIconAnimation-CvSuZDEE.js index 41e034e25828aa3f0f3231badf5a129b64240dae..c457b6b7765a361d233206833da15c5d3b17354c 100644 --- a/assets/useIconAnimation-BkxpLoyr.js +++ b/assets/useIconAnimation-CvSuZDEE.js @@ -1 +1 @@ -import"./emotions-CAex_2dA.js";import{r as t,D as u,l as r,f as c,g as m}from"./index-5LjD1Eoi.js";function p(s){const n=t(!1),o=t(!1),a=t(s),e=u(),i=r(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return c(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),m(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{p as u}; +import"./emotions-CAex_2dA.js";import{r as t,D as u,l as r,f as c,g as m}from"./index-DCMFRrFG.js";function p(s){const n=t(!1),o=t(!1),a=t(s),e=u(),i=r(()=>o.value&&!e.disableTransitions&&e.usePageSpecificTransitions);return c(()=>{o.value=!0,requestAnimationFrame(()=>{n.value=!0})}),m(()=>{n.value=!1,o.value=!1}),{iconAnimationStarted:n,showIconAnimation:i,animationIcon:a}}export{p as u}; diff --git a/assets/vibrant-Oen8O70m.js b/assets/vibrant-MRFE1Mkk.js similarity index 92% rename from assets/vibrant-Oen8O70m.js rename to assets/vibrant-MRFE1Mkk.js index 19538c1168db6b06c0f4c7b37a6e1448f66aeb39..15f07b18f26950f930a84766a3472cb324d4fb6c 100644 --- a/assets/vibrant-Oen8O70m.js +++ b/assets/vibrant-MRFE1Mkk.js @@ -1 +1 @@ -/* empty css */import{_ as g}from"./InputFile.vue_vue_type_script_setup_true_lang-DjtsZn7R.js";import{V as p}from"./browser-CkchkNbv.js";import{d as v,r as n,w as _,c as r,o,a as s,bA as b,bB as h,t as k,b as w,u as x,i as y,q as V}from"./index-5LjD1Eoi.js";const j={flex:"","flex-col":"","gap-4":""},B={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},C={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},L={flex:"","gap-2":""},N={"h-60":"",border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","rounded-lg":""},O=["src"],I=v({__name:"vibrant",setup(S){const u=n([]),t=n(),d=n([]),i=n([]);function c(l){const a=new Image;a.src=URL.createObjectURL(l),a.onload=f,t.value=a}async function f(){if(!t.value)return;const a=await new p(t.value).getPalette();d.value=Object.values(a).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string"),i.value=Object.values(a).map(e=>JSON.stringify(e))}return _(u,l=>{c(l[0])},{deep:!0}),(l,a)=>(o(),r("div",j,[s("div",B,[(o(!0),r(b,null,h(d.value,(e,m)=>(o(),r("div",{key:m,style:V({backgroundColor:e}),"size-20":"","rounded-full":""},null,4))),128))]),s("div",C,k(i.value),1),s("div",L,[w(x(g),{modelValue:u.value,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),"h-60":"","w-full":""},null,8,["modelValue"])]),s("div",N,[t.value?(o(),r("img",{key:0,src:t.value.src,"h-full":"","w-full":"","object-contain":""},null,8,O)):y("",!0)])]))}});export{I as default}; +/* empty css */import{_ as g}from"./InputFile.vue_vue_type_script_setup_true_lang-CYiBTlgF.js";import{V as p}from"./browser-CkchkNbv.js";import{d as v,r as n,w as _,c as r,o,a as s,bA as b,bB as h,t as k,b as w,u as x,i as y,q as V}from"./index-DCMFRrFG.js";const j={flex:"","flex-col":"","gap-4":""},B={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},C={border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","w-full":"",flex:"","gap-2":"","rounded-lg":"","p-4":""},L={flex:"","gap-2":""},N={"h-60":"",border:"2 solid neutral-200 dark:neutral-800",bg:"neutral-50 dark:neutral-900","rounded-lg":""},O=["src"],I=v({__name:"vibrant",setup(S){const u=n([]),t=n(),d=n([]),i=n([]);function c(l){const a=new Image;a.src=URL.createObjectURL(l),a.onload=f,t.value=a}async function f(){if(!t.value)return;const a=await new p(t.value).getPalette();d.value=Object.values(a).map(e=>e==null?void 0:e.hex).filter(e=>typeof e=="string"),i.value=Object.values(a).map(e=>JSON.stringify(e))}return _(u,l=>{c(l[0])},{deep:!0}),(l,a)=>(o(),r("div",j,[s("div",B,[(o(!0),r(b,null,h(d.value,(e,m)=>(o(),r("div",{key:m,style:V({backgroundColor:e}),"size-20":"","rounded-full":""},null,4))),128))]),s("div",C,k(i.value),1),s("div",L,[w(x(g),{modelValue:u.value,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value=e),"h-60":"","w-full":""},null,8,["modelValue"])]),s("div",N,[t.value?(o(),r("img",{key:0,src:t.value.src,"h-full":"","w-full":"","object-contain":""},null,8,O)):y("",!0)])]))}});export{I as default}; diff --git a/assets/volcengine-BFyGxF3P.js b/assets/volcengine-D4FqTSKw.js similarity index 69% rename from assets/volcengine-BFyGxF3P.js rename to assets/volcengine-D4FqTSKw.js index 45bee30ddf3f7ce3eaf24ab2f4c4986c944e2d2a..c481018ff08939054b2f420eac814215472ace4d 100644 --- a/assets/volcengine-BFyGxF3P.js +++ b/assets/volcengine-D4FqTSKw.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as y,r as w,s as M,k as I,l as c,f as S,w as g,m as k,o as x,E as v,b as f,u as r,a as F}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as $}from"./providers-CIeQW25J.js";import{u as B}from"./speech-BYL-UWPg.js";import{_ as E}from"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import{_ as R}from"./FieldRange.vue_vue_type_script_setup_true_lang-DE5xbp80.js";/* empty css */import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-DSERPeKE.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";const N={flex:"~ col gap-4"},o="volcengine",b="v1",T=y({__name:"volcengine",setup(U){const s=w(1),d=B(),a=$(),{providers:t}=M(a),{t:n}=I(),p=c({get:()=>{var e,i;return((i=(e=t.value[o])==null?void 0:e.app)==null?void 0:i.appId)||""},set:e=>{t.value[o]||(t.value[o]={}),t.value[o].app={appId:e}}}),C=c(()=>{var e;return!!((e=t.value[o])!=null&&e.apiKey)}),P=c(()=>d.availableVoices[o]||[]);async function V(e,i,l){const m=a.getProviderInstance(o);if(!m)throw new Error("Failed to initialize speech provider");const u=a.getProviderConfig(o),h=u.model||b;return await d.speech(m,h,e,i,{...u})}return S(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),g(s,async()=>{const e=a.getProviderConfig(o);e.audio||(e.audio={}),e.audio.speedRatio=s.value}),g([t,p],async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(x(),k(r(L),{"provider-id":o,"default-model":b},{"basic-settings":v(()=>[F("div",N,[f(r(E),{modelValue:p.value,"onUpdate:modelValue":i[0]||(i[0]=l=>p.value=l),label:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.label"),description:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.description"),required:""},null,8,["modelValue","label","description"])])]),"voice-settings":v(()=>[f(r(R),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=l=>s.value=l),label:r(n)("settings.pages.providers.provider.common.fields.field.speed.label"),description:r(n)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])]),playground:v(()=>[f(r(K),{"available-voices":P.value,"generate-speech":V,"api-key-configured":C.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof _=="function"&&_(T);export{T as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as y,r as w,s as M,k as I,l as c,f as S,w as g,m as k,o as x,E as v,b as f,u as r,a as F}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as $}from"./providers-DHuI5XmA.js";import{u as B}from"./speech-Bc-BAopv.js";import{_ as E}from"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import{_ as R}from"./FieldRange.vue_vue_type_script_setup_true_lang-Ce59C1I_.js";/* empty css */import{_ as K,a as L}from"./SpeechProviderSettings.vue_vue_type_script_setup_true_lang-CAgqr_ja.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";import"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";const N={flex:"~ col gap-4"},o="volcengine",b="v1",T=y({__name:"volcengine",setup(U){const s=w(1),d=B(),a=$(),{providers:t}=M(a),{t:n}=I(),p=c({get:()=>{var e,i;return((i=(e=t.value[o])==null?void 0:e.app)==null?void 0:i.appId)||""},set:e=>{t.value[o]||(t.value[o]={}),t.value[o].app={appId:e}}}),C=c(()=>{var e;return!!((e=t.value[o])!=null&&e.apiKey)}),P=c(()=>d.availableVoices[o]||[]);async function V(e,i,l){const m=a.getProviderInstance(o);if(!m)throw new Error("Failed to initialize speech provider");const u=a.getProviderConfig(o),h=u.model||b;return await d.speech(m,h,e,i,{...u})}return S(async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)}),g(s,async()=>{const e=a.getProviderConfig(o);e.audio||(e.audio={}),e.audio.speedRatio=s.value}),g([t,p],async()=>{const e=a.getProviderConfig(o);await a.getProviderMetadata(o).validators.validateProviderConfig(e)?await d.loadVoicesForProvider(o):console.error("Failed to validate provider config",e)},{immediate:!0}),(e,i)=>(x(),k(r(L),{"provider-id":o,"default-model":b},{"basic-settings":v(()=>[F("div",N,[f(r(E),{modelValue:p.value,"onUpdate:modelValue":i[0]||(i[0]=l=>p.value=l),label:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.label"),description:r(n)("settings.pages.providers.provider.volcengine.fields.field.appId.description"),required:""},null,8,["modelValue","label","description"])])]),"voice-settings":v(()=>[f(r(R),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=l=>s.value=l),label:r(n)("settings.pages.providers.provider.common.fields.field.speed.label"),description:r(n)("settings.pages.providers.provider.common.fields.field.speed.description"),min:.5,max:2,step:.01},null,8,["modelValue","label","description"])]),playground:v(()=>[f(r(K),{"available-voices":P.value,"generate-speech":V,"api-key-configured":C.value,"default-text":"Hello! This is a test of the ElevenLabs voice synthesis."},null,8,["available-voices","api-key-configured"])]),_:1}))}});typeof _=="function"&&_(T);export{T as default}; diff --git a/assets/xai-BCkQH5yt.js b/assets/xai-dY1oJl1B.js similarity index 68% rename from assets/xai-BCkQH5yt.js rename to assets/xai-dY1oJl1B.js index 101c5cba00bf2fa20e9a58c0b72cb9d9e8a176c1..daa1d15562045953118f49eb4a57100a72c62d12 100644 --- a/assets/xai-BCkQH5yt.js +++ b/assets/xai-dY1oJl1B.js @@ -1 +1 @@ -import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-n5GTlT-F.js";import{d as x,k as U,h as V,s as y,l as v,f as $,w as K,m as h,o as w,E as u,b as l,u as t}from"./index-5LjD1Eoi.js";import"./three-vrm-animation.module-C_NwwsBw.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-CIeQW25J.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-D9SKEJp0.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-C1ZXS-LL.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-D7TMP6cs.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-BTE92S8w.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DpXv3nH9.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-D3UjhNfr.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-Bh1sgUoJ.js";import"./Input.vue_vue_type_script_setup_true_lang-DsX6dEPd.js";const a="xai",C=x({__name:"xai",setup(I){const{t:m}=U(),b=V(),d=z(),{providers:o}=y(d),n=v(()=>d.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return w(),h(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"xai-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.x.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; +import"./Stage.vue_vue_type_style_index_0_scoped_e41b35dc_lang-CCN_Z2a8.js";import{d as x,k as U,h as V,s as y,l as v,f as $,w as K,m as h,o as w,E as u,b as l,u as t}from"./index-DCMFRrFG.js";import"./three-vrm-animation.module-BGS11oHQ.js";import"./emotions-CAex_2dA.js";import{u as z}from"./providers-DHuI5XmA.js";/* empty css */import{_ as M,a as N}from"./ProviderBaseUrlInput.vue_vue_type_script_setup_true_lang-AB_S7IzY.js";import{_ as P}from"./ProviderApiKeyInput.vue_vue_type_script_setup_true_lang-DLiQJ2rl.js";import{_ as R,a as S}from"./ProviderSettingsContainer.vue_vue_type_script_setup_true_lang-C908HZJI.js";import{_ as B}from"./ProviderSettingsLayout.vue_vue_type_script_setup_true_lang-DAGrVFOe.js";import{b as _}from"./route-block-B_A1xBdJ.js";import"./index-LHmcipjy.js";import"./Collapsable.vue_vue_type_script_setup_true_lang-DbG6TvxL.js";import"./TransitionVertical.vue_vue_type_script_setup_true_lang-Yuy6gf0o.js";import"./FieldInput.vue_vue_type_script_setup_true_lang-BvI8TIYI.js";import"./Input.vue_vue_type_script_setup_true_lang-GR9BTiwF.js";const a="xai",C=x({__name:"xai",setup(I){const{t:m}=U(),b=V(),d=z(),{providers:o}=y(d),n=v(()=>d.getProviderMetadata(a)),r=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.apiKey)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].apiKey=e}}),s=v({get:()=>{var e;return((e=o.value[a])==null?void 0:e.baseUrl)||""},set:e=>{o.value[a]||(o.value[a]={}),o.value[a].baseUrl=e}});$(()=>{var e,i;d.initializeProvider(a),r.value=((e=o.value[a])==null?void 0:e.apiKey)||"",s.value=((i=o.value[a])==null?void 0:i.baseUrl)||""}),K([r,s],()=>{o.value[a]={...o.value[a],apiKey:r.value,baseUrl:s.value||""}});function g(){var e;o.value[a]={...(e=n.value)==null?void 0:e.defaultOptions}}return(e,i)=>{var c,f;return w(),h(t(B),{"provider-name":(c=n.value)==null?void 0:c.localizedName,"provider-icon":(f=n.value)==null?void 0:f.icon,"on-back":()=>t(b).back()},{default:u(()=>[l(t(R),null,{default:u(()=>[l(t(S),{title:t(m)("settings.pages.providers.common.section.basic.title"),description:t(m)("settings.pages.providers.common.section.basic.description"),"on-reset":g},{default:u(()=>{var p;return[l(t(P),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=k=>r.value=k),"provider-name":(p=n.value)==null?void 0:p.localizedName,placeholder:"xai-..."},null,8,["modelValue","provider-name"])]}),_:1},8,["title","description"]),l(t(M),{title:t(m)("settings.pages.providers.common.section.advanced.title")},{default:u(()=>[l(t(N),{modelValue:s.value,"onUpdate:modelValue":i[1]||(i[1]=p=>s.value=p),placeholder:"https://api.x.ai/v1/"},null,8,["modelValue"])]),_:1},8,["title"])]),_:1})]),_:1},8,["provider-name","provider-icon","on-back"])}}});typeof _=="function"&&_(C);export{C as default}; diff --git a/index.html b/index.html index 47199359b880704eb6c45edb23d53a00aaed7192..5c1717eae64a893deb351ff7d2c15b1a9da1b7db 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ src="/remote-assets/page-external-data/js/script.js" > - +